fix static/management.html
This commit is contained in:
1 parent
e1fc25b447
commit
d210e4092e
1 file changed
+91
-89
+91
-89
@@ -6,86 +6,88 @@
|
||||
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-hidden%3D%22true%22%20role%3D%22img%22%20class%3D%22iconify%20iconify--logos%22%20width%3D%2231.88%22%20height%3D%2232%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20viewBox%3D%220%200%20256%20257%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22IconifyId1813088fe1fbc01fb466%22%20x1%3D%22-.828%25%22%20x2%3D%2257.636%25%22%20y1%3D%227.652%25%22%20y2%3D%2278.411%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%2341D1FF%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23BD34FE%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22IconifyId1813088fe1fbc01fb467%22%20x1%3D%2243.376%25%22%20x2%3D%2250.316%25%22%20y1%3D%222.242%25%22%20y2%3D%2289.03%25%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23FFEA83%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%228.333%25%22%20stop-color%3D%22%23FFDD35%22%3E%3C%2Fstop%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23FFA800%22%3E%3C%2Fstop%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22url(%23IconifyId1813088fe1fbc01fb466)%22%20d%3D%22M255.153%2037.938L134.897%20252.976c-2.483%204.44-8.862%204.466-11.382.048L.875%2037.958c-2.746-4.814%201.371-10.646%206.827-9.67l120.385%2021.517a6.537%206.537%200%200%200%202.322-.004l117.867-21.483c5.438-.991%209.574%204.796%206.877%209.62Z%22%3E%3C%2Fpath%3E%3Cpath%20fill%3D%22url(%23IconifyId1813088fe1fbc01fb467)%22%20d%3D%22M185.432.063L96.44%2017.501a3.268%203.268%200%200%200-2.634%203.014l-5.474%2092.456a3.268%203.268%200%200%200%203.997%203.378l24.777-5.718c2.318-.535%204.413%201.507%203.936%203.838l-7.361%2036.047c-.495%202.426%201.782%204.5%204.151%203.78l15.304-4.649c2.372-.72%204.652%201.36%204.15%203.788l-11.698%2056.621c-.732%203.542%203.979%205.473%205.943%202.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505%204.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>CLI Proxy API Management Center</title>
|
||||
<script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||eLine truncated
|
||||
<script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var d=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e.Line truncated
|
||||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||||
`+ue+e+de}var pe=!1;function me(e,t){if(!e||pe)return``;pe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||||
`),l=s.split(`
|
||||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?fe(n):``}function he(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return e.child!==t&&t!==null?fe(`Suspense Fallback`):fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return fe(`Activity`);default:return``}}function ge(e){try{var t=``,n=null;do t+=he(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?pe(n):``}function ge(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return e.child!==t&&t!==null?pe(`Suspense Fallback`):pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 15:return he(e.type,!1);case 11:return he(e.type.render,!1);case 1:return he(e.type,!0);case 31:return pe(`Activity`);default:return``}}function _e(e){try{var t=``,n=null;do t+=ge(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||||
Error generating stack: `+e.message+`
|
||||
`+e.stack}}var _e=Object.prototype.hasOwnProperty,ve=t.unstable_scheduleCallback,ye=t.unstable_cancelCallback,be=t.unstable_shouldYield,xe=t.unstable_requestPaint,Se=t.unstable_now,Ce=t.unstable_getCurrentPriorityLevel,we=t.unstable_ImmediatePriority,Te=t.unstable_UserBlockingPriority,Ee=t.unstable_NormalPriority,De=t.unstable_LowPriority,Oe=t.unstable_IdlePriority,ke=t.log,Ae=t.unstable_setDisableYieldValue,je=null,Me=null;function Ne(e){if(typeof ke==`function`&&Ae(e),Me&&typeof Me.setStrictMode==`function`)try{Me.setStrictMode(je,e)}catch{}}var Pe=Math.clz32?Math.clz32:Le,Fe=Math.log,Ie=Math.LN2;function Le(e){return e>>>=0,e===0?32:31-(Fe(e)/Ie|0)|0}var Re=256,ze=262144,Be=4194304;function Ve(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function He(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ve(n))):i=Ve(o):i=Ve(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ve(n))):i=Ve(o)):i=Ve(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ue(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function We(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ge(){var e=Be;return Be<<=1,!(Be&62914560)&&(Be=4194304),e}function Ke(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Je(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Pe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ye(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ye(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Xe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ze(e,t){var n=t&-t;return n=n&42?1:Qe(n),(n&(e.suspendedLanes|t))===0?n:0}function Qe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $e(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function et(){var e=I.p;return e===0?(e=window.event,e===void 0?32:Sp(e.type)):e}function tt(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var nt=Math.random().toString(36).slice(2),rt=`__reactFiber$`+nt,it=`__reactProps$`+nt,at=`__reactContainer$`+nt,ot=`__reactEvents$`+nt,st=`__reactListeners$`+nt,ct=`__reactHandles$`+nt,lt=`__reactResources$`+nt,ut=`__reactMarker$`+nt;function dt(e){delete e[rt],delete e[it],delete e[ot],delete e[st],delete e[ct]}function ft(e){var t=e[rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[at]||n[rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[rt])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function pt(e){if(e=e[rt]||e[at]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ht(e){var t=e[lt];return t||(t=e[lt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[ut]=!0}var _t=new Set,vt={};function yt(e,t){bt(e,t),bt(e+`Capture`,t)}function bt(e,t){for(vt[e]=t,e=0;e<t.length;e++)_t.add(t[e])}var xt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3Line truncated
|
||||
`).replace(Ld,``)}function zd(e,t){return t=Rd(t),Rd(e)===t}function Bd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Bd(e,t,`name`,a.name,a,null),Bd(e,t,`formEncType`,a.formEncType,a,null),Bd(e,t,`formMethod`,a.formMethod,a,null),Bd(e,t,`formTarget`,a.formTarget,a,null)):(Bd(e,t,`encType`,a.encType,a,null),Bd(e,t,`method`,a.method,a,null),Bd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Yt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=qt.get(n)||n,Tt(e,n,r))}}function Vd(e,t,n,r,a,o){switch(n){case`style`:Gt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`inneLine truncated
|
||||
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Pn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}L(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=dn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=dn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=fn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=fn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Pn(c.formMethod))return{path:t,submission:c};let l=ne(t);return e&&l.search&&Fn(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:V(l),submission:c}}function Pt(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Dn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Dn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=$e(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Ft(s))f=!1;else if(u){let{shouldLoad:e}=It(s,a.loaderData,a.errors);f=e}else Lt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Qt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Rt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=zt(i,m);return Qt(n,r,e,c,k,i,l,t,h,m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=he(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=In(b,e.path),C=new AbortController,w=ln(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=$t(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=$t(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};zt(S,a)&&(T=$t(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function Ft(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function It(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ft(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Lt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Rt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function zt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Bt(e,t,n,r,i,a){let o;if(e){let t=r[e];L(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Vt(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=fe(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=fe([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Vt(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Vt(e,t)))??!1:!1}var Ht=new WeakMap,Ut=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(L(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ht.get(i);o||(o={},Ht.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=ce(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)R(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve(Line truncated
|
||||
`+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Sp(e.type)):e}function nt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[it])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||(t=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3Line truncated
|
||||
`).replace(Ld,``)}function zd(e,t){return t=Rd(t),Rd(e)===t}function Bd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:Dt(e,`class`,r);break;case`tabIndex`:Dt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Dt(e,n,r);break;case`style`:Kt(e,r,o);break;case`data`:if(t!==`object`){Dt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Bd(e,t,`name`,a.name,a,null),Bd(e,t,`formEncType`,a.formEncType,a,null),Bd(e,t,`formMethod`,a.formMethod,a,null),Bd(e,t,`formTarget`,a.formTarget,a,null)):(Bd(e,t,`encType`,a.encType,a,null),Bd(e,t,`method`,a.method,a,null),Bd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Xt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Ed(`beforetoggle`,e),Ed(`toggle`,e),Et(e,`popover`,r);break;case`xlinkActuate`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ot(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ot(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Et(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Jt.get(n)||n,Et(e,n,r))}}function Vd(e,t,n,r,a,o){switch(n){case`style`:Kt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&Ed(`scroll`,e);break;case`onScrollEnd`:r!=null&&Ed(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`inneLine truncated
|
||||
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!Fn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}R(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=fn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=fn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=pn(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=pn(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Fn(c.formMethod))return{path:t,submission:c};let l=re(t);return e&&l.search&&In(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ne(l),submission:c}}function Ft(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?On(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&On(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=et(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!It(s))f=!1;else if(u){let{shouldLoad:e}=Lt(s,a.loaderData,a.errors);f=e}else Rt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return $t(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?zt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=Bt(i,m);return $t(n,r,e,c,k,i,l,t,h,m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=ge(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Ln(b,e.path),C=new AbortController,w=un(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=en(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=en(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Bt(S,a)&&(T=en(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function It(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Lt(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!It(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Rt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function zt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Bt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Vt(e,t,n,r,i,a){let o;if(e){let t=r[e];R(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Ht(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=pe(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=pe([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Ht(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Ht(e,t)))??!1:!1}var Ut=new WeakMap,Wt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(R(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ut.get(i);o||(o={},Ut.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=le(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)z(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolveLine truncated
|
||||
|
||||
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=ur(),d;if(t){let e=typeof t==`string`?ne(t):t;L(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):me(e,{pathname:p});R(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),R(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Dr(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ge([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ge([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?y.createElement(er.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function xr(){let e=Ir(),t=Qe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=y.createElement(y.Fragment,null,y.createElement(`p`,null,`💿 Hey developer 👋`),y.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,y.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,y.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:i},n):null,o)}var Sr=y.createElement(xr,null),Cr=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=sr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(tr.Provider,{value:this.props.routeContext},y.createElement(nr.Provider,{value:e,children:this.props.component}));return this.context?y.createElement(Tr,{error:e},t):t}};Cr.contextType=Jn;var wr=new WeakMap;function Tr({children:e,error:t}){let{basename:n}=y.useContext($n);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=or(t.digest);if(e){let r=wr.get(t);if(r)throw r;let i=tt(e.location,n),a=i.absoluteURL||i.to;if(sn(a))throw Error(`Invalid redirect location`);if(et&&!wr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw wr.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Er({routeContext:e,match:t,children:n}){let r=y.useContext(Kn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(tr.Provider,{value:e},n)}function Dr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);L(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbLine truncated
|
||||
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=dr(),d;if(t){let e=typeof t==`string`?re(t):t;R(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):he(e,{pathname:p});z(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),z(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let h=Or(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Ke([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Ke([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?y.createElement(tr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function Sr(){let e=Lr(),t=$e(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=y.createElement(y.Fragment,null,y.createElement(`p`,null,`💿 Hey developer 👋`),y.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,y.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,y.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),y.createElement(y.Fragment,null,y.createElement(`h2`,null,`Unexpected Application Error!`),y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?y.createElement(`pre`,{style:i},n):null,o)}var Cr=y.createElement(Sr,null),wr=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=cr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:y.createElement(nr.Provider,{value:this.props.routeContext},y.createElement(rr.Provider,{value:e,children:this.props.component}));return this.context?y.createElement(Er,{error:e},t):t}};wr.contextType=Yn;var Tr=new WeakMap;function Er({children:e,error:t}){let{basename:n}=y.useContext(er);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=sr(t.digest);if(e){let r=Tr.get(t);if(r)throw r;let i=nt(e.location,n),a=i.absoluteURL||i.to;if(cn(a))throw Error(`Invalid redirect location`);if(tt&&!Tr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Tr.set(t,n),n}return y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Dr({routeContext:e,match:t,children:n}){let r=y.useContext(qn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(nr.Provider,{value:e},n)}function Or(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbLine truncated
|
||||
"Header-Name": "value"
|
||||
}`,headers_hint:`以 JSON 对象格式输入自定义 HTTP 请求头,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自定义请求头必须是有效的 JSON。`,headers_invalid_object:`自定义请求头必须是 JSON 对象。`,headers_invalid_value:`每个自定义请求头的值都必须是字符串。`,prefix_proxy_invalid_json:`该认证文件不是 JSON 对象,无法编辑字段。`,prefix_proxy_html_challenge:`下载到的是 HTML 验证页面,不是认证 JSON 对象。请重新认证或替换该认证文件后再编辑字段。`,prefix_proxy_saved_success:`已更新认证文件 "{{name}}"`,quota_refresh_single:`刷新额度`,quota_refresh_hint:`仅刷新该认证文件的额度`,quota_refresh_success:`已刷新 "{{name}}" 的额度`,quota_refresh_failed:`刷新 "{{name}}" 的额度失败:{{message}}`},antigravity_subscription:{plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 额度`,empty_title:`暂无 Antigravity 认证`,empty_desc:`上传 Antigravity 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_project_id:`Antigravity 凭证缺少 project_id。请重新登录或刷新凭证以发现项目。`,empty_models:`暂无额度数据`,plan_label:`套餐`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 和 GPT 模型`,group_models_description:`此分组包含:{{models}}`,weekly_limit:`周限额`,daily_limit:`日限额`,five_hour_limit:`5 小时限额`,monthly_limit:`月限额`,quota_available:`额度可用`,remaining_percent:`剩余 {{percent}}%`,refreshes_in:`{{duration}} 后刷新`,refresh_available:`可刷新`,duration_day_hour:`{{days}} 天 {{hours}} 小时`,duration_hour_minute:`{{hours}} 小时 {{minutes}} 分钟`,duration_minute:`{{minutes}} 分钟`,duration_less_than_minute:`小于 1 分钟`,refresh_button:`刷新额度`,fetch_all:`获取全部`},claude_quota:{title:`Claude 额度`,empty_title:`暂无 Claude OAuth 认证`,empty_desc:`使用 Claude OAuth 登录后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_windows:`暂无额度数据`,refresh_button:`刷新额度`,fetch_all:`获取全部`,five_hour:`5 小时限额`,seven_day:`7 天限额`,seven_day_oauth_apps:`7 天 OAuth 应用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7 天 Fable 5`,extra_usage_label:`额外用量`,plan_label:`套餐`,plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`专业版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`团队版`},codex_quota:{title:`Codex 额度`,empty_title:`暂无 Codex 认证`,empty_desc:`上传 Codex 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_account_id:`Codex 凭证缺少 ChatGPT 账号 ID`,empty_windows:`暂无额度数据`,no_access:`该凭证已无 Codex 访问权限(free)。`,refresh_button:`刷新额度`,fetch_all:`获取全部`,primary_window:`5 小时限额`,secondary_window:`周限额`,team_secondary_window:`月度限额`,code_review_primary_window:`代码审查 5 小时限额`,code_review_secondary_window:`代码审查周限额`,code_review_team_secondary_window:`代码审查月度限额`,additional_primary_window:`{{name}} 5 小时限额`,additional_secondary_window:`{{name}} 周限额`,additional_team_secondary_window:`{{name}} 月度限额`,plan_label:`套餐`,expires_label:`续期时间`,reset_credits_label:`主动重置次数`,reset_credits_expiry_label:`主动重置过期时间(GMT+8)`,reset_credit_number:`第 {{index}} 次`,reset_credits_expiry_failed:`主动重置过期时间获取失败:{{message}}`,reset_credits_invalid_payload:`主动重置过期时间响应格式无效`,reset_button:`重置额度`,reset_confirm_title:`重置 Codex 额度`,reset_confirm_message:`将消耗 1 次主动重置次数来重置 "{{name}}" 的 Codex 额度。是否继续?`,reset_confirm_button:`确认重置`,reset_success:`已重置 "{{name}}" 的 Codex 额度`,reset_failed:`重置 "{{name}}" 的 Codex 额度失败:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 额度`,empty_title:`暂无 Kimi 认证`,empty_desc:`上传 Kimi 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_data:`暂无额度数据`,refresh_button:`刷新额度`,fetch_alLine truncated
|
||||
}`,headers_hint:`以 JSON 对象格式输入自定义 HTTP 请求头,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自定义请求头必须是有效的 JSON。`,headers_invalid_object:`自定义请求头必须是 JSON 对象。`,headers_invalid_value:`每个自定义请求头的值都必须是字符串。`,prefix_proxy_invalid_json:`该认证文件不是 JSON 对象,无法编辑字段。`,prefix_proxy_html_challenge:`下载到的是 HTML 验证页面,不是认证 JSON 对象。请重新认证或替换该认证文件后再编辑字段。`,prefix_proxy_saved_success:`已更新认证文件 "{{name}}"`,quota_refresh_single:`刷新额度`,quota_refresh_hint:`仅刷新该认证文件的额度`,quota_refresh_success:`已刷新 "{{name}}" 的额度`,quota_refresh_failed:`刷新 "{{name}}" 的额度失败:{{message}}`},antigravity_subscription:{plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 额度`,empty_title:`暂无 Antigravity 认证`,empty_desc:`上传 Antigravity 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_project_id:`Antigravity 凭证缺少 project_id。请重新登录或刷新凭证以发现项目。`,empty_models:`暂无额度数据`,plan_label:`套餐`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 和 GPT 模型`,group_models_description:`此分组包含:{{models}}`,weekly_limit:`周限额`,daily_limit:`日限额`,five_hour_limit:`5 小时限额`,monthly_limit:`月限额`,quota_available:`额度可用`,remaining_percent:`剩余 {{percent}}%`,refreshes_in:`{{duration}} 后刷新`,refresh_available:`可刷新`,duration_day_hour:`{{days}} 天 {{hours}} 小时`,duration_hour_minute:`{{hours}} 小时 {{minutes}} 分钟`,duration_minute:`{{minutes}} 分钟`,duration_less_than_minute:`小于 1 分钟`,refresh_button:`刷新额度`,fetch_all:`获取全部`},claude_quota:{title:`Claude 额度`,empty_title:`暂无 Claude OAuth 认证`,empty_desc:`使用 Claude OAuth 登录后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_windows:`暂无额度数据`,refresh_button:`刷新额度`,fetch_all:`获取全部`,five_hour:`5 小时限额`,seven_day:`7 天限额`,seven_day_oauth_apps:`7 天 OAuth 应用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7 天 Fable 5`,extra_usage_label:`额外用量`,plan_label:`套餐`,plan_unknown:`未知`,plan_free:`免费版`,plan_pro:`专业版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`团队版`},codex_quota:{title:`Codex 额度`,empty_title:`暂无 Codex 认证`,empty_desc:`上传 Codex 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,missing_account_id:`Codex 凭证缺少 ChatGPT 账号 ID`,empty_windows:`暂无额度数据`,no_access:`该凭证已无 Codex 访问权限(free)。`,refresh_button:`刷新额度`,fetch_all:`获取全部`,primary_window:`5 小时限额`,secondary_window:`周限额`,team_secondary_window:`月度限额`,code_review_primary_window:`代码审查 5 小时限额`,code_review_secondary_window:`代码审查周限额`,code_review_team_secondary_window:`代码审查月度限额`,additional_primary_window:`{{name}} 5 小时限额`,additional_secondary_window:`{{name}} 周限额`,additional_team_secondary_window:`{{name}} 月度限额`,plan_label:`套餐`,expires_label:`续期时间`,reset_credits_label:`主动重置次数`,reset_credits_expiry_label:`主动重置过期时间({{timezone}})`,reset_credit_number:`第 {{index}} 次`,reset_credits_expiry_failed:`主动重置过期时间获取失败:{{message}}`,reset_credits_invalid_payload:`主动重置过期时间响应格式无效`,reset_button:`重置额度`,reset_confirm_title:`重置 Codex 额度`,reset_confirm_message:`将消耗 1 次主动重置次数来重置 "{{name}}" 的 Codex 额度。是否继续?`,reset_confirm_button:`确认重置`,reset_success:`已重置 "{{name}}" 的 Codex 额度`,reset_failed:`重置 "{{name}}" 的 Codex 额度失败:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 额度`,empty_title:`暂无 Kimi 认证`,empty_desc:`上传 Kimi 认证文件后即可查看额度。`,idle:`点击此处刷新额度`,loading:`正在加载额度...`,load_failed:`额度获取失败:{{message}}`,missing_auth_index:`认证文件缺少 auth_index`,empty_data:`暂无额度数据`,refresh_button:`刷新额度`,fLine truncated
|
||||
"Header-Name": "value"
|
||||
}`,headers_hint:`以 JSON 物件格式輸入自訂 HTTP 請求標頭,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自訂請求標頭必須是有效的 JSON。`,headers_invalid_object:`自訂請求標頭必須是 JSON 物件。`,headers_invalid_value:`每個自訂請求標頭的值都必須是字串。`,prefix_proxy_invalid_json:`該驗證檔案不是 JSON 物件,無法編輯欄位。`,prefix_proxy_html_challenge:`下載到的是 HTML 驗證頁面,不是驗證 JSON 物件。請重新驗證或替換該驗證檔案後再編輯欄位。`,prefix_proxy_saved_success:`已更新驗證檔案「{{name}}」`,quota_refresh_single:`重新整理配額`,quota_refresh_hint:`僅重新整理該驗證檔案的配額`,quota_refresh_success:`已重新整理「{{name}}」的配額`,quota_refresh_failed:`重新整理「{{name}}」的配額失敗:{{message}}`},antigravity_subscription:{plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 配額`,empty_title:`暫無 Antigravity 驗證`,empty_desc:`上傳 Antigravity 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_project_id:`Antigravity 憑證缺少 project_id。請重新登入或重新整理憑證以探索專案。`,empty_models:`暫無配額資料`,plan_label:`方案`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 與 GPT 模型`,group_models_description:`此分組包含:{{models}}`,weekly_limit:`週限額`,daily_limit:`日限額`,five_hour_limit:`5 小時限額`,monthly_limit:`月限額`,quota_available:`配額可用`,remaining_percent:`剩餘 {{percent}}%`,refreshes_in:`{{duration}} 後重新整理`,refresh_available:`可重新整理`,duration_day_hour:`{{days}} 天 {{hours}} 小時`,duration_hour_minute:`{{hours}} 小時 {{minutes}} 分鐘`,duration_minute:`{{minutes}} 分鐘`,duration_less_than_minute:`小於 1 分鐘`,refresh_button:`重新整理配額`,fetch_all:`取得全部`},claude_quota:{title:`Claude 配額`,empty_title:`暫無 Claude OAuth 驗證`,empty_desc:`使用 Claude OAuth 登入後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_windows:`暫無配額資料`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,five_hour:`5 小時限額`,seven_day:`7 天限額`,seven_day_oauth_apps:`7 天 OAuth 應用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7 天 Fable 5`,extra_usage_label:`額外用量`,plan_label:`方案`,plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`專業版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`團隊版`},codex_quota:{title:`Codex 配額`,empty_title:`暫無 Codex 驗證`,empty_desc:`上傳 Codex 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_account_id:`Codex 憑證缺少 ChatGPT 帳號 ID`,empty_windows:`暫無配額資料`,no_access:`該憑證已無 Codex 存取權限(free)。`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,primary_window:`5 小時限額`,secondary_window:`週限額`,team_secondary_window:`月度限額`,code_review_primary_window:`程式碼審查 5 小時限額`,code_review_secondary_window:`程式碼審查週限額`,code_review_team_secondary_window:`程式碼審查月度限額`,additional_primary_window:`{{name}} 5 小時限額`,additional_secondary_window:`{{name}} 週限額`,additional_team_secondary_window:`{{name}} 月度限額`,plan_label:`方案`,expires_label:`續期時間`,reset_credits_label:`主動重置次數`,reset_credits_expiry_label:`主動重置過期時間(GMT+8)`,reset_credit_number:`第 {{index}} 次`,reset_credits_expiry_failed:`主動重置過期時間取得失敗:{{message}}`,reset_credits_invalid_payload:`主動重置過期時間回應格式無效`,reset_button:`重置配額`,reset_confirm_title:`重置 Codex 配額`,reset_confirm_message:`將消耗 1 次主動重置次數來重置「{{name}}」的 Codex 配額。是否繼續?`,reset_confirm_button:`確認重置`,reset_success:`已重置「{{name}}」的 Codex 配額`,reset_failed:`重置「{{name}}」的 Codex 配額失敗:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 配額`,empty_title:`暫無 Kimi 驗證`,empty_desc:`上傳 Kimi 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_indexLine truncated
|
||||
}`,headers_hint:`以 JSON 物件格式輸入自訂 HTTP 請求標頭,例如:{"X-My-Header": "value"}`,headers_invalid_json:`自訂請求標頭必須是有效的 JSON。`,headers_invalid_object:`自訂請求標頭必須是 JSON 物件。`,headers_invalid_value:`每個自訂請求標頭的值都必須是字串。`,prefix_proxy_invalid_json:`該驗證檔案不是 JSON 物件,無法編輯欄位。`,prefix_proxy_html_challenge:`下載到的是 HTML 驗證頁面,不是驗證 JSON 物件。請重新驗證或替換該驗證檔案後再編輯欄位。`,prefix_proxy_saved_success:`已更新驗證檔案「{{name}}」`,quota_refresh_single:`重新整理配額`,quota_refresh_hint:`僅重新整理該驗證檔案的配額`,quota_refresh_success:`已重新整理「{{name}}」的配額`,quota_refresh_failed:`重新整理「{{name}}」的配額失敗:{{message}}`},antigravity_subscription:{plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity 配額`,empty_title:`暫無 Antigravity 驗證`,empty_desc:`上傳 Antigravity 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_project_id:`Antigravity 憑證缺少 project_id。請重新登入或重新整理憑證以探索專案。`,empty_models:`暫無配額資料`,plan_label:`方案`,group_gemini_models:`Gemini 模型`,group_claude_gpt_models:`Claude 與 GPT 模型`,group_models_description:`此分組包含:{{models}}`,weekly_limit:`週限額`,daily_limit:`日限額`,five_hour_limit:`5 小時限額`,monthly_limit:`月限額`,quota_available:`配額可用`,remaining_percent:`剩餘 {{percent}}%`,refreshes_in:`{{duration}} 後重新整理`,refresh_available:`可重新整理`,duration_day_hour:`{{days}} 天 {{hours}} 小時`,duration_hour_minute:`{{hours}} 小時 {{minutes}} 分鐘`,duration_minute:`{{minutes}} 分鐘`,duration_less_than_minute:`小於 1 分鐘`,refresh_button:`重新整理配額`,fetch_all:`取得全部`},claude_quota:{title:`Claude 配額`,empty_title:`暫無 Claude OAuth 驗證`,empty_desc:`使用 Claude OAuth 登入後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,empty_windows:`暫無配額資料`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,five_hour:`5 小時限額`,seven_day:`7 天限額`,seven_day_oauth_apps:`7 天 OAuth 應用`,seven_day_opus:`7 天 Opus`,seven_day_sonnet:`7 天 Sonnet`,seven_day_cowork:`7 天 Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7 天 Fable 5`,extra_usage_label:`額外用量`,plan_label:`方案`,plan_unknown:`未知`,plan_free:`免費版`,plan_pro:`專業版`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`團隊版`},codex_quota:{title:`Codex 配額`,empty_title:`暫無 Codex 驗證`,empty_desc:`上傳 Codex 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_auth_index:`驗證檔案缺少 auth_index`,missing_account_id:`Codex 憑證缺少 ChatGPT 帳號 ID`,empty_windows:`暫無配額資料`,no_access:`該憑證已無 Codex 存取權限(free)。`,refresh_button:`重新整理配額`,fetch_all:`取得全部`,primary_window:`5 小時限額`,secondary_window:`週限額`,team_secondary_window:`月度限額`,code_review_primary_window:`程式碼審查 5 小時限額`,code_review_secondary_window:`程式碼審查週限額`,code_review_team_secondary_window:`程式碼審查月度限額`,additional_primary_window:`{{name}} 5 小時限額`,additional_secondary_window:`{{name}} 週限額`,additional_team_secondary_window:`{{name}} 月度限額`,plan_label:`方案`,expires_label:`續期時間`,reset_credits_label:`主動重置次數`,reset_credits_expiry_label:`主動重置過期時間({{timezone}})`,reset_credit_number:`第 {{index}} 次`,reset_credits_expiry_failed:`主動重置過期時間取得失敗:{{message}}`,reset_credits_invalid_payload:`主動重置過期時間回應格式無效`,reset_button:`重置配額`,reset_confirm_title:`重置 Codex 配額`,reset_confirm_message:`將消耗 1 次主動重置次數來重置「{{name}}」的 Codex 配額。是否繼續?`,reset_confirm_button:`確認重置`,reset_success:`已重置「{{name}}」的 Codex 配額`,reset_failed:`重置「{{name}}」的 Codex 配額失敗:{{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi 配額`,empty_title:`暫無 Kimi 驗證`,empty_desc:`上傳 Kimi 驗證檔案後即可查看配額。`,idle:`點擊此處重新整理配額`,loading:`正在載入配額...`,load_failed:`配額取得失敗:{{message}}`,missing_autLine truncated
|
||||
"Header-Name": "value"
|
||||
}`,headers_hint:`Enter custom HTTP headers as a JSON object, e.g., {"X-My-Header": "value"}`,headers_invalid_json:`Custom headers must be valid JSON.`,headers_invalid_object:`Custom headers must be a JSON object.`,headers_invalid_value:`Each custom header value must be a string.`,prefix_proxy_invalid_json:`This auth file is not a JSON object, so fields cannot be edited.`,prefix_proxy_html_challenge:`Downloaded content is an HTML challenge page, not an auth JSON object. Re-authenticate or replace this auth file before editing fields.`,prefix_proxy_saved_success:`Updated auth file "{{name}}" successfully`,quota_refresh_single:`Refresh quota`,quota_refresh_hint:`Refresh quota only for this credential`,quota_refresh_success:`Quota refreshed for "{{name}}"`,quota_refresh_failed:`Failed to refresh quota for "{{name}}": {{message}}`},antigravity_subscription:{plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity Quota`,empty_title:`No Antigravity Auth Files`,empty_desc:`Upload an Antigravity credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_project_id:`Antigravity credential missing project_id. Re-login or refresh the credential to discover the project.`,empty_models:`No quota data available`,plan_label:`Plan`,group_gemini_models:`Gemini models`,group_claude_gpt_models:`Claude and GPT models`,group_models_description:`Models in this group: {{models}}`,weekly_limit:`Weekly limit`,daily_limit:`Daily limit`,five_hour_limit:`5-hour limit`,monthly_limit:`Monthly limit`,quota_available:`Quota available`,remaining_percent:`{{percent}}% remaining`,refreshes_in:`Refreshes in {{duration}}`,refresh_available:`Refresh available`,duration_day_hour:`{{days}}d {{hours}}h`,duration_hour_minute:`{{hours}}h {{minutes}}m`,duration_minute:`{{minutes}}m`,duration_less_than_minute:`<1m`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`},claude_quota:{title:`Claude Quota`,empty_title:`No Claude OAuth Files`,empty_desc:`Log in with Claude OAuth to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_windows:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,five_hour:`5-hour limit`,seven_day:`7-day limit`,seven_day_oauth_apps:`7-day OAuth apps`,seven_day_opus:`7-day Opus`,seven_day_sonnet:`7-day Sonnet`,seven_day_cowork:`7-day Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7-day Fable 5`,extra_usage_label:`Extra Usage`,plan_label:`Plan`,plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`Team`},codex_quota:{title:`Codex Quota`,empty_title:`No Codex Auth Files`,empty_desc:`Upload a Codex credential to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_account_id:`Codex credential missing ChatGPT account ID`,empty_windows:`No quota data available`,no_access:`This credential has no Codex access (plan: free).`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,primary_window:`5-hour limit`,secondary_window:`Weekly limit`,team_secondary_window:`Monthly limit`,code_review_primary_window:`Code review 5-hour limit`,code_review_secondary_window:`Code review weekly limit`,code_review_team_secondary_window:`Code review monthly limit`,additional_primary_window:`{{name}} 5-hour limit`,additional_secondary_window:`{{name}} weekly limit`,additional_team_secondary_window:`{{name}} monthly limit`,plan_label:`Plan`,expires_label:`Renewal time`,reset_credits_label:`Manual resets`,reset_credits_expiry_label:`Manual reset expiry (GMT+8)`,reset_credit_number:`Reset {{index}}`,reset_credits_expiry_failed:`Failed to load manual reset expiry: {{message}}`,reset_credits_invalid_payload:`Invalid manual reset expiry response`,reset_button:`Reset quota`,reset_confirm_title:`Reset Codex quota`,reset_confirm_message:`This will consume 1 manual reset to reset the Codex quota for "{{name}}". Continue?`,reset_confirm_button:`Reset quota`,reset_success:`Reset Codex quota for "{{name}}"`,reset_failed:`Failed to reset Codex quota for "{{name}}": {{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi Quota`,empty_title:`No Kimi Auth Files`,empty_desc:`Upload a Kimi credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_data:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,weekly_limit:`Weekly limit`,limit_window:`{{duration}} Line truncated
|
||||
}`,headers_hint:`Enter custom HTTP headers as a JSON object, e.g., {"X-My-Header": "value"}`,headers_invalid_json:`Custom headers must be valid JSON.`,headers_invalid_object:`Custom headers must be a JSON object.`,headers_invalid_value:`Each custom header value must be a string.`,prefix_proxy_invalid_json:`This auth file is not a JSON object, so fields cannot be edited.`,prefix_proxy_html_challenge:`Downloaded content is an HTML challenge page, not an auth JSON object. Re-authenticate or replace this auth file before editing fields.`,prefix_proxy_saved_success:`Updated auth file "{{name}}" successfully`,quota_refresh_single:`Refresh quota`,quota_refresh_hint:`Refresh quota only for this credential`,quota_refresh_success:`Quota refreshed for "{{name}}"`,quota_refresh_failed:`Failed to refresh quota for "{{name}}": {{message}}`},antigravity_subscription:{plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_ultra:`Ultra`,plan_ultra_lite:`Ultra Lite`},antigravity_quota:{title:`Antigravity Quota`,empty_title:`No Antigravity Auth Files`,empty_desc:`Upload an Antigravity credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_project_id:`Antigravity credential missing project_id. Re-login or refresh the credential to discover the project.`,empty_models:`No quota data available`,plan_label:`Plan`,group_gemini_models:`Gemini models`,group_claude_gpt_models:`Claude and GPT models`,group_models_description:`Models in this group: {{models}}`,weekly_limit:`Weekly limit`,daily_limit:`Daily limit`,five_hour_limit:`5-hour limit`,monthly_limit:`Monthly limit`,quota_available:`Quota available`,remaining_percent:`{{percent}}% remaining`,refreshes_in:`Refreshes in {{duration}}`,refresh_available:`Refresh available`,duration_day_hour:`{{days}}d {{hours}}h`,duration_hour_minute:`{{hours}}h {{minutes}}m`,duration_minute:`{{minutes}}m`,duration_less_than_minute:`<1m`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`},claude_quota:{title:`Claude Quota`,empty_title:`No Claude OAuth Files`,empty_desc:`Log in with Claude OAuth to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_windows:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,five_hour:`5-hour limit`,seven_day:`7-day limit`,seven_day_oauth_apps:`7-day OAuth apps`,seven_day_opus:`7-day Opus`,seven_day_sonnet:`7-day Sonnet`,seven_day_cowork:`7-day Cowork`,iguana_necktie:`Iguana Necktie`,seven_day_fable:`7-day Fable 5`,extra_usage_label:`Extra Usage`,plan_label:`Plan`,plan_unknown:`Unknown`,plan_free:`Free`,plan_pro:`Pro`,plan_max:`Max`,plan_max5:`Max 5x`,plan_max20:`Max 20x`,plan_team:`Team`},codex_quota:{title:`Codex Quota`,empty_title:`No Codex Auth Files`,empty_desc:`Upload a Codex credential to view quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,missing_account_id:`Codex credential missing ChatGPT account ID`,empty_windows:`No quota data available`,no_access:`This credential has no Codex access (plan: free).`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,primary_window:`5-hour limit`,secondary_window:`Weekly limit`,team_secondary_window:`Monthly limit`,code_review_primary_window:`Code review 5-hour limit`,code_review_secondary_window:`Code review weekly limit`,code_review_team_secondary_window:`Code review monthly limit`,additional_primary_window:`{{name}} 5-hour limit`,additional_secondary_window:`{{name}} weekly limit`,additional_team_secondary_window:`{{name}} monthly limit`,plan_label:`Plan`,expires_label:`Renewal time`,reset_credits_label:`Manual resets`,reset_credits_expiry_label:`Manual reset expiry ({{timezone}})`,reset_credit_number:`Reset {{index}}`,reset_credits_expiry_failed:`Failed to load manual reset expiry: {{message}}`,reset_credits_invalid_payload:`Invalid manual reset expiry response`,reset_button:`Reset quota`,reset_confirm_title:`Reset Codex quota`,reset_confirm_message:`This will consume 1 manual reset to reset the Codex quota for "{{name}}". Continue?`,reset_confirm_button:`Reset quota`,reset_success:`Reset Codex quota for "{{name}}"`,reset_failed:`Failed to reset Codex quota for "{{name}}": {{message}}`,plan_plus:`Plus`,plan_team:`Team`,plan_free:`Free`,plan_pro:`Pro 20x`,plan_prolite:`Pro 5x`},kimi_quota:{title:`Kimi Quota`,empty_title:`No Kimi Auth Files`,empty_desc:`Upload a Kimi credential to view remaining quota.`,idle:`Click here to refresh quota`,loading:`Loading quota...`,load_failed:`Failed to load quota: {{message}}`,missing_auth_index:`Auth file missing auth_index`,empty_data:`No quota data available`,refresh_button:`Refresh Quota`,fetch_all:`Fetch All`,weekly_limit:`Weekly limit`,limit_window:`{{duraLine truncated
|
||||
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Uu[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Gu(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var Ku=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),qu=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Ju(e,t){return W.isArray(e)?e.map(e=>Ju(e,t)):Gu(String(e).replace(t,``))}var Yu=e=>Ju(e,Ku),Xu=e=>Ju(e,qu);function Zu(e){let t=Object.create(null);return W.forEach(e.toJSON(),(e,n)=>{t[n]=Xu(e)}),t}var Qu=Symbol(`internals`);function $u(e){return e&&String(e).trim().toLowerCase()}function ed(e){return e===!1||e==null?e:W.isArray(e)?e.map(ed):Yu(String(e))}function td(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var nd=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rd(e,t,n,r,i){if(W.isFunction(r))return r.call(this,t,n);if(i&&(t=n),W.isString(t)){if(W.isString(r))return t.indexOf(r)!==-1;if(W.isRegExp(r))return r.test(t)}}function id(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function ad(e,t){let n=W.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var od=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=$u(t);if(!i)return;let a=W.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=ed(e))}let a=(e,t)=>W.forEach(e,(e,n)=>i(e,n,t));if(W.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(W.isString(e)&&(e=e.trim())&&!nd(e))a(Wu(e),t);else if(W.isObject(e)&&W.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!W.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],W.hasOwnProp(n,i)?(r=n[i],n[i]=W.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=$u(e),e){let n=W.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return td(e);if(W.isFunction(t))return t.call(this,e,n);if(W.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=$u(e),e){let n=W.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||rd(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=$u(e),e){let i=W.findKey(n,e);i&&(!t||rd(n,n[i],i,t))&&(delete n[i],r=!0)}}return W.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||rd(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return W.forEach(this,(r,i)=>{let a=W.findKey(n,i);if(a){t[a]=ed(r),delete t[i];return}let o=e?id(i):String(i).trim();o!==i&&delete t[i],t[o]=ed(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return W.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&W.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(`
|
||||
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Qu]=this[Qu]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=$u(e);t[r]||(ad(n,e),t[r]=!0)}return W.isArray(e)?e.forEach(r):r(e),this}};od.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),W.reduceDescriptors(od.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),W.freezeMethods(od);var sd=`[REDACTED ****]`;function cd(e){if(W.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(W.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function ld(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||W.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof od&&(e=e.toJSON()),r.push(e);let t;if(W.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);W.isUndefined(r)||(t[n]=r)});else{if(!W.isPlainObject(e)&&cd(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?sd:i(a);W.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var G=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&W.hasOwnProp(e,`redact`)?e.redact:void 0,n=W.isArray(t)&&t.length>0?ld(e,t):W.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};G.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,G.ERR_BAD_OPTION=`ERR_BAD_OPTION`,G.ECONNABORTED=`ECONNABORTED`,G.ETIMEDOUT=`ETIMEDOUT`,G.ECONNREFUSED=`ECONNREFUSED`,G.ERR_NETWORK=`ERR_NETWORK`,G.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,G.ERR_DEPRECATED=`ERR_DEPRECATED`,G.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,G.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,G.ERR_CANCELED=`ERR_CANCELED`,G.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,G.ERR_INVALID_URL=`ERR_INVALID_URL`,G.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function ud(e){return W.isPlainObject(e)||W.isArray(e)}function dd(e){return W.endsWith(e,`[]`)?e.slice(0,-2):e}function fd(e,t,n){return e?e.concat(t).map(function(e,t){return e=dd(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function pd(e){return W.isArray(e)&&!e.some(ud)}var md=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function hd(e,t,n){if(!W.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!W.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&W.isSpecCompliantForm(t),u=[];if(!W.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(W.isDate(e))return e.toISOString();if(W.isBoolean(e))return e.toString();if(!l&&W.isBlob(e))throw new G(`Blob is not supported. Use a Buffer instead.`);if(W.isArrayBuffer(e)||W.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new G(`Blob is not supported. Use a Buffer instead.`,G.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new G(`Object is too deeply nested (`+e+` levels). Max depth: `+c,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!W.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(W.isReactNative(t)&&W.isReactNativeBlob(e))return t.append(fd(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(W.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(W.isArray(e)&&pd(e)||(W.isFileList(e)||W.endsWith(n,`[]`))&&(s=W.toArray(e)))return n=dd(n),s.forEach(function(e,r){!(W.isUndefined(e)||e===null)&&t.append(o===!0?fd([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return ud(e)?!0:(t.append(fd(i,n,a),d(e)),!1)}let h=Object.assign(md,{defaultVisitor:m,convertValue:d,isVisitable:ud});function g(e,n,r=0){if(!W.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),W.forEach(e,function(e,a){(!(W.isUndefiLine truncated
|
||||
`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Qu]=this[Qu]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=$u(e);t[r]||(ad(n,e),t[r]=!0)}return W.isArray(e)?e.forEach(r):r(e),this}};od.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),W.reduceDescriptors(od.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),W.freezeMethods(od);var sd=`[REDACTED ****]`;function cd(e){if(W.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(W.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function ld(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||W.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof od&&(e=e.toJSON()),r.push(e);let t;if(W.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);W.isUndefined(r)||(t[n]=r)});else{if(!W.isPlainObject(e)&&cd(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?sd:i(a);W.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var G=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&W.hasOwnProp(e,`redact`)?e.redact:void 0,n=W.isArray(t)&&t.length>0?ld(e,t):W.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};G.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,G.ERR_BAD_OPTION=`ERR_BAD_OPTION`,G.ECONNABORTED=`ECONNABORTED`,G.ETIMEDOUT=`ETIMEDOUT`,G.ECONNREFUSED=`ECONNREFUSED`,G.ERR_NETWORK=`ERR_NETWORK`,G.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,G.ERR_DEPRECATED=`ERR_DEPRECATED`,G.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,G.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,G.ERR_CANCELED=`ERR_CANCELED`,G.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,G.ERR_INVALID_URL=`ERR_INVALID_URL`,G.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function ud(e){return W.isPlainObject(e)||W.isArray(e)}function dd(e){return W.endsWith(e,`[]`)?e.slice(0,-2):e}function fd(e,t,n){return e?e.concat(t).map(function(e,t){return e=dd(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function pd(e){return W.isArray(e)&&!e.some(ud)}var md=W.toFlatObject(W,{},null,function(e){return/^is[A-Z]/.test(e)});function hd(e,t,n){if(!W.isObject(e))throw TypeError(`target must be an object`);t=t||new FormData,n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!W.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&W.isSpecCompliantForm(t),u=[];if(!W.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(W.isDate(e))return e.toISOString();if(W.isBoolean(e))return e.toString();if(!l&&W.isBlob(e))throw new G(`Blob is not supported. Use a Buffer instead.`);if(W.isArrayBuffer(e)||W.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new G(`Blob is not supported. Use a Buffer instead.`,G.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new G(`Object is too deeply nested (`+e+` levels). Max depth: `+c,G.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!W.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(W.isReactNative(t)&&W.isReactNativeBlob(e))return t.append(fd(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(W.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(W.isArray(e)&&pd(e)||(W.isFileList(e)||W.endsWith(n,`[]`))&&(s=W.toArray(e)))return n=dd(n),s.forEach(function(e,r){!(W.isUndefined(e)||e===null)&&t.append(o===!0?fd([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return ud(e)?!0:(t.append(fd(i,n,a),d(e)),!1)}let h=Object.assign(md,{defaultVisitor:m,convertValue:d,isVisitable:ud});function g(e,n,r=0){if(!W.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),W.forEach(e,function(e,a){(!(W.isUndefiLine truncated
|
||||
`+e.map(Nf).join(`
|
||||
`):` `+Nf(e[0]):`as no adapter specified`),G.ERR_NOT_SUPPORT)}return i}var If={getAdapter:Ff,adapters:Mf};function Lf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hd(null,e)}function Rf(e){return Lf(e),e.headers=od.from(e.headers),e.data=Bd.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),If.getAdapter(e.adapter||zd.adapter,e)(e).then(function(t){Lf(e),e.response=t;try{t.data=Bd.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=od.from(t.headers),t},function(t){if(!Vd(t)&&(Lf(e),t&&t.response)){e.response=t.response;try{t.response.data=Bd.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=od.from(t.response.headers)}return Promise.reject(t)})}var zf={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{zf[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Bf={};zf.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Sf+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new G(r(i,` has been removed`+(t?` in `+t:``)),G.ERR_DEPRECATED);return t&&!Bf[i]&&(Bf[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},zf.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Vf(e,t,n){if(typeof e!=`object`||!e)throw new G(`options must be an object`,G.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new G(`option `+a+` must be `+n,G.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new G(`Unknown option `+a,G.ERR_BAD_OPTION)}}var Hf={assertOptions:Vf,validators:zf},Uf=Hf.validators,Wf=class{constructor(e){this.defaults=e||{},this.interceptors={request:new xd,response:new xd}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>{if(!t.stack)return``;let e=t.stack.indexOf(`
|
||||
`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(`
|
||||
`),r=t===-1?-1:n.indexOf(`
|
||||
`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=`
|
||||
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t=t||{},t.url=e):t=e||{},t=cf(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Hf.assertOptions(n,{silentJSONParsing:Uf.transitional(Uf.boolean),forcedJSONParsing:Uf.transitional(Uf.boolean),clarifyTimeoutError:Uf.transitional(Uf.boolean),legacyInterceptorReqResOrdering:Uf.transitional(Uf.boolean),advertiseZstdAcceptEncoding:Uf.transitional(Uf.boolean),validateStatusUndefinedResolves:Uf.transitional(Uf.boolean)},!1),r!=null&&(W.isFunction(r)?t.paramsSerializer={serialize:r}:Hf.assertOptions(r,{encode:Uf.function,serialize:Uf.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Hf.assertOptions(t,{baseUrl:Uf.spelling(`baseURL`),withXsrfToken:Uf.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&W.merge(i.common,i[t.method]);i&&W.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=od.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s=s&&e.synchronous;let n=t.transitional||Sd;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Rf.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Rf.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=cf(this.defaults,e),bd(of(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};W.forEach([`delete`,`get`,`head`,`options`],function(e){Wf.prototype[e]=function(t,n){return this.request(cf(n||{},{method:e,url:t,data:n&&W.hasOwnProp(n,`data`)?n.data:void 0}))}}),W.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(cf(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Wf.prototype[e]=t(),e!==`query`&&(Wf.prototype[e+`Form`]=t(!0))});var Gf=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Hd(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Kf(e){return function(t){return e.apply(null,t)}}function qf(e){return W.isObject(e)&&e.isAxiosError===!0}var Jf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Jf).forEach(([e,t])=>{Jf[t]=e});function Yf(e){let t=new Wf(e),n=Dl(Wf.prototype.request,t);return W.extend(n,Wf.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t)Line truncated
|
||||
`);function sE(e,t){let n=nE(e),r=nE(t);if(!n||!r)return!1;if(!rE(n))return n===r;let i=n.split(`*`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`.*`);return RegExp(`^${i}$`,`i`).test(r)}function cE(e,t,n){let r=t.trim(),i=nE(r),a=iE(e).filter(e=>nE(e)!==i);return n&&i&&a.push(r),a}function lE(e,t){let n=new Map(t.map(e=>[nE(e),e])),r=[],i=[],a=[],o=[];return iE(e).forEach(e=>{if(rE(e)){i.push(e),o.push(e);return}let t=n.get(nE(e));if(t){r.push(t);return}a.push(e),o.push(e)}),{exactRules:r,wildcardRules:i,unknownRules:a,customRules:o}}function uE(e,t,n){let{exactRules:r}=lE(e,t);return iE([...r,...aE(n)])}function dE(e,t){let n=nE(t);if(!n)return{state:`included`};let r=!1,i;for(let a of e)rE(a)?i===void 0&&sE(a,t)&&(i=a):!r&&nE(a)===n&&(r=!0);return r&&i!==void 0?{state:`excluded`,by:`both`,rule:i}:r?{state:`excluded`,by:`exact`}:i===void 0?{state:`included`}:{state:`excluded`,by:`wildcard`,rule:i}}var fE=(e,t)=>dE(e,t).state===`excluded`,pE=(e,t)=>e.map(e=>{let n=t.filter(t=>sE(e,t));return{rule:e,matched:n,matchCount:n.length}});function mE(e,t){let n=t.length,r=t.reduce((t,n)=>fE(e,n)?t+1:t,0);return{total:n,excluded:r,available:n-r}}var hE={root:`ExcludedModelsPicker-module__root___RYF7X`,trigger:`ExcludedModelsPicker-module__trigger___ycSKU`,triggerText:`ExcludedModelsPicker-module__triggerText___lbBd4`,triggerSpinner:`ExcludedModelsPicker-module__triggerSpinner___xL-cS`,"excluded-spin":`ExcludedModelsPicker-module__excluded-spin___g-h0p`,excludedSpin:`ExcludedModelsPicker-module__excluded-spin___g-h0p`,chevron:`ExcludedModelsPicker-module__chevron___FcR89`,triggerOpen:`ExcludedModelsPicker-module__triggerOpen___OMivu`,meter:`ExcludedModelsPicker-module__meter___0ZOIu`,meterFill:`ExcludedModelsPicker-module__meterFill___svWrl`,disclosure:`ExcludedModelsPicker-module__disclosure___5zAsh`,disclosureOpen:`ExcludedModelsPicker-module__disclosureOpen___BTQ7b`,disclosureInner:`ExcludedModelsPicker-module__disclosureInner___swIxx`,panel:`ExcludedModelsPicker-module__panel___-GHUW`,"excluded-panel-in":`ExcludedModelsPicker-module__excluded-panel-in___sw1uB`,excludedPanelIn:`ExcludedModelsPicker-module__excluded-panel-in___sw1uB`,searchRow:`ExcludedModelsPicker-module__searchRow___vhaLm`,searchIcon:`ExcludedModelsPicker-module__searchIcon___kl49Z`,search:`ExcludedModelsPicker-module__search___eAW6Q`,list:`ExcludedModelsPicker-module__list___r-52c`,row:`ExcludedModelsPicker-module__row___-dgzQ`,rowHighlighted:`ExcludedModelsPicker-module__rowHighlighted___TXsS-`,rowExcluded:`ExcludedModelsPicker-module__rowExcluded___QwTAb`,checkbox:`ExcludedModelsPicker-module__checkbox___LBJlR`,rowLocked:`ExcludedModelsPicker-module__rowLocked___yX5xZ`,rowText:`ExcludedModelsPicker-module__rowText___VJ0uV`,rowId:`ExcludedModelsPicker-module__rowId___6yGuV`,rowDisplayName:`ExcludedModelsPicker-module__rowDisplayName___c-Ifl`,rowReason:`ExcludedModelsPicker-module__rowReason___1c7c2`,badge:`ExcludedModelsPicker-module__badge___vrwIy`,badgeMuted:`ExcludedModelsPicker-module__badgeMuted___SAngk`,noResults:`ExcludedModelsPicker-module__noResults___Qohto`,footer:`ExcludedModelsPicker-module__footer___eApyV`,footerCount:`ExcludedModelsPicker-module__footerCount___S0dwv`,footerActions:`ExcludedModelsPicker-module__footerActions___1UCO6`,footerButton:`ExcludedModelsPicker-module__footerButton___BcU1G`,catalogNotice:`ExcludedModelsPicker-module__catalogNotice___Vuj8F`,retryButton:`ExcludedModelsPicker-module__retryButton___xLpOx`,chipsMore:`ExcludedModelsPicker-module__chipsMore___qiTQK`,ruleEditor:`ExcludedModelsPicker-module__ruleEditor___BnPbg`,ruleLabel:`ExcludedModelsPicker-module__ruleLabel___Vs3uq`,ruleMatches:`ExcludedModelsPicker-module__ruleMatches___aaZnY`,ruleMatchNone:`ExcludedModelsPicker-module__ruleMatchNone___GTDUi`,ruleWarning:`ExcludedModelsPicker-module__ruleWarning___lcScQ`},gE=(e,t)=>e.id.toLowerCase().includes(t)||(e.displayName??``).toLowerCase().includes(t);function _E({rules:e,candidates:t,stats:n,onToggle:r,onSelectAll:i,onClear:a,disabled:o,listboxId:s,autoFocus:c,onDismiss:l}){let{t:u}=ss(),[d,f]=(0,y.useState)(``),[p,m]=(0,y.useState)(0),h=(0,y.useRef)(null),g=(0,y.useMemo)(()=>{let e=d.trim().toLowerCase();return e?t.filter(t=>gE(t,e)):t},[t,d]),_=g.length===0?-1:Math.min(p,g.length-1),v=_>=0?`${s}-opt-${_}`:void 0;(0,y.useLayoutEffect)(()=>{c&&h.current?.focus({preventScroll:!0})},[c]),(0,y.useEffect)(()=>{!c||_<0||document.getElementById(`${s}-opt-${_}`)?.scrollIntoView({block:`nearest`})},[_,c,s]);let b=t=>{let n=g[t];if(!n||o)return;let i=dE(e,n.id);i.state===`excluded`&&i.by===`wildcard`||r(n.id,i.state!==`excluded`)};return(0,H.jsxs)(`div`,{className:hE.panel,children:[(0,H.jsxs)(`div`,{className:hE.searchRow,children:[(0,H.jsx)(Rs,{size:14,className:hE.searchIcon,"aria-hidden":`true`}),(0,H.jsx)(`input`,{ref:h,type:`text`,className:hE.search,value:d,onChange:e=>{f(e.target.value),m(0)},onKeyDown:e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),m(e=>Math.min(e+1,g.length-1));return;casLine truncated
|
||||
`),websockets:e===`codex`||e===`xai`?i.websockets===!0:void 0,cloak:BE(e)?{mode:i.cloak?.mode??``,strictMode:i.cloak?.strictMode===!0,sensitiveWordsText:i.cloak?.sensitiveWords?.join(`
|
||||
`)??``,cacheUserId:i.cloak?.cacheUserId===!0}:void 0,experimentalCchSigning:BE(e)?i.experimentalCchSigning===!0:void 0,testModel:e===`codex`||e===`xai`||BE(e)||e===`gemini`||e===`interactions`?``:void 0}}function HE({brand:e,resource:t,mode:n,mutating:r,formId:i,onSubmit:a,onDirtyChange:o}){let{t:s}=ss(),c=ZT[e],l=(0,y.useId)(),[u,d]=(0,y.useState)(()=>VE(e,t,n)),[f]=(0,y.useState)(()=>JSON.stringify(VE(e,t,n))),[p,m]=(0,y.useState)(null),[h,g]=(0,y.useState)(!1),_=(0,y.useMemo)(()=>JSON.stringify(u)!==f,[u,f]);(0,y.useEffect)(()=>{o?.(_)},[_,o]);let v=(0,y.useMemo)(()=>n!==`edit`||!t||e===`openaiCompatibility`?``:t.raw?.apiKey??``,[e,n,t]),b=(0,y.useMemo)(()=>n!==`edit`||!t?``:t.raw?.authIndex??``,[n,t]),x=(0,y.useMemo)(()=>({baseUrlRequired:s(`providersPage.connectivity.baseUrlRequired`),endpointInvalid:s(`providersPage.connectivity.endpointInvalid`),apiKeyRequired:s(`providersPage.connectivity.apiKeyRequired`),modelRequired:s(`providersPage.connectivity.modelRequired`),timeout:e=>s(`providersPage.connectivity.timeout`,{seconds:e}),requestFailed:s(`providersPage.connectivity.requestFailed`)}),[s]),S=DE({brand:e,baseUrl:u.baseUrl,testModel:u.testModel,models:u.models,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:v,authIndex:b},x),C=TT({brand:e,baseUrl:u.baseUrl,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:v,authIndex:b}),[w,T]=(0,y.useState)(!1),E=(0,y.useMemo)(()=>{let e=new Set;return u.models.forEach(t=>{let n=(t.name??``).trim();n&&e.add(n)}),e},[u.models]),D=(0,y.useMemo)(()=>{let e=new Set,t=[];u.models.forEach(n=>{let r=(n.name??``).trim();!r||e.has(r)||(e.add(r),t.push(r))});let n=t[0],r=[{value:``,label:n?s(`providersPage.form.testModelAutoWith`,{name:n}):s(`providersPage.form.testModelAutoEmpty`)}];t.forEach(e=>r.push({value:e,label:e}));let i=(u.testModel??``).trim();return i&&!e.has(i)&&r.push({value:i,label:s(`providersPage.form.testModelCustom`,{name:i})}),r},[u.models,u.testModel,s]),O=()=>{T(!0),!C.loading&&!C.hasFetched&&C.fetch()},k=()=>{T(!1)},A=e=>{e.length&&d(t=>{let n=new Set,r=[];t.models.forEach(e=>{let t=(e.name??``).trim();if(t){if(n.has(t))return;n.add(t)}r.push(e)});let i=r.findIndex(e=>!(e.name??``).trim()&&!(e.alias??``).trim());return i!==-1&&r.splice(i,1),e.forEach(e=>{let t=e.name.trim();!t||n.has(t)||(n.add(t),r.push({name:t,alias:(e.alias??``).trim()}))}),{...t,models:r}})},j=(e,t)=>{d(n=>({...n,[e]:t}))},M=(e,t)=>{d(n=>({...n,cloak:{...n.cloak??{mode:``,strictMode:!1,sensitiveWordsText:``,cacheUserId:!1},[e]:t}}))},N=()=>{if(c.supportsName&&!u.name.trim())return s(`providersPage.form.validation.nameRequired`);if(c.supportsApiKey&&n===`create`&&!u.apiKey.trim())return s(`providersPage.form.validation.apiKeyRequired`);if(c.baseUrlRequired&&!u.baseUrl.trim())return s(`providersPage.form.validation.baseUrlRequired`);let t=[...e===`openaiCompatibility`?(u.apiKeyEntries??[]).map(e=>e.weight):[],...e===`openaiCompatibility`?[]:[u.weight]];return t.some(e=>e!==void 0&&!Number.isSafeInteger(e))?s(`providersPage.form.validation.weightInteger`):t.some(e=>e!==void 0&&e>1e6)?s(`providersPage.form.validation.weightMax`,{max:lp}):null},ee=async e=>{e.preventDefault();let t=N();if(t){m(t);return}try{m(null),await a(u)}catch(e){m(e instanceof Error?e.message:String(e))}},P=(0,y.useMemo)(()=>u.headers.length?u.headers:[PE()],[u.headers]),F=(0,y.useMemo)(()=>u.models.length?u.models:[FE()],[u.models]),I=(0,y.useMemo)(()=>u.apiKeyEntries&&u.apiKeyEntries.length?u.apiKeyEntries:[IE()],[u.apiKeyEntries]),L=(0,y.useMemo)(()=>aE(u.excludedModelsText),[u.excludedModelsText]),R=(0,y.useMemo)(()=>{let e=new Map;return C.models.forEach(t=>{let n=t.name?.trim();n&&e.set(n.toLowerCase(),{id:n,displayName:t.alias||void 0})}),u.models.forEach(t=>{let n=t.name?.trim();n&&!e.has(n.toLowerCase())&&e.set(n.toLowerCase(),{id:n})}),[...e.values()].sort((e,t)=>e.id.localeCompare(t.id,void 0,{sensitivity:`base`}))},[C.models,u.models]),z=C.loading?`loading`:C.error?`error`:R.length===0?`unavailable`:`ready`,te=u.apiKeyEntries??[],B=e===`gemini`||e===`interactions`||e===`codex`||e===`xai`||BE(e)||e===`openaiCompatibility`,V=e===`openaiCompatibility`,ne=e===`codex`||e===`xai`?{status:S.codexStatus,run:S.runCodex}:e===`gemini`||e===`interactions`?{status:S.geminiStatus,run:S.runGemini}:BE(e)?{status:S.claudeStatus,run:S.runClaude}:null;return(0,H.jsxs)(`form`,{id:i,className:q.form,onSubmit:ee,noValidate:!0,children:[(0,H.jsxs)(`div`,{className:q.section,children:[c.supportsName?(0,H.jsxs)(`div`,{className:q.field,children:[(0,H.jsx)(`label`,{className:q.label,htmlFor:`${l}-name`,children:s(`providersPage.form.name`)}),(0,H.jsx)(`input`,{id:`${l}-name`,className:q.input,value:u.name,onChange:e=>j(`name`,e.target.value),disabled:r})]}):null,c.supportsApiKey?(0,H.jsxs)(`div`,{className:q.field,children:[(0,H.jsx)(`label`,{className:q.label,htmlFor:`${l}-apiKey`,children:s(`providersPage.form.apiKey`)}),(0,H.jsxs)(`div`,{className:q.passwordLine truncated
|
||||
`),y=s.headers,b=``,x=null;if(y!==void 0){b=JSON.stringify(y,null,2);let{errorKey:e}=XA(b);x=e?r(e):null}o(e=>!e||e.fileName!==n?e:{...e,loading:!1,originalText:c,rawText:c,invalidContentPreview:``,json:s,providerKey:l,prefix:u,proxyUrl:d,priority:f===void 0?``:String(f),weight:p===void 0?``:String(p),weightError:null,disableCooling:m,disableCoolingTouched:!1,websockets:h,websocketsTouched:!1,usingApi:g,usingApiTouched:!1,note:_,noteTouched:!1,excludedModelsText:v,excludedModelsTouched:!1,headersText:b,headersTouched:!1,headersError:x,error:null})}catch(e){let t=e instanceof Error?e.message:r(`notification.download_failed`);o(e=>!e||e.fileName!==n?e:{...e,loading:!1,error:t,rawText:``}),i(`${r(`notification.download_failed`)}: ${t}`,`error`)}}},closePrefixProxyEditor:()=>{o(null)},handlePrefixProxyChange:(e,t)=>{o(n=>{if(!n)return n;if(e===`prefix`)return{...n,prefix:String(t)};if(e===`proxyUrl`)return{...n,proxyUrl:String(t)};if(e===`priority`)return{...n,priority:String(t)};if(e===`weight`){let e=String(t),i=dp(e);return{...n,weight:e,weightError:i?r(ZA(i)):null}}if(e===`disableCooling`)return{...n,disableCooling:!!t,disableCoolingTouched:!0};if(e===`websockets`)return{...n,websockets:!!t,websocketsTouched:!0};if(e===`usingApi`)return{...n,usingApi:!!t,usingApiTouched:!0};if(e===`note`)return{...n,note:String(t),noteTouched:!0};if(e===`excludedModelsText`)return{...n,excludedModelsText:String(t),excludedModelsTouched:!0};if(e===`headersText`){let e=String(t),{errorKey:i}=XA(e);return{...n,headersText:e,headersTouched:!0,headersError:i?r(i):null}}return n})},handlePrefixProxySave:async()=>{if(!a?.json||!l)return;let e=a.fileName,t;try{t=dj(a,e=>r(e))}catch(e){let t=e instanceof Error?e.message:`Invalid format`;i(t,`error`);return}if(sj(t)){o(t=>!t||t.fileName!==e?t:{...t,saving:!0});try{await Dy.patchFields(e,t),i(r(`auth_files.prefix_proxy_saved_success`,{name:e}),`success`),await n(),o(null)}catch(t){let n=t instanceof Error?t.message:``;i(`${r(`notification.update_failed`)}: ${n}`,`error`),o(t=>!t||t.fileName!==e?t:{...t,saving:!1})}}}}}function mj(e){return(0,y.useMemo)(()=>{let t=new Map;return e.forEach(e=>{let n=Xv(e.auth_index??e.authIndex);n&&t.set(n,ty(Zv(e.recent_requests??e.recentRequests)))}),t},[e])}var hj=[`default`,`az`,`priority`],gj=[`all`,`enabled`,`disabled`,`problem`],_j=`authFilesPage.uiState`,vj=`authFilesPage.compactMode`,yj=new Set(hj),bj=new Set(gj),xj=e=>typeof e==`string`&&yj.has(e),Sj=e=>typeof e==`string`&&bj.has(e),Cj=e=>{if(!e)return null;let t=e.getItem(_j);if(!t)return null;let n=JSON.parse(t);return n&&typeof n==`object`?n:null},wj=()=>{if(typeof window>`u`)return null;try{return Cj(window.localStorage)??Cj(window.sessionStorage)}catch{return null}},Tj=e=>{if(!(typeof window>`u`)){try{window.localStorage.setItem(_j,JSON.stringify(e))}catch{}try{window.sessionStorage.removeItem(_j)}catch{}}},Ej=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(vj);return e===null?null:JSON.parse(e)===!0}catch{return null}},Dj=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(vj,JSON.stringify(e))}catch{}},Oj={page:`AuthFilesPage-module__page___JPd3G`,workbench:`AuthFilesPage-module__workbench___6lAP6`,errorBanner:`AuthFilesPage-module__errorBanner___03gC7`,grid:`AuthFilesPage-module__grid___aXe04`,gridCompact:`AuthFilesPage-module__gridCompact___jvWkO`,gridQuota:`AuthFilesPage-module__gridQuota___jeDKQ`,emptyActions:`AuthFilesPage-module__emptyActions___9Gal6`,pagination:`AuthFilesPage-module__pagination___GnfXF`,pageInfo:`AuthFilesPage-module__pageInfo___YpJQV`,configGrid:`AuthFilesPage-module__configGrid___KGRYV`},kj=9,Aj=12,jj=6,Mj=360,Nj=(e,t)=>e?`problem`:t?`disabled`:`all`,Pj=e=>e===`disabledProblem`?`problem`:Sj(e)?e:null;function Fj(){let{t:e}=ss(),t=Kc(e=>e.showNotification),n=am(e=>e.connectionStatus),r=tl(e=>e.resolvedTheme),i=oh(),a=!i||i.status===`current`,o=pr(),[s,c]=(0,y.useState)(`all`),[l,u]=(0,y.useState)(`all`),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(``),[h,g]=(0,y.useState)(1),[_,v]=(0,y.useState)({regular:kj,compact:Aj}),[b,x]=(0,y.useState)(`9`),[S,C]=(0,y.useState)(`list`),[w,T]=(0,y.useState)(`default`),[E,D]=(0,y.useState)(!1),{modelsModalOpen:O,modelsLoading:k,modelsList:A,modelsFileName:j,modelsFileType:M,modelsError:N,showModels:ee,closeModelsModal:P,invalidateModels:F}=KA(),{files:I,selectedFiles:L,selectionCount:R,loading:z,refreshing:te,error:B,uploading:V,deleting:ne,deletingAll:re,statusUpdating:ie,manualRefreshing:ae,batchStatusUpdating:oe,fileInputRef:se,loadFiles:ce,handleUploadClick:le,handleFileChange:ue,handleDelete:de,handleDeleteAll:fe,handleDownload:pe,handleManualRefresh:me,handleStatusToggle:he,toggleSelect:ge,selectAllVisible:_e,invertVisibleSelection:ve,deselectAll:ye,batchDownload:be,batchSetStatus:xe,batchDelete:Se}=GA({onFilesMutated:(0,y.useCallback)(e=>LA(F,e),[F])}),Ce=mj(I),{excluded:we,excludedError:Te,modelAlias:Ee,modelAliasError:De,allProviderModels:Oe,loadExcluded:ke,loadModelAlias:Ae,deleLine truncated
|
||||
`)}};QP.defaultYaml={explicit:!1,version:`1.2`},QP.defaultTags={"!!":`tag:yaml.org,2002:`};function $P(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function eF(e){let t=new Set;return UP(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function tF(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function nF(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??(i=eF(e));let a=tF(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(FP(t.node)||LP(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function rF(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=rF(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=rF(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=rF(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=rF(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function iF(e,t,n){if(Array.isArray(e))return e.map((e,t)=>iF(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!zP(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var aF=class{constructor(e){Object.defineProperty(this,AP,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!MP(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=iF(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?rF(i,{"":o},``,o):o}},oF=class extends aF{constructor(e){super(wP),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],UP(e,{Node:(e,t)=>{(jP(t)||zP(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||(iF(a,null,t),o=n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=sF(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if($P(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function sF(e,t,n){if(jP(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(LP(t)){let r=0;for(let i of t.items){let t=sF(e,i,n);t>r&&(r=t)}return r}else if(PP(t)){let r=sF(e,t.key,n),i=sF(e,t.value,n);return Math.max(r,i)}return 1}var cF=e=>!e||typeof e!=`function`&&typeof e!=`object`,lF=class extends aF{constructor(e){super(OP),this.value=e}toJSON(e,t){return t?.keep?this.value:iF(this.value,e,t)}toString(){return String(this.value)}};lF.BLOCK_FOLDED=`BLOCK_FOLDED`,lF.BLOCK_LITERAL=`BLOCK_LITERAL`,lF.PLAIN=`PLAIN`,lF.QUOTE_DOUBLE=`QUOTE_DOUBLE`,lF.QUOTE_SINGLE=`QUOTE_SINGLE`;var uF=`tag:yaml.org,2002:`;function dF(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function fF(e,t,n){if(MP(e)&&(e=e.contents),RP(e))return e;if(PP(e)){let t=n.schema[EP].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new oF(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=uF+t.slice(2));let l=dF(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new lF(e);return c&&(c.node=t),t}l=e instanceof Line truncated
|
||||
`)?_F(n,t):n.includes(`
|
||||
`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t=t||{},t.url=e):t=e||{},t=cf(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Hf.assertOptions(n,{silentJSONParsing:Uf.transitional(Uf.boolean),forcedJSONParsing:Uf.transitional(Uf.boolean),clarifyTimeoutError:Uf.transitional(Uf.boolean),legacyInterceptorReqResOrdering:Uf.transitional(Uf.boolean),advertiseZstdAcceptEncoding:Uf.transitional(Uf.boolean),validateStatusUndefinedResolves:Uf.transitional(Uf.boolean)},!1),r!=null&&(W.isFunction(r)?t.paramsSerializer={serialize:r}:Hf.assertOptions(r,{encode:Uf.function,serialize:Uf.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Hf.assertOptions(t,{baseUrl:Uf.spelling(`baseURL`),withXsrfToken:Uf.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&W.merge(i.common,i[t.method]);i&&W.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=od.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s=s&&e.synchronous;let n=t.transitional||Sd;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Rf.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Rf.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=cf(this.defaults,e),bd(of(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};W.forEach([`delete`,`get`,`head`,`options`],function(e){Wf.prototype[e]=function(t,n){return this.request(cf(n||{},{method:e,url:t,data:n&&W.hasOwnProp(n,`data`)?n.data:void 0}))}}),W.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(cf(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Wf.prototype[e]=t(),e!==`query`&&(Wf.prototype[e+`Form`]=t(!0))});var Gf=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Hd(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Kf(e){return function(t){return e.apply(null,t)}}function qf(e){return W.isObject(e)&&e.isAxiosError===!0}var Jf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Jf).forEach(([e,t])=>{Jf[t]=e});function Yf(e){let t=new Wf(e),n=Dl(Wf.prototype.request,t);return W.extend(n,Wf.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t)Line truncated
|
||||
`);function hE(e,t){let n=uE(e),r=uE(t);if(!n||!r)return!1;if(!dE(n))return n===r;let i=n.split(`*`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`.*`);return RegExp(`^${i}$`,`i`).test(r)}function gE(e,t,n){let r=t.trim(),i=uE(r),a=fE(e).filter(e=>uE(e)!==i);return n&&i&&a.push(r),a}function _E(e,t){let n=new Map(t.map(e=>[uE(e),e])),r=[],i=[],a=[],o=[];return fE(e).forEach(e=>{if(dE(e)){i.push(e),o.push(e);return}let t=n.get(uE(e));if(t){r.push(t);return}a.push(e),o.push(e)}),{exactRules:r,wildcardRules:i,unknownRules:a,customRules:o}}function vE(e,t,n){let{exactRules:r}=_E(e,t);return fE([...r,...pE(n)])}function yE(e,t){let n=uE(t);if(!n)return{state:`included`};let r=!1,i;for(let a of e)dE(a)?i===void 0&&hE(a,t)&&(i=a):!r&&uE(a)===n&&(r=!0);return r&&i!==void 0?{state:`excluded`,by:`both`,rule:i}:r?{state:`excluded`,by:`exact`}:i===void 0?{state:`included`}:{state:`excluded`,by:`wildcard`,rule:i}}var bE=(e,t)=>yE(e,t).state===`excluded`,xE=(e,t)=>e.map(e=>{let n=t.filter(t=>hE(e,t));return{rule:e,matched:n,matchCount:n.length}});function SE(e,t){let n=t.length,r=t.reduce((t,n)=>bE(e,n)?t+1:t,0);return{total:n,excluded:r,available:n-r}}var CE={root:`ExcludedModelsPicker-module__root___RYF7X`,trigger:`ExcludedModelsPicker-module__trigger___ycSKU`,triggerText:`ExcludedModelsPicker-module__triggerText___lbBd4`,triggerSpinner:`ExcludedModelsPicker-module__triggerSpinner___xL-cS`,"excluded-spin":`ExcludedModelsPicker-module__excluded-spin___g-h0p`,excludedSpin:`ExcludedModelsPicker-module__excluded-spin___g-h0p`,chevron:`ExcludedModelsPicker-module__chevron___FcR89`,triggerOpen:`ExcludedModelsPicker-module__triggerOpen___OMivu`,meter:`ExcludedModelsPicker-module__meter___0ZOIu`,meterFill:`ExcludedModelsPicker-module__meterFill___svWrl`,disclosure:`ExcludedModelsPicker-module__disclosure___5zAsh`,disclosureOpen:`ExcludedModelsPicker-module__disclosureOpen___BTQ7b`,disclosureInner:`ExcludedModelsPicker-module__disclosureInner___swIxx`,panel:`ExcludedModelsPicker-module__panel___-GHUW`,"excluded-panel-in":`ExcludedModelsPicker-module__excluded-panel-in___sw1uB`,excludedPanelIn:`ExcludedModelsPicker-module__excluded-panel-in___sw1uB`,searchRow:`ExcludedModelsPicker-module__searchRow___vhaLm`,searchIcon:`ExcludedModelsPicker-module__searchIcon___kl49Z`,search:`ExcludedModelsPicker-module__search___eAW6Q`,list:`ExcludedModelsPicker-module__list___r-52c`,row:`ExcludedModelsPicker-module__row___-dgzQ`,rowHighlighted:`ExcludedModelsPicker-module__rowHighlighted___TXsS-`,rowExcluded:`ExcludedModelsPicker-module__rowExcluded___QwTAb`,checkbox:`ExcludedModelsPicker-module__checkbox___LBJlR`,rowLocked:`ExcludedModelsPicker-module__rowLocked___yX5xZ`,rowText:`ExcludedModelsPicker-module__rowText___VJ0uV`,rowId:`ExcludedModelsPicker-module__rowId___6yGuV`,rowDisplayName:`ExcludedModelsPicker-module__rowDisplayName___c-Ifl`,rowReason:`ExcludedModelsPicker-module__rowReason___1c7c2`,badge:`ExcludedModelsPicker-module__badge___vrwIy`,badgeMuted:`ExcludedModelsPicker-module__badgeMuted___SAngk`,noResults:`ExcludedModelsPicker-module__noResults___Qohto`,footer:`ExcludedModelsPicker-module__footer___eApyV`,footerCount:`ExcludedModelsPicker-module__footerCount___S0dwv`,footerActions:`ExcludedModelsPicker-module__footerActions___1UCO6`,footerButton:`ExcludedModelsPicker-module__footerButton___BcU1G`,catalogNotice:`ExcludedModelsPicker-module__catalogNotice___Vuj8F`,retryButton:`ExcludedModelsPicker-module__retryButton___xLpOx`,chipsMore:`ExcludedModelsPicker-module__chipsMore___qiTQK`,ruleEditor:`ExcludedModelsPicker-module__ruleEditor___BnPbg`,ruleLabel:`ExcludedModelsPicker-module__ruleLabel___Vs3uq`,ruleMatches:`ExcludedModelsPicker-module__ruleMatches___aaZnY`,ruleMatchNone:`ExcludedModelsPicker-module__ruleMatchNone___GTDUi`,ruleWarning:`ExcludedModelsPicker-module__ruleWarning___lcScQ`},wE=(e,t)=>e.id.toLowerCase().includes(t)||(e.displayName??``).toLowerCase().includes(t);function TE({rules:e,candidates:t,stats:n,onToggle:r,onSelectAll:i,onClear:a,disabled:o,listboxId:s,autoFocus:c,onDismiss:l}){let{t:u}=V(),[d,f]=(0,y.useState)(``),[p,m]=(0,y.useState)(0),h=(0,y.useRef)(null),g=(0,y.useMemo)(()=>{let e=d.trim().toLowerCase();return e?t.filter(t=>wE(t,e)):t},[t,d]),_=g.length===0?-1:Math.min(p,g.length-1),v=_>=0?`${s}-opt-${_}`:void 0;(0,y.useLayoutEffect)(()=>{c&&h.current?.focus({preventScroll:!0})},[c]),(0,y.useEffect)(()=>{!c||_<0||document.getElementById(`${s}-opt-${_}`)?.scrollIntoView({block:`nearest`})},[_,c,s]);let b=t=>{let n=g[t];if(!n||o)return;let i=yE(e,n.id);i.state===`excluded`&&i.by===`wildcard`||r(n.id,i.state!==`excluded`)};return(0,H.jsxs)(`div`,{className:CE.panel,children:[(0,H.jsxs)(`div`,{className:CE.searchRow,children:[(0,H.jsx)(Rs,{size:14,className:CE.searchIcon,"aria-hidden":`true`}),(0,H.jsx)(`input`,{ref:h,type:`text`,className:CE.search,value:d,onChange:e=>{f(e.target.value),m(0)},onKeyDown:e=>{switch(e.key){case`ArrowDown`:e.preventDefault(),m(e=>Math.min(e+1,g.length-1));return;caseLine truncated
|
||||
`),websockets:e===`codex`||e===`xai`?i.websockets===!0:void 0,cloak:JE(e)?{mode:i.cloak?.mode??``,strictMode:i.cloak?.strictMode===!0,sensitiveWordsText:i.cloak?.sensitiveWords?.join(`
|
||||
`)??``,cacheUserId:i.cloak?.cacheUserId===!0}:void 0,experimentalCchSigning:JE(e)?i.experimentalCchSigning===!0:void 0,testModel:e===`codex`||e===`xai`||JE(e)||e===`gemini`||e===`interactions`?``:void 0}}function XE({brand:e,resource:t,mode:n,mutating:r,formId:i,onSubmit:a,onDirtyChange:o}){let{t:s}=V(),c=aE[e],l=(0,y.useId)(),[u,d]=(0,y.useState)(()=>YE(e,t,n)),[f]=(0,y.useState)(()=>JSON.stringify(YE(e,t,n))),[p,m]=(0,y.useState)(null),[h,g]=(0,y.useState)(!1),_=(0,y.useMemo)(()=>JSON.stringify(u)!==f,[u,f]);(0,y.useEffect)(()=>{o?.(_)},[_,o]);let v=(0,y.useMemo)(()=>n!==`edit`||!t||e===`openaiCompatibility`?``:t.raw?.apiKey??``,[e,n,t]),b=(0,y.useMemo)(()=>n!==`edit`||!t?``:t.raw?.authIndex??``,[n,t]),x=(0,y.useMemo)(()=>({baseUrlRequired:s(`providersPage.connectivity.baseUrlRequired`),endpointInvalid:s(`providersPage.connectivity.endpointInvalid`),apiKeyRequired:s(`providersPage.connectivity.apiKeyRequired`),modelRequired:s(`providersPage.connectivity.modelRequired`),timeout:e=>s(`providersPage.connectivity.timeout`,{seconds:e}),requestFailed:s(`providersPage.connectivity.requestFailed`)}),[s]),S=FE({brand:e,baseUrl:u.baseUrl,testModel:u.testModel,models:u.models,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:v,authIndex:b},x),C=NT({brand:e,baseUrl:u.baseUrl,formHeaders:u.headers,apiKeyEntries:u.apiKeyEntries,apiKey:u.apiKey,fallbackApiKey:v,authIndex:b}),[w,T]=(0,y.useState)(!1),E=(0,y.useMemo)(()=>{let e=new Set;return u.models.forEach(t=>{let n=(t.name??``).trim();n&&e.add(n)}),e},[u.models]),D=(0,y.useMemo)(()=>{let e=new Set,t=[];u.models.forEach(n=>{let r=(n.name??``).trim();!r||e.has(r)||(e.add(r),t.push(r))});let n=t[0],r=[{value:``,label:n?s(`providersPage.form.testModelAutoWith`,{name:n}):s(`providersPage.form.testModelAutoEmpty`)}];t.forEach(e=>r.push({value:e,label:e}));let i=(u.testModel??``).trim();return i&&!e.has(i)&&r.push({value:i,label:s(`providersPage.form.testModelCustom`,{name:i})}),r},[u.models,u.testModel,s]),O=()=>{T(!0),!C.loading&&!C.hasFetched&&C.fetch()},k=()=>{T(!1)},A=e=>{e.length&&d(t=>{let n=new Set,r=[];t.models.forEach(e=>{let t=(e.name??``).trim();if(t){if(n.has(t))return;n.add(t)}r.push(e)});let i=r.findIndex(e=>!(e.name??``).trim()&&!(e.alias??``).trim());return i!==-1&&r.splice(i,1),e.forEach(e=>{let t=e.name.trim();!t||n.has(t)||(n.add(t),r.push({name:t,alias:(e.alias??``).trim()}))}),{...t,models:r}})},j=(e,t)=>{d(n=>({...n,[e]:t}))},M=(e,t)=>{d(n=>({...n,cloak:{...n.cloak??{mode:``,strictMode:!1,sensitiveWordsText:``,cacheUserId:!1},[e]:t}}))},N=()=>{if(c.supportsName&&!u.name.trim())return s(`providersPage.form.validation.nameRequired`);if(c.supportsApiKey&&n===`create`&&!u.apiKey.trim())return s(`providersPage.form.validation.apiKeyRequired`);if(c.baseUrlRequired&&!u.baseUrl.trim())return s(`providersPage.form.validation.baseUrlRequired`);let t=[...e===`openaiCompatibility`?(u.apiKeyEntries??[]).map(e=>e.weight):[],...e===`openaiCompatibility`?[]:[u.weight]];return t.some(e=>e!==void 0&&!Number.isSafeInteger(e))?s(`providersPage.form.validation.weightInteger`):t.some(e=>e!==void 0&&e>1e6)?s(`providersPage.form.validation.weightMax`,{max:lp}):null},P=async e=>{e.preventDefault();let t=N();if(t){m(t);return}try{m(null),await a(u)}catch(e){m(e instanceof Error?e.message:String(e))}},F=(0,y.useMemo)(()=>u.headers.length?u.headers:[HE()],[u.headers]),I=(0,y.useMemo)(()=>u.models.length?u.models:[UE()],[u.models]),L=(0,y.useMemo)(()=>u.apiKeyEntries&&u.apiKeyEntries.length?u.apiKeyEntries:[WE()],[u.apiKeyEntries]),R=(0,y.useMemo)(()=>pE(u.excludedModelsText),[u.excludedModelsText]),z=(0,y.useMemo)(()=>{let e=new Map;return C.models.forEach(t=>{let n=t.name?.trim();n&&e.set(n.toLowerCase(),{id:n,displayName:t.alias||void 0})}),u.models.forEach(t=>{let n=t.name?.trim();n&&!e.has(n.toLowerCase())&&e.set(n.toLowerCase(),{id:n})}),[...e.values()].sort((e,t)=>e.id.localeCompare(t.id,void 0,{sensitivity:`base`}))},[C.models,u.models]),B=C.loading?`loading`:C.error?`error`:z.length===0?`unavailable`:`ready`,ee=u.apiKeyEntries??[],te=e===`gemini`||e===`interactions`||e===`codex`||e===`xai`||JE(e)||e===`openaiCompatibility`,ne=e===`openaiCompatibility`,re=e===`codex`||e===`xai`?{status:S.codexStatus,run:S.runCodex}:e===`gemini`||e===`interactions`?{status:S.geminiStatus,run:S.runGemini}:JE(e)?{status:S.claudeStatus,run:S.runClaude}:null;return(0,H.jsxs)(`form`,{id:i,className:q.form,onSubmit:P,noValidate:!0,children:[(0,H.jsxs)(`div`,{className:q.section,children:[c.supportsName?(0,H.jsxs)(`div`,{className:q.field,children:[(0,H.jsx)(`label`,{className:q.label,htmlFor:`${l}-name`,children:s(`providersPage.form.name`)}),(0,H.jsx)(`input`,{id:`${l}-name`,className:q.input,value:u.name,onChange:e=>j(`name`,e.target.value),disabled:r})]}):null,c.supportsApiKey?(0,H.jsxs)(`div`,{className:q.field,children:[(0,H.jsx)(`label`,{className:q.label,htmlFor:`${l}-apiKey`,children:s(`providersPage.form.apiKey`)}),(0,H.jsxs)(`div`,{className:q.passwordFLine truncated
|
||||
`),y=s.headers,b=``,x=null;if(y!==void 0){b=JSON.stringify(y,null,2);let{errorKey:e}=Sj(b);x=e?r(e):null}o(e=>!e||e.fileName!==n?e:{...e,loading:!1,originalText:c,rawText:c,invalidContentPreview:``,json:s,providerKey:l,prefix:u,proxyUrl:d,priority:f===void 0?``:String(f),weight:p===void 0?``:String(p),weightError:null,disableCooling:m,disableCoolingTouched:!1,websockets:h,websocketsTouched:!1,usingApi:g,usingApiTouched:!1,note:_,noteTouched:!1,excludedModelsText:v,excludedModelsTouched:!1,headersText:b,headersTouched:!1,headersError:x,error:null})}catch(e){let t=e instanceof Error?e.message:r(`notification.download_failed`);o(e=>!e||e.fileName!==n?e:{...e,loading:!1,error:t,rawText:``}),i(`${r(`notification.download_failed`)}: ${t}`,`error`)}}},closePrefixProxyEditor:()=>{o(null)},handlePrefixProxyChange:(e,t)=>{o(n=>{if(!n)return n;if(e===`prefix`)return{...n,prefix:String(t)};if(e===`proxyUrl`)return{...n,proxyUrl:String(t)};if(e===`priority`)return{...n,priority:String(t)};if(e===`weight`){let e=String(t),i=dp(e);return{...n,weight:e,weightError:i?r(Cj(i)):null}}if(e===`disableCooling`)return{...n,disableCooling:!!t,disableCoolingTouched:!0};if(e===`websockets`)return{...n,websockets:!!t,websocketsTouched:!0};if(e===`usingApi`)return{...n,usingApi:!!t,usingApiTouched:!0};if(e===`note`)return{...n,note:String(t),noteTouched:!0};if(e===`excludedModelsText`)return{...n,excludedModelsText:String(t),excludedModelsTouched:!0};if(e===`headersText`){let e=String(t),{errorKey:i}=Sj(e);return{...n,headersText:e,headersTouched:!0,headersError:i?r(i):null}}return n})},handlePrefixProxySave:async()=>{if(!a?.json||!l)return;let e=a.fileName,t;try{t=Lj(a,e=>r(e))}catch(e){let t=e instanceof Error?e.message:`Invalid format`;i(t,`error`);return}if(Nj(t)){o(t=>!t||t.fileName!==e?t:{...t,saving:!0});try{await yy.patchFields(e,t),i(r(`auth_files.prefix_proxy_saved_success`,{name:e}),`success`),await n(),o(null)}catch(t){let n=t instanceof Error?t.message:``;i(`${r(`notification.update_failed`)}: ${n}`,`error`),o(t=>!t||t.fileName!==e?t:{...t,saving:!1})}}}}}function Bj(e){return(0,y.useMemo)(()=>{let t=new Map;return e.forEach(e=>{let n=Xv(e.auth_index??e.authIndex);n&&t.set(n,ty(Zv(e.recent_requests??e.recentRequests)))}),t},[e])}var Vj=[`default`,`az`,`priority`],Hj=[`all`,`enabled`,`disabled`,`problem`],Uj=`authFilesPage.uiState`,Wj=`authFilesPage.compactMode`,Gj=new Set(Vj),Kj=new Set(Hj),qj=e=>typeof e==`string`&&Gj.has(e),Jj=e=>typeof e==`string`&&Kj.has(e),Yj=e=>{if(!e)return null;let t=e.getItem(Uj);if(!t)return null;let n=JSON.parse(t);return n&&typeof n==`object`?n:null},Xj=()=>{if(typeof window>`u`)return null;try{return Yj(window.localStorage)??Yj(window.sessionStorage)}catch{return null}},Zj=e=>{if(!(typeof window>`u`)){try{window.localStorage.setItem(Uj,JSON.stringify(e))}catch{}try{window.sessionStorage.removeItem(Uj)}catch{}}},Qj=()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(Wj);return e===null?null:JSON.parse(e)===!0}catch{return null}},$j=e=>{if(!(typeof window>`u`))try{window.localStorage.setItem(Wj,JSON.stringify(e))}catch{}},eM={page:`AuthFilesPage-module__page___JPd3G`,workbench:`AuthFilesPage-module__workbench___6lAP6`,errorBanner:`AuthFilesPage-module__errorBanner___03gC7`,grid:`AuthFilesPage-module__grid___aXe04`,gridCompact:`AuthFilesPage-module__gridCompact___jvWkO`,gridQuota:`AuthFilesPage-module__gridQuota___jeDKQ`,emptyActions:`AuthFilesPage-module__emptyActions___9Gal6`,pagination:`AuthFilesPage-module__pagination___GnfXF`,pageInfo:`AuthFilesPage-module__pageInfo___YpJQV`,configGrid:`AuthFilesPage-module__configGrid___KGRYV`},tM=9,nM=12,rM=6,iM=360,aM=(e,t)=>e?`problem`:t?`disabled`:`all`,oM=e=>e===`disabledProblem`?`problem`:Jj(e)?e:null;function sM(){let{t:e}=V(),t=Kc(e=>e.showNotification),n=am(e=>e.connectionStatus),r=tl(e=>e.resolvedTheme),i=ah(),a=!i||i.status===`current`,o=mr(),[s,c]=(0,y.useState)(`all`),[l,u]=(0,y.useState)(`all`),[d,f]=(0,y.useState)(!1),[p,m]=(0,y.useState)(``),[h,g]=(0,y.useState)(1),[_,v]=(0,y.useState)({regular:tM,compact:nM}),[b,x]=(0,y.useState)(`9`),[S,C]=(0,y.useState)(`list`),[w,T]=(0,y.useState)(`default`),[E,D]=(0,y.useState)(!1),{modelsModalOpen:O,modelsLoading:k,modelsList:A,modelsFileName:j,modelsFileType:M,modelsError:N,showModels:P,closeModelsModal:F,invalidateModels:I}=vj(),{files:L,selectedFiles:R,selectionCount:z,loading:B,refreshing:ee,error:te,uploading:ne,deleting:re,deletingAll:ie,statusUpdating:ae,manualRefreshing:oe,batchStatusUpdating:se,fileInputRef:ce,loadFiles:le,handleUploadClick:ue,handleFileChange:de,handleDelete:fe,handleDeleteAll:pe,handleDownload:me,handleManualRefresh:he,handleStatusToggle:ge,toggleSelect:_e,selectAllVisible:ve,invertVisibleSelection:ye,deselectAll:be,batchDownload:xe,batchSetStatus:Se,batchDelete:Ce}=_j({onFilesMutated:(0,y.useCallback)(e=>lj(I,e),[I])}),we=Bj(L),{excluded:Te,excludedError:Ee,modelAlias:De,modelAliasError:Oe,allProviderModels:ke,loadExcluded:Ae,loadModelAlias:je,deleLine truncated
|
||||
`);return(0,H.jsx)(`span`,{className:gN.resetCreditTick,style:{left:`${e.leftPercent}%`},title:a,role:`img`,"aria-label":a.split(`
|
||||
`).join(`, `)},e.id||`${e.expiresAtMs}-${t}`)})]})]})}var CN=e=>e.charAt(0).toUpperCase()+e.slice(1),wN=(e,t)=>mA(e)[t];function TN(e){let{t}=V(),n=Kc(e=>e.showNotification),r=Kc(e=>e.showConfirmation),[i,a]=(0,y.useState)(null);return{resettingQuotaName:i,refreshQuota:(0,y.useCallback)(async(r,a)=>{if(e||r.disabled||i===r.name||wN(a,r.name)?.status===`loading`)return;let o=nm(),s=pA(a);s(e=>({...e,[r.name]:a.buildLoadingState()}));try{let e=await a.fetchQuota(r,t);rm(o,()=>{s(t=>({...t,[r.name]:a.buildSuccessState(e)})),n(t(`auth_files.quota_refresh_success`,{name:r.name}),`success`)})}catch(e){let i=e instanceof Error?e.message:t(`common.unknown_error`),c=Yg(e);rm(o,()=>{s(e=>({...e,[r.name]:a.buildErrorState(i,c)})),n(t(`auth_files.quota_refresh_failed`,{name:r.name,message:i}),`error`)})}},[e,i,n,t]),resetQuota:(0,y.useCallback)((o,s)=>{let c=s.resetQuota;c&&(e||o.disabled||wN(s,o.name)?.status!==`loading`&&i!==o.name&&r({title:t(`codex_quota.reset_confirm_title`),message:t(`codex_quota.reset_confirm_message`,{name:o.name}),confirmText:t(`codex_quota.reset_confirm_button`),variant:`primary`,onConfirm:async()=>{let e=nm(),r=pA(s);a(o.name);try{let i=await c(o,t);rm(e,()=>{r(e=>({...e,[o.name]:s.buildSuccessState(i)})),n(t(`codex_quota.reset_success`,{name:o.name}),`success`)})}catch(r){let i=r instanceof Error?r.message:t(`common.unknown_error`);rm(e,()=>{n(t(`codex_quota.reset_failed`,{name:o.name,message:i}),`error`)})}finally{a(e=>e===o.name?null:e)}}}))},[e,i,r,n,t])}}function EN(){let{t:e}=V(),[t,n]=(0,y.useState)(!1),r=(0,y.useRef)(!1),i=(0,y.useRef)(0);return{batchLoading:t,loadQuota:(0,y.useCallback)(async t=>{if(r.current||t.length===0)return;r.current=!0;let a=++i.current,o=nm();n(!0);try{let n=new Map;t.forEach(e=>{let t=n.get(e.type)??[];t.push(e),n.set(e.type,t)}),await Promise.all(Array.from(n.entries()).map(async([t,n])=>{let r=fA[t],s=pA(r);rm(o,()=>{s(e=>{let t={...e};return n.forEach(({file:e})=>{t[e.name]=r.buildLoadingState()}),t})});let c=await Promise.all(n.map(async({file:t})=>{try{let n=await r.fetchQuota(t,e);return{name:t.name,status:`success`,data:n}}catch(n){let r=n instanceof Error?n.message:e(`common.unknown_error`);return{name:t.name,status:`error`,error:r,errorStatus:Yg(n)}}}));a===i.current&&rm(o,()=>{s(t=>{let n={...t};return c.forEach(t=>{n[t.name]=t.status===`success`?r.buildSuccessState(t.data):r.buildErrorState(t.error||e(`common.unknown_error`),t.errorStatus)}),n})})}))}finally{a===i.current&&(n(!1),r.current=!1)}},[e])}}var DN=`quotaPage.uiState`,ON=new Set([`all`,...WM]),kN=new Set(GM),AN=e=>typeof e==`string`&&ON.has(e),jN=e=>typeof e==`string`&&kN.has(e),MN=()=>{if(typeof window>`u`)return null;try{let e=window.sessionStorage.getItem(DN);if(!e)return null;let t=JSON.parse(e);return!t||typeof t!=`object`?null:{tab:AN(t.tab)?t.tab:void 0,sortMode:jN(t.sortMode)?t.sortMode:void 0}}catch{return null}},NN=e=>{if(!(typeof window>`u`))try{let t={...MN(),...e};window.sessionStorage.setItem(DN,JSON.stringify(t))}catch{}},PN={page:`QuotaPage-module__page___EOaHV`,workbench:`QuotaPage-module__workbench___M9KKY`,tabsRow:`QuotaPage-module__tabsRow___99BHL`,sort:`QuotaPage-module__sort___AM-bE`,errorBanner:`QuotaPage-module__errorBanner___Fm4sj`,grid:`QuotaPage-module__grid___veEj-`,pagination:`QuotaPage-module__pagination___qj1Ew`,pageInfo:`QuotaPage-module__pageInfo___QnjRe`},FN=[`all`,...WM],IN=6,LN=e=>e;function RN(){let{t:e}=V(),t=am(e=>e.connectionStatus),n=tl(e=>e.resolvedTheme),[r,i]=(0,y.useState)([]),[a,o]=(0,y.useState)(!0),[s,c]=(0,y.useState)(``),[l,u]=(0,y.useState)(()=>MN()?.tab??`all`),[d,f]=(0,y.useState)(()=>MN()?.sortMode??`default`),[p,m]=(0,y.useState)(1),h=Yb(),g=t!==`connected`,_=(0,y.useCallback)(async()=>{o(!0),c(``);try{let e=await yy.list();i(e?.files||[])}catch(t){let n=t instanceof Error?t.message:e(`notification.refresh_failed`);c(n)}finally{o(!1)}},[e]);Dh(_),(0,y.useEffect)(()=>{_()},[_]);let v=tm(e=>e.antigravityQuota),b=tm(e=>e.claudeQuota),x=tm(e=>e.codexQuota),S=tm(e=>e.kimiQuota),C=tm(e=>e.xaiQuota),w=(0,y.useMemo)(()=>({antigravity:v,claude:b,codex:x,kimi:S,xai:C}),[v,b,x,S,C]),T=(0,y.useCallback)(e=>w[e.type][e.file.name],[w]),E=Pk(d!=="default"),D=d==="default"?0:E,O=(0,y.useMemo)(()=>JM(r),[r]),k=(0,y.useMemo)(()=>ZM(O),[O]),A=(0,y.useMemo)(()=>YM(O,l),[O,l]),j=(0,y.useCallback)(e=>dk(e.type,T(e),D),[T,D]),M=(0,y.useMemo)(()=>XM(A,d,j),[A,d,j]),{pageItems:N,currentPage:P,totalPages:F}=(0,y.useMemo)(()=>$M(M,p,20),[M,p]),I=(0,y.useCallback)(e=>{u(e),m(1),NN({tab:e})},[]),L=(0,y.useCallback)(e=>{f(e),m(1),NN({sortMode:e})},[]),R=(0,y.useMemo)(()=>GM.map(t=>({value:t,label:e(`quota_management.sort_${t}`)})),[e]),{loadedCount:z,attentionCount:B}=(0,y.useMemo)(()=>{let e=0,t=0;return O.forEach(n=>{let r=w[n.type][n.file.name]?.status;r===`success`?e+=1:r===`error`&&(t+=1)}),{loadedCount:e,attentionCount:t}},[O,w]);(0,y.useEffect)(()=>{if(a)return;let e=new Map(WM.map(e=>[e,new Set]));O.forEach(t=>e.get(t.type)?.add(t.file.name)),WM.forEachLine truncated
|
||||
`)}};dF.defaultYaml={explicit:!1,version:`1.2`},dF.defaultTags={"!!":`tag:yaml.org,2002:`};function fF(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function pF(e){let t=new Set;return nF(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function mF(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function hF(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??(i=pF(e));let a=mF(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(JP(t.node)||XP(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function gF(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=gF(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=gF(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=gF(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=gF(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function _F(e,t,n){if(Array.isArray(e))return e.map((e,t)=>_F(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!QP(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var vF=class{constructor(e){Object.defineProperty(this,UP,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!GP(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=_F(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?gF(i,{"":o},``,o):o}},yF=class extends vF{constructor(e){super(LP),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],nF(e,{Node:(e,t)=>{(WP(t)||QP(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||(_F(a,null,t),o=n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=bF(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(fF(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function bF(e,t,n){if(WP(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(XP(t)){let r=0;for(let i of t.items){let t=bF(e,i,n);t>r&&(r=t)}return r}else if(qP(t)){let r=bF(e,t.key,n),i=bF(e,t.value,n);return Math.max(r,i)}return 1}var xF=e=>!e||typeof e!=`function`&&typeof e!=`object`,SF=class extends vF{constructor(e){super(VP),this.value=e}toJSON(e,t){return t?.keep?this.value:_F(this.value,e,t)}toString(){return String(this.value)}};SF.BLOCK_FOLDED=`BLOCK_FOLDED`,SF.BLOCK_LITERAL=`BLOCK_LITERAL`,SF.PLAIN=`PLAIN`,SF.QUOTE_DOUBLE=`QUOTE_DOUBLE`,SF.QUOTE_SINGLE=`QUOTE_SINGLE`;var CF=`tag:yaml.org,2002:`;function wF(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function TF(e,t,n){if(GP(e)&&(e=e.contents),ZP(e))return e;if(qP(e)){let t=n.schema[zP].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new yF(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=CF+t.slice(2));let l=wF(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new SF(e);return c&&(c.node=t),t}l=e instanceof Line truncated
|
||||
`)?AF(n,t):n.includes(`
|
||||
`)?`
|
||||
`+_F(n,t):(e.endsWith(` `)?``:` `)+n,yF=`flow`,bF=`block`,xF=`quoted`;function SF(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=CF(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
||||
`)n===`block`&&(h=CF(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
||||
`+AF(n,t):(e.endsWith(` `)?``:` `)+n,MF=`flow`,NF=`block`,PF=`quoted`;function FF(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=IF(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
||||
`)n===`block`&&(h=IF(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
||||
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
||||
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function CF(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
||||
`);r=t,i=t+1,a=e[i]}return r}var wF=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),TF=e=>/^(%|---|\.\.\.)/m.test(e);function EF(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
||||
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function DF(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(TF(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
||||
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function IF(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
||||
`);r=t,i=t+1,a=e[i]}return r}var LF=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),RF=e=>/^(%|---|\.\.\.)/m.test(e);function zF(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
||||
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function BF(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(RF(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
||||
|
||||
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
||||
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:SF(o,a,xF,wF(t,!1))}function OF(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(e))return DF(e,t);let n=t.indent||(TF(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:SF(r,n,yF,wF(t,!1))}function kF(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=DF;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?OF:i&&!t?DF:n?OF:DF}return r(e,t)}var AF;try{AF=RegExp(`(^|(?<!
|
||||
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:FF(o,a,PF,LF(t,!1))}function VF(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(e))return BF(e,t);let n=t.indent||(RF(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:FF(r,n,MF,LF(t,!1))}function HF(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=BF;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?VF:i&&!t?BF:n?VF:BF}return r(e,t)}var UF;try{UF=RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,`g`)}catch{AF=/\n+(?!\n|$)/g}function jF({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return kF(n,r);let l=r.indent||(r.forceBlockIndent||TF(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===lF.BLOCK_FOLDED?!1:t===lF.BLOCK_LITERAL||!EF(n,c,l.length);if(!n)return u?`|
|
||||
|$)`,`g`)}catch{UF=/\n+(?!\n|$)/g}function WF({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return HF(n,r);let l=r.indent||(r.forceBlockIndent||RF(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===SF.BLOCK_FOLDED?!1:t===SF.BLOCK_LITERAL||!zF(n,c,l.length);if(!n)return u?`|
|
||||
`:`>
|
||||
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
||||
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
||||
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&(n=n.slice(0,-p.length),p[p.length-1]===`
|
||||
`&&(p=p.slice(0,-1)),p=p.replace(AF,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
||||
`&&(p=p.slice(0,-1)),p=p.replace(UF,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
||||
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&(n=n.substring(v.length),v=v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=wF(r,!0);o!==`folded`&&t!==lF.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=SF(`${v}${e}${p}`,l,bF,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function MF(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
||||
`)||u&&/[[\]{},]/.test(a))return kF(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
||||
`)?kF(a,t):jF(e,t,n,r);if(!s&&!u&&i!==lF.PLAIN&&a.includes(`
|
||||
`))return jF(e,t,n,r);if(TF(a)){if(c===``)return t.forceBlockIndent=!0,jF(e,t,n,r);if(s&&c===l)return kF(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return kF(a,t)}return s?d:SF(d,c,yF,wF(t,!1))}function NF(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==lF.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=lF.QUOTE_DOUBLE);let c=e=>{switch(e){case lF.BLOCK_FOLDED:case lF.BLOCK_LITERAL:return i||a?kF(o.value,t):jF(o,t,n,r);case lF.QUOTE_DOUBLE:return DF(o.value,t);case lF.QUOTE_SINGLE:return OF(o.value,t);case lF.PLAIN:return MF(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function PF(e,t){let n=Object.assign({blockQuote:!0,commentString:gF,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function FF(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(FP(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function IF(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(FP(e)||LP(e))&&e.anchor;a&&$P(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function LF(e,t,n,r){if(PP(e))return e.toString(t,n,r);if(jP(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=RP(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=FF(t.doc.schema.tags,a));let o=IF(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):FP(a)?NF(a,t,n,r):a.toString(t,n,r);return o?FP(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function RF({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=RP(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(LP(e)||!RP(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||LP(e)||(FP(e)?e.type===lF.BLOCK_FOLDED||e.type===lF.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=LF(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=vF(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=vF(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=vF(g,n.indent,l(f))));let _,v,y;RP(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&FP(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&IP(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=LF(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
||||
`:``,v){let e=l(v);S+=`\n${_F(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=LF(r,!0);o!==`folded`&&t!==SF.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=FF(`${v}${e}${p}`,l,NF,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function GF(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
||||
`)||u&&/[[\]{},]/.test(a))return HF(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
||||
`)?HF(a,t):WF(e,t,n,r);if(!s&&!u&&i!==SF.PLAIN&&a.includes(`
|
||||
`))return WF(e,t,n,r);if(RF(a)){if(c===``)return t.forceBlockIndent=!0,WF(e,t,n,r);if(s&&c===l)return HF(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return HF(a,t)}return s?d:FF(d,c,MF,LF(t,!1))}function KF(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==SF.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=SF.QUOTE_DOUBLE);let c=e=>{switch(e){case SF.BLOCK_FOLDED:case SF.BLOCK_LITERAL:return i||a?HF(o.value,t):WF(o,t,n,r);case SF.QUOTE_DOUBLE:return BF(o.value,t);case SF.QUOTE_SINGLE:return VF(o.value,t);case SF.PLAIN:return GF(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function qF(e,t){let n=Object.assign({blockQuote:!0,commentString:kF,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function JF(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(JP(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function YF(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(JP(e)||XP(e))&&e.anchor;a&&fF(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function XF(e,t,n,r){if(qP(e))return e.toString(t,n,r);if(WP(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=ZP(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=JF(t.doc.schema.tags,a));let o=YF(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):JP(a)?KF(a,t,n,r):a.toString(t,n,r);return o?JP(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function ZF({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=ZP(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(XP(e)||!ZP(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||XP(e)||(JP(e)?e.type===SF.BLOCK_FOLDED||e.type===SF.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=XF(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=jF(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=jF(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=jF(g,n.indent,l(f))));let _,v,y;ZP(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&JP(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&YP(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=XF(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
||||
`:``,v){let e=l(v);S+=`\n${AF(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
||||
`&&y&&(S=`
|
||||
|
||||
`):S+=`\n${n.indent}`}else if(!p&&LP(t)){let e=x[0],r=x.indexOf(`
|
||||
`):S+=`\n${n.indent}`}else if(!p&&XP(t)){let e=x[0],r=x.indexOf(`
|
||||
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
||||
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=vF(g,n.indent,l(y)):h&&i&&i(),g}function zF(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var BF=`<<`,VF={identify:e=>e===BF||typeof e==`symbol`&&e.description===BF,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new lF(Symbol(BF)),{addToJSMap:UF}),stringify:()=>BF},HF=(e,t)=>(VF.identify(t)||FP(t)&&(!t.type||t.type===lF.PLAIN)&&VF.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===VF.tag&&e.default);function UF(e,t,n){let r=GF(e,n);if(IP(r))for(let n of r.items)WF(e,t,n);else if(Array.isArray(r))for(let n of r)WF(e,t,n);else WF(e,t,r)}function WF(e,t,n){let r=GF(e,n);if(!NP(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function GF(e,t){return e&&jP(t)?t.resolve(e.doc,e):t}function KF(e,t,{key:n,value:r}){if(RP(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(HF(e,n))UF(e,t,r);else{let i=iF(n,``,e);if(t instanceof Map)t.set(i,iF(r,i,e));else if(t instanceof Set)t.add(i);else{let a=qF(n,i,e),o=iF(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function qF(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(RP(e)&&n?.doc){let t=PF(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),zF(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function JF(e,t,n){return new YF(fF(e,void 0,n),fF(t,void 0,n))}var YF=class e{constructor(e,t=null){Object.defineProperty(this,AP,{value:DP}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return RP(n)&&(n=n.clone(t)),RP(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return KF(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?RF(this,e,t,n):JSON.stringify(this)}};function XF(e,t,n){return(t.inFlow??e.flow?QF:ZF)(e,t,n)}function ZF({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(RP(i))!d&&i.spaceBefore&&f.push(``),$F(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(PP(i)){let e=RP(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),$F(n,f,e.commentBefore,d))}d=!1;let s=LF(i,u,()=>o=null,()=>d=!0);o&&(s+=vF(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
||||
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=jF(g,n.indent,l(y)):h&&i&&i(),g}function QF(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var $F=`<<`,eI={identify:e=>e===$F||typeof e==`symbol`&&e.description===$F,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new SF(Symbol($F)),{addToJSMap:nI}),stringify:()=>$F},tI=(e,t)=>(eI.identify(t)||JP(t)&&(!t.type||t.type===SF.PLAIN)&&eI.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===eI.tag&&e.default);function nI(e,t,n){let r=iI(e,n);if(YP(r))for(let n of r.items)rI(e,t,n);else if(Array.isArray(r))for(let n of r)rI(e,t,n);else rI(e,t,r)}function rI(e,t,n){let r=iI(e,n);if(!KP(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function iI(e,t){return e&&WP(t)?t.resolve(e.doc,e):t}function aI(e,t,{key:n,value:r}){if(ZP(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(tI(e,n))nI(e,t,r);else{let i=_F(n,``,e);if(t instanceof Map)t.set(i,_F(r,i,e));else if(t instanceof Set)t.add(i);else{let a=oI(n,i,e),o=_F(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function oI(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(ZP(e)&&n?.doc){let t=qF(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),QF(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function sI(e,t,n){return new cI(TF(e,void 0,n),TF(t,void 0,n))}var cI=class e{constructor(e,t=null){Object.defineProperty(this,UP,{value:BP}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return ZP(n)&&(n=n.clone(t)),ZP(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return aI(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?ZF(this,e,t,n):JSON.stringify(this)}};function lI(e,t,n){return(t.inFlow??e.flow?dI:uI)(e,t,n)}function uI({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(ZP(i))!d&&i.spaceBefore&&f.push(``),fI(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(qP(i)){let e=ZP(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),fI(n,f,e.commentBefore,d))}d=!1;let s=XF(i,u,()=>o=null,()=>d=!0);o&&(s+=jF(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
||||
`}}return e?(p+=`
|
||||
`+_F(l(e),c),s&&s()):d&&o&&o(),p}function QF({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(RP(i))i.spaceBefore&&d.push(``),$F(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(PP(i)){let e=RP(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),$F(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=RP(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=LF(i,c,()=>a=null);l||(l=d.length>u||o.includes(`
|
||||
`)),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),l&&(o+=`,`)),a&&(o+=vF(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
||||
`;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function $F({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=_F(t(r),e);n.push(i.trimStart())}}function eI(e,t){let n=FP(t)?t.value:t;for(let r of e)if(PP(r)&&(r.key===t||r.key===n||FP(r.key)&&r.key.value===n))return r}var tI=class extends hF{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(EP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(JF(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=PP(e)?e:!e||typeof e!=`object`||!(`key`in e)?new YF(e,e?.value):new YF(e.key,e.value);let r=eI(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);FP(r.value)&&cF(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=eI(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=eI(this.items,e)?.value;return(!t&&FP(n)?n.value:n)??void 0}has(e){return!!eI(this.items,e)}set(e,t){this.add(new YF(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)KF(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!PP(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),XF(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},nI={collection:`map`,default:!0,nodeClass:tI,tag:`tag:yaml.org,2002:map`,resolve(e,t){return NP(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>tI.from(e,t,n)},rI=class extends hF{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(kP,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=iI(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=iI(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&FP(r)?r.value:r}has(e){let t=iI(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=iI(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];FP(r)&&cF(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(iF(e,String(r++),t));return n}toString(e,t,n){return e?XF(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(fF(a,void 0,n))}}return i}};function iI(e){let t=FP(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var aI={collection:`seq`,default:!0,nodeClass:rI,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return IP(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>rI.from(e,t,n)},oI={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),NF(e,t,n,r)}},sI={identify:e=>e==null,createNode:()=>new lF(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new lF(null),stringify:({source:e},t)=>typeof e==`string`&&sI.test.test(e)?e:t.options.nullStr},cI={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new lF(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&cI.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function lI({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var uI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:lI},dI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),sLine truncated
|
||||
`:` `)}return NF({comment:e,type:t,value:s},r,i,a)}};function TI(e,t){if(IP(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!PP(r)){if(NP(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new YF(new lF(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=PP(r)?r:new YF(r)}}else t(`Expected a sequence for this tag`);return e}function EI(e,t,n){let{replacer:r}=n,i=new rI(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(JF(o,s,n))}return i}var DI={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:TI,createNode:EI},OI=class e extends rI{constructor(){super(),this.add=tI.prototype.add.bind(this),this.delete=tI.prototype.delete.bind(this),this.get=tI.prototype.get.bind(this),this.has=tI.prototype.has.bind(this),this.set=tI.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(PP(e)?(r=iF(e.key,``,t),i=iF(e.value,r,t)):r=iF(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=EI(e,t,n),i=new this;return i.items=r.items,i}};OI.tag=`tag:yaml.org,2002:omap`;var kI={collection:`seq`,identify:e=>e instanceof Map,nodeClass:OI,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=TI(e,t),r=[];for(let{key:e}of n.items)FP(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new OI,n)},createNode:(e,t,n)=>OI.from(e,t,n)};function AI({value:e,source:t},n){return t&&(e?jI:MI).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var jI={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new lF(!0),stringify:AI},MI={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new lF(!1),stringify:AI},NI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:lI},PI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():lI(e)}},FI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new lF(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:lI},II=e=>typeof e==`bigint`||Number.isInteger(e);function LI(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function RI(e,t,n){let{value:r}=e;if(II(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return lI(e)}var zI={identify:II,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>LI(e,2,2,n),stringify:e=>RI(e,2,`0b`)},BI={identify:II,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>LI(e,1,8,n),stringify:e=>RI(e,8,`0`)},VI={identify:II,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>LI(e,0,10,n),stringify:lI},HI={identify:II,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>LI(e,2,16,n),stringify:e=>RI(e,16,`0x`)},UI=class e extends tI{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=PP(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new YF(e.key,null):new YF(e,null),eI(this.items,t.key)||this.items.push(t)}get(e,t){let n=eI(this.items,e);return!t&&PP(n)?FP(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=eI(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new YF(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))retLine truncated
|
||||
`)?(n.push(`...`),n.push(_F(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(_F(a(t),``)))}return n.join(`
|
||||
`+AF(l(e),c),s&&s()):d&&o&&o(),p}function dI({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(ZP(i))i.spaceBefore&&d.push(``),fI(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(qP(i)){let e=ZP(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),fI(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=ZP(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=XF(i,c,()=>a=null);l||(l=d.length>u||o.includes(`
|
||||
`)),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||(l=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth)),l&&(o+=`,`)),a&&(o+=jF(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
||||
`;return`${e}\n${i}${p}`}else return`${f}${o}${d.join(` `)}${o}${p}`}function fI({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=AF(t(r),e);n.push(i.trimStart())}}function pI(e,t){let n=JP(t)?t.value:t;for(let r of e)if(qP(r)&&(r.key===t||r.key===n||JP(r.key)&&r.key.value===n))return r}var mI=class extends OF{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(zP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(sI(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=qP(e)?e:!e||typeof e!=`object`||!(`key`in e)?new cI(e,e?.value):new cI(e.key,e.value);let r=pI(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);JP(r.value)&&xF(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=pI(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=pI(this.items,e)?.value;return(!t&&JP(n)?n.value:n)??void 0}has(e){return!!pI(this.items,e)}set(e,t){this.add(new cI(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)aI(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!qP(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),lI(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},hI={collection:`map`,default:!0,nodeClass:mI,tag:`tag:yaml.org,2002:map`,resolve(e,t){return KP(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>mI.from(e,t,n)},gI=class extends OF{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(HP,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=_I(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=_I(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&JP(r)?r.value:r}has(e){let t=_I(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=_I(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];JP(r)&&xF(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(_F(e,String(r++),t));return n}toString(e,t,n){return e?lI(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(TF(a,void 0,n))}}return i}};function _I(e){let t=JP(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var vI={collection:`seq`,default:!0,nodeClass:gI,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return YP(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>gI.from(e,t,n)},yI={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),KF(e,t,n,r)}},bI={identify:e=>e==null,createNode:()=>new SF(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new SF(null),stringify:({source:e},t)=>typeof e==`string`&&bI.test.test(e)?e:t.options.nullStr},xI={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new SF(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&xI.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function SI({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var CI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:SI},wI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),sLine truncated
|
||||
`:` `)}return KF({comment:e,type:t,value:s},r,i,a)}};function RI(e,t){if(YP(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!qP(r)){if(KP(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new cI(new SF(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=qP(r)?r:new cI(r)}}else t(`Expected a sequence for this tag`);return e}function zI(e,t,n){let{replacer:r}=n,i=new gI(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(sI(o,s,n))}return i}var BI={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:RI,createNode:zI},VI=class e extends gI{constructor(){super(),this.add=mI.prototype.add.bind(this),this.delete=mI.prototype.delete.bind(this),this.get=mI.prototype.get.bind(this),this.has=mI.prototype.has.bind(this),this.set=mI.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(qP(e)?(r=_F(e.key,``,t),i=_F(e.value,r,t)):r=_F(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=zI(e,t,n),i=new this;return i.items=r.items,i}};VI.tag=`tag:yaml.org,2002:omap`;var HI={collection:`seq`,identify:e=>e instanceof Map,nodeClass:VI,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=RI(e,t),r=[];for(let{key:e}of n.items)JP(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new VI,n)},createNode:(e,t,n)=>VI.from(e,t,n)};function UI({value:e,source:t},n){return t&&(e?WI:GI).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var WI={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new SF(!0),stringify:UI},GI={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new SF(!1),stringify:UI},KI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:SI},qI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():SI(e)}},JI={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new SF(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:SI},YI=e=>typeof e==`bigint`||Number.isInteger(e);function XI(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function ZI(e,t,n){let{value:r}=e;if(YI(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return SI(e)}var QI={identify:YI,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>XI(e,2,2,n),stringify:e=>ZI(e,2,`0b`)},$I={identify:YI,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>XI(e,1,8,n),stringify:e=>ZI(e,8,`0`)},eL={identify:YI,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>XI(e,0,10,n),stringify:SI},tL={identify:YI,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>XI(e,2,16,n),stringify:e=>ZI(e,16,`0x`)},nL=class e extends mI{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=qP(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new cI(e.key,null):new cI(e,null),pI(this.items,t.key)||this.items.push(t)}get(e,t){let n=pI(this.items,e);return!t&&qP(n)?JP(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=pI(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new cI(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))retLine truncated
|
||||
`)?(n.push(`...`),n.push(AF(t,``))):n.push(`... ${t}`)}else n.push(`...`);else{let t=e.comment;t&&o&&(t=t.replace(/^\n+/,``)),t&&((!o||s)&&n[n.length-1]!==``&&n.push(``),n.push(AF(a(t),``)))}return n.join(`
|
||||
`)+`
|
||||
`}var iL=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,AP,{value:TP});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new QP({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[AP]:{value:TP}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=RP(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){aL(this.contents)&&this.contents.add(e)}addIn(e,t){aL(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=eF(this);e.anchor=!t||n.has(t)?tF(t||`a`,n):t}return new oF(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=nF(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=fF(e,l,p);return o&&LP(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new YF(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return aL(this.contents)?this.contents.delete(e):!1}deleteIn(e){return mF(e)?this.contents==null?!1:(this.contents=null,!0):aL(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return LP(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return mF(e)?!t&&FP(this.contents)?this.contents.value:this.contents:LP(this.contents)?this.contents.getIn(e,t):void 0}has(e){return LP(this.contents)?this.contents.has(e):!1}hasIn(e){return mF(e)?this.contents!==void 0:LP(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=pF(this.schema,[e],t):aL(this.contents)&&this.contents.set(e,t)}setIn(e,t){mF(e)?this.contents=t:this.contents==null?this.contents=pF(this.schema,Array.from(e),t):aL(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new QP({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new QP({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new nL(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=iF(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?rF(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return rL(this,e)}};function aL(e){if(LP(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var oL=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},sL=class extends oL{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},cL=class extends oL{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},lL=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
||||
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function uL(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),m=!1),h&&(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),h=null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function dL(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
||||
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(dL(t.key)||dL(t.value))return!0}return!1;default:return!0}}function fL(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&dL(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function pL(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||FP(e)&&FP(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var mL=`All mapping items must start at the same column`;function hL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??tI)(n.schema);n.atRoot&&(n.atRoot=!1);let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=uL(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,mL)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
||||
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||dL(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,mL);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&fL(r.indent,u,i),n.atKey=!1,pL(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=uL(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&fL(r.indent,f,i),s=c.range[2];let l=new YF(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
||||
`+_.comment:g.comment=_.comment);let e=new YF(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function gL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??rI)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=uL(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&fL(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function _L(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var vL=`Block collections are not allowed within flow collections`,yL=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function bL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?tI:rI))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=uL(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
||||
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&dL(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];PP(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
||||
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],yL(m)&&i(r.range,`BLOCK_IN_FLOW`,vL)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);yL(f)&&i(g.range,`BLOCK_IN_FLOW`,vL),n.atKey=!1;let _=uL(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?yL(m)&&i(v.range,`BLOCK_IN_FLOW`,vL):_.comment&&(g.comment?g.comment+=`
|
||||
`+_.comment:g.comment=_.comment);let y=new YF(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;pL(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new tI(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=_L(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
||||
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function xL(e,t,n,r,i,a){let o=n.type===`block-map`?hL(e,t,n,r,a):n.type===`block-seq`?gL(e,t,n,r,a):bL(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function SL(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===tI.tagName&&s===`map`||o===rI.tagName&&s===`seq`)return xL(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),xL(e,t,n,i,o)}let l=xL(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=RP(u)?u:new lF(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function CL(e,t,n){let r=t.offset,i=wL(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?lF.BLOCK_FOLDED:lF.BLOCK_LITERAL,o=t.source?TL(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
||||
`}var _L=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,UP,{value:RP});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new dF({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[UP]:{value:RP}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=ZP(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){vL(this.contents)&&this.contents.add(e)}addIn(e,t){vL(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=pF(this);e.anchor=!t||n.has(t)?mF(t||`a`,n):t}return new yF(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=hF(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=TF(e,l,p);return o&&XP(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new cI(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return vL(this.contents)?this.contents.delete(e):!1}deleteIn(e){return DF(e)?this.contents==null?!1:(this.contents=null,!0):vL(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return XP(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return DF(e)?!t&&JP(this.contents)?this.contents.value:this.contents:XP(this.contents)?this.contents.getIn(e,t):void 0}has(e){return XP(this.contents)?this.contents.has(e):!1}hasIn(e){return DF(e)?this.contents!==void 0:XP(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=EF(this.schema,[e],t):vL(this.contents)&&this.contents.set(e,t)}setIn(e,t){DF(e)?this.contents=t:this.contents==null?this.contents=EF(this.schema,Array.from(e),t):vL(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new dF({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new dF({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new hL(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=_F(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?gF(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return gL(this,e)}};function vL(e){if(XP(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var yL=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},bL=class extends yL{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},xL=class extends yL{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},SL=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
||||
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function CL(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),m=!1),h&&(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),h=null),i.type){case`space`:!t&&(n!==`doc-start`||r?.type!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??(x=i.offset),l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||r?.type===`block-map`||r?.type===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function wL(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
||||
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(wL(t.key)||wL(t.value))return!0}return!1;default:return!0}}function TL(e,t,n){if(t?.type===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&wL(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function EL(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||JP(e)&&JP(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var DL=`All mapping items must start at the same column`;function OL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??mI)(n.schema);n.atRoot&&(n.atRoot=!1);let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=CL(l,{indicator:`explicit-key-ind`,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in u&&u.indent!==r.indent&&i(s,`BAD_INDENT`,DL)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+=`
|
||||
`+p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||wL(u))&&i(u??l[l.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else p.found?.indent!==r.indent&&i(s,`BAD_INDENT`,DL);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&TL(r.indent,u,i),n.atKey=!1,EL(n,o.items,g)&&i(h,`DUPLICATE_KEY`,`Map keys must be unique`);let _=CL(d??[],{indicator:`map-value-ind`,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type===`block-scalar`});if(s=_.end,_.found){m&&(f?.type===`block-map`&&!_.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&p.start<_.found.offset-1024&&i(g.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&TL(r.indent,f,i),s=c.range[2];let l=new cI(g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),_.comment&&(g.comment?g.comment+=`
|
||||
`+_.comment:g.comment=_.comment);let e=new cI(g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function kL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??gI)(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=CL(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)l?.type===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&TL(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function AL(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var jL=`Block collections are not allowed within flow collections`,ML=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function NL({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a?.nodeClass)??(o?mI:gI))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=CL(d,{flow:s,indicator:`explicit-key-ind`,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(h.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),h.comment&&(c.comment?c.comment+=`
|
||||
`+h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&wL(f)&&i(f,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)h.comma&&i(h.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(h.comma||i(h.start,`MISSING_CHAR`,`Missing , between ${s} items`),h.comment){let e=``;loop:for(let t of d)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];qP(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
||||
`+e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],ML(m)&&i(r.range,`BLOCK_IN_FLOW`,jL)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);ML(f)&&i(g.range,`BLOCK_IN_FLOW`,jL),n.atKey=!1;let _=CL(p??[],{flow:s,indicator:`map-value-ind`,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}h.start<_.found.offset-1024&&i(_.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else m&&(`source`in m&&m.source?.[0]===`:`?i(m,`MISSING_CHAR`,`Missing space after : in ${s}`):i(_.start,`MISSING_CHAR`,`Missing , or : between ${s} items`));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?ML(m)&&i(v.range,`BLOCK_IN_FLOW`,jL):_.comment&&(g.comment?g.comment+=`
|
||||
`+_.comment:g.comment=_.comment);let y=new cI(g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;EL(n,e.items,g)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(y)}else{let e=new mI(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o?`}`:`]`,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${d}`:`${e} in block collection must be sufficiently indented and end with a ${d}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=AL(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
||||
`+e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function PL(e,t,n,r,i,a){let o=n.type===`block-map`?OL(e,t,n,r,a):n.type===`block-seq`?kL(e,t,n,r,a):NL(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function FL(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let s=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!a||!o||o===`!`||o===mI.tagName&&s===`map`||o===gI.tagName&&s===`seq`)return PL(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${s} collection, but expects ${r.collection??`scalar`}`,!0):i(a,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${o}`,!0),PL(e,t,n,i,o)}let l=PL(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a,`TAG_RESOLVE_FAILED`,e),t.options)??l,d=ZP(u)?u:new SF(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function IL(e,t,n){let r=t.offset,i=LL(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?SF.BLOCK_FOLDED:SF.BLOCK_LITERAL,o=t.source?RL(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
||||
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
||||
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===lF.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
||||
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===SF.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
||||
`):t.length>c||r[0]===` `?(f===` `?f=`
|
||||
`:!p&&f===`
|
||||
`&&(f=`
|
||||
@@ -98,70 +100,70 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
||||
`+o[e][0].slice(c);d[d.length-1]!==`
|
||||
`&&(d+=`
|
||||
`);break;default:d+=`
|
||||
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function wL({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function TL(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function EL(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=lF.PLAIN,c=DL(a,l);break;case`single-quoted-scalar`:s=lF.QUOTE_SINGLE,c=OL(a,l);break;case`double-quoted-scalar`:s=lF.QUOTE_DOUBLE,c=AL(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=_L(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function DL(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),kL(e)}function OL(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),kL(e.slice(1,-1)).replace(/''/g,`'`)}function kL(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function LL({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function RL(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function zL(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=SF.PLAIN,c=BL(a,l);break;case`single-quoted-scalar`:s=SF.QUOTE_SINGLE,c=VL(a,l);break;case`double-quoted-scalar`:s=SF.QUOTE_DOUBLE,c=UL(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=AL(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function BL(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`;break}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),HL(e)}function VL(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),HL(e.slice(1,-1)).replace(/''/g,`'`)}function HL(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
||||
`?i+=a:a=`
|
||||
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function AL(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
|
||||
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+(r?.[1]??``)}function UL(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(!(i===`\r`&&e[r+1]===`
|
||||
`))if(i===`
|
||||
`){let{fold:t,offset:i}=jL(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=ML[i];if(a)n+=a;else if(i===`
|
||||
`){let{fold:t,offset:i}=WL(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=GL[i];if(a)n+=a;else if(i===`
|
||||
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
||||
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=NL(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
||||
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=KL(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
||||
`&&!(a===`\r`&&e[r+2]===`
|
||||
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function jL(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
||||
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function WL(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
||||
`||r===`\r`)&&!(r===`\r`&&e[t+2]!==`
|
||||
`);)r===`
|
||||
`&&(n+=`
|
||||
`),t+=1,r=e[t+1];return n||(n=` `),{fold:n,offset:t}}var ML={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
||||
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function NL(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function PL(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?CL(e,t,r):EL(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[OP]:c?FL(e.schema,i,c,n,r):t.type===`scalar`?IL(e,i,t,r):e.schema[OP];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=FP(a)?a:new lF(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new lF(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function FL(e,t,n,r,i){if(n===`!`)return e[OP];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[OP])}function IL({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[OP];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[OP];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function LL(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var RL={composeNode:zL,composeEmptyNode:BL};function zL(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=VL(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=PL(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=SL(RL,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??(l=BL(e,t.offset,void 0,null,n,r)),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!FP(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function BL(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=PL(e,{type:`scalar`,offset:LL(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function VL({options:e},{offset:t,source:n,end:r},i){let a=new oF(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=_L(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function HL(e,t,{offset:n,start:r,value:i,end:a},o){let s=new iL(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=uL(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?zL(c,i,l,o):BL(c,l.end,r,null,l,o);let u=s.contents.range[2],d=_L(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function UL(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function WL(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
||||
`),t+=1,r=e[t+1];return n||(n=` `),{fold:n,offset:t}}var GL={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
||||
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function KL(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function qL(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?IL(e,t,r):zL(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[VP]:c?JL(e.schema,i,c,n,r):t.type===`scalar`?YL(e,i,t,r):e.schema[VP];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=JP(a)?a:new SF(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new SF(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function JL(e,t,n,r,i){if(n===`!`)return e[VP];let a=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)a.push(t);else return t;for(let e of a)if(e.test?.test(t))return e;let o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[VP])}function YL({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>(t.default===!0||e&&t.default===`key`)&&t.test?.test(r))||n[VP];if(n.compat){let e=n.compat.find(e=>e.default&&e.test?.test(r))??n[VP];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function XL(e,t,n){if(t){n??(n=t.length);for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];n?.type===`space`;)e+=n.source.length,n=t[++r];break}}return e}var ZL={composeNode:QL,composeEmptyNode:$L};function QL(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=eR(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=qL(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=FL(ZL,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??(l=$L(e,t.offset,void 0,null,n,r)),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!JP(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function $L(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=qL(e,{type:`scalar`,offset:XL(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function eR({options:e},{offset:t,source:n,end:r},i){let a=new yF(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=AL(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function tR(e,t,{offset:n,start:r,value:i,end:a},o){let s=new _L(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=CL(r,{indicator:`doc-start`,next:i??a?.[0],offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?QL(c,i,l,o):$L(c,l.end,r,null,l,o);let u=s.contents.range[2],d=AL(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function nR(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function rR(e){let t=``,n=!1,r=!1;for(let i=0;i<e.length;++i){let a=e[i];switch(a[0]){case`#`:t+=(t===``?``:r?`
|
||||
|
||||
`:`
|
||||
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var GL=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=UL(e);r?this.warnings.push(new cL(i,t,n)):this.errors.push(new sL(i,t,n))},this.directives=new QP({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=WL(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(LP(i)&&!i.flow&&i.items.length>0){let e=i.items[0];PP(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:WL(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=UL(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=HL(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new sL(UL(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new sL(UL(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=_L(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new sL(UL(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new iL(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},KL=Symbol(`break visit`),qL=Symbol(`skip children`),JL=Symbol(`remove item`);function YL(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),XL(Object.freeze([]),e,t)}YL.BREAK=KL,YL.SKIP=qL,YL.REMOVE=JL,YL.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},YL.parentCollection=(e,t)=>{let n=YL.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function XL(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=XL(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===KL)return KL;else r===JL&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function ZL(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
||||
`)+(a.substring(1)||` `),n=!0,r=!1;break;case`%`:e[i+1]?.[0]!==`#`&&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var iR=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=nR(e);r?this.warnings.push(new xL(i,t,n)):this.errors.push(new bL(i,t,n))},this.directives=new dF({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=rR(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(XP(i)&&!i.flow&&i.items.length>0){let e=i.items[0];qP(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:rR(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=nR(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=tR(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new bL(nR(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new bL(nR(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=AL(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new bL(nR(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new _L(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},aR=Symbol(`break visit`),oR=Symbol(`skip children`),sR=Symbol(`remove item`);function cR(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),lR(Object.freeze([]),e,t)}cR.BREAK=aR,cR.SKIP=oR,cR.REMOVE=sR,cR.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},cR.parentCollection=(e,t)=>{let n=cR.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function lR(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=lR(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===aR)return aR;else r===sR&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function uR(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
||||
`:case`\r
|
||||
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function QL(e){switch(e){case void 0:case` `:case`
|
||||
`:case`\r`:case` `:return!0;default:return!1}}var $L=new Set(`0123456789ABCDEFabcdef`),eR=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),tR=new Set(`,[]{}`),nR=new Set(` ,[]{}
|
||||
\r `),rR=e=>!e||nR.has(e),iR=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
||||
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function dR(e){switch(e){case void 0:case` `:case`
|
||||
`:case`\r`:case` `:return!0;default:return!1}}var fR=new Set(`0123456789ABCDEFabcdef`),pR=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),mR=new Set(`,[]{}`),hR=new Set(` ,[]{}
|
||||
\r `),gR=e=>!e||hR.has(e),_R=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
||||
`||t===`\r`&&this.buffer[e+1]===`
|
||||
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
||||
`||!t&&!this.atEnd)return e+n+1}return t===`
|
||||
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&QL(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&QL(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!QL(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&QL(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(rR),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&QL(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(rR),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||QL(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
||||
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&dR(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}else n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&dR(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!dR(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&dR(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(gR),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&dR(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]===`]`||r[0]===`}`)))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(gR),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||dR(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
||||
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
||||
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>QL(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
||||
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>dR(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
||||
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
||||
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
||||
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
||||
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
||||
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(QL(r)||e&&tR.has(r))break;t=n}else if(QL(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
||||
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(dR(r)||e&&mR.has(r))break;t=n}else if(dR(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
||||
`?(n+=1,r=`
|
||||
`,i=this.buffer[n+1]):t=n),i===`#`||e&&tR.has(i))break;if(r===`
|
||||
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&tR.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(rR),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(QL(n)||t&&tR.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!QL(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(eR.has(t))t=this.buffer[++e];else if(t===`%`&&$L.has(this.buffer[e+1])&&$L.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||||
`,i=this.buffer[n+1]):t=n),i===`#`||e&&mR.has(i))break;if(r===`
|
||||
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&mR.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(gR),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(dR(n)||t&&mR.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!dR(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(pR.has(t))t=this.buffer[++e];else if(t===`%`&&fR.has(this.buffer[e+1])&&fR.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
||||
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},aR=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function oR(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function sR(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function cR(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function lR(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function uR(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function dR(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function fR(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!oR(t.start,`explicit-key-ind`)&&!oR(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,cR(t.value)?t.value.end?dR(t.value.end,t.sep):t.value.end=t.sep:dR(t.start,t.sep),delete t.sep)}var pR=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new iR,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ZL(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&fR(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&sR(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`Line truncated
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},vR=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function yR(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function bR(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function xR(e){switch(e?.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function SR(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function CR(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;e[++t]?.type===`space`;);return e.splice(t,e.length)}function wR(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function TR(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!yR(t.start,`explicit-key-ind`)&&!yR(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,xR(t.value)?t.value.end?wR(t.value.end,t.sep):t.value.end=t.sep:wR(t.start,t.sep),delete t.sep)}var ER=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new _R,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=uR(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&e?.type!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&TR(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&bR(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`Line truncated
|
||||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||||
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){dR(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(oR(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=uR(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(oR(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(cR(t.key)&&!oR(t.sep,`newline`)){let e=uR(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):oR(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!oR(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){dR(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||oR(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.Line truncated
|
||||
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){wR(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(yR(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=CR(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(yR(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(xR(t.key)&&!yR(t.sep,`newline`)){let e=CR(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):yR(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!yR(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){wR(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||yR(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.Line truncated
|
||||
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
||||
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=uR(lR(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=uR(lR(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function mR(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new aR||null,prettyErrors:t}}function hR(e,t={}){let{lineCounter:n,prettyErrors:r}=mR(t),i=new pR(n?.addNewLine),a=new GL(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new sL(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(lL(e,n)),o.warnings.forEach(lL(e,n))),o}function gR(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=hR(e,n);if(!i)return null;if(i.warnings.forEach(e=>zF(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}var _R={section:`ConfigSection-module__section___36A5y`,header:`ConfigSection-module__header___9y9kI`,titleRow:`ConfigSection-module__titleRow___MDqPS`,indexBadge:`ConfigSection-module__indexBadge___BNk-6`,iconBadge:`ConfigSection-module__iconBadge___608--`,headingGroup:`ConfigSection-module__headingGroup___iqK3P`,title:`ConfigSection-module__title___fNwM-`,description:`ConfigSection-module__description___uM2Zw`,content:`ConfigSection-module__content___RBAGw`},vR=(0,y.forwardRef)(function({title:e,description:t,indexLabel:n,icon:r,className:i,children:a,...o},s){return(0,H.jsxs)(`section`,{ref:s,className:[_R.section,i].filter(Boolean).join(` `),...o,children:[(0,H.jsxs)(`header`,{className:_R.header,children:[(0,H.jsxs)(`div`,{className:_R.titleRow,children:[n?(0,H.jsx)(`span`,{className:_R.indexBadge,children:n}):null,r?(0,H.jsx)(`span`,{className:_R.iconBadge,children:r}):null]}),(0,H.jsxs)(`div`,{className:_R.headingGroup,children:[(0,H.jsx)(`h2`,{className:_R.title,children:e}),t?(0,H.jsx)(`p`,{className:_R.description,children:t}):null]})]}),(0,H.jsx)(`div`,{className:_R.content,children:a})]})});function yR(e){let[t,n]=(0,y.useState)(()=>window.matchMedia(e).matches);return(0,y.useEffect)(()=>{let t=window.matchMedia(e),r=e=>{n(e.matches)};return r({matches:t.matches}),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var Y={visualEditor:`VisualConfigEditor-module__visualEditor___qt8bb`,expandableInputWrapper:`VisualConfigEditor-module__expandableInputWrapper___k5rpc`,expandableTextarea:`VisualConfigEditor-module__expandableTextarea___OVvmN`,expandableToggle:`VisualConfigEditor-module__expandableToggle___M5mBU`,expandableInputExpanded:`VisualConfigEditor-module__expandableInputExpanded___9zfyv`,overview:`VisualConfigEditor-module__overview___OzHQc`,overviewHeader:`VisualConfigEditor-module__overviewHeader___A8kWa`,overviewMeta:`VisualConfigEditor-module__overviewMeta___SM8ZF`,overviewPill:`VisualConfigEditor-module__overviewPill___eXq54`,overviewPillWarning:`VisualConfigEditor-module__overviewPillWarning___ruscj`,modeSwitch:`VisualConfigEditor-module__modeSwitch___RaXgu`,modeButton:`VisualConfigEditor-module__modeButton___4q91-`,modeButtonActive:`VisualConfigEditor-module__modeButtonActive___2l-EB`,storeAuthEditor:`VisualConfigEditor-module__storeAuthEditor___jw1fz`,storeAuthEmpty:`VisualConfigEditor-module__storeAuthEmpty___PXnX1`,storeAuthRule:`VisualConfigEditor-module__storeAuthRule___CcEWk`,storeAuthRuleHeader:`VisualConfigEditor-module__storeAuthRuleHeader___Y7bYd`,storeAuthGrid:`VisualConfigEditor-module__storeAuthGrid___zNz-e`,storeLine truncated
|
||||
`)}function TR(e){if(Object.prototype.hasOwnProperty.call(e,`api-keys`))return wR(e[`api-keys`]);let t=SR(SR(SR(e.auth)?.providers)?.[`config-api-key`]);return t?Object.prototype.hasOwnProperty.call(t,`api-key-entries`)?wR(t[`api-key-entries`]):wR(t[`api-keys`]):``}function ER(e,t){return e.hasIn(t)}function DR(e,t){NP(e.getIn(t,!0))||e.setIn(t,e.createNode({}))}function OR(e,t){let n=e.getIn(t,!0);NP(n)&&n.items.length===0&&e.deleteIn(t)}function kR(e,t,n){if(n){e.setIn(t,!0);return}ER(e,t)&&e.setIn(t,!1)}function AR(e,t,n){let r=typeof n==`string`?n:``;if(r.trim()!==``){e.setIn(t,r);return}ER(e,t)&&e.setIn(t,``)}function jR(e,t,n){let r=n.map(e=>e.trim()).filter(Boolean);if(r.length>0){e.setIn(t,r);return}ER(e,t)&&e.deleteIn(t)}function MR(e,t,n){let r=(typeof n==`string`?n:``).trim();if(r===``){ER(e,t)&&e.deleteIn(t);return}if(!/^-?\d+$/.test(r))return;let i=Number(r);if(Number.isFinite(i)){e.setIn(t,i);return}}function NR(e,t,n){if(n===`chat`||n===`passthrough`){e.setIn(t,n);return}if(n===`true`){e.setIn(t,!0);return}ER(e,t)&&e.setIn(t,!1)}var PR=[`payloadDefaultRules`,`payloadDefaultRawRules`,`payloadOverrideRules`,`payloadOverrideRawRules`,`payloadFilterRules`];function FR(e){return PR.some(t=>e.has(t))}function IR(e){let t=e.trim();if(t)return/^-?\d+$/.test(t)&&Number(t)>=0?void 0:`non_negative_integer`}function LR(e){let t=e.trim();if(!t)return;if(!/^\d+$/.test(t))return`port_range`;let n=Number(t);return n>=1&&n<=65535?void 0:`port_range`}function RR(e){let t=e.trim();if(!t)return;if(!/^\d+$/.test(t))return`integer_range_1_3600`;let n=Number(t);return n>=1&&n<=3600?void 0:`integer_range_1_3600`}function zR(e){return{port:LR(e.port),errorLogsMaxFiles:IR(e.errorLogsMaxFiles),logsMaxTotalSizeMb:IR(e.logsMaxTotalSizeMb),redisUsageQueueRetentionSeconds:RR(e.redisUsageQueueRetentionSeconds),requestRetry:IR(e.requestRetry),maxRetryCredentials:IR(e.maxRetryCredentials),maxRetryInterval:IR(e.maxRetryInterval),authAutoRefreshWorkers:IR(e.authAutoRefreshWorkers),"streaming.keepaliveSeconds":IR(e.streaming.keepaliveSeconds),"streaming.bootstrapRetries":IR(e.streaming.bootstrapRetries),"streaming.nonstreamKeepaliveInterval":IR(e.streaming.nonstreamKeepaliveInterval)}}function BR(e){let t=e.value.trim();switch(e.valueType){case`number`:{if(!t)return`payload_invalid_number`;let e=Number(t);return Number.isFinite(e)?void 0:`payload_invalid_number`}case`boolean`:{let e=t.toLowerCase();return e===`true`||e===`false`?void 0:`payload_invalid_boolean`}case`json`:if(!t)return`payload_invalid_json`;try{JSON.parse(e.value);return}catch{return`payload_invalid_json`}default:return}}function VR(e){return e.some(e=>e.params.some(e=>!!BR(e))||e.models.some(e=>(e.match??[]).some(e=>!!BR(e))||(e.notMatch??[]).some(e=>!!BR(e))))}function HR(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}function UR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.name!==i.name||r.protocol!==i.protocol||r.fromProtocol!==i.fromProtocol||!GR(r.headers,i.headers)||!WR(r.match??[],i.match??[])||!WR(r.notMatch??[],i.notMatch??[])||!KR(r.exist,i.exist)||!KR(r.notExist,i.notExist))return!1}return!0}function WR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.path!==i.path||r.valueType!==i.valueType||r.value!==i.value)return!1}return!0}function GR(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[e];if(!t||!i||t.id!==i.id||t.name!==i.name||t.value!==i.value)return!1}return!0}function KR(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1)if(n[e]!==r[e])return!1;return!0}function qR(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[e];if(!t||!i||t.match!==i.match||t.type!==i.type||t.tokenEnv!==i.tokenEnv||t.usernameEnv!==i.usernameEnv||t.passwordEnv!==i.passwordEnv||t.headerName!==i.headerName||t.headerValueEnv!==i.headerValueEnv||t.allowInsecure!==i.allowInsecure||!KR(t.applyTo,i.applyTo))return!1}return!0}function JR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!UR(r.models,i.models)||!WR(r.params,i.params))return!1}return!0}function YR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!UR(r.models,i.models)||r.params.length!==i.params.length)return!1;for(let e=0;e<r.params.length;e+=1)if(r.params[e]!==i.params[e])return!1}return!0}function XR(e){if(typeof e==`number`)return{valueType:`number`,value:String(e)};if(typeof e==`boolean`)return{valueType:`boolean`,value:String(e)};if(e===null||typeof e==`object`)try{return{valueType:`json`,value:JSON.stringify(e,null,2)??`null`}}catch{return{valueType:`json`,value:StrLine truncated
|
||||
`).map(e=>e.trim()).filter(Boolean);e.length>0?t.setIn([`api-keys`],e):ER(t,[`api-keys`])&&t.deleteIn([`api-keys`]),lz(t)}if(i.has(`pluginsEnabled`)||i.has(`pluginStoreSources`)||a){if(DR(t,[`plugins`]),i.has(`pluginsEnabled`)&&kR(t,[`plugins`,`enabled`],r.pluginsEnabled),i.has(`pluginStoreSources`)&&jR(t,[`plugins`,`store-sources`],r.pluginStoreSources),a){let e=vz(r.pluginStoreAuth);e.length>0?t.setIn([`plugins`,`store-auth`],e):ER(t,[`plugins`,`store-auth`])&&t.deleteIn([`plugins`,`store-auth`])}OR(t,[`plugins`])}i.has(`debug`)&&kR(t,[`debug`],r.debug),i.has(`commercialMode`)&&kR(t,[`commercial-mode`],r.commercialMode),i.has(`loggingToFile`)&&kR(t,[`logging-to-file`],r.loggingToFile),i.has(`logsMaxTotalSizeMb`)&&MR(t,[`logs-max-total-size-mb`],r.logsMaxTotalSizeMb),i.has(`errorLogsMaxFiles`)&&MR(t,[`error-logs-max-files`],r.errorLogsMaxFiles),i.has(`usageStatisticsEnabled`)&&kR(t,[`usage-statistics-enabled`],r.usageStatisticsEnabled),i.has(`redisUsageQueueRetentionSeconds`)&&MR(t,[`redis-usage-queue-retention-seconds`],r.redisUsageQueueRetentionSeconds),i.has(`proxyUrl`)&&AR(t,[`proxy-url`],r.proxyUrl),i.has(`forceModelPrefix`)&&kR(t,[`force-model-prefix`],r.forceModelPrefix),i.has(`passthroughHeaders`)&&kR(t,[`passthrough-headers`],r.passthroughHeaders),i.has(`requestRetry`)&&MR(t,[`request-retry`],r.requestRetry),i.has(`maxRetryCredentials`)&&MR(t,[`max-retry-credentials`],r.maxRetryCredentials),i.has(`maxRetryInterval`)&&MR(t,[`max-retry-interval`],r.maxRetryInterval),i.has(`disableCooling`)&&kR(t,[`disable-cooling`],r.disableCooling),i.has(`disableImageGeneration`)&&NR(t,[`disable-image-generation`],r.disableImageGeneration),i.has(`gptImage2BaseModel`)&&AR(t,[`gpt-image-2-base-model`],r.gptImage2BaseModel),i.has(`authAutoRefreshWorkers`)&&MR(t,[`auth-auto-refresh-workers`],r.authAutoRefreshWorkers),i.has(`wsAuth`)&&kR(t,[`ws-auth`],r.wsAuth),i.has(`antigravitySignatureCacheEnabled`)&&(ER(t,[`antigravity-signature-cache-enabled`])||!r.antigravitySignatureCacheEnabled)&&t.setIn([`antigravity-signature-cache-enabled`],r.antigravitySignatureCacheEnabled),i.has(`antigravitySignatureBypassStrict`)&&kR(t,[`antigravity-signature-bypass-strict`],r.antigravitySignatureBypassStrict),(i.has(`claudeHeaderUserAgent`)||i.has(`claudeHeaderPackageVersion`)||i.has(`claudeHeaderRuntimeVersion`)||i.has(`claudeHeaderOs`)||i.has(`claudeHeaderArch`)||i.has(`claudeHeaderTimeout`)||i.has(`claudeHeaderStabilizeDeviceProfile`))&&(DR(t,[`claude-header-defaults`]),i.has(`claudeHeaderUserAgent`)&&AR(t,[`claude-header-defaults`,`user-agent`],r.claudeHeaderUserAgent),i.has(`claudeHeaderPackageVersion`)&&AR(t,[`claude-header-defaults`,`package-version`],r.claudeHeaderPackageVersion),i.has(`claudeHeaderRuntimeVersion`)&&AR(t,[`claude-header-defaults`,`runtime-version`],r.claudeHeaderRuntimeVersion),i.has(`claudeHeaderOs`)&&AR(t,[`claude-header-defaults`,`os`],r.claudeHeaderOs),i.has(`claudeHeaderArch`)&&AR(t,[`claude-header-defaults`,`arch`],r.claudeHeaderArch),i.has(`claudeHeaderTimeout`)&&AR(t,[`claude-header-defaults`,`timeout`],r.claudeHeaderTimeout),i.has(`claudeHeaderStabilizeDeviceProfile`)&&kR(t,[`claude-header-defaults`,`stabilize-device-profile`],r.claudeHeaderStabilizeDeviceProfile),OR(t,[`claude-header-defaults`])),(i.has(`codexHeaderUserAgent`)||i.has(`codexHeaderBetaFeatures`))&&(DR(t,[`codex-header-defaults`]),i.has(`codexHeaderUserAgent`)&&AR(t,[`codex-header-defaults`,`user-agent`],r.codexHeaderUserAgent),i.has(`codexHeaderBetaFeatures`)&&AR(t,[`codex-header-defaults`,`beta-features`],r.codexHeaderBetaFeatures),OR(t,[`codex-header-defaults`])),(i.has(`quotaSwitchProject`)||i.has(`quotaSwitchPreviewModel`)||i.has(`quotaAntigravityCredits`))&&(DR(t,[`quota-exceeded`]),i.has(`quotaSwitchProject`)&&t.setIn([`quota-exceeded`,`switch-project`],r.quotaSwitchProject),i.has(`quotaSwitchPreviewModel`)&&t.setIn([`quota-exceeded`,`switch-preview-model`],r.quotaSwitchPreviewModel),i.has(`quotaAntigravityCredits`)&&t.setIn([`quota-exceeded`,`antigravity-credits`],r.quotaAntigravityCredits),OR(t,[`quota-exceeded`])),(i.has(`routingStrategy`)||i.has(`routingSessionAffinity`)||i.has(`routingSessionAffinityTTL`))&&(DR(t,[`routing`]),i.has(`routingStrategy`)&&t.setIn([`routing`,`strategy`],r.routingStrategy),i.has(`routingSessionAffinity`)&&kR(t,[`routing`,`session-affinity`],r.routingSessionAffinity),i.has(`routingSessionAffinityTTL`)&&AR(t,[`routing`,`session-affinity-ttl`],r.routingSessionAffinityTTL),OR(t,[`routing`]));let o=typeof r.streaming?.keepaliveSeconds==`string`?r.streaming.keepaliveSeconds:``,s=typeof r.streaming?.bootstrapRetries==`string`?r.streaming.bootstrapRetries:``,c=typeof r.streaming?.nonstreamKeepaliveInterval==`string`?r.streaming.nonstreamKeepaliveInterval:``;return(i.has(`streaming.keepaliveSeconds`)||i.has(`streaming.bootstrapRetries`))&&(DR(t,[`streaming`]),i.has(`streaming.keepaliveSeconds`)&&MR(t,[`streaming`,`keepalive-seconds`],o),i.has(`streaming.bootstrapRetries`)&&MR(t,[`streaming`,`bootstrap-retrieLine truncated
|
||||
`).map(e=>e.trim()).filter(Boolean),[e]),[o,s]=(0,y.useState)(()=>a.map(()=>bR())),c=(0,y.useMemo)(()=>o.length===a.length?o:o.length>a.length?o.slice(0,a.length):[...o,...Array.from({length:a.length-o.length},()=>bR())],[o,a.length]),l=(0,y.useId)(),u=`${l}-hint`,d=`${l}-error`,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(``);function x(){let e=new Uint8Array(17);return crypto.getRandomValues(e),`sk-`+Array.from(e,e=>`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[e%62]).join(``)}let S=()=>{h(null),_(``),b(``),p(!0)},C=e=>{let t=c.findIndex(t=>t===e);h(e),_(a[t]??``),b(``),p(!0)},w=()=>{p(!1),_(``),h(null),b(``)},T=e=>{n(e.join(`
|
||||
`))},E=e=>{let t=c.findIndex(t=>t===e);t<0||(s(c.filter(t=>t!==e)),T(a.filter((e,n)=>n!==t)))},D=()=>{let e=g.trim();if(!e){b(r(`config_management.visual.api_keys.error_empty`));return}if(!Az(e)){b(r(`config_management.visual.api_keys.error_invalid`));return}let t=m?c.findIndex(e=>e===m):-1,n=m===null?[...a,e]:a.map((n,r)=>r===t?e:n);m===null&&s([...c,bR()]),T(n),w()},O=async e=>{let t=await QD(e);i(r(t?`notification.link_copied`:`notification.copy_failed`),t?`success`:`error`)};return(0,H.jsxs)(`div`,{className:`form-group`,style:{marginBottom:0},children:[(0,H.jsxs)(`div`,{className:Y.blockHeaderRow,children:[(0,H.jsx)(`label`,{style:{margin:0},children:r(`config_management.visual.api_keys.label`)}),(0,H.jsx)(U,{size:`sm`,onClick:S,disabled:t,children:r(`config_management.visual.api_keys.add`)})]}),a.length===0?(0,H.jsx)(`div`,{className:Y.emptyState,children:r(`config_management.visual.api_keys.empty`)}):(0,H.jsx)(`div`,{className:`item-list`,style:{marginTop:4},children:a.map((e,n)=>(0,H.jsxs)(`div`,{className:`item-row`,children:[(0,H.jsxs)(`div`,{className:`item-meta`,children:[(0,H.jsxs)(`div`,{className:`pill`,children:[`#`,n+1]}),(0,H.jsx)(`div`,{className:`item-title`,children:r(`config_management.visual.api_keys.input_label`)}),(0,H.jsx)(`div`,{className:`item-subtitle`,children:Fh(String(e||``))})]}),(0,H.jsxs)(`div`,{className:`item-actions`,children:[(0,H.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>O(e),disabled:t,children:r(`common.copy`)}),(0,H.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>C(c[n]??``),disabled:t,children:r(`config_management.visual.common.edit`)}),(0,H.jsx)(U,{variant:`danger`,size:`sm`,onClick:()=>E(c[n]??``),disabled:t,children:r(`config_management.visual.common.delete`)})]})]},c[n]??`${e}-${n}`))}),(0,H.jsx)(`div`,{className:`hint`,children:r(`config_management.visual.api_keys.hint`)}),(0,H.jsx)(ym,{open:f,onClose:w,title:r(m===null?`config_management.visual.api_keys.add_title`:`config_management.visual.api_keys.edit_title`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{variant:`secondary`,onClick:w,disabled:t,children:r(`config_management.visual.common.cancel`)}),(0,H.jsx)(U,{onClick:D,disabled:t,children:r(m===null?`config_management.visual.common.add`:`config_management.visual.common.update`)})]}),children:(0,H.jsxs)(`div`,{className:`form-group`,children:[(0,H.jsx)(`label`,{htmlFor:l,children:r(`config_management.visual.api_keys.input_label`)}),(0,H.jsxs)(`div`,{className:Y.apiKeyModalInputRow,children:[(0,H.jsx)(`input`,{id:l,className:`input`,placeholder:r(`config_management.visual.api_keys.input_placeholder`),value:g,onChange:e=>_(e.target.value),disabled:t,"aria-describedby":v?`${d} ${u}`:u,"aria-invalid":!!v}),(0,H.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{_(x()),b(``)},disabled:t,children:r(`config_management.visual.api_keys.generate`)})]}),(0,H.jsx)(`div`,{id:u,className:`hint`,children:r(`config_management.visual.api_keys.input_hint`)}),v&&(0,H.jsx)(`div`,{id:d,className:`error-box`,children:v})]})})]})}),Iz=(0,y.memo)(function({value:e,disabled:t,placeholder:n,inputAriaLabel:r,onChange:i}){let{t:a}=ss(),o=e.length?e:[],[s,c]=(0,y.useState)(()=>o.map(()=>bR())),l=(0,y.useMemo)(()=>s.length===o.length?s:s.length>o.length?s.slice(0,o.length):[...s,...Array.from({length:o.length-s.length},()=>bR())],[s,o.length]),u=(e,t)=>i(o.map((n,r)=>r===e?t:n)),d=()=>{c([...l,bR()]),i([...o,``])},f=e=>{c(l.filter((t,n)=>n!==e)),i(o.filter((t,n)=>n!==e))};return(0,H.jsxs)(`div`,{className:Y.stringList,children:[o.map((e,i)=>(0,H.jsxs)(`div`,{className:Y.stringListRow,children:[(0,H.jsx)(Mz,{placeholder:n,ariaLabel:r??n,value:e,onChange:e=>u(i,e),disabled:t}),(0,H.jsx)(U,{variant:`ghost`,size:`sm`,onClick:()=>f(i),disabled:t,children:a(`config_management.visual.common.delete`)})]},l[i]??`item-${i}`)),(0,H.jsx)(`div`,{className:Y.actionRow,children:(0,H.jsx)(U,{variant:`secondary`,size:`sm`,onClick:d,disabled:t,children:a(`config_management.visual.common.add`)})})]})}),Lz=[{value:`bearer`,labelKey:`config_management.visual.sections.system.store_auth_type_bearer`},{value:`github-token`,labelKey:`config_management.visual.sections.system.store_auth_type_github_token`},{value:`basic`,labelKey:`config_management.visual.sections.system.store_auth_type_basic`},{value:`header`,labelKey:`config_management.visual.sections.system.store_auth_type_header`},{value:`none`,labelKey:`config_management.visual.sections.system.store_auth_type_none`}],Rz=[{value:`registry`,labelKey:`config_management.visual.sections.system.store_auth_apply_registry`},{value:`metadata`,labelKey:`config_management.visual.sections.system.store_auth_apply_metadata`},{value:`artifact`,labelKey:`config_management.visual.sections.system.store_auth_apply_artifact`}],zz=()=>({id:bR(),match:``,applyTo:[],type:`bearer`,tokenEnv:``,usernameEnv:``,passwordEnv:``,headerName:``,headerValueEnv:``,allowInsecure:!1}),Bz=(0,y.memo)(function({value:e,disabled:t,onChange:n}){let{t:r}=ss(),i=(t,r)Line truncated
|
||||
`){[e,t]=bB(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},uV=class e extends cV{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=bB(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
||||
`){[e,t]=bB(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new lV(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof lV&&c&&(n=u[u.length-1])instanceof lV&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new lV(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}},cV.empty=new lV([``],0),dV=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof lV?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof lV?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(r instanceof lV){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof lV?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},fV=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new dV(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},pV=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}},typeof Symbol<`u`&&(cV.prototype[Symbol.iterator]=function(){return this.iter()},dV.prototype[Symbol.iterator]=fV.prototype[Symbol.iterator]=pV.prototype[Symbol.iterator]=function(){return this}),mV=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}},hV=/\r\n?|\n/,gV=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(gV||(gV={})),_V=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){kB(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:jB(this,e)}mapDesc(e,t=!1){return e.empty?this:AB(this,e,t)}mapPos(e,t=-1,n=gV.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=gV.Simple&&c>=e&&(n==gV.TrackDel&&r<e&&c>e||n==gV.TrackBefore&&r<e||n==gV.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},vV=class e extends _V{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return kB(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return AB(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(cV.empty);r.push(a?t.slice(i,i+a):cV.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:jB(this,e,!0)}map(e,t=!1){return e.empty?this:AB(this,e,t,!0)}iterChanges(e,t=!1){kB(this,e,t)}get desc(){return _V.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new yV(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);DB(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;DB(n,e,t),t>0&&OB(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);DB(n,e,-1),DB(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:_V.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+Line truncated
|
||||
`}get readOnly(){return this.facet(RV)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(MV))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return YB(this.languageDataAt(`wordChars`,e).join(``))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=xB(t,a,!1);if(i(t.slice(e,a))!=GV.Word)break;a=e}for(;o<r;){let e=xB(t,o);if(i(t.slice(o,e))!=GV.Word)break;o=e}return a==o?null:Z.range(a+n,o+n)}},JV.allowMultipleSelections=NV,JV.tabSize=SV.define({combine:e=>e.length?e[0]:4}),JV.lineSeparator=PV,JV.readOnly=RV,JV.phrases=SV.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),JV.languageData=MV,JV.changeFilter=FV,JV.transactionFilter=IV,JV.transactionExtender=LV,kV.reconfigure=HV.define(),YV=class{eq(e){return this==e}range(e,t=e){return XV.create(e,t,this)}},YV.prototype.startSide=YV.prototype.endSide=0,YV.prototype.point=!1,YV.prototype.mapMode=gV.TrackDel,XV=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}},ZV=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},QV=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(ZB)),this.isEmpty)return n.length?e.of(n):this;let s=new eH(this,null,-1).goto(0),c=0,l=[],u=new $V;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(XV.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return tH.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return tH.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=$B(a,o,n),c=new nH(a,s,i),l=new nH(o,s,i);n.iterGaps((e,t,n)=>tV(c,e,l,t,n,r)),n.empty&&n.length==0&&tV(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=$B(i,a),s=new nH(i,o,0).goto(n),c=new nH(a,o,0).goto(n);for(;;){if(s.to!=c.to||!nV(s.activeLine truncated
|
||||
`)}static newName(){let e=sH[aH]||1;return sH[aH]=e+1,iH+e.toString(36)}static mount(e,t,n){let r=e[oH],i=n&&n.nonce;r?i&&r.setNonce(i):r=new uH(e,i),r.mount(Array.isArray(t)?t:[t],e)}},lH=new Map,uH=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=lH.get(n);if(t)return e[oH]=t;this.sheet=new r.CSSStyleSheet,lH.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[oH]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
||||
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}}}));function fH(e){var t=!(hH&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||gH&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?mH:pH)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var pH,mH,hH,gH,_H,vH=o((()=>{for(pH={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},mH={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},hH=typeof navigator<`u`&&/Mac/.test(navigator.platform),gH=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),_H=0;_H<10;_H++)pH[48+_H]=pH[96+_H]=String(_H);for(_H=1;_H<=24;_H++)pH[_H+111]=`F`+_H;for(_H=65;_H<=90;_H++)pH[_H]=String.fromCharCode(_H+32),mH[_H]=String.fromCharCode(_H);for(var e in pH)mH.hasOwnProperty(e)||(mH[e]=pH[e])}));function yH(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)bH(e,arguments[t]);return e}function bH(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)bH(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}var xH=o((()=>{}));function SH(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function CH(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function wH(e,t){if(!t.anchorNode)return!1;try{return CH(e,t.anchorNode)}catch{return!1}}function TH(e){return e.nodeType==3?LH(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function EH(e,t,n,r){return n?kH(e,t,n,r,-1)||kH(e,t,n,r,1):!1}function DH(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function OH(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function kH(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:AH(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=DH(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?AH(e):0}else return!1}}function AH(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function jH(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function MH(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function NH(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function PH(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=MH(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=NH(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0Line truncated
|
||||
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function KU(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==GV.Space&&(i=t),i==t}}function qU(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return Z.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(l)o??(o=l.left-c.left),s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??(o=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from))),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=r??e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(f+t)*a,r=RU(e,{x:d,y:n},!1,a);if(n<c.top||n>c.bottom||(a<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return Z.cursor(r,i,void 0,o)}}}function JU(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function YU(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=JU(e,i.from,0);t!=i.from&&(a=Z.cursor(t,-1))}else{let t=JU(e,i.from,-1),n=JU(e,i.to,1);(t!=i.from||n!=i.to)&&(a=Z.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?Z.create(n,t.mainIndex):t}function XU(e,t,n){let r=JU(e.state.facet(eq).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:Z.cursor(r,r<n.from?1:-1)}function ZU(e,t,n){for(;;){if(!t||n<AH(t))return!1;if(t==e)return!0;n=DH(t)+1,t=t.parentNode}}function QU(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=eK.get(e);if(!(t?.isWidget||e.cmIgnore))return!1;t&&(n||(n=[])).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}function $U(e,t){let n,{newSel:r}=t,i=e.state.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,c=null;(a===8||JG.android&&t.text.length<o-r)&&(s=i.to,c=`end`);let l=nW(e.state.doc.sliceString(r,o,cq),t.text,s-r,c);l&&(JG.chrome&&a==13&&l.toB==l.from+2&&t.text.slice(l.from,l.toB)==``&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:cV.of(t.text.slice(l.from,l.toB).split(cq))})}else r&&(!e.hasFocus&&e.state.facet(GK)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:(JG.mac||JG.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:cV.of([n.insert.toString().replace(`.`,` `)])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:e.state.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:e.state.toText(e.inputState.insertingText)}:JG.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
||||
`&&e.lineWrapping&&(r&&(r=Z.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:cV.of([` `])}),n)return eW(e,n,r,a);if(r&&!r.main.eq(i)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=YU(e.state.facet(eq).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function eW(e,t,n,r=-1){if(JG.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(JG.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&RH(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&RH(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&RH(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||(o=tW(e,t,n));return e.state.facet(FK).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function tW(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=JU(i.facet(eq).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:Z.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&wU(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?Z.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function nW(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function rW(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new uq(n,r)),(i!=n||a!=r)&&t.push(new uq(i,a))),t}function iW(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?Z.single(n+t,r+t):null}function aW(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){bU(n.state,e)}}}function oW(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(aW(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(aW(t.value,r))}}for(let e in vq)n(e).handlers.push(vq[e]);for(let e in yq)n(e).observers.push(yq[e]);return t}function sW(e){return Math.max(0,e)*.7+8}function cW(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}function lW(e,t){let n=e.state.facet(AK);return n.length?n[0](t):JG.mac?t.metaKey:t.ctrlKey}function uW(e,t){let n=e.state.facet(jK);return n.length?n[0](t):JG.mac?!t.altKey:!t.ctrlKey}function dW(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=SH(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function fW(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=eK.get(n))&&r.ignoreEvent(t))return!1;return!0}function pW(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`tLine truncated
|
||||
`))};if((JG.mac||JG.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:cV.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);eW(e,u,Z.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(uK.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:WK.of(uK.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=SH(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},sJ=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureReLine truncated
|
||||
--\u2028\u2029-]`,kJ),jJ={0:`null`,7:`bell`,8:`backspace`,10:`newline`,11:`vertical tab`,13:`carriage return`,27:`escape`,8203:`zero width space`,8204:`zero width non-joiner`,8205:`zero width joiner`,8206:`left-to-right mark`,8207:`right-to-left mark`,8232:`line separator`,8237:`left-to-right override`,8238:`right-to-left override`,8294:`left-to-right isolate`,8295:`right-to-left isolate`,8297:`pop directional isolate`,8233:`paragraph separator`,65279:`zero width no-break space`,65532:`object replacement`},MJ=null,NJ=SV.define({combine(e){let t=XB(e,{render:null,specialChars:AJ,addSpecialChars:null});return(t.replaceTabs=!cG())&&(t.specialChars=RegExp(` |`+t.specialChars.source,kJ)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+`|`+t.addSpecialChars.source,kJ)),t}}),PJ=null,FJ=`•`,IJ=class extends cK{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=dG(this.code),n=e.state.phrase(`Control character`)+` `+(jJ[this.code]||`0x`+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement(`span`);return i.textContent=t,i.title=n,i.setAttribute(`aria-label`,n),i.className=`cm-specialChar`,i}ignoreEvent(){return!1}},LJ=class extends cK{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement(`span`);return e.textContent=` `,e.className=`cm-tab`,e.style.width=this.width+`px`,e}ignoreEvent(){return!1}},RJ=uK.line({class:`cm-activeLine`}),zJ=JK.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(RJ.range(i.from)),t=i.from)}return uK.set(n)}},{decorations:e=>e.decorations}),BJ=class extends cK{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?TH(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=jH(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}},VJ=2e3,HJ={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},UJ={style:`cursor: crosshair`},WJ=`-10000px`,GJ=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)a[n]=this.createTooltipView(r,n?a[n-1]:null),o&&(o[n]=!!r.above);else{let r=a[n]=this.tooltipViews[s];o&&(o[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)a.indexOf(e)<0&&(this.removeTooltipView(e),(n=e.destroy)==null||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}},KJ=SV.define({combine:e=>({position:JG.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||bG})}),qJ=new WeakMap,JJ=JK.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(KJ);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new GJ(e,ZJ,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parentLine truncated
|
||||
`)),r=cV.of(t.split(`
|
||||
`)),i=s$.build(n,r),a=0,o=0;return{hunks:i.map(e=>{let t=[],i=e.fromA<e.toA,s=e.fromB<e.toB,c=[];if(i){let t=n.lineAt(e.fromA).number,r=n.lineAt(e.toA-1).number;for(let e=t;e<=r;e++)c.push({num:e,text:n.line(e).text})}let l=[];if(s){let t=r.lineAt(e.fromB).number,n=r.lineAt(e.toB-1).number;for(let e=t;e<=n;e++)l.push({num:e,text:r.line(e).text})}o+=c.length,a+=l.length;let u,d,f,p;if(i)u=c[0].num-1,d=c[c.length-1].num+1;else{let t=_$(n,e.fromA),r=n.lineAt(t);e.fromA===r.from?(u=r.number-1,d=r.number):(u=r.number,d=r.number+1)}if(s)f=l[0].num-1,p=l[l.length-1].num+1;else{let t=_$(r,e.fromB),n=r.lineAt(t);e.fromB===n.from?(f=n.number-1,p=n.number):(f=n.number,p=n.number+1)}let m=Math.min(g$,Math.max(0,u),Math.max(0,f));for(let e=m;e>0;e--){let r=u-e+1,i=f-e+1;r>=1&&i>=1&&r<=n.lines&&t.push({type:`context`,oldNum:r,newNum:i,text:n.line(r).text})}for(let e of c)t.push({type:`deletion`,oldNum:e.num,newNum:null,text:e.text});for(let e of l)t.push({type:`addition`,oldNum:null,newNum:e.num,text:e.text});let h=Math.max(0,Math.min(g$,n.lines-d+1)),g=Math.max(0,Math.min(g$,r.lines-p+1)),_=Math.min(h,g);for(let e=0;e<_;e++){let i=d+e,a=p+e;i>=1&&i<=n.lines&&a>=1&&a<=r.lines&&t.push({type:`context`,oldNum:i,newNum:a,text:n.line(i).text})}let v=t.find(e=>e.oldNum!==null)?.oldNum??1,y=t.find(e=>e.newNum!==null)?.newNum??1;return{oldStart:v,oldCount:t.filter(e=>e.type!==`addition`).length,newStart:y,newCount:t.filter(e=>e.type!==`deletion`).length,lines:t}}),additions:a,deletions:o}}var y$=5;function b$({additions:e,deletions:t}){let n=e+t;if(n===0)return null;let r=Math.round(e/n*y$);return(0,H.jsx)(`span`,{className:h$.statBar,children:Array.from({length:y$},(e,t)=>(0,H.jsx)(`span`,{className:`${h$.statBlock} ${t<r?h$.statBlockAdd:h$.statBlockDel}`},t))})}function x$({open:e,original:t,modified:n,onConfirm:r,onCancel:i,loading:a=!1}){let{t:o}=ss(),s=(0,y.useMemo)(()=>v$(t,n),[t,n]);return(0,H.jsx)(ym,{open:e,title:o(`config_management.diff.title`),onClose:i,width:`min(1200px, 90vw)`,className:h$.diffModal,closeDisabled:a,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{variant:`secondary`,onClick:i,disabled:a,children:o(`common.cancel`)}),(0,H.jsx)(U,{onClick:r,loading:a,disabled:a,children:o(`config_management.diff.confirm`)})]}),children:(0,H.jsx)(`div`,{className:h$.content,children:s.hunks.length===0?(0,H.jsx)(`div`,{className:h$.emptyState,children:o(`config_management.diff.no_changes`)}):(0,H.jsxs)(`div`,{className:h$.diffContainer,children:[(0,H.jsxs)(`div`,{className:h$.fileHeader,children:[(0,H.jsx)(`svg`,{className:h$.fileIcon,viewBox:`0 0 16 16`,width:`16`,height:`16`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z`,fill:`currentColor`})}),(0,H.jsx)(`span`,{className:h$.fileName,children:`config.yaml`}),(0,H.jsxs)(`span`,{className:h$.fileStats,children:[(0,H.jsxs)(`span`,{className:h$.statAdditions,children:[`+`,s.additions]}),(0,H.jsxs)(`span`,{className:h$.statDeletions,children:[`-`,s.deletions]}),(0,H.jsx)(b$,{additions:s.additions,deletions:s.deletions})]})]}),(0,H.jsx)(`div`,{className:h$.diffBody,children:s.hunks.map((e,t)=>(0,H.jsxs)(`div`,{className:h$.hunk,children:[(0,H.jsxs)(`div`,{className:h$.hunkHeader,children:[(0,H.jsx)(`span`,{className:h$.hunkGutter,children:(0,H.jsx)(`svg`,{className:h$.hunkExpandIcon,viewBox:`0 0 16 16`,width:`12`,height:`12`,children:(0,H.jsx)(`path`,{d:`M8.177 1.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V5H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0zM7.25 11.75a.75.75 0 011.5 0V13h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 13H7.25v-1.25z`,fill:`currentColor`})})}),(0,H.jsx)(`span`,{className:h$.hunkGutter}),(0,H.jsxs)(`span`,{className:h$.hunkText,children:[`@@ -`,e.oldStart,`,`,e.oldCount,` +`,e.newStart,`,`,e.newCount,` @@`]})]}),e.lines.map((e,n)=>(0,H.jsxs)(`div`,{className:`${h$.diffLine} ${h$[e.type]}`,children:[(0,H.jsx)(`span`,{className:`${h$.lineNum} ${e.oldNum===null?h$.lineNumEmpty:``}`,children:e.oldNum??``}),(0,H.jsx)(`span`,{className:`${h$.lineNum} ${e.newNum===null?h$.lineNumEmpty:``}`,children:e.newNum??``}),(0,H.jsx)(`span`,{className:h$.linePrefix,children:e.type===`deletion`?`-`:e.type===`addition`?`+`:` `}),(0,H.jsx)(`code`,{className:h$.lineText,children:e.text||` `})]},`${t}-${n}`))]},t))})]})})})}var S$={container:`ConfigPage-module__container___5kN-Y`,pageHeader:`ConfigPage-module__pageHeader___Zulyi`,pageHeaderCopy:`ConfigPage-module__pageHeaderCopy___fiTfJ`,pageTitle:`ConfigPage-module__pageTitle___BoVLE`,tabBar:`ConfigPage-module__tabBar___PelpE`,tabItem:`ConfigPage-module__tabItem___Uj1rU`,tabActive:`ConfigPage-module__tabActive___sZLh-Line truncated
|
||||
`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new W2(this):new U2(this)}getCursor(e,t=0,n){let r=e.doc?e:JV.create({doc:e});return n??(n=r.doc.length),this.regexp?l2(this,r,t,n):s2(this,r,t,n)}},H2=class{constructor(e){this.spec=e}},U2=class extends H2{constructor(e){super(e)}nextMatch(e,t,n){let r=s2(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=s2(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=s2(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=s2(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=s2(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},W2=class extends H2{nextMatch(e,t,n){let r=l2(this.spec,e,n,e.doc.length).next();return r.done&&(r=l2(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=l2(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=l2(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=l2(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},G2=HV.define(),K2=HV.define(),q2=TV.define({create(e){return new J2(h2(e).create(),null)},update(e,t){for(let n of t.effects)n.is(G2)?e=new J2(n.value.create(),e.panel):n.is(K2)&&(e=new J2(e.query,n.value?m2:null));return e},provide:e=>sY.from(e,e=>e.panel)}),J2=class{constructor(e,t){this.query=e,this.panel=t}},Y2=uK.mark({class:`cm-searchMatch`}),X2=uK.mark({class:`cm-searchMatch cm-searchMatch-selected`}),Z2=JK.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(q2))}update(e){let t=e.state.field(q2);(t!=e.startState.field(q2)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return uK.none;let{view:n}=this,r=new $V;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?X2:Y2)})}return r.finish()}},{decorations:e=>e.decorations}),Q2=p2((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=Z.single(r.from,r.to),a=e.state.facet(B2);return e.dispatch({selection:i,effects:[y2(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),_2(e),!0}),$2=p2((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=Z.single(i.from,i.to),o=e.state.facet(B2);return e.dispatch({selection:a,effects:[y2(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),_2(e),!0}),e4=p2((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:Z.create(n.map(e=>Z.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),t4=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new x2(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(Z.range(t.value.from,t.value.to))}return t(e.update({selection:Z.create(a,o),userEvent:`select.search.matches`})),!0},n4=p2((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(sJ.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=Z.single(o.from,o.to).map(d),u.push(y2(e,o)),u.push(n.facet(B2).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effecLine truncated
|
||||
`);WA({filename:`logs.txt`,blob:new Blob([n],{type:`text/plain`})}),t(e(`logs.download_success`),`success`)},Ce=async()=>{if(r!==`connected`){ee(!1);return}ee(!0),F(``);try{let e=await Fy.fetchErrorLogs();M(Array.isArray(e.files)?e.files:[])}catch(t){console.error(`Failed to load error logs:`,t),M([]);let n=Ec(t);F(n?`${e(`logs.error_logs_load_error`)}: ${n}`:e(`logs.error_logs_load_error`))}finally{ee(!1)}},we=async n=>{try{let r=await Fy.downloadErrorLog(n);WA({filename:n,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.error_log_download_success`),`success`)}catch(n){let r=Ec(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}},Te=async t=>{let n=le.current+1;le.current=n,L(t),z(``),B(``),ne(!0);try{let e=await I7((await Fy.downloadErrorLog(t.name)).data);if(le.current!==n)return;z(e)}catch(t){if(le.current!==n)return;let r=Ec(t);B(r?`${e(`logs.error_log_open_failed`)}: ${r}`:e(`logs.error_log_open_failed`))}finally{le.current===n&&ne(!1)}},Ee=()=>{le.current+=1,L(null),z(``),B(``),ne(!1)},De=async()=>{let n=await QD(R);t(n?e(`logs.error_log_copy_success`):e(`logs.copy_failed`,{defaultValue:`Copy failed`}),n?`success`:`error`)};(0,y.useEffect)(()=>{r===`connected`&&(me(),l(!1),be(!1))},[r,o]),(0,y.useEffect)(()=>{d===`errors`&&r===`connected`&&Ce()},[d,r,a]),(0,y.useEffect)(()=>{if(!b||r!==`connected`||u)return;let e=window.setInterval(()=>{be(!0)},8e3);return()=>window.clearInterval(e)},[b,r,u]);let Oe=(0,y.useMemo)(()=>p.buffer.slice(p.visibleFrom),[p.buffer,p.visibleFrom]),ke=w.trim(),Ae=ke.length>0,je=Ae?p.buffer:Oe,Me=(0,y.useMemo)(()=>{let e=je;if(T&&(e=e.filter(e=>!e.includes(Ac))),ke){let t=ke.toLowerCase();e=e.filter(e=>e.toLowerCase().includes(t))}return e.map(e=>y7(e))},[je,T,ke]),Ne=x7({parsedLines:Me}),Pe=`logs-structured-filters`,Fe=Ne.methodFilters.length+Ne.statusFilters.length+Ne.pathFilters.length,{filteredParsedLines:Ie,filteredLines:Le,removedCount:Re}=(0,y.useMemo)(()=>{let e=Me.filter(e=>{if(Ne.methodFilterSet.size>0&&(!e.method||!Ne.methodFilterSet.has(e.method)))return!1;let t=Q5(e.statusCode);return!(Ne.statusFilterSet.size>0&&(!t||!Ne.statusFilterSet.has(t))||Ne.pathFilterSet.size>0&&(!e.path||!Ne.pathFilterSet.has(e.path)))});return{filteredParsedLines:e,filteredLines:e.map(e=>e.raw),removedCount:Math.max(je.length-e.length,0)}},[je,Ne.methodFilterSet,Ne.pathFilterSet,Ne.statusFilterSet,Me]),ze=(0,y.useMemo)(()=>D?[]:Ie,[Ie,D]),Be=(0,y.useMemo)(()=>Le.join(`
|
||||
`),[Le]),{canLoadMore:Ve,handleLogScroll:He,logViewerRef:Ue,requestScrollToBottom:We}=T7({logState:p,setLogState:m,loading:h,isSearching:Ae,filteredLineCount:Le.length,hasStructuredFilters:Ne.hasStructuredFilters,showRawLogs:D}),Ge=async n=>{await QD(n)?t(e(`logs.copy_success`,{defaultValue:`Copied to clipboard`}),`success`):t(e(`logs.copy_failed`,{defaultValue:`Copy failed`}),`error`)},Ke=()=>{ue.current?.timer&&(window.clearTimeout(ue.current.timer),ue.current.timer=null)},qe=(e,t)=>{a&&t&&(re||(Ke(),ue.current={timer:window.setTimeout(()=>{ie(t),ue.current&&(ue.current.fired=!0,ue.current.timer=null)},O7),startX:e.clientX,startY:e.clientY,fired:!1}))},Je=()=>{Ke(),ue.current=null},Ye=e=>{let t=ue.current;if(!t||t.timer===null||t.fired)return;let n=Math.abs(e.clientX-t.startX),r=Math.abs(e.clientY-t.startY);(n>k7||r>k7)&&Je()},Xe=()=>{ae||ie(null)},Ze=async n=>{oe(!0);try{let r=await Fy.downloadRequestLogById(n);WA({filename:`request-${n}.log`,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.request_log_download_success`),`success`),ie(null)}catch(n){let r=Ec(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}finally{oe(!1)}};return(0,y.useEffect)(()=>()=>{ue.current?.timer&&(window.clearTimeout(ue.current.timer),ue.current.timer=null)},[]),(0,y.useEffect)(()=>{if(!se)return;document.body.classList.add(`logs-fullscreen-active`),hm();let e=e=>{e.key===`Escape`&&(document.querySelector(`.modal-overlay`)||ce(!1))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),document.body.classList.remove(`logs-fullscreen-active`),gm()}},[se]),(0,H.jsxs)(`div`,{className:$.container,children:[(0,H.jsx)(`h1`,{className:$.pageTitle,children:e(`logs.title`)}),(0,H.jsxs)(`div`,{className:$.tabBar,children:[(0,H.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${d===`logs`?$.tabActive:``}`,onClick:()=>f(`logs`),children:e(`logs.log_content`)}),(0,H.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${d===`errors`?$.tabActive:``}`,onClick:()=>{ce(!1),f(`errors`)},children:e(`logs.error_logs_modal_title`)})]}),(0,H.jsxs)(`div`,{className:$.content,children:[d===`logs`&&(0,H.jsxs)(Ij,{className:[$.logCard,se?$.logCardFullscreen:``].filter(Boolean).join(` `),children:[u&&(0,H.jsx)(`div`,{className:`status-badge warning`,children:e(s?`logs.cpa_file_logging_required`:`logs.file_logging_required`)}),_&&(0,H.jsx)(`div`,{className:`error-box`,children:_}),(0,H.jsxs)(`div`,{className:$.filters,children:[!se&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:$.searchWrapper,children:(0,H.jsx)(us,{value:S,onChange:e=>C(e.target.value),placeholder:e(`logs.search_placeholder`),className:$.searchInput,rightElement:S?(0,H.jsx)(`button`,{type:`button`,className:$.searchClear,onClick:()=>C(``),title:`Clear`,"aria-label":`Clear`,children:(0,H.jsx)(zs,{size:16})}):(0,H.jsx)(Rs,{size:16,className:$.searchIcon})})}),(0,H.jsx)(`div`,{className:$.filterPanelHeader,children:(0,H.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,className:$.filterPanelToggle,onClick:()=>A(e=>!e),"aria-expanded":k,"aria-controls":Pe,title:e(k?`logs.filter_panel_collapse`:`logs.filter_panel_expand`),children:(0,H.jsxs)(`span`,{className:$.filterPanelButtonContent,children:[(0,H.jsx)(fs,{size:16}),(0,H.jsx)(`span`,{children:e(`logs.filter_panel_title`)}),Fe>0&&(0,H.jsx)(`span`,{className:$.filterPanelCount,children:e(`logs.filter_panel_active_count`,{count:Fe})}),k?(0,H.jsx)(Fs,{size:16}):(0,H.jsx)(Is,{size:16})]})})})]}),!se&&k&&(0,H.jsxs)(`div`,{id:Pe,className:$.structuredFilters,children:[(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_method`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:X5.map(e=>{let t=Ne.methodFilters.includes(e),n=Ne.methodCounts[e]??0;return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${t?$.filterChipActive:``}`,onClick:()=>Ne.toggleMethodFilter(e),disabled:n===0&&!t,"aria-pressed":t,children:[e,` (`,n,`)`]},e)})})]}),(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_status`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:Z5.map(t=>{let n=Ne.statusFilters.includes(t),r=Ne.statusCounts[t]??0;return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActive:``}`,onClick:()=>Ne.toggleStatusFilter(t),disabled:r===0&&!n,"aria-pressed":n,children:[e(`logs.filter_status_${t}`),` (`,r,`)`]},t)})})]}),(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_path`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:Ne.pathOptions.length===0?(0,H.jsx)(`span`,{className:$.filterChipHint,children:e(`logs.filter_path_empty`)}):Ne.pathOptions.map(({path:e,count:t})=>{let n=Ne.pathFilters.includes(e);return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActive:``Line truncated
|
||||
<style rel="stylesheet" crossorigin>*,:before,:after{box-sizing:border-box;margin:0;padding:0}html,body{width:100%;height:100%}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5}#root{width:100%;height:100%}button,input,textarea,select{font:inherit}a{color:inherit;text-decoration:none}ul,ol{list-style:none}:root{--bg-secondary:#faf9f5;--bg-primary:#f0eee8;--bg-tertiary:#e9e6df;--bg-hover:var(--bg-tertiary);--bg-quinary:#f6f4ee;--bg-error-light:#c657461a;--floating-surface:#fffdf9;--floating-shadow:0 12px 26px #00000024;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e3e1db;--border-secondary:var(--border-color);--border-primary:#d5d2cb;--border-hover:#cecac4;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary);--glass-blur:12px;--glass-backdrop-filter:blur(var(--glass-blur));--glass-filter:blur(var(--glass-blur));--glass-bg:color-mix(in srgb, var(--bg-primary) 82%, transparent);--glass-bg-secondary:color-mix(in srgb, var(--bg-secondary) 82%, transparent);--glass-border:color-mix(in srgb, var(--border-color) 60%, transparent);--viz-success:#10b981;--viz-failure:#c65746;--ease-out-strong:cubic-bezier(.23, 1, .32, 1);--dur-press:.16s;--dur-hover:.2s}[data-theme=white]{--bg-secondary:#fff;--bg-primary:#fff;--bg-tertiary:#f6f6f6;--bg-hover:var(--bg-tertiary);--bg-quinary:#fff;--bg-error-light:#c6574614;--floating-surface:#fff;--floating-shadow:0 12px 26px #0000001f;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e5e5e5;--border-secondary:var(--border-color);--border-primary:#d9d9d9;--border-hover:#ccc;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary)}[data-theme=dark]{--bg-secondary:#151412;--bg-primary:#1d1b18;--bg-tertiary:#262320;--bg-hover:#2e2a26;--bg-quinary:#191714;--bg-error-light:#c657462e;--floating-surface:#2a2723;--floating-shadow:0 14px 30px #0006;--text-primary:#f6f4f1;--text-secondary:#c9c3bb;--text-tertiary:#9c958d;--text-quaternary:#6f6962;--text-muted:var(--text-tertiary);--border-color:#3a3530;--border-secondary:var(--border-color);Line truncated
|
||||
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=CR(SR(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=CR(SR(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function DR(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new vR||null,prettyErrors:t}}function OR(e,t={}){let{lineCounter:n,prettyErrors:r}=DR(t),i=new ER(n?.addNewLine),a=new iR(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new bL(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(SL(e,n)),o.warnings.forEach(SL(e,n))),o}function kR(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=OR(e,n);if(!i)return null;if(i.warnings.forEach(e=>QF(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}var AR=()=>typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():`${Date.now().toString(36)}_${Math.random().toString(36).slice(2,10)}`,jR={host:``,port:``,tlsEnable:!1,tlsCert:``,tlsKey:``,rmAllowRemote:!1,rmSecretKey:``,rmDisableControlPanel:!1,rmDisableAutoUpdatePanel:!1,rmPanelRepo:``,authDir:``,apiKeysText:``,pluginsEnabled:!1,pluginStoreSources:[],pluginStoreAuth:[],debug:!1,commercialMode:!1,loggingToFile:!1,logsMaxTotalSizeMb:``,errorLogsMaxFiles:``,usageStatisticsEnabled:!1,redisUsageQueueRetentionSeconds:``,proxyUrl:``,forceModelPrefix:!1,passthroughHeaders:!1,requestRetry:``,maxRetryCredentials:``,maxRetryInterval:``,disableCooling:!1,disableImageGeneration:`false`,gptImage2BaseModel:``,authAutoRefreshWorkers:``,quotaSwitchProject:!0,quotaSwitchPreviewModel:!0,quotaAntigravityCredits:!1,routingStrategy:`round-robin`,routingSessionAffinity:!1,routingSessionAffinityTTL:``,wsAuth:!1,antigravitySignatureCacheEnabled:!0,antigravitySignatureBypassStrict:!1,claudeHeaderUserAgent:``,claudeHeaderPackageVersion:``,claudeHeaderRuntimeVersion:``,claudeHeaderOs:``,claudeHeaderArch:``,claudeHeaderTimeout:``,claudeHeaderStabilizeDeviceProfile:!1,codexHeaderUserAgent:``,codexHeaderBetaFeatures:``,payloadDefaultRules:[],payloadDefaultRawRules:[],payloadOverrideRules:[],payloadOverrideRawRules:[],payloadFilterRules:[],streaming:{keepaliveSeconds:``,bootstrapRetries:``,nonstreamKeepaliveInterval:``}};function MR(e){return typeof e!=`object`||!e||Array.isArray(e)?null:e}function NR(e){if(typeof e==`string`)return e.trim()||null;let t=MR(e);if(!t)return null;let n=[t[`api-key`],t.apiKey,t.key,t.Key];for(let e of n)if(typeof e==`string`){let t=e.trim();if(t)return t}return null}function PR(e){if(!Array.isArray(e))return``;let t=[];for(let n of e){let e=NR(n);e&&t.push(e)}return t.join(`
|
||||
`)}function FR(e){if(Object.prototype.hasOwnProperty.call(e,`api-keys`))return PR(e[`api-keys`]);let t=MR(MR(MR(e.auth)?.providers)?.[`config-api-key`]);return t?Object.prototype.hasOwnProperty.call(t,`api-key-entries`)?PR(t[`api-key-entries`]):PR(t[`api-keys`]):``}function IR(e,t){return e.hasIn(t)}function LR(e,t){KP(e.getIn(t,!0))||e.setIn(t,e.createNode({}))}function RR(e,t){let n=e.getIn(t,!0);KP(n)&&n.items.length===0&&e.deleteIn(t)}function zR(e,t,n){if(n){e.setIn(t,!0);return}IR(e,t)&&e.setIn(t,!1)}function BR(e,t,n){let r=typeof n==`string`?n:``;if(r.trim()!==``){e.setIn(t,r);return}IR(e,t)&&e.setIn(t,``)}function VR(e,t,n){let r=n.map(e=>e.trim()).filter(Boolean);if(r.length>0){e.setIn(t,r);return}IR(e,t)&&e.deleteIn(t)}function HR(e,t,n){let r=(typeof n==`string`?n:``).trim();if(r===``){IR(e,t)&&e.deleteIn(t);return}if(!/^-?\d+$/.test(r))return;let i=Number(r);if(Number.isFinite(i)){e.setIn(t,i);return}}function UR(e,t,n){if(n===`chat`||n===`passthrough`){e.setIn(t,n);return}if(n===`true`){e.setIn(t,!0);return}IR(e,t)&&e.setIn(t,!1)}var WR=[`payloadDefaultRules`,`payloadDefaultRawRules`,`payloadOverrideRules`,`payloadOverrideRawRules`,`payloadFilterRules`];function GR(e){return WR.some(t=>e.has(t))}function KR(e){let t=e.trim();if(t)return/^-?\d+$/.test(t)&&Number(t)>=0?void 0:`non_negative_integer`}function qR(e){let t=e.trim();if(!t)return;if(!/^\d+$/.test(t))return`port_range`;let n=Number(t);return n>=1&&n<=65535?void 0:`port_range`}function JR(e){let t=e.trim();if(!t)return;if(!/^\d+$/.test(t))return`integer_range_1_3600`;let n=Number(t);return n>=1&&n<=3600?void 0:`integer_range_1_3600`}function YR(e){return{port:qR(e.port),errorLogsMaxFiles:KR(e.errorLogsMaxFiles),logsMaxTotalSizeMb:KR(e.logsMaxTotalSizeMb),redisUsageQueueRetentionSeconds:JR(e.redisUsageQueueRetentionSeconds),requestRetry:KR(e.requestRetry),maxRetryCredentials:KR(e.maxRetryCredentials),maxRetryInterval:KR(e.maxRetryInterval),authAutoRefreshWorkers:KR(e.authAutoRefreshWorkers),"streaming.keepaliveSeconds":KR(e.streaming.keepaliveSeconds),"streaming.bootstrapRetries":KR(e.streaming.bootstrapRetries),"streaming.nonstreamKeepaliveInterval":KR(e.streaming.nonstreamKeepaliveInterval)}}function XR(e){let t=e.value.trim();switch(e.valueType){case`number`:{if(!t)return`payload_invalid_number`;let e=Number(t);return Number.isFinite(e)?void 0:`payload_invalid_number`}case`boolean`:{let e=t.toLowerCase();return e===`true`||e===`false`?void 0:`payload_invalid_boolean`}case`json`:if(!t)return`payload_invalid_json`;try{JSON.parse(e.value);return}catch{return`payload_invalid_json`}default:return}}function ZR(e){return e.some(e=>e.params.some(e=>!!XR(e))||e.models.some(e=>(e.match??[]).some(e=>!!XR(e))||(e.notMatch??[]).some(e=>!!XR(e))))}function QR(e){return typeof structuredClone==`function`?structuredClone(e):JSON.parse(JSON.stringify(e))}function $R(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.name!==i.name||r.protocol!==i.protocol||r.fromProtocol!==i.fromProtocol||!tz(r.headers,i.headers)||!ez(r.match??[],i.match??[])||!ez(r.notMatch??[],i.notMatch??[])||!nz(r.exist,i.exist)||!nz(r.notExist,i.notExist))return!1}return!0}function ez(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||r.path!==i.path||r.valueType!==i.valueType||r.value!==i.value)return!1}return!0}function tz(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[e];if(!t||!i||t.id!==i.id||t.name!==i.name||t.value!==i.value)return!1}return!0}function nz(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1)if(n[e]!==r[e])return!1;return!0}function rz(e,t){let n=e??[],r=t??[];if(n===r)return!0;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e+=1){let t=n[e],i=r[e];if(!t||!i||t.match!==i.match||t.type!==i.type||t.tokenEnv!==i.tokenEnv||t.usernameEnv!==i.usernameEnv||t.passwordEnv!==i.passwordEnv||t.headerName!==i.headerName||t.headerValueEnv!==i.headerValueEnv||t.allowInsecure!==i.allowInsecure||!nz(t.applyTo,i.applyTo))return!1}return!0}function iz(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!$R(r.models,i.models)||!ez(r.params,i.params))return!1}return!0}function az(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.id!==i.id||!$R(r.models,i.models)||r.params.length!==i.params.length)return!1;for(let e=0;e<r.params.length;e+=1)if(r.params[e]!==i.params[e])return!1}return!0}function oz(e){if(typeof e==`number`)return{valueType:`number`,value:String(e)};if(typeof e==`boolean`)return{valueType:`boolean`,value:String(e)};if(e===null||typeof e==`object`)try{return{valueType:`json`,value:JSON.stringify(e,null,2)??`null`}}catch{return{valueType:`json`,value:StrLine truncated
|
||||
`).map(e=>e.trim()).filter(Boolean);e.length>0?t.setIn([`api-keys`],e):IR(t,[`api-keys`])&&t.deleteIn([`api-keys`]),yz(t)}if(i.has(`pluginsEnabled`)||i.has(`pluginStoreSources`)||a){if(LR(t,[`plugins`]),i.has(`pluginsEnabled`)&&zR(t,[`plugins`,`enabled`],r.pluginsEnabled),i.has(`pluginStoreSources`)&&VR(t,[`plugins`,`store-sources`],r.pluginStoreSources),a){let e=Oz(r.pluginStoreAuth);e.length>0?t.setIn([`plugins`,`store-auth`],e):IR(t,[`plugins`,`store-auth`])&&t.deleteIn([`plugins`,`store-auth`])}RR(t,[`plugins`])}i.has(`debug`)&&zR(t,[`debug`],r.debug),i.has(`commercialMode`)&&zR(t,[`commercial-mode`],r.commercialMode),i.has(`loggingToFile`)&&zR(t,[`logging-to-file`],r.loggingToFile),i.has(`logsMaxTotalSizeMb`)&&HR(t,[`logs-max-total-size-mb`],r.logsMaxTotalSizeMb),i.has(`errorLogsMaxFiles`)&&HR(t,[`error-logs-max-files`],r.errorLogsMaxFiles),i.has(`usageStatisticsEnabled`)&&zR(t,[`usage-statistics-enabled`],r.usageStatisticsEnabled),i.has(`redisUsageQueueRetentionSeconds`)&&HR(t,[`redis-usage-queue-retention-seconds`],r.redisUsageQueueRetentionSeconds),i.has(`proxyUrl`)&&BR(t,[`proxy-url`],r.proxyUrl),i.has(`forceModelPrefix`)&&zR(t,[`force-model-prefix`],r.forceModelPrefix),i.has(`passthroughHeaders`)&&zR(t,[`passthrough-headers`],r.passthroughHeaders),i.has(`requestRetry`)&&HR(t,[`request-retry`],r.requestRetry),i.has(`maxRetryCredentials`)&&HR(t,[`max-retry-credentials`],r.maxRetryCredentials),i.has(`maxRetryInterval`)&&HR(t,[`max-retry-interval`],r.maxRetryInterval),i.has(`disableCooling`)&&zR(t,[`disable-cooling`],r.disableCooling),i.has(`disableImageGeneration`)&&UR(t,[`disable-image-generation`],r.disableImageGeneration),i.has(`gptImage2BaseModel`)&&BR(t,[`gpt-image-2-base-model`],r.gptImage2BaseModel),i.has(`authAutoRefreshWorkers`)&&HR(t,[`auth-auto-refresh-workers`],r.authAutoRefreshWorkers),i.has(`wsAuth`)&&zR(t,[`ws-auth`],r.wsAuth),i.has(`antigravitySignatureCacheEnabled`)&&(IR(t,[`antigravity-signature-cache-enabled`])||!r.antigravitySignatureCacheEnabled)&&t.setIn([`antigravity-signature-cache-enabled`],r.antigravitySignatureCacheEnabled),i.has(`antigravitySignatureBypassStrict`)&&zR(t,[`antigravity-signature-bypass-strict`],r.antigravitySignatureBypassStrict),(i.has(`claudeHeaderUserAgent`)||i.has(`claudeHeaderPackageVersion`)||i.has(`claudeHeaderRuntimeVersion`)||i.has(`claudeHeaderOs`)||i.has(`claudeHeaderArch`)||i.has(`claudeHeaderTimeout`)||i.has(`claudeHeaderStabilizeDeviceProfile`))&&(LR(t,[`claude-header-defaults`]),i.has(`claudeHeaderUserAgent`)&&BR(t,[`claude-header-defaults`,`user-agent`],r.claudeHeaderUserAgent),i.has(`claudeHeaderPackageVersion`)&&BR(t,[`claude-header-defaults`,`package-version`],r.claudeHeaderPackageVersion),i.has(`claudeHeaderRuntimeVersion`)&&BR(t,[`claude-header-defaults`,`runtime-version`],r.claudeHeaderRuntimeVersion),i.has(`claudeHeaderOs`)&&BR(t,[`claude-header-defaults`,`os`],r.claudeHeaderOs),i.has(`claudeHeaderArch`)&&BR(t,[`claude-header-defaults`,`arch`],r.claudeHeaderArch),i.has(`claudeHeaderTimeout`)&&BR(t,[`claude-header-defaults`,`timeout`],r.claudeHeaderTimeout),i.has(`claudeHeaderStabilizeDeviceProfile`)&&zR(t,[`claude-header-defaults`,`stabilize-device-profile`],r.claudeHeaderStabilizeDeviceProfile),RR(t,[`claude-header-defaults`])),(i.has(`codexHeaderUserAgent`)||i.has(`codexHeaderBetaFeatures`))&&(LR(t,[`codex-header-defaults`]),i.has(`codexHeaderUserAgent`)&&BR(t,[`codex-header-defaults`,`user-agent`],r.codexHeaderUserAgent),i.has(`codexHeaderBetaFeatures`)&&BR(t,[`codex-header-defaults`,`beta-features`],r.codexHeaderBetaFeatures),RR(t,[`codex-header-defaults`])),(i.has(`quotaSwitchProject`)||i.has(`quotaSwitchPreviewModel`)||i.has(`quotaAntigravityCredits`))&&(LR(t,[`quota-exceeded`]),i.has(`quotaSwitchProject`)&&t.setIn([`quota-exceeded`,`switch-project`],r.quotaSwitchProject),i.has(`quotaSwitchPreviewModel`)&&t.setIn([`quota-exceeded`,`switch-preview-model`],r.quotaSwitchPreviewModel),i.has(`quotaAntigravityCredits`)&&t.setIn([`quota-exceeded`,`antigravity-credits`],r.quotaAntigravityCredits),RR(t,[`quota-exceeded`])),(i.has(`routingStrategy`)||i.has(`routingSessionAffinity`)||i.has(`routingSessionAffinityTTL`))&&(LR(t,[`routing`]),i.has(`routingStrategy`)&&t.setIn([`routing`,`strategy`],r.routingStrategy),i.has(`routingSessionAffinity`)&&zR(t,[`routing`,`session-affinity`],r.routingSessionAffinity),i.has(`routingSessionAffinityTTL`)&&BR(t,[`routing`,`session-affinity-ttl`],r.routingSessionAffinityTTL),RR(t,[`routing`]));let o=typeof r.streaming?.keepaliveSeconds==`string`?r.streaming.keepaliveSeconds:``,s=typeof r.streaming?.bootstrapRetries==`string`?r.streaming.bootstrapRetries:``,c=typeof r.streaming?.nonstreamKeepaliveInterval==`string`?r.streaming.nonstreamKeepaliveInterval:``;return(i.has(`streaming.keepaliveSeconds`)||i.has(`streaming.bootstrapRetries`))&&(LR(t,[`streaming`]),i.has(`streaming.keepaliveSeconds`)&&HR(t,[`streaming`,`keepalive-seconds`],o),i.has(`streaming.bootstrapRetries`)&&HR(t,[`streaming`,`bootstrap-retrieLine truncated
|
||||
`){[e,t]=tV(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},GV=class e extends UV{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=tV(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
||||
`){[e,t]=tV(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new WV(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof WV&&c&&(n=u[u.length-1])instanceof WV&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new WV(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}},UV.empty=new WV([``],0),KV=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof WV?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof WV?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(r instanceof WV){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof WV?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},qV=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new KV(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},JV=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}},typeof Symbol<`u`&&(UV.prototype[Symbol.iterator]=function(){return this.iter()},KV.prototype[Symbol.iterator]=qV.prototype[Symbol.iterator]=JV.prototype[Symbol.iterator]=function(){return this}),YV=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}},XV=/\r\n?|\n/,ZV=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(ZV||(ZV={})),QV=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){uV(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:fV(this,e)}mapDesc(e,t=!1){return e.empty?this:dV(this,e,t)}mapPos(e,t=-1,n=ZV.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=ZV.Simple&&c>=e&&(n==ZV.TrackDel&&r<e&&c>e||n==ZV.TrackBefore&&r<e||n==ZV.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},$V=class e extends QV{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return uV(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return dV(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(UV.empty);r.push(a?t.slice(i,i+a):UV.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:fV(this,e,!0)}map(e,t=!1){return e.empty?this:dV(this,e,t,!0)}iterChanges(e,t=!1){uV(this,e,t)}get desc(){return QV.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new eH(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);cV(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;cV(n,e,t),t>0&&lV(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);cV(n,e,-1),cV(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:QV.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+Line truncated
|
||||
`}get readOnly(){return this.facet(yH)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(pH))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){return AV(this.languageDataAt(`wordChars`,e).join(``))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=nV(t,a,!1);if(i(t.slice(e,a))!=EH.Word)break;a=e}for(;o<r;){let e=nV(t,o);if(i(t.slice(o,e))!=EH.Word)break;o=e}return a==o?null:X.range(a+n,o+n)}},kH.allowMultipleSelections=mH,kH.tabSize=rH.define({combine:e=>e.length?e[0]:4}),kH.lineSeparator=hH,kH.readOnly=yH,kH.phrases=rH.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),kH.languageData=pH,kH.changeFilter=gH,kH.transactionFilter=_H,kH.transactionExtender=vH,uH.reconfigure=CH.define(),AH=class{eq(e){return this==e}range(e,t=e){return jH.create(e,t,this)}},AH.prototype.startSide=AH.prototype.endSide=0,AH.prototype.point=!1,AH.prototype.mapMode=ZV.TrackDel,jH=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}},MH=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n){let r=[],i=[],a=[],o=-1,s=-1;for(let e=0;e<this.value.length;e++){let c=this.value[e],l=this.from[e]+t,u=this.to[e]+t,d,f;if(l==u){let e=n.mapPos(l,c.startSide,c.mapMode);if(e==null||(d=f=e,c.startSide!=c.endSide&&(f=n.mapPos(l,c.endSide),f<d)))continue}else if(d=n.mapPos(l,c.startSide),f=n.mapPos(u,c.endSide),d>f||d==f&&c.startSide>0&&c.endSide<=0)continue;(f-d||c.endSide-c.startSide)<0||(o<0&&(o=d),c.point&&(s=Math.max(s,f-d)),r.push(c),i.push(d-o),a.push(f-o))}return{mapped:r.length?new e(i,a,r,s):null,pos:o}}},NH=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(MV)),this.isEmpty)return n.length?e.of(n):this;let s=new FH(this,null,-1).goto(0),c=0,l=[],u=new PH;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value)||l.push(jH.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],o=this.chunk[e],s=t.touchesRange(a,a+o.length);if(s===!1)i=Math.max(i,o.maxPoint),n.push(o),r.push(t.mapPos(a));else if(s===!0){let{mapped:e,pos:s}=o.map(a,t);e&&(i=Math.max(i,e.maxPoint),n.push(e),r.push(s))}}let a=this.nextLayer.map(t);return n.length==0?a:new e(r,n,a||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return IH.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return IH.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=PV(a,o,n),c=new LH(a,s,i),l=new LH(o,s,i);n.iterGaps((e,t,n)=>IV(c,e,l,t,n,r)),n.empty&&n.length==0&&IV(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=PV(i,a),s=new LH(i,o,0).goto(n),c=new LH(a,o,0).goto(n);for(;;){if(s.to!=c.to||!LV(s.activeLine truncated
|
||||
`)}static newName(){let e=HH[BH]||1;return HH[BH]=e+1,zH+e.toString(36)}static mount(e,t,n){let r=e[VH],i=n&&n.nonce;r?i&&r.setNonce(i):r=new GH(e,i),r.mount(Array.isArray(t)?t:[t],e)}},WH=new Map,GH=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=WH.get(n);if(t)return e[VH]=t;this.sheet=new r.CSSStyleSheet,WH.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[VH]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
||||
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}}}));function qH(e){var t=!(XH&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||ZH&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?YH:JH)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var JH,YH,XH,ZH,QH,$H=o((()=>{for(JH={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},YH={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},XH=typeof navigator<`u`&&/Mac/.test(navigator.platform),ZH=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),QH=0;QH<10;QH++)JH[48+QH]=JH[96+QH]=String(QH);for(QH=1;QH<=24;QH++)JH[QH+111]=`F`+QH;for(QH=65;QH<=90;QH++)JH[QH]=String.fromCharCode(QH+32),YH[QH]=String.fromCharCode(QH);for(var e in JH)YH.hasOwnProperty(e)||(YH[e]=JH[e])}));function eU(){var e=arguments[0];typeof e==`string`&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&typeof n==`object`&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i==`string`?e.setAttribute(r,i):i!=null&&(e[r]=i)}t++}for(;t<arguments.length;t++)tU(e,arguments[t]);return e}function tU(e,t){if(typeof t==`string`)e.appendChild(document.createTextNode(t));else if(t!=null)if(t.nodeType!=null)e.appendChild(t);else if(Array.isArray(t))for(var n=0;n<t.length;n++)tU(e,t[n]);else throw RangeError(`Unsupported child node: `+t)}var nU=o((()=>{}));function rU(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function iU(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function aU(e,t){if(!t.anchorNode)return!1;try{return iU(e,t.anchorNode)}catch{return!1}}function oU(e){return e.nodeType==3?vU(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function sU(e,t,n,r){return n?uU(e,t,n,r,-1)||uU(e,t,n,r,1):!1}function cU(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function lU(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function uU(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:dU(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=cU(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?dU(e):0}else return!1}}function dU(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function fU(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function pU(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function mU(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function hU(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=pU(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=mU(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0Line truncated
|
||||
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function DW(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==EH.Space&&(i=t),i==t}}function OW(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return X.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(l)o??(o=l.left-c.left),s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??(o=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from))),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=r??e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(f+t)*a,r=yW(e,{x:d,y:n},!1,a);if(n<c.top||n>c.bottom||(a<0?r<i:r>i)){let t=e.docView.coordsForChar(r),i=!t||n<t.top?-1:1;return X.cursor(r,i,void 0,o)}}}function kW(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function AW(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=kW(e,i.from,0);t!=i.from&&(a=X.cursor(t,-1))}else{let t=kW(e,i.from,-1),n=kW(e,i.to,1);(t!=i.from||n!=i.to)&&(a=X.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||(n=t.ranges.slice()),n[r]=a)}return n?X.create(n,t.mainIndex):t}function jW(e,t,n){let r=kW(e.state.facet(Fq).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:X.cursor(r,r<n.from?1:-1)}function MW(e,t,n){for(;;){if(!t||n<dU(t))return!1;if(t==e)return!0;n=cU(t)+1,t=t.parentNode}}function NW(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=FK.get(e);if(!(t?.isWidget||e.cmIgnore))return!1;t&&(n||(n=[])).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}function PW(e,t){let n,{newSel:r}=t,i=e.state.selection.main,a=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,c=null;(a===8||kK.android&&t.text.length<o-r)&&(s=i.to,c=`end`);let l=LW(e.state.doc.sliceString(r,o,Uq),t.text,s-r,c);l&&(kK.chrome&&a==13&&l.toB==l.from+2&&t.text.slice(l.from,l.toB)==``&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:UV.of(t.text.slice(l.from,l.toB).split(Uq))})}else r&&(!e.hasFocus&&e.state.facet(Eq)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:(kK.mac||kK.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=X.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:UV.of([n.insert.toString().replace(`.`,` `)])}):n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:e.state.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:i.from,to:i.to,insert:e.state.toText(e.inputState.insertingText)}:kK.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
|
||||
`&&e.lineWrapping&&(r&&(r=X.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:UV.of([` `])}),n)return FW(e,n,r,a);if(r&&!r.main.eq(i)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=AW(e.state.facet(Fq).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function FW(e,t,n,r=-1){if(kK.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(kK.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&yU(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&yU(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&yU(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||(o=IW(e,t,n));return e.state.facet(gq).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function IW(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=kW(i.facet(Fq).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:X.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&aW(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?X.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function LW(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function RW(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Gq(n,r)),(i!=n||a!=r)&&t.push(new Gq(i,a))),t}function zW(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?X.single(n+t,r+t):null}function BW(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){tW(n.state,e)}}}function VW(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(BW(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(BW(t.value,r))}}for(let e in $q)n(e).handlers.push($q[e]);for(let e in eJ)n(e).observers.push(eJ[e]);return t}function HW(e){return Math.max(0,e)*.7+8}function UW(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}function WW(e,t){let n=e.state.facet(dq);return n.length?n[0](t):kK.mac?t.metaKey:t.ctrlKey}function GW(e,t){let n=e.state.facet(fq);return n.length?n[0](t):kK.mac?!t.altKey:!t.ctrlKey}function KW(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=rU(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function qW(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=FK.get(n))&&r.ignoreEvent(t))return!1;return!0}function JW(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`tLine truncated
|
||||
`))};if((kK.mac||kK.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:UV.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);FW(e,u,X.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(GK.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:Tq.of(GK.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{this.editContext.updateControlBounds(e.contentDOM.getBoundingClientRect());let t=rU(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},HJ=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureReLine truncated
|
||||
--\u2028\u2029-]`,uY),fY={0:`null`,7:`bell`,8:`backspace`,10:`newline`,11:`vertical tab`,13:`carriage return`,27:`escape`,8203:`zero width space`,8204:`zero width non-joiner`,8205:`zero width joiner`,8206:`left-to-right mark`,8207:`right-to-left mark`,8232:`line separator`,8237:`left-to-right override`,8238:`right-to-left override`,8294:`left-to-right isolate`,8295:`right-to-left isolate`,8297:`pop directional isolate`,8233:`paragraph separator`,65279:`zero width no-break space`,65532:`object replacement`},pY=null,mY=rH.define({combine(e){let t=jV(e,{render:null,specialChars:dY,addSpecialChars:null});return(t.replaceTabs=!UG())&&(t.specialChars=RegExp(` |`+t.specialChars.source,uY)),t.addSpecialChars&&(t.specialChars=RegExp(t.specialChars.source+`|`+t.addSpecialChars.source,uY)),t}}),hY=null,gY=`•`,_Y=class extends UK{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=KG(this.code),n=e.state.phrase(`Control character`)+` `+(fY[this.code]||`0x`+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,n,t);if(r)return r;let i=document.createElement(`span`);return i.textContent=t,i.title=n,i.setAttribute(`aria-label`,n),i.className=`cm-specialChar`,i}ignoreEvent(){return!1}},vY=class extends UK{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement(`span`);return e.textContent=` `,e.className=`cm-tab`,e.style.width=this.width+`px`,e}ignoreEvent(){return!1}},yY=GK.line({class:`cm-activeLine`}),bY=kq.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(yY.range(i.from)),t=i.from)}return GK.set(n)}},{decorations:e=>e.decorations}),xY=class extends UK{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?oU(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=fU(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}},SY=2e3,CY={Alt:[18,e=>!!e.altKey],Control:[17,e=>!!e.ctrlKey],Shift:[16,e=>!!e.shiftKey],Meta:[91,e=>!!e.metaKey]},wY={style:`cursor: crosshair`},TY=`-10000px`,EY=class{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e);let i=null;this.tooltipViews=this.tooltips.map(e=>i=n(e,i))}update(e,t){var n;let r=e.state.facet(this.facet),i=r.filter(e=>e);if(r===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let a=[],o=t?[]:null;for(let n=0;n<i.length;n++){let r=i[n],s=-1;if(r){for(let e=0;e<this.tooltips.length;e++){let t=this.tooltips[e];t&&t.create==r.create&&(s=e)}if(s<0)a[n]=this.createTooltipView(r,n?a[n-1]:null),o&&(o[n]=!!r.above);else{let r=a[n]=this.tooltipViews[s];o&&(o[n]=t[s]),r.update&&r.update(e)}}}for(let e of this.tooltipViews)a.indexOf(e)<0&&(this.removeTooltipView(e),(n=e.destroy)==null||n.call(e));return t&&(o.forEach((e,n)=>t[n]=e),t.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=a,!0}},DY=rH.define({combine:e=>({position:kK.ios?`absolute`:e.find(e=>e.position)?.position||`fixed`,parent:e.find(e=>e.parent)?.parent||null,tooltipSpace:e.find(e=>e.tooltipSpace)?.tooltipSpace||tK})}),OY=new WeakMap,kY=kq.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(DY);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver==`function`?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new EY(e,MY,(e,t)=>this.createTooltip(e,t),e=>{this.resizeObserver&&this.resizeObserver.unobserve(e.dom),e.dom.remove()}),this.above=this.manager.tooltips.map(e=>!!e.above),this.intersectionObserver=typeof IntersectionObserver==`function`?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener(`resize`,this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement(`div`),this.container.style.position=`relative`,this.container.className=this.view.themeClasses,this.parentLine truncated
|
||||
`)),r=UV.of(t.split(`
|
||||
`)),i=H$.build(n,r),a=0,o=0;return{hunks:i.map(e=>{let t=[],i=e.fromA<e.toA,s=e.fromB<e.toB,c=[];if(i){let t=n.lineAt(e.fromA).number,r=n.lineAt(e.toA-1).number;for(let e=t;e<=r;e++)c.push({num:e,text:n.line(e).text})}let l=[];if(s){let t=r.lineAt(e.fromB).number,n=r.lineAt(e.toB-1).number;for(let e=t;e<=n;e++)l.push({num:e,text:r.line(e).text})}o+=c.length,a+=l.length;let u,d,f,p;if(i)u=c[0].num-1,d=c[c.length-1].num+1;else{let t=Q$(n,e.fromA),r=n.lineAt(t);e.fromA===r.from?(u=r.number-1,d=r.number):(u=r.number,d=r.number+1)}if(s)f=l[0].num-1,p=l[l.length-1].num+1;else{let t=Q$(r,e.fromB),n=r.lineAt(t);e.fromB===n.from?(f=n.number-1,p=n.number):(f=n.number,p=n.number+1)}let m=Math.min(Z$,Math.max(0,u),Math.max(0,f));for(let e=m;e>0;e--){let r=u-e+1,i=f-e+1;r>=1&&i>=1&&r<=n.lines&&t.push({type:`context`,oldNum:r,newNum:i,text:n.line(r).text})}for(let e of c)t.push({type:`deletion`,oldNum:e.num,newNum:null,text:e.text});for(let e of l)t.push({type:`addition`,oldNum:null,newNum:e.num,text:e.text});let h=Math.max(0,Math.min(Z$,n.lines-d+1)),g=Math.max(0,Math.min(Z$,r.lines-p+1)),_=Math.min(h,g);for(let e=0;e<_;e++){let i=d+e,a=p+e;i>=1&&i<=n.lines&&a>=1&&a<=r.lines&&t.push({type:`context`,oldNum:i,newNum:a,text:n.line(i).text})}let v=t.find(e=>e.oldNum!==null)?.oldNum??1,y=t.find(e=>e.newNum!==null)?.newNum??1;return{oldStart:v,oldCount:t.filter(e=>e.type!==`addition`).length,newStart:y,newCount:t.filter(e=>e.type!==`deletion`).length,lines:t}}),additions:a,deletions:o}}var e1=5;function t1({additions:e,deletions:t}){let n=e+t;if(n===0)return null;let r=Math.round(e/n*e1);return(0,H.jsx)(`span`,{className:X$.statBar,children:Array.from({length:e1},(e,t)=>(0,H.jsx)(`span`,{className:`${X$.statBlock} ${t<r?X$.statBlockAdd:X$.statBlockDel}`},t))})}function n1({open:e,original:t,modified:n,onConfirm:r,onCancel:i,loading:a=!1}){let{t:o}=V(),s=(0,y.useMemo)(()=>$$(t,n),[t,n]);return(0,H.jsx)(ym,{open:e,title:o(`config_management.diff.title`),onClose:i,width:`min(1200px, 90vw)`,className:X$.diffModal,closeDisabled:a,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{variant:`secondary`,onClick:i,disabled:a,children:o(`common.cancel`)}),(0,H.jsx)(U,{onClick:r,loading:a,disabled:a,children:o(`config_management.diff.confirm`)})]}),children:(0,H.jsx)(`div`,{className:X$.content,children:s.hunks.length===0?(0,H.jsx)(`div`,{className:X$.emptyState,children:o(`config_management.diff.no_changes`)}):(0,H.jsxs)(`div`,{className:X$.diffContainer,children:[(0,H.jsxs)(`div`,{className:X$.fileHeader,children:[(0,H.jsx)(`svg`,{className:X$.fileIcon,viewBox:`0 0 16 16`,width:`16`,height:`16`,children:(0,H.jsx)(`path`,{fillRule:`evenodd`,d:`M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z`,fill:`currentColor`})}),(0,H.jsx)(`span`,{className:X$.fileName,children:`config.yaml`}),(0,H.jsxs)(`span`,{className:X$.fileStats,children:[(0,H.jsxs)(`span`,{className:X$.statAdditions,children:[`+`,s.additions]}),(0,H.jsxs)(`span`,{className:X$.statDeletions,children:[`-`,s.deletions]}),(0,H.jsx)(t1,{additions:s.additions,deletions:s.deletions})]})]}),(0,H.jsx)(`div`,{className:X$.diffBody,children:s.hunks.map((e,t)=>(0,H.jsxs)(`div`,{className:X$.hunk,children:[(0,H.jsxs)(`div`,{className:X$.hunkHeader,children:[(0,H.jsx)(`span`,{className:X$.hunkGutter,children:(0,H.jsx)(`svg`,{className:X$.hunkExpandIcon,viewBox:`0 0 16 16`,width:`12`,height:`12`,children:(0,H.jsx)(`path`,{d:`M8.177 1.677l2.896 2.896a.25.25 0 01-.177.427H8.75v1.25a.75.75 0 01-1.5 0V5H5.104a.25.25 0 01-.177-.427l2.896-2.896a.25.25 0 01.354 0zM7.25 11.75a.75.75 0 011.5 0V13h2.146a.25.25 0 01.177.427l-2.896 2.896a.25.25 0 01-.354 0l-2.896-2.896A.25.25 0 015.104 13H7.25v-1.25z`,fill:`currentColor`})})}),(0,H.jsx)(`span`,{className:X$.hunkGutter}),(0,H.jsxs)(`span`,{className:X$.hunkText,children:[`@@ -`,e.oldStart,`,`,e.oldCount,` +`,e.newStart,`,`,e.newCount,` @@`]})]}),e.lines.map((e,n)=>(0,H.jsxs)(`div`,{className:`${X$.diffLine} ${X$[e.type]}`,children:[(0,H.jsx)(`span`,{className:`${X$.lineNum} ${e.oldNum===null?X$.lineNumEmpty:``}`,children:e.oldNum??``}),(0,H.jsx)(`span`,{className:`${X$.lineNum} ${e.newNum===null?X$.lineNumEmpty:``}`,children:e.newNum??``}),(0,H.jsx)(`span`,{className:X$.linePrefix,children:e.type===`deletion`?`-`:e.type===`addition`?`+`:` `}),(0,H.jsx)(`code`,{className:X$.lineText,children:e.text||` `})]},`${t}-${n}`))]},t))})]})})})}var r1={container:`FloatingSaveBar-module__container___NaBSV`,bar:`FloatingSaveBar-module__bar___EyOlk`,status:`FloatingSaveBar-module__status___01LWT`,statusWarning:`FloatingSaveBar-module__statusWarning___qnA2x`,statusError:`FloatingSaveBar-module__statusError___gN2K-`,statusBusy:`FloatingSaveBar-module__statusBusy___cngKv`,statusMuted:`FloatingSavLine truncated
|
||||
`:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new N4(this):new M4(this)}getCursor(e,t=0,n){let r=e.doc?e:kH.create({doc:e});return n??(n=r.doc.length),this.regexp?Q2(this,r,t,n):X2(this,r,t,n)}},j4=class{constructor(e){this.spec=e}},M4=class extends j4{constructor(e){super(e)}nextMatch(e,t,n){let r=X2(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=X2(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=X2(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||(r=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=X2(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=X2(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},N4=class extends j4{nextMatch(e,t,n){let r=Q2(this.spec,e,n,e.doc.length).next();return r.done&&(r=Q2(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=Q2(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=Q2(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Q2(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},P4=CH.define(),F4=CH.define(),I4=oH.define({create(e){return new L4(i4(e).create(),null)},update(e,t){for(let n of t.effects)n.is(P4)?e=new L4(n.value.create(),e.panel):n.is(F4)&&(e=new L4(e.query,n.value?r4:null));return e},provide:e=>HY.from(e,e=>e.panel)}),L4=class{constructor(e,t){this.query=e,this.panel=t}},R4=GK.mark({class:`cm-searchMatch`}),z4=GK.mark({class:`cm-searchMatch cm-searchMatch-selected`}),B4=kq.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(I4))}update(e){let t=e.state.field(I4);(t!=e.startState.field(I4)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return GK.none;let{view:n}=this,r=new PH;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?z4:R4)})}return r.finish()}},{decorations:e=>e.decorations}),V4=n4((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=X.single(r.from,r.to),a=e.state.facet(k4);return e.dispatch({selection:i,effects:[c4(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),o4(e),!0}),H4=n4((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=X.single(i.from,i.to),o=e.state.facet(k4);return e.dispatch({selection:a,effects:[c4(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),o4(e),!0}),U4=n4((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:X.create(n.map(e=>X.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),W4=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new u4(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(X.range(t.value.from,t.value.to))}return t(e.update({selection:X.create(a,o),userEvent:`select.search.matches`})),!0},G4=n4((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(HJ.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=X.single(o.from,o.to).map(d),u.push(c4(e,o)),u.push(n.facet(k4).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effecLine truncated
|
||||
`).map(e=>e.trim()).filter(Boolean),[e]),[o,s]=(0,y.useState)(()=>a.map(()=>AR())),c=(0,y.useMemo)(()=>o.length===a.length?o:o.length>a.length?o.slice(0,a.length):[...o,...Array.from({length:a.length-o.length},()=>AR())],[o,a.length]),l=(0,y.useId)(),u=`${l}-hint`,d=`${l}-error`,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(null),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(``),x=()=>{h(null),_(``),b(``),p(!0)},S=e=>{let t=c.findIndex(t=>t===e);h(e),_(a[t]??``),b(``),p(!0)},C=()=>{p(!1),_(``),h(null),b(``)},w=e=>{n(e.join(`
|
||||
`))},T=e=>{let t=c.findIndex(t=>t===e);t<0||(s(c.filter(t=>t!==e)),w(a.filter((e,n)=>n!==t)))},E=()=>{let e=g.trim();if(!e){b(r(`config_management.visual.api_keys.error_empty`));return}if(!n9(e)){b(r(`config_management.visual.api_keys.error_invalid`));return}let t=m?c.findIndex(e=>e===m):-1,n=m===null?[...a,e]:a.map((n,r)=>r===t?e:n);m===null&&s([...c,AR()]),w(n),C()},D=async e=>{let t=await sO(e);i(r(t?`notification.link_copied`:`notification.copy_failed`),t?`success`:`error`)};return(0,H.jsxs)(`div`,{className:`form-group`,style:{marginBottom:0},children:[(0,H.jsxs)(`div`,{className:Q.blockHeaderRow,children:[(0,H.jsx)(`label`,{style:{margin:0},children:r(`config_management.visual.api_keys.label`)}),(0,H.jsx)(U,{size:`sm`,onClick:x,disabled:t,children:r(`config_management.visual.api_keys.add`)})]}),a.length===0?(0,H.jsx)(`div`,{className:Q.emptyState,children:r(`config_management.visual.api_keys.empty`)}):(0,H.jsx)(`div`,{className:`item-list`,style:{marginTop:4},children:a.map((e,n)=>(0,H.jsxs)(`div`,{className:`item-row`,children:[(0,H.jsxs)(`div`,{className:`item-meta`,children:[(0,H.jsxs)(`div`,{className:`pill`,children:[`#`,n+1]}),(0,H.jsx)(`div`,{className:`item-title`,children:r(`config_management.visual.api_keys.input_label`)}),(0,H.jsx)(`div`,{className:`item-subtitle`,children:Mh(String(e||``))})]}),(0,H.jsxs)(`div`,{className:`item-actions`,children:[(0,H.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>D(e),disabled:t,children:r(`common.copy`)}),(0,H.jsx)(U,{variant:`secondary`,size:`sm`,onClick:()=>S(c[n]??``),disabled:t,children:r(`config_management.visual.common.edit`)}),(0,H.jsx)(U,{variant:`danger`,size:`sm`,onClick:()=>T(c[n]??``),disabled:t,children:r(`config_management.visual.common.delete`)})]})]},c[n]??`${e}-${n}`))}),(0,H.jsx)(`div`,{className:`hint`,children:r(`config_management.visual.api_keys.hint`)}),(0,H.jsx)(ym,{open:f,onClose:C,title:r(m===null?`config_management.visual.api_keys.add_title`:`config_management.visual.api_keys.edit_title`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{variant:`secondary`,onClick:C,disabled:t,children:r(`config_management.visual.common.cancel`)}),(0,H.jsx)(U,{onClick:E,disabled:t,children:r(m===null?`config_management.visual.common.add`:`config_management.visual.common.update`)})]}),children:(0,H.jsxs)(`div`,{className:`form-group`,children:[(0,H.jsx)(`label`,{htmlFor:l,children:r(`config_management.visual.api_keys.input_label`)}),(0,H.jsxs)(`div`,{className:Q.apiKeyModalInputRow,children:[(0,H.jsx)(`input`,{id:l,className:`input`,placeholder:r(`config_management.visual.api_keys.input_placeholder`),value:g,onChange:e=>_(e.target.value),disabled:t,"aria-describedby":v?`${d} ${u}`:u,"aria-invalid":!!v}),(0,H.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{_(t9()),b(``)},disabled:t,children:r(`config_management.visual.api_keys.generate`)})]}),(0,H.jsx)(Hee,{value:g}),(0,H.jsx)(`div`,{id:u,className:`hint`,children:r(`config_management.visual.api_keys.input_hint`)}),v&&(0,H.jsx)(`div`,{id:d,className:`error-box`,children:v})]})})]})});function y9({values:e,disabled:t,onChange:n}){let{t:r}=V();return(0,H.jsx)(wB,{fieldId:`host`,children:(0,H.jsx)(us,{label:r(`config_management.visual.sections.server.host`),placeholder:`0.0.0.0`,value:e.host,onChange:e=>n({host:e.target.value}),disabled:t})})}function b9({values:e,disabled:t,onChange:n,error:r}){let{t:i}=V();return(0,H.jsx)(wB,{fieldId:`port`,children:(0,H.jsx)(us,{label:i(`config_management.visual.sections.server.port`),type:`number`,placeholder:`8317`,value:e.port,onChange:e=>n({port:e.target.value}),disabled:t,error:r})})}function x9({values:e,disabled:t,onChange:n}){let{t:r}=V();return(0,H.jsx)(wB,{fieldId:`proxyUrl`,children:(0,H.jsx)(us,{label:r(`config_management.visual.sections.network.proxy_url`),placeholder:`socks5://user:pass@127.0.0.1:1080/`,value:e.proxyUrl,onChange:e=>n({proxyUrl:e.target.value}),disabled:t})})}function S9({values:e,disabled:t,onChange:n}){return(0,H.jsx)(wB,{fieldId:`apiKeys`,children:(0,H.jsx)(TB,{children:(0,H.jsx)(Uee,{value:e.apiKeysText,disabled:t,onChange:e=>n({apiKeysText:e})})})})}function C9({values:e,disabled:t,onChange:n}){let{t:r}=V();return(0,H.jsx)(wB,{fieldId:`debug`,children:(0,H.jsx)(bB,{title:r(`config_management.visual.sections.system.debug`),description:r(`config_management.visual.sections.system.debug_desc`),checked:e.debug,disabled:t,onChange:e=>n({debug:e})})})}function w9({values:e,disabled:t,onChange:n}){let{t:r}=V();return(0,H.jsx)(wB,{fieldId:`loggingToFile`,children:(0,H.jsx)(bB,{title:r(`config_management.visual.sections.system.logging_to_file`),description:r(`config_management.visual.sections.system.logging_to_file_desc`),checked:e.loggingToFile,disabled:t,onChange:e=>n({loggingToFile:e})})})}function T9({values:e,disabled:t,onChange:n}){let{t:r}=V();return(0,H.jsx)(wB,{fieldId:`quotaSwitchProject`,children:(0,H.jsx)(bB,{title:r(`config_management.visual.sections.quota.switch_project`),description:r(`config_managemLine truncated
|
||||
`);gj({filename:`logs.txt`,blob:new Blob([n],{type:`text/plain`})}),t(e(`logs.download_success`),`success`)},we=async()=>{if(r!==`connected`){P(!1);return}P(!0),I(``);try{let e=await Dy.fetchErrorLogs();M(Array.isArray(e.files)?e.files:[])}catch(t){console.error(`Failed to load error logs:`,t),M([]);let n=Ec(t);I(n?`${e(`logs.error_logs_load_error`)}: ${n}`:e(`logs.error_logs_load_error`))}finally{P(!1)}},Te=async n=>{try{let r=await Dy.downloadErrorLog(n);gj({filename:n,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.error_log_download_success`),`success`)}catch(n){let r=Ec(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}},Ee=async t=>{let n=ue.current+1;ue.current=n,R(t),B(``),te(``),re(!0);try{let e=await Pte((await Dy.downloadErrorLog(t.name)).data);if(ue.current!==n)return;B(e)}catch(t){if(ue.current!==n)return;let r=Ec(t);te(r?`${e(`logs.error_log_open_failed`)}: ${r}`:e(`logs.error_log_open_failed`))}finally{ue.current===n&&re(!1)}},De=()=>{ue.current+=1,R(null),B(``),te(``),re(!1)},Oe=async()=>{let n=await sO(z);t(n?e(`logs.error_log_copy_success`):e(`logs.copy_failed`,{defaultValue:`Copy failed`}),n?`success`:`error`)};(0,y.useEffect)(()=>{r===`connected`&&(he(),l(!1),xe(!1))},[r,o]),(0,y.useEffect)(()=>{d===`errors`&&r===`connected`&&we()},[d,r,a]),(0,y.useEffect)(()=>{if(!b||r!==`connected`||u)return;let e=window.setInterval(()=>{xe(!0)},8e3);return()=>window.clearInterval(e)},[b,r,u]);let ke=(0,y.useMemo)(()=>p.buffer.slice(p.visibleFrom),[p.buffer,p.visibleFrom]),Ae=w.trim(),je=Ae.length>0,Me=je?p.buffer:ke,Ne=(0,y.useMemo)(()=>{let e=Me;if(T&&(e=e.filter(e=>!e.includes(Ac))),Ae){let t=Ae.toLowerCase();e=e.filter(e=>e.toLowerCase().includes(t))}return e.map(e=>bte(e))},[Me,T,Ae]),Pe=Ste({parsedLines:Ne}),Fe=`logs-structured-filters`,Ie=Pe.methodFilters.length+Pe.statusFilters.length+Pe.pathFilters.length,{filteredParsedLines:Le,filteredLines:Re,removedCount:ze}=(0,y.useMemo)(()=>{let e=Ne.filter(e=>{if(Pe.methodFilterSet.size>0&&(!e.method||!Pe.methodFilterSet.has(e.method)))return!1;let t=j9(e.statusCode);return!(Pe.statusFilterSet.size>0&&(!t||!Pe.statusFilterSet.has(t))||Pe.pathFilterSet.size>0&&(!e.path||!Pe.pathFilterSet.has(e.path)))});return{filteredParsedLines:e,filteredLines:e.map(e=>e.raw),removedCount:Math.max(Me.length-e.length,0)}},[Me,Pe.methodFilterSet,Pe.pathFilterSet,Pe.statusFilterSet,Ne]),Be=(0,y.useMemo)(()=>D?[]:Le,[Le,D]),Ve=(0,y.useMemo)(()=>Re.join(`
|
||||
`),[Re]),{canLoadMore:He,handleLogScroll:Ue,logViewerRef:We,requestScrollToBottom:Ge}=Ete({logState:p,setLogState:m,loading:h,isSearching:je,filteredLineCount:Re.length,hasStructuredFilters:Pe.hasStructuredFilters,showRawLogs:D}),Ke=async n=>{await sO(n)?t(e(`logs.copy_success`,{defaultValue:`Copied to clipboard`}),`success`):t(e(`logs.copy_failed`,{defaultValue:`Copy failed`}),`error`)},qe=()=>{de.current?.timer&&(window.clearTimeout(de.current.timer),de.current.timer=null)},Je=(e,t)=>{a&&t&&(ie||(qe(),de.current={timer:window.setTimeout(()=>{ae(t),de.current&&(de.current.fired=!0,de.current.timer=null)},Dte),startX:e.clientX,startY:e.clientY,fired:!1}))},Ye=()=>{qe(),de.current=null},Xe=e=>{let t=de.current;if(!t||t.timer===null||t.fired)return;let n=Math.abs(e.clientX-t.startX),r=Math.abs(e.clientY-t.startY);(n>U9||r>U9)&&Ye()},Ze=()=>{oe||ae(null)},Qe=async n=>{se(!0);try{let r=await Dy.downloadRequestLogById(n);gj({filename:`request-${n}.log`,blob:new Blob([r.data],{type:`text/plain`})}),t(e(`logs.request_log_download_success`),`success`),ae(null)}catch(n){let r=Ec(n);t(`${e(`notification.download_failed`)}${r?`: ${r}`:``}`,`error`)}finally{se(!1)}};return(0,y.useEffect)(()=>()=>{de.current?.timer&&(window.clearTimeout(de.current.timer),de.current.timer=null)},[]),(0,y.useEffect)(()=>{if(!ce)return;document.body.classList.add(`logs-fullscreen-active`),hm();let e=e=>{e.key===`Escape`&&(document.querySelector(`.modal-overlay`)||le(!1))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),document.body.classList.remove(`logs-fullscreen-active`),gm()}},[ce]),(0,H.jsxs)(`div`,{className:$.container,children:[(0,H.jsx)(`h1`,{className:$.pageTitle,children:e(`logs.title`)}),(0,H.jsxs)(`div`,{className:$.tabBar,children:[(0,H.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${d===`logs`?$.tabActive:``}`,onClick:()=>f(`logs`),children:e(`logs.log_content`)}),(0,H.jsx)(`button`,{type:`button`,className:`${$.tabItem} ${d===`errors`?$.tabActive:``}`,onClick:()=>{le(!1),f(`errors`)},children:e(`logs.error_logs_modal_title`)})]}),(0,H.jsxs)(`div`,{className:$.content,children:[d===`logs`&&(0,H.jsxs)(cM,{className:[$.logCard,ce?$.logCardFullscreen:``].filter(Boolean).join(` `),children:[u&&(0,H.jsx)(`div`,{className:`status-badge warning`,children:e(s?`logs.cpa_file_logging_required`:`logs.file_logging_required`)}),_&&(0,H.jsx)(`div`,{className:`error-box`,children:_}),(0,H.jsxs)(`div`,{className:$.filters,children:[!ce&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:$.searchWrapper,children:(0,H.jsx)(us,{value:S,onChange:e=>C(e.target.value),placeholder:e(`logs.search_placeholder`),className:$.searchInput,rightElement:S?(0,H.jsx)(`button`,{type:`button`,className:$.searchClear,onClick:()=>C(``),title:`Clear`,"aria-label":`Clear`,children:(0,H.jsx)(zs,{size:16})}):(0,H.jsx)(Rs,{size:16,className:$.searchIcon})})}),(0,H.jsx)(`div`,{className:$.filterPanelHeader,children:(0,H.jsx)(U,{type:`button`,variant:`secondary`,size:`sm`,className:$.filterPanelToggle,onClick:()=>A(e=>!e),"aria-expanded":k,"aria-controls":Fe,title:e(k?`logs.filter_panel_collapse`:`logs.filter_panel_expand`),children:(0,H.jsxs)(`span`,{className:$.filterPanelButtonContent,children:[(0,H.jsx)(fs,{size:16}),(0,H.jsx)(`span`,{children:e(`logs.filter_panel_title`)}),Ie>0&&(0,H.jsx)(`span`,{className:$.filterPanelCount,children:e(`logs.filter_panel_active_count`,{count:Ie})}),k?(0,H.jsx)(Fs,{size:16}):(0,H.jsx)(Is,{size:16})]})})})]}),!ce&&k&&(0,H.jsxs)(`div`,{id:Fe,className:$.structuredFilters,children:[(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_method`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:A9.map(e=>{let t=Pe.methodFilters.includes(e),n=Pe.methodCounts[e]??0;return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${t?$.filterChipActive:``}`,onClick:()=>Pe.toggleMethodFilter(e),disabled:n===0&&!t,"aria-pressed":t,children:[e,` (`,n,`)`]},e)})})]}),(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_status`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:cte.map(t=>{let n=Pe.statusFilters.includes(t),r=Pe.statusCounts[t]??0;return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActive:``}`,onClick:()=>Pe.toggleStatusFilter(t),disabled:r===0&&!n,"aria-pressed":n,children:[e(`logs.filter_status_${t}`),` (`,r,`)`]},t)})})]}),(0,H.jsxs)(`div`,{className:$.filterChipGroup,children:[(0,H.jsx)(`span`,{className:$.filterChipLabel,children:e(`logs.filter_path`)}),(0,H.jsx)(`div`,{className:$.filterChipList,children:Pe.pathOptions.length===0?(0,H.jsx)(`span`,{className:$.filterChipHint,children:e(`logs.filter_path_empty`)}):Pe.pathOptions.map(({path:e,count:t})=>{let n=Pe.pathFilters.includes(e);return(0,H.jsxs)(`button`,{type:`button`,className:`${$.filterChip} ${n?$.filterChipActiveLine truncated
|
||||
<style rel="stylesheet" crossorigin>*,:before,:after{box-sizing:border-box;margin:0;padding:0}html,body{width:100%;height:100%}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.5}#root{width:100%;height:100%}button,input,textarea,select{font:inherit}a{color:inherit;text-decoration:none}ul,ol{list-style:none}:root{--bg-secondary:#faf9f5;--bg-primary:#f0eee8;--bg-tertiary:#e9e6df;--bg-hover:var(--bg-tertiary);--bg-quinary:#f6f4ee;--bg-error-light:#c657461a;--floating-surface:#fffdf9;--floating-shadow:0 12px 26px #00000024;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e3e1db;--border-secondary:var(--border-color);--border-primary:#d5d2cb;--border-hover:#cecac4;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary);--glass-blur:12px;--glass-backdrop-filter:blur(var(--glass-blur));--glass-filter:blur(var(--glass-blur));--glass-bg:color-mix(in srgb, var(--bg-primary) 82%, transparent);--glass-bg-secondary:color-mix(in srgb, var(--bg-secondary) 82%, transparent);--glass-border:color-mix(in srgb, var(--border-color) 60%, transparent);--viz-success:#10b981;--viz-failure:#c65746;--ease-out-strong:cubic-bezier(.23, 1, .32, 1);--dur-press:.16s;--dur-hover:.2s}[data-theme=white]{--bg-secondary:#fff;--bg-primary:#fff;--bg-tertiary:#f6f6f6;--bg-hover:var(--bg-tertiary);--bg-quinary:#fff;--bg-error-light:#c6574614;--floating-surface:#fff;--floating-shadow:0 12px 26px #0000001f;--text-primary:#2d2a26;--text-secondary:#6d6760;--text-tertiary:#a29c95;--text-quaternary:#c0bab3;--text-muted:var(--text-tertiary);--border-color:#e5e5e5;--border-secondary:var(--border-color);--border-primary:#d9d9d9;--border-hover:#ccc;--primary-color:#8b8680;--primary-hover:#7f7a74;--primary-active:#726d67;--primary-contrast:#fff;--success-color:#10b981;--quota-medium-color:#e0aa14;--warning-color:#c65746;--error-color:#c65746;--danger-color:var(--error-color);--info-color:var(--primary-color);--warning-bg:#c657461f;--warning-border:#c6574659;--warning-text:var(--warning-color);--success-badge-bg:#d1fae5;--success-badge-text:#065f46;--success-badge-border:#6ee7b7;--failure-badge-bg:#c6574624;--failure-badge-text:#8a3a30;--failure-badge-border:#c6574659;--count-badge-bg:#8b86802e;--count-badge-text:var(--primary-active);--shadow:0 1px 2px 0 #00000014;--shadow-lg:0 10px 18px -3px #0000001a;--radius-md:8px;--primary-8:color-mix(in srgb, var(--primary-color) 8%, transparent);--primary-10:color-mix(in srgb, var(--primary-color) 10%, transparent);--primary-30:color-mix(in srgb, var(--primary-color) 30%, transparent);--amber-color:#d97706;--amber-text:#92400e;--amber-10:color-mix(in srgb, var(--amber-color) 10%, transparent);--amber-30:color-mix(in srgb, var(--amber-color) 30%, transparent);--destructive-color:var(--error-color);--destructive-10:color-mix(in srgb, var(--destructive-color) 10%, transparent);--destructive-30:color-mix(in srgb, var(--destructive-color) 30%, transparent);--muted-bg:var(--bg-tertiary);--muted-foreground:var(--text-secondary);--accent-bg:var(--bg-tertiary)}[data-theme=dark]{--bg-secondary:#151412;--bg-primary:#1d1b18;--bg-tertiary:#262320;--bg-hover:#2e2a26;--bg-quinary:#191714;--bg-error-light:#c657462e;--floating-surface:#2a2723;--floating-shadow:0 14px 30px #0006;--text-primary:#f6f4f1;--text-secondary:#c9c3bb;--text-tertiary:#9c958d;--text-quaternary:#6f6962;--text-muted:var(--text-tertiary);--border-color:#3a3530;--border-secondary:var(--border-color);Line truncated
|
||||
/*$vite$:1*/</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in new issue
Block a user