2024-12-08 09:17:51 +08:00
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/dagre-4EVJKHTY-CwHkZE__.js" , "assets/graph-NKVGhJNY.js" , "assets/_baseUniq-CdIH5YuP.js" , "assets/layout-BIvswrhL.js" , "assets/min-Jm8L0NU1.js" , "assets/c4Diagram-6F5ED5ID-DEQlG3AW.js" , "assets/chunk-ASOPGD6M-03fGXGfo.js" , "assets/flowDiagram-7ASYPVHJ-BDuUl95E.js" , "assets/chunk-5HRBRIJM-Dsi6omqX.js" , "assets/channel-DIeSUj4_.js" , "assets/erDiagram-6RL3IURR-Ow0ZfZlV.js" , "assets/gitGraphDiagram-NRZ2UAAF-CwME_GVy.js" , "assets/chunk-TMUBEWPD-B84KOWQQ.js" , "assets/chunk-KFBOBJHC-COkX5lM5.js" , "assets/gitGraph-YCYPL57B-BJWlhddn.js" , "assets/ganttDiagram-NTVNEXSI-D226xBpi.js" , "assets/linear-D3CDwE-t.js" , "assets/init-Gi6I4Gst.js" , "assets/infoDiagram-A4XQUW5V-ziDVDADr.js" , "assets/pieDiagram-YF2LJOPJ-DIVLOaIZ.js" , "assets/arc-hSTYVpov.js" , "assets/ordinal-Cboi1Yqb.js" , "assets/quadrantDiagram-OS5C2QUG-BoQj_4s7.js" , "assets/xychartDiagram-6QU3TZC5-1Ri5XI7B.js" , "assets/requirementDiagram-MIRIMTAZ-vDYOYSPq.js" , "assets/sequenceDiagram-G6AWOVSC-BDTxpmR7.js" , "assets/classDiagram-LNE6IOMH-BPwOWsBP.js" , "assets/chunk-T2TOU4HS-Ccxr6HFR.js" , "assets/classDiagram-v2-MQ7JQ4JX-BPwOWsBP.js" , "assets/stateDiagram-MAYHULR4-C6yI5i9T.js" , "assets/chunk-7U56Z5CX-D7VVdmDt.js" , "assets/stateDiagram-v2-4JROLMXI-jCx-CWj7.js" , "assets/journeyDiagram-G5WM74LC-BIuk72Lu.js" , "assets/timeline-definition-U7ZMHBDA-LHCGhwxr.js" , "assets/mindmap-definition-GWI6TPTV-DSsFb0X4.js" , "assets/cytoscape.esm-C7lLBfvL.js" , "assets/sankeyDiagram-Y46BX6SQ-Dxv-OvOY.js" , "assets/diagram-QW4FP2JN-BVgrfC5k.js" , "assets/blockDiagram-ZHA2E4KO-E9iJl6Ri.js" , "assets/architectureDiagram-UYN6MBPD-COyEkFe2.js" ] ) ) ) => i . map ( i => d [ i ] ) ;
2024-11-28 09:28:59 +08:00
var cw = Object . defineProperty ; var tS = Ra => { throw TypeError ( Ra ) } ; var dw = ( Ra , qa , nd ) => qa in Ra ? cw ( Ra , qa , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : nd } ) : Ra [ qa ] = nd ; var Km = ( Ra , qa , nd ) => dw ( Ra , typeof qa != "symbol" ? qa + "" : qa , nd ) , pw = ( Ra , qa , nd ) => qa . has ( Ra ) || tS ( "Cannot " + nd ) ; var rS = ( Ra , qa , nd ) => qa . has ( Ra ) ? tS ( "Cannot add the same private member more than once" ) : qa instanceof WeakSet ? qa . add ( Ra ) : qa . set ( Ra , nd ) ; var AE = ( Ra , qa , nd ) => ( pw ( Ra , qa , "access private method" ) , nd ) ; ( function ( ) { const qa = document . createElement ( "link" ) . relList ; if ( qa && qa . supports && qa . supports ( "modulepreload" ) ) return ; for ( const ld of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) od ( ld ) ; new MutationObserver ( ld => { for ( const ud of ld ) if ( ud . type === "childList" ) for ( const cd of ud . addedNodes ) cd . tagName === "LINK" && cd . rel === "modulepreload" && od ( cd ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function nd ( ld ) { const ud = { } ; return ld . integrity && ( ud . integrity = ld . integrity ) , ld . referrerPolicy && ( ud . referrerPolicy = ld . referrerPolicy ) , ld . crossOrigin === "use-credentials" ? ud . credentials = "include" : ld . crossOrigin === "anonymous" ? ud . credentials = "omit" : ud . credentials = "same-origin" , ud } function od ( ld ) { if ( ld . ep ) return ; ld . ep = ! 0 ; const ud = nd ( ld ) ; fetch ( ld . href , ud ) } } ) ( ) ; const global$1 = globalThis || void 0 || self ; / * *
* @ vue / shared v3 . 5.13
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-11-28 09:28:59 +08:00
* * //*! #__NO_SIDE_EFFECTS__ */function makeMap(Ra){const qa=Object.create(null);for(const nd of Ra.split(","))qa[nd]=1;return nd=>nd in qa}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&(Ra.charCodeAt(2)>122||Ra.charCodeAt(2)<97),isModelListener=Ra=>Ra.startsWith("onUpdate:"),extend$3=Object.assign,remove$2=(Ra,qa)=>{const nd=Ra.indexOf(qa);nd>-1&&Ra.splice(nd,1)},hasOwnProperty$i=Object.prototype.hasOwnProperty,hasOwn$2=(Ra,qa)=>hasOwnProperty$i.call(Ra,qa),isArray$2=Array.isArray,isMap$1=Ra=>toTypeString(Ra)==="[object Map]",isSet$1=Ra=>toTypeString(Ra)==="[object Set]",isDate$1=Ra=>toTypeString(Ra)==="[object Date]",isFunction$4=Ra=>typeof Ra=="function",isString$3=Ra=>typeof Ra=="string",isSymbol$1=Ra=>typeof Ra=="symbol",isObject$5=Ra=>Ra!==null&&typeof Ra=="object",isPromise=Ra=>(isObject$5(Ra)||isFunction$4(Ra))&&isFunction$4(Ra.then)&&isFunction$4(Ra.catch),objectToString$1=Object.prototype.toString,toTypeString=Ra=>objectToString$1.call(Ra),toRawType=Ra=>toTypeString(Ra).slice(8,-1),isPlainObject$4=Ra=>toTypeString(Ra)==="[object Object]",isIntegerKey=Ra=>isString$3(Ra)&&Ra!=="NaN"&&Ra[0]!=="-"&&""+parseInt(Ra,10)===Ra,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=Ra=>{const qa=Object.create(null);return nd=>qa[nd]||(qa[nd]=Ra(nd))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(Ra=>Ra.replace(camelizeRE,(qa,nd)=>nd?nd.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(Ra=>Ra.replace(hyphenateRE,"-$1").toLowerCase()),capitalize$1=cacheStringFunction(Ra=>Ra.charAt(0).toUpperCase()+Ra.slice(1)),toHandlerKey=cacheStringFunction(Ra=>Ra?`on${capitalize$1(Ra)}`:""),hasChanged=(Ra,qa)=>!Object.is(Ra,qa),invokeArrayFns=(Ra,...qa)=>{for(let nd=0;nd<Ra.length;nd++)Ra[nd](...qa)},def$2=(Ra,qa,nd,od=!1)=>{Object.defineProperty(Ra,qa,{configurable:!0,enumerable:!1,writable:od,value:nd})},looseToNumber=Ra=>{const qa=parseFloat(Ra);return isNaN(qa)?Ra:qa},toNumber$3=Ra=>{const qa=isString$3(Ra)?Number(Ra):NaN;return isNaN(qa)?Ra:qa};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global$1<"u"?global$1:{});function normalizeStyle(Ra){if(isArray$2(Ra)){const qa={};for(let nd=0;nd<Ra.length;nd++){const od=Ra[nd],ld=isString$3(od)?parseStringStyle(od):normalizeStyle(od);if(ld)for(const ud in ld)qa[ud]=ld[ud]}return qa}else if(isString$3(Ra)||isObject$5(Ra))return Ra}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(Ra){const qa={};return Ra.replace(styleCommentRE,"").split(listDelimiterRE).forEach(nd=>{if(nd){const od=nd.split(propertyDelimiterRE);od.length>1&&(qa[od[0].trim()]=od[1].trim())}}),qa}function normalizeClass(Ra){let qa="";if(isString$3(Ra))qa=Ra;else if(isArray$2(Ra))for(let nd=0;nd<Ra.length;nd++){const od=normalizeClass(Ra[nd]);od&&(qa+=od+" ")}else if(isObject$5(Ra))for(const nd in Ra)Ra[nd]&&(qa+=nd+" ");return qa.trim()}function normalizeProps(Ra){if(!Ra)return null;let{class:qa,style:nd}=Ra;return qa&&!isString$3(qa)&&(Ra.class=normalizeClass(qa)),nd&&(Ra.style=normalizeStyle(nd)),Ra}const specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs);function includeBooleanAttr(Ra){return!!Ra||Ra===""}function looseCompareArrays(Ra,qa){if(Ra.length!==qa.length)return!1;let nd=!0;for(let od=0;nd&&od<Ra.length;od++)nd=looseEqual(Ra[od],qa[od]);return nd}function looseEqual(Ra,qa){if(Ra===qa)return!0;let nd=isDate$1(Ra),od=isDate$1(qa);if(nd||od)return nd&&od?Ra.getTime()===qa.getTime():!1;if(nd=isSymbol$1(Ra),od=isSymbol$1(qa),nd||od)return Ra===qa;if(nd=isArray$2(Ra),od=isArray$2(qa),nd||od)return nd&&od?looseCompareArrays(Ra,qa):!1;if(nd=isObject$5(Ra),od=isObject$5(qa),nd||od){if(!nd||!od)return!1;const ld=Object.keys(Ra).length,ud=
* @ vue / reactivity v3 . 5.13
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-11-28 09:28:59 +08:00
* * / l e t a c t i v e E f f e c t S c o p e ; c l a s s E f f e c t S c o p e { c o n s t r u c t o r ( q a = ! 1 ) { t h i s . d e t a c h e d = q a , t h i s . _ a c t i v e = ! 0 , t h i s . e f f e c t s = [ ] , t h i s . c l e a n u p s = [ ] , t h i s . _ i s P a u s e d = ! 1 , t h i s . p a r e n t = a c t i v e E f f e c t S c o p e , ! q a & & a c t i v e E f f e c t S c o p e & & ( t h i s . i n d e x = ( a c t i v e E f f e c t S c o p e . s c o p e s | | ( a c t i v e E f f e c t S c o p e . s c o p e s = [ ] ) ) . p u s h ( t h i s ) - 1 ) } g e t a c t i v e ( ) { r e t u r n t h i s . _ a c t i v e } p a u s e ( ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ i s P a u s e d = ! 0 ; l e t q a , n d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , n d = t h i s . s c o p e s . l e n g t h ; q a < n d ; q a + + ) t h i s . s c o p e s [ q a ] . p a u s e ( ) ; f o r ( q a = 0 , n d = t h i s . e f f e c t s . l e n g t h ; q a < n d ; q a + + ) t h i s . e f f e c t s [ q a ] . p a u s e ( ) } } r e s u m e ( ) { i f ( t h i s . _ a c t i v e & & t h i s . _ i s P a u s e d ) { t h i s . _ i s P a u s e d = ! 1 ; l e t q a , n d ; i f ( t h i s . s c o p e s ) f o r ( q a = 0 , n d = t h i s . s c o p e s . l e n g t h ; q a < n d ; q a + + ) t h i s . s c o p e s [ q a ] . r e s u m e ( ) ; f o r ( q a = 0 , n d = t h i s . e f f e c t s . l e n g t h ; q a < n d ; q a + + ) t h i s . e f f e c t s [ q a ] . r e s u m e ( ) } } r u n ( q a ) { i f ( t h i s . _ a c t i v e ) { c o n s t n d = a c t i v e E f f e c t S c o p e ; t r y { r e t u r n a c t i v e E f f e c t S c o p e = t h i s , q a ( ) } f i n a l l y { a c t i v e E f f e c t S c o p e = n d } } } o n ( ) { a c t i v e E f f e c t S c o p e = t h i s } o f f ( ) { a c t i v e E f f e c t S c o p e = t h i s . p a r e n t } s t o p ( q a ) { i f ( t h i s . _ a c t i v e ) { t h i s . _ a c t i v e = ! 1 ; l e t n d , o d ; f o r ( n d = 0 , o d = t h i s . e f f e c t s . l e n g t h ; n d < o d ; n d + + ) t h i s . e f f e c t s [ n d ] . s t o p ( ) ; f o r ( t h i s . e f f e c t s . l e n g t h = 0 , n d = 0 , o d = t h i s . c l e a n u p s . l e n g t h ; n d < o d ; n d + + ) t h i s . c l e a n u p s [ n d ] ( ) ; i f ( t h i s . c l e a n u p s . l e n g t h = 0 , t h i s . s c o p e s ) { f o r ( n d = 0 , o d = t h i s . s c o p e s . l e n g t h ; n d < o d ; n d + + ) t h i s . s c o p e s [ n d ] . s t o p ( ! 0 ) ; t h i s . s c o p e s . l e n g t h = 0 } i f ( ! t h i s . d e t a c h e d & & t h i s . p a r e n t & & ! q a ) { c o n s t l d = t h i s . p a r e n t . s c o p e s . p o p ( ) ; l d & & l d ! = = t h i s & & ( t h i s . p a r e n t . s c o p e s [ t h i s . i n d e x ] = l d , l d . i n d e x = t h i s . i n d e x ) } t h i s . p a r e n t = v o i d 0 } } } f u n c t i o n e f f e c t S c o p e ( R a ) { r e t u r n n e w E f f e c t S c o p e ( R a ) } f u n c t i o n g e t C u r r e n t S c o p e ( ) { r e t u r n a c t i v e E f f e c t S c o p e } f u n c t i o n o n S c o p e D i s p o s e ( R a , q a = ! 1 ) { a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . c l e a n u p s . p u s h ( R a ) } l e t a c t i v e S u b ; c o n s t p a u s e d Q u e u e E f f e c t s = n e w W e a k S e t ; c l a s s R e a c t i v e E f f e c t { c o n s t r u c t o r ( q a ) { t h i s . f n = q a , t h i s . d e p s = v o i d 0 , t h i s . d e p s T a i l = v o i d 0 , t h i s . f l a g s = 5 , t h i s . n e x t = v o i d 0 , t h i s . c l e a n u p = v o i d 0 , t h i s . s c h e d u l e r = v o i d 0 , a c t i v e E f f e c t S c o p e & & a c t i v e E f f e c t S c o p e . a c t i v e & & a c t i v e E f f e c t S c o p e . e f f e c t s . p u s h ( t h i s ) } p a u s e ( ) { t h i s . f l a g s | = 6 4 } r e s u m e ( ) { t h i s . f l a g s & 6 4 & & ( t h i s . f l a g s & = - 6 5 , p a u s e d Q u e u e E f f e c t s . h a s ( t h i s ) & & ( p a u s e d Q u e u e E f f e c t s . d e l e t e ( t h i s ) , t h i s . t r i g g e r ( ) ) ) } n o t i f y ( ) { t h i s . f l a g s & 2 & & ! ( t h i s . f l a g s & 3 2 ) | | t h i s . f l a g s & 8 | | b a t c h ( t h i s ) } r u n ( ) { i f ( ! ( t h i s . f l a g s & 1 ) ) r e t u r n t h i s . f n ( ) ; t h i s . f l a g s | = 2 , c l e a n u p E f f e c t ( t h i s ) , p r e p a r e D e p s ( t h i s ) ; c o n s t q a = a c t i v e S u b , n d = s h o u l d T r a c k ; a c t i v e S u b = t h i s , s h o u l d T r a c k = ! 0 ; t r y { r e t u r n t h i s . f n ( ) } f i n a l l y { c l e a n u p D e p s ( t h i s ) , a c t i v e S u b = q a , s h o u l d T r a c k = n d , t h i s . f l a g s & = - 3 } } s t o p ( ) { i f ( t h i s . f l a g s & 1 ) { f o r ( l e t q a = t h i s . d e p s ; q a ; q a = q a . n e x t D e p ) r e m o v e S u b ( q a ) ; t h i s . d e p s = t h i s . d e p s T a i l = v o i d 0 , c l e a n u p E f f e c t ( t h i s ) , t h i s . o n S t o p & & t h i s . o n S t o p ( ) , t h i s . f l a g s & = - 2 } } t r i g g e r ( ) { t h i s . f l a g s & 6 4 ? p a u s e d Q u e u e E f f e c t s . a d d ( t h i s ) : t h i s . s c h e d u l e r ? t h i s . s c h e d u l e r ( ) : t h i s . r u n I f D i r t y ( ) } r u n I f D i r t y ( ) { i s D i r t y ( t h i s ) & & t h i s . r u n ( ) } g e t d i r t y ( ) { r e t u r n i s D i r t y ( t h i s ) } } l e t b a t c h D e p t h = 0 , b a t c h e d S u b , b a t c h e d C o m p u t e d ; f u n c t i o n b a t c h ( R a , q a = ! 1 ) { i f ( R a . f l a g s | = 8 , q a ) { R a . n e x t = b a t c h e d C o m p u t e d , b a t c h e d C o m p u t e d = R a ; r e t u r n } R a . n e x t = b a t c h e d S u b , b a t c h e d S u b = R a } f u n c t i o n s t a r t B a t c h ( ) { b a t c h D e p t h + + } f u n c t i o n e n d B a t c h ( ) { i f ( - - b a t c h D e p t h > 0 ) r e t u r n ; i f ( b a t c h e d C o m p u t e d ) { l e t q a = b a t c h e d C o m p u t e d ; f o r ( b a t c h e d C o m p u t e d = v o i d 0 ; q a ; ) { c o n s t n d = q a . n e x t ; q a . n e x t = v o i d 0 , q a . f l a g s & = - 9 , q a = n d } } l e t R a ; f o r ( ; b a t c h e d S u b ; ) { l e t q a = b a t c h e d S u b ; f o r ( b a t c h e d S u b = v o i d 0 ; q a ; ) { c o n s t n d = q a . n e x t ; i f ( q a . n e x t = v o i d 0 , q a . f l a g s & = - 9 , q a . f l a g s & 1 ) t r y { q a . t r i g g e r ( ) } c a t c h ( o d ) { R a | | ( R a = o d ) } q a = n d } } i f ( R a ) t h r o w R a } f u n c t i o n p r e p a r e D e p s ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) q a . v e r s i o n = - 1 , q a . p r e v A c t i v e L i n k = q a . d e p . a c t i v e L i n k , q a . d e p . a c t i v e L i n k = q a } f u n c t i o n c l e a n u p D e p s ( R a ) { l e t q a , n d = R a . d e p s T a i l , o d = n d ; f o r ( ; o d ; ) { c o n s t l d = o d . p r e v D e p ; o d . v e r s i o n = = = - 1 ? ( o d = = = n d & & ( n d = l d ) , r e m o v e S u b ( o d ) , r e m o v e D e p ( o d ) ) : q a = o d , o d . d e p . a c t i v e L i n k = o d . p r e v A c t i v e L i n k , o d . p r e v A c t i v e L i n k = v o i d 0 , o d = l d } R a . d e p s = q a , R a . d e p s T a i l = n d } f u n c t i o n i s D i r t y ( R a ) { f o r ( l e t q a = R a . d e p s ; q a ; q a = q a . n e x t D e p ) i f ( q a . d e p . v e r s i o n ! = = q a . v e r s i o n | | q a . d e p . c o m p u t e d & & ( r e f r e s h C o m p u t e d ( q a . d e p . c o m p u t e d ) | | q a . d e p . v e r s i o n ! = = q a . v e r s i o n ) ) r e t u r n ! 0 ; r e t u r n ! ! R a . _ d i r t y } f u n c t i o n r e f r e s h C o m p u t e d ( R a ) { i f ( R a . f l a g s & 4 & & ! ( R a . f l a g s & 1 6 ) | | ( R a . f l a g s & = - 1 7 , R a . g l o b a l V e r s i o n = = = g l o b a l V e r s i o n ) ) r e t u r n ; R a . g l o b a l V e r s i o n = g l o b a l V e r s i o n ; c o n s t q a = R a . d e p ; i f ( R a . f l a g s | = 2 , q a . v e r s i o n > 0 & & ! R a . i s S S R & & R a . d e p s & & ! i s D i r t y ( R a ) ) { R a . f l a g s & = - 3 ; r
* @ vue / runtime - core v3 . 5.13
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-11-28 09:28:59 +08:00
* * / c o n s t s t a c k = [ ] ; l e t i s W a r n i n g = ! 1 ; f u n c t i o n w a r n $ 1 ( R a , . . . q a ) { i f ( i s W a r n i n g ) r e t u r n ; i s W a r n i n g = ! 0 , p a u s e T r a c k i n g ( ) ; c o n s t n d = s t a c k . l e n g t h ? s t a c k [ s t a c k . l e n g t h - 1 ] . c o m p o n e n t : n u l l , o d = n d & & n d . a p p C o n t e x t . c o n f i g . w a r n H a n d l e r , l d = g e t C o m p o n e n t T r a c e ( ) ; i f ( o d ) c a l l W i t h E r r o r H a n d l i n g ( o d , n d , 1 1 , [ R a + q a . m a p ( u d = > { v a r c d , d d ; r e t u r n ( d d = ( c d = u d . t o S t r i n g ) = = n u l l ? v o i d 0 : c d . c a l l ( u d ) ) ! = n u l l ? d d : J S O N . s t r i n g i f y ( u d ) } ) . j o i n ( " " ) , n d & & n d . p r o x y , l d . m a p ( ( { v n o d e : u d } ) = > ` a t < $ { f o r m a t C o m p o n e n t N a m e ( n d , u d . t y p e ) } > ` ) . j o i n ( `
` ),ld]);else{const ud=[ ` [ Vue warn ] : $ { Ra } ` ,...qa];ld.length&&ud.push( `
` ,...formatTrace(ld)),console.warn(...ud)}resetTracking(),isWarning=!1}function getComponentTrace(){let Ra=stack[stack.length-1];if(!Ra)return[];const qa=[];for(;Ra;){const nd=qa[0];nd&&nd.vnode===Ra?nd.recurseCount++:qa.push({vnode:Ra,recurseCount:0});const od=Ra.component&&Ra.component.parent;Ra=od&&od.vnode}return qa}function formatTrace(Ra){const qa=[];return Ra.forEach((nd,od)=>{qa.push(...od===0?[]:[ `
2024-12-08 09:17:51 +08:00
` ],...formatTraceEntry(nd))}),qa}function formatTraceEntry({vnode:Ra,recurseCount:qa}){const nd=qa>0? ` ... ( $ { qa } recursive calls ) ` :"",od=Ra.component?Ra.component.parent==null:!1,ld= ` at < $ { formatComponentName ( Ra . component , Ra . type , od ) } ` ,ud=">"+nd;return Ra.props?[ld,...formatProps(Ra.props),ud]:[ld+ud]}function formatProps(Ra){const qa=[],nd=Object.keys(Ra);return nd.slice(0,3).forEach(od=>{qa.push(...formatProp(od,Ra[od]))}),nd.length>3&&qa.push(" ..."),qa}function formatProp(Ra,qa,nd){return isString $ 3(qa)?(qa=JSON.stringify(qa),nd?qa:[ ` $ { Ra } = $ { qa } ` ]):typeof qa=="number"||typeof qa=="boolean"||qa==null?nd?qa:[ ` $ { Ra } = $ { qa } ` ]:isRef(qa)?(qa=formatProp(Ra,toRaw(qa.value),!0),nd?qa:[ ` $ { Ra } = Ref < ` ,qa,">"]):isFunction $ 4(qa)?[ ` $ { Ra } = fn$ { qa . name ? ` < ${ qa . name } > ` : "" } ` ]:(qa=toRaw(qa),nd?qa:[ ` $ { Ra } = ` ,qa])}function callWithErrorHandling(Ra,qa,nd,od){try{return od?Ra(...od):Ra()}catch(ld){handleError $ 1(ld,qa,nd)}}function callWithAsyncErrorHandling(Ra,qa,nd,od){if(isFunction $ 4(Ra)){const ld=callWithErrorHandling(Ra,qa,nd,od);return ld&&isPromise(ld)&&ld.catch(ud=>{handleError $ 1(ud,qa,nd)}),ld}if(isArray $ 2(Ra)){const ld=[];for(let ud=0;ud<Ra.length;ud++)ld.push(callWithAsyncErrorHandling(Ra[ud],qa,nd,od));return ld}}function handleError $ 1(Ra,qa,nd,od=!0){const ld=qa?qa.vnode:null,{errorHandler:ud,throwUnhandledErrorInProduction:cd}=qa&&qa.appContext.config||EMPTY_OBJ;if(qa){let dd=qa.parent;const pd=qa.proxy,fd= ` https : //vuejs.org/error-reference/#runtime-${nd}`;for(;dd;){const md=dd.ec;if(md){for(let vd=0;vd<md.length;vd++)if(md[vd](Ra,pd,fd)===!1)return}dd=dd.parent}if(ud){pauseTracking(),callWithErrorHandling(ud,null,10,[Ra,pd,fd]),resetTracking();return}}logError(Ra,nd,ld,od,cd)}function logError(Ra,qa,nd,od=!0,ld=!1){if(ld)throw Ra;console.error(Ra)}const queue$2=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick$1(Ra){const qa=currentFlushPromise||resolvedPromise;return Ra?qa.then(this?Ra.bind(this):Ra):qa}function findInsertionIndex(Ra){let qa=flushIndex+1,nd=queue$2.length;for(;qa<nd;){const od=qa+nd>>>1,ld=queue$2[od],ud=getId(ld);ud<Ra||ud===Ra&&ld.flags&2?qa=od+1:nd=od}return qa}function queueJob(Ra){if(!(Ra.flags&1)){const qa=getId(Ra),nd=queue$2[queue$2.length-1];!nd||!(Ra.flags&2)&&qa>=getId(nd)?queue$2.push(Ra):queue$2.splice(findInsertionIndex(qa),0,Ra),Ra.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(Ra){isArray$2(Ra)?pendingPostFlushCbs.push(...Ra):activePostFlushCbs&&Ra.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,Ra):Ra.flags&1||(pendingPostFlushCbs.push(Ra),Ra.flags|=1),queueFlush()}function flushPreFlushCbs(Ra,qa,nd=flushIndex+1){for(;nd<queue$2.length;nd++){const od=queue$2[nd];if(od&&od.flags&2){if(Ra&&od.id!==Ra.uid)continue;queue$2.splice(nd,1),nd--,od.flags&4&&(od.flags&=-2),od(),od.flags&4||(od.flags&=-2)}}}function flushPostFlushCbs(Ra){if(pendingPostFlushCbs.length){const qa=[...new Set(pendingPostFlushCbs)].sort((nd,od)=>getId(nd)-getId(od));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...qa);return}for(activePostFlushCbs=qa,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const nd=activePostFlushCbs[postFlushIndex];nd.flags&4&&(nd.flags&=-2),nd.flags&8||nd(),nd.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=Ra=>Ra.id==null?Ra.flags&2?-1:1/0:Ra.id;function flushJobs(Ra){try{for(flushIndex=0;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&!(qa.flags&8)&&(qa.flags&4&&(qa.flags&=-2),callWithErrorHandling(qa,qa.i,qa.i?15:14),qa.flags&4||(qa.flags&=-2))}}finally{for(;flushIndex<queue$2.length;flushIndex++){const qa=queue$2[flushIndex];qa&&(qa.flags&=-2)}flushIndex=-1,queue$2.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue$2.length||pendingPostFlushCbs.length)&&flushJobs()}}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(Ra)
2024-11-28 09:28:59 +08:00
* @ vue / runtime - dom v3 . 5.13
2024-09-18 09:46:23 +08:00
* ( c ) 2018 - present Yuxi ( Evan ) You and Vue contributors
* @ license MIT
2024-12-08 09:17:51 +08:00
* * /let policy;const tt$5=typeof window<"u"&&window.trustedTypes;if(tt$5)try{policy=tt$5.createPolicy("vue",{createHTML:Ra=>Ra})}catch{}const unsafeToTrustedHTML=policy?Ra=>policy.createHTML(Ra):Ra=>Ra,svgNS="http:/ / www . w3 . org / 2000 / svg ",mathmlNS=" http : //www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(Ra,qa,nd)=>{qa.insertBefore(Ra,nd||null)},remove:Ra=>{const qa=Ra.parentNode;qa&&qa.removeChild(Ra)},createElement:(Ra,qa,nd,od)=>{const ld=qa==="svg"?doc.createElementNS(svgNS,Ra):qa==="mathml"?doc.createElementNS(mathmlNS,Ra):nd?doc.createElement(Ra,{is:nd}):doc.createElement(Ra);return Ra==="select"&&od&&od.multiple!=null&&ld.setAttribute("multiple",od.multiple),ld},createText:Ra=>doc.createTextNode(Ra),createComment:Ra=>doc.createComment(Ra),setText:(Ra,qa)=>{Ra.nodeValue=qa},setElementText:(Ra,qa)=>{Ra.textContent=qa},parentNode:Ra=>Ra.parentNode,nextSibling:Ra=>Ra.nextSibling,querySelector:Ra=>doc.querySelector(Ra),setScopeId(Ra,qa){Ra.setAttribute(qa,"")},insertStaticContent(Ra,qa,nd,od,ld,ud){const cd=nd?nd.previousSibling:qa.lastChild;if(ld&&(ld===ud||ld.nextSibling))for(;qa.insertBefore(ld.cloneNode(!0),nd),!(ld===ud||!(ld=ld.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(od==="svg"?`<svg>${Ra}</svg>`:od==="mathml"?`<math>${Ra}</math>`:Ra);const dd=templateContainer.content;if(od==="svg"||od==="mathml"){const pd=dd.firstChild;for(;pd.firstChild;)dd.appendChild(pd.firstChild);dd.removeChild(pd)}qa.insertBefore(dd,nd)}return[cd?cd.nextSibling:qa.firstChild,nd?nd.previousSibling:qa.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$3({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=Ra=>(Ra.displayName="Transition",Ra.props=TransitionPropsValidators,Ra),Transition$1=decorate$1((Ra,{slots:qa})=>h$1(BaseTransition,resolveTransitionProps(Ra),qa)),callHook=(Ra,qa=[])=>{isArray$2(Ra)?Ra.forEach(nd=>nd(...qa)):Ra&&Ra(...qa)},hasExplicitCallback=Ra=>Ra?isArray$2(Ra)?Ra.some(qa=>qa.length>1):Ra.length>1:!1;function resolveTransitionProps(Ra){const qa={};for(const _f in Ra)_f in DOMTransitionPropsValidators||(qa[_f]=Ra[_f]);if(Ra.css===!1)return qa;const{name:nd="v",type:od,duration:ld,enterFromClass:ud=`${nd}-enter-from`,enterActiveClass:cd=`${nd}-enter-active`,enterToClass:dd=`${nd}-enter-to`,appearFromClass:pd=ud,appearActiveClass:fd=cd,appearToClass:md=dd,leaveFromClass:vd=`${nd}-leave-from`,leaveActiveClass:Ad=`${nd}-leave-active`,leaveToClass:Nd=`${nd}-leave-to`}=Ra,Id=normalizeDuration(ld),Od=Id&&Id[0],Fd=Id&&Id[1],{onBeforeEnter:Pd,onEnter:Md,onEnterCancelled:Bd,onLeave:jd,onLeaveCancelled:Hd,onBeforeAppear:Gd=Pd,onAppear:zd=Md,onAppearCancelled:df=Bd}=qa,Wd=(_f,vf,Sf,gf)=>{_f._enterCancelled=gf,removeTransitionClass(_f,vf?md:dd),removeTransitionClass(_f,vf?fd:cd),Sf&&Sf()},Jd=(_f,vf)=>{_f._isLeaving=!1,removeTransitionClass(_f,vd),removeTransitionClass(_f,Nd),removeTransitionClass(_f,Ad),vf&&vf()},Xd=_f=>(vf,Sf)=>{const gf=_f?zd:Md,bf=()=>Wd(vf,_f,Sf);callHook(gf,[vf,bf]),nextFrame(()=>{removeTransitionClass(vf,_f?pd:ud),addTransitionClass(vf,_f?md:dd),hasExplicitCallback(gf)||whenTransitionEnds(vf,od,Od,bf)})};return extend$3(qa,{onBeforeEnter(_f){callHook(Pd,[_f]),addTransitionClass(_f,ud),addTransitionClass(_f,cd)},onBeforeAppear(_f){callHook(Gd,[_f]),addTransitionClass(_f,pd),addTransitionClass(_f,fd)},onEnter:Xd(!1),onAppear:Xd(!0),onLeave(_f,vf){_f._isLeaving=!0;const Sf=()=>Jd(_f,vf);addTransitionClass(_f,vd),_f._enterCancelled?(addTransitionClass(_f,Ad),forceReflow()):(forceReflow(),addTransitionClass(_f,Ad)),nextFrame(()=>{_f._isLeaving&&(removeTransitionClass(_f,vd),addTransitionClass(_f,Nd),hasExplici
2024-09-18 09:46:23 +08:00
( ? :
2024-11-28 09:28:59 +08:00
( ? : ` +od+":){7}(?:"+od+ ` | : ) | // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
( ? : ` +od+":){6}(?:"+nd+"|:"+od+ ` | : ) | // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
( ? : ` +od+":){5}(?::"+nd+"|(?::"+od+ ` ) { 1 , 2 } | : ) | // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
( ? : ` +od+":){4}(?:(?::"+od+"){0,1}:"+nd+"|(?::"+od+ ` ) { 1 , 3 } | : ) | // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
( ? : ` +od+":){3}(?:(?::"+od+"){0,2}:"+nd+"|(?::"+od+ ` ) { 1 , 4 } | : ) | // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
( ? : ` +od+":){2}(?:(?::"+od+"){0,3}:"+nd+"|(?::"+od+ ` ) { 1 , 5 } | : ) | // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
( ? : ` +od+":){1}(?:(?::"+od+"){0,4}:"+nd+"|(?::"+od+ ` ) { 1 , 6 } | : ) | // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
( ? : : ( ? : ( ? : : ` +od+"){0,5}:"+nd+"|(?::"+od+ ` ) { 1 , 7 } | : ) ) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
2024-09-18 09:46:23 +08:00
) ( ? : % [ 0 - 9 a - zA - Z ] { 1 , } ) ? // %eth0 %1
2024-12-08 09:17:51 +08:00
` ).replace(/ \s * \/ \/ .* $ /gm,"").replace(/ \n /g,"").trim(),ud=new RegExp("(?:^"+nd+" $ )|(?:^"+ld+" $ )"),cd=new RegExp("^"+nd+" $ "),dd=new RegExp("^"+ld+" $ "),pd=function(jd){return jd&&jd.exact?ud:new RegExp("(?:"+qa(jd)+nd+qa(jd)+")|(?:"+qa(jd)+ld+qa(jd)+")","g")};pd.v4=function(Bd){return Bd&&Bd.exact?cd:new RegExp(""+qa(Bd)+nd+qa(Bd),"g")},pd.v6=function(Bd){return Bd&&Bd.exact?dd:new RegExp(""+qa(Bd)+ld+qa(Bd),"g")};var fd="(?:(?:[a-z]+:)?//)",md="(?: \\ S+(?:: \\ S*)?@)?",vd=pd.v4().source,Ad=pd.v6().source,Nd="(?:(?:[a-z \\ u00a1- \\ uffff0-9][-_]*)*[a-z \\ u00a1- \\ uffff0-9]+)",Id="(?: \\ .(?:[a-z \\ u00a1- \\ uffff0-9]-*)*[a-z \\ u00a1- \\ uffff0-9]+)*",Od="(?: \\ .(?:[a-z \\ u00a1- \\ uffff]{2,}))",Fd="(?:: \\ d{2,5})?",Pd='(?:[/?#][^ \\ s"]*)?',Md="(?:"+fd+"|www \\ .)"+md+"(?:localhost|"+vd+"|"+Ad+"|"+Nd+Id+Od+")"+Fd+Pd;return urlReg=new RegExp("(?:^"+Md+" $ )","i"),urlReg},pattern $ 2={email:/^(([^<>() \[ \] \\ .,;: \s @"]+( \. [^<>() \[ \] \\ .,;: \s @"]+)*)|(".+"))@(( \[ [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3} \. [0-9]{1,3}])|(([a-zA-Z \- 0-9 \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]+ \. )+[a-zA-Z \u 00A0- \u D7FF \u F900- \u FDCF \u FDF0- \u FFEF]{2,})) $ /,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3}) $ /i},types $ 1={integer:function(qa){return types $ 1.number(qa)&&parseInt(qa,10)===qa},float:function(qa){return types $ 1.number(qa)&&!types $ 1.integer(qa)},array:function(qa){return Array.isArray(qa)},regexp:function(qa){if(qa instanceof RegExp)return!0;try{return!!new RegExp(qa)}catch{return!1}},date:function(qa){return typeof qa.getTime=="function"&&typeof qa.getMonth=="function"&&typeof qa.getYear=="function"&&!isNaN(qa.getTime())},number:function(qa){return isNaN(qa)?!1:typeof qa=="number"},object:function(qa){return typeof qa=="object"&&!types $ 1.array(qa)},method:function(qa){return typeof qa=="function"},email:function(qa){return typeof qa=="string"&&qa.length<=320&&!!qa.match(pattern $ 2.email)},url:function(qa){return typeof qa=="string"&&qa.length<=2048&&!!qa.match(getUrlRegex())},hex:function(qa){return typeof qa=="string"&&!!qa.match(pattern $ 2.hex)}},type $ 1 $ 1=function(qa,nd,od,ld,ud){if(qa.required&&nd===void 0){required $ 1(qa,nd,od,ld,ud);return}var cd=["integer","float","array","regexp","object","method","email","number","date","url","hex"],dd=qa.type;cd.indexOf(dd)>-1?types $ 1[dd](nd)||ld.push(format $ 2(ud.messages.types[dd],qa.fullField,qa.type)):dd&&typeof nd!==qa.type&&ld.push(format $ 2(ud.messages.types[dd],qa.fullField,qa.type))},range $ 2=function(qa,nd,od,ld,ud){var cd=typeof qa.len=="number",dd=typeof qa.min=="number",pd=typeof qa.max=="number",fd=/[ \u D800- \u DBFF][ \u DC00- \u DFFF]/g,md=nd,vd=null,Ad=typeof nd=="number",Nd=typeof nd=="string",Id=Array.isArray(nd);if(Ad?vd="number":Nd?vd="string":Id&&(vd="array"),!vd)return!1;Id&&(md=nd.length),Nd&&(md=nd.replace(fd,"_").length),cd?md!==qa.len&&ld.push(format $ 2(ud.messages[vd].len,qa.fullField,qa.len)):dd&&!pd&&md<qa.min?ld.push(format $ 2(ud.messages[vd].min,qa.fullField,qa.min)):pd&&!dd&&md>qa.max?ld.push(format $ 2(ud.messages[vd].max,qa.fullField,qa.max)):dd&&pd&&(md<qa.min||md>qa.max)&&ld.push(format $ 2(ud.messages[vd].range,qa.fullField,qa.min,qa.max))},ENUM $ 1="enum",enumerable $ 1=function(qa,nd,od,ld,ud){qa[ENUM $ 1]=Array.isArray(qa[ENUM $ 1])?qa[ENUM $ 1]:[],qa[ENUM $ 1].indexOf(nd)===-1&&ld.push(format $ 2(ud.messages[ENUM $ 1],qa.fullField,qa[ENUM $ 1].join(", ")))},pattern $ 1=function(qa,nd,od,ld,ud){if(qa.pattern){if(qa.pattern instanceof RegExp)qa.pattern.lastIndex=0,qa.pattern.test(nd)||ld.push(format $ 2(ud.messages.pattern.mismatch,qa.fullField,nd,qa.pattern));else if(typeof qa.pattern=="string"){var cd=new RegExp(qa.pattern);cd.test(nd)||ld.push(format $ 2(ud.messages.pattern.mismatch,qa.fullField,nd,qa.pattern))}}},rules={required:required $ 1,whitespace:whitespace $ 2,type:type $ 1 $ 1,range:range $ 2,enum:enumerable $ 1,pattern:pattern $ 1},string=function(qa,nd,od,ld,ud){var cd=[],dd=qa.required||!qa.required&&ld.hasOwnProperty(qa.field);if(dd){if(isEmptyValue(nd,"string")&&!qa.required)return od();rules.required(qa,nd,ld,cd,ud,"string"),isEmptyValue(nd,"string")||(rules.type(qa,nd,ld,cd,ud),rules.range(qa,nd,ld,cd,ud),rules.pattern(qa,nd,ld,cd,ud),qa.whitespace===!0&
2024-09-18 09:46:23 +08:00
height : 0 ! important ;
visibility : hidden ! important ;
$ { isFirefox ( ) ? "" : "overflow:hidden !important;" }
position : absolute ! important ;
z - index : - 1000 ! important ;
top : 0 ! important ;
right : 0 ! important ;
2024-12-08 09:17:51 +08:00
` ,CONTEXT_STYLE=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function calculateNodeStyling(Ra){const qa=window.getComputedStyle(Ra),nd=qa.getPropertyValue("box-sizing"),od=Number.parseFloat(qa.getPropertyValue("padding-bottom"))+Number.parseFloat(qa.getPropertyValue("padding-top")),ld=Number.parseFloat(qa.getPropertyValue("border-bottom-width"))+Number.parseFloat(qa.getPropertyValue("border-top-width"));return{contextStyle:CONTEXT_STYLE.map(cd=> ` $ { cd } : $ { qa . getPropertyValue ( cd ) } ` ).join(";"),paddingSize:od,borderSize:ld,boxSizing:nd}}function calcTextareaHeight(Ra,qa=1,nd){var od;hiddenTextarea||(hiddenTextarea=document.createElement("textarea"),document.body.appendChild(hiddenTextarea));const{paddingSize:ld,borderSize:ud,boxSizing:cd,contextStyle:dd}=calculateNodeStyling(Ra);hiddenTextarea.setAttribute("style", ` $ { dd } ; $ { HIDDEN _STYLE } ` ),hiddenTextarea.value=Ra.value||Ra.placeholder||"";let pd=hiddenTextarea.scrollHeight;const fd={};cd==="border-box"?pd=pd+ud:cd==="content-box"&&(pd=pd-ld),hiddenTextarea.value="";const md=hiddenTextarea.scrollHeight-ld;if(isNumber $ 4(qa)){let vd=md*qa;cd==="border-box"&&(vd=vd+ld+ud),pd=Math.max(vd,pd),fd.minHeight= ` $ { vd } px ` }if(isNumber $ 4(nd)){let vd=md*nd;cd==="border-box"&&(vd=vd+ld+ud),pd=Math.min(vd,pd)}return fd.height= ` $ { pd } px ` ,(od=hiddenTextarea.parentNode)==null||od.removeChild(hiddenTextarea),hiddenTextarea=void 0,fd}const inputProps=buildProps({id:{type:String,default:void 0},size:useSizeProp,disabled:Boolean,modelValue:{type:definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:iconPropType},prefixIcon:{type:iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:definePropType([Object,Array,String]),default:()=>mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...useAriaProps(["ariaLabel"])}),inputEmits={[UPDATE_MODEL_EVENT]:Ra=>isString $ 3(Ra),input:Ra=>isString $ 3(Ra),change:Ra=>isString $ 3(Ra),focus:Ra=>Ra instanceof FocusEvent,blur:Ra=>Ra instanceof FocusEvent,clear:()=>!0,mouseleave:Ra=>Ra instanceof MouseEvent,mouseenter:Ra=>Ra instanceof MouseEvent,keydown:Ra=>Ra instanceof Event,compositionstart:Ra=>Ra instanceof CompositionEvent,compositionupdate:Ra=>Ra instanceof CompositionEvent,compositionend:Ra=>Ra instanceof CompositionEvent},__default__ $ s=defineComponent({name:"ElInput",inheritAttrs:!1}),_sfc_main $ 1q=defineComponent({...__default__ $ s,props:inputProps,emits:inputEmits,setup(Ra,{expose:qa,emit:nd}){const od=Ra,ld=useAttrs $ 1(),ud=useAttrs(),cd=useSlots(),dd=computed(()=>[od.type==="textarea"?Od.b():Id.b(),Id.m(Ad.value),Id.is("disabled",Nd.value),Id.is("exceed", $ f.value),{[Id.b("group")]:cd.prepend||cd.append,[Id.m("prefix")]:cd.prefix||od.prefixIcon,[Id.m("suffix")]:cd.suffix||od.suffixIcon||od.clearable||od.showPassword,[Id.bm("suffix","password-clear")]:Mf.value&&Kf.value,[Id.b("hidden")]:od.type==="hidden"},ld.class]),pd=computed(()=>[Id.e("wrapper"),Id.is("focus",df.value)]),{form:fd,formItem:md}=useFormItem(),{inputId:vd}=useFormItemInputId(od,{formItemContext:md}),Ad=useFormSize(),Nd=useFormDisabled(),Id=useNamespace("input"),Od=useNamespace("textarea"),Fd=shallowRef(),Pd=shallowRef(),Md=ref $ 1(!1),Bd=ref $ 1(!1),jd=ref $ 1(),Hd=shallowRef(od.inputStyle),Gd=computed(()=>Fd.value||Pd.value),{wrapperRef:zd,isFocused:df,handleFocus:Wd,handleBlur:Jd}=useFocusController(Gd,{beforeFocus(){return Nd.value},afterBlur(){var dh;od.validateEvent&&((dh=md=
2024-09-18 09:46:23 +08:00
M 50 50
2024-11-28 09:28:59 +08:00
m 0 $ { jd ? "" : "-" } $ { Bd }
a $ { Bd } $ { Bd } 0 1 1 0 $ { jd ? "-" : "" } $ { Bd * 2 }
a $ { Bd } $ { Bd } 0 1 1 0 $ { jd ? "" : "-" } $ { Bd * 2 }
2024-12-08 09:17:51 +08:00
` }),pd=computed(()=>2*Math.PI*cd.value),fd=computed(()=>qa.type==="dashboard"?.75:1),md=computed(()=> ` $ { - 1 * pd . value * ( 1 - fd . value ) / 2 } px ` ),vd=computed(()=>({strokeDasharray: ` $ { pd . value * fd . value } px , $ { pd . value } px ` ,strokeDashoffset:md.value})),Ad=computed(()=>({strokeDasharray: ` $ { pd . value * fd . value * ( qa . percentage / 100 ) } px , $ { pd . value } px ` ,strokeDashoffset:md.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),Nd=computed(()=>{let Bd;return qa.color?Bd=Md(qa.percentage):Bd=nd[qa.status]||nd.default,Bd}),Id=computed(()=>qa.status==="warning"?warning_filled_default:qa.type==="line"?qa.status==="success"?circle_check_default:circle_close_default:qa.status==="success"?check_default:close_default),Od=computed(()=>qa.type==="line"?12+qa.strokeWidth*.4:qa.width*.111111+2),Fd=computed(()=>qa.format(qa.percentage));function Pd(Bd){const jd=100/Bd.length;return Bd.map((Gd,zd)=>isString $ 3(Gd)?{color:Gd,percentage:(zd+1)*jd}:Gd).sort((Gd,zd)=>Gd.percentage-zd.percentage)}const Md=Bd=>{var jd;const{color:Hd}=qa;if(isFunction $ 4(Hd))return Hd(Bd);if(isString $ 3(Hd))return Hd;{const Gd=Pd(Hd);for(const zd of Gd)if(zd.percentage>Bd)return zd.color;return(jd=Gd[Gd.length-1])==null?void 0:jd.color}};return(Bd,jd)=>(openBlock(),createElementBlock("div",{class:normalizeClass([unref(od).b(),unref(od).m(Bd.type),unref(od).is(Bd.status),{[unref(od).m("without-text")]:!Bd.showText,[unref(od).m("text-inside")]:Bd.textInside}]),role:"progressbar","aria-valuenow":Bd.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[Bd.type==="line"?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(od).b("bar"))},[createBaseVNode("div",{class:normalizeClass(unref(od).be("bar","outer")),style:normalizeStyle({height: ` $ { Bd . strokeWidth } px ` })},[createBaseVNode("div",{class:normalizeClass([unref(od).be("bar","inner"),{[unref(od).bem("bar","inner","indeterminate")]:Bd.indeterminate},{[unref(od).bem("bar","inner","striped")]:Bd.striped},{[unref(od).bem("bar","inner","striped-flow")]:Bd.stripedFlow}]),style:normalizeStyle(unref(ld))},[(Bd.showText||Bd. $ slots.default)&&Bd.textInside?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(unref(od).be("bar","innerText"))},[renderSlot(Bd. $ slots,"default",{percentage:Bd.percentage},()=>[createBaseVNode("span",null,toDisplayString(unref(Fd)),1)])],2)):createCommentVNode("v-if",!0)],6)],6)],2)):(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(od).b("circle")),style:normalizeStyle({height: ` $ { Bd . width } px ` ,width: ` $ { Bd . width } px ` })},[(openBlock(),createElementBlock("svg",{viewBox:"0 0 100 100"},[createBaseVNode("path",{class:normalizeClass(unref(od).be("circle","track")),d:unref(dd),stroke: ` var ( $ { unref ( od ) . cssVarName ( "fill-color-light" ) } , # e5e9f2 ) ` ,"stroke-linecap":Bd.strokeLinecap,"stroke-width":unref(ud),fill:"none",style:normalizeStyle(unref(vd))},null,14,["d","stroke","stroke-linecap","stroke-width"]),createBaseVNode("path",{class:normalizeClass(unref(od).be("circle","path")),d:unref(dd),stroke:unref(Nd),fill:"none",opacity:Bd.percentage?1:0,"stroke-linecap":Bd.strokeLinecap,"stroke-width":unref(ud),style:normalizeStyle(unref(Ad))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(Bd.showText||Bd. $ slots.default)&&!Bd.textInside?(openBlock(),createElementBlock("div",{key:2,class:normalizeClass(unref(od).e("text")),style:normalizeStyle({fontSize: ` $ { unref ( Od ) } px ` })},[renderSlot(Bd. $ slots,"default",{percentage:Bd.percentage},()=>[Bd.status?(openBlock(),createBlock(unref(ElIcon),{key:1},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(Id))))]),_:1})):(openBlock(),createElementBlock("span",{key:0},toDisplayString(unref(Fd)),1))])],6)):createCommentVNode("v-if",!0)],10,["aria-valuenow"]))}});var Progress=_export_sfc $ 1(_sfc_main $ Y,[["__file","progress.vue"]]);const ElProgress=withInstall(Progress),switchProps=buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:isValidComponentSize},width:{type:[String,Number],default:"
2024-09-18 09:46:23 +08:00
欢迎来到 Markdown 的奇妙世界 ! 无论你是写作爱好者 、 开发者 、 博主 , 还是想要简单记录点什么的人 , Markdown 都能成为你新的好伙伴 。 它不仅让写作变得简单明了 , 还能轻松地将内容转化为漂亮的网页格式 。 今天 , 我们将全面探讨 Markdown 的基础和进阶语法 , 让你在这个过程中充分享受写作的乐趣 !
Markdown 是一种轻量级标记语言 , 用于格式化纯文本 。 它以简单 、 直观的语法而著称 , 可以快速地生成 HTML 。 Markdown 是写作与代码的完美结合 , 既简单又强大 。
# # Markdown 基础语法
# # # 1. 标题 : 让你的内容层次分明
2024-09-29 10:14:52 +08:00
用 \ ` # \` 号来创建标题。标题从 \` # \` 开始, \` # \` 的数量表示标题的级别。
2024-09-18 09:46:23 +08:00
\ ` \` \` markdown
# 一级标题
# # 二级标题
# # # 三级标题
# # # # 四级标题
\ ` \` \`
以上代码将渲染出一组层次分明的标题 , 使你的文章井井有条 。
# # # 2. 段落与换行 : 自然流畅
Markdown 中的段落就是一行接一行的文本 。 要创建新段落 , 只需在两行文本之间空一行 。
# # # 3. 字体样式 : 强调你的文字
- * * 粗体 * * : 用两个星号或下划线包裹文字 , 如 \ ` **粗体** \` 或 \` __粗体__ \` 。
- _斜体 _ : 用一个星号或下划线包裹文字 , 如 \ ` *斜体* \` 或 \` _斜体_ \` 。
- ~ ~ 删除线 ~ ~ : 用两个波浪线包裹文字 , 如 \ ` ~~删除线~~ \` 。
这些简单的标记可以让你的内容更有层次感和重点突出 。
# # # 4. 列表 : 整洁有序
- * * 无序列表 * * : 用 \ ` - \` 、 \` * \` 或 \` + \` 加空格开始一行。
- * * 有序列表 * * : 使用数字加点号 ( \ ` 1. \` 、 \` 2. \` )开始一行。
在列表中嵌套其他内容 ? 只需缩进即可实现嵌套效果 。
- 无序列表项 1
1. 嵌套有序列表项 1
2. 嵌套有序列表项 2
- 无序列表项 2
1. 有序列表项 1
2. 有序列表项 2
# # # 5. 链接与图片 : 丰富内容
- * * 链接 * * : 用方括号和圆括号创建链接 \ ` [显示文本](链接地址) \` 。
- * * 图片 * * : 和链接类似 , 只需在前面加上 \ ` ! \` ,如 \` ![描述文本](图片链接) \` 。
[ 访问 Doocs ] ( https : //github.com/doocs)
! [ doocs ] ( https : //cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/logo-2.png)
轻松实现富媒体内容展示 !
2024-11-28 09:28:59 +08:00
> 因微信公众号平台不支持除公众号文章以外的链接 , 故其他平台的链接 , 会呈现链接样式但无法点击跳转 。
2024-09-18 09:46:23 +08:00
> 对于这些链接请注意明文书写 , 或点击左上角 「 格式 - > 微信外链接转底部引用 」 开启引用 , 这样就可以在底部观察到链接指向 。
# # # 6. 引用 : 引用名言或引人深思的句子
使用 \ ` > \` 来创建引用,只需在文本前面加上它。多层引用?在前一层 \` > \` 后再加一个就行。
> 这是一个引用
>
> > 这是一个嵌套引用
这让你的引用更加富有层次感 。
# # # 7. 代码块 : 展示你的代码
- * * 行内代码 * * : 用反引号包裹 , 如 \ ` code \` 。
- * * 代码块 * * : 用三个反引号包裹 , 并指定语言 , 如 :
\ ` \` \` js
console . log ( "Hello, Doocs!" ) ;
\ ` \` \`
语法高亮让你的代码更易读 。
# # # 8. 分割线 : 分割内容
用三个或更多的 \ ` - \` 、 \` * \` 或 \` _ \` 来创建分割线。
-- -
为你的内容添加视觉分隔 。
# # # 9. 表格 : 清晰展示数据
Markdown 支持简单的表格 , 用 \ ` | \` 和 \` - \` 分隔单元格和表头。
| 项目人员 | 邮箱 | 微信号 |
| -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | -- -- -- -- -- -- -- -- -- -- -- | -- -- -- -- -- -- |
| [ yanglbme ] ( https : //github.com/yanglbme) | contact@yanglibin.info | YLB0109 |
| [ YangFong ] ( https : //github.com/YangFong) | yangfong2022@gmail.com | yq2419731931 |
| [ thinkasany ] ( https : //github.com/thinkasany) | thinkasany@gmail.com | thinkasany |
这样的表格让数据展示更为清爽 !
> 手动编写标记太麻烦 ? 我们提供了便捷方式 。 左上方点击 「 编辑 - > 插入表格 」 , 即可快速实现表格渲染 。
# # Markdown 进阶技巧
# # # 1. LaTeX 公式 : 完美展示数学表达式
Markdown 允许嵌入 LaTeX 语法展示数学公式 :
- * * 行内公式 * * : 用 \ ` $ \` 包裹公式,如 $ E = mc^2 $ 。
- * * 块级公式 * * : 用 \ ` $ $ \` 包裹公式,如:
$$
\ \ begin { aligned }
d _ { i , j } & \ \ leftarrow d _ { i , j } + 1 \ \ \ \
d _ { i , y + 1 } & \ \ leftarrow d _ { i , y + 1 } - 1 \ \ \ \
d _ { x + 1 , j } & \ \ leftarrow d _ { x + 1 , j } - 1 \ \ \ \
d _ { x + 1 , y + 1 } & \ \ leftarrow d _ { x + 1 , y + 1 } + 1
\ \ end { aligned }
$$
这是展示复杂数学表达的利器 !
# # # 2. Mermaid 流程图 : 可视化流程
Mermaid 是强大的可视化工具 , 可以在 Markdown 中创建流程图 、 时序图等 。
\ ` \` \` mermaid
graph TD ;
A -- > B ;
A -- > C ;
B -- > D ;
C -- > D ;
\ ` \` \`
\ ` \` \` mermaid
pie
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
"Iron" : 5
\ ` \` \`
\ ` \` \` mermaid
pie
title 为什么总是宅在家里 ?
"喜欢宅" : 45
"天气太热" : 70
"穷" : 500
"没人约" : 95
\ ` \` \`
这种方式不仅能直观展示流程 , 还能提升文档的专业性 。
> 更多用法 , 参见 : [ Mermaid User Guide ] ( https : //mermaid.js.org/intro/getting-started.html)。
# # 结语
Markdown 是一种简单 、 强大且易于掌握的标记语言 , 通过学习基础和进阶语法 , 你可以快速创作内容并有效传达信息 。 无论是技术文档 、 个人博客还是项目说明 , Markdown 都是你的得力助手 。 希望这篇文章能够带你全面了解 Markdown 的潜力 , 让你的写作更加丰富多彩 !
现在 , 拿起 Markdown 编辑器 , 开始创作吧 ! 探索 Markdown 的世界 , 你会发现它远比想象中更精彩 !
# # # # 推荐阅读
- [ 阿里又一个 20 k + stars 开源项目诞生 , 恭喜 fastjson ! ] ( https : //mp.weixin.qq.com/s/RNKDCK2KoyeuMeEs6GUrow)
- [ 刷掉 90 % 候选人的互联网大厂海量数据面试题 ( 附题解 + 方法总结 ) ] ( https : //mp.weixin.qq.com/s/rjGqxUvrEqJNlo09GrT1Dw)
- [ 好用 ! 期待已久的文本块功能究竟如何在 Java 13 中发挥作用 ? ] ( https : //mp.weixin.qq.com/s/kalGv5T8AZGxTnLHr2wDsA)
- [ 2019 GitHub 开源贡献排行榜新鲜出炉 ! 微软谷歌领头 , 阿里跻身前 12 ! ] ( https : //mp.weixin.qq.com/s/_q812aGD1b9QvZ2WFI0Qgw)
-- -
< center >
< img src = "https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png" style = "width: 100px;" >
< / c e n t e r >
` ,DEFAULT_CSS_CONTENT= ` / * *
* 按 Alt / Option + Shift + F 可格式化
* 如需使用主题色 , 请使用 var ( -- md - primary - color ) 代替颜色值
* 如 : color : var ( -- md - primary - color ) ;
*
* 召集令 : 如果你有好看的主题样式 , 欢迎分享 , 让更多人能够使用到你的主题 。
2024-09-25 14:23:53 +08:00
* 提交区 : https : //github.com/doocs/md/discussions/426
2024-09-18 09:46:23 +08:00
* /
/* 一级标题样式 */
h1 {
}
/* 二级标题样式 */
h2 {
}
/* 三级标题样式 */
h3 {
}
/* 四级标题样式 */
h4 {
}
2024-09-29 10:14:52 +08:00
/* 五级标题样式 */
h5 {
}
/* 六级标题样式 */
h6 {
}
2024-09-18 09:46:23 +08:00
/* 图片样式 */
image {
}
/* 引用样式 */
blockquote {
}
/* 引用段落样式 */
blockquote _p {
}
2024-11-22 15:41:57 +08:00
/* GFM note 样式 */
blockquote _note {
}
/* GFM tip 样式 */
blockquote _tip {
}
/* GFM important 样式 */
blockquote _important {
}
/* GFM warning 样式 */
blockquote _warning {
}
/* GFM caution 样式 */
blockquote _caution {
}
/* GFM 通用标题 */
blockquote _title {
}
/* GFM note 标题 */
blockquote _title _note {
}
/* GFM tip 标题 */
blockquote _title _tip {
}
/* GFM important 标题 */
blockquote _title _important {
}
/* GFM warning 标题 */
blockquote _title _warning {
}
/* GFM caution 标题 */
blockquote _title _caution {
}
/* GFM note 段落样式 */
blockquote _p _note {
}
/* GFM tip 段落样式 */
blockquote _p _tip {
}
/* GFM important 段落样式 */
blockquote _p _important {
}
/* GFM warning 段落样式 */
blockquote _p _warning {
}
/* GFM caution 段落样式 */
blockquote _p _caution {
}
2024-09-18 09:46:23 +08:00
/* 段落样式 */
p {
}
/* 分割线样式 */
hr {
}
/* 行内代码样式 */
codespan {
}
/* 粗体样式 */
strong {
}
/* 链接样式 */
link {
}
/* 微信链接样式 */
wx _link {
}
/* 有序列表样式 */
ol {
}
/* 无序列表样式 */
ul {
}
/* 列表项样式 */
li {
}
/* 代码块样式 */
code {
}
/* 代码块外层样式 */
code _pre {
}
2024-11-28 09:28:59 +08:00
` ,githubConfig={username:"bucketio",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(Ra,qa)=> ` img$ { qa } ` ),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"12px",value:"12px",desc:"更小"},{label:"13px",value:"13px",desc:"稍小"},{label:"14px",value:"14px",desc:"推荐"},{label:"15px",value:"15px",desc:"稍大"},{label:"16px",value:"16px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],codeBlockUrlPrefix="https://cdn.bootcdn.net/ajax/libs/highlight.js/11.10.0/styles/",codeBlockThemeList=["1c-light.min.css","a11y-dark.min.css","a11y-light.min.css","agate.min.css","an-old-hope.min.css","androidstudio.min.css","arduino-light.min.css","arta.min.css","ascetic.min.css","atom-one-dark-reasonable.min.css","atom-one-dark.min.css","atom-one-light.min.css","brown-paper.min.css","codepen-embed.min.css","color-brewer.min.css","dark.min.css","default.min.css","devibeans.min.css","docco.min.css","far.min.css","felipec.min.css","foundation.min.css","github-dark-dimmed.min.css","github-dark.min.css","github.min.css","gml.min.css","googlecode.min.css","gradient-dark.min.css","gradient-light.min.css","grayscale.min.css","hybrid.min.css","idea.min.css","intellij-light.min.css","ir-black.min.css","isbl-editor-dark.min.css","isbl-editor-light.min.css","kimbie-dark.min.css","kimbie-light.min.css","lightfair.min.css","lioshi.min.css","magula.min.css","mono-blue.min.css","monokai-sublime.min.css","monokai.min.css","night-owl.min.css","nnfx-dark.min.css","nnfx-light.min.css","nord.min.css","
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-12-08 09:17:51 +08:00
* / ( f u n c t i o n ( R a ) { c o n s t q a = b a s e 6 4 J s $ 1 , n d = i e e e 7 5 4 $ 1 , o d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = m d , R a . S l o w B u f f e r = H d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; c o n s t l d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = l d ; c o n s t { U i n t 8 A r r a y : u d , A r r a y B u f f e r : c d , S h a r e d A r r a y B u f f e r : d d } = g l o b a l T h i s ; m d . T Y P E D _ A R R A Y _ S U P P O R T = p d ( ) , ! m d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n p d ( ) { t r y { c o n s t n h = n e w u d ( 1 ) , O f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( O f , u d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( n h , O f ) , n h . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( m d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( m d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( m d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( m d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n f d ( n h ) { i f ( n h > l d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + n h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; c o n s t O f = n e w u d ( n h ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( O f , m d . p r o t o t y p e ) , O f } f u n c t i o n m d ( n h , O f , N f ) { i f ( t y p e o f n h = = " n u m b e r " ) { i f ( t y p e o f O f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n I d ( n h ) } r e t u r n v d ( n h , O f , N f ) } m d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n v d ( n h , O f , N f ) { i f ( t y p e o f n h = = " s t r i n g " ) r e t u r n O d ( n h , O f ) ; i f ( c d . i s V i e w ( n h ) ) r e t u r n P d ( n h ) ; i f ( n h = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f n h ) ; i f ( M h ( n h , c d ) | | n h & & M h ( n h . b u f f e r , c d ) | | t y p e o f d d < " u " & & ( M h ( n h , d d ) | | n h & & M h ( n h . b u f f e r , d d ) ) ) r e t u r n M d ( n h , O f , N f ) ; i f ( t y p e o f n h = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; c o n s t r h = n h . v a l u e O f & & n h . v a l u e O f ( ) ; i f ( r h ! = n u l l & & r h ! = = n h ) r e t u r n m d . f r o m ( r h , O f , N f ) ; c o n s t c h = B d ( n h ) ; i f ( c h ) r e t u r n c h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f n h [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n m d . f r o m ( n h [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , O f , N f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f n h ) } m d . f r o m = f u n c t i o n ( n h , O f , N f ) { r e t u r n v d ( n h , O f , N f ) } , O b j e c t . s e t P r o t o t y p e O f ( m d . p r o t o t y p e , u d . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( m d , u d ) ; f u n c t i o n A d ( n h ) { i f ( t y p e o f n h ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( n h < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + n h + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n N d ( n h , O f , N f ) { r e t u r n A d ( n h ) , n h < = 0 ? f d ( n h ) : O f ! = = v o i d 0 ? t y p e o f N f = = " s t r i n g " ? f d ( n h ) . f i l l ( O f , N f ) : f d ( n h ) . f i l l ( O f ) : f d ( n h ) } m d . a l l o c = f u n c t i o n ( n h , O f , N f ) { r e t u r n N d ( n h , O f , N f ) } ; f u n c t i o n I d ( n h ) { r e t u r n A d ( n h ) , f d ( n h < 0 ? 0 : j d ( n h ) | 0 ) } m d . a l l o c U n s a f e = f u n c t i o n ( n h ) { r e t u r n I d ( n h ) } , m d . a l l o c U n s a f e S l o w = f u n c t i o n ( n h ) { r e t u r n I d ( n h ) } ; f u n c t i o n O d ( n h , O f ) { i f ( ( t y p e o f O f ! = " s t r i n g " | | O f = = = " " ) & & ( O f = " u t f 8 " ) , ! m d . i s E n c o d i n g ( O f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + O f ) ; c o n s t N f = G d ( n h , O f ) | 0 ; l e t r h = f d ( N f ) ; c o n s t c h = r h . w r i t e ( n h , O f ) ; r e t u r n c h ! = = N f & & ( r h = r h . s l i c e ( 0 , c h ) ) , r h } f u n c t i o n F d ( n h ) { c o n s t O f = n h . l e n g t h < 0 ? 0 : j d ( n h . l e n g t h ) | 0 , N f = f d ( O f ) ; f o r ( l e t r h = 0 ; r h < O f ; r h + = 1 ) N f [ r h ] = n h [ r h ] & 2 5 5 ; r e t u r n N f } f u n c t i o n P d ( n h ) { i f ( M h ( n h , u d ) ) { c o n s t O f = n e w u d ( n h ) ; r e t u r n M d ( O f . b u f f e r , O f . b y t e O f f s e t , O f . b y t e L e n g t h ) } r e t u r n F d ( n h ) } f u n c t i o n M d ( n h , O f , N f ) { i f ( O f < 0 | | n h . b y t e L e n g t h < O f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( n h . b y t e L e n g t h < O f + ( N f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; l e t r h ; r e t u r n O f = = = v o i d 0 & & N f = = = v o i d 0 ? r h = n e w u d ( n h ) : N f = = = v o i d 0 ? r h = n e w u d ( n h , O f ) : r h = n e w u d ( n h , O f , N f ) , O b j e c t . s e t P r o t o t y p e O f ( r h , m d . p r o t o t y p e ) , r h } f u n c t i o n B d ( n h ) { i f ( m d . i s B u f f e r ( n h ) ) { c o n s t O f = j d ( n h . l e n g t h ) | 0 , N f = f d ( O f ) ; r e t u r n N f . l e n g t h = = = 0 | | n h . c o p y ( N f , 0 , 0 , O f ) , N f } i f ( n h . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f n h . l e n g t h ! = " n u m b e r " | | Y h ( n h . l e n g t h ) ? f d ( 0 ) : F d ( n h ) ; i f ( n h . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( n h . d a t a ) ) r e t u r n F d ( n h . d a t a ) } f u n c t i o n j d ( n h ) { i f ( n h > = l d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + l d . t o S t r i n g ( 1 6 ) + " b y t e s " ) ; r e t u r n n h | 0 } f u n c t i o n H d ( n h ) { r e t u r n + n h !
2024-11-28 09:28:59 +08:00
` :getText(Ra.children):isCDATA(Ra)?getText(Ra.children):isText(Ra)?Ra.data:""}function textContent(Ra){return Array.isArray(Ra)?Ra.map(textContent).join(""):hasChildren(Ra)&&!isComment $ 1(Ra)?textContent(Ra.children):isText(Ra)?Ra.data:""}function innerText(Ra){return Array.isArray(Ra)?Ra.map(innerText).join(""):hasChildren(Ra)&&(Ra.type===ElementType.Tag||isCDATA(Ra))?innerText(Ra.children):isText(Ra)?Ra.data:""}function getChildren(Ra){return hasChildren(Ra)?Ra.children:[]}function getParent(Ra){return Ra.parent||null}function getSiblings(Ra){const qa=getParent(Ra);if(qa!=null)return getChildren(qa);const nd=[Ra];let{prev:od,next:ld}=Ra;for(;od!=null;)nd.unshift(od),{prev:od}=od;for(;ld!=null;)nd.push(ld),{next:ld}=ld;return nd}function getAttributeValue(Ra,qa){var nd;return(nd=Ra.attribs)===null||nd===void 0?void 0:nd[qa]}function hasAttrib(Ra,qa){return Ra.attribs!=null&&Object.prototype.hasOwnProperty.call(Ra.attribs,qa)&&Ra.attribs[qa]!=null}function getName(Ra){return Ra.name}function nextElementSibling(Ra){let{next:qa}=Ra;for(;qa!==null&&!isTag(qa);)({next:qa}=qa);return qa}function prevElementSibling(Ra){let{prev:qa}=Ra;for(;qa!==null&&!isTag(qa);)({prev:qa}=qa);return qa}function removeElement(Ra){if(Ra.prev&&(Ra.prev.next=Ra.next),Ra.next&&(Ra.next.prev=Ra.prev),Ra.parent){const qa=Ra.parent.children,nd=qa.lastIndexOf(Ra);nd>=0&&qa.splice(nd,1)}Ra.next=null,Ra.prev=null,Ra.parent=null}function replaceElement(Ra,qa){const nd=qa.prev=Ra.prev;nd&&(nd.next=qa);const od=qa.next=Ra.next;od&&(od.prev=qa);const ld=qa.parent=Ra.parent;if(ld){const ud=ld.children;ud[ud.lastIndexOf(Ra)]=qa,Ra.parent=null}}function appendChild(Ra,qa){if(removeElement(qa),qa.next=null,qa.parent=Ra,Ra.children.push(qa)>1){const nd=Ra.children[Ra.children.length-2];nd.next=qa,qa.prev=nd}else qa.prev=null}function append $ 3(Ra,qa){removeElement(qa);const{parent:nd}=Ra,od=Ra.next;if(qa.next=od,qa.prev=Ra,Ra.next=qa,qa.parent=nd,od){if(od.prev=qa,nd){const ld=nd.children;ld.splice(ld.lastIndexOf(od),0,qa)}}else nd&&nd.children.push(qa)}function prependChild(Ra,qa){if(removeElement(qa),qa.parent=Ra,qa.prev=null,Ra.children.unshift(qa)!==1){const nd=Ra.children[1];nd.prev=qa,qa.next=nd}else qa.next=null}function prepend $ 1(Ra,qa){removeElement(qa);const{parent:nd}=Ra;if(nd){const od=nd.children;od.splice(od.indexOf(Ra),0,qa)}Ra.prev&&(Ra.prev.next=qa),qa.parent=nd,qa.prev=Ra.prev,qa.next=Ra,Ra.prev=qa}function filter $ 5(Ra,qa,nd=!0,od=1/0){return find $ 3(Ra,Array.isArray(qa)?qa:[qa],nd,od)}function find $ 3(Ra,qa,nd,od){const ld=[],ud=[qa],cd=[0];for(;;){if(cd[0]>=ud[0].length){if(cd.length===1)return ld;ud.shift(),cd.shift();continue}const dd=ud[0][cd[0]++];if(Ra(dd)&&(ld.push(dd),--od<=0))return ld;nd&&hasChildren(dd)&&dd.children.length>0&&(cd.unshift(0),ud.unshift(dd.children))}}function findOneChild(Ra,qa){return qa.find(Ra)}function findOne(Ra,qa,nd=!0){let od=null;for(let ld=0;ld<qa.length&&!od;ld++){const ud=qa[ld];if(isTag(ud))Ra(ud)?od=ud:nd&&ud.children.length>0&&(od=findOne(Ra,ud.children,!0));else continue}return od}function existsOne(Ra,qa){return qa.some(nd=>isTag(nd)&&(Ra(nd)||existsOne(Ra,nd.children)))}function findAll(Ra,qa){const nd=[],od=[qa],ld=[0];for(;;){if(ld[0]>=od[0].length){if(od.length===1)return nd;od.shift(),ld.shift();continue}const ud=od[0][ld[0]++];isTag(ud)&&(Ra(ud)&&nd.push(ud),ud.children.length>0&&(ld.unshift(0),od.unshift(ud.children)))}}const Checks={tag_name(Ra){return typeof Ra=="function"?qa=>isTag(qa)&&Ra(qa.name):Ra==="*"?isTag:qa=>isTag(qa)&&qa.name===Ra},tag_type(Ra){return typeof Ra=="function"?qa=>Ra(qa.type):qa=>qa.type===Ra},tag_contains(Ra){return typeof Ra=="function"?qa=>isText(qa)&&Ra(qa.data):qa=>isText(qa)&&qa.data===Ra}};function getAttribCheck(Ra,qa){return typeof qa=="function"?nd=>isTag(nd)&&qa(nd.attribs[Ra]):nd=>isTag(nd)&&nd.attribs[Ra]===qa}function combineFuncs(Ra,qa){return nd=>Ra(nd)||qa(nd)}function compileTest(Ra){const qa=Object.keys(Ra).map(nd=>{const od=Ra[nd];return Object.prototype.hasOwnProperty.call(Checks,nd)?Checks[nd](od):getAttribCheck(nd,od)});return qa.length===0?null:qa
2024-09-18 09:46:23 +08:00
: is ( button , input , select , textarea , optgroup , option ) [ disabled ] ,
optgroup [ disabled ] > option ,
fieldset [ disabled ] : not ( fieldset [ disabled ] legend : first - of - type * )
2024-11-28 09:28:59 +08:00
) ` ,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(Ra,qa){return Ra===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:nd=>qa.isTag(nd)&&Ra(nd)}function getNextSiblings(Ra,qa){const nd=qa.getSiblings(Ra);if(nd.length<=1)return[];const od=nd.indexOf(Ra);return od<0||od===nd.length-1?[]:nd.slice(od+1).filter(qa.isTag)}function copyOptions(Ra){return{xmlMode:!!Ra.xmlMode,lowerCaseAttributeNames:!!Ra.lowerCaseAttributeNames,lowerCaseTags:!!Ra.lowerCaseTags,quirksMode:!!Ra.quirksMode,cacheResults:!!Ra.cacheResults,pseudos:Ra.pseudos,adapter:Ra.adapter,equals:Ra.equals}}const is $ 3=(Ra,qa,nd,od,ld)=>{const ud=ld(qa,copyOptions(nd),od);return ud===boolbase $ 1.trueFunc?Ra:ud===boolbase $ 1.falseFunc?boolbase $ 1.falseFunc:cd=>ud(cd)&&Ra(cd)},subselects={is:is $ 3,matches:is $ 3,where:is $ 3,not(Ra,qa,nd,od,ld){const ud=ld(qa,copyOptions(nd),od);return ud===boolbase $ 1.falseFunc?Ra:ud===boolbase $ 1.trueFunc?boolbase $ 1.falseFunc:cd=>!ud(cd)&&Ra(cd)},has(Ra,qa,nd,od,ld){const{adapter:ud}=nd,cd=copyOptions(nd);cd.relativeSelector=!0;const dd=qa.some(md=>md.some(isTraversal))?[PLACEHOLDER_ELEMENT]:void 0,pd=ld(qa,cd,dd);if(pd===boolbase $ 1.falseFunc)return boolbase $ 1.falseFunc;const fd=ensureIsTag(pd,ud);if(dd&&pd!==boolbase $ 1.trueFunc){const{shouldTestNextSiblings:md=!1}=pd;return vd=>{if(!Ra(vd))return!1;dd[0]=vd;const Ad=ud.getChildren(vd),Nd=md?[...Ad,...getNextSiblings(vd,ud)]:Ad;return ud.existsOne(fd,Nd)}}return md=>Ra(md)&&ud.existsOne(fd,ud.getChildren(md))}};function compilePseudoSelector(Ra,qa,nd,od,ld){var ud;const{name:cd,data:dd}=qa;if(Array.isArray(dd)){if(!(cd in subselects))throw new Error( ` Unknown pseudo - class : $ { cd } ( $ { dd } ) ` );return subselects[cd](Ra,dd,nd,od,ld)}const pd=(ud=nd.pseudos)===null||ud===void 0?void 0:ud[cd],fd=typeof pd=="string"?pd:aliases[cd];if(typeof fd=="string"){if(dd!=null)throw new Error( ` Pseudo $ { cd } doesn ' t have any arguments ` );const md=parse $ 7(fd);return subselects.is(Ra,md,nd,od,ld)}if(typeof pd=="function")return verifyPseudoArgs(pd,cd,dd,1),md=>pd(md,dd)&&Ra(md);if(cd in filters)return filters[cd](Ra,dd,nd,od);if(cd in pseudos){const md=pseudos[cd];return verifyPseudoArgs(md,cd,dd,2),vd=>md(vd,nd,dd)&&Ra(vd)}throw new Error( ` Unknown pseudo - class : $ { cd } ` )}function getElementParent(Ra,qa){const nd=qa.getParent(Ra);return nd&&qa.isTag(nd)?nd:null}function compileGeneralSelector(Ra,qa,nd,od,ld){const{adapter:ud,equals:cd}=nd;switch(qa.type){case SelectorType.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case SelectorType.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case SelectorType.Attribute:{if(qa.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!nd.xmlMode||nd.lowerCaseAttributeNames)&&(qa.name=qa.name.toLowerCase()),attributeRules[qa.action](Ra,qa,nd)}case SelectorType.Pseudo:return compilePseudoSelector(Ra,qa,nd,od,ld);case SelectorType.Tag:{if(qa.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:dd}=qa;return(!nd.xmlMode||nd.lowerCaseTags)&&(dd=dd.toLowerCase()),function(fd){return ud.getName(fd)===dd&&Ra(fd)}}case SelectorType.Descendant:{if(nd.cacheResults===!1||typeof WeakSet>"u")return function(fd){let md=fd;for(;md=getElementParent(md,ud);)if(Ra(md))return!0;return!1};const dd=new WeakSet;return function(fd){let md=fd;for(;md=getElementParent(md,ud);)if(!dd.has(
` )})):{name:ld,value:ud.replace(rCRLF, ` \ r
2024-12-08 09:17:51 +08:00
` )}}).toArray()}const Forms=Object.freeze(Object.defineProperty({__proto__:null,serialize:serialize $ 1,serializeArray},Symbol.toStringTag,{value:"Module"}));function getExtractDescr(Ra){var qa;return typeof Ra=="string"?{selector:Ra,value:"textContent"}:{selector:Ra.selector,value:(qa=Ra.value)!==null&&qa!==void 0?qa:"textContent"}}function extract(Ra){const qa={};for(const nd in Ra){const od=Ra[nd],ld=Array.isArray(od),{selector:ud,value:cd}=getExtractDescr(ld?od[0]:od),dd=typeof cd=="function"?cd:typeof cd=="string"?pd=>this._make(pd).prop(cd):pd=>this._make(pd).extract(cd);if(ld)qa[nd]=this._findBySelector(ud,Number.POSITIVE_INFINITY).map((pd,fd)=>dd(fd,nd,qa)).get();else{const pd=this._findBySelector(ud,1);qa[nd]=pd.length>0?dd(pd[0],nd,qa):void 0}}return qa}const Extract=Object.freeze(Object.defineProperty({__proto__:null,extract},Symbol.toStringTag,{value:"Module"}));class Cheerio{constructor(qa,nd,od){if(this.length=0,this.options=od,this._root=nd,qa){for(let ld=0;ld<qa.length;ld++)this[ld]=qa[ld];this.length=qa.length}}}Cheerio.prototype.cheerio="[cheerio object]";Cheerio.prototype.splice=Array.prototype.splice;Cheerio.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Cheerio.prototype,Attributes,Traversing,Manipulation,Css,Forms,Extract);function getLoad(Ra,qa){return function nd(od,ld,ud=!0){if(od==null)throw new Error("cheerio.load() expects a string");const cd=flattenOptions(ld),dd=Ra(od,cd,ud,null);class pd extends Cheerio{_make(vd,Ad){const Nd=fd(vd,Ad);return Nd.prevObject=this,Nd}_parse(vd,Ad,Nd,Id){return Ra(vd,Ad,Nd,Id)}_render(vd){return qa(vd,this.options)}}function fd(md,vd,Ad=dd,Nd){if(md&&isCheerio(md))return md;const Id=flattenOptions(Nd,cd),Od=typeof Ad=="string"?[Ra(Ad,Id,!1,null)]:"length"in Ad?Ad:[Ad],Fd=isCheerio(Od)?Od:new pd(Od,null,Id);if(Fd._root=Fd,!md)return new pd(void 0,Fd,Id);const Pd=typeof md=="string"&&isHtml(md)?Ra(md,Id,!1,null).children:isNode $ 1(md)?[md]:Array.isArray(md)?md:void 0,Md=new pd(Pd,Fd,Id);if(Pd)return Md;if(typeof md!="string")throw new TypeError("Unexpected type of selector");let Bd=md;const jd=vd?typeof vd=="string"?isHtml(vd)?new pd([Ra(vd,Id,!1,null)],Fd,Id):(Bd= ` $ { vd } $ { Bd } ` ,Fd):isCheerio(vd)?vd:new pd(Array.isArray(vd)?vd:[vd],Fd,Id):Fd;return jd?jd.find(Bd):Md}return Object.assign(fd,staticMethods,{load:nd,_root:dd,_options:cd,fn:pd.prototype,prototype:pd.prototype}),fd}}function isNode $ 1(Ra){return!!Ra.name||Ra.type==="root"||Ra.type==="text"||Ra.type==="comment"}const UNDEFINED_CODE_POINTS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),REPLACEMENT_CHARACTER="<22> ";var CODE_POINTS;(function(Ra){Ra[Ra.EOF=-1]="EOF",Ra[Ra.NULL=0]="NULL",Ra[Ra.TABULATION=9]="TABULATION",Ra[Ra.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Ra[Ra.LINE_FEED=10]="LINE_FEED",Ra[Ra.FORM_FEED=12]="FORM_FEED",Ra[Ra.SPACE=32]="SPACE",Ra[Ra.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Ra[Ra.QUOTATION_MARK=34]="QUOTATION_MARK",Ra[Ra.AMPERSAND=38]="AMPERSAND",Ra[Ra.APOSTROPHE=39]="APOSTROPHE",Ra[Ra.HYPHEN_MINUS=45]="HYPHEN_MINUS",Ra[Ra.SOLIDUS=47]="SOLIDUS",Ra[Ra.DIGIT_0=48]="DIGIT_0",Ra[Ra.DIGIT_9=57]="DIGIT_9",Ra[Ra.SEMICOLON=59]="SEMICOLON",Ra[Ra.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Ra[Ra.EQUALS_SIGN=61]="EQUALS_SIGN",Ra[Ra.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Ra[Ra.QUESTION_MARK=63]="QUESTION_MARK",Ra[Ra.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Ra[Ra.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Ra[Ra.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Ra[Ra.GRAVE_ACCENT=96]="GRAVE_ACCENT",Ra[Ra.LATIN_SMALL_A=97]="LATIN_SMALL_A",Ra[Ra.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(CODE_POINTS||(CODE_POINTS={}));const SEQUENCES={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function isSurrogate(Ra){return Ra>=55296&&Ra<=57343}function isSurrogatePair(Ra){return Ra>=56320&&Ra<=57343}function getSurrogatePairCodePoint(Ra,qa){return(Ra-55296)*
` )}})(debug);var debugExports=debug.exports;(function(Ra,qa){debugExports("lex"),Ra.exports=nd;function nd(od){var ld="",ud,cd=0,dd=-1,pd=0,fd=1,md="before-selector",vd=[md],Ad={},Nd=[],Id=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function Od(){return df(),od[dd]}function Fd(Tf){return Tf?vd[vd.length-1-Tf]:md}function Pd(Tf){var Mf=dd+1;return Tf===od.slice(Mf,Mf+Tf.length)}function Md(Tf){var Mf=od.slice(dd).indexOf(Tf);return Mf>0?Mf:!1}function Bd(Tf){return Tf===jd(1)}function jd(Tf){return od[dd+(Tf||1)]}function Hd(){var Tf=vd.pop();return md=vd[vd.length-1],Tf}function Gd(Tf){return md=Tf,vd.push(md),vd.length}function zd(Tf){var Mf=md;return vd[vd.length-1]=md=Tf,Mf}function df(Tf){if((Tf||1)==1)od[dd]== `
` ?(fd++,cd=1):cd++,dd++;else{var Mf=od.slice(dd,dd+Tf).split( `
` );Mf.length>1&&(fd+=Mf.length-1,cd=1),cd+=Mf[Mf.length-1].length,dd=dd+Tf}}function Wd(){Ad.end={line:fd,col:cd},Nd.push(Ad),ld="",Ad={}}function Jd(Tf){Ad={type:Tf,start:{line:fd,col:cd}}}for(;ud=Od();)switch(ud){case" ":switch(Fd()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":ld+=ud;break}break;case `
2024-11-28 09:28:59 +08:00
` :case" ":case" \r ":case" \f ":switch(Fd()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":ld+=ud;break;case"at-value":ud=== `
2024-12-08 09:17:51 +08:00
` &&(Ad.value=ld.trim(),Wd(),Hd());break}break;case":":switch(Fd()){case"name":Ad.name=ld.trim(),ld="",zd("before-value");break;case"before-selector":ld+=ud,Jd("selector"),Gd("selector");break;case"before-value":zd("value"),ld+=ud;break;default:ld+=ud;break}break;case";":switch(Fd()){case"name":case"before-value":case"value":ld.trim().length>0&&(Ad.value=ld.trim(),Wd()),zd("before-name");break;case"value-paren":ld+=ud;break;case"at-value":Ad.value=ld.trim(),Wd(),Hd();break;case"before-name":break;default:ld+=ud;break}break;case"{":switch(Fd()){case"selector":if(jd(-1)===" \\ "){ld+=ud;break}Ad.text=ld.trim(),Wd(),zd("before-name"),pd=pd+1;break;case"at-group":switch(Ad.name=ld.trim(),Ad.type){case"font-face":case"viewport":case"page":Gd("before-name");break;default:Gd("before-selector")}Wd(),pd=pd+1;break;case"name":case"at-rule":Ad.name=ld.trim(),Wd(),Gd("before-name"),pd=pd+1;break;case"comment":case"double-string":case"single-string":ld+=ud;break;case"before-value":zd("value"),ld+=ud;break}break;case"}":switch(Fd()){case"before-name":case"name":case"before-value":case"value":ld&&(Ad.value=ld.trim()),Ad.name&&Ad.value&&Wd(),Jd("end"),Wd(),Hd(),Fd()==="at-group"&&(Jd("at-group-end"),Wd(),Hd()),pd>0&&(pd=pd-1);break;case"at-group":case"before-selector":case"selector":if(jd(-1)===" \\ "){ld+=ud;break}pd>0&&Fd(1)==="at-group"&&(Jd("at-group-end"),Wd()),pd>1&&Hd(),pd>0&&(pd=pd-1);break;case"double-string":case"single-string":case"comment":ld+=ud;break}break;case'"':case"'":switch(Fd()){case"double-string":ud==='"'&&jd(-1)!==" \\ "&&Hd();break;case"single-string":ud==="'"&&jd(-1)!==" \\ "&&Hd();break;case"before-at-value":zd("at-value"),Gd(ud==='"'?"double-string":"single-string");break;case"before-value":zd("value"),Gd(ud==='"'?"double-string":"single-string");break;case"comment":break;default:jd(-1)!==" \\ "&&Gd(ud==='"'?"double-string":"single-string")}ld+=ud;break;case"/":switch(Fd()){case"comment":case"double-string":case"single-string":ld+=ud;break;case"before-value":case"selector":case"name":case"value":if(Bd("*")){var Xd=Md("*/");Xd&&df(Xd+1)}else Fd()=="before-value"&&zd("value"),ld+=ud;break;default:Bd("*")?(Jd("comment"),Gd("comment"),df()):ld+=ud;break}break;case"*":switch(Fd()){case"comment":Bd("/")?(Ad.text=ld,df(),Wd(),Hd()):ld+=ud;break;case"before-selector":ld+=ud,Jd("selector"),Gd("selector");break;case"before-value":zd("value"),ld+=ud;break;default:ld+=ud}break;case"@":switch(Fd()){case"comment":case"double-string":case"single-string":ld+=ud;break;case"before-value":zd("value"),ld+=ud;break;default:for(var _f=!1,vf,Sf,gf=0,bf=Id.length;!_f&&gf<bf;++gf)Sf=Id[gf],vf=Sf.name||Sf,Pd(vf)&&(_f=!0,Jd(vf),Gd(Sf.state||"at-group"),df(vf.length),Sf.prefix&&(Ad.prefix=Sf.prefix),Sf.type&&(Ad.type=Sf.type));_f||(ld+=ud);break}break;case"(":switch(Fd()){case"value":Gd("value-paren");break;case"before-value":zd("value");break}ld+=ud;break;case")":switch(Fd()){case"value-paren":Hd();break;case"before-value":zd("value");break}ld+=ud;break;default:switch(Fd()){case"before-selector":Jd("selector"),Gd("selector");break;case"before-name":Jd("property"),zd("name");break;case"before-value":zd("value");break;case"before-at-value":zd("at-value");break}ld+=ud;break}return Nd}})(lexer);var lexerExports=lexer.exports,parser $ 2={exports:{}};(function(Ra,qa){debugExports("parse");var nd=lexerExports;Ra.exports=dd;var od,ld,ud,cd;function dd(Hd,Gd){Gd||(Gd={}),od=!!Gd.comments,ud=!!Gd.position,ld=0,cd=Array.isArray(Hd)?Hd.slice():nd(Hd);for(var zd,df=[],Wd;Wd=fd();)zd=Pd(Wd),zd&&df.push(zd);return{type:"stylesheet",stylesheet:{rules:df}}}function pd(Hd,Gd){Gd||(Gd={});for(var zd,df=["type","name","value"],Wd={},Jd=0;Jd<df.length;++Jd)zd=df[Jd],Hd[zd]&&(Wd[zd]=Gd[zd]||Hd[zd]);for(df=Object.keys(Gd),Jd=0;Jd<df.length;++Jd)zd=df[Jd],Wd[zd]||(Wd[zd]=Gd[zd]);return ud&&(Wd.position={start:Hd.start,end:Hd.end}),Wd}function fd(){var Hd=cd.shift();return Hd}function md(Hd){ld=ld+1;var Gd={};switch(Hd.type){case"font-face":case"viewport":Gd.declarations=Bd();break;case"page":Gd.prefix=Hd.prefix,Gd.declarations=Bd();break;default:Gd.prefix=Hd.prefix,Gd.rul
2024-11-28 09:28:59 +08:00
` ,dd=" ");var Gd=Id(jd.stylesheet.rules,Md).join( `
` ).trim();return Gd}function fd(jd){if(jd){ud+=jd;return}return od?"":Array(ud).join(ld||"")}function md(jd){return"@"+jd.type+" "+jd.value+";"+cd}function vd(jd){var Hd="",Gd=jd.prefix||"";jd.name&&(Hd=" "+jd.name);var zd=jd.type!=="page";return"@"+Gd+jd.type+Hd+dd+Od(jd,zd)+cd}function Ad(jd){return nd?"/*"+(jd.text||"")+"*/"+cd:""}function Nd(jd){var Hd;return jd.selectors?Hd=jd.selectors.join(","+cd):(Hd="@"+jd.type,Hd+=jd.name?" "+jd.name:""),fd()+Hd+dd+Od(jd)+cd}function Id(jd,Hd){return jd.reduce(function(Gd,zd){var df=zd.type==="comment"?Ad(zd):Hd(zd);return df&&Gd.push(df),Gd},[])}function Od(jd,Hd){var Gd=jd.declarations,zd=Pd;return jd.rules&&(Gd=jd.rules,zd=Nd),Gd=Fd(Gd,zd),Gd&&(Gd=cd+Gd+(Hd?"":cd)),"{"+Gd+fd()+"}"}function Fd(jd,Hd){if(!jd)return"";fd(1);var Gd=Id(jd,Hd);return fd(-1),Gd.length?Gd.join(cd):""}function Pd(jd){if(jd.type==="property")return Bd(jd)}function Md(jd){switch(jd.type){case"rule":return Nd(jd);case"media":case"keyframes":return vd(jd);case"comment":return Ad(jd);case"import":case"charset":case"namespace":return md(jd);case"font-face":case"supports":case"viewport":case"document":case"page":return vd(jd)}}function Bd(jd){var Hd=jd.name?jd.name+":"+dd:"";return fd()+Hd+jd.value+";"}})(stringify $ 2);var stringifyExports=stringify $ 2.exports,mensch={lex:lexerExports,parse:parserExports,stringify:stringifyExports},selector $ 1={exports:{}},escapeRe=/([-.*+?^ ${ } ()|[ \] \/ \\ ])/g,unescapeRe=/ \\ /g,escape $ 5=function(Ra){return(Ra+"").replace(escapeRe," \\ $ 1")},unescape $ 2=function(Ra){return(Ra+"").replace(unescapeRe,"")},slickRe=RegExp( ` ^ ( ? : \ \ s * ( , ) \ \ s * | \ \ s * ( < combinator > + ) \ \ s * | ( \ \ s + ) | ( < unicode > + | \ \ * ) | \ \ # ( < unicode > + ) | \ \ . ( < unicode > + ) | \ \ [ \ \ s * ( < unicode1 > + ) ( ? : \ \ s * ( [ * ^ $ ! ~ | ] ? = ) ( ? : \ \ s * ( ? : ( [ "']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(<unicode>+)(?:\\((?:(?:([" '])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(/<combinator>/,"["+escape$5(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Part=function(qa){this.combinator=qa||" ",this.tag="*"};Part.prototype.toString=function(){if(!this.raw){var Ra="",qa,nd;if(Ra+=this.tag||"*",this.id&&(Ra+="#"+this.id),this.classes&&(Ra+="."+this.classList.join(".")),this.attributes)for(qa=0;nd=this.attributes[qa++];)Ra+="["+nd.name+(nd.operator?nd.operator+' "'+nd.value+'" ' : "" ) + "]" ; if ( this . pseudos ) for ( qa = 0 ; nd = this . pseudos [ qa ++ ] ; ) Ra += ":" + nd . name , nd . value && ( Ra += "(" + nd . value + ")" ) ; this . raw = Ra } return this . raw } ; var Expression = function ( ) { this . length = 0 } ; Expression . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = "" , qa = 0 , nd ; nd = this [ qa ++ ] ; ) qa !== 1 && ( Ra += " " ) , nd . combinator !== " " && ( Ra += nd . combinator + " " ) , Ra += nd ; this . raw = Ra } return this . raw } ; var replacer = function ( Ra , qa , nd , od , ld , ud , cd , dd , pd , fd , md , vd , Ad , Nd , Id , Od ) { var Fd , Pd ; if ( ( qa || ! this . length ) && ( Fd = this [ this . length ++ ] = new Expression , qa ) ) return "" ; if ( Fd || ( Fd = this [ this . length - 1 ] ) , ( nd || od || ! Fd . length ) && ( Pd = Fd [ Fd . length ++ ] = new Part ( nd ) ) , Pd || ( Pd = Fd [ Fd . length - 1 ] ) , ld ) Pd . tag = unescape$2 ( ld ) ; else if ( ud ) Pd . id = unescape$2 ( ud ) ; else if ( cd ) { var Md = unescape$2 ( cd ) , Bd = Pd . classes || ( Pd . classes = { } ) ; if ( ! Bd [ Md ] ) { Bd [ Md ] = escape$5 ( cd ) ; var jd = Pd . classList || ( Pd . classList = [ ] ) ; jd . push ( Md ) , jd . sort ( ) } } else Ad ? ( Od = Od || Id , ( Pd . pseudos || ( Pd . pseudos = [ ] ) ) . push ( { type : vd . length == 1 ? "class" : "element" , name : unescape$2 ( Ad ) , escapedName : escape$5 ( Ad ) , value : Od ? unescape$2 ( Od ) : null , escapedValue : Od ? escape$5 ( Od ) : null } ) ) : dd && ( md = md ? escape$5 ( md ) : null , ( Pd . attributes || ( Pd . attributes = [ ] ) ) . push ( { operator : pd , name : unescape$2 ( dd ) , escapedName : escape$5 ( dd ) , value : md ? unescape$2 ( md ) : null , escapedValue : md ? escape$5 ( md ) : null } ) ) ; return "" } , Expressions = function ( qa ) { this . length = 0 ; for ( var nd = this , od = qa , ld ; qa ; ) { if ( ld = qa . replace ( slickRe , function ( ) { return replacer . apply ( nd , arguments ) } ) , ld === qa ) throw new Error ( od + " is an invalid expression" ) ; qa = ld } } ; Expressions . prototype . toString = function ( ) { if ( ! this . raw ) { for ( var Ra = [ ] , qa = 0 , nd ; nd = this [ qa ++ ] ; ) Ra . push ( nd ) ; this . raw = Ra . join ( ", " ) } return this . raw } ; var cache$1 = { } , parse$2 = function ( Ra ) { return Ra == null ? null : ( Ra = ( "" + Ra ) . replace ( /^\s+|\s+$/g , "" ) , cache$1 [ Ra ] || ( cache
2024-09-18 09:46:23 +08:00
* Returns an array of the selectors .
*
* @ license Sizzle CSS Selector Engine - MIT
* @ param { String } selectorText from mensch
* @ api public
2024-11-28 09:28:59 +08:00
* / R a . e x t r a c t = f u n c t i o n ( u d ) { f o r ( v a r c d = 0 , d d = [ ] , p d = " " , f d = 0 , m d = u d . l e n g t h ; f d < m d ; f d + + ) { v a r v d = u d . c h a r A t ( f d ) ; c d ? ( ( v d = = = " ] " | | v d = = = " ) " ) & & c d - - , p d + = v d ) : v d = = = " , " ? ( d d . p u s h ( p d ) , p d = " " ) : ( ( v d = = = " [ " | | v d = = = " ( " ) & & c d + + , ( p d . l e n g t h | | v d ! = = " , " & & v d ! = = `
` &&vd!==" ")&&(pd+=vd))}return pd.length&&dd.push(pd),dd},Ra.parseCSS=function(ld){for(var ud=qa.parse(ld,{position:!0,comments:!0}),cd=typeof ud.stylesheet<"u"&&ud.stylesheet.rules?ud.stylesheet.rules:[],dd=[],pd=0,fd=cd.length;pd<fd;pd++)if(cd[pd].type=="rule")for(var md=cd[pd],vd=md.selectors,Ad=0,Nd=vd.length;Ad<Nd;Ad++)dd.push([vd[Ad],md.declarations]);return dd},Ra.getPreservedText=function(ld,ud,cd){for(var dd=qa.parse(ld,{position:!0,comments:!0}),pd=typeof dd.stylesheet<"u"&&dd.stylesheet.rules?dd.stylesheet.rules:[],fd=[],md=pd.length-1;md>=0;md--)(ud.fontFaces&&pd[md].type==="font-face"||ud.mediaQueries&&pd[md].type==="media"||ud.keyFrames&&pd[md].type==="keyframes"||ud.pseudos&&pd[md].selectors&&this.matchesPseudo(pd[md].selectors[0],cd))&&fd.unshift(qa.stringify({stylesheet:{rules:[pd[md]]}},{comments:!1,indentation:" "})),pd[md].position.start;return fd.length===0?!1: `
` +fd.join( `
2024-09-18 09:46:23 +08:00
` )+ `
2024-11-28 09:28:59 +08:00
` },Ra.normalizeLineEndings=function(ld){return ld.replace(/ \r \n /g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n /g, ` \ r
2024-12-08 09:17:51 +08:00
` )},Ra.matchesPseudo=function(ld,ud){return ud.find(function(cd){return ld.indexOf(cd)>-1})},Ra.compareFunc=function(ld,ud){for(var cd=Math.min(ld.length,ud.length),dd=0;dd<cd;dd++)if(ld[dd]!==ud[dd])return ld[dd]>ud[dd]?1:-1;return ld.length-ud.length},Ra.compare=function(ld,ud){return Ra.compareFunc(ld,ud)==1?ld:ud},Ra.getDefaultOptions=function(ld){var ud=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,url:""},ld);return ud.webResources=ud.webResources||{},ud}}(utils $ 4)),utils $ 4}(function(Ra){var qa=require $ $ 0 $ 2;requireUtils $ 1();var nd=function(ld,ud,cd){const{xmlMode:dd,...pd}=ud;return ud=Object.assign({xml:{decodeEntities:!1,xmlMode:dd}},pd),ld=cd(ld),qa.load(ld,ud)},od=function(){var ld=[],ud=function(dd){var pd=Ra.exports.codeBlocks;return Object.keys(pd).forEach(function(fd){var md=new RegExp(pd[fd].start+"([ \\ S \\ s]*?)"+pd[fd].end,"g");dd=dd.replace(md,function(vd,Ad){return ld.push(vd),"JUICE_CODE_BLOCK_"+(ld.length-1)+"_"})}),dd},cd=function(dd){for(var pd=0;pd<ld.length;pd++){var fd=new RegExp("JUICE_CODE_BLOCK_"+pd+'_(="")?',"gi");dd=dd.replace(fd,function(){return ld[pd]})}return dd};return{encodeEntities:ud,decodeEntities:cd}};Ra.exports=function(ld,ud,cd,dd){var pd=od(),fd=nd(ld,ud,pd.encodeEntities),md=[fd];md.push.apply(md,dd);var vd=cd.apply(void 0,md)||fd;return ud&&ud.xmlMode?pd.decodeEntities(vd.xml()):pd.decodeEntities(vd.html())},Ra.exports.codeBlocks={EJS:{start:"<%",end:"%>"},HBS:{start:"{{",end:"}}"}}})(cheerio $ 1);var cheerioExports=cheerio $ 1.exports,numbers $ 1={};numbers $ 1.romanize=function(Ra){if(isNaN(Ra))return NaN;for(var qa=String(+Ra).split(""),nd=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],od="",ld=3;ld--;)od=(nd[+qa.pop()+ld*10]||"")+od;return Array(+qa.join("")+1).join("M")+od};numbers $ 1.alphanumeric=function(Ra){for(var qa="",nd;Ra>0;)nd=(Ra-1)%26,qa=String.fromCharCode(65+nd)+qa,Ra=(Ra-nd)/26|0;return qa||void 0};const uniqueString=Ra=>{let qa="";do qa=(Math.random()+1).toString(36).substring(2);while(Ra.indexOf(qa)!==-1);return qa},replaceVariables=(Ra,qa)=>{let nd=/([a-z \- ]+) \s * \( \s *([^ \( \) ]*?) \s *(?:, \s *([^ \( \) ]*?) \s *)? \s * \) /i,od=[],ld,ud=uniqueString(qa);for(;(ld=nd.exec(qa))!==null;){let dd= ` $ { od . length } ` ;if(ld[1].toLowerCase()=="var"){const fd=findVariableValue(Ra,ld[2]);if(fd){qa=qa.replace(ld[0],fd);continue}if(ld[3]){qa=qa.replace(ld[0],ld[3]);continue}}let pd= ` $ { ud } $ { dd . padStart ( 5 , "-" ) } ` ;qa=qa.replace(ld[0],pd),od.push({placeholder:pd,replace:ld[0]})}for(var cd=od.length-1;cd>=0;cd--){const dd=od[cd];qa=qa.replace(dd.placeholder,dd.replace)}return qa},findVariableValue=(Ra,qa)=>{for(;Ra;){if(Ra.styleProps&&qa in Ra.styleProps)return Ra.styleProps[qa].value;var Ra=Ra.pseudoElementParent||Ra.parent}};var variables $ 1={replaceVariables,findVariableValue},utils $ 3=requireUtils $ 1(),numbers=numbers $ 1,variables=variables $ 1,inline $ 2=function(qa){qa.ignoredPseudos=["hover","active","focus","visited","link"],qa.widthElements=["TABLE","TD","TH","IMG"],qa.heightElements=["TABLE","TD","TH","IMG"],qa.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],qa.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],qa.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},qa.excludedProperties=[],qa.juiceDocument=fd,qa.inlineDocument=nd;function nd(Ad,Nd,Id){Id=Id||{};var Od=utils $ 3.parseCSS(Nd),Fd=[],Pd="style",Md={};if(Id.styleAttributeName&&(Pd=Id.styleAttributeName),Od.forEach(Hd),Fd.forEach(Gd),Id.inlinePseudoElements&&Fd.forEach(zd),Id.applyWidthAttributes&&Fd.forEach(function(Xd){df(Xd,"width")}),Id.applyHeightAttributes&&Fd.forEach(function(Xd){df(Xd,"height")}),Id.applyAttributesTableElements&&Fd.forEach(Jd),Id.insert
2024-11-28 09:28:59 +08:00
` +Nd.extraCss,nd(Ad,Id,Nd),Ad}function md(Ad,Nd){var Id=[],Od=Ad("style"),Fd,Pd,Md;return Od.each(function(){if(Md=this,Fd=Md.childNodes,Fd.length!==1){Nd.removeStyleTags&&Ad(Md).remove();return}if(Pd=Fd[0].data,Nd.applyStyleTags&&Ad(Md).attr("data-embed")===void 0&&Id.push(Pd),Nd.removeStyleTags&&Ad(Md).attr("data-embed")===void 0){var Bd=Md.childNodes[0].nodeValue,jd=utils $ 3.getPreservedText(Bd,{mediaQueries:Nd.preserveMediaQueries,fontFaces:Nd.preserveFontFaces,keyFrames:Nd.preserveKeyFrames,pseudos:Nd.preservePseudos},qa.ignoredPseudos);jd?Md.childNodes[0].nodeValue=jd:Ad(Md).remove()}Ad(Md).removeAttr("data-embed")}),Id}function vd(Ad,Nd){var Id=md(Ad,Nd),Od=Id.join( `
` );return Od}return qa},cheerio=cheerioExports,makeJuiceClient=inline $ 2,juiceClient=makeJuiceClient(function(Ra,qa){return cheerio(Ra,{xmlMode:qa&&qa.xmlMode},juiceDocument,[qa])}),juiceDocument=function(Ra,qa){return juiceClient.juiceDocument(Ra,qa)};juiceClient.inlineContent=function(Ra,qa,nd){return cheerio(Ra,{xmlMode:nd&&nd.xmlMode},juiceClient.inlineDocument,[qa,nd])};juiceClient.codeBlocks=cheerio.codeBlocks;var client=juiceClient;const juice=getDefaultExportFromCjs(client);var $ s $ 2=Object.create,je $ 4=Object.defineProperty,Vs $ 1=Object.getOwnPropertyDescriptor,qs $ 2=Object.getOwnPropertyNames,zs $ 1=Object.getPrototypeOf,Ks $ 2=Object.prototype.hasOwnProperty,Hs $ 2=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Ws $ 1=(Ra,qa)=>{for(var nd in qa)je $ 4(Ra,nd,{get:qa[nd],enumerable:!0})},Js $ 1=(Ra,qa,nd,od)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let ld of qs $ 2(qa))!Ks $ 2.call(Ra,ld)&&ld!==nd&&je $ 4(Ra,ld,{get:()=>qa[ld],enumerable:!(od=Vs $ 1(qa,ld))||od.enumerable});return Ra},vt $ 3=(Ra,qa,nd)=>(nd=Ra!=null? $ s $ 2(zs $ 1(Ra)):{},Js $ 1(je $ 4(nd,"default",{value:Ra,enumerable:!0}),Ra)),At $ 5=Hs $ 2(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(Vd,Ld){if(Vd==null)return{};var Yd={},mf=Object.keys(Vd),Af,Wf;for(Wf=0;Wf<mf.length;Wf++)Af=mf[Wf],!(Ld.indexOf(Af)>=0)&&(Yd[Af]=Vd[Af]);return Yd}var nd=class{constructor(Vd,Ld,Yd){this.line=void 0,this.column=void 0,this.index=void 0,this.line=Vd,this.column=Ld,this.index=Yd}},od=class{constructor(Vd,Ld){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=Vd,this.end=Ld}};function ld(Vd,Ld){let{line:Yd,column:mf,index:Af}=Vd;return new nd(Yd,mf+Ld,Af+Ld)}var ud="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",cd={ImportMetaOutsideModule:{message: ` import . meta may appear only with 'sourceType: "module"' ` ,code:ud},ImportOutsideModule:{message: ` 'import' and 'export' may appear only with 'sourceType: "module"' ` ,code:ud}},dd={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},pd=Vd=>Vd.type==="UpdateExpression"?dd.UpdateExpression[ ` $ { Vd . prefix } ` ]:dd[Vd.type],fd={AccessorIsGenerator:({kind:Vd})=> ` A $ { Vd } ter cannot be a generator . ` ,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'."
- Did you mean \ ` export { ' ${ Vd } ' as ' ${ Ld } ' } from 'some-module' \` ? ` , ExportDefaultFromAsIdentifier : "'from' is not allowed as an identifier after 'export default'." , ForInOfLoopInitializer : ( { type : Vd } ) => ` ' ${ Vd === "ForInStatement" ? "for-in" : "for-of" } ' loop variable declaration may not have an initializer. ` , ForInUsing : "For-in loop may not start with 'using' declaration." , ForOfAsync : "The left-hand side of a for-of loop may not be 'async'." , ForOfLet : "The left-hand side of a for-of loop may not start with 'let'." , GeneratorInSingleStatementContext : "Generators can only be declared at the top level or inside a block." , IllegalBreakContinue : ( { type : Vd } ) => ` Unsyntactic ${ Vd === "BreakStatement" ? "break" : "continue" } . ` , IllegalLanguageModeDirective : "Illegal 'use strict' directive in function with non-simple parameter list." , IllegalReturn : "'return' outside of function." , ImportAttributesUseAssert : "The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error." , ImportBindingIsString : ( { importName : Vd } ) => ` A string literal cannot be used as an imported binding.
2024-12-08 09:17:51 +08:00
- Did you mean \ ` import { " ${ Vd } " as foo } \` ? ` , ImportCallArgumentTrailingComma : "Trailing comma is disallowed inside import(...) arguments." , ImportCallArity : ( { maxArgumentCount : Vd } ) => ` \` import() \` requires exactly ${ Vd === 1 ? "one argument" : "one or two arguments" } . ` , ImportCallNotNewExpression : "Cannot use new with import(...)." , ImportCallSpreadArgument : "`...` is not allowed in `import()`." , ImportJSONBindingNotDefault : "A JSON module can only be imported with `default`." , ImportReflectionHasAssertion : "`import module x` cannot have assertions." , ImportReflectionNotBinding : 'Only `import module x from "./module"` is valid.' , IncompatibleRegExpUVFlags : "The 'u' and 'v' regular expression flags cannot be enabled at the same time." , InvalidBigIntLiteral : "Invalid BigIntLiteral." , InvalidCodePoint : "Code point out of bounds." , InvalidCoverInitializedName : "Invalid shorthand property initializer." , InvalidDecimal : "Invalid decimal." , InvalidDigit : ( { radix : Vd } ) => ` Expected number in radix ${ Vd } . ` , InvalidEscapeSequence : "Bad character escape sequence." , InvalidEscapeSequenceTemplate : "Invalid escape sequence in template." , InvalidEscapedReservedWord : ( { reservedWord : Vd } ) => ` Escape sequence in keyword ${ Vd } . ` , InvalidIdentifier : ( { identifierName : Vd } ) => ` Invalid identifier ${ Vd } . ` , InvalidLhs : ( { ancestor : Vd } ) => ` Invalid left-hand side in ${ pd ( Vd ) } . ` , InvalidLhsBinding : ( { ancestor : Vd } ) => ` Binding invalid left-hand side in ${ pd ( Vd ) } . ` , InvalidLhsOptionalChaining : ( { ancestor : Vd } ) => ` Invalid optional chaining in the left-hand side of ${ pd ( Vd ) } . ` , InvalidNumber : "Invalid number." , InvalidOrMissingExponent : "Floating-point numbers require a valid exponent after the 'e'." , InvalidOrUnexpectedToken : ( { unexpected : Vd } ) => ` Unexpected character ' ${ Vd } '. ` , InvalidParenthesizedAssignment : "Invalid parenthesized assignment pattern." , InvalidPrivateFieldResolution : ( { identifierName : Vd } ) => ` Private name # ${ Vd } is not defined. ` , InvalidPropertyBindingPattern : "Binding member expression." , InvalidRecordProperty : "Only properties and spread elements are allowed in record definitions." , InvalidRestAssignmentPattern : "Invalid rest operator's argument." , LabelRedeclaration : ( { labelName : Vd } ) => ` Label ' ${ Vd } ' is already declared. ` , LetInLexicalBinding : "'let' is disallowed as a lexically bound name." , LineTerminatorBeforeArrow : "No line break is allowed before '=>'." , MalformedRegExpFlags : "Invalid regular expression flag." , MissingClassName : "A class name is required." , MissingEqInAssignment : "Only '=' operator can be used for specifying default value." , MissingSemicolon : "Missing semicolon." , MissingPlugin : ( { missingPlugin : Vd } ) => ` This experimental syntax requires enabling the parser plugin: ${ Vd . map ( Ld => JSON . stringify ( Ld ) ) . join ( ", " ) } . ` , MissingOneOfPlugins : ( { missingPlugin : Vd } ) => ` This experimental syntax requires enabling one of the following parser plugin(s): ${ Vd . map ( Ld => JSON . stringify ( Ld ) ) . join ( ", " ) } . ` , MissingUnicodeEscape : "Expecting Unicode escape sequence \\uXXXX." , MixingCoalesceWithLogical : "Nullish coalescing operator(??) requires parens when mixing with logical operators." , ModuleAttributeDifferentFromType : "The only accepted module attribute is `type`." , ModuleAttributeInvalidValue : "Only string literals are allowed as module attribute values." , ModuleAttributesWithDuplicateKeys : ( { key : Vd } ) => ` Duplicate key " ${ Vd } " is not allowed in module attributes. ` , ModuleExportNameHasLoneSurrogate : ( { surrogateCharCode : Vd } ) => ` An export name cannot include a lone surrogate, found ' \\ u ${ Vd . toString ( 16 ) } '. ` , ModuleExportUndefined : ( { localName : Vd } ) => ` Export ' ${ Vd } ' is not defined. ` , MultipleDefaultsInSwitch : "Multiple default clauses." , NewlineAfterThrow : "Illegal newline after throw." , NoCatchOrFinally : "Missing catch or finally clause." , NumberIdentifier : "Identifier directly after number." , NumericSeparatorInEscapeSequence : "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences." , ObsoleteAwaitStar : "'await*' has been removed from the async functions proposal. Use Promise.all() instead." , OptionalChainingNoNew : "Constructors in/after an Optional Chain are not allowed." , OptionalChainingNoTemplate : " Tagged Template Literals ar
2024-11-28 09:28:59 +08:00
` ,++Yd,Ym===13&&Ld.charCodeAt(Yd)===10&&++Yd,++Af,Mm=mf=Yd):Wf.unterminated(lh,bh,Ih):++Yd}return{pos:Yd,str:xh,firstInvalidLoc:pm,lineStart:mf,curLine:Af,containsInvalid:!!pm}}function S_(Vd,Ld,Yd,mf){return Vd==="template"?Ld===96||Ld===36&&Yd.charCodeAt(mf+1)===123:Ld===(Vd==="double"?34:39)}function C_(Vd,Ld,Yd,mf,Af,Wf){let lh=!Af;Ld++;let bh=xh=>({pos:Ld,ch:xh,lineStart:Yd,curLine:mf}),Ih=Vd.charCodeAt(Ld++);switch(Ih){case 110:return bh( `
2024-12-08 09:17:51 +08:00
` );case 114:return bh(" \r ");case 120:{let xh;return{code:xh,pos:Ld}=d_(Vd,Ld,Yd,mf,2,!1,lh,Wf),bh(xh===null?null:String.fromCharCode(xh))}case 117:{let xh;return{code:xh,pos:Ld}=V_(Vd,Ld,Yd,mf,lh,Wf),bh(xh===null?null:String.fromCodePoint(xh))}case 116:return bh(" ");case 98:return bh(" \b ");case 118:return bh(" \v ");case 102:return bh(" \f ");case 13:Vd.charCodeAt(Ld)===10&&++Ld;case 10:Yd=Ld,++mf;case 8232:case 8233:return bh("");case 56:case 57:if(Af)return bh(null);Wf.strictNumericEscape(Ld-1,Yd,mf);default:if(Ih>=48&&Ih<=55){let xh=Ld-1,pm=/^[0-7]+/.exec(Vd.slice(xh,Ld+2))[0],Mm=parseInt(pm,8);Mm>255&&(pm=pm.slice(0,-1),Mm=parseInt(pm,8)),Ld+=pm.length-1;let Gm=Vd.charCodeAt(Ld);if(pm!=="0"||Gm===56||Gm===57){if(Af)return bh(null);Wf.strictNumericEscape(xh,Yd,mf)}return bh(String.fromCharCode(Mm))}return bh(String.fromCharCode(Ih))}}function d_(Vd,Ld,Yd,mf,Af,Wf,lh,bh){let Ih=Ld,xh;return{n:xh,pos:Ld}=Dm(Vd,Ld,Yd,mf,16,Af,Wf,!1,bh,!lh),xh===null&&(lh?bh.invalidEscapeSequence(Ih,Yd,mf):Ld=Ih-1),{code:xh,pos:Ld}}function Dm(Vd,Ld,Yd,mf,Af,Wf,lh,bh,Ih,xh){let pm=Ld,Mm=Af===16?Um.hex:Um.decBinOct,Gm=Af===16?Tm.hex:Af===10?Tm.dec:Af===8?Tm.oct:Tm.bin,Ym=!1,p_=0;for(let J_=0,E_=Wf??1/0;J_<E_;++J_){let I_=Vd.charCodeAt(Ld),gg;if(I_===95&&bh!=="bail"){let Rb=Vd.charCodeAt(Ld-1),ov=Vd.charCodeAt(Ld+1);if(bh){if(Number.isNaN(ov)||!Gm(ov)||Mm.has(Rb)||Mm.has(ov)){if(xh)return{n:null,pos:Ld};Ih.unexpectedNumericSeparator(Ld,Yd,mf)}}else{if(xh)return{n:null,pos:Ld};Ih.numericSeparatorInEscapeSequence(Ld,Yd,mf)}++Ld;continue}if(I_>=97?gg=I_-97+10:I_>=65?gg=I_-65+10:um(I_)?gg=I_-48:gg=1/0,gg>=Af){if(gg<=9&&xh)return{n:null,pos:Ld};if(gg<=9&&Ih.invalidDigit(Ld,Yd,mf,Af))gg=0;else if(lh)gg=0,Ym=!0;else break}++Ld,p_=p_*Af+gg}return Ld===pm||Wf!=null&&Ld-pm!==Wf||Ym?{n:null,pos:Ld}:{n:p_,pos:Ld}}function V_(Vd,Ld,Yd,mf,Af,Wf){let lh=Vd.charCodeAt(Ld),bh;if(lh===123){if(++Ld,{code:bh,pos:Ld}=d_(Vd,Ld,Yd,mf,Vd.indexOf("}",Ld)-Ld,!0,Af,Wf),++Ld,bh!==null&&bh>1114111)if(Af)Wf.invalidCodePoint(Ld,Yd,mf);else return{code:null,pos:Ld}}else({code:bh,pos:Ld}=d_(Vd,Ld,Yd,mf,4,!1,Af,Wf));return{code:bh,pos:Ld}}function h_(Vd,Ld,Yd){return new nd(Yd,Vd-Ld,Vd)}var n_=new Set([103,109,115,105,121,117,100,118]),Lm=class{constructor(Vd){this.type=Vd.type,this.value=Vd.value,this.start=Vd.start,this.end=Vd.end,this.loc=new od(Vd.startLoc,Vd.endLoc)}},v_=class extends th{constructor(Vd,Ld){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(Yd,mf,Af,Wf)=>this.options.errorRecovery?(this.raise(Md.InvalidDigit,h_(Yd,mf,Af),{radix:Wf}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(Md.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(Md.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(Md.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(Md.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(Yd,mf,Af)=>{this.recordStrictModeErrors(Md.StrictNumericEscape,h_(Yd,mf,Af))},unterminated:(Yd,mf,Af)=>{throw this.raise(Md.UnterminatedString,h_(Yd-1,mf,Af))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(Md.StrictNumericEscape),unterminated:(Yd,mf,Af)=>{throw this.raise(Md.UnterminatedTemplate,h_(Yd,mf,Af))}}),this.state=new Jh,this.state.init(Vd),this.input=Ld,this.length=Ld.length,this.comments=[],this.isLookahead=!1}pushToken(Vd){this.tokens.length=this.state.tokensLength,this.tokens.push(Vd),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Lm(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(Vd){return this.match(Vd)?(this.next(),!0):!1}match(Vd){return this.state.type===Vd}createLookaheadState(Vd){return{pos:Vd.pos,value:null,type:Vd.type,start:Vd.start,end:Vd.end,context:[this.curContext
2024-09-18 09:46:23 +08:00
` : ` \ r
2024-12-08 09:17:51 +08:00
` ):mf=String.fromCharCode(Yd),++this.state.curLine,this.state.lineStart=this.state.pos,mf}jsxReadString(Ld){let Yd="",mf=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Md.UnterminatedString,this.state.startLoc);let Af=this.input.charCodeAt(this.state.pos);if(Af===Ld)break;Af===38?(Yd+=this.input.slice(mf,this.state.pos),Yd+=this.jsxReadEntity(),mf=this.state.pos):Th(Af)?(Yd+=this.input.slice(mf,this.state.pos),Yd+=this.jsxReadNewLine(!1),mf=this.state.pos):++this.state.pos}Yd+=this.input.slice(mf,this.state.pos++),this.finishToken(133,Yd)}jsxReadEntity(){let Ld=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let Yd=10;this.codePointAtPos(this.state.pos)===120&&(Yd=16,++this.state.pos);let mf=this.readInt(Yd,void 0,!1,"bail");if(mf!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(mf)}else{let Yd=0,mf=!1;for(;Yd++<10&&this.state.pos<this.length&&!(mf=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(mf){this.input.slice(Ld,this.state.pos);let Af;++this.state.pos}}return this.state.pos=Ld,"&"}jsxReadWord(){let Ld,Yd=this.state.pos;do Ld=this.input.charCodeAt(++this.state.pos);while(Zh(Ld)||Ld===45);this.finishToken(140,this.input.slice(Yd,this.state.pos))}jsxParseIdentifier(){let Ld=this.startNode();return this.match(140)?Ld.name=this.state.value:Rf(this.state.type)?Ld.name=dh(this.state.type):this.unexpected(),this.next(),this.finishNode(Ld,"JSXIdentifier")}jsxParseNamespacedName(){let Ld=this.state.startLoc,Yd=this.jsxParseIdentifier();if(!this.eat(14))return Yd;let mf=this.startNodeAt(Ld);return mf.namespace=Yd,mf.name=this.jsxParseIdentifier(),this.finishNode(mf,"JSXNamespacedName")}jsxParseElementName(){let Ld=this.state.startLoc,Yd=this.jsxParseNamespacedName();if(Yd.type==="JSXNamespacedName")return Yd;for(;this.eat(16);){let mf=this.startNodeAt(Ld);mf.object=Yd,mf.property=this.jsxParseIdentifier(),Yd=this.finishNode(mf,"JSXMemberExpression")}return Yd}jsxParseAttributeValue(){let Ld;switch(this.state.type){case 5:return Ld=this.startNode(),this.setContext(df.brace),this.next(),Ld=this.jsxParseExpressionContainer(Ld,df.j_oTag),Ld.expression.type==="JSXEmptyExpression"&&this.raise(sg.AttributeIsEmpty,Ld),Ld;case 142:case 133:return this.parseExprAtom();default:throw this.raise(sg.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let Ld=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(Ld,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(Ld){return this.next(),Ld.expression=this.parseExpression(),this.setContext(df.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Ld,"JSXSpreadChild")}jsxParseExpressionContainer(Ld,Yd){if(this.match(8))Ld.expression=this.jsxParseEmptyExpression();else{let mf=this.parseExpression();Ld.expression=mf}return this.setContext(Yd),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Ld,"JSXExpressionContainer")}jsxParseAttribute(){let Ld=this.startNode();return this.match(5)?(this.setContext(df.brace),this.next(),this.expect(21),Ld.argument=this.parseMaybeAssignAllowIn(),this.setContext(df.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(Ld,"JSXSpreadAttribute")):(Ld.name=this.jsxParseNamespacedName(),Ld.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(Ld,"JSXAttribute"))}jsxParseOpeningElementAt(Ld){let Yd=this.startNodeAt(Ld);return this.eat(143)?this.finishNode(Yd,"JSXOpeningFragment"):(Yd.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(Yd))}jsxParseOpeningElementAfterName(Ld){let Yd=[];for(;!this.match(56)&&!this.match(143);)Yd.push(this.jsxParseAttribute());return Ld.attributes=Yd,Ld.selfClosing=this.eat(56),this.expect(143),this.finishNode(Ld,"JSXOpeningElement")}jsxParseClosingElementAt(Ld){let Yd=this.startNodeAt(Ld);return this.eat(143)?this.finishNode(Yd,"JSXClosingFragment"):(Yd.name=this.jsxParseElementName(),this.expect(143),this.finishNode(Yd,"JSXClosingElement"))}jsxParseElementAt(Ld){let Yd=this.startNodeAt(Ld),mf=[],Af
2024-11-28 09:28:59 +08:00
` ),cooked:Af===null?null:Af.slice(1,Ih)},lh.tail=bh,this.next();let pm=this.finishNode(lh,"TemplateElement");return this.resetEndLocation(pm,ld(this.state.lastTokEndLoc,Ih)),pm}parseTemplate(Vd){let Ld=this.startNode(),Yd=this.parseTemplateElement(Vd),mf=[Yd],Af=[];for(;!Yd.tail;)Af.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),mf.push(Yd=this.parseTemplateElement(Vd));return Ld.expressions=Af,Ld.quasis=mf,this.finishNode(Ld,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(Vd,Ld,Yd,mf){Yd&&this.expectPlugin("recordAndTuple");let Af=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let Wf=Object.create(null),lh=!0,bh=this.startNode();for(bh.properties=[],this.next();!this.match(Vd);){if(lh)lh=!1;else if(this.expect(12),this.match(Vd)){this.addTrailingCommaExtraToNode(bh);break}let xh;Ld?xh=this.parseBindingProperty():(xh=this.parsePropertyDefinition(mf),this.checkProto(xh,Yd,Wf,mf)),Yd&&!this.isObjectProperty(xh)&&xh.type!=="SpreadElement"&&this.raise(Md.InvalidRecordProperty,xh),xh.shorthand&&this.addExtra(xh,"shorthand",!0),bh.properties.push(xh)}this.next(),this.state.inFSharpPipelineDirectBody=Af;let Ih="ObjectExpression";return Ld?Ih="ObjectPattern":Yd&&(Ih="RecordExpression"),this.finishNode(bh,Ih)}addTrailingCommaExtraToNode(Vd){this.addExtra(Vd,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(Vd,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(Vd){return!Vd.computed&&Vd.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(Vd){let Ld=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(Md.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)Ld.push(this.parseDecorator());let Yd=this.startNode(),mf=!1,Af=!1,Wf;if(this.match(21))return Ld.length&&this.unexpected(),this.parseSpread();Ld.length&&(Yd.decorators=Ld,Ld=[]),Yd.method=!1,Vd&&(Wf=this.state.startLoc);let lh=this.eat(55);this.parsePropertyNamePrefixOperator(Yd);let bh=this.state.containsEsc;if(this.parsePropertyName(Yd,Vd),!lh&&!bh&&this.maybeAsyncOrAccessorProp(Yd)){let{key:Ih}=Yd,xh=Ih.name;xh==="async"&&!this.hasPrecedingLineBreak()&&(mf=!0,this.resetPreviousNodeTrailingComments(Ih),lh=this.eat(55),this.parsePropertyName(Yd)),(xh==="get"||xh==="set")&&(Af=!0,this.resetPreviousNodeTrailingComments(Ih),Yd.kind=xh,this.match(55)&&(lh=!0,this.raise(Md.AccessorIsGenerator,this.state.curPosition(),{kind:xh}),this.next()),this.parsePropertyName(Yd))}return this.parseObjPropValue(Yd,Wf,lh,mf,!1,Af,Vd)}getGetterSetterExpectedParamCount(Vd){return Vd.kind==="get"?0:1}getObjectOrClassMethodParams(Vd){return Vd.params}checkGetterSetterParams(Vd){var Ld;let Yd=this.getGetterSetterExpectedParamCount(Vd),mf=this.getObjectOrClassMethodParams(Vd);mf.length!==Yd&&this.raise(Vd.kind==="get"?Md.BadGetterArity:Md.BadSetterArity,Vd),Vd.kind==="set"&&((Ld=mf[mf.length-1])==null?void 0:Ld.type)==="RestElement"&&this.raise(Md.BadSetterRestParameter,Vd)}parseObjectMethod(Vd,Ld,Yd,mf,Af){if(Af){let Wf=this.parseMethod(Vd,Ld,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(Wf),Wf}if(Yd||Ld||this.match(10))return mf&&this.unexpected(),Vd.kind="method",Vd.method=!0,this.parseMethod(Vd,Ld,Yd,!1,!1,"ObjectMethod")}parseObjectProperty(Vd,Ld,Yd,mf){if(Vd.shorthand=!1,this.eat(14))return Vd.value=Yd?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(mf),this.finishNode(Vd,"ObjectProperty");if(!Vd.computed&&Vd.key.type==="Identifier"){if(this.checkReservedWord(Vd.key.name,Vd.key.loc.start,!0,!1),Yd)Vd.value=this.parseMaybeDefault(Ld,_g(Vd.key));else if(this.match(29)){let Af=this.state.startLoc;mf!=null?mf.shorthandAssignLoc===null&&(mf.shorthandAssignLoc=Af):this.raise(Md.InvalidCoverInitializedName,Af),Vd.value=this.parseMaybeDefault(Ld,_g(Vd.key))}else Vd.value=_g(Vd.key);return Vd.shorthand=!0,this.finishNode(Vd,"ObjectProperty")}}parseObjPropValue(Vd,Ld,Yd,mf,Af,Wf,lh){let bh=this.parseObjectMethod(Vd,Yd,mf,Af,Wf)||this.parseObjectPr
` )return qa-2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa-1}else{if(ld===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa+1}return qa}var us $ 2=mr $ 2;function yr $ 2(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?cs $ 3(Ra,qa):qa}var fs $ 2=yr $ 2;function xr $ 3(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=ls $ 2(Ra,od),od=ps $ 1(Ra,od),od=fs $ 2(Ra,od),od=us $ 2(Ra,od);return od}var ds $ 1=xr $ 3;function Pr $ 3(Ra){let qa=[];for(let nd of Ra)try{return nd()}catch(od){qa.push(od)}throw Object.assign(new Error("All combinations failed"),{errors:qa})}var ms $ 2=Pr $ 3;function gr $ 2(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var Oe $ 4=gr $ 2,Tr $ 3=(Ra,qa,nd)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[nd<0?qa.length+nd:nd]:qa.at(nd)},St $ 3=Tr $ 3;function br $ 4(Ra){return Array.isArray(Ra)&&Ra.length>0}var Pe $ 4=br $ 4;function D $ 2(Ra){var qa,nd,od;let ld=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ud=(od=((nd=Ra.declaration)==null?void 0:nd.decorators)??Ra.decorators)==null?void 0:od[0];return ud?Math.min(D $ 2(ud),ld):ld}function B $ 2(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function Ar $ 2(Ra){let qa=new Set(Ra);return nd=>qa.has(nd==null?void 0:nd.type)}var ys $ 3=Ar $ 2,Sr $ 3=ys $ 3(["Block","CommentBlock","MultiLine"]),ge $ 4=Sr $ 3;function wr $ 3(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(nd=>nd.trimStart()[0]==="*")}var wt $ 2=wr $ 3;function Cr $ 1(Ra){return ge $ 4(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var xs $ 2=Cr $ 1,Te $ 3=null;function be $ 5(Ra){if(Te $ 3!==null&&typeof Te $ 3.property){let qa=Te $ 3;return Te $ 3=be $ 5.prototype=null,qa}return Te $ 3=be $ 5.prototype=Ra??Object.create(null),new be $ 5}var Er $ 2=10;for(let Ra=0;Ra<=Er $ 2;Ra++)be $ 5();function Ct $ 4(Ra){return be $ 5(Ra)}function Ir $ 3(Ra,qa="type"){Ct $ 4(Ra);function nd(od){let ld=od[qa],ud=Ra[ld];if(!Array.isArray(ud))throw Object.assign(new Error( ` Missing visitor keys for '${ld}' . ` ),{node:od});return ud}return nd}var Ps $ 1=Ir $ 3,gs $ 4={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],ImportExpression:["source","options","attributes"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","vari
` ;Ra=ie $ 3(!1,Ra.replace(Or $ 3,"").replace(Mr $ 3,""),Ur $ 3," $ 1");let nd="";for(;nd!==Ra;)nd=Ra,Ra=ie $ 3(!1,Ra,Rr $ 2, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Ss $ 1,"").trimEnd();let od=Object.create(null),ld=ie $ 3(!1,Ra,ws $ 2,"").replace(Ss $ 1,"").trimEnd(),ud;for(;ud=ws $ 2.exec(Ra);){let cd=ie $ 3(!1,ud[2],Br $ 4,"");if(typeof od[ud[1]]=="string"||Array.isArray(od[ud[1]])){let dd=od[ud[1]];od[ud[1]]=[..._r $ 3,...Array.isArray(dd)?dd:[dd],cd]}else od[ud[1]]=cd}return{comments:ld,pragmas:od}}function jr $ 3(Ra){let qa=Oe $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let nd=Cs $ 2(Ra),{pragmas:od,comments:ld}=Es $ 1(nd);return{shebang:qa,text:Ra,pragmas:od,comments:ld}}function Is $ 3(Ra){let{pragmas:qa}=jr $ 3(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function $ r $ 3(Ra){return Ra=typeof Ra=="function"?{parse:Ra}:Ra,{astFormat:"estree",hasPragma:Is $ 3,locStart:D $ 2,locEnd:B $ 2,...Ra}}var G $ 4= $ r $ 3;function Vr $ 3(Ra){let{filepath:qa}=Ra;if(qa){if(qa=qa.toLowerCase(),qa.endsWith(".cjs"))return"script";if(qa.endsWith(".mjs"))return"module"}}var Ns $ 1=Vr $ 3;function qr $ 3(Ra,qa){let{type:nd="JsExpressionRoot",rootMarker:od,text:ld}=qa,{tokens:ud,comments:cd}=Ra;return delete Ra.tokens,delete Ra.comments,{tokens:ud,comments:cd,type:nd,node:Ra,range:[0,ld.length],rootMarker:od}}var Ue $ 4=qr $ 3,re $ 4=Ra=>G $ 4(Jr $ 4(Ra)),zr $ 3={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}],"sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},ks $ 1="v8intrinsic",vs $ 1=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],V $ 5=(Ra,qa=zr $ 3)=>({...qa,plugins:[...qa.plugins,...Ra]}),Kr $ 4=/@(?:no)?flow \b /u;function Hr $ 4(Ra,qa){var nd;if((nd=qa.filepath)!=null&&nd.endsWith(".js.flow"))return!0;let od=Oe $ 4(Ra);od&&(Ra=Ra.slice(od.length));let ld=ds $ 1(Ra,0);return ld!==!1&&(Ra=Ra.slice(0,ld)),Kr $ 4.test(Ra)}function Wr $ 3(Ra,qa,nd){let od=Ra(qa,nd),ld=od.errors.find(ud=>!Xr $ 3.has(ud.reasonCode));if(ld)throw ld;return od}function Jr $ 4({isExpression:Ra=!1,optionsCombinations:qa}){return(nd,od={})=>{if((od.parser==="babel"||od.parser==="__babel_estree")&&Hr $ 4(nd,od))return od.parser="babel-flow",Bs $ 3.parse(nd,od);let ld=qa;(od.__babelSourceType??Ns $ 1(od))==="script"&&(ld=ld.map(pd=>({...pd,sourceType:"script"})));let ud=/%[A-Z]/u.test(nd);nd.includes("|>")?ld=(ud?[...vs $ 1,ks $ 1]:vs $ 1).flatMap(pd=>ld.map(fd=>V $ 5([pd],fd))):ud&&(ld=ld.map(pd=>V $ 5([ks $ 1],pd)));let cd=Ra?_e $ 4.parseExpression:_e $ 4.parse,dd;try{dd=ms $ 2(ld.map(pd=>()=>Wr $ 3(cd,nd,pd)))}catch({errors:[pd]}){throw Re $ 4(pd)}return Ra&&(dd=Ue $ 4(dd,{text:nd,rootMarker:od.rootMarker})),As $ 2(dd,{parser:"babel",text:nd})}}var Xr $ 3=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Fs
` )return qa-2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa-1}else{if(ld===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa+1}return qa}var Ue $ 3= $ a $ 2;function Ka $ 1(Ra,qa,nd={}){let od=Ge $ 2(Ra,nd.backwards?qa-1:qa,nd),ld=Ue $ 3(Ra,od,nd);return od!==ld}var te $ 3=Ka $ 1;function za(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let nd=qa+2;nd<Ra.length;++nd)if(Ra.charAt(nd)==="*"&&Ra.charAt(nd+1)==="/")return nd+2}return qa}var Lt $ 2=za;function Qa(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?zs(Ra,qa):qa}var wt $ 1=Qa;function Za $ 1(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=Ks $ 1(Ra,od),od=Lt $ 2(Ra,od),od=Ge $ 2(Ra,od);return od=wt $ 1(Ra,od),od=Ue $ 3(Ra,od),od!==!1&&te $ 3(Ra,od)}var Ot $ 3=Za $ 1;function eo $ 1(Ra){return Array.isArray(Ra)&&Ra.length>0}var w $ 1=eo $ 1,dr $ 1="'",Qs $ 1='"';function to $ 1(Ra,qa){let nd=qa===!0||qa===dr $ 1?dr $ 1:Qs $ 1,od=nd===dr $ 1?Qs $ 1:dr $ 1,ld=0,ud=0;for(let cd of Ra)cd===nd?ld++:cd===od&&ud++;return ld>ud?od:nd}var xr $ 2=to $ 1;function ro $ 1(Ra,qa,nd){let od=qa==='"'?"'":'"',ld=N $ 4(!1,Ra,/ \\ (.)|(["'])/gsu,(ud,cd,dd)=>cd===od?cd:dd===qa?" \\ "+dd:dd||(nd&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(cd)?cd:" \\ "+cd));return qa+ld+qa}var Zs $ 1=ro $ 1;function no $ 2(Ra,qa){let nd=Ra.slice(1,-1),od=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":xr $ 2(nd,qa.singleQuote);return Zs $ 1(nd,od,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var tt $ 3=no $ 2;function R $ 4(Ra){var qa,nd,od;let ld=((qa=Ra.range)==null?void 0:qa[0])??Ra.start,ud=(od=((nd=Ra.declaration)==null?void 0:nd.decorators)??Ra.decorators)==null?void 0:od[0];return ud?Math.min(R $ 4(ud),ld):ld}function k $ 1(Ra){var qa;return((qa=Ra.range)==null?void 0:qa[1])??Ra.end}function ht $ 3(Ra,qa){let nd=R $ 4(Ra);return Number.isInteger(nd)&&nd===R $ 4(qa)}function so $ 2(Ra,qa){let nd=k $ 1(Ra);return Number.isInteger(nd)&&nd===k $ 1(qa)}function eu $ 2(Ra,qa){return ht $ 3(Ra,qa)&&so $ 2(Ra,qa)}var Qt $ 3=null;function Zt $ 2(Ra){if(Qt $ 3!==null&&typeof Qt $ 3.property){let qa=Qt $ 3;return Qt $ 3=Zt $ 2.prototype=null,qa}return Qt $ 3=Zt $ 2.prototype=Ra??Object.create(null),new Zt $ 2}var uo $ 3=10;for(let Ra=0;Ra<=uo $ 3;Ra++)Zt $ 2();function In $ 1(Ra){return Zt $ 2(Ra)}function io $ 2(Ra,qa="type"){In $ 1(Ra);function nd(od){let ld=od[qa],ud=Ra[ld];if(!Array.isArray(ud))throw Object.assign(new Error( ` Missing visitor keys for '${ld}' . ` ),{node:od});return ud}return nd}var hr $ 3=io $ 2,tu $ 2={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument
` ):Ra.type==="UnaryExpression"?rr $ 2(Ra.argument,{printWidth:nd}):Ra.type==="CallExpression"&&Ra.arguments.length===0&&Ra.callee.type==="Identifier"?Ra.callee.name.length<=od-2:kr $ 2(Ra)}function Oe $ 3(Ra,qa){return X $ 4(qa)?Bt $ 4(qa):d $ 1(qa,g $ 3.Leading,nd=>te $ 3(Ra,k $ 1(nd)))}function nu $ 4(Ra){return Ra.quasis.some(qa=>qa.value.raw.includes( `
` ))}function Lr $ 2(Ra,qa){return(Ra.type==="TemplateLiteral"&&nu $ 4(Ra)||Ra.type==="TaggedTemplateExpression"&&nu $ 4(Ra.quasi))&&!te $ 3(qa,R $ 4(Ra),{backwards:!0})}function wr $ 2(Ra){if(!d $ 1(Ra))return!1;let qa=O $ 3(!1,ct $ 2(Ra,g $ 3.Dangling),-1);return qa&&!re $ 3(qa)}function lu $ 3(Ra){if(Ra.length<=1)return!1;let qa=0;for(let nd of Ra)if(_t $ 2(nd)){if(qa+=1,qa>1)return!0}else if(L $ 4(nd)){for(let od of oe $ 3(nd))if(_t $ 2(od))return!0}return!1}function Or $ 2(Ra){let{node:qa,parent:nd,key:od}=Ra;return od==="callee"&&L $ 4(qa)&&L $ 4(nd)&&nd.arguments.length>0&&qa.arguments.length>nd.arguments.length}var xo $ 3=new Set(["!","-","+","~"]);function be $ 4(Ra,qa=2){if(qa<=0)return!1;if(Ra.type==="ChainExpression"||Ra.type==="TSNonNullExpression")return be $ 4(Ra.expression,qa);let nd=od=>be $ 4(od,qa-1);if(vn $ 2(Ra))return et $ 4(Ra.pattern??Ra.regex.pattern)<=5;if(kr $ 2(Ra)||Do $ 2(Ra)||Ra.type==="ArgumentPlaceholder")return!0;if(Ra.type==="TemplateLiteral")return Ra.quasis.every(od=>!od.value.raw.includes( `
` ))&&Ra.expressions.every(nd);if(se $ 2(Ra))return Ra.properties.every(od=>!od.computed&&(od.shorthand||od.value&&nd(od.value)));if(U $ 3(Ra))return Ra.elements.every(od=>od===null||nd(od));if(lt $ 2(Ra)){if(Ra.type==="ImportExpression"||be $ 4(Ra.callee,qa)){let od=oe $ 3(Ra);return od.length<=qa&&od.every(nd)}return!1}return q $ 3(Ra)?be $ 4(Ra.object,qa)&&be $ 4(Ra.property,qa):Ra.type==="UnaryExpression"&&xo $ 3.has(Ra.operator)||Ra.type==="UpdateExpression"?be $ 4(Ra.argument,qa):!1}function fe $ 3(Ra){var qa;return((qa=Ra.extra)==null?void 0:qa.raw)??Ra.raw}function mu $ 2(Ra){return Ra}function ae $ 1(Ra,qa="es5"){return Ra.trailingComma==="es5"&&qa==="es5"||Ra.trailingComma==="all"&&(qa==="all"||qa==="es5")}function ie $ 2(Ra,qa){switch(Ra.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return ie $ 2(Ra.left,qa);case"MemberExpression":case"OptionalMemberExpression":return ie $ 2(Ra.object,qa);case"TaggedTemplateExpression":return Ra.tag.type==="FunctionExpression"?!1:ie $ 2(Ra.tag,qa);case"CallExpression":case"OptionalCallExpression":return Ra.callee.type==="FunctionExpression"?!1:ie $ 2(Ra.callee,qa);case"ConditionalExpression":return ie $ 2(Ra.test,qa);case"UpdateExpression":return!Ra.prefix&&ie $ 2(Ra.argument,qa);case"BindExpression":return Ra.object&&ie $ 2(Ra.object,qa);case"SequenceExpression":return ie $ 2(Ra.expressions[0],qa);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":case"AsExpression":case"AsConstExpression":case"SatisfiesExpression":return ie $ 2(Ra.expression,qa);default:return qa(Ra)}}var su $ 3={"==":!0,"!=":!0,"===":!0,"!==":!0},br $ 3={"*":!0,"/":!0,"%":!0},_n $ 3={">>":!0,">>>":!0,"<<":!0};function nr $ 2(Ra,qa){return!(er $ 2(qa)!==er $ 2(Ra)||Ra==="**"||su $ 3[Ra]&&su $ 3[qa]||qa==="%"&&br $ 3[Ra]||Ra==="%"&&br $ 3[qa]||qa!==Ra&&br $ 3[qa]&&br $ 3[Ra]||_n $ 3[Ra]&&_n $ 3[qa])}var ho $ 2=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap((Ra,qa)=>Ra.map(nd=>[nd,qa])));function er $ 2(Ra){return ho $ 2.get(Ra)}function yu $ 1(Ra){return!!_n $ 3[Ra]||Ra==="|"||Ra==="^"||Ra==="&"}function Du $ 2(Ra){var qa;if(Ra.rest)return!0;let nd=K $ 3(Ra);return((qa=O $ 3(!1,nd,-1))==null?void 0:qa.type)==="RestElement"}var wn $ 3=new WeakMap;function K $ 3(Ra){if(wn $ 3.has(Ra))return wn $ 3.get(Ra);let qa=[];return Ra.this&&qa.push(Ra.this),Array.isArray(Ra.parameters)?qa.push(...Ra.parameters):Array.isArray(Ra.params)&&qa.push(...Ra.params),Ra.rest&&qa.push(Ra.rest),wn $ 3.set(Ra,qa),qa}function fu $ 2(Ra,qa){let{node:nd}=Ra,od=0,ld=ud=>qa(ud,od++);nd.this&&Ra.call(ld,"this"),Array.isArray(nd.parameters)?Ra.each(ld,"parameters"):Array.isArray(nd.params)&&Ra.each(ld,"params"),nd.rest&&Ra.call(ld,"rest")}var On $ 3=new WeakMap;function oe $ 3(Ra){if(On $ 3.has(Ra))return On $ 3.get(Ra);if(Ra.type==="ChainExpression")return oe $ 3(Ra.expression);let qa=Ra.arguments;return Ra.type==="ImportExpression"&&(qa=[Ra.source],Ra.attributes&&qa.push(Ra.attributes),Ra.options&&qa.push(Ra.options)),On $ 3.set(Ra,qa),qa}function Rt $ 4(Ra,qa){let{node:nd}=Ra;if(nd.type==="ChainExpression")return Ra.call(()=>Rt $ 4(Ra,qa),"expression");nd.type==="ImportExpression"?(Ra.call(od=>qa(od,0),"source"),nd.attributes&&Ra.call(od=>qa(od,1),"attributes"),nd.options&&Ra.call(od=>qa(od,1),"options")):Ra.each(qa,"arguments")}function Rn $ 2(Ra,qa){let nd=[];if(Ra.type==="ChainExpression"&&(Ra=Ra.expression,nd.push("expression")),Ra.type==="ImportExpression"){if(qa===0||qa===(Ra.attributes||Ra.options?-2:-1))return[...nd,"source"];if(Ra.attributes&&(qa===1||qa===-1))return[...nd,"attributes"];if(Ra.options&&(qa===1||qa===-1))return[...nd,"options"];throw new RangeError("Invalid argument index")}if(qa<0&&(qa=Ra.arguments.length+qa),qa<0||qa>=Ra.arguments.length)throw new RangeError("Invalid argument index");return[...nd,"arguments",qa]}function sr $ 2(Ra){return Ra.value.trim()==="prettier-ignore"&&!Ra.unignore}function Bt $ 4(Ra){return(Ra==null?void 0:Ra.prettierIgnore)||d $ 1(Ra,g $ 3.PrettierIgnore)}var g $ 3={Leading:2,Trailing:4,
Expected it to be 'string' or 'object' . ` ;if(ut $ 1(Ra))throw new Error("doc is valid.");let nd=Object.prototype.toString.call(Ra);if(nd!=="[object Object]")return ` Unexpected doc '${nd}' . ` ;let od=Bo $ 2([...jr $ 2].map(ld=> ` '${ld}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { od } . ` }var Jn $ 4=class extends Error{constructor(nd){super(bo $ 1(nd));Km(this,"name","InvalidDocError");this.doc=nd}},Ct $ 3=Jn $ 4,Au $ 1={};function Po $ 1(Ra,qa,nd,od){let ld=[Ra];for(;ld.length>0;){let ud=ld.pop();if(ud===Au $ 1){nd(ld.pop());continue}nd&&ld.push(ud,Au $ 1);let cd=ut $ 1(ud);if(!cd)throw new Ct $ 3(ud);if((qa==null?void 0:qa(ud))!==!1)switch(cd){case _e $ 3:case Pe $ 3:{let dd=cd===_e $ 3?ud:ud.parts;for(let pd=dd.length,fd=pd-1;fd>=0;--fd)ld.push(dd[fd]);break}case xe $ 3:ld.push(ud.flatContents,ud.breakContents);break;case le $ 3:if(od&&ud.expandedStates)for(let dd=ud.expandedStates.length,pd=dd-1;pd>=0;--pd)ld.push(ud.expandedStates[pd]);else ld.push(ud.contents);break;case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:ld.push(ud.contents);break;case rt $ 2:case nt $ 3:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:break;default:throw new Ct $ 3(ud)}}}var qn $ 3=Po $ 1,Tu $ 2=()=>{},vr $ 1=Tu $ 2;function f $ 1(Ra){return{type:Xe $ 2,contents:Ra}}function he $ 2(Ra,qa){return{type:Ye $ 2,contents:qa,n:Ra}}function l $ 1(Ra,qa={}){return vr $ 1(qa.expandedStates),{type:le $ 3,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function du $ 3(Ra){return he $ 2(Number.NEGATIVE_INFINITY,Ra)}function Mr $ 2(Ra){return he $ 2(-1,Ra)}function ze $ 3(Ra,qa){return l $ 1(Ra[0],{...qa,expandedStates:Ra})}function qt $ 3(Ra){return{type:Pe $ 3,parts:Ra}}function b $ 2(Ra,qa="",nd={}){return{type:xe $ 3,breakContents:Ra,flatContents:qa,groupId:nd.groupId}}function At $ 4(Ra,qa){return{type:He $ 2,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function Wn $ 2(Ra){return{type:Ve $ 3,contents:Ra}}var ke $ 2={type: $ e $ 3},Ee $ 3={type:ve $ 3},Gn $ 4={type:me $ 1,hard:!0},ko $ 1={type:me $ 1,hard:!0,literal:!0},x $ 3={type:me $ 1},E $ 2={type:me $ 1,soft:!0},F $ 1=[Gn $ 4,Ee $ 3],Rr $ 1=[ko $ 1,Ee $ 3],Un $ 3={type:nt $ 3};function P $ 3(Ra,qa){let nd=[];for(let od=0;od<qa.length;od++)od!==0&&nd.push(Ra),nd.push(qa[od]);return nd}function xu $ 2(Ra,qa,nd){let od=Ra;if(qa>0){for(let ld=0;ld<Math.floor(qa/nd);++ld)od=f $ 1(od);od=he $ 2(qa%nd,od),od=he $ 2(Number.NEGATIVE_INFINITY,od)}return od}function it $ 2(Ra,qa){return Ra?{type:je $ 3,label:Ra,contents:qa}:qa}function mt $ 2(Ra,qa){if(typeof Ra=="string")return qa(Ra);let nd=new Map;return od(Ra);function od(ud){if(nd.has(ud))return nd.get(ud);let cd=ld(ud);return nd.set(ud,cd),cd}function ld(ud){switch(ut $ 1(ud)){case _e $ 3:return qa(ud.map(od));case Pe $ 3:return qa({...ud,parts:ud.parts.map(od)});case xe $ 3:return qa({...ud,breakContents:od(ud.breakContents),flatContents:od(ud.flatContents)});case le $ 3:{let{expandedStates:cd,contents:dd}=ud;return cd?(cd=cd.map(od),dd=cd[0]):dd=od(dd),qa({...ud,contents:dd,expandedStates:cd})}case Ye $ 2:case Xe $ 2:case He $ 2:case je $ 3:case Ve $ 3:return qa({...ud,contents:od(ud.contents)});case rt $ 2:case nt $ 3:case st $ 2:case $ e $ 3:case me $ 1:case ve $ 3:return qa(ud);default:throw new Ct $ 3(ud)}}}function gu $ 2(Ra,qa,nd){let od=nd,ld=!1;function ud(cd){if(ld)return!1;let dd=qa(cd);dd!==void 0&&(ld=!0,od=dd)}return qn $ 3(Ra,ud),od}function Io $ 1(Ra){if(Ra.type===le $ 3&&Ra.break||Ra.type===me $ 1&&Ra.hard||Ra.type===ve $ 3)return!0}function ne $ 3(Ra){return gu $ 2(Ra,Io $ 1,!1)}function hu $ 2(Ra){if(Ra.length>0){let qa=O $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Su $ 1(Ra){let qa=new Set,nd=[];function od(ud){if(ud.type===ve $ 3&&hu $ 2(nd),ud.type===le $ 3){if(nd.push(ud),qa.has(ud))return!1;qa.add(ud)}}function ld(ud){ud.type===le $ 3&&nd.pop().break&&hu $ 2(nd)}qn $ 3(Ra,od,ld,!0)}function Lo $ 2(Ra){return Ra.type===me $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===xe $ 3?Ra.flatContents:Ra}function ur $ 2(Ra){return mt $ 2(Ra,Lo $ 2)}function wo $ 2(Ra){switch(ut $ 1(Ra)){case Pe $ 3:if(Ra.parts.every(qa=>qa===""))return"";break;case le $ 3:if(!Ra.contents&&!Ra.id&&!Ra.break&&!Ra.expandedStates)return"";if(Ra.contents.type===le $ 3&&Ra.contents.id===Ra.id&&Ra.contents.break===Ra.break&&Ra.contents.expandedStates===Ra.expandedStates)return Ra.contents;break;case Ye $ 2:case Xe $ 2:case He $ 2:case Ve $ 3:if(!Ra.contents)return"";break;case xe $ 3:if(!Ra.flatContents&&!Ra.breakContents)return"";break;case _e $ 3:{let qa=[];for(let nd of Ra){if(!nd)continue;let[o
` )):nd)}function Oo $ 1(Ra){if(Ra.type===me $ 1)return!0}function Bu $ 1(Ra){return gu $ 2(Ra,Oo $ 1,!1)}function ir $ 3(Ra,qa){return Ra.type===je $ 3?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}function _o $ 2(Ra){let qa= ` * $ { Ra . value } * ` .split( `
` );return qa.length>1&&qa.every(nd=>nd.trimStart()[0]==="*")}var bu $ 2=_o $ 2;function Pu $ 1(Ra,qa){let nd=Ra.node;if(vt $ 2(nd))return qa.originalText.slice(R $ 4(nd),k $ 1(nd)).trimEnd();if(re $ 3(nd))return bu $ 2(nd)?jo $ 2(nd):["/*",Ie $ 3(nd.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(nd))}function jo $ 2(Ra){let qa=Ra.value.split( `
` );return["/*",P $ 3(F $ 1,qa.map((nd,od)=>od===0?nd.trimEnd():" "+(od<qa.length-1?nd.trim():nd.trimStart()))),"*/"]}var Kn $ 3={};Ar $ 1(Kn $ 3,{endOfLine:()=>Go $ 2,ownLine:()=>Wo $ 2,remaining:()=>Uo $ 3});function vo(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",nd=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return nd.length>20&&(nd=nd.slice(0,19)+"…"),qa+(nd?" "+nd:"")}function Nn $ 3(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=vo(Ra)}function ce $ 3(Ra,qa){qa.leading=!0,qa.trailing=!1,Nn $ 3(Ra,qa)}function Le $ 3(Ra,qa,nd){qa.leading=!1,qa.trailing=!1,nd&&(qa.marker=nd),Nn $ 3(Ra,qa)}function z $ 3(Ra,qa){qa.leading=!1,qa.trailing=!0,Nn $ 3(Ra,qa)}function Mo $ 3(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=Ge $ 2(Ra,od),od=Lt $ 2(Ra,od),od=wt $ 1(Ra,od),od=Ue $ 3(Ra,od);return od}var yt $ 2=Mo $ 3;function Ro $ 1(Ra,qa){let nd=yt $ 2(Ra,qa);return nd===!1?"":Ra.charAt(nd)}var ge $ 3=Ro $ 1;function Jo $ 2(Ra,qa,nd){for(let od=qa;od<nd;++od)if(Ra.charAt(od)=== `
` )return!0;return!1}var de $ 2=Jo $ 2;function qo $ 1(Ra){return re $ 3(Ra)&&Ra.value[0]==="*"&&/@(?:type|satisfies) \b /u.test(Ra.value)}var ku $ 1=qo $ 1;function Wo $ 2(Ra){return[Mu $ 2,Lu $ 1,_u $ 3,ep,Xo $ 1,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,sp,rp, $ n $ 4,vu $ 3,up,Ou $ 2,ju $ 2,Vn $ 3,Yo $ 1,yp].some(qa=>qa(Ra))}function Go $ 2(Ra){return[No $ 1,_u $ 3,Lu $ 1,vu $ 3,Yn $ 3,Hn $ 2,Iu $ 2,wu $ 3,ju $ 2,tp,np, $ n $ 4,op $ 1,Vn $ 3,lp,mp].some(qa=>qa(Ra))}function Uo $ 3(Ra){return[Mu $ 2,Yn $ 3,Hn $ 2,Ho $ 3,Zo $ 2,Ou $ 2, $ n $ 4,Qo $ 2,zo $ 1,cp,Vn $ 3,pp].some(qa=>qa(Ra))}function bt $ 4(Ra,qa){let nd=(Ra.body||Ra.properties).find(({type:od})=>od!=="EmptyStatement");nd?ce $ 3(nd,qa):Le $ 3(Ra,qa)}function Xn $ 4(Ra,qa){Ra.type==="BlockStatement"?bt $ 4(Ra,qa):ce $ 3(Ra,qa)}function No $ 1({comment:Ra,followingNode:qa}){return qa&&ku $ 1(Ra)?(ce $ 3(qa,Ra),!0):!1}function Yn $ 3({comment:Ra,precedingNode:qa,enclosingNode:nd,followingNode:od,text:ld}){if((nd==null?void 0:nd.type)!=="IfStatement"||!od)return!1;if(ge $ 3(ld,k $ 1(Ra))===")")return z $ 3(qa,Ra),!0;if(qa===nd.consequent&&od===nd.alternate){if(qa.type==="BlockStatement")z $ 3(qa,Ra);else{let ud=vt $ 2(Ra)||Ra.loc.start.line===Ra.loc.end.line,cd=Ra.loc.start.line===qa.loc.start.line;ud&&cd?z $ 3(qa,Ra):Le $ 3(nd,Ra)}return!0}return od.type==="BlockStatement"?(bt $ 4(od,Ra),!0):od.type==="IfStatement"?(Xn $ 4(od.consequent,Ra),!0):nd.consequent===od?(ce $ 3(od,Ra),!0):!1}function Hn $ 2({comment:Ra,precedingNode:qa,enclosingNode:nd,followingNode:od,text:ld}){return(nd==null?void 0:nd.type)!=="WhileStatement"||!od?!1:ge $ 3(ld,k $ 1(Ra))===")"?(z $ 3(qa,Ra),!0):od.type==="BlockStatement"?(bt $ 4(od,Ra),!0):nd.body===od?(ce $ 3(od,Ra),!0):!1}function Iu $ 2({comment:Ra,precedingNode:qa,enclosingNode:nd,followingNode:od}){return(nd==null?void 0:nd.type)!=="TryStatement"&&(nd==null?void 0:nd.type)!=="CatchClause"||!od?!1:nd.type==="CatchClause"&&qa?(z $ 3(qa,Ra),!0):od.type==="BlockStatement"?(bt $ 4(od,Ra),!0):od.type==="TryStatement"?(Xn $ 4(od.finalizer,Ra),!0):od.type==="CatchClause"?(Xn $ 4(od.body,Ra),!0):!1}function Xo $ 1({comment:Ra,enclosingNode:qa,followingNode:nd}){return q $ 3(qa)&&(nd==null?void 0:nd.type)==="Identifier"?(ce $ 3(qa,Ra),!0):!1}function Yo $ 1({comment:Ra,enclosingNode:qa,followingNode:nd,options:od}){return!od.experimentalTernaries||!((qa==null?void 0:qa.type)==="ConditionalExpression"||(qa==null?void 0:qa.type)==="ConditionalTypeAnnotation"||(qa==null?void 0:qa.type)==="TSConditionalType")?!1:(nd==null?void 0:nd.type)==="ConditionalExpression"||(nd==null?void 0:nd.type)==="ConditionalTypeAnnotation"||(nd==null?void 0:nd.type)==="TSConditionalType"?(Le $ 3(qa,Ra),!0):!1}function Lu $ 1({comment:Ra,precedingNode:qa,enclosingNode:nd,followingNode:od,text:ld,options:ud}){let cd=qa&&!de $ 2(ld,k $ 1(qa),R $ 4(Ra));return(!qa||!cd)&&((nd==null?void 0:nd.type)==="ConditionalExpression"||(nd==null?void 0:nd.type)==="ConditionalTypeAnnotation"||(nd==null?void 0:nd.type)==="TSConditionalType")&&od?ud.experimentalTernaries&&nd.alternate===od&&!(re $ 3(Ra)&&!de $ 2(ud.originalText,R $ 4(Ra),k $ 1(Ra)))?(Le $ 3(nd,Ra),!0):(ce $ 3(od,Ra),!0):!1}function Ho $ 3({comment:Ra,precedingNode:qa,enclosingNode:nd}){return Ae $ 3(nd)&&nd.shorthand&&nd.key===qa&&nd.value.type==="AssignmentPattern"?(z $ 3(nd.value.left,Ra),!0):!1}var Vo $ 2=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function wu $ 3({comment:Ra,precedingNode:qa,enclosingNode:nd,followingNode:od}){if(Vo $ 2.has(nd==null?void 0:nd.type)){if(w $ 1(nd.decorators)&&(od==null?void 0:od.type)!=="Decorator")return z $ 3(O $ 3(!1,nd.decorators,-1),Ra),!0;if(nd.body&&od===nd.body)return bt $ 4(nd.body,Ra),!0;if(od){if(nd.superClass&&od===nd.superClass&&qa&&(qa===nd.id||qa===nd.typeParameters))return z $ 3(qa,Ra),!0;for(let ld of["implements","extends","mixins"])if(nd[ld]&&od===nd[ld][0])return qa&&(qa===nd.id||qa===nd.typeParameters||qa===nd.superClass)?z $ 3(qa,Ra):Le $ 3(nd,Ra,ld),!0}}return!1}var $ o $ 2=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-11-28 09:28:59 +08:00
` }}var Se $ 3=Symbol("MODE_BREAK"),at $ 4=Symbol("MODE_FLAT"),ar $ 2=Symbol("cursor");function qu $ 2(){return{value:"",length:0,queue:[]}}function Cp(Ra,qa){return Qn $ 4(Ra,{type:"indent"},qa)}function Ap $ 1(Ra,qa,nd){return qa===Number.NEGATIVE_INFINITY?Ra.root||qu $ 2():qa<0?Qn $ 4(Ra,{type:"dedent"},nd):qa?qa.type==="root"?{...Ra,root:Ra}:Qn $ 4(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},nd):Ra}function Qn $ 4(Ra,qa,nd){let od=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],ld="",ud=0,cd=0,dd=0;for(let Id of od)switch(Id.type){case"indent":md(),nd.useTabs?pd(1):fd(nd.tabWidth);break;case"stringAlign":md(),ld+=Id.n,ud+=Id.n.length;break;case"numberAlign":cd+=1,dd+=Id.n;break;default:throw new Error( ` Unexpected type '${Id.type}' ` )}return Ad(),{...Ra,value:ld,length:ud,queue:od};function pd(Id){ld+=" ".repeat(Id),ud+=nd.tabWidth*Id}function fd(Id){ld+=" ".repeat(Id),ud+=Id}function md(){nd.useTabs?vd():Ad()}function vd(){cd>0&&pd(cd),Nd()}function Ad(){dd>0&&fd(dd),Nd()}function Nd(){cd=0,dd=0}}function Zn $ 3(Ra){let qa=0,nd=0,od=Ra.length;e:for(;od--;){let ld=Ra[od];if(ld===ar $ 2){nd++;continue}for(let ud=ld.length-1;ud>=0;ud--){let cd=ld[ud];if(cd===" "||cd===" ")qa++;else{Ra[od]=ld.slice(0,ud+1);break e}}}if(qa>0||nd>0)for(Ra.length=od+1;nd-- >0;)Ra.push(ar $ 2);return qa}function Jr $ 3(Ra,qa,nd,od,ld,ud){if(nd===Number.POSITIVE_INFINITY)return!0;let cd=qa.length,dd=[Ra],pd=[];for(;nd>=0;){if(dd.length===0){if(cd===0)return!0;dd.push(qa[--cd]);continue}let{mode:fd,doc:md}=dd.pop(),vd=ut $ 1(md);switch(vd){case rt $ 2:pd.push(md),nd-=et $ 4(md);break;case _e $ 3:case Pe $ 3:{let Ad=vd===_e $ 3?md:md.parts;for(let Nd=Ad.length-1;Nd>=0;Nd--)dd.push({mode:fd,doc:Ad[Nd]});break}case Xe $ 2:case Ye $ 2:case He $ 2:case je $ 3:dd.push({mode:fd,doc:md.contents});break;case st $ 2:nd+=Zn $ 3(pd);break;case le $ 3:{if(ud&&md.break)return!1;let Ad=md.break?Se $ 3:fd,Nd=md.expandedStates&&Ad===Se $ 3?O $ 3(!1,md.expandedStates,-1):md.contents;dd.push({mode:Ad,doc:Nd});break}case xe $ 3:{let Ad=(md.groupId?ld[md.groupId]||at $ 4:fd)===Se $ 3?md.breakContents:md.flatContents;Ad&&dd.push({mode:fd,doc:Ad});break}case me $ 1:if(fd===Se $ 3||md.hard)return!0;md.soft||(pd.push(" "),nd--);break;case Ve $ 3:od=!0;break;case $ e $ 3:if(od)return!1;break}}return!1}function es $ 2(Ra,qa){let nd={},od=qa.printWidth,ld=Ju $ 3(qa.endOfLine),ud=0,cd=[{ind:qu $ 2(),mode:Se $ 3,doc:Ra}],dd=[],pd=!1,fd=[],md=0;for(Su $ 1(Ra);cd.length>0;){let{ind:Ad,mode:Nd,doc:Id}=cd.pop();switch(ut $ 1(Id)){case rt $ 2:{let Od=ld!== `
` ?N $ 4(!1,Id, `
` ,ld):Id;dd.push(Od),cd.length>0&&(ud+=et $ 4(Od));break}case _e $ 3:for(let Od=Id.length-1;Od>=0;Od--)cd.push({ind:Ad,mode:Nd,doc:Id[Od]});break;case nt $ 3:if(md>=2)throw new Error("There are too many 'cursor' in doc.");dd.push(ar $ 2),md++;break;case Xe $ 2:cd.push({ind:Cp(Ad,qa),mode:Nd,doc:Id.contents});break;case Ye $ 2:cd.push({ind:Ap $ 1(Ad,Id.n,qa),mode:Nd,doc:Id.contents});break;case st $ 2:ud-=Zn $ 3(dd);break;case le $ 3:switch(Nd){case at $ 4:if(!pd){cd.push({ind:Ad,mode:Id.break?Se $ 3:at $ 4,doc:Id.contents});break}case Se $ 3:{pd=!1;let Od={ind:Ad,mode:at $ 4,doc:Id.contents},Fd=od-ud,Pd=fd.length>0;if(!Id.break&&Jr $ 3(Od,cd,Fd,Pd,nd))cd.push(Od);else if(Id.expandedStates){let Md=O $ 3(!1,Id.expandedStates,-1);if(Id.break){cd.push({ind:Ad,mode:Se $ 3,doc:Md});break}else for(let Bd=1;Bd<Id.expandedStates.length+1;Bd++)if(Bd>=Id.expandedStates.length){cd.push({ind:Ad,mode:Se $ 3,doc:Md});break}else{let jd=Id.expandedStates[Bd],Hd={ind:Ad,mode:at $ 4,doc:jd};if(Jr $ 3(Hd,cd,Fd,Pd,nd)){cd.push(Hd);break}}}else cd.push({ind:Ad,mode:Se $ 3,doc:Id.contents});break}}Id.id&&(nd[Id.id]=O $ 3(!1,cd,-1).mode);break;case Pe $ 3:{let Od=od-ud,{parts:Fd}=Id;if(Fd.length===0)break;let[Pd,Md]=Fd,Bd={ind:Ad,mode:at $ 4,doc:Pd},jd={ind:Ad,mode:Se $ 3,doc:Pd},Hd=Jr $ 3(Bd,[],Od,fd.length>0,nd,!0);if(Fd.length===1){Hd?cd.push(Bd):cd.push(jd);break}let Gd={ind:Ad,mode:at $ 4,doc:Md},zd={ind:Ad,mode:Se $ 3,doc:Md};if(Fd.length===2){Hd?cd.push(Gd,Bd):cd.push(zd,jd);break}Fd.splice(0,2);let df={ind:Ad,mode:Nd,doc:qt $ 3(Fd)},Wd=Fd[0];Jr $ 3({ind:Ad,mode:at $ 4,doc:[Pd,Md,Wd]},[],Od,fd.length>0,nd,!0)?cd.push(df,Gd,Bd):Hd?cd.push(df,zd,Bd):cd.push(df,zd,jd);break}case xe $ 3:case He $ 2:{let Od=Id.groupId?nd[Id.groupId]:Nd;if(Od===Se $ 3){let Fd=Id.type===xe $ 3?Id.breakContents:Id.negate?Id.contents:f $ 1(Id.contents);Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}if(Od===at $ 4){let Fd=Id.type===xe $ 3?Id.flatContents:Id.negate?f $ 1(Id.contents):Id.contents;Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}break}case Ve $ 3:fd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case $ e $ 3:fd.length>0&&cd.push({ind:Ad,mode:Nd,doc:Gn $ 4});break;case me $ 1:switch(Nd){case at $ 4:if(Id.hard)pd=!0;else{Id.soft||(dd.push(" "),ud+=1);break}case Se $ 3:if(fd.length>0){cd.push({ind:Ad,mode:Nd,doc:Id},...fd.reverse()),fd.length=0;break}Id.literal?Ad.root?(dd.push(ld,Ad.root.value),ud=Ad.root.length):(dd.push(ld),ud=0):(ud-=Zn $ 3(dd),dd.push(ld+Ad.value),ud=Ad.length);break}break;case je $ 3:cd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case ve $ 3:break;default:throw new Ct $ 3(Id)}cd.length===0&&fd.length>0&&(cd.push(...fd.reverse()),fd.length=0)}let vd=dd.indexOf(ar $ 2);if(vd!==-1){let Ad=dd.indexOf(ar $ 2,vd+1),Nd=dd.slice(0,vd).join(""),Id=dd.slice(vd+1,Ad).join(""),Od=dd.slice(Ad+1).join("");return{formatted:Nd+Id+Od,cursorNodeStart:Nd.length,cursorNodeText:Id}}return{formatted:dd.join("")}}function Tp $ 1(Ra,qa,nd=0){let od=0;for(let ld=nd;ld<Ra.length;++ld)Ra[ld]===" "?od=od+qa-od%qa:od++;return od}var Wu $ 1=Tp $ 1;function dp(Ra,qa){let nd=Ra.lastIndexOf( `
` );return nd===-1?0:Wu $ 1(Ra.slice(nd+1).match(/^[ \t ]*/u)[0],qa)}var Gu $ 2=dp;function qr $ 2(Ra,qa,nd){let{node:od}=Ra;if(od.type==="TemplateLiteral"&&gp(Ra)){let pd=xp(Ra,nd,qa);if(pd)return pd}let ld="expressions";od.type==="TSTemplateLiteralType"&&(ld="types");let ud=[],cd=Ra.map(qa,ld);ud.push(ke $ 2," ` " ) ; let dd = 0 ; return Ra . each ( ( { index : pd , node : fd } ) => { if ( ud . push ( qa ( ) ) , fd . tail ) return ; let { tabWidth : md } = nd , vd = fd . value . raw , Ad = vd . includes ( `
` )?Gu $ 2(vd,md):dd;dd=Ad;let Nd=cd[pd],Id=od[ld][pd],Od=de $ 2(nd.originalText,k $ 1(fd),R $ 4(od.quasis[pd+1]));if(!Od){let Pd=es $ 2(Nd,{...nd,printWidth:Number.POSITIVE_INFINITY}).formatted;Pd.includes( `
` )?Od=!0:Nd=Pd}Od&&(d $ 1(Id)||Id.type==="Identifier"||q $ 3(Id)||Id.type==="ConditionalExpression"||Id.type==="SequenceExpression"||Te $ 2(Id)||De $ 2(Id))&&(Nd=[f $ 1([E $ 2,Nd]),E $ 2]);let Fd=Ad===0&&vd.endsWith( `
` )?he $ 2(Number.NEGATIVE_INFINITY,Nd):xu $ 2(Nd,Ad,md);ud.push(l $ 1([" ${ ",Fd,ke$2," } "]))},"quasis"),ud.push(" ` "),ud}function Uu$3(Ra,qa){let nd=qa(" quasi ");return it$2(nd.label&&{tagged:!0,...nd.label},[qa(" tag "),qa(Ra.node.typeArguments?" typeArguments ":" typeParameters "),ke$2,nd])}function xp(Ra,qa,nd){let{node:od}=Ra,ld=od.quasis[0].value.raw.trim().split(/\s*\|\s*/u);if(ld.length>1||ld.some(ud=>ud.length>0)){qa.__inJestEach=!0;let ud=Ra.map(nd," expressions ");qa.__inJestEach=!1;let cd=[],dd=ud.map(Ad=>" $ { "+es$2(Ad,{...qa,printWidth:Number.POSITIVE_INFINITY,endOfLine:" lf "}).formatted+" } " ) , pd = [ { hasLineBreak : ! 1 , cells : [ ] } ] ; for ( let Ad = 1 ; Ad < od . quasis . length ; Ad ++ ) { let Nd = O$3 ( ! 1 , pd , - 1 ) , Id = dd [ Ad - 1 ] ; Nd . cells . push ( Id ) , Id . includes ( `
` )&&(Nd.hasLineBreak=!0),od.quasis[Ad].value.raw.includes( `
` )&&pd.push({hasLineBreak:!1,cells:[]})}let fd=Math.max(ld.length,...pd.map(Ad=>Ad.cells.length)),md=Array.from({length:fd}).fill(0),vd=[{cells:ld},...pd.filter(Ad=>Ad.cells.length>0)];for(let{cells:Ad}of vd.filter(Nd=>!Nd.hasLineBreak))for(let[Nd,Id]of Ad.entries())md[Nd]=Math.max(md[Nd],et $ 4(Id));return cd.push(ke $ 2," ` ",f$1([F$1,P$3(F$1,vd.map(Ad=>P$3(" | ",Ad.cells.map((Nd,Id)=>Ad.hasLineBreak?Nd:Nd+" ".repeat(md[Id]-et$4(Nd))))))]),F$1," ` "),cd}}function hp(Ra,qa){let{node:nd}=Ra,od=qa();return d $ 1(nd)&&(od=l $ 1([f $ 1([E $ 2,od]),E $ 2])),[" ${ ",od,ke$2," } "]}function Gt $ 2(Ra,qa){return Ra.map(nd=>hp(nd,qa),"expressions")}function Wr $ 2(Ra,qa){return mt $ 2(Ra,nd=>typeof nd=="string"?qa?N $ 4(!1,nd,/( \\ *) ` / gu , "$1$1\\`" ) : ts$1 ( nd ) : nd ) } function ts$1 ( Ra ) { return N$4 ( ! 1 , Ra , /([\\`]|\$\{)/gu , String . raw ` \$ 1 ` ) } function gp ( { node : Ra , parent : qa } ) { let nd = /^[fx]?(?:describe|it|test)$/u ; return qa . type === "TaggedTemplateExpression" && qa . quasi === Ra && qa . tag . type === "MemberExpression" && qa . tag . property . type === "Identifier" && qa . tag . property . name === "each" && ( qa . tag . object . type === "Identifier" && nd . test ( qa . tag . object . name ) || qa . tag . object . type === "MemberExpression" && qa . tag . object . property . type === "Identifier" && ( qa . tag . object . property . name === "only" || qa . tag . object . property . name === "skip" ) && qa . tag . object . object . type === "Identifier" && nd . test ( qa . tag . object . object . name ) ) } var ns$1 = [ ( Ra , qa ) => Ra . type === "ObjectExpression" && qa === "properties" , ( Ra , qa ) => Ra . type === "CallExpression" && Ra . callee . type === "Identifier" && Ra . callee . name === "Component" && qa === "arguments" , ( Ra , qa ) => Ra . type === "Decorator" && qa === "expression" ] ; function Nu$2 ( Ra ) { let qa = od => od . type === "TemplateLiteral" , nd = ( od , ld ) => Ae$3 ( od ) && ! od . computed && od . key . type === "Identifier" && od . key . name === "styles" && ld === "value" ; return Ra . match ( qa , ( od , ld ) => U$3 ( od ) && ld === "elements" , nd , ... ns$1 ) || Ra . match ( qa , nd , ... ns$1 ) } function Xu$2 ( Ra ) { return Ra . match ( qa => qa . type === "TemplateLiteral" , ( qa , nd ) => Ae$3 ( qa ) && ! qa . computed && qa . key . type === "Identifier" && qa . key . name === "template" && nd === "value" , ... ns$1 ) } function rs$1 ( Ra , qa ) { return d$1 ( Ra , g$3 . Block | g$3 . Leading , ( { value : nd } ) => nd === ` ${ qa } ` ) } function Gr$2 ( { node : Ra , parent : qa } , nd ) { return rs$1 ( Ra , nd ) || Sp ( qa ) && rs$1 ( qa , nd ) || qa . type === "ExpressionStatement" && rs$1 ( qa , nd ) } function Sp ( Ra ) { return Ra . type === "AsConstExpression" || Ra . type === "TSAsExpression" && Ra . typeAnnotation . type === "TSTypeReference" && Ra . typeAnnotation . typeName . type === "Identifier" && Ra . typeAnnotation . typeName . name === "const" } async function Bp ( Ra , qa , nd ) { let { node : od } = nd , ld = od . quasis . map ( md => md . value . raw ) , ud = 0 , cd = ld . reduce ( ( md , vd , Ad ) => Ad === 0 ? vd : md + "@prettier-placeholder-" + ud ++ + "-id" + vd , "" ) , dd = await Ra ( cd , { parser : "scss" } ) , pd = Gt$2 ( nd , qa ) , fd = bp ( dd , pd ) ; if ( ! fd ) throw new Error ( "Couldn't insert all the expressions" ) ; return [ "`" , f$1 ( [ F$1 , fd ] ) , E$2 , "`" ] } function bp ( Ra , qa ) { if ( ! w$1 ( qa ) ) return Ra ; let nd = 0 , od = mt$2 ( Wt$2 ( Ra ) , ld => typeof ld != "string" || ! ld . includes ( "@prettier-placeholder" ) ? ld : ld . split ( /@prettier-placeholder-(\d+)-id/u ) . map ( ( ud , cd ) => cd % 2 === 0 ? Ie$3 ( ud ) : ( nd ++ , qa [ ud ] ) ) ) ; return qa . length === nd ? od : null } function Pp ( { node : Ra , parent : qa , grandparent : nd } ) { return nd && Ra . quasis && qa . type === "JSXExpressionContainer" && nd . type === "JSXElement" && nd . openingElement . name . name === "style" && nd . openingElement . attributes . some ( od => od . type === "JSXAttribute" && od . name . name === "jsx" ) || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "Identifier" && qa . tag . name === "css" || ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && qa . tag . type === "MemberExpression" && qa . tag . object . name === "css" && ( qa . tag . property . name === "global" || qa . tag . property . name === "resolve" ) } function Ur$2 ( Ra ) { return Ra . type === "Identifier" && Ra . name === "styled" } function Yu$1 ( Ra ) { return /^[A-Z]/u . test ( Ra . object . name ) && Ra . property . name === "extend" } function kp$1 ( { parent : Ra } ) { if ( ! Ra || Ra . type !== "TaggedTemplateExpression" ) return ! 1 ; let qa = Ra . tag . type === "ParenthesizedExpression" ? Ra . tag . expression : Ra . tag ; switch ( qa . type ) { case "MemberExpression" : return Ur$2 ( qa . object ) || Yu$1 ( qa ) ; case "CallExpression" : return Ur$2 ( qa . callee ) || qa . callee . type === "MemberExpression" && ( qa . callee . object . type === "MemberExpression" && ( Ur$2 ( qa . callee . object . object ) || Yu$1 ( qa . calle
` ),Nd=Ad.length,Id=ud[dd],Od=Nd>2&&Ad[0].trim()===""&&Ad[1].trim()==="",Fd=Nd>2&&Ad[Nd-1].trim()===""&&Ad[Nd-2].trim()==="",Pd=Ad.every(Bd=>/^ \s *(?:#[^ \n \r ]*)? $ /u.test(Bd));if(!md&&/#[^ \n \r ]* $ /u.test(Ad[Nd-1]))return null;let Md=null;Pd?Md=Op $ 1(Ad):Md=await Ra(vd,{parser:"graphql"}),Md?(Md=Wr $ 2(Md,!1),!fd&&Od&&cd.push(""),cd.push(Md),!md&&Fd&&cd.push("")):!fd&&!md&&Od&&cd.push(""),Id&&cd.push(Id)}return[" ` ",f$1([F$1,P$3(F$1,cd)]),F$1," ` "]}function Op $ 1(Ra){let qa=[],nd=!1,od=Ra.map(ld=>ld.trim());for(let[ld,ud]of od.entries())ud!==""&&(od[ld-1]===""&&nd?qa.push([F $ 1,ud]):qa.push(ud),nd=!0);return qa.length===0?null:P $ 3(F $ 1,qa)}function _p({node:Ra,parent:qa}){return Gr $ 2({node:Ra,parent:qa},"GraphQL")||qa&&(qa.type==="TaggedTemplateExpression"&&(qa.tag.type==="MemberExpression"&&qa.tag.object.name==="graphql"&&qa.tag.property.name==="experimental"||qa.tag.type==="Identifier"&&(qa.tag.name==="gql"||qa.tag.name==="graphql"))||qa.type==="CallExpression"&&qa.callee.type==="Identifier"&&qa.callee.name==="graphql")}function jp $ 1(Ra){if(_p(Ra))return wp}var Vu $ 3=jp $ 1,ss $ 1=0;async function $ u $ 2(Ra,qa,nd,od,ld){let{node:ud}=od,cd=ss $ 1;ss $ 1=ss $ 1+1>>>0;let dd=Pd=> ` PRETTIER _HTML _PLACEHOLDER _$ { Pd } _$ { cd } _IN _JS ` ,pd=ud.quasis.map((Pd,Md,Bd)=>Md===Bd.length-1?Pd.value.cooked:Pd.value.cooked+dd(Md)).join(""),fd=Gt $ 2(od,nd),md=new RegExp(dd(String.raw ` ( \ d + ) ` ),"gu"),vd=0,Ad=await qa(pd,{parser:Ra,__onHtmlRoot(Pd){vd=Pd.children.length}}),Nd=mt $ 2(Ad,Pd=>{if(typeof Pd!="string")return Pd;let Md=[],Bd=Pd.split(md);for(let jd=0;jd<Bd.length;jd++){let Hd=Bd[jd];if(jd%2===0){Hd&&(Hd=ts $ 1(Hd),ld.__embeddedInHtml&&(Hd=N $ 4(!1,Hd,/< \/ (?=script \b )/giu,String.raw ` < \ / ` )),Md.push(Hd));continue}let Gd=Number(Hd);Md.push(fd[Gd])}return Md}),Id=/^ \s /u.test(pd)?" ":"",Od=/ \s $ /u.test(pd)?" ":"",Fd=ld.htmlWhitespaceSensitivity==="ignore"?F $ 1:Id&&Od?x $ 3:null;return Fd?l $ 1([" ` ",f$1([Fd,l$1(Nd)]),Fd," ` "]):it $ 2({hug:!1},l $ 1([" ` ",Id,vd>1?f$1(l$1(Nd)):l$1(Nd),Od," ` "]))}function vp(Ra){return Gr $ 2(Ra,"HTML")||Ra.match(qa=>qa.type==="TemplateLiteral",(qa,nd)=>qa.type==="TaggedTemplateExpression"&&qa.tag.type==="Identifier"&&qa.tag.name==="html"&&nd==="quasi")}var Mp $ 1= $ u $ 2.bind(void 0,"html"),Rp $ 1= $ u $ 2.bind(void 0,"angular");function Jp(Ra){if(vp(Ra))return Mp $ 1;if(Xu $ 2(Ra))return Rp $ 1}var Ku $ 3=Jp;async function qp(Ra,qa,nd){let{node:od}=nd,ld=N $ 4(!1,od.quasis[0].value.raw,/((?: \\ \\ )*) \\ ` / gu , ( pd , fd ) => "\\" . repeat ( fd . length / 2 ) + "`" ) , ud = Wp$1 ( ld ) , cd = ud !== "" ; cd && ( ld = N$4 ( ! 1 , ld , new RegExp ( ` ^ ${ ud } ` , "gmu" ) , "" ) ) ; let dd = Wr$2 ( await Ra ( ld , { parser : "markdown" , _ _inJsTemplate : ! 0 } ) , ! 0 ) ; return [ "`" , cd ? f$1 ( [ E$2 , dd ] ) : [ Rr$1 , du$3 ( dd ) ] , E$2 , "`" ] } function Wp$1 ( Ra ) { let qa = Ra . match ( /^([^\S\n]*)\S/mu ) ; return qa === null ? "" : qa [ 1 ] } function Gp ( Ra ) { if ( Up ( Ra ) ) return qp } function Up ( { node : Ra , parent : qa } ) { return ( qa == null ? void 0 : qa . type ) === "TaggedTemplateExpression" && Ra . quasis . length === 1 && qa . tag . type === "Identifier" && ( qa . tag . name === "md" || qa . tag . name === "markdown" ) } var zu$1 = Gp ; function Np$1 ( Ra ) { let { node : qa } = Ra ; if ( qa . type !== "TemplateLiteral" || Xp ( qa ) ) return ; let nd ; for ( let od of [ Hu$3 , Vu$3 , Ku$3 , zu$1 ] ) if ( nd = od ( Ra ) , ! ! nd ) return qa . quasis . length === 1 && qa . quasis [ 0 ] . value . raw . trim ( ) === "" ? "``" : async ( ... ld ) => { let ud = await nd ( ... ld ) ; return ud && it$2 ( { embed : ! 0 , ... ud . label } , ud ) } } function Xp ( { quasis : Ra } ) { return Ra . some ( ( { value : { cooked : qa } } ) => qa === null ) } var Qu$3 = Np$1 , Yp = /\*\/$/ , Hp$1 = /^\/\*\*?/ , ri$3 = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/ , Vp$1 = /(^|\s+)\/\/([^\n\r]*)/g , Zu$3 = /^(\r?\n)+/ , $p = /(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g , ei$4 = /(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g , Kp$1 = /(\r?\n|^) *\* ?/g , ni$3 = [ ] ; function si$4 ( Ra ) { let qa = Ra . match ( ri$3 ) ; return qa ? qa [ 0 ] . trimStart ( ) : "" } function ui$4 ( Ra ) { let qa = Ra . match ( ri$3 ) , nd = qa == null ? void 0 : qa [ 0 ] ; return nd == null ? Ra : Ra . slice ( nd . length ) } function ii$4 ( Ra ) { let qa = `
` ;Ra=N $ 4(!1,Ra.replace(Hp $ 1,"").replace(Yp,""),Kp $ 1," $ 1");let nd="";for(;nd!==Ra;)nd=Ra,Ra=N $ 4(!1,Ra, $ p, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(Zu $ 3,"").trimEnd();let od=Object.create(null),ld=N $ 4(!1,Ra,ei $ 4,"").replace(Zu $ 3,"").trimEnd(),ud;for(;ud=ei $ 4.exec(Ra);){let cd=N $ 4(!1,ud[2],Vp $ 1,"");if(typeof od[ud[1]]=="string"||Array.isArray(od[ud[1]])){let dd=od[ud[1]];od[ud[1]]=[...ni $ 3,...Array.isArray(dd)?dd:[dd],cd]}else od[ud[1]]=cd}return{comments:ld,pragmas:od}}function ai $ 4({comments:Ra="",pragmas:qa={}}){let nd= `
` ,od="/**",ld=" *",ud=" */",cd=Object.keys(qa),dd=cd.flatMap(fd=>ti $ 3(fd,qa[fd])).map(fd=> ` $ { ld } $ { fd } $ { nd } ` ).join("");if(!Ra){if(cd.length===0)return"";if(cd.length===1&&!Array.isArray(qa[cd[0]])){let fd=qa[cd[0]];return ` $ { od } $ { ti$3 ( cd [ 0 ] , fd ) [ 0 ] } $ { ud } ` }}let pd=Ra.split(nd).map(fd=> ` $ { ld } $ { fd } ` ).join(nd)+nd;return od+nd+(Ra?pd:"")+(Ra&&cd.length>0?ld+nd:"")+dd+ud}function ti $ 3(Ra,qa){return[...ni $ 3,...Array.isArray(qa)?qa:[qa]].map(nd=> ` @ $ { Ra } $ { nd } ` .trim())}function zp $ 1(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var oi $ 4=zp $ 1;function Qp(Ra){let qa=oi $ 4(Ra);qa&&(Ra=Ra.slice(qa.length+1));let nd=si $ 4(Ra),{pragmas:od,comments:ld}=ii $ 4(nd);return{shebang:qa,text:Ra,pragmas:od,comments:ld}}function pi $ 5(Ra){let{shebang:qa,text:nd,pragmas:od,comments:ld}=Qp(Ra),ud=ui $ 4(nd),cd=ai $ 4({pragmas:{format:"",...od},comments:ld.trimStart()});return(qa? ` $ { qa }
` :"")+cd+(ud.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-11-28 09:28:59 +08:00
` )+ud}function Zp(Ra,qa){let{originalText:nd,[Symbol.for("comments")]:od,locStart:ld,locEnd:ud,[Symbol.for("printedComments")]:cd}=qa,{node:dd}=Ra,pd=ld(dd),fd=ud(dd);for(let md of od)ld(md)>=pd&&ud(md)<=fd&&cd.add(md);return nd.slice(pd,fd)}var ci $ 4=Zp;function us $ 1(Ra,qa){var nd,od,ld,ud,cd,dd,pd,fd,md;if(Ra.isRoot)return!1;let{node:vd,key:Ad,parent:Nd}=Ra;if(qa.__isInHtmlInterpolation&&!qa.bracketSpacing&&nc $ 2(vd)&&or $ 2(Ra))return!0;if(ec $ 1(vd))return!1;if(vd.type==="Identifier"){if((nd=vd.extra)!=null&&nd.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_ \d +_ \d +_IN_JS $ /u.test(vd.name)||Ad==="left"&&(vd.name==="async"&&!Nd.await||vd.name==="let")&&Nd.type==="ForOfStatement")return!0;if(vd.name==="let"){let Id=(od=Ra.findAncestor(Od=>Od.type==="ForOfStatement"))==null?void 0:od.left;if(Id&&ie $ 2(Id,Od=>Od===vd))return!0}if(Ad==="object"&&vd.name==="let"&&Nd.type==="MemberExpression"&&Nd.computed&&!Nd.optional){let Id=Ra.findAncestor(Fd=>Fd.type==="ExpressionStatement"||Fd.type==="ForStatement"||Fd.type==="ForInStatement"),Od=Id?Id.type==="ExpressionStatement"?Id.expression:Id.type==="ForStatement"?Id.init:Id.left:void 0;if(Od&&ie $ 2(Od,Fd=>Fd===vd))return!0}if(Ad==="expression")switch(vd.name){case"await":case"interface":case"module":case"using":case"yield":case"let":case"component":case"hook":case"type":{let Id=Ra.findAncestor(Od=>!Te $ 2(Od));if(Id!==Nd&&Id.type==="ExpressionStatement")return!0}}return!1}if(vd.type==="ObjectExpression"||vd.type==="FunctionExpression"||vd.type==="ClassExpression"||vd.type==="DoExpression"){let Id=(ld=Ra.findAncestor(Od=>Od.type==="ExpressionStatement"))==null?void 0:ld.expression;if(Id&&ie $ 2(Id,Od=>Od===vd))return!0}if(vd.type==="ObjectExpression"){let Id=(ud=Ra.findAncestor(Od=>Od.type==="ArrowFunctionExpression"))==null?void 0:ud.body;if(Id&&Id.type!=="SequenceExpression"&&Id.type!=="AssignmentExpression"&&ie $ 2(Id,Od=>Od===vd))return!0}switch(Nd.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if(Ad==="superClass"&&(vd.type==="ArrowFunctionExpression"||vd.type==="AssignmentExpression"||vd.type==="AwaitExpression"||vd.type==="BinaryExpression"||vd.type==="ConditionalExpression"||vd.type==="LogicalExpression"||vd.type==="NewExpression"||vd.type==="ObjectExpression"||vd.type==="SequenceExpression"||vd.type==="TaggedTemplateExpression"||vd.type==="UnaryExpression"||vd.type==="UpdateExpression"||vd.type==="YieldExpression"||vd.type==="TSNonNullExpression"||vd.type==="ClassExpression"&&w $ 1(vd.decorators)))return!0;break;case"ExportDefaultDeclaration":return li $ 4(Ra,qa)||vd.type==="SequenceExpression";case"Decorator":if(Ad==="expression"&&!uc $ 3(vd))return!0;break;case"TypeAnnotation":if(Ra.match(void 0,void 0,(Id,Od)=>Od==="returnType"&&Id.type==="ArrowFunctionExpression")&&rc $ 3(vd))return!0;break;case"BinaryExpression":if(Ad==="left"&&(Nd.operator==="in"||Nd.operator==="instanceof")&&vd.type==="UnaryExpression")return!0;break;case"VariableDeclarator":if(Ad==="init"&&Ra.match(void 0,void 0,(Id,Od)=>Od==="declarations"&&Id.type==="VariableDeclaration",(Id,Od)=>Od==="left"&&Id.type==="ForInStatement"))return!0;break}switch(vd.type){case"UpdateExpression":if(Nd.type==="UnaryExpression")return vd.prefix&&(vd.operator==="++"&&Nd.operator==="+"||vd.operator==="--"&&Nd.operator==="-");case"UnaryExpression":switch(Nd.type){case"UnaryExpression":return vd.operator===Nd.operator&&(vd.operator==="+"||vd.operator==="-");case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return Ad==="object";case"TaggedTemplateExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return Ad==="callee";case"BinaryExpression":return Ad==="left"&&Nd.operator==="**";case"TSNonNullExpression":return!0;default:return!1}case"BinaryExpression":if(Nd.type==="UpdateExpression"||vd.operator==="in"&&tc $ 1(Ra))return!0;if(vd.operator==="|>"&&(cd=vd.extra)!=null&&cd.parenthesized){let Id=Ra.grandparent;if(Id.type==="BinaryExpression"&&Id.operator==="|>")return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":cas
2024-12-08 09:17:51 +08:00
\ r ` ),ms $ 1=Ra=>Ra===""||Ra===x $ 3||Ra===F $ 1||Ra===E $ 2;function cc(Ra,qa,nd){var od,ld,ud;let{node:cd}=Ra;if(cd.type==="JSXElement"&&gc $ 1(cd))return[nd("openingElement"),nd("closingElement")];let dd=cd.type==="JSXElement"?nd("openingElement"):nd("openingFragment"),pd=cd.type==="JSXElement"?nd("closingElement"):nd("closingFragment");if(cd.children.length===1&&cd.children[0].type==="JSXExpressionContainer"&&(cd.children[0].expression.type==="TemplateLiteral"||cd.children[0].expression.type==="TaggedTemplateExpression"))return[dd,...Ra.map(nd,"children"),pd];cd.children=cd.children.map(Gd=>Sc(Gd)?{type:"JSXText",value:" ",raw:" "}:Gd);let fd=cd.children.some(X $ 4),md=cd.children.filter(Gd=>Gd.type==="JSXExpressionContainer").length>1,vd=cd.type==="JSXElement"&&cd.openingElement.attributes.length>1,Ad=ne $ 3(dd)||fd||vd||md,Nd=Ra.parent.rootMarker==="mdx",Id=qa.singleQuote?"{' '}":'{" "}',Od=Nd?" ":b $ 2([Id,E $ 2]," "),Fd=((ld=(od=cd.openingElement)==null?void 0:od.name)==null?void 0:ld.name)==="fbt",Pd=lc $ 1(Ra,qa,nd,Od,Fd),Md=cd.children.some(Gd=>pr $ 2(Gd));for(let Gd=Pd.length-2;Gd>=0;Gd--){let zd=Pd[Gd]===""&&Pd[Gd+1]==="",df=Pd[Gd]===F $ 1&&Pd[Gd+1]===""&&Pd[Gd+2]===F $ 1,Wd=(Pd[Gd]===E $ 2||Pd[Gd]===F $ 1)&&Pd[Gd+1]===""&&Pd[Gd+2]===Od,Jd=Pd[Gd]===Od&&Pd[Gd+1]===""&&(Pd[Gd+2]===E $ 2||Pd[Gd+2]===F $ 1),Xd=Pd[Gd]===Od&&Pd[Gd+1]===""&&Pd[Gd+2]===Od,_f=Pd[Gd]===E $ 2&&Pd[Gd+1]===""&&Pd[Gd+2]===F $ 1||Pd[Gd]===F $ 1&&Pd[Gd+1]===""&&Pd[Gd+2]===E $ 2;df&&Md||zd||Wd||Xd||_f?Pd.splice(Gd,2):Jd&&Pd.splice(Gd+1,2)}for(;Pd.length>0&&ms $ 1(O $ 3(!1,Pd,-1));)Pd.pop();for(;Pd.length>1&&ms $ 1(Pd[0])&&ms $ 1(Pd[1]);)Pd.shift(),Pd.shift();let Bd=[];for(let[Gd,zd]of Pd.entries()){if(zd===Od){if(Gd===1&&Pd[Gd-1]===""){if(Pd.length===2){Bd.push(Id);continue}Bd.push([Id,F $ 1]);continue}else if(Gd===Pd.length-1){Bd.push(Id);continue}else if(Pd[Gd-1]===""&&Pd[Gd-2]===F $ 1){Bd.push(Id);continue}}Bd.push(zd),ne $ 3(zd)&&(Ad=!0)}let jd=Md?qt $ 3(Bd):l $ 1(Bd,{shouldBreak:!0});if(((ud=qa.cursorNode)==null?void 0:ud.type)==="JSXText"&&cd.children.includes(qa.cursorNode)&&(jd=[Un $ 3,jd,Un $ 3]),Nd)return jd;let Hd=l $ 1([dd,f $ 1([F $ 1,jd]),F $ 1,pd]);return Ad?Hd:ze $ 3([l $ 1([dd,...Pd,pd]),Hd])}function lc $ 1(Ra,qa,nd,od,ld){let ud=[];return Ra.each(({node:cd,next:dd})=>{if(cd.type==="JSXText"){let pd=fe $ 3(cd);if(pr $ 2(cd)){let fd=Nr $ 2.split(pd,!0);fd[0]===""&&(ud.push(""),fd.shift(),/ \n /u.test(fd[0])?ud.push(fi $ 3(ld,fd[1],cd,dd)):ud.push(od),fd.shift());let md;if(O $ 3(!1,fd,-1)===""&&(fd.pop(),md=fd.pop()),fd.length===0)return;for(let[vd,Ad]of fd.entries())vd%2===1?ud.push(x $ 3):ud.push(Ad);md!==void 0?/ \n /u.test(md)?ud.push(fi $ 3(ld,O $ 3(!1,ud,-1),cd,dd)):ud.push(od):ud.push(Di $ 3(ld,O $ 3(!1,ud,-1),cd,dd))}else/ \n /u.test(pd)?pd.match(/ \n /gu).length>1&&ud.push("",F $ 1):ud.push("",od)}else{let pd=nd();if(ud.push(pd),dd&&pr $ 2(dd)){let fd=Nr $ 2.trim(fe $ 3(dd)),[md]=Nr $ 2.split(fd);ud.push(Di $ 3(ld,md,cd,dd))}else ud.push(F $ 1)}},"children"),ud}function Di $ 3(Ra,qa,nd,od){return Ra?"":nd.type==="JSXElement"&&!nd.closingElement||(od==null?void 0:od.type)==="JSXElement"&&!od.closingElement?qa.length===1?E $ 2:F $ 1:E $ 2}function fi $ 3(Ra,qa,nd,od){return Ra?F $ 1:qa.length===1?nd.type==="JSXElement"&&!nd.closingElement||(od==null?void 0:od.type)==="JSXElement"&&!od.closingElement?F $ 1:E $ 2:F $ 1}var mc=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function yc $ 1(Ra,qa,nd){let{parent:od}=Ra;if(mc.has(od.type))return qa;let ld=Ra.match(void 0,cd=>cd.type==="ArrowFunctionExpression",L $ 4,cd=>cd.type==="JSXExpressionContainer"),ud=Be $ 3(Ra,nd);return l $ 1([ud?"":b $ 2("("),f $ 1([E $ 2,qa]),E $ 2,ud?"":b $ 2(")")],{shouldBreak:ld})}function Dc(Ra,qa,nd){let{node:od}=Ra,ld=[];if(ld.push(nd("name")),od.value){let ud;if(Q $ 4(od.value)){let cd=fe $ 3(od.value),dd=N $ 4(!1,N $ 4(!1,cd.slice(1,-1),"'","'"),""",'"'),pd=xr $ 2(dd,qa.jsxSingleQuote);dd=pd==='"'?N $ 4(!1,dd,'"',"""):N $ 4(!1,dd,"'","'"),ud=Ra.call(()=>ye $ 2(Ra,Ie $ 3(pd+dd+pd),qa),"value")}else ud=nd("value");ld.push
2024-11-28 09:28:59 +08:00
` )&&!cd&&!d $ 1(ud.attributes[0]))return l $ 1(["<",nd("name"),ud.typeArguments?nd("typeArguments"):nd("typeParameters")," ",...Ra.map(nd,"attributes"),ud.selfClosing?" />":">"]);let dd=(ld=ud.attributes)==null?void 0:ld.some(fd=>Q $ 4(fd.value)&&fd.value.value.includes( `
2024-12-08 09:17:51 +08:00
` )),pd=qa.singleAttributePerLine&&ud.attributes.length>1?F $ 1:x $ 3;return l $ 1(["<",nd("name"),ud.typeArguments?nd("typeArguments"):nd("typeParameters"),f $ 1(Ra.map(()=>[pd,nd()],"attributes")),...Fc $ 1(ud,qa,cd)],{shouldBreak:dd})}function Fc $ 1(Ra,qa,nd){return Ra.selfClosing?[x $ 3,"/>"]:Cc(Ra,qa,nd)?[">"]:[E $ 2,">"]}function Cc(Ra,qa,nd){let od=Ra.attributes.length>0&&d $ 1(O $ 3(!1,Ra.attributes,-1),g $ 3.Trailing);return Ra.attributes.length===0&&!nd||(qa.bracketSameLine||qa.jsxBracketSameLine)&&(!nd||Ra.attributes.length>0)&&!od}function Ac(Ra,qa,nd){let{node:od}=Ra,ld=[];ld.push("</");let ud=nd("name");return d $ 1(od.name,g $ 3.Leading|g $ 3.Line)?ld.push(f $ 1([F $ 1,ud]),F $ 1):d $ 1(od.name,g $ 3.Leading|g $ 3.Block)?ld.push(" ",ud):ld.push(ud),ld.push(">"),ld}function Tc $ 1(Ra,qa){let{node:nd}=Ra,od=d $ 1(nd),ld=d $ 1(nd,g $ 3.Line),ud=nd.type==="JSXOpeningFragment";return[ud?"<":"</",f $ 1([ld?F $ 1:od&&!ud?" ":"",M $ 4(Ra,qa)]),ld?F $ 1:"",">"]}function dc $ 1(Ra,qa,nd){let od=ye $ 2(Ra,cc(Ra,qa,nd),qa);return yc $ 1(Ra,od,qa)}function xc $ 1(Ra,qa){let{node:nd}=Ra,od=d $ 1(nd,g $ 3.Line);return[M $ 4(Ra,qa,{indent:od}),od?F $ 1:""]}function hc(Ra,qa,nd){let{node:od}=Ra;return["{",Ra.call(({node:ld})=>{let ud=["...",nd()];return!d $ 1(ld)||!zn $ 3(Ra)?ud:[f $ 1([E $ 2,ye $ 2(Ra,ud,qa)]),E $ 2]},od.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Ei $ 2(Ra,qa,nd){let{node:od}=Ra;if(od.type.startsWith("JSX"))switch(od.type){case"JSXAttribute":return Dc(Ra,qa,nd);case"JSXIdentifier":return od.name;case"JSXNamespacedName":return P $ 3(":",[nd("namespace"),nd("name")]);case"JSXMemberExpression":return P $ 3(".",[nd("object"),nd("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return hc(Ra,qa,nd);case"JSXExpressionContainer":return fc(Ra,qa,nd);case"JSXFragment":case"JSXElement":return dc $ 1(Ra,qa,nd);case"JSXOpeningElement":return Ec $ 1(Ra,qa,nd);case"JSXClosingElement":return Ac(Ra,qa,nd);case"JSXOpeningFragment":case"JSXClosingFragment":return Tc $ 1(Ra,qa);case"JSXEmptyExpression":return xc $ 1(Ra,qa);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new Me $ 4(od,"JSX")}}function gc $ 1(Ra){if(Ra.children.length===0)return!0;if(Ra.children.length>1)return!1;let qa=Ra.children[0];return qa.type==="JSXText"&&!pr $ 2(qa)}function pr $ 2(Ra){return Ra.type==="JSXText"&&(Nr $ 2.hasNonWhitespaceCharacter(fe $ 3(Ra))||!/ \n /u.test(fe $ 3(Ra)))}function Sc(Ra){return Ra.type==="JSXExpressionContainer"&&Q $ 4(Ra.expression)&&Ra.expression.value===" "&&!d $ 1(Ra.expression)}function Fi $ 2(Ra){let{node:qa,parent:nd}=Ra;if(!X $ 4(qa)||!X $ 4(nd))return!1;let{index:od,siblings:ld}=Ra,ud;for(let cd=od;cd>0;cd--){let dd=ld[cd-1];if(!(dd.type==="JSXText"&&!pr $ 2(dd))){ud=dd;break}}return(ud==null?void 0:ud.type)==="JSXExpressionContainer"&&ud.expression.type==="JSXEmptyExpression"&&Bt $ 4(ud.expression)}function Bc(Ra){return Bt $ 4(Ra.node)||Fi $ 2(Ra)}var Xr $ 2=Bc,bc=0;function Yr $ 2(Ra,qa,nd){var od;let{node:ld,parent:ud,grandparent:cd,key:dd}=Ra,pd=dd!=="body"&&(ud.type==="IfStatement"||ud.type==="WhileStatement"||ud.type==="SwitchStatement"||ud.type==="DoWhileStatement"),fd=ld.operator==="|>"&&((od=Ra.root.extra)==null?void 0:od.__isUsingHackPipeline),md=ys $ 2(Ra,nd,qa,!1,pd);if(pd)return md;if(fd)return l $ 1(md);if(L $ 4(ud)&&ud.callee===ld||ud.type==="UnaryExpression"||q $ 3(ud)&&!ud.computed)return l $ 1([f $ 1([E $ 2,...md]),E $ 2]);let vd=ud.type==="ReturnStatement"||ud.type==="ThrowStatement"||ud.type==="JSXExpressionContainer"&&cd.type==="JSXAttribute"||ld.operator!=="|"&&ud.type==="JsExpressionRoot"||ld.type!=="NGPipeExpression"&&(ud.type==="NGRoot"&&qa.parser==="__ng_binding"||ud.type==="NGMicrosyntaxExpression"&&cd.type==="NGMicrosyntax"&&cd.body.length===1)||ld===ud.body&&ud.type==="ArrowFunctionExpression"||ld!==ud.body&&ud.type==="ForStatement"||ud.type==="ConditionalExpression"&&cd.type!=="ReturnStatement"&&cd.type!=="ThrowStatement"&&!L $ 4(cd)||ud.type==="TemplateLiteral",Ad=ud.type==="AssignmentExpression"||ud.type==="VariableDeclarator"||ud.type==="ClassProperty"||ud.type==="PropertyDefinition"||ud.type==="TSAbstractPropertyDefinition"||ud.type==="ClassPrivateProperty"
2024-09-18 09:46:23 +08:00
` ).split( `
2024-12-08 09:17:51 +08:00
` ),vf=0,Sf=_f.length,gf;++vf<Sf;)gf=_f[vf],gf!==""&&(_f[vf]=zd+gf);return"[^"+(Xd.label||Xd.identifier)+"]: "+_f.join( `
` )}}function Bd(Hd,Gd,zd){Hd.splice(Hd.indexOf(Gd),0,zd)}function jd(Hd,Gd,zd,df){for(var Wd=Hd.length,Jd=-1;++Jd<Wd;)if(Gd[Hd[Jd][0]].apply(zd,df))return!0;return!1}}),Bt $ 3=C $ 1(Ra=>{Ra.isRemarkParser=qa,Ra.isRemarkCompiler=nd;function qa(od){return!!(od&&od.prototype&&od.prototype.blockTokenizers)}function nd(od){return!!(od&&od.prototype&&od.prototype.visitors)}}),Mi $ 1=C $ 1((Ra,qa)=>{var nd=Bt $ 3();qa.exports=vd;var od=9,ld=32,ud=36,cd=48,dd=57,pd=92,fd=["math","math-inline"],md="math-display";function vd(Id){let Od=this.Parser,Fd=this.Compiler;nd.isRemarkParser(Od)&&Ad(Od,Id),nd.isRemarkCompiler(Fd)&&Nd(Fd)}function Ad(Id,Od){let Fd=Id.prototype,Pd=Fd.inlineMethods;Bd.locator=Md,Fd.inlineTokenizers.math=Bd,Pd.splice(Pd.indexOf("text"),0,"math");function Md(jd,Hd){return jd.indexOf(" $ ",Hd)}function Bd(jd,Hd,Gd){let zd=Hd.length,df=!1,Wd=!1,Jd=0,Xd,_f,vf,Sf,gf,bf,Tf;if(Hd.charCodeAt(Jd)===pd&&(Wd=!0,Jd++),Hd.charCodeAt(Jd)===ud){if(Jd++,Wd)return Gd?!0:jd(Hd.slice(0,Jd))({type:"text",value:" $ "});if(Hd.charCodeAt(Jd)===ud&&(df=!0,Jd++),vf=Hd.charCodeAt(Jd),!(vf===ld||vf===od)){for(Sf=Jd;Jd<zd;){if(_f=vf,vf=Hd.charCodeAt(Jd+1),_f===ud){if(Xd=Hd.charCodeAt(Jd-1),Xd!==ld&&Xd!==od&&(vf!==vf||vf<cd||vf>dd)&&(!df||vf===ud)){gf=Jd-1,Jd++,df&&Jd++,bf=Jd;break}}else _f===pd&&(Jd++,vf=Hd.charCodeAt(Jd+1));Jd++}if(bf!==void 0)return Gd?!0:(Tf=Hd.slice(Sf,gf+1),jd(Hd.slice(0,bf))({type:"inlineMath",value:Tf,data:{hName:"span",hProperties:{className:fd.concat(df&&Od.inlineMathDouble?[md]:[])},hChildren:[{type:"text",value:Tf}]}}))}}}}function Nd(Id){let Od=Id.prototype;Od.visitors.inlineMath=Fd;function Fd(Pd){let Md=" $ ";return(Pd.data&&Pd.data.hProperties&&Pd.data.hProperties.className||[]).includes(md)&&(Md=" $ $ "),Md+Pd.value+Md}}}), $ i $ 1=C $ 1((Ra,qa)=>{var nd=Bt $ 3();qa.exports=md;var od=10,ld=32,ud=36,cd= `
` ,dd=" $ ",pd=2,fd=["math","math-display"];function md(){let Nd=this.Parser,Id=this.Compiler;nd.isRemarkParser(Nd)&&vd(Nd),nd.isRemarkCompiler(Id)&&Ad(Id)}function vd(Nd){let Id=Nd.prototype,Od=Id.blockMethods,Fd=Id.interruptParagraph,Pd=Id.interruptList,Md=Id.interruptBlockquote;Id.blockTokenizers.math=Bd,Od.splice(Od.indexOf("fencedCode")+1,0,"math"),Fd.splice(Fd.indexOf("fencedCode")+1,0,["math"]),Pd.splice(Pd.indexOf("fencedCode")+1,0,["math"]),Md.splice(Md.indexOf("fencedCode")+1,0,["math"]);function Bd(jd,Hd,Gd){var zd=Hd.length,df=0;let Wd,Jd,Xd,_f,vf,Sf,gf,bf,Tf,Mf,Kf;for(;df<zd&&Hd.charCodeAt(df)===ld;)df++;for(vf=df;df<zd&&Hd.charCodeAt(df)===ud;)df++;if(Sf=df-vf,!(Sf<pd)){for(;df<zd&&Hd.charCodeAt(df)===ld;)df++;for(gf=df;df<zd;){if(Wd=Hd.charCodeAt(df),Wd===ud)return;if(Wd===od)break;df++}if(Hd.charCodeAt(df)===od){if(Gd)return!0;for(Jd=[],gf!==df&&Jd.push(Hd.slice(gf,df)),df++,Xd=Hd.indexOf(cd,df+1),Xd=Xd===-1?zd:Xd;df<zd;){for(bf=!1,Mf=df,Kf=Xd,_f=Xd,Tf=0;_f>Mf&&Hd.charCodeAt(_f-1)===ld;)_f--;for(;_f>Mf&&Hd.charCodeAt(_f-1)===ud;)Tf++,_f--;for(Sf<=Tf&&Hd.indexOf(dd,Mf)===_f&&(bf=!0,Kf=_f);Mf<=Kf&&Mf-df<vf&&Hd.charCodeAt(Mf)===ld;)Mf++;if(bf)for(;Kf>Mf&&Hd.charCodeAt(Kf-1)===ld;)Kf--;if((!bf||Mf!==Kf)&&Jd.push(Hd.slice(Mf,Kf)),bf)break;df=Xd+1,Xd=Hd.indexOf(cd,df+1),Xd=Xd===-1?zd:Xd}return Jd=Jd.join( `
` ),jd(Hd.slice(0,Xd))({type:"math",value:Jd,data:{hName:"div",hProperties:{className:fd.concat()},hChildren:[{type:"text",value:Jd}]}})}}}}function Ad(Nd){let Id=Nd.prototype;Id.visitors.math=Od;function Od(Fd){return ` $$
2024-11-28 09:28:59 +08:00
` +Fd.value+ `
$$ ` }}}),Wi $ 1=C $ 1((Ra,qa)=>{var nd=Mi $ 1(),od= $ i $ 1();qa.exports=ld;function ld(ud){var cd=ud||{};od.call(this,cd),nd.call(this,cd)}}),Ie $ 2=C $ 1((Ra,qa)=>{qa.exports=od;var nd=Object.prototype.hasOwnProperty;function od(){for(var ld={},ud=0;ud<arguments.length;ud++){var cd=arguments[ud];for(var dd in cd)nd.call(cd,dd)&&(ld[dd]=cd[dd])}return ld}}),Ji $ 1=C $ 1((Ra,qa)=>{typeof Object.create=="function"?qa.exports=function(nd,od){od&&(nd.super_=od,nd.prototype=Object.create(od.prototype,{constructor:{value:nd,enumerable:!1,writable:!0,configurable:!0}}))}:qa.exports=function(nd,od){if(od){nd.super_=od;var ld=function(){};ld.prototype=od.prototype,nd.prototype=new ld,nd.prototype.constructor=nd}}}),Zi $ 1=C $ 1((Ra,qa)=>{var nd=Ie $ 2(),od=Ji $ 1();qa.exports=ld;function ld(ud){var cd,dd,pd;od(md,ud),od(fd,md),cd=md.prototype;for(dd in cd)pd=cd[dd],pd&&typeof pd=="object"&&(cd[dd]="concat"in pd?pd.concat():nd(pd));return md;function fd(vd){return ud.apply(this,vd)}function md(){return this instanceof md?ud.apply(this,arguments):new fd(arguments)}}}),ru $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od,ld,ud){return cd;function cd(){var dd=ud||this,pd=dd[od];return dd[od]=!ld,fd;function fd(){dd[od]=pd}}}}),nu $ 3=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){for(var ld=String(od),ud=[],cd=/ \r ? \n | \r /g;cd.exec(ld);)ud.push(cd.lastIndex);return ud.push(ld.length+1),{toPoint:dd,toPosition:dd,toOffset:pd};function dd(fd){var md=-1;if(fd>-1&&fd<ud[ud.length-1]){for(;++md<ud.length;)if(ud[md]>fd)return{line:md+1,column:fd-(ud[md-1]||0)+1,offset:fd}}return{}}function pd(fd){var md=fd&&fd.line,vd=fd&&fd.column,Ad;return!isNaN(md)&&!isNaN(vd)&&md-1 in ud&&(Ad=(ud[md-2]||0)+vd-1||0),Ad>-1&&Ad<ud[ud.length-1]?Ad:-1}}}),uu $ 3=C $ 1((Ra,qa)=>{qa.exports=od;var nd=" \\ ";function od(ld,ud){return cd;function cd(dd){for(var pd=0,fd=dd.indexOf(nd),md=ld[ud],vd=[],Ad;fd!==-1;)vd.push(dd.slice(pd,fd)),pd=fd+1,Ad=dd.charAt(pd),(!Ad||md.indexOf(Ad)===-1)&&vd.push(nd),fd=dd.indexOf(nd,pd+1);return vd.push(dd.slice(pd)),vd.join("")}}}),au $ 2=C $ 1((Ra,qa)=>{qa.exports={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´ ",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸ ",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:" ",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"× ",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"}}),ou $ 2=C $ 1((Ra,qa)=>{qa.exports={0:"<22> ",128:"€",130:"‚ ",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ ",137:"‰",138:"Š",139:"‹ ",140:"Œ",142:"Ž",145:"‘ ",146:"’ ",147:"“",148:"”",149:"•",150:"– ",151:"—",152:"˜ ",153:"™",154:"š",155:"› ",156:"œ",158:"ž",159:"Ÿ"}}),Ne $ 1=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){var ld=typeof od=="string"?od.charCodeAt(0):od;return ld>=48&&ld<=57}}),lu $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){var ld=typeof od=="string"?od.charCodeAt(0):od;return ld>=97&&ld<=102||ld>=65&&ld<=70||ld>=48&&ld<=57}}),Ve $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){var ld=typeof od=="string"?od.charCodeAt(0):od;return ld>=97&&ld<=122||ld>=65&&ld<=90}}),pu $ 2=C $ 1((Ra,qa)=>{var nd=Ve $ 2(),od=Ne $ 1();qa.exports=ld;function ld(ud){return nd(ud)||od(ud)}}),du $ 2=C $ 1((Ra,qa)=>{qa.exports={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",A
2024-12-08 09:17:51 +08:00
` ,Nfr:"𝔑 ",NoBreak:" ",NonBreakingSpace:" ",Nopf:"ℕ ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩 ",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν ",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О ",Odblac:"Ő",Ofr:"𝔒 ",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο ",Oopf:"𝕆 ",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘ ",Or:"⩔",Oscr:"𝒪 ",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓 ",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ ",Popf:"ℙ ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫 ",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔 ",Qopf:"ℚ ",Qscr:"𝒬 ",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р ",Re:"ℜ ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ ",Rho:"Ρ ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь ",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С ",Sfr:"𝔖 ",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊 ",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮 ",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т ",Tfr:"𝔗 ",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼ ",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋 ",TripleDot:"⃛",Tscr:"𝒯 ",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У ",Udblac:"Ű",Ufr:"𝔘 ",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃ ",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌 ",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"
` );Tf!==-1;)Od++,bf=Tf,Tf=gf.indexOf( `
` ,Tf+1);bf===-1?Fd+=gf.length:Fd=gf.length-bf,Od in vd&&(bf!==-1?Fd+=vd[Od]:Fd<=vd[Od]&&(Fd=vd[Od]+1))}function df(){var gf=[],bf=Od+1;return function(){for(var Tf=Od+1;bf<Tf;)gf.push((vd[bf]||0)+1),bf++;return gf}}function Wd(){var gf={line:Od,column:Fd};return gf.offset=md.toOffset(gf),gf}function Jd(gf){this.start=gf,this.end=Wd()}function Xd(gf){pd.slice(0,gf.length)!==gf&&md.file.fail(new Error("Incorrectly eaten value: please report this warning on https://git.io/vg5Ft"),Wd())}function _f(){var gf=Wd();return bf;function bf(Tf,Mf){var Kf=Tf.position,Zf=Kf?Kf.start:gf,eh=[], $ f=Kf&&Kf.end.line,Df=gf.line;if(Tf.position=new Jd(Zf),Kf&&Mf&&Kf.indent){if(eh=Kf.indent, $ f<Df){for(;++ $ f<Df;)eh.push((vd[ $ f]||0)+1);eh.push(gf.column)}Mf=eh.concat(Mf)}return Tf.position.indent=Mf||[],Tf}}function vf(gf,bf){var Tf=bf?bf.children:Ad,Mf=Tf[Tf.length-1],Kf;return Mf&&gf.type===Mf.type&&(gf.type==="text"||gf.type==="blockquote")&&od(Mf)&&od(gf)&&(Kf=gf.type==="text"?ld:ud,gf=Kf.call(md,Mf,gf)),gf!==Mf&&Tf.push(gf),md.atStart&&Ad.length!==0&&md.exitStart(),gf}function Sf(gf){var bf=df(),Tf=_f(),Mf=Wd();return Xd(gf),Kf.reset=Zf,Zf.test=eh,Kf.test=eh,pd=pd.slice(gf.length),zd(gf),bf=bf(),Kf;function Kf( $ f,Df){return Tf(vf(Tf( $ f),Df),bf)}function Zf(){var $ f=Kf.apply(null,arguments);return Od=Mf.line,Fd=Mf.column,pd=gf+pd, $ f}function eh(){var $ f=Tf({});return Od=Mf.line,Fd=Mf.column,pd=gf+pd, $ f.position}}}}function od(cd){var dd,pd;return cd.type!=="text"||!cd.position?!0:(dd=cd.position.start,pd=cd.position.end,dd.line!==pd.line||pd.column-dd.column===cd.value.length)}function ld(cd,dd){return cd.value+=dd.value,cd}function ud(cd,dd){return this.options.commonmark||this.options.gfm?dd:(cd.children=cd.children.concat(dd.children),cd)}}),Uu $ 2=C $ 1((Ra,qa)=>{qa.exports=ud;var nd=[" \\ "," ` "," * "," { "," } "," [ "," ] "," ( "," ) "," # "," + "," - "," . "," ! "," _ "," > "],od=nd.concat([" ~ "," | " ] ) , ld = od . concat ( [ `
2024-11-28 09:28:59 +08:00
` ,'"'," $ ","%","&","'",",","/",":",";","<","=","?","@","^"]);ud.default=nd,ud.gfm=od,ud.commonmark=ld;function ud(cd){var dd=cd||{};return dd.commonmark?ld:dd.gfm?od:nd}}),Mu $ 1=C $ 1((Ra,qa)=>{qa.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","pre","section","source","title","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]}),Rt $ 3=C $ 1((Ra,qa)=>{qa.exports={position:!0,gfm:!0,commonmark:!1,pedantic:!1,blocks:Mu $ 1()}}),Vu $ 2=C $ 1((Ra,qa)=>{var nd=Ie $ 2(),od=Uu $ 2(),ld=Rt $ 3();qa.exports=ud;function ud(cd){var dd=this,pd=dd.options,fd,md;if(cd==null)cd={};else if(typeof cd=="object")cd=nd(cd);else throw new Error("Invalid value ` "+cd+" ` for setting ` options ` ");for(fd in ld){if(md=cd[fd],md==null&&(md=pd[fd]),fd!=="blocks"&&typeof md!="boolean"||fd==="blocks"&&typeof md!="object")throw new Error("Invalid value ` "+md+" ` for setting ` options . "+fd+" ` ");cd[fd]=md}return dd.options=cd,dd.escape=od(cd),dd}}),Hu $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(dd){if(dd==null)return cd;if(typeof dd=="string")return ud(dd);if(typeof dd=="object")return"length"in dd?ld(dd):od(dd);if(typeof dd=="function")return dd;throw new Error("Expected function, string, or object as test")}function od(dd){return pd;function pd(fd){var md;for(md in dd)if(fd[md]!==dd[md])return!1;return!0}}function ld(dd){for(var pd=[],fd=-1;++fd<dd.length;)pd[fd]=nd(dd[fd]);return md;function md(){for(var vd=-1;++vd<pd.length;)if(pd[vd].apply(this,arguments))return!0;return!1}}function ud(dd){return pd;function pd(fd){return!!(fd&&fd.type===dd)}}function cd(){return!0}}),Ku $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){return od}}),Zu $ 2=C $ 1((Ra,qa)=>{qa.exports=dd;var nd=Hu $ 2(),od=Ku $ 2(),ld=!0,ud="skip",cd=!1;dd.CONTINUE=ld,dd.SKIP=ud,dd.EXIT=cd;function dd(fd,md,vd,Ad){var Nd,Id;typeof md=="function"&&typeof vd!="function"&&(Ad=vd,vd=md,md=null),Id=nd(md),Nd=Ad?-1:1,Od(fd,null,[])();function Od(Fd,Pd,Md){var Bd=typeof Fd=="object"&&Fd!==null?Fd:{},jd;return typeof Bd.type=="string"&&(jd=typeof Bd.tagName=="string"?Bd.tagName:typeof Bd.name=="string"?Bd.name:void 0,Hd.displayName="node ("+od(Bd.type+(jd?"<"+jd+">":""))+")"),Hd;function Hd(){var Gd=Md.concat(Fd),zd=[],df,Wd;if((!md||Id(Fd,Pd,Md[Md.length-1]||null))&&(zd=pd(vd(Fd,Md)),zd[0]===cd))return zd;if(Fd.children&&zd[0]!==ud)for(Wd=(Ad?Fd.children.length:-1)+Nd;Wd>-1&&Wd<Fd.children.length;){if(df=Od(Fd.children[Wd],Wd,Gd)(),df[0]===cd)return df;Wd=typeof df[1]=="number"?df[1]:Wd+Nd}return zd}}}function pd(fd){return fd!==null&&typeof fd=="object"&&"length"in fd?fd:typeof fd=="number"?[ld,fd]:[fd]}}),ra $ 1=C $ 1((Ra,qa)=>{qa.exports=cd;var nd=Zu $ 2(),od=nd.CONTINUE,ld=nd.SKIP,ud=nd.EXIT;cd.CONTINUE=od,cd.SKIP=ld,cd.EXIT=ud;function cd(dd,pd,fd,md){typeof pd=="function"&&typeof fd!="function"&&(md=fd,fd=pd,pd=null),nd(dd,pd,vd,md);function vd(Ad,Nd){var Id=Nd[Nd.length-1],Od=Id?Id.children.indexOf(Ad):null;return fd(Ad,Od,Id)}}}),na=C $ 1((Ra,qa)=>{var nd=ra $ 1();qa.exports=od;function od(cd,dd){return nd(cd,dd?ld:ud),cd}function ld(cd){delete cd.position}function ud(cd){cd.position=void 0}}),aa $ 1=C $ 1((Ra,qa)=>{var nd=Ie $ 2(),od=na();qa.exports=cd;var ld= `
` ,ud=/ \r \n | \r /g;function cd(){var dd=this,pd=String(dd.file),fd={line:1,column:1,offset:0},md=nd(fd),vd;return pd=pd.replace(ud,ld),pd.charCodeAt(0)===65279&&(pd=pd.slice(1),md.column++,md.offset++),vd={type:"root",children:dd.tokenizeBlock(pd,md),position:{start:fd,end:dd.eof||nd(fd)}},dd.options.position||od(vd,!0),vd}}),sa=C $ 1((Ra,qa)=>{var nd=/^[ \t ]*( \n | $ )/;qa.exports=od;function od(ld,ud,cd){for(var dd,pd="",fd=0,md=ud.length;fd<md&&(dd=nd.exec(ud.slice(fd)),dd!=null);)fd+=dd[0].length,pd+=dd[0];if(pd!==""){if(cd)return!0;ld(pd)}}}),Hr $ 2=C $ 1((Ra,qa)=>{var nd="",od;qa.exports=ld;function ld(ud,cd){if(typeof ud!="string")throw new TypeError("expected a string");if(cd===1)return ud;if(cd===2)return ud+ud;var dd=ud.length*cd;if(od!==ud||typeof od>"u")od=ud,nd="";else if(nd.length>=dd)return nd.substr(0,dd);for(;dd>nd.length&&cd>1;)cd&1&&(nd+=ud),cd>>=1,ud+=ud;return nd+=ud,nd=nd.substr(0,dd),nd}}),Mt $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){return String(od).replace(/ \n + $ /,"")}}),pa=C $ 1((Ra,qa)=>{var nd=Hr $ 2(),od=Mt $ 2();qa.exports=fd;var ld= `
` ,ud=" ",cd=" ",dd=4,pd=nd(cd,dd);function fd(md,vd,Ad){for(var Nd=-1,Id=vd.length,Od="",Fd="",Pd="",Md="",Bd,jd,Hd;++Nd<Id;)if(Bd=vd.charAt(Nd),Hd)if(Hd=!1,Od+=Pd,Fd+=Md,Pd="",Md="",Bd===ld)Pd=Bd,Md=Bd;else for(Od+=Bd,Fd+=Bd;++Nd<Id;){if(Bd=vd.charAt(Nd),!Bd||Bd===ld){Md=Bd,Pd=Bd;break}Od+=Bd,Fd+=Bd}else if(Bd===cd&&vd.charAt(Nd+1)===Bd&&vd.charAt(Nd+2)===Bd&&vd.charAt(Nd+3)===Bd)Pd+=pd,Nd+=3,Hd=!0;else if(Bd===ud)Pd+=Bd,Hd=!0;else{for(jd="";Bd===ud||Bd===cd;)jd+=Bd,Bd=vd.charAt(++Nd);if(Bd!==ld)break;Pd+=jd+Bd,Md+=Bd}if(Fd)return Ad?!0:md(Od)({type:"code",lang:null,meta:null,value:od(Fd)})}}),ma=C $ 1((Ra,qa)=>{qa.exports=fd;var nd= `
2024-12-08 09:17:51 +08:00
` ,od=" ",ld=" ",ud="~",cd=" ` ",dd=3,pd=4;function fd(md,vd,Ad){var Nd=this,Id=Nd.options.gfm,Od=vd.length+1,Fd=0,Pd=" ",Md,Bd,jd,Hd,Gd,zd,df,Wd,Jd,Xd,_f,vf,Sf;if(Id){for(;Fd<Od&&(jd=vd.charAt(Fd),!(jd!==ld&&jd!==od));)Pd+=jd,Fd++;if(vf=Fd,jd=vd.charAt(Fd),!(jd!==ud&&jd!==cd)){for(Fd++,Bd=jd,Md=1,Pd+=jd;Fd<Od&&(jd=vd.charAt(Fd),jd===Bd);)Pd+=jd,Md++,Fd++;if(!(Md<dd)){for(;Fd<Od&&(jd=vd.charAt(Fd),!(jd!==ld&&jd!==od));)Pd+=jd,Fd++;for(Hd=" ",df=" ";Fd<Od&&(jd=vd.charAt(Fd),!(jd===nd||Bd===cd&&jd===Bd));)jd===ld||jd===od?df+=jd:(Hd+=df+jd,df=" "),Fd++;if(jd=vd.charAt(Fd),!(jd&&jd!==nd)){if(Ad)return!0;Sf=md.now(),Sf.column+=Pd.length,Sf.offset+=Pd.length,Pd+=Hd,Hd=Nd.decode.raw(Nd.unescape(Hd),Sf),df&&(Pd+=df),df=" ",Xd=" ",_f=" ",Wd=" ",Jd=" ";for(var gf=!0;Fd<Od;){if(jd=vd.charAt(Fd),Wd+=Xd,Jd+=_f,Xd=" ",_f=" ",jd!==nd){Wd+=jd,_f+=jd,Fd++;continue}for(gf?(Pd+=jd,gf=!1):(Xd+=jd,_f+=jd),df=" ",Fd++;Fd<Od&&(jd=vd.charAt(Fd),jd===ld);)df+=jd,Fd++;if(Xd+=df,_f+=df.slice(vf),!(df.length>=pd)){for(df=" ";Fd<Od&&(jd=vd.charAt(Fd),jd===Bd);)df+=jd,Fd++;if(Xd+=df,_f+=df,!(df.length<Md)){for(df=" ";Fd<Od&&(jd=vd.charAt(Fd),!(jd!==ld&&jd!==od));)Xd+=jd,_f+=jd,Fd++;if(!jd||jd===nd)break}}}for(Pd+=Wd+Xd,Fd=-1,Od=Hd.length;++Fd<Od;)if(jd=Hd.charAt(Fd),jd===ld||jd===od)Gd||(Gd=Hd.slice(0,Fd));else if(Gd){zd=Hd.slice(Fd);break}return md(Pd)({type:" code ",lang:Gd||Hd||null,meta:zd||null,value:Jd})}}}}}}),Re$2=C$1((Ra,qa)=>{Ra=qa.exports=nd;function nd(od){return od.trim?od.trim():Ra.right(Ra.left(od))}Ra.left=function(od){return od.trimLeft?od.trimLeft():od.replace(/^\s\s*/," " ) } , Ra . right = function ( od ) { if ( od . trimRight ) return od . trimRight ( ) ; for ( var ld = /\s/ , ud = od . length ; ld . test ( od . charAt ( -- ud ) ) ; ) ; return od . slice ( 0 , ud + 1 ) } } ) , Kr$2 = C$1 ( ( Ra , qa ) => { qa . exports = nd ; function nd ( od , ld , ud , cd ) { for ( var dd = od . length , pd = - 1 , fd , md ; ++ pd < dd ; ) if ( fd = od [ pd ] , md = fd [ 1 ] || { } , ! ( md . pedantic !== void 0 && md . pedantic !== ud . options . pedantic ) && ! ( md . commonmark !== void 0 && md . commonmark !== ud . options . commonmark ) && ld [ fd [ 0 ] ] . apply ( ud , cd ) ) return ! 0 ; return ! 1 } } ) , ba$1 = C$1 ( ( Ra , qa ) => { var nd = Re$2 ( ) , od = Kr$2 ( ) ; qa . exports = pd ; var ld = `
` ,ud=" ",cd=" ",dd=">";function pd(fd,md,vd){for(var Ad=this,Nd=Ad.offset,Id=Ad.blockTokenizers,Od=Ad.interruptBlockquote,Fd=fd.now(),Pd=Fd.line,Md=md.length,Bd=[],jd=[],Hd=[],Gd,zd=0,df,Wd,Jd,Xd,_f,vf,Sf,gf;zd<Md&&(df=md.charAt(zd),!(df!==cd&&df!==ud));)zd++;if(md.charAt(zd)===dd){if(vd)return!0;for(zd=0;zd<Md;){for(Jd=md.indexOf(ld,zd),vf=zd,Sf=!1,Jd===-1&&(Jd=Md);zd<Md&&(df=md.charAt(zd),!(df!==cd&&df!==ud));)zd++;if(md.charAt(zd)===dd?(zd++,Sf=!0,md.charAt(zd)===cd&&zd++):zd=vf,Xd=md.slice(zd,Jd),!Sf&&!nd(Xd)){zd=vf;break}if(!Sf&&(Wd=md.slice(zd),od(Od,Id,Ad,[fd,Wd,!0])))break;_f=vf===zd?Xd:md.slice(vf,Jd),Hd.push(zd-vf),Bd.push(_f),jd.push(Xd),zd=Jd+1}for(zd=-1,Md=Hd.length,Gd=fd(Bd.join(ld));++zd<Md;)Nd[Pd]=(Nd[Pd]||0)+Hd[zd],Pd++;return gf=Ad.enterBlock(),jd=Ad.tokenizeBlock(jd.join(ld),Fd),gf(),Gd({type:"blockquote",children:jd})}}}),xa $ 1=C $ 1((Ra,qa)=>{qa.exports=dd;var nd= `
2024-11-28 09:28:59 +08:00
` ,od=" ",ld=" ",ud="#",cd=6;function dd(pd,fd,md){for(var vd=this,Ad=vd.options.pedantic,Nd=fd.length+1,Id=-1,Od=pd.now(),Fd="",Pd="",Md,Bd,jd;++Id<Nd;){if(Md=fd.charAt(Id),Md!==ld&&Md!==od){Id--;break}Fd+=Md}for(jd=0;++Id<=Nd;){if(Md=fd.charAt(Id),Md!==ud){Id--;break}Fd+=Md,jd++}if(!(jd>cd)&&!(!jd||!Ad&&fd.charAt(Id+1)===ud)){for(Nd=fd.length+1,Bd="";++Id<Nd;){if(Md=fd.charAt(Id),Md!==ld&&Md!==od){Id--;break}Bd+=Md}if(!(!Ad&&Bd.length===0&&Md&&Md!==nd)){if(md)return!0;for(Fd+=Bd,Bd="",Pd="";++Id<Nd&&(Md=fd.charAt(Id),!(!Md||Md===nd));){if(Md!==ld&&Md!==od&&Md!==ud){Pd+=Bd+Md,Bd="";continue}for(;Md===ld||Md===od;)Bd+=Md,Md=fd.charAt(++Id);if(!Ad&&Pd&&!Bd&&Md===ud){Pd+=Md;continue}for(;Md===ud;)Bd+=Md,Md=fd.charAt(++Id);for(;Md===ld||Md===od;)Bd+=Md,Md=fd.charAt(++Id);Id--}return Od.column+=Fd.length,Od.offset+=Fd.length,Fd+=Pd+Bd,pd(Fd)({type:"heading",depth:jd,children:vd.tokenizeInline(Pd,Od)})}}}}),Ba=C $ 1((Ra,qa)=>{qa.exports=fd;var nd=" ",od= `
` ,ld=" ",ud="*",cd="-",dd="_",pd=3;function fd(md,vd,Ad){for(var Nd=-1,Id=vd.length+1,Od="",Fd,Pd,Md,Bd;++Nd<Id&&(Fd=vd.charAt(Nd),!(Fd!==nd&&Fd!==ld));)Od+=Fd;if(!(Fd!==ud&&Fd!==cd&&Fd!==dd))for(Pd=Fd,Od+=Fd,Md=1,Bd="";++Nd<Id;)if(Fd=vd.charAt(Nd),Fd===Pd)Md++,Od+=Bd+Pd,Bd="";else if(Fd===ld)Bd+=Fd;else return Md>=pd&&(!Fd||Fd===od)?(Od+=Bd,Ad?!0:md(Od)({type:"thematicBreak"})):void 0}}), $ t $ 3=C $ 1((Ra,qa)=>{qa.exports=cd;var nd=" ",od=" ",ld=1,ud=4;function cd(dd){for(var pd=0,fd=0,md=dd.charAt(pd),vd={},Ad,Nd=0;md===nd||md===od;){for(Ad=md===nd?ud:ld,fd+=Ad,Ad>1&&(fd=Math.floor(fd/Ad)*Ad);Nd<fd;)vd[++Nd]=pd;md=dd.charAt(++pd)}return{indent:fd,stops:vd}}}),Oa $ 2=C $ 1((Ra,qa)=>{var nd=Re $ 2(),od=Hr $ 2(),ld= $ t $ 3();qa.exports=pd;var ud= `
` ,cd=" ",dd="!";function pd(fd,md){var vd=fd.split(ud),Ad=vd.length+1,Nd=1/0,Id=[],Od,Fd,Pd;for(vd.unshift(od(cd,md)+dd);Ad--;)if(Fd=ld(vd[Ad]),Id[Ad]=Fd.stops,nd(vd[Ad]).length!==0)if(Fd.indent)Fd.indent>0&&Fd.indent<Nd&&(Nd=Fd.indent);else{Nd=1/0;break}if(Nd!==1/0)for(Ad=vd.length;Ad--;){for(Pd=Id[Ad],Od=Nd;Od&&!(Od in Pd);)Od--;vd[Ad]=vd[Ad].slice(Pd[Od]+1)}return vd.shift(),vd.join(ud)}}),Ua $ 2=C $ 1((Ra,qa)=>{var nd=Re $ 2(),od=Hr $ 2(),ld=Ne $ 1(),ud= $ t $ 3(),cd=Oa $ 2(),dd=Kr $ 2();qa.exports=df;var pd="*",fd="_",md="+",vd="-",Ad=".",Nd=" ",Id= `
2024-12-08 09:17:51 +08:00
` ,Od=" ",Fd=")",Pd="x",Md=4,Bd=/ \n \n (?! \s * $ )/,jd=/^ \[ ([ X \t x])][ \t ]/,Hd=/^([ \t ]*)([*+-]| \d +[.)])( {1,4}(?! )| | \t | $ |(?= \n ))([^ \n ]*)/,Gd=/^([ \t ]*)([*+-]| \d +[.)])([ \t ]+)/,zd=/^( {1,4}| \t )?/gm;function df(_f,vf,Sf){for(var gf=this,bf=gf.options.commonmark,Tf=gf.options.pedantic,Mf=gf.blockTokenizers,Kf=gf.interruptList,Zf=0,eh=vf.length, $ f=null,Df,Lf,zf,Jf,xf,yf,Bf,qf,oh,Yf,kf,Vf,fh,Gf,wf,Rf,Uf,ph,gh,ah=!1,Ah,dh,Mh,Yh;Zf<eh&&(Jf=vf.charAt(Zf),!(Jf!==Od&&Jf!==Nd));)Zf++;if(Jf=vf.charAt(Zf),Jf===pd||Jf===md||Jf===vd)xf=Jf,zf=!1;else{for(zf=!0,Lf="";Zf<eh&&(Jf=vf.charAt(Zf),!!ld(Jf));)Lf+=Jf,Zf++;if(Jf=vf.charAt(Zf),!Lf||!(Jf===Ad||bf&&Jf===Fd)||Sf&&Lf!=="1")return; $ f=parseInt(Lf,10),xf=Jf}if(Jf=vf.charAt(++Zf),!(Jf!==Nd&&Jf!==Od&&(Tf||Jf!==Id&&Jf!==""))){if(Sf)return!0;for(Zf=0,Gf=[],wf=[],Rf=[];Zf<eh;){for(yf=vf.indexOf(Id,Zf),Bf=Zf,qf=!1,Yh=!1,yf===-1&&(yf=eh),Df=0;Zf<eh;){if(Jf=vf.charAt(Zf),Jf===Od)Df+=Md-Df%Md;else if(Jf===Nd)Df++;else break;Zf++}if(Uf&&Df>=Uf.indent&&(Yh=!0),Jf=vf.charAt(Zf),oh=null,!Yh){if(Jf===pd||Jf===md||Jf===vd)oh=Jf,Zf++,Df++;else{for(Lf="";Zf<eh&&(Jf=vf.charAt(Zf),!!ld(Jf));)Lf+=Jf,Zf++;Jf=vf.charAt(Zf),Zf++,Lf&&(Jf===Ad||bf&&Jf===Fd)&&(oh=Jf,Df+=Lf.length+1)}if(oh)if(Jf=vf.charAt(Zf),Jf===Od)Df+=Md-Df%Md,Zf++;else if(Jf===Nd){for(Mh=Zf+Md;Zf<Mh&&vf.charAt(Zf)===Nd;)Zf++,Df++;Zf===Mh&&vf.charAt(Zf)===Nd&&(Zf-=Md-1,Df-=Md-1)}else Jf!==Id&&Jf!==""&&(oh=null)}if(oh){if(!Tf&&xf!==oh)break;qf=!0}else!bf&&!Yh&&vf.charAt(Bf)===Nd?Yh=!0:bf&&Uf&&(Yh=Df>=Uf.indent||Df>Md),qf=!1,Zf=Bf;if(kf=vf.slice(Bf,yf),Yf=Bf===Zf?kf:vf.slice(Zf,yf),(oh===pd||oh===fd||oh===vd)&&Mf.thematicBreak.call(gf,_f,kf,!0))break;if(Vf=fh,fh=!qf&&!nd(Yf).length,Yh&&Uf)Uf.value=Uf.value.concat(Rf,kf),wf=wf.concat(Rf,kf),Rf=[];else if(qf)Rf.length!==0&&(ah=!0,Uf.value.push(""),Uf.trail=Rf.concat()),Uf={value:[kf],indent:Df,trail:[]},Gf.push(Uf),wf=wf.concat(Rf,kf),Rf=[];else if(fh){if(Vf&&!bf)break;Rf.push(kf)}else{if(Vf||dd(Kf,Mf,gf,[_f,kf,!0]))break;Uf.value=Uf.value.concat(Rf,kf),wf=wf.concat(Rf,kf),Rf=[]}Zf=yf+1}for(Ah=_f(wf.join(Id)).reset({type:"list",ordered:zf,start: $ f,spread:ah,children:[]}),ph=gf.enterList(),gh=gf.enterBlock(),Zf=-1,eh=Gf.length;++Zf<eh;)Uf=Gf[Zf].value.join(Id),dh=_f.now(),_f(Uf)(Wd(gf,Uf,dh),Ah),Uf=Gf[Zf].trail.join(Id),Zf!==eh-1&&(Uf+=Id),_f(Uf);return ph(),gh(),Ah}}function Wd(_f,vf,Sf){var gf=_f.offset,bf=_f.options.pedantic?Jd:Xd,Tf=null,Mf,Kf;return vf=bf.apply(null,arguments),_f.options.gfm&&(Mf=vf.match(jd),Mf&&(Kf=Mf[0].length,Tf=Mf[1].toLowerCase()===Pd,gf[Sf.line]+=Kf,vf=vf.slice(Kf))),{type:"listItem",spread:Bd.test(vf),checked:Tf,children:_f.tokenizeBlock(vf,Sf)}}function Jd(_f,vf,Sf){var gf=_f.offset,bf=Sf.line;return vf=vf.replace(Gd,Tf),bf=Sf.line,vf.replace(zd,Tf);function Tf(Mf){return gf[bf]=(gf[bf]||0)+Mf.length,bf++,""}}function Xd(_f,vf,Sf){var gf=_f.offset,bf=Sf.line,Tf,Mf,Kf,Zf,eh, $ f,Df;for(vf=vf.replace(Hd,Lf),Zf=vf.split(Id),eh=cd(vf,ud(Tf).indent).split(Id),eh[0]=Kf,gf[bf]=(gf[bf]||0)+Mf.length,bf++, $ f=0,Df=Zf.length;++ $ f<Df;)gf[bf]=(gf[bf]||0)+Zf[ $ f].length-eh[ $ f].length,bf++;return eh.join(Id);function Lf(zf,Jf,xf,yf,Bf){return Mf=Jf+xf+yf,Kf=Bf,Number(xf)<10&&Mf.length%2===1&&(xf=Nd+xf),Tf=Jf+od(Nd,xf.length)+yf,Tf+Kf}}}),Ga $ 1=C $ 1((Ra,qa)=>{qa.exports=md;var nd= `
2024-11-28 09:28:59 +08:00
` ,od=" ",ld=" ",ud="=",cd="-",dd=3,pd=1,fd=2;function md(vd,Ad,Nd){for(var Id=this,Od=vd.now(),Fd=Ad.length,Pd=-1,Md="",Bd,jd,Hd,Gd,zd;++Pd<Fd;){if(Hd=Ad.charAt(Pd),Hd!==ld||Pd>=dd){Pd--;break}Md+=Hd}for(Bd="",jd="";++Pd<Fd;){if(Hd=Ad.charAt(Pd),Hd===nd){Pd--;break}Hd===ld||Hd===od?jd+=Hd:(Bd+=jd+Hd,jd="")}if(Od.column+=Md.length,Od.offset+=Md.length,Md+=Bd+jd,Hd=Ad.charAt(++Pd),Gd=Ad.charAt(++Pd),!(Hd!==nd||Gd!==ud&&Gd!==cd)){for(Md+=Hd,jd=Gd,zd=Gd===ud?pd:fd;++Pd<Fd;){if(Hd=Ad.charAt(Pd),Hd!==Gd){if(Hd!==nd)return;Pd--;break}jd+=Hd}return Nd?!0:vd(Md+jd)({type:"heading",depth:zd,children:Id.tokenizeInline(Bd,Od)})}}}),Xt $ 1=C $ 1(Ra=>{var qa="[a-zA-Z_:][a-zA-Z0-9:._-]*",nd="[^ \" '=<> ` \ \u0000 - \ \u0020 ] + ",od=" '[^' ] * '",ld=' "[^" ] * "',ud=" ( ? : "+nd+" | "+od+" | "+ld+" ) ",cd=" ( ? : \ \ s + "+qa+" ( ? : \ \ s *= \ \ s * "+ud+" ) ? ) ",dd=" < [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * "+cd+" * \ \ s * \ \ / ? > ",pd=" < \ \ / [ A - Za - z ] [ A - Za - z0 - 9 \ \ - ] * \ \ s * > ",fd=" <!-- -- > | <!-- ( ? : - ? [ ^ > - ] ) ( ? : - ? [ ^ - ] ) * -- > ",md=" < [ ? ] . * ? [ ? ] > ",vd=" < ! [ A - Za - z ] + \ \ s + [ ^ > ] * > ",Ad=" < ! \ \ [ CDATA \ \ [ [ \ \ s \ \ S ] * ? \ \ ] \ \ ] > ";Ra.openCloseTag=new RegExp(" ^ ( ? : "+dd+" | "+pd+" ) "),Ra.tag=new RegExp(" ^ ( ? : "+dd+" | "+pd+" | "+fd+" | "+md+" | "+vd+" | "+Ad+" ) ")}),Ka=C$1((Ra,qa)=>{var nd=Xt$1().openCloseTag;qa.exports=Bd;var od=" ",ld=" " , ud = `
2024-12-08 09:17:51 +08:00
` ,cd="<",dd=/^<(script|pre|style)(?=( \s |>| $ ))/i,pd=/< \/ (script|pre|style)>/i,fd=/^<!--/,md=/-->/,vd=/^< \? /,Ad=/ \? >/,Nd=/^<![A-Za-z]/,Id=/>/,Od=/^<! \[ CDATA \[ /,Fd=/]]>/,Pd=/^ $ /,Md=new RegExp(nd.source+" \\ s* $ ");function Bd(jd,Hd,Gd){for(var zd=this,df=zd.options.blocks.join("|"),Wd=new RegExp("^</?("+df+")(?=( \\ s|/?>| $ ))","i"),Jd=Hd.length,Xd=0,_f,vf,Sf,gf,bf,Tf,Mf,Kf=[[dd,pd,!0],[fd,md,!0],[vd,Ad,!0],[Nd,Id,!0],[Od,Fd,!0],[Wd,Pd,!0],[Md,Pd,!1]];Xd<Jd&&(gf=Hd.charAt(Xd),!(gf!==od&&gf!==ld));)Xd++;if(Hd.charAt(Xd)===cd){for(_f=Hd.indexOf(ud,Xd+1),_f=_f===-1?Jd:_f,vf=Hd.slice(Xd,_f),Sf=-1,bf=Kf.length;++Sf<bf;)if(Kf[Sf][0].test(vf)){Tf=Kf[Sf];break}if(Tf){if(Gd)return Tf[2];if(Xd=_f,!Tf[1].test(vf))for(;Xd<Jd;){if(_f=Hd.indexOf(ud,Xd+1),_f=_f===-1?Jd:_f,vf=Hd.slice(Xd+1,_f),Tf[1].test(vf)){vf&&(Xd=_f);break}Xd=_f}return Mf=Hd.slice(0,Xd),jd(Mf)({type:"html",value:Mf})}}}}),ue $ 2=C $ 1((Ra,qa)=>{qa.exports=ld;var nd=String.fromCharCode,od=/ \s /;function ld(ud){return od.test(typeof ud=="number"?nd(ud):ud.charAt(0))}}),Qt $ 2=C $ 1((Ra,qa)=>{var nd=xr $ 1();qa.exports=od;function od(ld){return nd(ld).toLowerCase()}}),io $ 1=C $ 1((Ra,qa)=>{var nd=ue $ 2(),od=Qt $ 2();qa.exports=Pd;var ld='"',ud="'",cd=" \\ ",dd= `
` ,pd=" ",fd=" ",md="[",vd="]",Ad="(",Nd=")",Id=":",Od="<",Fd=">";function Pd(jd,Hd,Gd){for(var zd=this,df=zd.options.commonmark,Wd=0,Jd=Hd.length,Xd="",_f,vf,Sf,gf,bf,Tf,Mf,Kf;Wd<Jd&&(gf=Hd.charAt(Wd),!(gf!==fd&&gf!==pd));)Xd+=gf,Wd++;if(gf=Hd.charAt(Wd),gf===md){for(Wd++,Xd+=gf,Sf="";Wd<Jd&&(gf=Hd.charAt(Wd),gf!==vd);)gf===cd&&(Sf+=gf,Wd++,gf=Hd.charAt(Wd)),Sf+=gf,Wd++;if(!(!Sf||Hd.charAt(Wd)!==vd||Hd.charAt(Wd+1)!==Id)){for(Tf=Sf,Xd+=Sf+vd+Id,Wd=Xd.length,Sf="";Wd<Jd&&(gf=Hd.charAt(Wd),!(gf!==pd&&gf!==fd&&gf!==dd));)Xd+=gf,Wd++;if(gf=Hd.charAt(Wd),Sf="",_f=Xd,gf===Od){for(Wd++;Wd<Jd&&(gf=Hd.charAt(Wd),!!Md(gf));)Sf+=gf,Wd++;if(gf=Hd.charAt(Wd),gf===Md.delimiter)Xd+=Od+Sf+gf,Wd++;else{if(df)return;Wd-=Sf.length+1,Sf=""}}if(!Sf){for(;Wd<Jd&&(gf=Hd.charAt(Wd),!!Bd(gf));)Sf+=gf,Wd++;Xd+=Sf}if(Sf){for(Mf=Sf,Sf="";Wd<Jd&&(gf=Hd.charAt(Wd),!(gf!==pd&&gf!==fd&&gf!==dd));)Sf+=gf,Wd++;if(gf=Hd.charAt(Wd),bf=null,gf===ld?bf=ld:gf===ud?bf=ud:gf===Ad&&(bf=Nd),!bf)Sf="",Wd=Xd.length;else if(Sf){for(Xd+=Sf+gf,Wd=Xd.length,Sf="";Wd<Jd&&(gf=Hd.charAt(Wd),gf!==bf);){if(gf===dd){if(Wd++,gf=Hd.charAt(Wd),gf===dd||gf===bf)return;Sf+=dd}Sf+=gf,Wd++}if(gf=Hd.charAt(Wd),gf!==bf)return;vf=Xd,Xd+=Sf+gf,Wd++,Kf=Sf,Sf=""}else return;for(;Wd<Jd&&(gf=Hd.charAt(Wd),!(gf!==pd&&gf!==fd));)Xd+=gf,Wd++;if(gf=Hd.charAt(Wd),!gf||gf===dd)return Gd?!0:(_f=jd(_f).test().end,Mf=zd.decode.raw(zd.unescape(Mf),_f,{nonTerminated:!1}),Kf&&(vf=jd(vf).test().end,Kf=zd.decode.raw(zd.unescape(Kf),vf)),jd(Xd)({type:"definition",identifier:od(Tf),label:Tf,title:Kf||null,url:Mf}))}}}}function Md(jd){return jd!==Fd&&jd!==md&&jd!==vd}Md.delimiter=Fd;function Bd(jd){return jd!==md&&jd!==vd&&!nd(jd)}}),oo $ 3=C $ 1((Ra,qa)=>{var nd=ue $ 2();qa.exports=Od;var od=" ",ld= `
` ,ud=" ",cd="-",dd=":",pd=" \\ ",fd="|",md=1,vd=2,Ad="left",Nd="center",Id="right";function Od(Fd,Pd,Md){var Bd=this,jd,Hd,Gd,zd,df,Wd,Jd,Xd,_f,vf,Sf,gf,bf,Tf,Mf,Kf,Zf,eh, $ f,Df,Lf,zf;if(Bd.options.gfm){for(jd=0,Kf=0,Wd=Pd.length+1,Jd=[];jd<Wd;){if(Df=Pd.indexOf(ld,jd),Lf=Pd.indexOf(fd,jd+1),Df===-1&&(Df=Pd.length),Lf===-1||Lf>Df){if(Kf<vd)return;break}Jd.push(Pd.slice(jd,Df)),Kf++,jd=Df+1}for(zd=Jd.join(ld),Hd=Jd.splice(1,1)[0]||[],jd=0,Wd=Hd.length,Kf--,Gd=!1,Sf=[];jd<Wd;){if(_f=Hd.charAt(jd),_f===fd){if(vf=null,Gd===!1){if(zf===!1)return}else Sf.push(Gd),Gd=!1;zf=!1}else if(_f===cd)vf=!0,Gd=Gd||null;else if(_f===dd)Gd===Ad?Gd=Nd:vf&&Gd===null?Gd=Id:Gd=Ad;else if(!nd(_f))return;jd++}if(Gd!==!1&&Sf.push(Gd),!(Sf.length<md)){if(Md)return!0;for(Mf=-1,eh=[], $ f=Fd(zd).reset({type:"table",align:Sf,children:eh});++Mf<Kf;){for(Zf=Jd[Mf],df={type:"tableRow",children:[]},Mf&&Fd(ld),Fd(Zf).reset(df, $ f),Wd=Zf.length+1,jd=0,Xd="",gf="",bf=!0;jd<Wd;){if(_f=Zf.charAt(jd),_f===od||_f===ud){gf?Xd+=_f:Fd(_f),jd++;continue}_f===""||_f===fd?bf?Fd(_f):((gf||_f)&&!bf&&(zd=gf,Xd.length>1&&(_f?(zd+=Xd.slice(0,-1),Xd=Xd.charAt(Xd.length-1)):(zd+=Xd,Xd="")),Tf=Fd.now(),Fd(zd)({type:"tableCell",children:Bd.tokenizeInline(gf,Tf)},df)),Fd(Xd+_f),Xd="",gf=""):(Xd&&(gf+=Xd,Xd=""),gf+=_f,_f===pd&&jd!==Wd-2&&(gf+=Zf.charAt(jd+1),jd++)),bf=!1,jd++}Mf||Fd(ld+Hd)}return $ f}}}}),lo $ 2=C $ 1((Ra,qa)=>{var nd=Re $ 2(),od=Mt $ 2(),ld=Kr $ 2();qa.exports=fd;var ud=" ",cd= `
2024-11-28 09:28:59 +08:00
` ,dd=" ",pd=4;function fd(md,vd,Ad){for(var Nd=this,Id=Nd.options,Od=Id.commonmark,Fd=Nd.blockTokenizers,Pd=Nd.interruptParagraph,Md=vd.indexOf(cd),Bd=vd.length,jd,Hd,Gd,zd,df;Md<Bd;){if(Md===-1){Md=Bd;break}if(vd.charAt(Md+1)===cd)break;if(Od){for(zd=0,jd=Md+1;jd<Bd;){if(Gd=vd.charAt(jd),Gd===ud){zd=pd;break}else if(Gd===dd)zd++;else break;jd++}if(zd>=pd&&Gd!==cd){Md=vd.indexOf(cd,Md+1);continue}}if(Hd=vd.slice(Md+1),ld(Pd,Fd,Nd,[md,Hd,!0]))break;if(jd=Md,Md=vd.indexOf(cd,Md+1),Md!==-1&&nd(vd.slice(jd,Md))===""){Md=jd;break}}return Hd=vd.slice(0,Md),Ad?!0:(df=md.now(),Hd=od(Hd),md(Hd)({type:"paragraph",children:Nd.tokenizeInline(Hd,df)}))}}),Do $ 1=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od,ld){return od.indexOf(" \\ ",ld)}}),Fo $ 1=C $ 1((Ra,qa)=>{var nd=Do $ 1();qa.exports=ud,ud.locator=nd;var od= `
2024-12-08 09:17:51 +08:00
` ,ld=" \\ ";function ud(cd,dd,pd){var fd=this,md,vd;if(dd.charAt(0)===ld&&(md=dd.charAt(1),fd.escape.indexOf(md)!==-1))return pd?!0:(md===od?vd={type:"break"}:vd={type:"text",value:md},cd(ld+md)(vd))}}),tn $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od,ld){return od.indexOf("<",ld)}}),yo $ 2=C $ 1((Ra,qa)=>{var nd=ue $ 2(),od=pr $ 1(),ld=tn $ 2();qa.exports=vd,vd.locator=ld,vd.notInLink=!0;var ud="<",cd=">",dd="@",pd="/",fd="mailto:",md=fd.length;function vd(Ad,Nd,Id){var Od=this,Fd="",Pd=Nd.length,Md=0,Bd="",jd=!1,Hd="",Gd,zd,df,Wd,Jd;if(Nd.charAt(0)===ud){for(Md++,Fd=ud;Md<Pd&&(Gd=Nd.charAt(Md),!(nd(Gd)||Gd===cd||Gd===dd||Gd===":"&&Nd.charAt(Md+1)===pd));)Bd+=Gd,Md++;if(Bd){if(Hd+=Bd,Bd="",Gd=Nd.charAt(Md),Hd+=Gd,Md++,Gd===dd)jd=!0;else{if(Gd!==":"||Nd.charAt(Md+1)!==pd)return;Hd+=pd,Md++}for(;Md<Pd&&(Gd=Nd.charAt(Md),!(nd(Gd)||Gd===cd));)Bd+=Gd,Md++;if(Gd=Nd.charAt(Md),!(!Bd||Gd!==cd))return Id?!0:(Hd+=Bd,df=Hd,Fd+=Hd+Gd,zd=Ad.now(),zd.column++,zd.offset++,jd&&(Hd.slice(0,md).toLowerCase()===fd?(df=df.slice(md),zd.column+=md,zd.offset+=md):Hd=fd+Hd),Wd=Od.inlineTokenizers,Od.inlineTokenizers={text:Wd.text},Jd=Od.enterLink(),df=Od.tokenizeInline(df,zd),Od.inlineTokenizers=Wd,Jd(),Ad(Fd)({type:"link",title:null,url:od(Hd,{nonTerminated:!1}),children:df}))}}}}),xo $ 2=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od,ld){var ud=String(od),cd=0,dd;if(typeof ld!="string")throw new Error("Expected character");for(dd=ud.indexOf(ld);dd!==-1;)cd++,dd=ud.indexOf(ld,dd+ld.length);return cd}}),Bo $ 1=C $ 1((Ra,qa)=>{qa.exports=od;var nd=["www.","http://","https://"];function od(ld,ud){var cd=-1,dd,pd,fd;if(!this.options.gfm)return cd;for(pd=nd.length,dd=-1;++dd<pd;)fd=ld.indexOf(nd[dd],ud),fd!==-1&&(cd===-1||fd<cd)&&(cd=fd);return cd}}),Oo=C $ 1((Ra,qa)=>{var nd=xo $ 2(),od=pr $ 1(),ld=Ne $ 1(),ud=Ve $ 2(),cd=ue $ 2(),dd=Bo $ 1();qa.exports=zd,zd.locator=dd,zd.notInLink=!0;var pd=33,fd=38,md=41,vd=42,Ad=44,Nd=45,Id=46,Od=58,Fd=59,Pd=63,Md=60,Bd=95,jd=126,Hd="(",Gd=")";function zd(df,Wd,Jd){var Xd=this,_f=Xd.options.gfm,vf=Xd.inlineTokenizers,Sf=Wd.length,gf=-1,bf=!1,Tf,Mf,Kf,Zf,eh, $ f,Df,Lf,zf,Jf,xf,yf,Bf,qf;if(_f){if(Wd.slice(0,4)==="www.")bf=!0,Zf=4;else if(Wd.slice(0,7).toLowerCase()==="http://")Zf=7;else if(Wd.slice(0,8).toLowerCase()==="https://")Zf=8;else return;for(gf=Zf-1,Kf=Zf,Tf=[];Zf<Sf;){if(Df=Wd.charCodeAt(Zf),Df===Id){if(gf===Zf-1)break;Tf.push(Zf),gf=Zf,Zf++;continue}if(ld(Df)||ud(Df)||Df===Nd||Df===Bd){Zf++;continue}break}if(Df===Id&&(Tf.pop(),Zf--),Tf[0]!==void 0&&(Mf=Tf.length<2?Kf:Tf[Tf.length-2]+1,Wd.slice(Mf,Zf).indexOf("_")===-1)){if(Jd)return!0;for(Lf=Zf,eh=Zf;Zf<Sf&&(Df=Wd.charCodeAt(Zf),!(cd(Df)||Df===Md));)Zf++,Df===pd||Df===vd||Df===Ad||Df===Id||Df===Od||Df===Pd||Df===Bd||Df===jd||(Lf=Zf);if(Zf=Lf,Wd.charCodeAt(Zf-1)===md)for( $ f=Wd.slice(eh,Zf),zf=nd( $ f,Hd),Jf=nd( $ f,Gd);Jf>zf;)Zf=eh+ $ f.lastIndexOf(Gd), $ f=Wd.slice(eh,Zf),Jf--;if(Wd.charCodeAt(Zf-1)===Fd&&(Zf--,ud(Wd.charCodeAt(Zf-1)))){for(Lf=Zf-2;ud(Wd.charCodeAt(Lf));)Lf--;Wd.charCodeAt(Lf)===fd&&(Zf=Lf)}return xf=Wd.slice(0,Zf),Bf=od(xf,{nonTerminated:!1}),bf&&(Bf="http://"+Bf),qf=Xd.enterLink(),Xd.inlineTokenizers={text:vf.text},yf=Xd.tokenizeInline(xf,df.now()),Xd.inlineTokenizers=vf,qf(),df(xf)({type:"link",title:null,url:Bf,children:yf})}}}}),No=C $ 1((Ra,qa)=>{var nd=Ne $ 1(),od=Ve $ 2(),ld=43,ud=45,cd=46,dd=95;qa.exports=pd;function pd(md,vd){var Ad=this,Nd,Id;if(!this.options.gfm||(Nd=md.indexOf("@",vd),Nd===-1))return-1;if(Id=Nd,Id===vd||!fd(md.charCodeAt(Id-1)))return pd.call(Ad,md,Nd+1);for(;Id>vd&&fd(md.charCodeAt(Id-1));)Id--;return Id}function fd(md){return nd(md)||od(md)||md===ld||md===ud||md===cd||md===dd}}),Mo $ 2=C $ 1((Ra,qa)=>{var nd=pr $ 1(),od=Ne $ 1(),ld=Ve $ 2(),ud=No();qa.exports=vd,vd.locator=ud,vd.notInLink=!0;var cd=43,dd=45,pd=46,fd=64,md=95;function vd(Ad,Nd,Id){var Od=this,Fd=Od.options.gfm,Pd=Od.inlineTokenizers,Md=0,Bd=Nd.length,jd=-1,Hd,Gd,zd,df;if(Fd){for(Hd=Nd.charCodeAt(Md);od(Hd)||ld(Hd)||Hd===cd||Hd===dd||Hd===pd||Hd===md;)Hd=Nd.charCodeAt(++Md);if(Md!==0&&Hd===fd){for(Md++;Md<Bd;){if(Hd=Nd.charCodeAt(Md),od(Hd)||ld(Hd)||Hd===dd||Hd===pd||Hd===md){Md++,jd===-1&&Hd===pd&
` ,ud="!",cd='"',dd="'",pd="(",fd=")",md="<",vd=">",Ad="[",Nd=" \\ ",Id="]",Od=" ` ";function Fd(Pd,Md,Bd){var jd=this,Hd=" ",Gd=0,zd=Md.charAt(0),df=jd.options.pedantic,Wd=jd.options.commonmark,Jd=jd.options.gfm,Xd,_f,vf,Sf,gf,bf,Tf,Mf,Kf,Zf,eh,$f,Df,Lf,zf,Jf,xf,yf;if(zd===ud&&(Mf=!0,Hd=zd,zd=Md.charAt(++Gd)),zd===Ad&&!(!Mf&&jd.inLink)){for(Hd+=zd,Lf=" ",Gd++,eh=Md.length,Jf=Pd.now(),Df=0,Jf.column+=Gd,Jf.offset+=Gd;Gd<eh;){if(zd=Md.charAt(Gd),bf=zd,zd===Od){for(_f=1;Md.charAt(Gd+1)===Od;)bf+=zd,Gd++,_f++;vf?_f>=vf&&(vf=0):vf=_f}else if(zd===Nd)Gd++,bf+=Md.charAt(Gd);else if((!vf||Jd)&&zd===Ad)Df++;else if((!vf||Jd)&&zd===Id)if(Df)Df--;else{if(Md.charAt(Gd+1)!==pd)return;bf+=pd,Xd=!0,Gd++;break}Lf+=bf,bf=" ",Gd++}if(Xd){for(Kf=Lf,Hd+=Lf+bf,Gd++;Gd<eh&&(zd=Md.charAt(Gd),!!nd(zd));)Hd+=zd,Gd++;if(zd=Md.charAt(Gd),Lf=" ",Sf=Hd,zd===md){for(Gd++,Sf+=md;Gd<eh&&(zd=Md.charAt(Gd),zd!==vd);){if(Wd&&zd===ld)return;Lf+=zd,Gd++}if(Md.charAt(Gd)!==vd)return;Hd+=md+Lf+vd,zf=Lf,Gd++}else{for(zd=null,bf=" ";Gd<eh&&(zd=Md.charAt(Gd),!(bf&&(zd===cd||zd===dd||Wd&&zd===pd)));){if(nd(zd)){if(!df)break;bf+=zd}else{if(zd===pd)Df++;else if(zd===fd){if(Df===0)break;Df--}Lf+=bf,bf=" ",zd===Nd&&(Lf+=Nd,zd=Md.charAt(++Gd)),Lf+=zd}Gd++}Hd+=Lf,zf=Lf,Gd=Hd.length}for(Lf=" ";Gd<eh&&(zd=Md.charAt(Gd),!!nd(zd));)Lf+=zd,Gd++;if(zd=Md.charAt(Gd),Hd+=Lf,Lf&&(zd===cd||zd===dd||Wd&&zd===pd))if(Gd++,Hd+=zd,Lf=" ",Zf=zd===pd?fd:zd,gf=Hd,Wd){for(;Gd<eh&&(zd=Md.charAt(Gd),zd!==Zf);)zd===Nd&&(Lf+=Nd,zd=Md.charAt(++Gd)),Gd++,Lf+=zd;if(zd=Md.charAt(Gd),zd!==Zf)return;for($f=Lf,Hd+=Lf+zd,Gd++;Gd<eh&&(zd=Md.charAt(Gd),!!nd(zd));)Hd+=zd,Gd++}else for(bf=" ";Gd<eh;){if(zd=Md.charAt(Gd),zd===Zf)Tf&&(Lf+=Zf+bf,bf=" "),Tf=!0;else if(!Tf)Lf+=zd;else if(zd===fd){Hd+=Lf+Zf+bf,$f=Lf;break}else nd(zd)?bf+=zd:(Lf+=Zf+bf+zd,bf=" ",Tf=!1);Gd++}if(Md.charAt(Gd)===fd)return Bd?!0:(Hd+=fd,zf=jd.decode.raw(jd.unescape(zf),Pd(Sf).test().end,{nonTerminated:!1}),$f&&(gf=Pd(gf).test().end,$f=jd.decode.raw(jd.unescape($f),gf)),yf={type:Mf?" image ":" link ",title:$f||null,url:zf},Mf?yf.alt=jd.decode.raw(jd.unescape(Kf),Jf)||null:(xf=jd.enterLink(),yf.children=jd.tokenizeInline(Kf,Jf),xf()),Pd(Hd)(yf))}}}}),rs=C$1((Ra,qa)=>{var nd=ue$2(),od=dn$2(),ld=Qt$2();qa.exports=Id,Id.locator=od;var ud=" link ",cd=" image ",dd=" shortcut ",pd=" collapsed ",fd=" full ",md=" ! ",vd=" [ ",Ad=" \ \ ",Nd=" ] ";function Id(Od,Fd,Pd){var Md=this,Bd=Md.options.commonmark,jd=Fd.charAt(0),Hd=0,Gd=Fd.length,zd=" ",df=" ",Wd=ud,Jd=dd,Xd,_f,vf,Sf,gf,bf,Tf,Mf;if(jd===md&&(Wd=cd,df=jd,jd=Fd.charAt(++Hd)),jd===vd){for(Hd++,df+=jd,bf=" ",Mf=0;Hd<Gd;){if(jd=Fd.charAt(Hd),jd===vd)Tf=!0,Mf++;else if(jd===Nd){if(!Mf)break;Mf--}jd===Ad&&(bf+=Ad,jd=Fd.charAt(++Hd)),bf+=jd,Hd++}if(zd=bf,Xd=bf,jd=Fd.charAt(Hd),jd===Nd){if(Hd++,zd+=jd,bf=" ",!Bd)for(;Hd<Gd&&(jd=Fd.charAt(Hd),!!nd(jd));)bf+=jd,Hd++;if(jd=Fd.charAt(Hd),jd===vd){for(_f=" ",bf+=jd,Hd++;Hd<Gd&&(jd=Fd.charAt(Hd),!(jd===vd||jd===Nd));)jd===Ad&&(_f+=Ad,jd=Fd.charAt(++Hd)),_f+=jd,Hd++;jd=Fd.charAt(Hd),jd===Nd?(Jd=_f?fd:pd,bf+=_f+jd,Hd++):_f=" ",zd+=bf,bf=" "}else{if(!Xd)return;_f=Xd}if(!(Jd!==fd&&Tf))return zd=df+zd,Wd===ud&&Md.inLink?null:Pd?!0:(vf=Od.now(),vf.column+=df.length,vf.offset+=df.length,_f=Jd===fd?_f:Xd,Sf={type:Wd+" Reference ",identifier:ld(_f),label:_f,referenceType:Jd},Wd===ud?(gf=Md.enterLink(),Sf.children=Md.tokenizeInline(Xd,vf),gf()):Sf.alt=Md.decode.raw(Md.unescape(Xd),vf)||null,Od(zd)(Sf))}}}}),ns=C$1((Ra,qa)=>{qa.exports=nd;function nd(od,ld){var ud=od.indexOf(" * * ",ld),cd=od.indexOf(" _ _ ",ld);return cd===-1?ud:ud===-1||cd<ud?cd:ud}}),os$1=C$1((Ra,qa)=>{var nd=Re$2(),od=ue$2(),ld=ns();qa.exports=pd,pd.locator=ld;var ud=" \ \ ",cd=" * ",dd=" _ ";function pd(fd,md,vd){var Ad=this,Nd=0,Id=md.charAt(Nd),Od,Fd,Pd,Md,Bd,jd,Hd;if(!(Id!==cd&&Id!==dd||md.charAt(++Nd)!==Id)&&(Fd=Ad.options.pedantic,Pd=Id,Bd=Pd+Pd,jd=md.length,Nd++,Md=" ",Id=" ",!(Fd&&od(md.charAt(Nd)))))for(;Nd<jd;){if(Hd=Id,Id=md.charAt(Nd),Id===Pd&&md.charAt(Nd+1)===Pd&&(!Fd||!od(Hd))&&(Id=md.charAt(Nd+2),Id!==Pd))return nd(Md)?vd?!0:(Od=fd.now(),Od.column+=2,Od.offset+=2,fd(Bd+Md+Bd)({type:" strong " , children : Ad . tokenizeInline ( Md , Od ) } ) ) : void
2024-11-28 09:28:59 +08:00
` ,ld);ud>ld&&od.charAt(ud-1)===" ";)ud--;return ud}}),Os $ 1=C $ 1((Ra,qa)=>{var nd=Ts $ 1();qa.exports=cd,cd.locator=nd;var od=" ",ld= `
2024-12-08 09:17:51 +08:00
` ,ud=2;function cd(dd,pd,fd){for(var md=pd.length,vd=-1,Ad="",Nd;++vd<md;){if(Nd=pd.charAt(vd),Nd===ld)return vd<ud?void 0:fd?!0:(Ad+=Nd,dd(Ad)({type:"break"}));if(Nd!==od)return;Ad+=Nd}}}),Ls $ 1=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od,ld,ud){var cd=this,dd,pd,fd,md,vd,Ad,Nd,Id,Od,Fd;if(ud)return!0;for(dd=cd.inlineMethods,md=dd.length,pd=cd.inlineTokenizers,fd=-1,Od=ld.length;++fd<md;)Id=dd[fd],!(Id==="text"||!pd[Id])&&(Nd=pd[Id].locator,Nd||od.file.fail("Missing locator: ` "+Id+" ` "),Ad=Nd.call(cd,ld,1),Ad!==-1&&Ad<Od&&(Od=Ad));vd=ld.slice(0,Od),Fd=od.now(),cd.decode(vd,Fd,Pd);function Pd(Md,Bd,jd){od(jd||Md)({type:"text",value:Md})}}}),Us=C $ 1((Ra,qa)=>{var nd=Ie $ 2(),od=ru $ 2(),ld=nu $ 3(),ud=uu $ 3(),cd=Ou $ 1(),dd=Iu $ 1();qa.exports=pd;function pd(vd,Ad){this.file=Ad,this.offset={},this.options=nd(this.options),this.setOptions({}),this.inList=!1,this.inBlock=!1,this.inLink=!1,this.atStart=!0,this.toOffset=ld(Ad).toOffset,this.unescape=ud(this,"escape"),this.decode=cd(this)}var fd=pd.prototype;fd.setOptions=Vu $ 2(),fd.parse=aa $ 1(),fd.options=Rt $ 3(),fd.exitStart=od("atStart",!0),fd.enterList=od("inList",!1),fd.enterLink=od("inLink",!1),fd.enterBlock=od("inBlock",!1),fd.interruptParagraph=[["thematicBreak"],["list"],["atxHeading"],["fencedCode"],["blockquote"],["html"],["setextHeading",{commonmark:!1}],["definition",{commonmark:!1}]],fd.interruptList=[["atxHeading",{pedantic:!1}],["fencedCode",{pedantic:!1}],["thematicBreak",{pedantic:!1}],["definition",{commonmark:!1}]],fd.interruptBlockquote=[["indentedCode",{commonmark:!0}],["fencedCode",{commonmark:!0}],["atxHeading",{commonmark:!0}],["setextHeading",{commonmark:!0}],["thematicBreak",{commonmark:!0}],["html",{commonmark:!0}],["list",{commonmark:!0}],["definition",{commonmark:!1}]],fd.blockTokenizers={blankLine:sa(),indentedCode:pa(),fencedCode:ma(),blockquote:ba $ 1(),atxHeading:xa $ 1(),thematicBreak:Ba(),list:Ua $ 2(),setextHeading:Ga $ 1(),html:Ka(),definition:io $ 1(),table:oo $ 3(),paragraph:lo $ 2()},fd.inlineTokenizers={escape:Fo $ 1(),autoLink:yo $ 2(),url:Oo(),email:Mo $ 2(),html:Vo $ 1(),link:Qo $ 1(),reference:rs(),strong:os $ 1(),emphasis:ms(),deletion:ys $ 1(),code:Bs $ 1(),break:Os $ 1(),text:Ls $ 1()},fd.blockMethods=md(fd.blockTokenizers),fd.inlineMethods=md(fd.inlineTokenizers),fd.tokenizeBlock=dd("block"),fd.tokenizeInline=dd("inline"),fd.tokenizeFactory=dd;function md(vd){var Ad=[],Nd;for(Nd in vd)Ad.push(Nd);return Ad}}),Gs=C $ 1((Ra,qa)=>{var nd=Zi $ 1(),od=Ie $ 2(),ld=Us();qa.exports=ud,ud.Parser=ld;function ud(cd){var dd=this.data("settings"),pd=nd(ld);pd.prototype.options=od(pd.prototype.options,dd,cd),this.Parser=pd}}),js $ 1=C $ 1((Ra,qa)=>{qa.exports=nd;function nd(od){if(od)throw od}}),yn $ 2=C $ 1((Ra,qa)=>{qa.exports=function(nd){return nd!=null&&nd.constructor!=null&&typeof nd.constructor.isBuffer=="function"&&nd.constructor.isBuffer(nd)}}),rc $ 2=C $ 1((Ra,qa)=>{var nd=Object.prototype.hasOwnProperty,od=Object.prototype.toString,ld=Object.defineProperty,ud=Object.getOwnPropertyDescriptor,cd=function(md){return typeof Array.isArray=="function"?Array.isArray(md):od.call(md)==="[object Array]"},dd=function(md){if(!md||od.call(md)!=="[object Object]")return!1;var vd=nd.call(md,"constructor"),Ad=md.constructor&&md.constructor.prototype&&nd.call(md.constructor.prototype,"isPrototypeOf");if(md.constructor&&!vd&&!Ad)return!1;var Nd;for(Nd in md);return typeof Nd>"u"||nd.call(md,Nd)},pd=function(md,vd){ld&&vd.name==="__proto__"?ld(md,vd.name,{enumerable:!0,configurable:!0,value:vd.newValue,writable:!0}):md[vd.name]=vd.newValue},fd=function(md,vd){if(vd==="__proto__")if(nd.call(md,vd)){if(ud)return ud(md,vd).value}else return;return md[vd]};qa.exports=function md(){var vd,Ad,Nd,Id,Od,Fd,Pd=arguments[0],Md=1,Bd=arguments.length,jd=!1;for(typeof Pd=="boolean"&&(jd=Pd,Pd=arguments[1]||{},Md=2),(Pd==null||typeof Pd!="object"&&typeof Pd!="function")&&(Pd={});Md<Bd;++Md)if(vd=arguments[Md],vd!=null)for(Ad in vd)Nd=fd(Pd,Ad),Id=fd(vd,Ad),Pd!==Id&&(jd&&Id&&(dd(Id)||(Od=cd(Id)))?(Od?(Od=!1,Fd=Nd&&cd(Nd)?Nd:[]):Fd=Nd&&dd(Nd)?Nd:{},pd(Pd,{name:Ad,newValue:md(jd,Fd,Id)})):typeof Id<"u"&&pd(Pd,{name:Ad,newValue:Id}))
2024-11-28 09:28:59 +08:00
Expected it to be 'string' or 'object' . ` ;if(Y $ 2(Ra))throw new Error("doc is valid.");let nd=Object.prototype.toString.call(Ra);if(nd!=="[object Object]")return ` Unexpected doc '${nd}' . ` ;let od=ll $ 1([...wr $ 1].map(ld=> ` '${ld}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { od } . ` }var Dt $ 3=class extends Error{constructor(nd){super(fl $ 1(nd));Km(this,"name","InvalidDocError");this.doc=nd}},qe $ 3=Dt $ 3,Nn $ 2={};function Dl $ 2(Ra,qa,nd,od){let ld=[Ra];for(;ld.length>0;){let ud=ld.pop();if(ud===Nn $ 2){nd(ld.pop());continue}nd&&ld.push(ud,Nn $ 2);let cd=Y $ 2(ud);if(!cd)throw new qe $ 3(ud);if((qa==null?void 0:qa(ud))!==!1)switch(cd){case H $ 2:case J $ 3:{let dd=cd===H $ 2?ud:ud.parts;for(let pd=dd.length,fd=pd-1;fd>=0;--fd)ld.push(dd[fd]);break}case X $ 3:ld.push(ud.flatContents,ud.breakContents);break;case K $ 2:if(od&&ud.expandedStates)for(let dd=ud.expandedStates.length,pd=dd-1;pd>=0;--pd)ld.push(ud.expandedStates[pd]);else ld.push(ud.contents);break;case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:ld.push(ud.contents);break;case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:break;default:throw new qe $ 3(ud)}}}var Rn $ 1=Dl $ 2,Un $ 2=()=>{},kr $ 1=Un $ 2;function Ze $ 2(Ra){return{type:ee $ 2,contents:Ra}}function ve $ 2(Ra,qa){return{type:re $ 2,contents:qa,n:Ra}}function ze $ 2(Ra,qa={}){return kr $ 1(qa.expandedStates),{type:K $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function _e $ 2(Ra){return ve $ 2({type:"root"},Ra)}function Ee $ 2(Ra){return{type:J $ 3,parts:Ra}}function zn $ 2(Ra,qa="",nd={}){return{type:X $ 3,breakContents:Ra,flatContents:qa,groupId:nd.groupId}}var er $ 1={type:te $ 2},rr $ 1={type:W $ 3,hard:!0},pl $ 1={type:W $ 3,hard:!0,literal:!0},Br $ 2={type:W $ 3},qr $ 1={type:W $ 3,soft:!0},L $ 3=[rr $ 1,er $ 1],tr $ 1=[pl $ 1,er $ 1];function Tr $ 1(Ra,qa){let nd=[];for(let od=0;od<qa.length;od++)od!==0&&nd.push(Ra),nd.push(qa[od]);return nd}function dl $ 1(Ra,qa){if(typeof Ra=="string")return qa(Ra);let nd=new Map;return od(Ra);function od(ud){if(nd.has(ud))return nd.get(ud);let cd=ld(ud);return nd.set(ud,cd),cd}function ld(ud){switch(Y $ 2(ud)){case H $ 2:return qa(ud.map(od));case J $ 3:return qa({...ud,parts:ud.parts.map(od)});case X $ 3:return qa({...ud,breakContents:od(ud.breakContents),flatContents:od(ud.flatContents)});case K $ 2:{let{expandedStates:cd,contents:dd}=ud;return cd?(cd=cd.map(od),dd=cd[0]):dd=od(dd),qa({...ud,contents:dd,expandedStates:cd})}case re $ 2:case ee $ 2:case se $ 1:case fe $ 2:case ce $ 2:return qa({...ud,contents:od(ud.contents)});case $ $ 1:case ge $ 2:case oe $ 2:case le $ 2:case W $ 3:case te $ 2:return qa(ud);default:throw new qe $ 3(ud)}}}function Mn $ 1(Ra){if(Ra.length>0){let qa=M $ 3(!1,Ra,-1);!qa.expandedStates&&!qa.break&&(qa.break="propagated")}return null}function Yn $ 2(Ra){let qa=new Set,nd=[];function od(ud){if(ud.type===te $ 2&&Mn $ 1(nd),ud.type===K $ 2){if(nd.push(ud),qa.has(ud))return!1;qa.add(ud)}}function ld(ud){ud.type===K $ 2&&nd.pop().break&&Mn $ 1(nd)}Rn $ 1(Ra,od,ld,!0)}function Ce $ 1(Ra,qa=tr $ 1){return dl $ 1(Ra,nd=>typeof nd=="string"?Tr $ 1(qa,nd.split( `
` )):nd)}function hl $ 1(Ra,qa){let nd=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));return nd===null?0:nd.reduce((od,ld)=>Math.max(od,ld.length/qa.length),0)}var _r $ 1=hl $ 1;function ml $ 1(Ra,qa){let nd=Ra.match(new RegExp( ` ( $ { Be$2 ( qa ) } ) + ` ,"gu"));if(nd===null)return 0;let od=new Map,ld=0;for(let ud of nd){let cd=ud.length/qa.length;od.set(cd,!0),cd>ld&&(ld=cd)}for(let ud=1;ud<ld;ud++)if(!od.get(ud))return ud;return ld+1}var Gn $ 3=ml $ 1,Sr $ 1="'",Vn $ 2='"';function Fl $ 1(Ra,qa){let nd=qa===!0||qa===Sr $ 1?Sr $ 1:Vn $ 2,od=nd===Sr $ 1?Vn $ 2:Sr $ 1,ld=0,ud=0;for(let cd of Ra)cd===nd?ld++:cd===od&&ud++;return ld>ud?od:nd}var jn $ 2=Fl $ 1,pt $ 2=class extends Error{constructor(nd,od,ld="type"){super( ` Unexpected $ { od } node $ { ld } : $ { JSON . stringify ( nd [ ld ] ) } . ` );Km(this,"name","UnexpectedNodeError");this.node=nd}}, $ n $ 3=pt $ 2,Xn $ 3=Ue $ 2(xr $ 1());function gl $ 1(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var Hn $ 1=gl $ 1,nr $ 1=3;function vl $ 1(Ra){let qa=Ra.slice(0,nr $ 1);if(qa!=="---"&&qa!=="+++")return;let nd=Ra.indexOf( `
` ,nr $ 1);if(nd===-1)return;let od=Ra.slice(nr $ 1,nd).trim(),ld=Ra.indexOf( `
$ { qa } ` ,nd),ud=od;if(ud||(ud=qa==="+++"?"toml":"yaml"),ld===-1&&qa==="---"&&ud==="yaml"&&(ld=Ra.indexOf( `
... ` ,nd)),ld===-1)return;let cd=ld+1+nr $ 1,dd=Ra.charAt(cd+1);if(!/ \s ?/u.test(dd))return;let pd=Ra.slice(0,cd);return{type:"front-matter",language:ud,explicitLanguage:od,value:Ra.slice(nd+1,ld),startDelimiter:qa,endDelimiter:pd.slice(-nr $ 1),raw:pd}}function El $ 2(Ra){let qa=vl $ 1(Ra);if(!qa)return{content:Ra};let{raw:nd}=qa;return{frontMatter:qa,content:N $ 3(!1,nd,/[^ \n ]/gu," ")+Ra.slice(nd.length)}}var ir $ 2=El $ 2,Wn $ 1=["format","prettier"];function dt $ 1(Ra){let qa= ` @ ( $ { Wn$1 . join ( "|" ) } ) ` ,nd=new RegExp([ ` <!-- \ \ s * $ { qa } \ \ s * -- > ` , ` \ \ { \ \ s * \ \ / \ \ * \ \ s * $ { qa } \ \ s * \ \ * \ \ / \ \ s * \ \ } ` , ` <!-- . * \ r ?
2024-09-18 09:46:23 +08:00
[ \ \ s \ \ S ] * ( ^ |
) [ ^ \ \ S
] * $ { qa } [ ^ \ \ S
] * ( $ |
) [ \ \ s \ \ S ] *
2024-11-28 09:28:59 +08:00
. * -- > ` ].join("|"),"mu"),od=Ra.match(nd);return(od==null?void 0:od.index)===0}var Kn $ 2=Ra=>dt $ 1(ir $ 2(Ra).content.trimStart()),Jn $ 3=Ra=>{let qa=ir $ 2(Ra),nd= ` <!-- @ $ { Wn$1 [ 0 ] } -- > ` ;return qa.frontMatter? ` $ { qa . frontMatter . raw }
2024-09-18 09:46:23 +08:00
2024-11-28 09:28:59 +08:00
$ { nd }
2024-09-18 09:46:23 +08:00
2024-11-28 09:28:59 +08:00
$ { qa . content } ` : ` $ { nd }
2024-09-18 09:46:23 +08:00
2024-11-28 09:28:59 +08:00
$ { qa . content } ` },Cl $ 1=new Set(["position","raw"]);function Qn $ 3(Ra,qa,nd){if((Ra.type==="front-matter"||Ra.type==="code"||Ra.type==="yaml"||Ra.type==="import"||Ra.type==="export"||Ra.type==="jsx")&&delete qa.value,Ra.type==="list"&&delete qa.isAligned,(Ra.type==="list"||Ra.type==="listItem")&&delete qa.spread,Ra.type==="text")return null;if(Ra.type==="inlineCode"&&(qa.value=N $ 3(!1,Ra.value, `
` ," ")),Ra.type==="wikiLink"&&(qa.value=N $ 3(!1,Ra.value.trim(),/[ \t \n ]+/gu," ")),(Ra.type==="definition"||Ra.type==="linkReference"||Ra.type==="imageReference")&&(qa.label=(0,Xn $ 3.default)(Ra.label)),(Ra.type==="link"||Ra.type==="image")&&Ra.url&&Ra.url.includes("("))for(let od of"<>")qa.url=N $ 3(!1,Ra.url,od,encodeURIComponent(od));if((Ra.type==="definition"||Ra.type==="link"||Ra.type==="image")&&Ra.title&&(qa.title=N $ 3(!1,Ra.title,/ \\ (?=["')])/gu,"")),(nd==null?void 0:nd.type)==="root"&&nd.children.length>0&&(nd.children[0]===Ra||Hn $ 1(nd.children[0])&&nd.children[1]===Ra)&&Ra.type==="html"&&dt $ 1(Ra.value))return null}Qn $ 3.ignoredProperties=Cl $ 1;var Zn $ 2=Qn $ 3,ei $ 3=/(?:[ \u 02ea- \u 02eb \u 1100- \u 11ff \u 2e80- \u 2e99 \u 2e9b- \u 2ef3 \u 2f00- \u 2fd5 \u 2ff0- \u 303f \u 3041- \u 3096 \u 3099- \u 309f \u 30a1- \u 30fa \u 30fc- \u 30ff \u 3105- \u 312f \u 3131- \u 318e \u 3190- \u 4dbf \u 4e00- \u 9fff \u a700- \u a707 \u a960- \u a97c \u ac00- \u d7a3 \u d7b0- \u d7c6 \u d7cb- \u d7fb \u f900- \u fa6d \u fa70- \u fad9 \u fe10- \u fe1f \u fe30- \u fe6f \u ff00- \u ffef]|[ \u d840- \u d868 \u d86a- \u d86c \u d86f- \u d872 \u d874- \u d879 \u d880- \u d883 \u d885- \u d887][ \u dc00- \u dfff]| \u d81b[ \u dfe3]| \u d82b[ \u dff0- \u dff3 \u dff5- \u dffb \u dffd- \u dffe]| \u d82c[ \u dc00- \u dd22 \u dd32 \u dd50- \u dd52 \u dd55 \u dd64- \u dd67]| \u d83c[ \u de00 \u de50- \u de51]| \u d869[ \u dc00- \u dedf \u df00- \u dfff]| \u d86d[ \u dc00- \u df39 \u df40- \u dfff]| \u d86e[ \u dc00- \u dc1d \u dc20- \u dfff]| \u d873[ \u dc00- \u dea1 \u deb0- \u dfff]| \u d87a[ \u dc00- \u dfe0]| \u d87e[ \u dc00- \u de1d]| \u d884[ \u dc00- \u df4a \u df50- \u dfff]| \u d888[ \u dc00- \u dfaf])(?:[ \u fe00- \u fe0f]| \u db40[ \u dd00- \u ddef])?/u,Se $ 2=new RegExp("(?:[ \\ u0021- \\ u002f \\ u003a- \\ u0040 \\ u005b- \\ u0060 \\ u007b- \\ u007e]| \\ p{General_Category=Connector_Punctuation}| \\ p{General_Category=Dash_Punctuation}| \\ p{General_Category=Close_Punctuation}| \\ p{General_Category=Final_Punctuation}| \\ p{General_Category=Initial_Punctuation}| \\ p{General_Category=Other_Punctuation}| \\ p{General_Category=Open_Punctuation})","u");async function bl $ 1(Ra,qa){if(Ra.language==="yaml"){let nd=Ra.value.trim(),od=nd?await qa(nd,{parser:"yaml"}):"";return _e $ 2([Ra.startDelimiter,Ra.explicitLanguage,L $ 3,od,od?L $ 3:"",Ra.endDelimiter])}}var ri $ 2=bl $ 1,yl $ 1=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function ti $ 2(Ra,qa){if(!qa)return;let nd=yl $ 1(qa).toLowerCase();return Ra.find(({filenames:od})=>od==null?void 0:od.some(ld=>ld.toLowerCase()===nd))??Ra.find(({extensions:od})=>od==null?void 0:od.some(ld=>nd.endsWith(ld)))}function Al $ 2(Ra,qa){if(qa)return Ra.find(({name:nd})=>nd.toLowerCase()===qa)??Ra.find(({aliases:nd})=>nd==null?void 0:nd.includes(qa))??Ra.find(({extensions:nd})=>nd==null?void 0:nd.includes( ` . $ { qa } ` ))}function xl $ 2(Ra,qa){let nd=Ra.plugins.flatMap(ld=>ld.languages??[]),od=Al $ 2(nd,qa.language)??ti $ 2(nd,qa.physicalFile)??ti $ 2(nd,qa.file)??(qa.physicalFile,void 0);return od==null?void 0:od.parsers[0]}var ni $ 2=xl $ 2,wl $ 1=new Proxy(()=>{},{get:()=>wl $ 1});function Oe $ 2(Ra){return Ra.position.start.offset}function Pe $ 2(Ra){return Ra.position.end.offset}var ht $ 2=new Set(["liquidNode","inlineCode","emphasis","esComment","strong","delete","wikiLink","link","linkReference","image","imageReference","footnote","footnoteReference","sentence","whitespace","word","break","inlineMath"]),Or $ 1=new Set([...ht $ 2,"tableCell","paragraph","heading"]),Le $ 2="non-cjk",De $ 1="cj-letter",be $ 3="k-letter",ur $ 1="cjk-punctuation",kl $ 2=new RegExp(" \\ p{Script_Extensions=Hangul}","u");function Pr $ 1(Ra){let qa=[],nd=Ra.split(/([ \t \n ]+)/u);for(let[ld,ud]of nd.entries()){if(ld%2===1){qa.push({type:"whitespace",value:/ \n /u.test(ud)? `
` :" "});continue}if((ld===0||ld===nd.length-1)&&ud==="")continue;let cd=ud.split(new RegExp( ` ( $ { ei$3 . source } ) ` ,"u"));for(let[dd,pd]of cd.entries())if(!((dd===0||dd===cd.length-1)&&pd==="")){if(dd%2===0){pd!==""&&od({type:"word",value:pd,kind:Le $ 2,hasLeadingPunctuation:Se $ 2.test(pd[0]),hasTrailingPunctuation:Se $ 2.test(M $ 3(!1,pd,-1))});continue}od(Se $ 2.test(pd)?{type:"word",value:pd,kind:ur $ 1,hasLeadingPunctuation:!0,hasTrailingPunctuation:!0}:{type:"word",value:pd,kind:kl $ 2.test(pd)?be $ 3:De $ 1,hasLeadingPunctuation:!1,hasTrailingPunctuation:!1})}}return qa;function od(ld){let ud=M $ 3(!1,qa,-1);(ud==null?void 0:ud.type)==="word"&&!cd(Le $ 2,ur $ 1)&&![ud.value,ld.value].some(dd=>/ \u 3000/u.test(dd))&&qa.push({type:"whitespace",value:""}),qa.push(ld);function cd(dd,pd){return ud.kind===dd&&ld.kind===pd||ud.kind===pd&&ld.kind===dd}}}function Me $ 3(Ra,qa){let nd=qa.originalText.slice(Ra.position.start.offset,Ra.position.end.offset),{numberText:od,leadingSpaces:ld}=nd.match(/^ \s *(?<numberText> \d +)( \. | \) )(?<leadingSpaces> \s *)/u).groups;return{number:Number(od),leadingSpaces:ld}}function ii $ 3(Ra,qa){return!Ra.ordered||Ra.children.length<2||Me $ 3(Ra.children[1],qa).number!==1?!1:Me $ 3(Ra.children[0],qa).number!==0?!0:Ra.children.length>2&&Me $ 3(Ra.children[2],qa).number===1}function Lr $ 1(Ra,qa){let{value:nd}=Ra;return Ra.position.end.offset===qa.length&&nd.endsWith( `
2024-09-18 09:46:23 +08:00
` )&&qa.endsWith( `
2024-11-28 09:28:59 +08:00
` )?nd.slice(0,-1):nd}function ye $ 1(Ra,qa){return function nd(od,ld,ud){let cd={...qa(od,ld,ud)};return cd.children&&(cd.children=cd.children.map((dd,pd)=>nd(dd,pd,[cd,...ud]))),cd}(Ra,null,[])}function mt $ 1(Ra){if((Ra==null?void 0:Ra.type)!=="link"||Ra.children.length!==1)return!1;let[qa]=Ra.children;return Oe $ 2(Ra)===Oe $ 2(qa)&&Pe $ 2(Ra)===Pe $ 2(qa)}function Bl $ 1(Ra,qa){let{node:nd}=Ra;if(nd.type==="code"&&nd.lang!==null){let od=ni $ 2(qa,{language:nd.lang});if(od)return async ld=>{let ud=qa.__inJsTemplate?"~":" ` ",cd=ud.repeat(Math.max(3,_r$1(nd.value,ud)+1)),dd={parser:od};nd.lang===" ts "||nd.lang===" typescript "?dd.filepath=" dummy . ts ":nd.lang===" tsx "&&(dd.filepath=" dummy . tsx ");let pd=await ld(Lr$1(nd,qa.originalText),dd);return _e$2([cd,nd.lang,nd.meta?" "+nd.meta:" ",L$3,Ce$1(pd),L$3,cd])}}switch(nd.type){case" front - matter ":return od=>ri$2(nd,od);case" import ":case" export ":return od=>od(nd.value,{parser:" babel "});case" jsx ":return od=>od(`<$>${nd.value}</$>`,{parser:" _ _js _expression ",rootMarker:" mdx "})}return null}var ui$3=Bl$1,ar$1=null;function or$1(Ra){if(ar$1!==null&&typeof ar$1.property){let qa=ar$1;return ar$1=or$1.prototype=null,qa}return ar$1=or$1.prototype=Ra??Object.create(null),new or$1}var ql$1=10;for(let Ra=0;Ra<=ql$1;Ra++)or$1();function Ft$3(Ra){return or$1(Ra)}function Tl$1(Ra,qa=" type "){Ft$3(Ra);function nd(od){let ld=od[qa],ud=Ra[ld];if(!Array.isArray(ud))throw Object.assign(new Error(`Missing visitor keys for '${ld}'.`),{node:od});return ud}return nd}var ai$3=Tl$1,_l$1={" front - matter ":[],root:[" children "],paragraph:[" children "],sentence:[" children "],word:[],whitespace:[],emphasis:[" children "],strong:[" children "],delete:[" children "],inlineCode:[],wikiLink:[],link:[" children "],image:[],blockquote:[" children "],heading:[" children "],code:[],html:[],list:[" children "],thematicBreak:[],linkReference:[" children "],imageReference:[],definition:[],footnote:[" children "],footnoteReference:[],footnoteDefinition:[" children "],table:[" children "],tableCell:[" children "],break:[],liquidNode:[],import:[],export:[],esComment:[],jsx:[],math:[],inlineMath:[],tableRow:[" children "],listItem:[" children "],text:[]},oi$3=_l$1,Sl$1=ai$3(oi$3),si$3=Sl$1;function ci$3(Ra){switch(Ra){case" cr ":return" \ r ";case" crlf " : return ` \r
2024-09-18 09:46:23 +08:00
` ;default:return `
2024-11-28 09:28:59 +08:00
` }}var li $ 3=()=>/[#*0-9] \u FE0F? \u 20E3|[ \x A9 \x AE \u 203C \u 2049 \u 2122 \u 2139 \u 2194- \u 2199 \u 21A9 \u 21AA \u 231A \u 231B \u 2328 \u 23CF \u 23ED- \u 23EF \u 23F1 \u 23F2 \u 23F8- \u 23FA \u 24C2 \u 25AA \u 25AB \u 25B6 \u 25C0 \u 25FB \u 25FC \u 25FE \u 2600- \u 2604 \u 260E \u 2611 \u 2614 \u 2615 \u 2618 \u 2620 \u 2622 \u 2623 \u 2626 \u 262A \u 262E \u 262F \u 2638- \u 263A \u 2640 \u 2642 \u 2648- \u 2653 \u 265F \u 2660 \u 2663 \u 2665 \u 2666 \u 2668 \u 267B \u 267E \u 267F \u 2692 \u 2694- \u 2697 \u 2699 \u 269B \u 269C \u 26A0 \u 26A7 \u 26AA \u 26B0 \u 26B1 \u 26BD \u 26BE \u 26C4 \u 26C8 \u 26CF \u 26D1 \u 26E9 \u 26F0- \u 26F5 \u 26F7 \u 26F8 \u 26FA \u 2702 \u 2708 \u 2709 \u 270F \u 2712 \u 2714 \u 2716 \u 271D \u 2721 \u 2733 \u 2734 \u 2744 \u 2747 \u 2757 \u 2763 \u 27A1 \u 2934 \u 2935 \u 2B05- \u 2B07 \u 2B1B \u 2B1C \u 2B55 \u 3030 \u 303D \u 3297 \u 3299] \u FE0F?|[ \u 261D \u 270C \u 270D](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?|[ \u 270A \u 270B](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u 23E9- \u 23EC \u 23F0 \u 23F3 \u 25FD \u 2693 \u 26A1 \u 26AB \u 26C5 \u 26CE \u 26D4 \u 26EA \u 26FD \u 2705 \u 2728 \u 274C \u 274E \u 2753- \u 2755 \u 2795- \u 2797 \u 27B0 \u 27BF \u 2B50]| \u 26D3 \u FE0F?(?: \u 200D \u D83D \u DCA5)?| \u 26F9(?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?| \u 2764 \u FE0F?(?: \u 200D(?: \u D83D \u DD25| \u D83E \u DE79))?| \u D83C(?:[ \u DC04 \u DD70 \u DD71 \u DD7E \u DD7F \u DE02 \u DE37 \u DF21 \u DF24- \u DF2C \u DF36 \u DF7D \u DF96 \u DF97 \u DF99- \u DF9B \u DF9E \u DF9F \u DFCD \u DFCE \u DFD4- \u DFDF \u DFF5 \u DFF7] \u FE0F?|[ \u DF85 \u DFC2 \u DFC7](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DFC4 \u DFCA](?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DFCB \u DFCC](?: \u FE0F| \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D[ \u 2640 \u 2642] \u FE0F?)?|[ \u DCCF \u DD8E \u DD91- \u DD9A \u DE01 \u DE1A \u DE2F \u DE32- \u DE36 \u DE38- \u DE3A \u DE50 \u DE51 \u DF00- \u DF20 \u DF2D- \u DF35 \u DF37- \u DF43 \u DF45- \u DF4A \u DF4C- \u DF7C \u DF7E- \u DF84 \u DF86- \u DF93 \u DFA0- \u DFC1 \u DFC5 \u DFC6 \u DFC8 \u DFC9 \u DFCF- \u DFD3 \u DFE0- \u DFF0 \u DFF8- \u DFFF]| \u DDE6 \u D83C[ \u DDE8- \u DDEC \u DDEE \u DDF1 \u DDF2 \u DDF4 \u DDF6- \u DDFA \u DDFC \u DDFD \u DDFF]| \u DDE7 \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEF \u DDF1- \u DDF4 \u DDF6- \u DDF9 \u DDFB \u DDFC \u DDFE \u DDFF]| \u DDE8 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDEE \u DDF0- \u DDF5 \u DDF7 \u DDFA- \u DDFF]| \u DDE9 \u D83C[ \u DDEA \u DDEC \u DDEF \u DDF0 \u DDF2 \u DDF4 \u DDFF]| \u DDEA \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDED \u DDF7- \u DDFA]| \u DDEB \u D83C[ \u DDEE- \u DDF0 \u DDF2 \u DDF4 \u DDF7]| \u DDEC \u D83C[ \u DDE6 \u DDE7 \u DDE9- \u DDEE \u DDF1- \u DDF3 \u DDF5- \u DDFA \u DDFC \u DDFE]| \u DDED \u D83C[ \u DDF0 \u DDF2 \u DDF3 \u DDF7 \u DDF9 \u DDFA]| \u DDEE \u D83C[ \u DDE8- \u DDEA \u DDF1- \u DDF4 \u DDF6- \u DDF9]| \u DDEF \u D83C[ \u DDEA \u DDF2 \u DDF4 \u DDF5]| \u DDF0 \u D83C[ \u DDEA \u DDEC- \u DDEE \u DDF2 \u DDF3 \u DDF5 \u DDF7 \u DDFC \u DDFE \u DDFF]| \u DDF1 \u D83C[ \u DDE6- \u DDE8 \u DDEE \u DDF0 \u DDF7- \u DDFB \u DDFE]| \u DDF2 \u D83C[ \u DDE6 \u DDE8- \u DDED \u DDF0- \u DDFF]| \u DDF3 \u D83C[ \u DDE6 \u DDE8 \u DDEA- \u DDEC \u DDEE \u DDF1 \u DDF4 \u DDF5 \u DDF7 \u DDFA \u DDFF]| \u DDF4 \u D83C \u DDF2| \u DDF5 \u D83C[ \u DDE6 \u DDEA- \u DDED \u DDF0- \u DDF3 \u DDF7- \u DDF9 \u DDFC \u DDFE]| \u DDF6 \u D83C \u DDE6| \u DDF7 \u D83C[ \u DDEA \u DDF4 \u DDF8 \u DDFA \u DDFC]| \u DDF8 \u D83C[ \u DDE6- \u DDEA \u DDEC- \u DDF4 \u DDF7- \u DDF9 \u DDFB \u DDFD- \u DDFF]| \u DDF9 \u D83C[ \u DDE6 \u DDE8 \u DDE9 \u DDEB- \u DDED \u DDEF- \u DDF4 \u DDF7 \u DDF9 \u DDFB \u DDFC \u DDFF]| \u DDFA \u D83C[ \u DDE6 \u DDEC \u DDF2 \u DDF3 \u DDF8 \u DDFE \u DDFF]| \u DDFB \u D83C[ \u DDE6 \u DDE8 \u DDEA \u DDEC \u DDEE \u DDF3 \u DDFA]| \u DDFC \u D83C[ \u DDEB \u DDF8]| \u DDFD \u D83C \u DDF0| \u DDFE \u D83C[ \u DDEA \u DDF9]| \u DDFF \u D83C[ \u DDE6 \u DDF2 \u DDFC]| \u DF44(?: \u 200D \u D83D \u DFEB)?| \u DF4B(?: \u 200D \u D83D \u DFE9)?| \u DFC3(?: \u D83C[ \u DFFB- \u DFFF])?(?: \u 200D(?:[ \u 2640 \u 2642] \u FE0F?(?: \u 200D \u 27A1 \u FE0F?)?| \u 27A1 \u FE0F?))?| \u DFF3 \u FE0F?(?: \u 200D(?: \u 26A7 \u FE0F?| \u D83C \u DF08))?| \u DFF4(?: \u 200D \u 2620 \u FE0F?| \u DB40 \u DC67 \u DB40 \u DC62 \u DB40(?: \u DC65 \u DB40 \u DC6E \u DB40 \u DC67| \u DC73 \u DB40 \u DC63 \u DB40 \u DC74| \u DC77 \u DB40 \u DC6C \u DB40 \u DC73) \u DB40 \u DC7F)?)| \u D83D(?:[ \u DC3F \u DCFD \u DD49 \u DD4A \u DD6F \u DD70 \u DD73 \u DD76- \u DD79 \u DD87 \u DD8A- \u DD8D \u DDA5 \u DDA8 \u DDB1 \u DDB2 \u DDBC \u DDC2- \u DDC4 \u DDD1- \u DDD3 \u DDDC- \u DDDE \u DDE1 \u DDE3 \u DDE8 \u DDEF \u DDF3 \u DDFA \u DECB \u DECD- \u DECF \u DEE0- \u DEE5 \u DEE9 \u DEF0 \u DEF3] \u FE0F?|[ \u DC42 \u DC43 \u DC46- \u DC50 \u DC66 \u DC67 \u DC6B- \u DC6D \u DC72 \u DC74- \u DC76 \u DC78 \u DC7C \u DC83 \u DC85 \u DC8F \u DC91 \u DCAA \u DD7A \u DD95 \u DD96 \u DE4C \u DE4F \u DEC0 \u DECC](?: \u D83C[ \u DFFB- \u DFFF])?|[ \u DC6E \u DC70 \u DC71 \u DC73 \u DC77 \u DC81 \u DC82 \u DC86 \u DC87 \u DE45- \u DE47 \u DE4B \u DE4D \u DE4E \u DEA3 \u DEB4 \u DEB5](?: \u D83C[ \u
` ?N $ 3(!1,Id, `
` ,ld):Id;dd.push(Od),cd.length>0&&(ud+=sr $ 1(Od));break}case H $ 2:for(let Od=Id.length-1;Od>=0;Od--)cd.push({ind:Ad,mode:Nd,doc:Id[Od]});break;case ge $ 2:if(md>=2)throw new Error("There are too many 'cursor' in doc.");dd.push(cr $ 1),md++;break;case ee $ 2:cd.push({ind:Ll $ 1(Ad,qa),mode:Nd,doc:Id.contents});break;case re $ 2:cd.push({ind:Il $ 1(Ad,Id.n,qa),mode:Nd,doc:Id.contents});break;case oe $ 2:ud-=vt $ 1(dd);break;case K $ 2:switch(Nd){case ne $ 2:if(!pd){cd.push({ind:Ad,mode:Id.break?G $ 3:ne $ 2,doc:Id.contents});break}case G $ 3:{pd=!1;let Od={ind:Ad,mode:ne $ 2,doc:Id.contents},Fd=od-ud,Pd=fd.length>0;if(!Id.break&&Ir $ 1(Od,cd,Fd,Pd,nd))cd.push(Od);else if(Id.expandedStates){let Md=M $ 3(!1,Id.expandedStates,-1);if(Id.break){cd.push({ind:Ad,mode:G $ 3,doc:Md});break}else for(let Bd=1;Bd<Id.expandedStates.length+1;Bd++)if(Bd>=Id.expandedStates.length){cd.push({ind:Ad,mode:G $ 3,doc:Md});break}else{let jd=Id.expandedStates[Bd],Hd={ind:Ad,mode:ne $ 2,doc:jd};if(Ir $ 1(Hd,cd,Fd,Pd,nd)){cd.push(Hd);break}}}else cd.push({ind:Ad,mode:G $ 3,doc:Id.contents});break}}Id.id&&(nd[Id.id]=M $ 3(!1,cd,-1).mode);break;case J $ 3:{let Od=od-ud,{parts:Fd}=Id;if(Fd.length===0)break;let[Pd,Md]=Fd,Bd={ind:Ad,mode:ne $ 2,doc:Pd},jd={ind:Ad,mode:G $ 3,doc:Pd},Hd=Ir $ 1(Bd,[],Od,fd.length>0,nd,!0);if(Fd.length===1){Hd?cd.push(Bd):cd.push(jd);break}let Gd={ind:Ad,mode:ne $ 2,doc:Md},zd={ind:Ad,mode:G $ 3,doc:Md};if(Fd.length===2){Hd?cd.push(Gd,Bd):cd.push(zd,jd);break}Fd.splice(0,2);let df={ind:Ad,mode:Nd,doc:Ee $ 2(Fd)},Wd=Fd[0];Ir $ 1({ind:Ad,mode:ne $ 2,doc:[Pd,Md,Wd]},[],Od,fd.length>0,nd,!0)?cd.push(df,Gd,Bd):Hd?cd.push(df,zd,Bd):cd.push(df,zd,jd);break}case X $ 3:case se $ 1:{let Od=Id.groupId?nd[Id.groupId]:Nd;if(Od===G $ 3){let Fd=Id.type===X $ 3?Id.breakContents:Id.negate?Id.contents:Ze $ 2(Id.contents);Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}if(Od===ne $ 2){let Fd=Id.type===X $ 3?Id.flatContents:Id.negate?Ze $ 2(Id.contents):Id.contents;Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}break}case ce $ 2:fd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case le $ 2:fd.length>0&&cd.push({ind:Ad,mode:Nd,doc:rr $ 1});break;case W $ 3:switch(Nd){case ne $ 2:if(Id.hard)pd=!0;else{Id.soft||(dd.push(" "),ud+=1);break}case G $ 3:if(fd.length>0){cd.push({ind:Ad,mode:Nd,doc:Id},...fd.reverse()),fd.length=0;break}Id.literal?Ad.root?(dd.push(ld,Ad.root.value),ud=Ad.root.length):(dd.push(ld),ud=0):(ud-=vt $ 1(dd),dd.push(ld+Ad.value),ud=Ad.length);break}break;case fe $ 2:cd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case te $ 2:break;default:throw new qe $ 3(Id)}cd.length===0&&fd.length>0&&(cd.push(...fd.reverse()),fd.length=0)}let vd=dd.indexOf(cr $ 1);if(vd!==-1){let Ad=dd.indexOf(cr $ 1,vd+1),Nd=dd.slice(0,vd).join(""),Id=dd.slice(vd+1,Ad).join(""),Od=dd.slice(Ad+1).join("");return{formatted:Nd+Id+Od,cursorNodeStart:Nd.length,cursorNodeText:Id}}return{formatted:dd.join("")}}function mi $ 1(Ra,qa,nd){let{node:od}=Ra,ld=[],ud=Ra.map(()=>Ra.map(({index:vd})=>{let Ad=hi $ 1(nd(),qa).formatted,Nd=sr $ 1(Ad);return ld[vd]=Math.max(ld[vd]??3,Nd),{text:Ad,width:Nd}},"children"),"children"),cd=pd(!1);if(qa.proseWrap!=="never")return[er $ 1,cd];let dd=pd(!0);return[er $ 1,ze $ 2(zn $ 2(dd,cd))];function pd(vd){return Tr $ 1(rr $ 1,[md(ud[0],vd),fd(vd),...ud.slice(1).map(Ad=>md(Ad,vd))].map(Ad=> ` | $ { Ad . join ( " | " ) } | ` ))}function fd(vd){return ld.map((Ad,Nd)=>{let Id=od.align[Nd],Od=Id==="center"||Id==="left"?":":"-",Fd=Id==="center"||Id==="right"?":":"-",Pd=vd?"-":"-".repeat(Ad-2);return ` $ { Od } $ { Pd } $ { Fd } ` })}function md(vd,Ad){return vd.map(({text:Nd,width:Id},Od)=>{if(Ad)return Nd;let Fd=ld[Od]-Id,Pd=od.align[Od],Md=0;Pd==="right"?Md=Fd:Pd==="center"&&(Md=Math.floor(Fd/2));let Bd=Fd-Md;return ` $ { " " . repeat ( Md ) } $ { Nd } $ { " " . repeat ( Bd ) } ` })}}function Fi $ 1(Ra,qa,nd){let od=Ra.map(nd,"children");return Nl $ 1(od)}function Nl $ 1(Ra){let qa=[""];return function nd(od){for(let ld of od){let ud=Y $ 2(ld);if(ud===H $ 2){nd(ld);continue}let cd=ld,dd=[];ud===J $ 3&&([cd,...dd]=ld.parts),qa.push([qa.pop(),cd],...dd)}}(Ra),Ee $ 2(qa)}var Rl $ 2=/^. $ /su;function Ul $ 2(Ra,qa){return Ra=zl $ 2(Ra,qa),Ra=Yl $ 1(Ra),Ra=Vl $ 2(Ra,qa),Ra=jl $ 2(Ra,qa),Ra=Gl $ 1(Ra),Ra}function zl $ 2(Ra,qa){return ye $ 1(Ra,nd=>nd.type!=="text"||n
` )return L $ 3;let ld=qa===" "||qa=== `
` &&Jl $ 1(Ra,od);return Xl $ 2(Ra,qa,nd,od,ld)?ld?Br $ 2:qr $ 1:ld?" ":""}var Ql $ 2=new Set(["listItem","definition"]);function Zl $ 2(Ra,qa,nd){var od,ld;let{node:ud}=Ra;if(af(Ra)){let cd=[""],dd=Pr $ 1(qa.originalText.slice(ud.position.start.offset,ud.position.end.offset));for(let pd of dd){if(pd.type==="word"){cd.push([cd.pop(),pd.value]);continue}let fd=Et $ 2(Ra,pd.value,qa.proseWrap,!0);if(Y $ 2(fd)=== $ $ 1){cd.push([cd.pop(),fd]);continue}cd.push(fd)}return Ee $ 2(cd)}switch(ud.type){case"front-matter":return qa.originalText.slice(ud.position.start.offset,ud.position.end.offset);case"root":return ud.children.length===0?"":[tf(Ra,qa,nd),L $ 3];case"paragraph":return Fi $ 1(Ra,qa,nd);case"sentence":return vi(Ra,nd);case"word":{let cd=N $ 3(!1,N $ 3(!1,ud.value,"*",String.raw ` \ * ` ),new RegExp([ ` ( ^ | $ { Se$2 . source } ) ( _ + ) ` , ` ( _ + ) ( $ { Se$2 . source } | $ ) ` ].join("|"),"gu"),(fd,md,vd,Ad,Nd)=>N $ 3(!1,vd? ` $ { md } $ { vd } ` : ` $ { Ad } $ { Nd } ` ,"_",String.raw ` \ _ ` )),dd=(fd,md,vd)=>fd.type==="sentence"&&vd===0,pd=(fd,md,vd)=>mt $ 1(fd.children[vd-1]);return cd!==ud.value&&(Ra.match(void 0,dd,pd)||Ra.match(void 0,dd,(fd,md,vd)=>fd.type==="emphasis"&&vd===0,pd))&&(cd=cd.replace(/^( \\ ?[*_])+/u,fd=>N $ 3(!1,fd," \\ ",""))),cd}case"whitespace":{let{next:cd}=Ra,dd=cd&&/^>|^(?:[*+-]|#{1,6}| \d +[).]) $ /u.test(cd.value)?"never":qa.proseWrap;return Et $ 2(Ra,ud.value,dd)}case"emphasis":{let cd;if(mt $ 1(ud.children[0]))cd=qa.originalText[ud.position.start.offset];else{let{previous:dd,next:pd}=Ra;cd=(dd==null?void 0:dd.type)==="sentence"&&((od=M $ 3(!1,dd.children,-1))==null?void 0:od.type)==="word"&&!M $ 3(!1,dd.children,-1).hasTrailingPunctuation||(pd==null?void 0:pd.type)==="sentence"&&((ld=pd.children[0])==null?void 0:ld.type)==="word"&&!pd.children[0].hasLeadingPunctuation||Ra.hasAncestor(fd=>fd.type==="emphasis")?"*":"_"}return[cd,V $ 3(Ra,qa,nd),cd]}case"strong":return["**",V $ 3(Ra,qa,nd),"**"];case"delete":return["~~",V $ 3(Ra,qa,nd),"~~"];case"inlineCode":{let cd=qa.proseWrap==="preserve"?ud.value:N $ 3(!1,ud.value, `
` ," "),dd=Gn $ 3(cd," ` "),pd=" ` ".repeat(dd||1),fd=cd.startsWith(" ` ")||cd.endsWith(" ` ")||/^[ \n ]/u.test(cd)&&/[ \n ] $ /u.test(cd)&&/[^ \n ]/u.test(cd)?" ":"";return[pd,fd,cd,fd,pd]}case"wikiLink":{let cd="";return qa.proseWrap==="preserve"?cd=ud.value:cd=N $ 3(!1,ud.value,/[ \t \n ]+/gu," "),["[[",cd,"]]"]}case"link":switch(qa.originalText[ud.position.start.offset]){case"<":{let cd="mailto:";return["<",ud.url.startsWith(cd)&&qa.originalText.slice(ud.position.start.offset+1,ud.position.start.offset+1+cd.length)!==cd?ud.url.slice(cd.length):ud.url,">"]}case"[":return["[",V $ 3(Ra,qa,nd),"](",Ct $ 2(ud.url,")"),Nr $ 1(ud.title,qa),")"];default:return qa.originalText.slice(ud.position.start.offset,ud.position.end.offset)}case"image":return["![",ud.alt||"","](",Ct $ 2(ud.url,")"),Nr $ 1(ud.title,qa),")"];case"blockquote":return["> ",ve $ 2("> ",V $ 3(Ra,qa,nd))];case"heading":return["#".repeat(ud.depth)+" ",V $ 3(Ra,qa,nd)];case"code":{if(ud.isIndented){let pd=" ".repeat(4);return ve $ 2(pd,[pd,Ce $ 1(ud.value,L $ 3)])}let cd=qa.__inJsTemplate?"~":" ` ",dd=cd.repeat(Math.max(3,_r$1(ud.value,cd)+1));return[dd,ud.lang||" ",ud.meta?" "+ud.meta:" ",L$3,Ce$1(Lr$1(ud,qa.originalText),L$3),L$3,dd]}case" html ":{let{parent:cd,isLast:dd}=Ra,pd=cd.type===" root "&&dd?ud.value.trimEnd():ud.value,fd=/^<!--.*-->$/su.test(pd);return Ce$1(pd,fd?L$3:_e$2(tr$1))}case" list ":{let cd=Ai$1(ud,Ra.parent),dd=ii$3(ud,qa);return V$3(Ra,qa,nd,{processor(pd){let fd=vd(),md=pd.node;if(md.children.length===2&&md.children[1].type===" html "&&md.children[0].position.start.column!==md.children[1].position.start.column)return[fd,yi$2(pd,qa,nd,fd)];return[fd,ve$2(" ".repeat(fd.length),yi$2(pd,qa,nd,fd))];function vd(){let Ad=ud.ordered?(pd.isFirst?ud.start:dd?1:ud.start+pd.index)+(cd%2===0?" . ":" ) "):cd%2===0?" - ":" * ";return ud.isAligned||ud.hasIndentedCodeblock?ef(Ad,qa):Ad}}})}case" thematicBreak ":{let{ancestors:cd}=Ra,dd=cd.findIndex(pd=>pd.type===" list ");return dd===-1?" -- - ":Ai$1(cd[dd],cd[dd+1])%2===0?" * * * ":" -- - "}case" linkReference ":return[" [ ",V$3(Ra,qa,nd)," ] ",ud.referenceType===" full "?bt$3(ud):ud.referenceType===" collapsed "?" [ ] ":" "];case" imageReference ":switch(ud.referenceType){case" full ":return[" ! [ ",ud.alt||" "," ] ",bt$3(ud)];default:return[" ! [ ",ud.alt," ] ",ud.referenceType===" collapsed "?" [ ] ":" "]}case" definition ":{let cd=qa.proseWrap===" always "?Br$2:" ";return ze$2([bt$3(ud)," : ",Ze$2([cd,Ct$2(ud.url),ud.title===null?" ":[cd,Nr$1(ud.title,qa,!1)]])])}case" footnote ":return[" [ ^ ",V$3(Ra,qa,nd)," ] "];case" footnoteReference ":return Bi$1(ud);case" footnoteDefinition ":{let cd=ud.children.length===1&&ud.children[0].type===" paragraph "&&(qa.proseWrap===" never "||qa.proseWrap===" preserve "&&ud.children[0].position.start.line===ud.children[0].position.end.line);return[Bi$1(ud)," : ",cd?V$3(Ra,qa,nd):ze$2([ve$2(" ".repeat(4),V$3(Ra,qa,nd,{processor:({isFirst:dd})=>dd?ze$2([qr$1,nd()]):nd()}))])]}case" table ":return mi$1(Ra,qa,nd);case" tableCell ":return V$3(Ra,qa,nd);case" break ":return/\s/u.test(qa.originalText[ud.position.start.offset])?[" ",_e$2(tr$1)]:[" \ \ ",L$3];case" liquidNode ":return Ce$1(ud.value,L$3);case" import ":case" export ":case" jsx ":return ud.value;case" esComment ":return[" { /* ",ud.value," */ } "];case" math ":return[" $$ ",L$3,ud.value?[Ce$1(ud.value,L$3),L$3]:" "," $$ "];case" inlineMath ":return qa.originalText.slice(Oe$2(ud),Pe$2(ud));case" tableRow ":case" listItem ":case" text ":default:throw new $n$3(ud," Markdown ")}}function yi$2(Ra,qa,nd,od){let{node:ld}=Ra,ud=ld.checked===null?" ":ld.checked?" [ x ] ":" [ ] ";return[ud,V$3(Ra,qa,nd,{processor({node:cd,isFirst:dd}){if(dd&&cd.type!==" list ")return ve$2(" ".repeat(ud.length),nd());let pd=" ".repeat(sf(qa.tabWidth-od.length,0,3));return[pd,ve$2(pd,nd())]}})]}function ef(Ra,qa){let nd=od();return Ra+" " . repeat ( nd >= 4 ? 0 : nd ) ; function od ( ) { let ld = Ra . length % qa . tabWidth ; return ld === 0 ? 0 : qa . tabWidth - ld } } function Ai$1 ( Ra , qa ) { return rf ( Ra , qa , nd => nd . ordered === Ra . ordered ) } function rf ( Ra , qa , nd ) { let od = - 1 ; for ( let ld of qa . children ) if ( ld . type === Ra . type && nd ( ld ) ? od ++ : od = - 1 , ld === Ra ) return od } function tf ( Ra , qa , nd ) { let od = [ ] , ld = null , { children : ud } = Ra . node ; for ( let [ cd , dd ] of ud . entries ( ) ) switch ( yt$1 (
` )}function uf({node:Ra,previous:qa,parent:nd},od){if(wi $ 1(qa,od))return!0;let ld=qa.type===Ra.type&&Ql $ 2.has(Ra.type),ud=nd.type==="listItem"&&!wi $ 1(nd,od),cd=yt $ 1(qa)==="next",dd=Ra.type==="html"&&qa.type==="html"&&qa.position.end.line+1===Ra.position.start.line,pd=Ra.type==="html"&&nd.type==="listItem"&&qa.type==="paragraph"&&qa.position.end.line+1===Ra.position.start.line;return!(ld||ud||cd||dd||pd)}function ki $ 1({node:Ra,previous:qa}){let nd=qa.type==="list",od=Ra.type==="code"&&Ra.isIndented;return nd&&od}function af(Ra){let qa=Ra.findAncestor(nd=>nd.type==="linkReference"||nd.type==="imageReference");return qa&&(qa.type!=="linkReference"||qa.referenceType!=="full")}var of=(Ra,qa)=>{for(let nd of qa)Ra=N $ 3(!1,Ra,nd,encodeURIComponent(nd));return Ra};function Ct $ 2(Ra,qa=[]){let nd=[" ",...Array.isArray(qa)?qa:[qa]];return new RegExp(nd.map(od=>Be $ 2(od)).join("|"),"u").test(Ra)? ` < $ { of ( Ra , "<>" ) } > ` :Ra}function Nr $ 1(Ra,qa,nd=!0){if(!Ra)return"";if(nd)return" "+Nr $ 1(Ra,qa,!1);if(Ra=N $ 3(!1,Ra,/ \\ (?=["')])/gu,""),Ra.includes('"')&&Ra.includes("'")&&!Ra.includes(")"))return ` ( $ { Ra } ) ` ;let od=jn $ 2(Ra,qa.singleQuote);return Ra=N $ 3(!1,Ra," \\ "," \\ \\ "),Ra=N $ 3(!1,Ra,od, ` \ \ $ { od } ` ), ` $ { od } $ { Ra } $ { od } ` }function sf(Ra,qa,nd){return Ra<qa?qa:Ra>nd?nd:Ra}function cf(Ra){return Ra.index>0&&yt $ 1(Ra.previous)==="next"}function bt $ 3(Ra){return ` [ $ { ( 0 , qi . default ) ( Ra . label ) } ] ` }function Bi $ 1(Ra){return ` [ ^ $ { Ra . label } ] ` }var lf={preprocess:gi,print:Zl $ 2,embed:ui $ 3,massageAstNode:Zn $ 2,hasPrettierIgnore:cf,insertPragma:Jn $ 3,getVisitorKeys:si $ 3},Ti $ 1=lf,_i $ 1=[{linguistLanguageId:222,name:"Markdown",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".md",".livemd",".markdown",".mdown",".mdwn",".mkd",".mkdn",".mkdown",".ronn",".scd",".workbook"],filenames:["contents.lr","README"],tmScope:"text.md",parsers:["markdown"],vscodeLanguageIds:["markdown"]},{linguistLanguageId:222,name:"MDX",type:"prose",color:"#083fa1",aliases:["md","pandoc"],aceMode:"markdown",codemirrorMode:"gfm",codemirrorMimeType:"text/x-gfm",wrap:!0,extensions:[".mdx"],filenames:[],tmScope:"text.md",parsers:["mdx"],vscodeLanguageIds:["mdx"]}],At $ 3={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},ff={proseWrap:At $ 3.proseWrap,singleQuote:At $ 3.singleQuote},Si $ 1=ff,On $ 2={};Ln $ 1(On $ 2,{markdown:()=>km,mdx:()=>Bm,remark:()=>km});var Wc=Ue $ 2(Pi $ 1()),Kc=Ue $ 2(Wi $ 1()),Jc=Ue $ 2(Gs()),Xc=Ue $ 2(Ic $ 1()),vm=/^import \s /u,Em=/^export \s /u,Nc=String.raw ` [ a - z ] [ a - z0 - 9 ] * ( \ . [ a - z ] [ a - z0 - 9 ] * ) * | ` ,Rc=/<!---->|<!---?[^>-](?:-?[^-])*-->/u,Cm=/^ \{ \s * \/ \* (.*) \* \/ \s * \} /u,bm $ 1= `
` ,Uc $ 1=Ra=>vm.test(Ra),Sn $ 2=Ra=>Em.test(Ra),zc=(Ra,qa)=>{let nd=qa.indexOf(bm $ 1),od=qa.slice(0,nd);if(Sn $ 2(od)||Uc $ 1(od))return Ra(od)({type:Sn $ 2(od)?"export":"import",value:od})},Mc=(Ra,qa)=>{let nd=Cm.exec(qa);if(nd)return Ra(nd[0])({type:"esComment",value:nd[1].trim()})};zc.locator=Ra=>Sn $ 2(Ra)||Uc $ 1(Ra)?-1:1;Mc.locator=(Ra,qa)=>Ra.indexOf("{",qa);var Yc=function(){let{Parser:Ra}=this,{blockTokenizers:qa,blockMethods:nd,inlineTokenizers:od,inlineMethods:ld}=Ra.prototype;qa.esSyntax=zc,od.esComment=Mc,nd.splice(nd.indexOf("paragraph"),0,"esSyntax"),ld.splice(ld.indexOf("text"),0,"esComment")},ym=function(){let Ra=this.Parser.prototype;Ra.blockMethods=["frontMatter",...Ra.blockMethods],Ra.blockTokenizers.frontMatter=qa;function qa(nd,od){let ld=ir $ 2(od);if(ld.frontMatter)return nd(ld.frontMatter.raw)(ld.frontMatter)}qa.onlyAtStart=!0},Gc $ 1=ym;function Am(){return Ra=>ye $ 1(Ra,(qa,nd,[od])=>qa.type!=="html"||Rc.test(qa.value)||Or $ 1.has(od.type)?qa:{...qa,type:"jsx"})}var Vc=Am,xm=function(){let Ra=this.Parser.prototype,qa=Ra.inlineMethods;qa.splice(qa.indexOf("text"),0,"liquid"),Ra.inlineTokenizers.liquid=nd;function nd(od,ld){let ud=ld.match(/^( \{ %.*?% \} | \{ \{ .*? \} \} )/su);if(ud)return od(ud[0])({type:"liquidNode",value:ud[0]})}nd.locator=function(od,ld){return od.indexOf("{",ld)}},jc=xm,wm=function(){let Ra="wikiLink",qa=/^ \[ \[ (?<linkContents>.+?) \] \] /su,nd=this.Parser.prototype,od=nd.inlineMethods;od.splice(od.indexOf("link"),0,Ra),nd.inlineTokenizers.wikiLink=ld;function ld(ud,cd){let dd=qa.exec(cd);if(dd){let pd=dd.groups.linkContents.trim();return ud(dd[0])({type:Ra,value:pd})}}ld.locator=function(ud,cd){return ud.indexOf("[",cd)}}, $ c=wm;function Qc({isMDX:Ra}){return qa=>{let nd=(0,Xc.default)().use(Jc.default,{commonmark:!0,...Ra&&{blocks:[Nc]}}).use(Wc.default).use(Gc $ 1).use(Kc.default).use(Ra?Yc:Hc).use(jc).use(Ra?Vc:Hc).use( $ c);return nd.run(nd.parse(qa))}}function Hc(){}var Zc={astFormat:"mdast",hasPragma:Kn $ 2,locStart:Oe $ 2,locEnd:Pe $ 2},km={...Zc,parse:Qc({isMDX:!1})},Bm={...Zc,parse:Qc({isMDX:!0})},qm={mdast:Ti $ 1},fC=Pn $ 3;const prettierPluginMarkdown=Object.freeze(Object.defineProperty({__proto__:null,default:fC,languages:_i $ 1,options:Si $ 1,parsers:On $ 2,printers:qm},Symbol.toStringTag,{value:"Module"}));var al=Object.create,Ur $ 1=Object.defineProperty,ul=Object.getOwnPropertyDescriptor,ll=Object.getOwnPropertyNames,cl=Object.getPrototypeOf,fl=Object.prototype.hasOwnProperty,y $ 3=(Ra,qa)=>()=>(qa||Ra((qa={exports:{}}).exports,qa),qa.exports),Xs=(Ra,qa)=>{for(var nd in qa)Ur $ 1(Ra,nd,{get:qa[nd],enumerable:!0})},pl=(Ra,qa,nd,od)=>{if(qa&&typeof qa=="object"||typeof qa=="function")for(let ld of ll(qa))!fl.call(Ra,ld)&&ld!==nd&&Ur $ 1(Ra,ld,{get:()=>qa[ld],enumerable:!(od=ul(qa,ld))||od.enumerable});return Ra},ye=(Ra,qa,nd)=>(nd=Ra!=null?al(cl(Ra)):{},pl(Ur $ 1(nd,"default",{value:Ra,enumerable:!0}),Ra)),Ut $ 1=y $ 3((Ra,qa)=>{qa.exports.isClean=Symbol("isClean"),qa.exports.my=Symbol("my")}),yi $ 1=y $ 3((Ra,qa)=>{var nd=String,od=function(){return{isColorSupported:!1,reset:nd,bold:nd,dim:nd,italic:nd,underline:nd,inverse:nd,hidden:nd,strikethrough:nd,black:nd,red:nd,green:nd,yellow:nd,blue:nd,magenta:nd,cyan:nd,white:nd,gray:nd,bgBlack:nd,bgRed:nd,bgGreen:nd,bgYellow:nd,bgBlue:nd,bgMagenta:nd,bgCyan:nd,bgWhite:nd}};qa.exports=od(),qa.exports.createColors=od}),ss=y $ 3(()=>{}),Ft $ 2=y $ 3((Ra,qa)=>{var nd=yi $ 1(),od=ss(),ld=class iS extends Error{constructor(cd,dd,pd,fd,md,vd){super(cd),this.name="CssSyntaxError",this.reason=cd,md&&(this.file=md),fd&&(this.source=fd),vd&&(this.plugin=vd),typeof dd<"u"&&typeof pd<"u"&&(typeof dd=="number"?(this.line=dd,this.column=pd):(this.line=dd.line,this.column=dd.column,this.endLine=pd.line,this.endColumn=pd.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,iS)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(cd){if(!this.source)return"";let dd=this.source;cd==null&&(cd=nd.isColorSupported),od&&cd&&(
` +Md+Ad("^")}return" "+Nd(Pd)+Id}).join( `
` )}toString(){let cd=this.showSourceCode();return cd&&(cd= `
` +cd+ `
` ),this.name+": "+this.message+cd}};qa.exports=ld,ld.default=ld}), $ t $ 2=y $ 3((Ra,qa)=>{var nd={after: `
2024-09-18 09:46:23 +08:00
` ,beforeClose: `
` ,beforeComment: `
` ,beforeDecl: `
` ,beforeOpen:" ",beforeRule: `
2024-11-28 09:28:59 +08:00
` ,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function od(ud){return ud[0].toUpperCase()+ud.slice(1)}var ld=class{constructor(ud){this.builder=ud}atrule(ud,cd){let dd="@"+ud.name,pd=ud.params?this.rawValue(ud,"params"):"";if(typeof ud.raws.afterName<"u"?dd+=ud.raws.afterName:pd&&(dd+=" "),ud.nodes)this.block(ud,dd+pd);else{let fd=(ud.raws.between||"")+(cd?";":"");this.builder(dd+pd+fd,ud)}}beforeAfter(ud,cd){let dd;ud.type==="decl"?dd=this.raw(ud,null,"beforeDecl"):ud.type==="comment"?dd=this.raw(ud,null,"beforeComment"):cd==="before"?dd=this.raw(ud,null,"beforeRule"):dd=this.raw(ud,null,"beforeClose");let pd=ud.parent,fd=0;for(;pd&&pd.type!=="root";)fd+=1,pd=pd.parent;if(dd.includes( `
` )){let md=this.raw(ud,null,"indent");if(md.length)for(let vd=0;vd<fd;vd++)dd+=md}return dd}block(ud,cd){let dd=this.raw(ud,"between","beforeOpen");this.builder(cd+dd+"{",ud,"start");let pd;ud.nodes&&ud.nodes.length?(this.body(ud),pd=this.raw(ud,"after")):pd=this.raw(ud,"after","emptyBody"),pd&&this.builder(pd),this.builder("}",ud,"end")}body(ud){let cd=ud.nodes.length-1;for(;cd>0&&ud.nodes[cd].type==="comment";)cd-=1;let dd=this.raw(ud,"semicolon");for(let pd=0;pd<ud.nodes.length;pd++){let fd=ud.nodes[pd],md=this.raw(fd,"before");md&&this.builder(md),this.stringify(fd,cd!==pd||dd)}}comment(ud){let cd=this.raw(ud,"left","commentLeft"),dd=this.raw(ud,"right","commentRight");this.builder("/*"+cd+ud.text+dd+"*/",ud)}decl(ud,cd){let dd=this.raw(ud,"between","colon"),pd=ud.prop+dd+this.rawValue(ud,"value");ud.important&&(pd+=ud.raws.important||" !important"),cd&&(pd+=";"),this.builder(pd,ud)}document(ud){this.body(ud)}raw(ud,cd,dd){let pd;if(dd||(dd=cd),cd&&(pd=ud.raws[cd],typeof pd<"u"))return pd;let fd=ud.parent;if(dd==="before"&&(!fd||fd.type==="root"&&fd.first===ud||fd&&fd.type==="document"))return"";if(!fd)return nd[dd];let md=ud.root();if(md.rawCache||(md.rawCache={}),typeof md.rawCache[dd]<"u")return md.rawCache[dd];if(dd==="before"||dd==="after")return this.beforeAfter(ud,dd);{let vd="raw"+od(dd);this[vd]?pd=this[vd](md,ud):md.walk(Ad=>{if(pd=Ad.raws[cd],typeof pd<"u")return!1})}return typeof pd>"u"&&(pd=nd[dd]),md.rawCache[dd]=pd,pd}rawBeforeClose(ud){let cd;return ud.walk(dd=>{if(dd.nodes&&dd.nodes.length>0&&typeof dd.raws.after<"u")return cd=dd.raws.after,cd.includes( `
` )&&(cd=cd.replace(/[^ \n ]+ $ /,"")),!1}),cd&&(cd=cd.replace(/ \S /g,"")),cd}rawBeforeComment(ud,cd){let dd;return ud.walkComments(pd=>{if(typeof pd.raws.before<"u")return dd=pd.raws.before,dd.includes( `
` )&&(dd=dd.replace(/[^ \n ]+ $ /,"")),!1}),typeof dd>"u"?dd=this.raw(cd,null,"beforeDecl"):dd&&(dd=dd.replace(/ \S /g,"")),dd}rawBeforeDecl(ud,cd){let dd;return ud.walkDecls(pd=>{if(typeof pd.raws.before<"u")return dd=pd.raws.before,dd.includes( `
` )&&(dd=dd.replace(/[^ \n ]+ $ /,"")),!1}),typeof dd>"u"?dd=this.raw(cd,null,"beforeRule"):dd&&(dd=dd.replace(/ \S /g,"")),dd}rawBeforeOpen(ud){let cd;return ud.walk(dd=>{if(dd.type!=="decl"&&(cd=dd.raws.between,typeof cd<"u"))return!1}),cd}rawBeforeRule(ud){let cd;return ud.walk(dd=>{if(dd.nodes&&(dd.parent!==ud||ud.first!==dd)&&typeof dd.raws.before<"u")return cd=dd.raws.before,cd.includes( `
` )&&(cd=cd.replace(/[^ \n ]+ $ /,"")),!1}),cd&&(cd=cd.replace(/ \S /g,"")),cd}rawColon(ud){let cd;return ud.walkDecls(dd=>{if(typeof dd.raws.between<"u")return cd=dd.raws.between.replace(/[^ \s :]/g,""),!1}),cd}rawEmptyBody(ud){let cd;return ud.walk(dd=>{if(dd.nodes&&dd.nodes.length===0&&(cd=dd.raws.after,typeof cd<"u"))return!1}),cd}rawIndent(ud){if(ud.raws.indent)return ud.raws.indent;let cd;return ud.walk(dd=>{let pd=dd.parent;if(pd&&pd!==ud&&pd.parent&&pd.parent===ud&&typeof dd.raws.before<"u"){let fd=dd.raws.before.split( `
` );return cd=fd[fd.length-1],cd=cd.replace(/ \S /g,""),!1}}),cd}rawSemicolon(ud){let cd;return ud.walk(dd=>{if(dd.nodes&&dd.nodes.length&&dd.last.type==="decl"&&(cd=dd.raws.semicolon,typeof cd<"u"))return!1}),cd}rawValue(ud,cd){let dd=ud[cd],pd=ud.raws[cd];return pd&&pd.value===dd?pd.raw:dd}root(ud){this.body(ud),ud.raws.after&&this.builder(ud.raws.after)}rule(ud){this.block(ud,this.rawValue(ud,"selector")),ud.raws.ownSemicolon&&this.builder(ud.raws.ownSemicolon,ud,"end")}stringify(ud,cd){if(!this[ud.type])throw new Error("Unknown AST node type "+ud.type+". Maybe you need to change PostCSS stringifier.");this[ud.type](ud,cd)}};qa.exports=ld,ld.default=ld}),it $ 1=y $ 3((Ra,qa)=>{var nd= $ t $ 2();function od(ld,ud){new nd(ud).stringify(ld)}qa.exports=od,od.default=od}),at $ 3=y $ 3((Ra,qa)=>{var{isClean:nd,my:od}=Ut $ 1(),ld=Ft $ 2(),ud= $ t $ 2(),cd=it $ 1();function dd(fd,md){let vd=new fd.constructor;for(let Ad in fd){if(!Object.prototype.hasOwnProperty.call(fd,Ad)||Ad==="proxyCache")continue;let Nd=fd[Ad],Id=typeof Nd;Ad==="parent"&&Id==="object"?md&&(vd[Ad]=md):Ad==="source"?vd[Ad]=Nd:Array.isArray(Nd)?vd[Ad]=Nd.map(Od=>dd(Od,vd)):(Id==="object"&&Nd!==null&&(Nd=dd(Nd)),vd[Ad]=Nd)}return vd}var pd=class{constructor(fd={}){this.raws={},this[nd]=!1,this[od]=!0;for(let md in fd)if(md==="nodes"){this.nodes=[];for(let vd of fd[md])typeof vd.clone=="function"?this.append(vd.clone()):this.append(vd)}else this[md]=fd[md]}addToError(fd){if(fd.postcssNode=this,fd.stack&&this.source&&/ \n \s {4}at /.test(fd.stack)){let md=this.source;fd.stack=fd.stack.replace(/ \n \s {4}at /, ` $ & $ { md . input . from } : $ { md . start . line } : $ { md . start . column } $ & ` )}return fd}after(fd){return this.parent.insertAfter(this,fd),this}assign(fd={}){for(let md in fd)this[md]=fd[md];return this}before(fd){return this.parent.insertBefore(this,fd),this}cleanRaws(fd){delete this.raws.before,delete this.raws.after,fd||delete this.raws.between}clone(fd={}){let md=dd(this);for(let vd in fd)md[vd]=fd[vd];return md}cloneAfter(fd={}){let md=this.clone(fd);return this.parent.insertAfter(this,md),md}cloneBefore(fd={}){let md=this.clone(fd);return this.parent.insertBefore(this,md),md}error(fd,md={}){if(this.source){let{end:vd,start:Ad}=this.rangeBy(md);return this.source.input.error(fd,{column:Ad.column,line:Ad.line},{column:vd.column,line:vd.line},md)}return new ld(fd)}getProxyProcessor(){return{get(fd,md){return md==="proxyOf"?fd:md==="root"?()=>fd.root().toProxy():fd[md]},set(fd,md,vd){return fd[md]===vd||(fd[md]=vd,(md==="prop"||md==="value"||md==="name"||md==="params"||md==="important"||md==="text")&&fd.markDirty()),!0}}}markDirty(){if(this[nd]){this[nd]=!1;let fd=this;for(;fd=fd.parent;)fd[nd]=!1}}next(){if(!this.parent)return;let fd=this.parent.index(this);return this.parent.nodes[fd+1]}positionBy(fd,md){let vd=this.source.start;if(fd.index)vd=this.positionInside(fd.index,md);else if(fd.word){md=this.toString();let Ad=md.indexOf(fd.word);Ad!==-1&&(vd=this.positionInside(Ad,md))}return vd}positionInside(fd,md){let vd=md||this.toString(),Ad=this.source.start.column,Nd=this.source.start.line;for(let Id=0;Id<fd;Id++)vd[Id]=== `
2024-12-08 09:17:51 +08:00
` ?(Ad=1,Nd+=1):Ad+=1;return{column:Ad,line:Nd}}prev(){if(!this.parent)return;let fd=this.parent.index(this);return this.parent.nodes[fd-1]}rangeBy(fd){let md={column:this.source.start.column,line:this.source.start.line},vd=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:md.column+1,line:md.line};if(fd.word){let Ad=this.toString(),Nd=Ad.indexOf(fd.word);Nd!==-1&&(md=this.positionInside(Nd,Ad),vd=this.positionInside(Nd+fd.word.length,Ad))}else fd.start?md={column:fd.start.column,line:fd.start.line}:fd.index&&(md=this.positionInside(fd.index)),fd.end?vd={column:fd.end.column,line:fd.end.line}:typeof fd.endIndex=="number"?vd=this.positionInside(fd.endIndex):fd.index&&(vd=this.positionInside(fd.index+1));return(vd.line<md.line||vd.line===md.line&&vd.column<=md.column)&&(vd={column:md.column+1,line:md.line}),{end:vd,start:md}}raw(fd,md){return new ud().raw(this,fd,md)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...fd){if(this.parent){let md=this,vd=!1;for(let Ad of fd)Ad===this?vd=!0:vd?(this.parent.insertAfter(md,Ad),md=Ad):this.parent.insertBefore(md,Ad);vd||this.remove()}return this}root(){let fd=this;for(;fd.parent&&fd.parent.type!=="document";)fd=fd.parent;return fd}toJSON(fd,md){let vd={},Ad=md==null;md=md||new Map;let Nd=0;for(let Id in this){if(!Object.prototype.hasOwnProperty.call(this,Id)||Id==="parent"||Id==="proxyCache")continue;let Od=this[Id];if(Array.isArray(Od))vd[Id]=Od.map(Fd=>typeof Fd=="object"&&Fd.toJSON?Fd.toJSON(null,md):Fd);else if(typeof Od=="object"&&Od.toJSON)vd[Id]=Od.toJSON(null,md);else if(Id==="source"){let Fd=md.get(Od.input);Fd==null&&(Fd=Nd,md.set(Od.input,Nd),Nd++),vd[Id]={end:Od.end,inputId:Fd,start:Od.start}}else vd[Id]=Od}return Ad&&(vd.inputs=[...md.keys()].map(Id=>Id.toJSON())),vd}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(fd=cd){fd.stringify&&(fd=fd.stringify);let md="";return fd(this,vd=>{md+=vd}),md}warn(fd,md,vd){let Ad={node:this};for(let Nd in vd)Ad[Nd]=vd[Nd];return fd.warn(md,Ad)}get proxyOf(){return this}};qa.exports=pd,pd.default=pd}),lt $ 1=y $ 3((Ra,qa)=>{var nd=at $ 3(),od=class extends nd{constructor(ld){ld&&typeof ld.value<"u"&&typeof ld.value!="string"&&(ld={...ld,value:String(ld.value)}),super(ld),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]===" $ "}};qa.exports=od,od.default=od}),Oe $ 1=y $ 3((Ra,qa)=>{var nd=at $ 3(),od=class extends nd{constructor(ld){super(ld),this.type="comment"}};qa.exports=od,od.default=od}),re $ 1=y $ 3((Ra,qa)=>{var{isClean:nd,my:od}=Ut $ 1(),ld=lt $ 1(),ud=Oe $ 1(),cd=at $ 3(),dd,pd,fd,md;function vd(Id){return Id.map(Od=>(Od.nodes&&(Od.nodes=vd(Od.nodes)),delete Od.source,Od))}function Ad(Id){if(Id[nd]=!1,Id.proxyOf.nodes)for(let Od of Id.proxyOf.nodes)Ad(Od)}var Nd=class aS extends cd{append(...Od){for(let Fd of Od){let Pd=this.normalize(Fd,this.last);for(let Md of Pd)this.proxyOf.nodes.push(Md)}return this.markDirty(),this}cleanRaws(Od){if(super.cleanRaws(Od),this.nodes)for(let Fd of this.nodes)Fd.cleanRaws(Od)}each(Od){if(!this.proxyOf.nodes)return;let Fd=this.getIterator(),Pd,Md;for(;this.indexes[Fd]<this.proxyOf.nodes.length&&(Pd=this.indexes[Fd],Md=Od(this.proxyOf.nodes[Pd],Pd),Md!==!1);)this.indexes[Fd]+=1;return delete this.indexes[Fd],Md}every(Od){return this.nodes.every(Od)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let Od=this.lastEach;return this.indexes[Od]=0,Od}getProxyProcessor(){return{get(Od,Fd){return Fd==="proxyOf"?Od:Od[Fd]?Fd==="each"||typeof Fd=="string"&&Fd.startsWith("walk")?(...Pd)=>Od[Fd](...Pd.map(Md=>typeof Md=="function"?(Bd,jd)=>Md(Bd.toProxy(),jd):Md)):Fd==="every"||Fd==="some"?Pd=>Od[Fd]((Md,...Bd)=>Pd(Md.toProxy(),...Bd)):Fd==="root"?()=>Od.root().toProxy():Fd==="nodes"?Od.nodes.map(Pd=>Pd.toProxy()):Fd==="first"||Fd==="last"?Od[Fd].toProxy():Od[Fd]:Od[Fd]},set(Od,Fd,Pd){return Od[Fd]===Pd||(Od[Fd]=Pd,(Fd==="name"||Fd==="params"||Fd==="selector")&&Od.markDirty()),!0}}}index(Od){return typeo
` ," "];return nd.split(od,ld)},split(od,ld,ud){let cd=[],dd="",pd=!1,fd=0,md=!1,vd="",Ad=!1;for(let Nd of od)Ad?Ad=!1:Nd===" \\ "?Ad=!0:md?Nd===vd&&(md=!1):Nd==='"'||Nd==="'"?(md=!0,vd=Nd):Nd==="("?fd+=1:Nd===")"?fd>0&&(fd-=1):fd===0&&ld.includes(Nd)&&(pd=!0),pd?(dd!==""&&cd.push(dd.trim()),dd="",pd=!1):dd+=Nd;return(ud||dd!=="")&&cd.push(dd.trim()),cd}};qa.exports=nd,nd.default=nd}),jt $ 1=y $ 3((Ra,qa)=>{var nd=re $ 1(),od=us(),ld=class extends nd{constructor(ud){super(ud),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return od.comma(this.selector)}set selectors(ud){let cd=this.selector?this.selector.match(/, \s */):null,dd=cd?cd[0]:","+this.raw("between","beforeOpen");this.selector=ud.join(dd)}};qa.exports=ld,ld.default=ld,nd.registerRule(ld)}),Ht $ 2=y $ 3((Ra,qa)=>{var nd=lt $ 1(),od=Vt $ 2(),ld=Oe $ 1(),ud=Gt $ 1(),cd=Ae $ 2(),dd=jt $ 1(),pd={empty:!0,space:!0};function fd(vd){for(let Ad=vd.length-1;Ad>=0;Ad--){let Nd=vd[Ad],Id=Nd[3]||Nd[2];if(Id)return Id}}var md=class{constructor(vd){this.input=vd,this.root=new cd,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:vd,start:{column:1,line:1,offset:0}}}atrule(vd){let Ad=new ud;Ad.name=vd[1].slice(1),Ad.name===""&&this.unnamedAtrule(Ad,vd),this.init(Ad,vd[2]);let Nd,Id,Od,Fd=!1,Pd=!1,Md=[],Bd=[];for(;!this.tokenizer.endOfFile();){if(vd=this.tokenizer.nextToken(),Nd=vd[0],Nd==="("||Nd==="["?Bd.push(Nd==="("?")":"]"):Nd==="{"&&Bd.length>0?Bd.push("}"):Nd===Bd[Bd.length-1]&&Bd.pop(),Bd.length===0)if(Nd===";"){Ad.source.end=this.getPosition(vd[2]),Ad.source.end.offset++,this.semicolon=!0;break}else if(Nd==="{"){Pd=!0;break}else if(Nd==="}"){if(Md.length>0){for(Od=Md.length-1,Id=Md[Od];Id&&Id[0]==="space";)Id=Md[--Od];Id&&(Ad.source.end=this.getPosition(Id[3]||Id[2]),Ad.source.end.offset++)}this.end(vd);break}else Md.push(vd);else Md.push(vd);if(this.tokenizer.endOfFile()){Fd=!0;break}}Ad.raws.between=this.spacesAndCommentsFromEnd(Md),Md.length?(Ad.raws.afterName=this.spacesAndCommentsFromStart(Md),this.raw(Ad,"params",Md),Fd&&(vd=Md[Md.length-1],Ad.source.end=this.getPosition(vd[3]||vd[2]),Ad.source.end.offset++,this.spaces=Ad.raws.between,Ad.raws.between="")):(Ad.raws.afterName="",Ad.params=""),Pd&&(Ad.nodes=[],this.current=Ad)}checkMissedSemicolon(vd){let Ad=this.colon(vd);if(Ad===!1)return;let Nd=0,Id;for(let Od=Ad-1;Od>=0&&(Id=vd[Od],!(Id[0]!=="space"&&(Nd+=1,Nd===2)));Od--);throw this.input.error("Missed semicolon",Id[0]==="word"?Id[3]+1:Id[2])}colon(vd){let Ad=0,Nd,Id,Od;for(let[Fd,Pd]of vd.entries()){if(Nd=Pd,Id=Nd[0],Id==="("&&(Ad+=1),Id===")"&&(Ad-=1),Ad===0&&Id===":")if(!Od)this.doubleColon(Nd);else{if(Od[0]==="word"&&Od[1]==="progid")continue;return Fd}Od=Nd}return!1}comment(vd){let Ad=new ld;this.init(Ad,vd[2]),Ad.source.end=this.getPosition(vd[3]||vd[2]),Ad.source.end.offset++;let Nd=vd[1].slice(2,-2);if(/^ \s * $ /.test(Nd))Ad.text="",Ad.raws.left=Nd,Ad.raws.right="";else{let Id=Nd.match(/^( \s *)([^]* \S )( \s *) $ /);Ad.text=Id[2],Ad.raws.left=Id[1],Ad.raws.right=Id[3]}}createTokenizer(){this.tokenizer=od(this.input)}decl(vd,Ad){let Nd=new nd;this.init(Nd,vd[0][2]);let Id=vd[vd.length-1];for(Id[0]===";"&&(this.semicolon=!0,vd.pop()),Nd.source.end=this.getPosition(Id[3]||Id[2]||fd(vd)),Nd.source.end.offset++;vd[0][0]!=="word";)vd.length===1&&this.unknownWord(vd),Nd.raws.before+=vd.shift()[1];for(Nd.source.start=this.getPosition(vd[0][2]),Nd.prop="";vd.length;){let Md=vd[0][0];if(Md===":"||Md==="space"||Md==="comment")break;Nd.prop+=vd.shift()[1]}Nd.raws.between="";let Od;for(;vd.length;)if(Od=vd.shift(),Od[0]===":"){Nd.raws.between+=Od[1];break}else Od[0]==="word"&&/ \w /.test(Od[1])&&this.unknownWord([Od]),Nd.raws.between+=Od[1];(Nd.prop[0]==="_"||Nd.prop[0]==="*")&&(Nd.raws.before+=Nd.prop[0],Nd.prop=Nd.prop.slice(1));let Fd=[],Pd;for(;vd.length&&(Pd=vd[0][0],!(Pd!=="space"&&Pd!=="comment"));)Fd.push(vd.shift());this.precheckMissedSemicolon(vd);for(let Md=vd.length-1;Md>=0;Md--){if(Od=vd[Md],Od[1].toLowerCase()==="!important"){Nd.important=!0;let Bd=this.stringFrom(vd,Md);Bd=this.spacesFromEnd(vd)+Bd,Bd!==" !important"&&(Nd.r
2024-11-28 09:28:59 +08:00
` );Md=new Array(jd.length);let Hd=0;for(let Gd=0,zd=jd.length;Gd<zd;Gd++)Md[Gd]=Hd,Hd+=jd[Gd].length+1;this[Ad]=Md}Pd=Md[Md.length-1];let Bd=0;if(Fd>=Pd)Bd=Md.length-1;else{let jd=Md.length-2,Hd;for(;Bd<jd;)if(Hd=Bd+(jd-Bd>>1),Fd<Md[Hd])jd=Hd-1;else if(Fd>=Md[Hd+1])Bd=Hd+1;else{Bd=Hd;break}}return{col:Fd-Md[Bd]+1,line:Bd+1}}mapResolve(Fd){return/^ \w +: \/ \/ /.test(Fd)?Fd:dd(this.map.consumer().sourceRoot||this.map.root||".",Fd)}origin(Fd,Pd,Md,Bd){if(!this.map)return!1;let jd=this.map.consumer(),Hd=jd.originalPositionFor({column:Pd,line:Fd});if(!Hd.source)return!1;let Gd;typeof Md=="number"&&(Gd=jd.originalPositionFor({column:Bd,line:Md}));let zd;cd(Hd.source)?zd=ud(Hd.source):zd=new URL(Hd.source,this.map.consumer().sourceRoot||ud(this.map.mapFile));let df={column:Hd.column,endColumn:Gd&&Gd.column,endLine:Gd&&Gd.line,line:Hd.line,url:zd.toString()};if(zd.protocol==="file:")if(ld)df.file=ld(zd);else throw new Error("file: protocol is not available in this PostCSS build");let Wd=jd.sourceContentFor(Hd.source);return Wd&&(df.source=Wd),df}toJSON(){let Fd={};for(let Pd of["hasBOM","css","file","id"])this[Pd]!=null&&(Fd[Pd]=this[Pd]);return this.map&&(Fd.map={...this.map},Fd.map.consumerCache&&(Fd.map.consumerCache=void 0)),Fd}get from(){return this.file||this.id}};qa.exports=Od,Od.default=Od,fd&&fd.registerInput&&fd.registerInput(Od)}),pt $ 1=y $ 3((Ra,qa)=>{var nd=re $ 1(),od=Ht $ 2(),ld=Re $ 1();function ud(cd,dd){let pd=new ld(cd,dd),fd=new od(pd);try{fd.parse()}catch(md){throw md}return fd.root}qa.exports=ud,ud.default=ud,nd.registerParse(ud)}),no $ 1=y $ 3((Ra,qa)=>{var nd=Vt $ 2(),od=Re $ 1();qa.exports={isInlineComment(ld){if(ld[0]==="word"&&ld[1].slice(0,2)==="//"){let ud=ld,cd=[],dd,pd;for(;ld;){if(/ \r ? \n /.test(ld[1])){if(/['"].* \r ? \n /.test(ld[1])){cd.push(ld[1].substring(0,ld[1].indexOf( `
` ))),pd=ld[1].substring(ld[1].indexOf( `
2024-12-08 09:17:51 +08:00
` ));let md=this.input.css.valueOf().substring(this.tokenizer.position());pd+=md,dd=ld[3]+md.length-pd.length}else this.tokenizer.back(ld);break}cd.push(ld[1]),dd=ld[2],ld=this.tokenizer.nextToken({ignoreUnclosed:!0})}let fd=["comment",cd.join(""),ud[2],dd];return this.inlineComment(fd),pd&&(this.input=new od(pd),this.tokenizer=nd(this.input)),!0}else if(ld[1]==="/"){let ud=this.tokenizer.nextToken({ignoreUnclosed:!0});if(ud[0]==="comment"&&/^ \/ \* /.test(ud[1]))return ud[0]="word",ud[1]=ud[1].slice(1),ld[1]="//",this.tokenizer.back(ud),qa.exports.isInlineComment.bind(this)(ld)}return!1}}}),oo $ 2=y $ 3((Ra,qa)=>{qa.exports={interpolation(nd){let od=[nd,this.tokenizer.nextToken()],ld=["word","}"];if(od[0][1].length>1||od[1][0]!=="{")return this.tokenizer.back(od[1]),!1;for(nd=this.tokenizer.nextToken();nd&&ld.includes(nd[0]);)od.push(nd),nd=this.tokenizer.nextToken();let ud=od.map(fd=>fd[1]),[cd]=od,dd=od.pop(),pd=["word",ud.join(""),cd[2],dd[2]];return this.tokenizer.back(nd),this.tokenizer.back(pd),!0}}}),uo $ 2=y $ 3((Ra,qa)=>{var nd=/^#[0-9a-fA-F]{6} $ |^#[0-9a-fA-F]{3} $ /,od=/ \. [0-9]/,ld=ud=>{let[,cd]=ud,[dd]=cd;return(dd==="."||dd==="#")&&nd.test(cd)===!1&&od.test(cd)===!1};qa.exports={isMixinToken:ld}}),co $ 1=y $ 3((Ra,qa)=>{var nd=Vt $ 2(),od=/^url \( (.+) \) /;qa.exports=ld=>{let{name:ud,params:cd=""}=ld;if(ud==="import"&&cd.length){ld.import=!0;let dd=nd({css:cd});for(ld.filename=cd.replace(od," $ 1");!dd.endOfFile();){let[pd,fd]=dd.nextToken();if(pd==="word"&&fd==="url")return;if(pd==="brackets"){ld.options=fd,ld.filename=cd.replace(fd,"").trim();break}}}}}),mo $ 2=y $ 3((Ra,qa)=>{var nd=/: $ /,od=/^:( \s +)?/;qa.exports=ld=>{let{name:ud,params:cd=""}=ld;if(ld.name.slice(-1)===":"){if(nd.test(ud)){let[dd]=ud.match(nd);ld.name=ud.replace(dd,""),ld.raws.afterName=dd+(ld.raws.afterName||""),ld.variable=!0,ld.value=ld.params}if(od.test(cd)){let[dd]=cd.match(od);ld.value=cd.replace(dd,""),ld.raws.afterName=(ld.raws.afterName||"")+dd,ld.variable=!0}}}}),go $ 2=y $ 3((Ra,qa)=>{var nd=Oe $ 1(),od=Ht $ 2(),{isInlineComment:ld}=no $ 1(),{interpolation:ud}=oo $ 2(),{isMixinToken:cd}=uo $ 2(),dd=co $ 1(),pd=mo $ 2(),fd=/(! \s *important) $ /i;qa.exports=class extends od{constructor(...md){super(...md),this.lastNode=null}atrule(md){ud.bind(this)(md)||(super.atrule(md),dd(this.lastNode),pd(this.lastNode))}decl(...md){super.decl(...md),/extend \( .+ \) /i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(md){md[0][1]= ` $ { md [ 0 ] [ 1 ] } ` ;let vd=md.findIndex(Od=>Od[0]==="("),Ad=md.reverse().find(Od=>Od[0]===")"),Nd=md.reverse().indexOf(Ad),Id=md.splice(vd,Nd).map(Od=>Od[1]).join("");for(let Od of md.reverse())this.tokenizer.back(Od);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=Id}init(md,vd,Ad){super.init(md,vd,Ad),this.lastNode=md}inlineComment(md){let vd=new nd,Ad=md[1].slice(2);if(this.init(vd,md[2]),vd.source.end=this.getPosition(md[3]||md[2]),vd.inline=!0,vd.raws.begin="//",/^ \s * $ /.test(Ad))vd.text="",vd.raws.left=Ad,vd.raws.right="";else{let Nd=Ad.match(/^( \s *)([^]*[^ \s ])( \s *) $ /);[,vd.raws.left,vd.text,vd.raws.right]=Nd}}mixin(md){let[vd]=md,Ad=vd[1].slice(0,1),Nd=md.findIndex(Md=>Md[0]==="brackets"),Id=md.findIndex(Md=>Md[0]==="("),Od="";if((Nd<0||Nd>3)&&Id>0){let Md=md.reduce((Xd,_f,vf)=>_f[0]===")"?vf:Xd),Bd=md.slice(Id,Md+Id).map(Xd=>Xd[1]).join(""),[jd]=md.slice(Id),Hd=[jd[2],jd[3]],[Gd]=md.slice(Md,Md+1),zd=[Gd[2],Gd[3]],df=["brackets",Bd].concat(Hd,zd),Wd=md.slice(0,Id),Jd=md.slice(Md+1);md=Wd,md.push(df),md=md.concat(Jd)}let Fd=[];for(let Md of md)if((Md[1]==="!"||Fd.length)&&Fd.push(Md),Md[1]==="important")break;if(Fd.length){let[Md]=Fd,Bd=md.indexOf(Md),jd=Fd[Fd.length-1],Hd=[Md[2],Md[3]],Gd=[jd[4],jd[5]],zd=["word",Fd.map(df=>df[1]).join("")].concat(Hd,Gd);md.splice(Bd,Fd.length,zd)}let Pd=md.findIndex(Md=>fd.test(Md[1]));Pd>0&&([,Od]=md[Pd],md.splice(Pd,1));for(let Md of md.reverse())this.tokenizer.back(Md);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=Ad,Od&&(this.lastNode.important=!0,this.lastNode.raws.important=Od)}other(md){ld.bind(this)(md)||super.other(md)}rule(md){let
https : //evilmartians.com/chronicles/postcss-8-plugin-migration`));let Xd=Gd(...Jd);return Xd.postcssPlugin=Hd,Xd.postcssVersion=new cd().version,Xd}let Wd;return Object.defineProperty(df,"postcss",{get(){return Wd||(Wd=df()),Wd}}),df.process=function(Jd,Xd,_f){return jd([df(_f)]).process(Jd,Xd)},df},jd.stringify=dd,jd.parse=Od,jd.fromJSON=pd,jd.list=Fd,jd.comment=Hd=>new vd(Hd),jd.atRule=Hd=>new Ad(Hd),jd.decl=Hd=>new od(Hd),jd.rule=Hd=>new Pd(Hd),jd.root=Hd=>new Md(Hd),jd.document=Hd=>new fd(Hd),jd.CssSyntaxError=nd,jd.Declaration=od,jd.Container=ud,jd.Processor=cd,jd.Document=fd,jd.Comment=vd,jd.Warning=md,jd.AtRule=Ad,jd.Result=Nd,jd.Input=Id,jd.Rule=Pd,jd.Root=Md,jd.Node=Bd,ld.registerPostcss(jd),qa.exports=jd,jd.default=jd}),Ho$2=y$3((Ra,qa)=>{var{Container:nd}=Zt$1(),od=class extends nd{constructor(ld){super(ld),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};qa.exports=od}),Jo$1=y$3((Ra,qa)=>{var nd=/[\t\n\f\r "#'()/;[\\\]{}]/g,od=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ld=/.[\r\n"'(/\\]/,ud=/[\da-f]/i,cd=/[\n\f\r]/g;qa.exports=function(dd,pd={}){let fd=dd.css.valueOf(),md=pd.ignoreErrors,vd,Ad,Nd,Id,Od,Fd,Pd,Md,Bd,jd=fd.length,Hd=0,Gd=[],zd=[],df;function Wd(){return Hd}function Jd(gf){throw dd.error("Unclosed "+gf,Hd)}function Xd(){return zd.length===0&&Hd>=jd}function _f(){let gf=1,bf=!1,Tf=!1;for(;gf>0;)Ad+=1,fd.length<=Ad&&Jd("interpolation"),vd=fd.charCodeAt(Ad),Md=fd.charCodeAt(Ad+1),bf?!Tf&&vd===bf?(bf=!1,Tf=!1):vd===92?Tf=!Tf:Tf&&(Tf=!1):vd===39||vd===34?bf=vd:vd===125?gf-=1:vd===35&&Md===123&&(gf+=1)}function vf(gf){if(zd.length)return zd.pop();if(Hd>=jd)return;let bf=gf?gf.ignoreUnclosed:!1;switch(vd=fd.charCodeAt(Hd),vd){case 10:case 32:case 9:case 13:case 12:{Ad=Hd;do Ad+=1,vd=fd.charCodeAt(Ad);while(vd===32||vd===10||vd===9||vd===13||vd===12);Bd=["space",fd.slice(Hd,Ad)],Hd=Ad-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let Tf=String.fromCharCode(vd);Bd=[Tf,Tf,Hd];break}case 44:{Bd=["word",",",Hd,Hd+1];break}case 40:{if(Pd=Gd.length?Gd.pop()[1]:"",Md=fd.charCodeAt(Hd+1),Pd==="url"&&Md!==39&&Md!==34){for(df=1,Fd=!1,Ad=Hd+1;Ad<=fd.length-1;){if(Md=fd.charCodeAt(Ad),Md===92)Fd=!Fd;else if(Md===40)df+=1;else if(Md===41&&(df-=1,df===0))break;Ad+=1}Id=fd.slice(Hd,Ad+1),Bd=["brackets",Id,Hd,Ad],Hd=Ad}else Ad=fd.indexOf(")",Hd+1),Id=fd.slice(Hd,Ad+1),Ad===-1||ld.test(Id)?Bd=["(","(",Hd]:(Bd=["brackets",Id,Hd,Ad],Hd=Ad);break}case 39:case 34:{for(Nd=vd,Ad=Hd,Fd=!1;Ad<jd&&(Ad++,Ad===jd&&Jd("string"),vd=fd.charCodeAt(Ad),Md=fd.charCodeAt(Ad+1),!(!Fd&&vd===Nd));)vd===92?Fd=!Fd:Fd?Fd=!1:vd===35&&Md===123&&_f();Bd=["string",fd.slice(Hd,Ad+1),Hd,Ad],Hd=Ad;break}case 64:{nd.lastIndex=Hd+1,nd.test(fd),nd.lastIndex===0?Ad=fd.length-1:Ad=nd.lastIndex-2,Bd=["at-word",fd.slice(Hd,Ad+1),Hd,Ad],Hd=Ad;break}case 92:{for(Ad=Hd,Od=!0;fd.charCodeAt(Ad+1)===92;)Ad+=1,Od=!Od;if(vd=fd.charCodeAt(Ad+1),Od&&vd!==47&&vd!==32&&vd!==10&&vd!==9&&vd!==13&&vd!==12&&(Ad+=1,ud.test(fd.charAt(Ad)))){for(;ud.test(fd.charAt(Ad+1));)Ad+=1;fd.charCodeAt(Ad+1)===32&&(Ad+=1)}Bd=["word",fd.slice(Hd,Ad+1),Hd,Ad],Hd=Ad;break}default:Md=fd.charCodeAt(Hd+1),vd===35&&Md===123?(Ad=Hd,_f(),Id=fd.slice(Hd,Ad+1),Bd=["word",Id,Hd,Ad],Hd=Ad):vd===47&&Md===42?(Ad=fd.indexOf("*/",Hd+2)+1,Ad===0&&(md||bf?Ad=fd.length:Jd("comment")),Bd=["comment",fd.slice(Hd,Ad+1),Hd,Ad],Hd=Ad):vd===47&&Md===47?(cd.lastIndex=Hd+1,cd.test(fd),cd.lastIndex===0?Ad=fd.length-1:Ad=cd.lastIndex-2,Id=fd.slice(Hd,Ad+1),Bd=["comment",Id,Hd,Ad,"inline"],Hd=Ad):(od.lastIndex=Hd+1,od.test(fd),od.lastIndex===0?Ad=fd.length-1:Ad=od.lastIndex-2,Bd=["word",fd.slice(Hd,Ad+1),Hd,Ad],Gd.push(Bd),Hd=Ad);break}return Hd++,Bd}function Sf(gf){zd.push(gf)}return{back:Sf,endOfFile:Xd,nextToken:vf,position:Wd}}}),Zo$1=y$3((Ra,qa)=>{var{Comment:nd}=Zt$1(),od=Ht$2(),ld=Ho$2(),ud=Jo$1(),cd=class extends od{atrule(dd){let pd=dd[1],fd=dd;for(;!this.tokenizer.endOfFile();){let md=this.tokenizer.nextToken();if(md[0]==="word"&&md[2]===fd[3]+1)pd+=md[1],fd=md;else{this.tokenizer.back(md);break}}super.atrule(["at-word",pd,dd[2],fd[3]])}comment(dd){if(dd[4]==="inline"){let p
` ))break;vd[0]==="("?fd+=1:vd[0]===")"?fd-=1:fd===0&&vd[0]===":"&&(pd=!0)}if(!pd||md.trim()===""||/^[#:A-Za-z-]/.test(md))super.rule(dd);else{dd.pop();let vd=new ld;this.init(vd,dd[0][2]);let Ad;for(let Id=dd.length-1;Id>=0;Id--)if(dd[Id][0]!=="space"){Ad=dd[Id];break}if(Ad[3]){let Id=this.input.fromOffset(Ad[3]);vd.source.end={column:Id.col,line:Id.line,offset:Ad[3]+1}}else{let Id=this.input.fromOffset(Ad[2]);vd.source.end={column:Id.col,line:Id.line,offset:Ad[2]+1}}for(;dd[0][0]!=="word";)vd.raws.before+=dd.shift()[1];if(dd[0][2]){let Id=this.input.fromOffset(dd[0][2]);vd.source.start={column:Id.col,line:Id.line,offset:dd[0][2]}}for(vd.prop="";dd.length;){let Id=dd[0][0];if(Id===":"||Id==="space"||Id==="comment")break;vd.prop+=dd.shift()[1]}vd.raws.between="";let Nd;for(;dd.length;)if(Nd=dd.shift(),Nd[0]===":"){vd.raws.between+=Nd[1];break}else vd.raws.between+=Nd[1];(vd.prop[0]==="_"||vd.prop[0]==="*")&&(vd.raws.before+=vd.prop[0],vd.prop=vd.prop.slice(1)),vd.raws.between+=this.spacesAndCommentsFromStart(dd),this.precheckMissedSemicolon(dd);for(let Id=dd.length-1;Id>0;Id--){if(Nd=dd[Id],Nd[1]==="!important"){vd.important=!0;let Od=this.stringFrom(dd,Id);Od=this.spacesFromEnd(dd)+Od,Od!==" !important"&&(vd.raws.important=Od);break}else if(Nd[1]==="important"){let Od=dd.slice(0),Fd="";for(let Pd=Id;Pd>0;Pd--){let Md=Od[Pd][0];if(Fd.trim().indexOf("!")===0&&Md!=="space")break;Fd=Od.pop()[1]+Fd}Fd.trim().indexOf("!")===0&&(vd.important=!0,vd.raws.important=Fd,dd=Od)}if(Nd[0]!=="space"&&Nd[0]!=="comment")break}this.raw(vd,"value",dd),vd.value.includes(":")&&this.checkMissedSemicolon(dd),this.current=vd}}};qa.exports=cd}),ta=y $ 3((Ra,qa)=>{var{Input:nd}=Zt $ 1(),od=Zo $ 1();qa.exports=function(ld,ud){let cd=new nd(ld,ud),dd=new od(cd);return dd.parse(),dd.root}}),Os=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});function qa(nd){this.after=nd.after,this.before=nd.before,this.type=nd.type,this.value=nd.value,this.sourceIndex=nd.sourceIndex}Ra.default=qa}),As=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0});var qa=Os(),nd=od(qa);function od(ud){return ud&&ud.__esModule?ud:{default:ud}}function ld(ud){var cd=this;this.constructor(ud),this.nodes=ud.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(dd){dd.parent=cd})}ld.prototype=Object.create(nd.default.prototype),ld.constructor=nd.default,ld.prototype.walk=function(ud,cd){for(var dd=typeof ud=="string"||ud instanceof RegExp,pd=dd?cd:ud,fd=typeof ud=="string"?new RegExp(ud):ud,md=0;md<this.nodes.length;md++){var vd=this.nodes[md],Ad=dd?fd.test(vd.type):!0;if(Ad&&pd&&pd(vd,md,this.nodes)===!1||vd.nodes&&vd.walk(ud,cd)===!1)return!1}return!0},ld.prototype.each=function(){for(var ud=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],cd=0;cd<this.nodes.length;cd++){var dd=this.nodes[cd];if(ud(dd,cd,this.nodes)===!1)return!1}return!0},Ra.default=ld}),aa=y $ 3(Ra=>{Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.parseMediaFeature=cd,Ra.parseMediaQuery=dd,Ra.parseMediaList=pd;var qa=Os(),nd=ud(qa),od=As(),ld=ud(od);function ud(fd){return fd&&fd.__esModule?fd:{default:fd}}function cd(fd){var md=arguments.length<=1||arguments[1]===void 0?0:arguments[1],vd=[{mode:"normal",character:null}],Ad=[],Nd=0,Id="",Od=null,Fd=null,Pd=md,Md=fd;fd[0]==="("&&fd[fd.length-1]===")"&&(Md=fd.substring(1,fd.length-1),Pd++);for(var Bd=0;Bd<Md.length;Bd++){var jd=Md[Bd];if((jd==="'"||jd==='"')&&(vd[Nd].isCalculationEnabled===!0?(vd.push({mode:"string",isCalculationEnabled:!1,character:jd}),Nd++):vd[Nd].mode==="string"&&vd[Nd].character===jd&&Md[Bd-1]!==" \\ "&&(vd.pop(),Nd--)),jd==="{"?(vd.push({mode:"interpolation",isCalculationEnabled:!0}),Nd++):jd==="}"&&(vd.pop(),Nd--),vd[Nd].mode==="normal"&&jd===":"){var Hd=Md.substring(Bd+1);Fd={type:"value",before:/^( \s *)/.exec(Hd)[1],after:/( \s *) $ /.exec(Hd)[1],value:Hd.trim()},Fd.sourceIndex=Fd.before.length+B
` ),Kf=Mf.length-1,Kf>0?( $ f=yf+Kf,Df=bf-Mf[Kf].length):( $ f=yf,Df=xf),vf.push(["comment",Zf,yf,Bf-xf, $ f,bf-Df,Bf]),xf=Df,yf= $ f,Bf=bf):(Jd.lastIndex=Bf+1,Jd.test(Sf),Jd.lastIndex===0?bf=Sf.length-1:bf=Jd.lastIndex-2,vf.push(["word",Sf.slice(Bf,bf+1),yf,Bf-xf,yf,bf-xf,Bf]),Bf=bf);break}Bf++}return vf}qa.exports=Ra.default}),tu $ 1=y $ 3((Ra,qa)=>{Ra.__esModule=!0;var nd=function(){function xf(yf,Bf){for(var qf=0;qf<Bf.length;qf++){var oh=Bf[qf];oh.enumerable=oh.enumerable||!1,oh.configurable=!0,"value"in oh&&(oh.writable=!0),Object.defineProperty(yf,oh.key,oh)}}return function(yf,Bf,qf){return Bf&&xf(yf.prototype,Bf),qf&&xf(yf,qf),yf}}(),od=qs(),ld=Lf(od),ud=Ls(),cd=Lf(ud),dd=Ds(),pd=Lf(dd),fd=ga $ 1(),md=Lf(fd),vd=xa(),Ad=Lf(vd),Nd=ka(),Id=Lf(Nd),Od=Sa(),Fd=Lf(Od),Pd=Oa $ 1(),Md=Lf(Pd),Bd=Aa(),jd=Lf(Bd),Hd=Pa $ 1(),Gd=Lf(Hd),zd=Ia(),df=Lf(zd),Wd=La(),Jd=Lf(Wd),Xd=Ma(),_f=Lf(Xd),vf=Ua $ 1(),Sf=Lf(vf),gf= $ a $ 1(),bf=Lf(gf),Tf=Ya $ 1(),Mf=Lf(Tf),Kf=Xa $ 1(),Zf=Lf(Kf),eh=D $ 1(), $ f=Df(eh);function Df(xf){if(xf&&xf.__esModule)return xf;var yf={};if(xf!=null)for(var Bf in xf)Object.prototype.hasOwnProperty.call(xf,Bf)&&(yf[Bf]=xf[Bf]);return yf.default=xf,yf}function Lf(xf){return xf&&xf.__esModule?xf:{default:xf}}function zf(xf,yf){if(!(xf instanceof yf))throw new TypeError("Cannot call a class as a function")}var Jf=function(){function xf(yf){zf(this,xf),this.input=yf,this.lossy=yf.options.lossless===!1,this.position=0,this.root=new md.default;var Bf=new Ad.default;return this.root.append(Bf),this.current=Bf,this.lossy?this.tokens=(0,Zf.default)({safe:yf.safe,css:yf.css.trim()}):this.tokens=(0,Zf.default)(yf),this.loop()}return xf.prototype.attribute=function(){var yf="",Bf=void 0,qf=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)yf+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~yf.indexOf("]")&&this.error("Expected a closing square bracket.");var oh=yf.split(/((?:[*~^ $ |]?=))([^]*)/),Yf=oh[0].split(/( \| )/g),kf={operator:oh[1],value:oh[2],source:{start:{line:qf[2],column:qf[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:qf[4]};if(Yf.length>1?(Yf[0]===""&&(Yf[0]=!0),kf.attribute=this.parseValue(Yf[2]),kf.namespace=this.parseNamespace(Yf[0])):kf.attribute=this.parseValue(oh[0]),Bf=new Jd.default(kf),oh[2]){var Vf=oh[2].split(/( \s +i \s *?) $ /),fh=Vf[0].trim();Bf.value=this.lossy?fh:Vf[0],Vf[1]&&(Bf.insensitive=!0,this.lossy||(Bf.raws.insensitive=Vf[1])),Bf.quoted=fh[0]==="'"||fh[0]==='"',Bf.raws.unquoted=Bf.quoted?fh.slice(1,-1):fh}this.newNode(Bf),this.position++},xf.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var yf=new Sf.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(yf.spaces.before=this.parseSpace(this.currToken[1]),yf.source.start.line=this.nextToken[2],yf.source.start.column=this.nextToken[3],yf.source.end.column=this.nextToken[3],yf.source.end.line=this.nextToken[2],yf.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?yf.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?yf.value=this.currToken[1]:this.currToken[0]==="space"&&(yf.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(yf)},xf.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var yf=new Ad.default;this.current.parent.append(yf),this.current=yf,this.position++},xf.prototype.comment=function(){var yf=new Fd.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(yf),this.position++},xf.prototype.error=function(yf){throw new this.input.error(yf)},xf.prototype.mi
` ?(ud=1,cd+=1):ud+=1;return{line:cd,column:ud}}positionBy(od){let ld=this.source.start;if(Object(od).index)ld=this.positionInside(od.index);else if(Object(od).word){let ud=this.toString().indexOf(od.word);ud!==-1&&(ld=this.positionInside(ud))}return ld}}}),U $ 2=y $ 3((Ra,qa)=>{var nd=z $ 2(),od=class extends nd{constructor(ld){super(ld),this.nodes||(this.nodes=[])}push(ld){return ld.parent=this,this.nodes.push(ld),this}each(ld){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let ud=this.lastEach,cd,dd;if(this.indexes[ud]=0,!!this.nodes){for(;this.indexes[ud]<this.nodes.length&&(cd=this.indexes[ud],dd=ld(this.nodes[cd],cd),dd!==!1);)this.indexes[ud]+=1;return delete this.indexes[ud],dd}}walk(ld){return this.each((ud,cd)=>{let dd=ld(ud,cd);return dd!==!1&&ud.walk&&(dd=ud.walk(ld)),dd})}walkType(ld,ud){if(!ld||!ud)throw new Error("Parameters {type} and {callback} are required.");let cd=typeof ld=="function";return this.walk((dd,pd)=>{if(cd&&dd instanceof ld||!cd&&dd.type===ld)return ud.call(this,dd,pd)})}append(ld){return ld.parent=this,this.nodes.push(ld),this}prepend(ld){return ld.parent=this,this.nodes.unshift(ld),this}cleanRaws(ld){if(super.cleanRaws(ld),this.nodes)for(let ud of this.nodes)ud.cleanRaws(ld)}insertAfter(ld,ud){let cd=this.index(ld),dd;this.nodes.splice(cd+1,0,ud);for(let pd in this.indexes)dd=this.indexes[pd],cd<=dd&&(this.indexes[pd]=dd+this.nodes.length);return this}insertBefore(ld,ud){let cd=this.index(ld),dd;this.nodes.splice(cd,0,ud);for(let pd in this.indexes)dd=this.indexes[pd],cd<=dd&&(this.indexes[pd]=dd+this.nodes.length);return this}removeChild(ld){ld=this.index(ld),this.nodes[ld].parent=void 0,this.nodes.splice(ld,1);let ud;for(let cd in this.indexes)ud=this.indexes[cd],ud>=ld&&(this.indexes[cd]=ud-1);return this}removeAll(){for(let ld of this.nodes)ld.parent=void 0;return this.nodes=[],this}every(ld){return this.nodes.every(ld)}some(ld){return this.nodes.some(ld)}index(ld){return typeof ld=="number"?ld:this.nodes.indexOf(ld)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let ld=this.nodes.map(String).join("");return this.value&&(ld=this.value+ld),this.raws.before&&(ld=this.raws.before+ld),this.raws.after&&(ld+=this.raws.after),ld}};od.registerWalker=ld=>{let ud="walk"+ld.name;ud.lastIndexOf("s")!==ud.length-1&&(ud+="s"),!od.prototype[ud]&&(od.prototype[ud]=function(cd){return this.walkType(ld,cd)})},qa.exports=od}),uu $ 2=y $ 3((Ra,qa)=>{var nd=U $ 2();qa.exports=class extends nd{constructor(od){super(od),this.type="root"}}}),cu $ 2=y $ 3((Ra,qa)=>{var nd=U $ 2();qa.exports=class extends nd{constructor(od){super(od),this.type="value",this.unbalanced=0}}}),hu $ 1=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=class extends nd{constructor(ld){super(ld),this.type="atword"}toString(){return this.quoted&&this.raws.quote,[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};nd.registerWalker(od),qa.exports=od}),mu $ 1=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=z $ 2(),ld=class extends od{constructor(ud){super(ud),this.type="colon"}};nd.registerWalker(ld),qa.exports=ld}),wu $ 2=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=z $ 2(),ld=class extends od{constructor(ud){super(ud),this.type="comma"}};nd.registerWalker(ld),qa.exports=ld}),vu $ 2=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=z $ 2(),ld=class extends od{constructor(ud){super(ud),this.type="comment",this.inline=Object(ud).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};nd.registerWalker(ld),qa.exports=ld}),_u $ 2=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=class extends nd{constructor(ld){super(ld),this.type="func",this.unbalanced=-1}};nd.registerWalker(od),qa.exports=od}),Eu $ 1=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=z $ 2(),ld=class extends od{constructor(ud){super(ud),this.type="number",this.unit=Object(ud).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};nd.registerWalker(ld),qa.exports=ld}),Tu $ 1=y $ 3((Ra,qa)=>{var nd=U $ 2(),od=z $ 2(),ld=class extends od{constructor(ud){super(u
` ,Od+2);Bd=Sf!==-1?Sf-1:Ad}zd=vd.slice(Od,Bd+1),Hd=zd.split( `
` ),Gd=Hd.length-1,Gd>0?(df=Id+Gd,Wd=Bd-Hd[Gd].length):(df=Id,Wd=Nd),md.push(["comment",zd,Id,Od-Nd,df,Bd-Wd,Od]),Nd=Wd,Id=df,Od=Bd}else if(Md===35&&!ud.test(vd.slice(Od+1,Od+2)))Bd=Od+1,md.push(["#",vd.slice(Od,Bd),Id,Od-Nd,Id,Bd-Nd,Od]),Od=Bd-1;else if((Md===117||Md===85)&&vd.charCodeAt(Od+1)===43){Bd=Od+2;do Bd+=1,Md=vd.charCodeAt(Bd);while(Bd<Ad&&cd.test(vd.slice(Bd,Bd+1)));md.push(["unicoderange",vd.slice(Od,Bd),Id,Od-Nd,Id,Bd-Nd,Od]),Od=Bd-1}else if(Md===47)Bd=Od+1,md.push(["operator",vd.slice(Od,Bd),Id,Od-Nd,Id,Bd-Nd,Od]),Od=Bd-1;else{let Sf=od;if(Md>=48&&Md<=57&&(Sf=ld),Sf.lastIndex=Od+1,Sf.test(vd),Sf.lastIndex===0?Bd=vd.length-1:Bd=Sf.lastIndex-2,Sf===ld||Md===46){let gf=vd.charCodeAt(Bd),bf=vd.charCodeAt(Bd+1),Tf=vd.charCodeAt(Bd+2);(gf===101||gf===69)&&(bf===45||bf===43)&&Tf>=48&&Tf<=57&&(ld.lastIndex=Bd+2,ld.test(vd),ld.lastIndex===0?Bd=vd.length-1:Bd=ld.lastIndex-2)}md.push(["word",vd.slice(Od,Bd+1),Id,Od-Nd,Id,Bd-Nd,Od]),Od=Bd}break}Od++}return md}}), $ u $ 1=y $ 3((Ra,qa)=>{var nd=class extends Error{constructor(od){super(od),this.name=this.constructor.name,this.message=od||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(od).stack}};qa.exports=nd}),Vu $ 1=y $ 3((Ra,qa)=>{var nd=uu $ 2(),od=cu $ 2(),ld=hu $ 1(),ud=mu $ 1(),cd=wu $ 2(),dd=vu $ 2(),pd=_u $ 2(),fd=Eu $ 1(),md=Tu $ 1(),vd=Cu $ 2(),Ad=Nu $ 1(),Nd=Ru $ 1(),Id=qu $ 1(),Od=Uu $ 1(),Fd=qs(),Pd=Ls(),Md=Ds(),Bd= $ u $ 1();function jd(Hd){return Hd.sort((Gd,zd)=>Gd-zd)}qa.exports=class{constructor(Hd,Gd){let zd={loose:!1};this.cache=[],this.input=Hd,this.options=Object.assign({},zd,Gd),this.position=0,this.unbalanced=0,this.root=new nd;let df=new od;this.root.append(df),this.current=df,this.tokens=Od(Hd,this.options)}parse(){return this.loop()}colon(){let Hd=this.currToken;this.newNode(new ud({value:Hd[1],source:{start:{line:Hd[2],column:Hd[3]},end:{line:Hd[4],column:Hd[5]}},sourceIndex:Hd[6]})),this.position++}comma(){let Hd=this.currToken;this.newNode(new cd({value:Hd[1],source:{start:{line:Hd[2],column:Hd[3]},end:{line:Hd[4],column:Hd[5]}},sourceIndex:Hd[6]})),this.position++}comment(){let Hd=!1,Gd=this.currToken[1].replace(/ \/ \* | \* \/ /g,""),zd;this.options.loose&&Gd.startsWith("//")&&(Gd=Gd.substring(2),Hd=!0),zd=new dd({value:Gd,inline:Hd,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(zd),this.position++}error(Hd,Gd){throw new Bd(Hd+ ` at line : $ { Gd [ 2 ] } , column $ { Gd [ 3 ] } ` )}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let Hd=this.currToken[1],Gd;if(Hd==="+"||Hd==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return Gd=new md({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(Gd)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"wo
2024-11-28 09:28:59 +08:00
Expected it to be 'string' or 'object' . ` ;if(Ve $ 1(Ra))throw new Error("doc is valid.");let nd=Object.prototype.toString.call(Ra);if(nd!=="[object Object]")return ` Unexpected doc '${nd}' . ` ;let od=ml([...bt $ 2].map(ld=> ` '${ld}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { od } . ` }var Fr $ 1=class extends Error{constructor(nd){super(yl(nd));Km(this,"name","InvalidDocError");this.doc=nd}}, $ r $ 1=Fr $ 1,Zs=()=>{},_t $ 1=Zs;function q $ 2(Ra){return{type:we $ 1,contents:Ra}}function en $ 1(Ra,qa){return{type:ge $ 1,contents:qa,n:Ra}}function L $ 2(Ra,qa={}){return _t $ 1(qa.expandedStates),{type:ve $ 1,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function tn $ 1(Ra){return en $ 1({type:"root"},Ra)}function ue $ 1(Ra){return en $ 1(-1,Ra)}function Ge $ 1(Ra){return{type:xe $ 2,parts:Ra}}function kt $ 2(Ra,qa="",nd={}){return{type:oe $ 1,breakContents:Ra,flatContents:qa,groupId:nd.groupId}}var je $ 2={type:be $ 2},wl={type:K $ 1,hard:!0},A $ 1={type:K $ 1},M $ 2={type:K $ 1,soft:!0},E $ 1=[wl,je $ 2];function V $ 2(Ra,qa){let nd=[];for(let od=0;od<qa.length;od++)od!==0&&nd.push(Ra),nd.push(qa[od]);return nd}var gl=(Ra,qa,nd)=>{if(!(Ra&&qa==null))return Array.isArray(qa)||typeof qa=="string"?qa[nd<0?qa.length+nd:nd]:qa.at(nd)},G $ 2=gl;function vl(Ra,qa){if(typeof Ra=="string")return qa(Ra);let nd=new Map;return od(Ra);function od(ud){if(nd.has(ud))return nd.get(ud);let cd=ld(ud);return nd.set(ud,cd),cd}function ld(ud){switch(Ve $ 1(ud)){case Be $ 1:return qa(ud.map(od));case xe $ 2:return qa({...ud,parts:ud.parts.map(od)});case oe $ 1:return qa({...ud,breakContents:od(ud.breakContents),flatContents:od(ud.flatContents)});case ve $ 1:{let{expandedStates:cd,contents:dd}=ud;return cd?(cd=cd.map(od),dd=cd[0]):dd=od(dd),qa({...ud,contents:dd,expandedStates:cd})}case ge $ 1:case we $ 1:case $ e $ 2:case ze $ 1:case We $ 1:return qa({...ud,contents:od(ud.contents)});case Me $ 2:case Ue $ 1:case Fe $ 1:case Ye $ 1:case K $ 1:case be $ 2:return qa(ud);default:throw new $ r $ 1(ud)}}}function xl $ 1(Ra){return Ra.type===K $ 1&&!Ra.hard?Ra.soft?"":" ":Ra.type===oe $ 1?Ra.flatContents:Ra}function rn $ 1(Ra){return vl(Ra,xl $ 1)}function bl(Ra){return Array.isArray(Ra)&&Ra.length>0}var ee $ 1=bl,Et $ 1="'",sn='"';function _l(Ra,qa){let nd=qa===!0||qa===Et $ 1?Et $ 1:sn,od=nd===Et $ 1?sn:Et $ 1,ld=0,ud=0;for(let cd of Ra)cd===nd?ld++:cd===od&&ud++;return ld>ud?od:nd}var nn $ 1=_l;function kl $ 1(Ra,qa,nd){let od=qa==='"'?"'":'"',ld=_ $ 3(!1,Ra,/ \\ (.)|(["'])/gsu,(ud,cd,dd)=>cd===od?cd:dd===qa?" \\ "+dd:dd||(nd&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(cd)?cd:" \\ "+cd));return qa+ld+qa}var on=kl $ 1;function El $ 1(Ra,qa){let nd=Ra.slice(1,-1),od=qa.parser==="json"||qa.parser==="jsonc"||qa.parser==="json5"&&qa.quoteProps==="preserve"&&!qa.singleQuote?'"':qa.__isInHtmlAttribute?"'":nn $ 1(nd,qa.singleQuote);return on(nd,od,!(qa.parser==="css"||qa.parser==="less"||qa.parser==="scss"||qa.__embeddedInHtml))}var St $ 1=El $ 1,Wr $ 1=class extends Error{constructor(nd,od,ld="type"){super( ` Unexpected $ { od } node $ { ld } : $ { JSON . stringify ( nd [ ld ] ) } . ` );Km(this,"name","UnexpectedNodeError");this.node=nd}},an $ 1=Wr $ 1;function Sl(Ra){return(Ra==null?void 0:Ra.type)==="front-matter"}var _e $ 1=Sl,Tl=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function un $ 1(Ra,qa,nd){if(_e $ 1(Ra)&&Ra.language==="yaml"&&delete qa.value,Ra.type==="css-comment"&&nd.type==="css-root"&&nd.nodes.length>0&&((nd.nodes[0]===Ra||_e $ 1(nd.nodes[0])&&nd.nodes[1]===Ra)&&(delete qa.text,/^ \* \s *@(?:format|prettier) \s * $ /u.test(Ra.text))||nd.type==="css-root"&&G $ 2(!1,nd.nodes,-1)===Ra))return null;if(Ra.type==="value-root"&&delete qa.text,(Ra.type==="media-query"||Ra.type==="media-query-list"||Ra.type==="media-feature-expression")&&delete qa.value,Ra.type==="css-rule"&&delete qa.params,(Ra.type==="media-feature"||Ra.type==="media-keyword"||Ra.type==="media-type"||Ra.type==="media-unknown"||Ra.type==="media-url"||Ra.type==="media-value"||Ra.type==="selector-attribute"||Ra.type==="selector-string"||Ra.type==="selector-class"||Ra.type==="selector-combinator"||Ra.type==="value-string")&&Ra.value&&(qa.value=Ol $ 1(Ra.value)),Ra.type==="selector-combinator"&&(qa.value=_ $ 3(!1,qa.value,/ \s +/gu," ")),Ra.type==="media-feature"&&(qa.value=_ $ 3(!1,qa.value," ","")),(Ra.type==="value-word"&&(Ra.isColor&&Ra.isHex||["initial","inherit","unset","revert"].includes(Ra.value.toLowerCase()))||Ra.type==="media-feature"||Ra.type
` ,nd)+1;return nd+Ra.column}var zr $ 1=Il;function Tt $ 2(Ra){return(qa,nd,od)=>{let ld=!!(od!=null&&od.backwards);if(nd===!1)return!1;let{length:ud}=qa,cd=nd;for(;cd>=0&&cd<ud;){let dd=qa.charAt(cd);if(Ra instanceof RegExp){if(!Ra.test(dd))return cd}else if(!Ra.includes(dd))return cd;ld?cd--:cd++}return cd===-1||cd===ud?cd:!1}}var Ot $ 2=Tt $ 2(" "),yn $ 1=Tt $ 2(",; "),Ct $ 1=Tt $ 2(/[^ \n \r ]/u);function wn $ 2(Ra,qa){var nd,od,ld;if(typeof((od=(nd=Ra.source)==null?void 0:nd.start)==null?void 0:od.offset)=="number")return Ra.source.start.offset;if(typeof Ra.sourceIndex=="number")return Ra.sourceIndex;if((ld=Ra.source)!=null&&ld.start)return zr $ 1(Ra.source.start,qa);throw Object.assign(new Error("Can not locate node."),{node:Ra})}function Vr $ 1(Ra,qa){var nd,od;if(Ra.type==="css-comment"&&Ra.inline)return Ct $ 1(qa,Ra.source.startOffset);if(typeof((od=(nd=Ra.source)==null?void 0:nd.end)==null?void 0:od.offset)=="number")return Ra.source.end.offset;if(Ra.source){if(Ra.source.end)return zr $ 1(Ra.source.end,qa);if(ee $ 1(Ra.nodes))return Vr $ 1(G $ 2(!1,Ra.nodes,-1),qa)}return null}function Gr $ 1(Ra,qa){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,qa),Ra.source.endOffset=Vr $ 1(Ra,qa));for(let nd in Ra){let od=Ra[nd];nd==="source"||!od||typeof od!="object"||(od.type==="value-root"||od.type==="value-unknown"?gn $ 2(od,ql(Ra),od.text||od.value):Gr $ 1(od,qa))}}function gn $ 2(Ra,qa,nd){Ra.source&&(Ra.source.startOffset=wn $ 2(Ra,nd)+qa,Ra.source.endOffset=Vr $ 1(Ra,nd)+qa);for(let od in Ra){let ld=Ra[od];od==="source"||!ld||typeof ld!="object"||gn $ 2(ld,qa,nd)}}function ql(Ra){var qa;let nd=Ra.source.startOffset;return typeof Ra.prop=="string"&&(nd+=Ra.prop.length),Ra.type==="css-atrule"&&typeof Ra.name=="string"&&(nd+=1+Ra.name.length+Ra.raws.afterName.match(/^ \s *:? \s */u)[0].length),Ra.type!=="css-atrule"&&typeof((qa=Ra.raws)==null?void 0:qa.between)=="string"&&(nd+=Ra.raws.between.length),nd}function vn $ 1(Ra){let qa="initial",nd="initial",od,ld=!1,ud=[];for(let cd=0;cd<Ra.length;cd++){let dd=Ra[cd];switch(qa){case"initial":if(dd==="'"){qa="single-quotes";continue}if(dd==='"'){qa="double-quotes";continue}if((dd==="u"||dd==="U")&&Ra.slice(cd,cd+4).toLowerCase()==="url("){qa="url",cd+=3;continue}if(dd==="*"&&Ra[cd-1]==="/"){qa="comment-block";continue}if(dd==="/"&&Ra[cd-1]==="/"){qa="comment-inline",od=cd-1;continue}continue;case"single-quotes":if(dd==="'"&&Ra[cd-1]!==" \\ "&&(qa=nd,nd="initial"),dd=== `
` ||dd===" \r ")return Ra;continue;case"double-quotes":if(dd==='"'&&Ra[cd-1]!==" \\ "&&(qa=nd,nd="initial"),dd=== `
` ||dd===" \r ")return Ra;continue;case"url":if(dd===")"&&(qa="initial"),dd=== `
` ||dd===" \r ")return Ra;if(dd==="'"){qa="single-quotes",nd="url";continue}if(dd==='"'){qa="double-quotes",nd="url";continue}continue;case"comment-block":dd==="/"&&Ra[cd-1]==="*"&&(qa="initial");continue;case"comment-inline":(dd==='"'||dd==="'"||dd==="*")&&(ld=!0),(dd=== `
` ||dd===" \r ")&&(ld&&ud.push([od,cd]),qa="initial",ld=!1);continue}}for(let[cd,dd]of ud)Ra=Ra.slice(0,cd)+_ $ 3(!1,Ra.slice(cd,dd),/["'*]/gu," ")+Ra.slice(dd);return Ra}function N $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.startOffset}function P $ 2(Ra){var qa;return(qa=Ra.source)==null?void 0:qa.endOffset}var Ll=/ \* \/ $ /,Dl $ 1=/^ \/ \* \* ?/,kn $ 1=/^ \s *( \/ \* \* ?(.| \r ? \n )*? \* \/ )/,Ml $ 1=/(^| \s +) \/ \/ ([^ \n \r ]*)/g,xn $ 1=/^( \r ? \n )+/,Bl=/(?:^| \r ? \n ) *(@[^ \n \r ]*?) * \r ? \n *(?![^ \n \r @]* \/ \/ [^]*)([^ \s @][^ \n \r @]+?) * \r ? \n /g,bn $ 2=/(?:^| \r ? \n ) *@( \S +) *([^ \n \r ]*)/g,Ul $ 1=/( \r ? \n |^) * \* ?/g,En $ 1=[];function Sn $ 1(Ra){let qa=Ra.match(kn $ 1);return qa?qa[0].trimStart():""}function Tn $ 2(Ra){let qa=Ra.match(kn $ 1),nd=qa==null?void 0:qa[0];return nd==null?Ra:Ra.slice(nd.length)}function On $ 1(Ra){let qa= `
` ;Ra=_ $ 3(!1,Ra.replace(Dl $ 1,"").replace(Ll,""),Ul $ 1," $ 1");let nd="";for(;nd!==Ra;)nd=Ra,Ra=_ $ 3(!1,Ra,Bl, ` $ { qa } $1 $2$ { qa } ` );Ra=Ra.replace(xn $ 1,"").trimEnd();let od=Object.create(null),ld=_ $ 3(!1,Ra,bn $ 2,"").replace(xn $ 1,"").trimEnd(),ud;for(;ud=bn $ 2.exec(Ra);){let cd=_ $ 3(!1,ud[2],Ml $ 1,"");if(typeof od[ud[1]]=="string"||Array.isArray(od[ud[1]])){let dd=od[ud[1]];od[ud[1]]=[...En $ 1,...Array.isArray(dd)?dd:[dd],cd]}else od[ud[1]]=cd}return{comments:ld,pragmas:od}}function Cn $ 2({comments:Ra="",pragmas:qa={}}){let nd= `
` ,od="/**",ld=" *",ud=" */",cd=Object.keys(qa),dd=cd.flatMap(fd=>_n $ 2(fd,qa[fd])).map(fd=> ` $ { ld } $ { fd } $ { nd } ` ).join("");if(!Ra){if(cd.length===0)return"";if(cd.length===1&&!Array.isArray(qa[cd[0]])){let fd=qa[cd[0]];return ` $ { od } $ { _n$2 ( cd [ 0 ] , fd ) [ 0 ] } $ { ud } ` }}let pd=Ra.split(nd).map(fd=> ` $ { ld } $ { fd } ` ).join(nd)+nd;return od+nd+(Ra?pd:"")+(Ra&&cd.length>0?ld+nd:"")+dd+ud}function _n $ 2(Ra,qa){return[...En $ 1,...Array.isArray(qa)?qa:[qa]].map(nd=> ` @ $ { Ra } $ { nd } ` .trim())}function Fl(Ra){if(!Ra.startsWith("#!"))return"";let qa=Ra.indexOf( `
` );return qa===-1?Ra:Ra.slice(0,qa)}var An $ 1=Fl;function Nn $ 1(Ra){let qa=An $ 1(Ra);qa&&(Ra=Ra.slice(qa.length+1));let nd=Sn $ 1(Ra),{pragmas:od,comments:ld}=On $ 1(nd);return{shebang:qa,text:Ra,pragmas:od,comments:ld}}function Pn $ 2(Ra){let{pragmas:qa}=Nn $ 1(Ra);return Object.prototype.hasOwnProperty.call(qa,"prettier")||Object.prototype.hasOwnProperty.call(qa,"format")}function Rn(Ra){let{shebang:qa,text:nd,pragmas:od,comments:ld}=Nn $ 1(Ra),ud=Tn $ 2(nd),cd=Cn $ 2({pragmas:{format:"",...od},comments:ld.trimStart()});return(qa? ` $ { qa }
` :"")+cd+(ud.startsWith( `
2024-09-18 09:46:23 +08:00
` )? `
` : `
2024-11-28 09:28:59 +08:00
` )+ud}var Qe $ 1=3;function $ l(Ra){let qa=Ra.slice(0,Qe $ 1);if(qa!=="---"&&qa!=="+++")return;let nd=Ra.indexOf( `
` ,Qe $ 1);if(nd===-1)return;let od=Ra.slice(Qe $ 1,nd).trim(),ld=Ra.indexOf( `
$ { qa } ` ,nd),ud=od;if(ud||(ud=qa==="+++"?"toml":"yaml"),ld===-1&&qa==="---"&&ud==="yaml"&&(ld=Ra.indexOf( `
... ` ,nd)),ld===-1)return;let cd=ld+1+Qe $ 1,dd=Ra.charAt(cd+1);if(!/ \s ?/u.test(dd))return;let pd=Ra.slice(0,cd);return{type:"front-matter",language:ud,explicitLanguage:od,value:Ra.slice(nd+1,ld),startDelimiter:qa,endDelimiter:pd.slice(-Qe $ 1),raw:pd}}function Wl $ 1(Ra){let qa= $ l(Ra);if(!qa)return{content:Ra};let{raw:nd}=qa;return{frontMatter:qa,content:_ $ 3(!1,nd,/[^ \n ]/gu," ")+Ra.slice(nd.length)}}var Je $ 2=Wl $ 1;function In(Ra){return Pn $ 2(Je $ 2(Ra).content)}function qn $ 2(Ra){let{frontMatter:qa,content:nd}=Je $ 2(Ra);return(qa?qa.raw+ `
2024-12-08 09:17:51 +08:00
` :"")+Rn(nd)}var Yl=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function Ln(Ra){var qa,nd;return(nd=(qa=Ra.findAncestor(od=>od.type==="css-decl"))==null?void 0:qa.prop)==null?void 0:nd.toLowerCase()}var zl $ 1=new Set(["initial","inherit","unset","revert"]);function Dn $ 2(Ra){return zl $ 1.has(Ra.toLowerCase())}function Mn(Ra,qa){var nd;let od=Ra.findAncestor(ld=>ld.type==="css-atrule");return((nd=od==null?void 0:od.name)==null?void 0:nd.toLowerCase().endsWith("keyframes"))&&["from","to"].includes(qa.toLowerCase())}function te $ 1(Ra){return Ra.includes(" $ ")||Ra.includes("@")||Ra.includes("#")||Ra.startsWith("%")||Ra.startsWith("--")||Ra.startsWith(":--")||Ra.includes("(")&&Ra.includes(")")?Ra:Ra.toLowerCase()}function ke $ 1(Ra,qa){var nd;let od=Ra.findAncestor(ld=>ld.type==="value-func");return((nd=od==null?void 0:od.value)==null?void 0:nd.toLowerCase())===qa}function Bn $ 2(Ra){var qa;let nd=Ra.findAncestor(ld=>ld.type==="css-rule"),od=(qa=nd==null?void 0:nd.raws)==null?void 0:qa.selector;return od&&(od.startsWith(":import")||od.startsWith(":export"))}function Ee $ 1(Ra,qa){let nd=Array.isArray(qa)?qa:[qa],od=Ra.findAncestor(ld=>ld.type==="css-atrule");return od&&nd.includes(od.name.toLowerCase())}function Un $ 1(Ra){var qa;let{node:nd}=Ra;return nd.groups[0].value==="url"&&nd.groups.length===2&&((qa=Ra.findAncestor(od=>od.type==="css-atrule"))==null?void 0:qa.name)==="import"}function Fn $ 1(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="url"}function $ n $ 2(Ra){return Ra.type==="value-func"&&Ra.value.toLowerCase()==="var"}function Wn(Ra){let{selector:qa}=Ra;return qa?typeof qa=="string"&&/^@.+:.* $ /u.test(qa)||qa.value&&/^@.+:.* $ /u.test(qa.value):!1}function Yn $ 1(Ra){return Ra.type==="value-word"&&["from","through","end"].includes(Ra.value)}function zn $ 1(Ra){return Ra.type==="value-word"&&["and","or","not"].includes(Ra.value)}function Vn $ 1(Ra){return Ra.type==="value-word"&&Ra.value==="in"}function At $ 2(Ra){return Ra.type==="value-operator"&&Ra.value==="*"}function Xe $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="/"}function Q $ 3(Ra){return Ra.type==="value-operator"&&Ra.value==="+"}function le $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="-"}function Vl $ 1(Ra){return Ra.type==="value-operator"&&Ra.value==="%"}function Nt $ 2(Ra){return At $ 2(Ra)||Xe $ 1(Ra)||Q $ 3(Ra)||le $ 1(Ra)||Vl $ 1(Ra)}function Gn $ 2(Ra){return Ra.type==="value-word"&&["==","!="].includes(Ra.value)}function jn $ 1(Ra){return Ra.type==="value-word"&&["<",">","<=",">="].includes(Ra.value)}function Ze $ 1(Ra,qa){return qa.parser==="scss"&&Ra.type==="css-atrule"&&["if","else","for","each","while"].includes(Ra.name)}function Hr $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.params)&&/^ \( \s * \) $ /u.test(Ra.raws.params)}function Pt $ 1(Ra){return Ra.name.startsWith("prettier-placeholder")}function Hn(Ra){return Ra.prop.startsWith("@prettier-placeholder")}function Kn $ 1(Ra,qa){return Ra.value===" $ $ "&&Ra.type==="value-func"&&(qa==null?void 0:qa.type)==="value-word"&&!qa.raws.before}function Qn $ 2(Ra){var qa,nd;return((qa=Ra.value)==null?void 0:qa.type)==="value-root"&&((nd=Ra.value.group)==null?void 0:nd.type)==="value-value"&&Ra.prop.toLowerCase()==="composes"}function Jn $ 2(Ra){var qa,nd,od;return((od=(nd=(qa=Ra.value)==null?void 0:qa.group)==null?void 0:nd.group)==null?void 0:od.type)==="value-paren_group"&&Ra.value.group.group.open!==null&&Ra.value.group.group.close!==null}function ce $ 1(Ra){var qa;return((qa=Ra.raws)==null?void 0:qa.before)===""}function Rt $ 2(Ra){var qa,nd;return Ra.type==="value-comma_group"&&((nd=(qa=Ra.groups)==null?void 0:qa[1])==null?void 0:nd.type)==="value-colon"}function jr $ 1(Ra){var qa;return Ra.type==="value-paren_group"&&((qa=Ra.groups)==null?void 0:qa[0])&&Rt $ 2(Ra.groups[0])}function Kr $ 1(Ra,qa){var nd;if(qa.parser!=="scss")return!1;let{node:od}=Ra;if(od.groups.length===0)return!1;let ld=Ra.grandparent;if(!jr $ 1(od)&&!(ld&&jr $ 1(ld)))return!1;let ud=Ra.findAncestor(cd=>cd.type==="css-dec
2024-11-28 09:28:59 +08:00
` )return qa-2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa-1}else{if(ld===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(ld=== `
2024-12-08 09:17:51 +08:00
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa+1}return qa}var Dt $ 2=Xl $ 1;function Zl $ 1(Ra,qa,nd={}){let od=Ot $ 2(Ra,nd.backwards?qa-1:qa,nd),ld=Dt $ 2(Ra,od,nd);return od!==ld}var Mt $ 1=Zl $ 1;function ec(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let nd=qa+2;nd<Ra.length;++nd)if(Ra.charAt(nd)==="*"&&Ra.charAt(nd+1)==="/")return nd+2}return qa}var ui $ 2=ec;function tc(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?Ct $ 1(Ra,qa):qa}var li $ 2=tc;function rc $ 1(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=yn $ 1(Ra,od),od=ui $ 2(Ra,od),od=Ot $ 2(Ra,od);return od=li $ 2(Ra,od),od=Dt $ 2(Ra,od),od!==!1&&Mt $ 1(Ra,od)}var Bt $ 2=rc $ 1;function sc({node:Ra,parent:qa},nd){return!!(Ra.source&&nd.originalText.slice(N $ 2(Ra),N $ 2(qa.close)).trimEnd().endsWith(","))}function nc(Ra,qa){return $ n $ 2(Ra.grandparent)&&sc(Ra,qa)?",":Ra.node.type!=="value-comment"&&!(Ra.node.type==="value-comma_group"&&Ra.node.groups.every(nd=>nd.type==="value-comment"))&&ai $ 2(qa)&&Ra.callParent(()=>Kr $ 1(Ra,qa))?kt $ 2(","):""}function ci $ 2(Ra,qa,nd){let{node:od,parent:ld}=Ra,ud=Ra.map(({node:Nd})=>typeof Nd=="string"?Nd:nd(),"groups");if(ld&&Fn $ 1(ld)&&(od.groups.length===1||od.groups.length>0&&od.groups[0].type==="value-comma_group"&&od.groups[0].groups.length>0&&od.groups[0].groups[0].type==="value-word"&&od.groups[0].groups[0].value.startsWith("data:")))return[od.open?nd("open"):"",V $ 2(",",ud),od.close?nd("close"):""];if(!od.open){let Nd=es $ 1(Ra),Id=V $ 2([",",Nd?E $ 1:A $ 1],ud);return q $ 2(Nd?[E $ 1,Id]:L $ 2(Ge $ 1(Id)))}let cd=Ra.map(({node:Nd,isLast:Id,index:Od})=>{var Fd;let Pd=ud[Od];if(Rt $ 2(Nd)&&Nd.type==="value-comma_group"&&Nd.groups&&Nd.groups[0].type!=="value-paren_group"&&((Fd=Nd.groups[2])==null?void 0:Fd.type)==="value-paren_group"){let{parts:Bd}=Pd.contents.contents;Bd[1]=L $ 2(Bd[1]),Pd=L $ 2(ue $ 1(Pd))}let Md=[Pd,Id?nc(Ra,qa):","];if(!Id&&Nd.type==="value-comma_group"&&ee $ 1(Nd.groups)){let Bd=G $ 2(!1,Nd.groups,-1);!Bd.source&&Bd.close&&(Bd=Bd.close),Bd.source&&Bt $ 2(qa.originalText,P $ 2(Bd))&&Md.push(E $ 1)}return Md},"groups"),dd=Xn $ 2(od,ld),pd=ti $ 1(od,ld),fd=Kr $ 1(Ra,qa),md=pd||fd&&!dd,vd=pd||dd,Ad=L $ 2([od.open?nd("open"):"",q $ 2([M $ 2,V $ 2(A $ 1,cd)]),M $ 2,od.close?nd("close"):""],{shouldBreak:md});return vd?ue $ 1(Ad):Ad}function es $ 1(Ra){return Ra.match(qa=>qa.type==="value-paren_group"&&!qa.open&&qa.groups.some(nd=>nd.type==="value-comma_group"),(qa,nd)=>nd==="group"&&qa.type==="value-value",(qa,nd)=>nd==="group"&&qa.type==="value-root",(qa,nd)=>nd==="value"&&(qa.type==="css-decl"&&!qa.prop.startsWith("--")||qa.type==="css-atrule"&&qa.variable))}function ic $ 1(Ra,qa,nd){let od=[];return Ra.each(()=>{let{node:ld,previous:ud}=Ra;if((ud==null?void 0:ud.type)==="css-comment"&&ud.text.trim()==="prettier-ignore"?od.push(qa.originalText.slice(N $ 2(ld),P $ 2(ld))):od.push(nd()),Ra.isLast)return;let{next:cd}=Ra;cd.type==="css-comment"&&!Mt $ 1(qa.originalText,N $ 2(cd),{backwards:!0})&&!_e $ 1(ld)||cd.type==="css-atrule"&&cd.name==="else"&&ld.type!=="css-comment"?od.push(" "):(od.push(qa.__isHTMLStyleAttribute?A $ 1:E $ 1),Bt $ 2(qa.originalText,P $ 2(ld))&&!_e $ 1(ld)&&od.push(E $ 1))},"nodes"),od}var Te $ 1=ic $ 1;function oc(Ra,qa,nd){var od,ld,ud,cd,dd,pd;let{node:fd}=Ra;switch(fd.type){case"front-matter":return[fd.raw,E $ 1];case"css-root":{let md=Te $ 1(Ra,qa,nd),vd=fd.raws.after.trim();return vd.startsWith(";")&&(vd=vd.slice(1).trim()),[fd.frontMatter?[nd("frontMatter"),E $ 1]:"",md,vd? ` $ { vd } ` :"",fd.nodes.length>0?E $ 1:""]}case"css-comment":{let md=fd.inline||fd.raws.inline,vd=qa.originalText.slice(N $ 2(fd),P $ 2(fd));return md?vd.trimEnd():vd}case"css-rule":return[nd("selector"),fd.important?" !important":"",fd.nodes?[((od=fd.selector)==null?void 0:od.type)==="selector-unknown"&&Se $ 1(fd.selector.value)?A $ 1:fd.selector?" ":"","{",fd.nodes.length>0?q $ 2([E $ 1,Te $ 1(Ra,qa,nd)]):"",E $ 1,"}",Wn(fd)?";":""]:";"];case"css-decl":{let md=Ra.parent,{between:vd}=fd.raws,Ad=vd.trim(),Nd=Ad===":",Id=typeof fd.value=="string"&&/^ * $ /u.test(fd.value),Od=typeof fd.value=="string"?fd.value:nd("value");return Od=Qn $ 2(fd)?rn $ 1(Od):Od,!Nd&&Se $ 1(Ad)&&!((ud=(ld=fd.value)==null?void 0:ld
` ,Hd(jd.gutter,bf.replace(/ \d /g," "))," ",Zf,Hd(jd.marker,"^").repeat(eh)].join(""),Mf&&Pd.message&&(Kf+=" "+Hd(jd.message,Pd.message))}return[Hd(jd.marker,">"),Hd(jd.gutter,bf),vf.length>0? ` $ { vf } ` :"",Kf].join("")}else return ` $ { Hd ( jd . gutter , bf ) } $ { vf . length > 0 ? ` ${ vf } ` : "" } ` }).join( `
` );return Pd.message&&!Jd&&(_f= ` $ { " " . repeat ( Xd + 1 ) } $ { Pd . message }
2024-11-28 09:28:59 +08:00
$ { _f } ` ),Md?Bd.reset(_f):_f}function Id(Od,Fd,Pd,Md={}){if(!fd){fd=!0;let Bd="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use ` codeFrameColumns ` .";{let jd=new Error(Bd);jd.name="DeprecationWarning",console.warn(new Error(Bd))}}return Pd=Math.max(Pd,0),Nd(Od,{start:{column:Pd,line:Fd}},Md)}}),ir={};We(ir,{__debug:()=>di $ 1,check:()=>fi,doc:()=>nr,format:()=>gu $ 1,formatWithCursor:()=>Cu $ 1,getSupportInfo:()=>pi $ 2,util:()=>or,version:()=>fu $ 1});var Ou=(Ra,qa,nd,od)=>{if(!(Ra&&qa==null))return qa.replaceAll?qa.replaceAll(nd,od):nd.global?qa.replace(nd,od):qa.split(nd).join(od)},ne $ 1=Ou;function Z $ 1(){}Z $ 1.prototype={diff:function(Ra,qa){var nd,od=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ld=od.callback;typeof od=="function"&&(ld=od,od={}),this.options=od;var ud=this;function cd(Bd){return ld?(setTimeout(function(){ld(void 0,Bd)},0),!0):Bd}Ra=this.castInput(Ra),qa=this.castInput(qa),Ra=this.removeEmpty(this.tokenize(Ra)),qa=this.removeEmpty(this.tokenize(qa));var dd=qa.length,pd=Ra.length,fd=1,md=dd+pd;od.maxEditLength&&(md=Math.min(md,od.maxEditLength));var vd=(nd=od.timeout)!==null&&nd!==void 0?nd:1/0,Ad=Date.now()+vd,Nd=[{oldPos:-1,lastComponent:void 0}],Id=this.extractCommon(Nd[0],qa,Ra,0);if(Nd[0].oldPos+1>=pd&&Id+1>=dd)return cd([{value:this.join(qa),count:qa.length}]);var Od=-1/0,Fd=1/0;function Pd(){for(var Bd=Math.max(Od,-fd);Bd<=Math.min(Fd,fd);Bd+=2){var jd=void 0,Hd=Nd[Bd-1],Gd=Nd[Bd+1];Hd&&(Nd[Bd-1]=void 0);var zd=!1;if(Gd){var df=Gd.oldPos-Bd;zd=Gd&&0<=df&&df<dd}var Wd=Hd&&Hd.oldPos+1<pd;if(!zd&&!Wd){Nd[Bd]=void 0;continue}if(!Wd||zd&&Hd.oldPos+1<Gd.oldPos?jd=ud.addToPath(Gd,!0,void 0,0):jd=ud.addToPath(Hd,void 0,!0,1),Id=ud.extractCommon(jd,qa,Ra,Bd),jd.oldPos+1>=pd&&Id+1>=dd)return cd(Su(ud,jd.lastComponent,qa,Ra,ud.useLongestToken));Nd[Bd]=jd,jd.oldPos+1>=pd&&(Fd=Math.min(Fd,Bd-1)),Id+1>=dd&&(Od=Math.max(Od,Bd+1))}fd++}if(ld)(function Bd(){setTimeout(function(){if(fd>md||Date.now()>Ad)return ld();Pd()||Bd()},0)})();else for(;fd<=md&&Date.now()<=Ad;){var Md=Pd();if(Md)return Md}},addToPath:function(Ra,qa,nd,od){var ld=Ra.lastComponent;return ld&&ld.added===qa&&ld.removed===nd?{oldPos:Ra.oldPos+od,lastComponent:{count:ld.count+1,added:qa,removed:nd,previousComponent:ld.previousComponent}}:{oldPos:Ra.oldPos+od,lastComponent:{count:1,added:qa,removed:nd,previousComponent:ld}}},extractCommon:function(Ra,qa,nd,od){for(var ld=qa.length,ud=nd.length,cd=Ra.oldPos,dd=cd-od,pd=0;dd+1<ld&&cd+1<ud&&this.equals(qa[dd+1],nd[cd+1]);)dd++,cd++,pd++;return pd&&(Ra.lastComponent={count:pd,previousComponent:Ra.lastComponent}),Ra.oldPos=cd,dd},equals:function(Ra,qa){return this.options.comparator?this.options.comparator(Ra,qa):Ra===qa||this.options.ignoreCase&&Ra.toLowerCase()===qa.toLowerCase()},removeEmpty:function(Ra){for(var qa=[],nd=0;nd<Ra.length;nd++)Ra[nd]&&qa.push(Ra[nd]);return qa},castInput:function(Ra){return Ra},tokenize:function(Ra){return Ra.split("")},join:function(Ra){return Ra.join("")}};function Su(Ra,qa,nd,od,ld){for(var ud=[],cd;qa;)ud.push(qa),cd=qa.previousComponent,delete qa.previousComponent,qa=cd;ud.reverse();for(var dd=0,pd=ud.length,fd=0,md=0;dd<pd;dd++){var vd=ud[dd];if(vd.removed){if(vd.value=Ra.join(od.slice(md,md+vd.count)),md+=vd.count,dd&&ud[dd-1].added){var Ad=ud[dd-1];ud[dd-1]=ud[dd],ud[dd]=Ad}}else{if(!vd.added&&ld){var Nd=nd.slice(fd,fd+vd.count);Nd=Nd.map(function(Od,Fd){var Pd=od[md+Fd];return Pd.length>Od.length?Pd:Od}),vd.value=Ra.join(Nd)}else vd.value=Ra.join(nd.slice(fd,fd+vd.count));fd+=vd.count,vd.added||(md+=vd.count)}}var Id=ud[pd-1];return pd>1&&typeof Id.value=="string"&&(Id.added||Id.removed)&&Ra.equals("",Id.value)&&(ud[pd-2].value+=Id.value,ud.pop()),ud}var lr=/^[A-Za-z \x C0- \u 02C6 \u 02C8- \u 02D7 \u 02DE- \u 02FF \u 1E00- \u 1EFF]+ $ /,cr=/ \S /,fr=new Z $ 1;fr.equals=function(Ra,qa){return this.options.ignoreCase&&(Ra=Ra.toLowerCase(),qa=qa.toLowerCase()),Ra===qa||this.options.ignoreWhitespace&&!cr.test(Ra)&&!cr.test(qa)};fr.tokenize=function(Ra){for(var qa=Ra.split(/([^ \S \r \n ]+|[()[ \] {}'" \r \n ]| \b )/),nd=0;nd<qa.length-1;nd++)!qa[nd+1]&&qa[nd+2]&&l
` ));var qa=[],nd=Ra.split(/( \n | \r \n )/);nd[nd.length-1]||nd.pop();for(var od=0;od<nd.length;od++){var ld=nd[od];od%2&&!this.options.newlineIsToken?qa[qa.length-1]+=ld:(this.options.ignoreWhitespace&&(ld=ld.trim()),qa.push(ld))}return qa};var Nu=new Z $ 1;Nu.tokenize=function(Ra){return Ra.split(/( \S .+?[.!?])(?= \s +| $ )/)};var Tu=new Z $ 1;Tu.tokenize=function(Ra){return Ra.split(/([{}:;,]| \s +)/)};function $ e $ 1(Ra){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"? $ e $ 1=function(qa){return typeof qa}: $ e $ 1=function(qa){return qa&&typeof Symbol=="function"&&qa.constructor===Symbol&&qa!==Symbol.prototype?"symbol":typeof qa}, $ e $ 1(Ra)}var ku=Object.prototype.toString,Ae $ 1=new Z $ 1;Ae $ 1.useLongestToken=!0;Ae $ 1.tokenize=pr.tokenize;Ae $ 1.castInput=function(Ra){var qa=this.options,nd=qa.undefinedReplacement,od=qa.stringifyReplacer,ld=od===void 0?function(ud,cd){return typeof cd>"u"?nd:cd}:od;return typeof Ra=="string"?Ra:JSON.stringify(Bt $ 1(Ra,null,null,ld),ld," ")};Ae $ 1.equals=function(Ra,qa){return Z $ 1.prototype.equals.call(Ae $ 1,Ra.replace(/,([ \r \n ])/g," $ 1"),qa.replace(/,([ \r \n ])/g," $ 1"))};function Bt $ 1(Ra,qa,nd,od,ld){qa=qa||[],nd=nd||[],od&&(Ra=od(ld,Ra));var ud;for(ud=0;ud<qa.length;ud+=1)if(qa[ud]===Ra)return nd[ud];var cd;if(ku.call(Ra)==="[object Array]"){for(qa.push(Ra),cd=new Array(Ra.length),nd.push(cd),ud=0;ud<Ra.length;ud+=1)cd[ud]=Bt $ 1(Ra[ud],qa,nd,od,ld);return qa.pop(),nd.pop(),cd}if(Ra&&Ra.toJSON&&(Ra=Ra.toJSON()), $ e $ 1(Ra)==="object"&&Ra!==null){qa.push(Ra),cd={},nd.push(cd);var dd=[],pd;for(pd in Ra)Ra.hasOwnProperty(pd)&&dd.push(pd);for(dd.sort(),ud=0;ud<dd.length;ud+=1)pd=dd[ud],cd[pd]=Bt $ 1(Ra[pd],qa,nd,od,pd);qa.pop(),nd.pop()}else cd=Ra;return cd}var Ve=new Z $ 1;Ve.tokenize=function(Ra){return Ra.slice()};Ve.join=Ve.removeEmpty=function(Ra){return Ra};function dr(Ra,qa,nd){return Ve.diff(Ra,qa,nd)}function Fr(Ra){let qa=Ra.indexOf(" \r ");return qa>=0?Ra.charAt(qa+1)=== `
2024-09-18 09:46:23 +08:00
` ?"crlf":"cr":"lf"}function Be(Ra){switch(Ra){case"cr":return" \r ";case"crlf":return ` \ r
` ;default:return `
2024-11-28 09:28:59 +08:00
` }}function wt(Ra,qa){let nd;switch(qa){case `
` :nd=/ \n /gu;break;case" \r ":nd=/ \r /gu;break;case ` \ r
` :nd=/ \r \n /gu;break;default:throw new Error( ` Unexpected "eol" $ { JSON . stringify ( qa ) } . ` )}let od=Ra.match(nd);return od?od.length:0}function mr(Ra){return ne $ 1(!1,Ra,/ \r \n ?/gu, `
2024-09-25 14:23:53 +08:00
` )}var U $ 1="string",W $ 1="array",z $ 1="cursor",L $ 1="indent",P $ 1="align",I $ 1="trim",x $ 2="group",S $ 1="fill",_ $ 2="if-break",R $ 3="indent-if-break",Y $ 1="line-suffix",j $ 1="line-suffix-boundary",B $ 1="line",N $ 1="label",b $ 1="break-parent",Ue=new Set([z $ 1,L $ 1,P $ 1,I $ 1,x $ 2,S $ 1,_ $ 2,R $ 3,Y $ 1,j $ 1,B $ 1,N $ 1,b $ 1]);function Lu(Ra){if(typeof Ra=="string")return U $ 1;if(Array.isArray(Ra))return W $ 1;if(!Ra)return;let{type:qa}=Ra;if(Ue.has(qa))return qa}var G $ 1=Lu,Pu=Ra=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(Ra);function Iu(Ra){let qa=Ra===null?"null":typeof Ra;if(qa!=="string"&&qa!=="object")return ` Unexpected doc '${qa}' ,
2024-11-28 09:28:59 +08:00
Expected it to be 'string' or 'object' . ` ;if(G $ 1(Ra))throw new Error("doc is valid.");let nd=Object.prototype.toString.call(Ra);if(nd!=="[object Object]")return ` Unexpected doc '${nd}' . ` ;let od=Pu([...Ue].map(ld=> ` '${ld}' ` ));return ` Unexpected doc . type '${Ra.type}' .
Expected it to be $ { od } . ` }var xt=class extends Error{constructor(qa){super(Iu(qa));Km(this,"name","InvalidDocError");this.doc=qa}},Q $ 2=xt,Er={};function Ru(Ra,qa,nd,od){let ld=[Ra];for(;ld.length>0;){let ud=ld.pop();if(ud===Er){nd(ld.pop());continue}nd&&ld.push(ud,Er);let cd=G $ 1(ud);if(!cd)throw new Q $ 2(ud);if((qa==null?void 0:qa(ud))!==!1)switch(cd){case W $ 1:case S $ 1:{let dd=cd===W $ 1?ud:ud.parts;for(let pd=dd.length,fd=pd-1;fd>=0;--fd)ld.push(dd[fd]);break}case _ $ 2:ld.push(ud.flatContents,ud.breakContents);break;case x $ 2:if(od&&ud.expandedStates)for(let dd=ud.expandedStates.length,pd=dd-1;pd>=0;--pd)ld.push(ud.expandedStates[pd]);else ld.push(ud.contents);break;case P $ 1:case L $ 1:case R $ 3:case N $ 1:case Y $ 1:ld.push(ud.contents);break;case U $ 1:case z $ 1:case I $ 1:case j $ 1:case B $ 1:case b $ 1:break;default:throw new Q $ 2(ud)}}}var we=Ru,hr $ 2=()=>{},ze=hr $ 2;function De(Ra){return{type:L $ 1,contents:Ra}}function ae(Ra,qa){return{type:P $ 1,contents:qa,n:Ra}}function _t(Ra,qa={}){return ze(qa.expandedStates),{type:x $ 2,id:qa.id,contents:Ra,break:!!qa.shouldBreak,expandedStates:qa.expandedStates}}function Cr(Ra){return ae(Number.NEGATIVE_INFINITY,Ra)}function gr(Ra){return ae({type:"root"},Ra)}function yr(Ra){return ae(-1,Ra)}function Ar(Ra,qa){return _t(Ra[0],{...qa,expandedStates:Ra})}function Ge(Ra){return{type:S $ 1,parts:Ra}}function Br(Ra,qa="",nd={}){return{type:_ $ 2,breakContents:Ra,flatContents:qa,groupId:nd.groupId}}function wr(Ra,qa){return{type:R $ 3,contents:Ra,groupId:qa.groupId,negate:qa.negate}}function xe $ 1(Ra){return{type:Y $ 1,contents:Ra}}var xr={type:j $ 1},de={type:b $ 1},_r={type:I $ 1},_e={type:B $ 1,hard:!0},vt={type:B $ 1,hard:!0,literal:!0},Ke $ 1={type:B $ 1},vr={type:B $ 1,soft:!0},q $ 1=[_e,de],qe $ 1=[vt,de],ve={type:z $ 1};function be $ 1(Ra,qa){let nd=[];for(let od=0;od<qa.length;od++)od!==0&&nd.push(Ra),nd.push(qa[od]);return nd}function Je $ 1(Ra,qa,nd){let od=Ra;if(qa>0){for(let ld=0;ld<Math.floor(qa/nd);++ld)od=De(od);od=ae(qa%nd,od),od=ae(Number.NEGATIVE_INFINITY,od)}return od}function br $ 2(Ra,qa){return Ra?{type:N $ 1,label:Ra,contents:qa}:qa}function ee(Ra){var qa;if(!Ra)return"";if(Array.isArray(Ra)){let nd=[];for(let od of Ra)if(Array.isArray(od))nd.push(...ee(od));else{let ld=ee(od);ld!==""&&nd.push(ld)}return nd}return Ra.type===_ $ 2?{...Ra,breakContents:ee(Ra.breakContents),flatContents:ee(Ra.flatContents)}:Ra.type===x $ 2?{...Ra,contents:ee(Ra.contents),expandedStates:(qa=Ra.expandedStates)==null?void 0:qa.map(ee)}:Ra.type===S $ 1?{type:"fill",parts:Ra.parts.map(ee)}:Ra.contents?{...Ra,contents:ee(Ra.contents)}:Ra}function Or(Ra){let qa=Object.create(null),nd=new Set;return od(ee(Ra));function od(ud,cd,dd){var pd,fd;if(typeof ud=="string")return JSON.stringify(ud);if(Array.isArray(ud)){let md=ud.map(od).filter(Boolean);return md.length===1?md[0]: ` [ $ { md . join ( ", " ) } ] ` }if(ud.type===B $ 1){let md=((pd=dd==null?void 0:dd[cd+1])==null?void 0:pd.type)===b $ 1;return ud.literal?md?"literalline":"literallineWithoutBreakParent":ud.hard?md?"hardline":"hardlineWithoutBreakParent":ud.soft?"softline":"line"}if(ud.type===b $ 1)return((fd=dd==null?void 0:dd[cd-1])==null?void 0:fd.type)===B $ 1&&dd[cd-1].hard?void 0:"breakParent";if(ud.type===I $ 1)return"trim";if(ud.type===L $ 1)return"indent("+od(ud.contents)+")";if(ud.type===P $ 1)return ud.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+od(ud.contents)+")":ud.n<0?"dedent("+od(ud.contents)+")":ud.n.type==="root"?"markAsRoot("+od(ud.contents)+")":"align("+JSON.stringify(ud.n)+", "+od(ud.contents)+")";if(ud.type===_ $ 2)return"ifBreak("+od(ud.breakContents)+(ud.flatContents?", "+od(ud.flatContents):"")+(ud.groupId?(ud.flatContents?"":', ""')+ ` , { groupId : $ { ld ( ud . groupId ) } } ` :"")+")";if(ud.type===R $ 3){let md=[];ud.negate&&md.push("negate: true"),ud.groupId&&md.push( ` groupId : $ { ld ( ud . groupId ) } ` );let vd=md.length>0? ` , { $ { md . join ( ", " ) } } ` :"";return ` indentIfBreak ( $ { od ( ud . contents ) } $ { vd } ) ` }if(ud.type===x $ 2){let md=[];ud.break&&ud.break!=="propagated"&&md.push("shouldBreak: true"),ud.id&&md.push( ` id : $ { ld ( ud . id ) } ` );let vd=md.length>0? ` , { $ { md . join ( ", " ) } } ` :"";return ud.expandedStates? ` conditionalGroup ( [ $ { ud . expanded
` )):nd)}function Uu(Ra){if(Ra.type===B $ 1)return!0}function Hr(Ra){return Xe(Ra,Uu,!1)}function Qe(Ra,qa){return Ra.type===N $ 1?{...Ra,contents:qa(Ra.contents)}:qa(Ra)}var H $ 1=Symbol("MODE_BREAK"),J $ 1=Symbol("MODE_FLAT"),Te=Symbol("cursor");function Wr(){return{value:"",length:0,queue:[]}}function zu(Ra,qa){return bt $ 1(Ra,{type:"indent"},qa)}function Gu(Ra,qa,nd){return qa===Number.NEGATIVE_INFINITY?Ra.root||Wr():qa<0?bt $ 1(Ra,{type:"dedent"},nd):qa?qa.type==="root"?{...Ra,root:Ra}:bt $ 1(Ra,{type:typeof qa=="string"?"stringAlign":"numberAlign",n:qa},nd):Ra}function bt $ 1(Ra,qa,nd){let od=qa.type==="dedent"?Ra.queue.slice(0,-1):[...Ra.queue,qa],ld="",ud=0,cd=0,dd=0;for(let Id of od)switch(Id.type){case"indent":md(),nd.useTabs?pd(1):fd(nd.tabWidth);break;case"stringAlign":md(),ld+=Id.n,ud+=Id.n.length;break;case"numberAlign":cd+=1,dd+=Id.n;break;default:throw new Error( ` Unexpected type '${Id.type}' ` )}return Ad(),{...Ra,value:ld,length:ud,queue:od};function pd(Id){ld+=" ".repeat(Id),ud+=nd.tabWidth*Id}function fd(Id){ld+=" ".repeat(Id),ud+=Id}function md(){nd.useTabs?vd():Ad()}function vd(){cd>0&&pd(cd),Nd()}function Ad(){dd>0&&fd(dd),Nd()}function Nd(){cd=0,dd=0}}function Ot $ 1(Ra){let qa=0,nd=0,od=Ra.length;e:for(;od--;){let ld=Ra[od];if(ld===Te){nd++;continue}for(let ud=ld.length-1;ud>=0;ud--){let cd=ld[ud];if(cd===" "||cd===" ")qa++;else{Ra[od]=ld.slice(0,ud+1);break e}}}if(qa>0||nd>0)for(Ra.length=od+1;nd-- >0;)Ra.push(Te);return qa}function et $ 2(Ra,qa,nd,od,ld,ud){if(nd===Number.POSITIVE_INFINITY)return!0;let cd=qa.length,dd=[Ra],pd=[];for(;nd>=0;){if(dd.length===0){if(cd===0)return!0;dd.push(qa[--cd]);continue}let{mode:fd,doc:md}=dd.pop(),vd=G $ 1(md);switch(vd){case U $ 1:pd.push(md),nd-=Oe(md);break;case W $ 1:case S $ 1:{let Ad=vd===W $ 1?md:md.parts;for(let Nd=Ad.length-1;Nd>=0;Nd--)dd.push({mode:fd,doc:Ad[Nd]});break}case L $ 1:case P $ 1:case R $ 3:case N $ 1:dd.push({mode:fd,doc:md.contents});break;case I $ 1:nd+=Ot $ 1(pd);break;case x $ 2:{if(ud&&md.break)return!1;let Ad=md.break?H $ 1:fd,Nd=md.expandedStates&&Ad===H $ 1?y $ 2(!1,md.expandedStates,-1):md.contents;dd.push({mode:Ad,doc:Nd});break}case _ $ 2:{let Ad=(md.groupId?ld[md.groupId]||J $ 1:fd)===H $ 1?md.breakContents:md.flatContents;Ad&&dd.push({mode:fd,doc:Ad});break}case B $ 1:if(fd===H $ 1||md.hard)return!0;md.soft||(pd.push(" "),nd--);break;case Y $ 1:od=!0;break;case j $ 1:if(od)return!1;break}}return!1}function Fe(Ra,qa){let nd={},od=qa.printWidth,ld=Be(qa.endOfLine),ud=0,cd=[{ind:Wr(),mode:H $ 1,doc:Ra}],dd=[],pd=!1,fd=[],md=0;for(Rr(Ra);cd.length>0;){let{ind:Ad,mode:Nd,doc:Id}=cd.pop();switch(G $ 1(Id)){case U $ 1:{let Od=ld!== `
` ?ne $ 1(!1,Id, `
` ,ld):Id;dd.push(Od),cd.length>0&&(ud+=Oe(Od));break}case W $ 1:for(let Od=Id.length-1;Od>=0;Od--)cd.push({ind:Ad,mode:Nd,doc:Id[Od]});break;case z $ 1:if(md>=2)throw new Error("There are too many 'cursor' in doc.");dd.push(Te),md++;break;case L $ 1:cd.push({ind:zu(Ad,qa),mode:Nd,doc:Id.contents});break;case P $ 1:cd.push({ind:Gu(Ad,Id.n,qa),mode:Nd,doc:Id.contents});break;case I $ 1:ud-=Ot $ 1(dd);break;case x $ 2:switch(Nd){case J $ 1:if(!pd){cd.push({ind:Ad,mode:Id.break?H $ 1:J $ 1,doc:Id.contents});break}case H $ 1:{pd=!1;let Od={ind:Ad,mode:J $ 1,doc:Id.contents},Fd=od-ud,Pd=fd.length>0;if(!Id.break&&et $ 2(Od,cd,Fd,Pd,nd))cd.push(Od);else if(Id.expandedStates){let Md=y $ 2(!1,Id.expandedStates,-1);if(Id.break){cd.push({ind:Ad,mode:H $ 1,doc:Md});break}else for(let Bd=1;Bd<Id.expandedStates.length+1;Bd++)if(Bd>=Id.expandedStates.length){cd.push({ind:Ad,mode:H $ 1,doc:Md});break}else{let jd=Id.expandedStates[Bd],Hd={ind:Ad,mode:J $ 1,doc:jd};if(et $ 2(Hd,cd,Fd,Pd,nd)){cd.push(Hd);break}}}else cd.push({ind:Ad,mode:H $ 1,doc:Id.contents});break}}Id.id&&(nd[Id.id]=y $ 2(!1,cd,-1).mode);break;case S $ 1:{let Od=od-ud,{parts:Fd}=Id;if(Fd.length===0)break;let[Pd,Md]=Fd,Bd={ind:Ad,mode:J $ 1,doc:Pd},jd={ind:Ad,mode:H $ 1,doc:Pd},Hd=et $ 2(Bd,[],Od,fd.length>0,nd,!0);if(Fd.length===1){Hd?cd.push(Bd):cd.push(jd);break}let Gd={ind:Ad,mode:J $ 1,doc:Md},zd={ind:Ad,mode:H $ 1,doc:Md};if(Fd.length===2){Hd?cd.push(Gd,Bd):cd.push(zd,jd);break}Fd.splice(0,2);let df={ind:Ad,mode:Nd,doc:Ge(Fd)},Wd=Fd[0];et $ 2({ind:Ad,mode:J $ 1,doc:[Pd,Md,Wd]},[],Od,fd.length>0,nd,!0)?cd.push(df,Gd,Bd):Hd?cd.push(df,zd,Bd):cd.push(df,zd,jd);break}case _ $ 2:case R $ 3:{let Od=Id.groupId?nd[Id.groupId]:Nd;if(Od===H $ 1){let Fd=Id.type===_ $ 2?Id.breakContents:Id.negate?Id.contents:De(Id.contents);Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}if(Od===J $ 1){let Fd=Id.type===_ $ 2?Id.flatContents:Id.negate?De(Id.contents):Id.contents;Fd&&cd.push({ind:Ad,mode:Nd,doc:Fd})}break}case Y $ 1:fd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case j $ 1:fd.length>0&&cd.push({ind:Ad,mode:Nd,doc:_e});break;case B $ 1:switch(Nd){case J $ 1:if(Id.hard)pd=!0;else{Id.soft||(dd.push(" "),ud+=1);break}case H $ 1:if(fd.length>0){cd.push({ind:Ad,mode:Nd,doc:Id},...fd.reverse()),fd.length=0;break}Id.literal?Ad.root?(dd.push(ld,Ad.root.value),ud=Ad.root.length):(dd.push(ld),ud=0):(ud-=Ot $ 1(dd),dd.push(ld+Ad.value),ud=Ad.length);break}break;case N $ 1:cd.push({ind:Ad,mode:Nd,doc:Id.contents});break;case b $ 1:break;default:throw new Q $ 2(Id)}cd.length===0&&fd.length>0&&(cd.push(...fd.reverse()),fd.length=0)}let vd=dd.indexOf(Te);if(vd!==-1){let Ad=dd.indexOf(Te,vd+1),Nd=dd.slice(0,vd).join(""),Id=dd.slice(vd+1,Ad).join(""),Od=dd.slice(Ad+1).join("");return{formatted:Nd+Id+Od,cursorNodeStart:Nd.length,cursorNodeText:Id}}return{formatted:dd.join("")}}function Ku(Ra,qa,nd=0){let od=0;for(let ld=nd;ld<Ra.length;++ld)Ra[ld]===" "?od=od+qa-od%qa:od++;return od}var me=Ku,te,Nt $ 1,tt $ 1,St=class{constructor(Ra){Dr(this,te),this.stack=[Ra]}get key(){let{stack:Ra,siblings:qa}=this;return y $ 2(!1,Ra,qa===null?-2:-4)??null}get index(){return this.siblings===null?null:y $ 2(!1,this.stack,-2)}get node(){return y $ 2(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:Ra}=this,qa=y $ 2(!1,Ra,-3);return Array.isArray(qa)?qa:null}get next(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index+1]}get previous(){let{siblings:Ra}=this;return Ra===null?null:Ra[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:Ra,index:qa}=this;return Ra!==null&&qa===Ra.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...pe(this,te,tt $ 1).call(this)]}getName(){let{stack:Ra}=this,{length:qa}=Ra;return qa>1?y $ 2(!1,Ra,-2):null}getValue(){return y $ 2(!1,this.stack,-1)}getNode(Ra=0){let qa=pe(this,te,Nt $ 1).call(this,Ra);return qa===-1?null:this.stack[qa]}getParentNode(Ra=0){return this.getNode(Ra+1)}call(Ra,...qa){let{stack:nd}=this,{length:od}=nd,ld=y $ 2(!1,nd,-1);for(let ud of qa)ld=ld[ud],nd.push(ud,ld);try{return Ra(t
` )return qa-2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa-1}else{if(ld===" \r "&&Ra.charAt(qa+1)=== `
` )return qa+2;if(ld=== `
` ||ld===" \r "||ld===" \u 2028"||ld===" \u 2029")return qa+1}return qa}var M $ 1=Ju $ 1;function Xu(Ra,qa,nd={}){let od=T $ 1(Ra,nd.backwards?qa-1:qa,nd),ld=M $ 1(Ra,od,nd);return od!==ld}var V $ 1=Xu;function Zu(Ra){return Array.isArray(Ra)&&Ra.length>0}var kt $ 1=Zu,Gr=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Qu $ 1=Ra=>Object.keys(Ra).filter(qa=>!Gr.has(qa));function eo(Ra){return Ra?qa=>Ra(qa,Gr):Qu $ 1}var X $ 2=eo;function to(Ra){let qa=Ra.type||Ra.kind||"(unknown type)",nd=String(Ra.name||Ra.id&&(typeof Ra.id=="object"?Ra.id.name:Ra.id)||Ra.key&&(typeof Ra.key=="object"?Ra.key.name:Ra.key)||Ra.value&&(typeof Ra.value=="object"?"":String(Ra.value))||Ra.operator||"");return nd.length>20&&(nd=nd.slice(0,19)+"…"),qa+(nd?" "+nd:"")}function Lt(Ra,qa){(Ra.comments??(Ra.comments=[])).push(qa),qa.printed=!1,qa.nodeDescription=to(Ra)}function ue(Ra,qa){qa.leading=!0,qa.trailing=!1,Lt(Ra,qa)}function re(Ra,qa,nd){qa.leading=!1,qa.trailing=!1,nd&&(qa.marker=nd),Lt(Ra,qa)}function oe(Ra,qa){qa.leading=!1,qa.trailing=!0,Lt(Ra,qa)}var Pt=new WeakMap;function ut(Ra,qa){if(Pt.has(Ra))return Pt.get(Ra);let{printer:{getCommentChildNodes:nd,canAttachComment:od,getVisitorKeys:ld},locStart:ud,locEnd:cd}=qa;if(!od)return[];let dd=((nd==null?void 0:nd(Ra,qa))??[...Tt $ 1(Ra,{getVisitorKeys:X $ 2(ld)})]).flatMap(pd=>od(pd)?[pd]:ut(pd,qa));return dd.sort((pd,fd)=>ud(pd)-ud(fd)||cd(pd)-cd(fd)),Pt.set(Ra,dd),dd}function qr(Ra,qa,nd,od){let{locStart:ld,locEnd:ud}=nd,cd=ld(qa),dd=ud(qa),pd=ut(Ra,nd),fd,md,vd=0,Ad=pd.length;for(;vd<Ad;){let Nd=vd+Ad>>1,Id=pd[Nd],Od=ld(Id),Fd=ud(Id);if(Od<=cd&&dd<=Fd)return qr(Id,qa,nd,Id);if(Fd<=cd){fd=Id,vd=Nd+1;continue}if(dd<=Od){md=Id,Ad=Nd;continue}throw new Error("Comment location overlaps with node location")}if((od==null?void 0:od.type)==="TemplateLiteral"){let{quasis:Nd}=od,Id=Rt $ 1(Nd,qa,nd);fd&&Rt $ 1(Nd,fd,nd)!==Id&&(fd=null),md&&Rt $ 1(Nd,md,nd)!==Id&&(md=null)}return{enclosingNode:od,precedingNode:fd,followingNode:md}}var It $ 1=()=>!1;function Jr $ 1(Ra,qa){let{comments:nd}=Ra;if(delete Ra.comments,!kt $ 1(nd)||!qa.printer.canAttachComment)return;let od=[],{locStart:ld,locEnd:ud,printer:{experimentalFeatures:{avoidAstMutation:cd=!1}={},handleComments:dd={}},originalText:pd}=qa,{ownLine:fd=It $ 1,endOfLine:md=It $ 1,remaining:vd=It $ 1}=dd,Ad=nd.map((Nd,Id)=>({...qr(Ra,Nd,qa),comment:Nd,text:pd,options:qa,ast:Ra,isLastComment:nd.length-1===Id}));for(let[Nd,Id]of Ad.entries()){let{comment:Od,precedingNode:Fd,enclosingNode:Pd,followingNode:Md,text:Bd,options:jd,ast:Hd,isLastComment:Gd}=Id;if(jd.parser==="json"||jd.parser==="json5"||jd.parser==="jsonc"||jd.parser==="__js_expression"||jd.parser==="__ts_expression"||jd.parser==="__vue_expression"||jd.parser==="__vue_ts_expression"){if(ld(Od)-ld(Hd)<=0){ue(Hd,Od);continue}if(ud(Od)-ud(Hd)>=0){oe(Hd,Od);continue}}let zd;if(cd?zd=[Id]:(Od.enclosingNode=Pd,Od.precedingNode=Fd,Od.followingNode=Md,zd=[Od,Bd,jd,Hd,Gd]),ro(Bd,jd,Ad,Nd))Od.placement="ownLine",fd(...zd)||(Md?ue(Md,Od):Fd?oe(Fd,Od):re(Pd||Hd,Od));else if(no(Bd,jd,Ad,Nd))Od.placement="endOfLine",md(...zd)||(Fd?oe(Fd,Od):Md?ue(Md,Od):re(Pd||Hd,Od));else if(Od.placement="remaining",!vd(...zd))if(Fd&&Md){let df=od.length;df>0&&od[df-1].followingNode!==Md&&Kr(od,jd),od.push(Id)}else Fd?oe(Fd,Od):Md?ue(Md,Od):re(Pd||Hd,Od)}if(Kr(od,qa),!cd)for(let Nd of nd)delete Nd.precedingNode,delete Nd.enclosingNode,delete Nd.followingNode}var Xr=Ra=>!/[ \S \n \u 2028 \u 2029]/u.test(Ra);function ro(Ra,qa,nd,od){let{comment:ld,precedingNode:ud}=nd[od],{locStart:cd,locEnd:dd}=qa,pd=cd(ld);if(ud)for(let fd=od-1;fd>=0;fd--){let{comment:md,precedingNode:vd}=nd[fd];if(vd!==ud||!Xr(Ra.slice(dd(md),pd)))break;pd=cd(md)}return V $ 1(Ra,pd,{backwards:!0})}function no(Ra,qa,nd,od){let{comment:ld,followingNode:ud}=nd[od],{locStart:cd,locEnd:dd}=qa,pd=dd(ld);if(ud)for(let fd=od+1;fd<nd.length;fd++){let{comment:md,followingNode:vd}=nd[fd];if(vd!==ud||!Xr(Ra.slice(pd,cd(md))))break;pd=dd(md)}return V $ 1(Ra,pd)}function Kr(Ra,qa){var nd,od;let ld=Ra.length;if(ld===0)return;let{precedingNode:ud,followingNode:cd}=Ra[0],dd=qa.locStart(
2024-09-18 09:46:23 +08:00
( mixed values within one file are normalised by looking at what 's used after the first line)`}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file' s first docblock comment . ",cliCategory:" Other "},parser:{category:" Global ",type:" choice ",default:void 0,description:" Which parser to use . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" function ",choices:[{value:" flow ",description:" Flow "},{value:" babel ",description:" JavaScript "},{value:" babel - flow ",description:" Flow "},{value:" babel - ts ",description:" TypeScript "},{value:" typescript ",description:" TypeScript "},{value:" acorn ",description:" JavaScript "},{value:" espree ",description:" JavaScript "},{value:" meriyah ",description:" JavaScript "},{value:" css ",description:" CSS "},{value:" less ",description:" Less "},{value:" scss ",description:" SCSS "},{value:" json ",description:" JSON "},{value:" json5 ",description:" JSON5 "},{value:" jsonc ",description:" JSON with Comments "},{value:" json - stringify ",description:" JSON . stringify "},{value:" graphql ",description:" GraphQL "},{value:" markdown ",description:" Markdown "},{value:" mdx ",description:" MDX "},{value:" vue ",description:" Vue "},{value:" yaml ",description:" YAML "},{value:" glimmer ",description:" Ember / Handlebars "},{value:" html ",description:" HTML "},{value:" angular ",description:" Angular "},{value:" lwc ",description:" Lightning Web Components "}]},plugins:{type:" path ",array:!0,default:[{value:[]}],category:" Global ",description:" Add a plugin . Multiple plugins can be passed as separate ` --plugin ` s . ",exception:Ra=>typeof Ra==" string "||typeof Ra==" object ",cliName:" plugin ",cliCategory:" Config "},printWidth:{category:" Global ",type:" int ",default:80,description:" The line length where Prettier will try wrap . ",range:{start:0,end:1/0,step:1}},rangeEnd:{category:" Special ",type:" int " , default : 1 / 0 , range : { start : 0 , end : 1 / 0 , step : 1 } , description : ` Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement . ` ,cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description: ` Format code starting at a given character offset .
The range will extend backwards to the start of the first line containing the selected statement . ` ,cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description: ` Require either '@prettier' or '@format' to be present in the file ' s first docblock comment
2024-11-28 09:28:59 +08:00
in order for it to be formatted . ` ,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function ot $ 1({plugins:Ra=[],showDeprecated:qa=!1}={}){let nd=Ra.flatMap(ld=>ld.languages??[]),od=[];for(let ld of lo $ 1(Object.assign({},...Ra.map(({options:ud})=>ud),rn)))!qa&&ld.deprecated||(Array.isArray(ld.choices)&&(qa||(ld.choices=ld.choices.filter(ud=>!ud.deprecated)),ld.name==="parser"&&(ld.choices=[...ld.choices,...Do(ld.choices,nd,Ra)])),ld.pluginDefaults=Object.fromEntries(Ra.filter(ud=>{var cd;return((cd=ud.defaultOptions)==null?void 0:cd[ld.name])!==void 0}).map(ud=>[ud.name,ud.defaultOptions[ld.name]])),od.push(ld));return{languages:nd,options:od}}function*Do(Ra,qa,nd){let od=new Set(Ra.map(ld=>ld.value));for(let ld of qa)if(ld.parsers){for(let ud of ld.parsers)if(!od.has(ud)){od.add(ud);let cd=nd.find(pd=>pd.parsers&&Object.prototype.hasOwnProperty.call(pd.parsers,ud)),dd=ld.name;cd!=null&&cd.name&&(dd+= ` ( plugin : $ { cd . name } ) ` ),yield{value:ud,description:dd}}}}function lo $ 1(Ra){let qa=[];for(let[nd,od]of Object.entries(Ra)){let ld={name:nd,...od};Array.isArray(ld.default)&&(ld.default=y $ 2(!1,ld.default,-1).value),qa.push(ld)}return qa}var co=Ra=>String(Ra).split(/[/ \\ ]/u).pop();function nn(Ra,qa){if(!qa)return;let nd=co(qa).toLowerCase();return Ra.find(({filenames:od})=>od==null?void 0:od.some(ld=>ld.toLowerCase()===nd))??Ra.find(({extensions:od})=>od==null?void 0:od.some(ld=>nd.endsWith(ld)))}function fo(Ra,qa){if(qa)return Ra.find(({name:nd})=>nd.toLowerCase()===qa)??Ra.find(({aliases:nd})=>nd==null?void 0:nd.includes(qa))??Ra.find(({extensions:nd})=>nd==null?void 0:nd.includes( ` . $ { qa } ` ))}function po $ 1(Ra,qa){let nd=Ra.plugins.flatMap(ld=>ld.languages??[]),od=fo(nd,qa.language)??nn(nd,qa.physicalFile)??nn(nd,qa.file)??(qa.physicalFile,void 0);return od==null?void 0:od.parsers[0]}var un=po $ 1,ie={key:Ra=>/^[ $ _a-zA-Z][ $ _a-zA-Z0-9]* $ /.test(Ra)?Ra:JSON.stringify(Ra),value(Ra){if(Ra===null||typeof Ra!="object")return JSON.stringify(Ra);if(Array.isArray(Ra))return ` [ $ { Ra . map ( nd => ie . value ( nd ) ) . join ( ", " ) } ] ` ;let qa=Object.keys(Ra);return qa.length===0?"{}": ` { $ { qa . map ( nd => ` ${ ie . key ( nd ) } : ${ ie . value ( Ra [ nd ] ) } ` ) . join ( ", " ) } } ` },pair:({key:Ra,value:qa})=>ie.value({[Ra]:qa})},Yt=Me $ 1(it()),an=(Ra,qa,{descriptor:nd})=>{let od=[ ` $ { Yt . default . yellow ( typeof Ra == "string" ? nd . key ( Ra ) : nd . pair ( Ra ) ) } is deprecated ` ];return qa&&od.push( ` we now treat it as $ { Yt . default . blue ( typeof qa == "string" ? nd . key ( qa ) : nd . pair ( qa ) ) } ` ),od.join("; ")+"."},le=Me $ 1(it()),st $ 1=Symbol.for("vnopts.VALUE_NOT_EXIST"),he $ 1=Symbol.for("vnopts.VALUE_UNCHANGED"),Dn $ 1=" ".repeat(2),cn $ 1=(Ra,qa,nd)=>{let{text:od,list:ld}=nd.normalizeExpectedResult(nd.schemas[Ra].expected(nd)),ud=[];return od&&ud.push(ln(Ra,qa,od,nd.descriptor)),ld&&ud.push([ln(Ra,qa,ld.title,nd.descriptor)].concat(ld.values.map(cd=>fn(cd,nd.loggerPrintWidth))).join( `
` )),pn(ud,nd.loggerPrintWidth)};function ln(Ra,qa,nd,od){return[ ` Invalid $ { le . default . red ( od . key ( Ra ) ) } value . ` , ` Expected $ { le . default . blue ( nd ) } , ` , ` but received $ { qa === st$1 ? le . default . gray ( "nothing" ) : le . default . red ( od . value ( qa ) ) } . ` ].join(" ")}function fn({text:Ra,list:qa},nd){let od=[];return Ra&&od.push( ` - $ { le . default . blue ( Ra ) } ` ),qa&&od.push([ ` - $ { le . default . blue ( qa . title ) } : ` ].concat(qa.values.map(ld=>fn(ld,nd-Dn $ 1.length).replace(/^| \n /g, ` $ & $ { Dn$1 } ` ))).join( `
` )),pn(od,nd)}function pn(Ra,qa){if(Ra.length===1)return Ra[0];let[nd,od]=Ra,[ld,ud]=Ra.map(cd=>cd.split( `
` ,1)[0].length);return ld>qa&&ld>ud?od:nd}var Wt $ 1=Me $ 1(it()),jt=[],dn=[];function Ht $ 1(Ra,qa){if(Ra===qa)return 0;let nd=Ra;Ra.length>qa.length&&(Ra=qa,qa=nd);let od=Ra.length,ld=qa.length;for(;od>0&&Ra.charCodeAt(~-od)===qa.charCodeAt(~-ld);)od--,ld--;let ud=0;for(;ud<od&&Ra.charCodeAt(ud)===qa.charCodeAt(ud);)ud++;if(od-=ud,ld-=ud,od===0)return ld;let cd,dd,pd,fd,md=0,vd=0;for(;md<od;)dn[md]=Ra.charCodeAt(ud+md),jt[md]=++md;for(;vd<ld;)for(cd=qa.charCodeAt(ud+vd),pd=vd++,dd=vd,md=0;md<od;md++)fd=cd===dn[md]?pd:pd+1,pd=jt[md],dd=jt[md]=pd>dd?fd>dd?dd+1:fd:fd>pd?pd+1:fd;return dd}var at $ 2=(Ra,qa,{descriptor:nd,logger:od,schemas:ld})=>{let ud=[ ` Ignored unknown option $ { Wt$1 . default . yellow ( nd . pair ( { key : Ra , value : qa } ) ) } . ` ],cd=Object.keys(ld).sort().find(dd=>Ht $ 1(Ra,dd)<3);cd&&ud.push( ` Did you mean $ { Wt$1 . default . blue ( nd . key ( cd ) ) } ? ` ),od.warn(ud.join(" "))},Fo=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function mo $ 1(Ra,qa){let nd=new Ra(qa),od=Object.create(nd);for(let ld of Fo)ld in qa&&(od[ld]=Eo(qa[ld],nd,O $ 2.prototype[ld].length));return od}var O $ 2=class{static create(qa){return mo $ 1(this,qa)}constructor(qa){this.name=qa.name}default(qa){}expected(qa){return"nothing"}validate(qa,nd){return!1}deprecated(qa,nd){return!1}forward(qa,nd){}redirect(qa,nd){}overlap(qa,nd,od){return qa}preprocess(qa,nd){return qa}postprocess(qa,nd){return he $ 1}};function Eo(Ra,qa,nd){return typeof Ra=="function"?(...od)=>Ra(...od.slice(0,nd-1),qa,...od.slice(nd-1)):()=>Ra}var Dt $ 1=class extends O $ 2{constructor(qa){super(qa),this._sourceName=qa.sourceName}expected(qa){return qa.schemas[this._sourceName].expected(qa)}validate(qa,nd){return nd.schemas[this._sourceName].validate(qa,nd)}redirect(qa,nd){return this._sourceName}},lt=class extends O $ 2{expected(){return"anything"}validate(){return!0}},ct $ 1=class extends O $ 2{constructor({valueSchema:qa,name:nd=qa.name,...od}){super({...od,name:nd}),this._valueSchema=qa}expected(qa){let{text:nd,list:od}=qa.normalizeExpectedResult(this._valueSchema.expected(qa));return{text:nd&& ` an array of $ { nd } ` ,list:od&&{title:"an array of the following values",values:[{list:od}]}}}validate(qa,nd){if(!Array.isArray(qa))return!1;let od=[];for(let ld of qa){let ud=nd.normalizeValidateResult(this._valueSchema.validate(ld,nd),ld);ud!==!0&&od.push(ud.value)}return od.length===0?!0:{value:od}}deprecated(qa,nd){let od=[];for(let ld of qa){let ud=nd.normalizeDeprecatedResult(this._valueSchema.deprecated(ld,nd),ld);ud!==!1&&od.push(...ud.map(({value:cd})=>({value:[cd]})))}return od}forward(qa,nd){let od=[];for(let ld of qa){let ud=nd.normalizeForwardResult(this._valueSchema.forward(ld,nd),ld);od.push(...ud.map(Fn))}return od}redirect(qa,nd){let od=[],ld=[];for(let ud of qa){let cd=nd.normalizeRedirectResult(this._valueSchema.redirect(ud,nd),ud);"remain"in cd&&od.push(cd.remain),ld.push(...cd.redirect.map(Fn))}return od.length===0?{redirect:ld}:{redirect:ld,remain:od}}overlap(qa,nd){return qa.concat(nd)}};function Fn({from:Ra,to:qa}){return{from:[Ra],to:qa}}var ft=class extends O $ 2{expected(){return"true or false"}validate(Ra){return typeof Ra=="boolean"}};function En(Ra,qa){let nd=Object.create(null);for(let od of Ra){let ld=od[qa];if(nd[ld])throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( ld ) } ` );nd[ld]=od}return nd}function hn(Ra,qa){let nd=new Map;for(let od of Ra){let ld=od[qa];if(nd.has(ld))throw new Error( ` Duplicate $ { qa } $ { JSON . stringify ( ld ) } ` );nd.set(ld,od)}return nd}function Cn $ 1(){let Ra=Object.create(null);return qa=>{let nd=JSON.stringify(qa);return Ra[nd]?!0:(Ra[nd]=!0,!1)}}function gn $ 1(Ra,qa){let nd=[],od=[];for(let ld of Ra)qa(ld)?nd.push(ld):od.push(ld);return[nd,od]}function yn(Ra){return Ra===Math.floor(Ra)}function An(Ra,qa){if(Ra===qa)return 0;let nd=typeof Ra,od=typeof qa,ld=["undefined","object","boolean","number","string"];return nd!==od?ld.indexOf(nd)-ld.indexOf(od):nd!=="string"?Number(Ra)-Number(qa):Ra.localeCompare(qa)}function Bn $ 1(Ra){return(...qa)=>{let nd=Ra(...qa);return typeof nd=="string"?new Error(nd):nd}}function Mt(Ra){return Ra===
` +od,Ra.codeFrame=od,Ra}throw Ra}var ce=ko;async function Un(Ra,qa,nd,od,ld){let{embeddedLanguageFormatting:ud,printer:{embed:cd,hasPrettierIgnore:dd=()=>!1,getVisitorKeys:pd}}=nd;if(!cd||ud!=="auto")return;if(cd.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let fd=X $ 2(cd.getVisitorKeys??pd),md=[];Nd();let vd=Ra.stack;for(let{print:Id,node:Od,pathStack:Fd}of md)try{Ra.stack=Fd;let Pd=await Id(Ad,qa,Ra,nd);Pd&&ld.set(Od,Pd)}catch(Pd){if(globalThis.PRETTIER_DEBUG)throw Pd}Ra.stack=vd;function Ad(Id,Od){return Po(Id,Od,nd,od)}function Nd(){let{node:Id}=Ra;if(Id===null||typeof Id!="object"||dd(Ra))return;for(let Fd of fd(Id))Array.isArray(Id[Fd])?Ra.each(Nd,Fd):Ra.call(Nd,Fd);let Od=cd(Ra,nd);if(Od){if(typeof Od=="function"){md.push({print:Od,node:Id,pathStack:[...Ra.stack]});return}ld.set(Id,Od)}}}async function Po(Ra,qa,nd,od){let ld=await se({...nd,...qa,parentParser:nd.parser,originalText:Ra},{passThrough:!0}),{ast:ud}=await ce(Ra,ld),cd=await od(ud,ld);return Ze(cd)}function Io(Ra,qa){let{originalText:nd,[Symbol.for("comments")]:od,locStart:ld,locEnd:ud,[Symbol.for("printedComments")]:cd}=qa,{node:dd}=Ra,pd=ld(dd),fd=ud(dd);for(let md of od)ld(md)>=pd&&ud(md)<=fd&&cd.add(md);return nd.slice(pd,fd)}var zn=Io;async function Ye(Ra,qa){({ast:Ra}=await Qt $ 1(Ra,qa));let nd=new Map,od=new Mr(Ra),ld=new Map;await Un(od,cd,qa,Ye,ld);let ud=await Gn $ 1(od,qa,cd,void 0,ld);return en(qa),ud;function cd(pd,fd){return pd===void 0||pd===od?dd(fd):Array.isArray(pd)?od.call(()=>dd(fd),...pd):od.call(()=>dd(fd),pd)}function dd(pd){let fd=od.node;if(fd==null)return"";let md=fd&&typeof fd=="object"&&pd===void 0;if(md&&nd.has(fd))return nd.get(fd);let vd=Gn $ 1(od,qa,cd,pd,ld);return md&&nd.set(fd,vd),vd}}function Gn $ 1(Ra,qa,nd,od,ld){var ud;let{node:cd}=Ra,{printer:dd}=qa,pd;return(ud=dd.hasPrettierIgnore)!=null&&ud.call(dd,Ra)?pd=zn(Ra,qa):ld.has(cd)?pd=ld.get(cd):pd=dd.print(Ra,qa,nd,od),cd===qa.cursorNode&&(pd=Qe(pd,fd=>[ve,fd,ve])),dd.printComment&&(!dd.willPrintOwnComments||!dd.willPrintOwnComments(Ra,qa))&&(pd=Qr(Ra,pd,qa)),pd}async function Qt $ 1(Ra,qa){let nd=Ra.comments??[];qa[Symbol.for("comments")]=nd,qa[Symbol.for("tokens")]=Ra.tokens??[],qa[Symbol.for("printedComments")]=new Set,Jr $ 1(Ra,qa);let{printer:{preprocess:od}}=qa;return Ra=od?await od(Ra,qa):Ra,{ast:Ra,comments:nd}}function Ro(Ra,qa){let{cursorOffset:nd,locStart:od,locEnd:ld}=qa,ud=X $ 2(qa.printer.getVisitorKeys),cd=pd=>od(pd)<=nd&&ld(pd)>=nd,dd=Ra;for(let pd of Ur(Ra,{getVisitorKeys:ud,filter:cd}))dd=pd;return dd}var Kn=Ro;function Yo(Ra,qa){let{printer:{massageAstNode:nd,getVisitorKeys:od}}=qa;if(!nd)return Ra;let ld=X $ 2(od),ud=nd.ignoredProperties??new Set;return cd(Ra);function cd(dd,pd){if(!(dd!==null&&typeof dd=="object"))return dd;if(Array.isArray(dd))return dd.map(Ad=>cd(Ad,pd)).filter(Boolean);let fd={},md=new Set(ld(dd));for(let Ad in dd)!Object.prototype.hasOwnProperty.call(dd,Ad)||ud.has(Ad)||(md.has(Ad)?fd[Ad]=cd(dd[Ad],dd):fd[Ad]=dd[Ad]);let vd=nd(dd,fd,pd);if(vd!==null)return vd??fd}}var qn $ 1=Yo,jo $ 1=(Ra,qa,nd)=>{if(!(Ra&&qa==null)){if(qa.findLastIndex)return qa.findLastIndex(nd);for(let od=qa.length-1;od>=0;od--){let ld=qa[od];if(nd(ld,od,qa))return od}return-1}},Jn $ 1=jo $ 1,Ho $ 1=({parser:Ra})=>Ra==="json"||Ra==="json5"||Ra==="jsonc"||Ra==="json-stringify";function Wo $ 1(Ra,qa){let nd=[Ra.node,...Ra.parentNodes],od=new Set([qa.node,...qa.parentNodes]);return nd.find(ld=>Qn $ 1.has(ld.type)&&od.has(ld))}function Xn $ 1(Ra){let qa=Jn $ 1(!1,Ra,nd=>nd.type!=="Program"&&nd.type!=="File");return qa===-1?Ra:Ra.slice(0,qa+1)}function Mo(Ra,qa,{locStart:nd,locEnd:od}){let ld=Ra.node,ud=qa.node;if(ld===ud)return{startNode:ld,endNode:ud};let cd=nd(Ra.node);for(let pd of Xn $ 1(qa.parentNodes))if(nd(pd)>=cd)ud=pd;else break;let dd=od(qa.node);for(let pd of Xn $ 1(Ra.parentNodes)){if(od(pd)<=dd)ld=pd;else break;if(ld===ud)break}return{startNode:ld,endNode:ud}}function er(Ra,qa,nd,od,ld=[],ud){let{locStart:cd,locEnd:dd}=nd,pd=cd(Ra),fd=dd(Ra);i
` ,ld)+1),pd=od.slice(dd,ld).match(/^ \s */u)[0],fd=me(pd,qa.tabWidth),md=await ou $ 1(cd,{...qa,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:qa.cursorOffset>ld&&qa.cursorOffset<=ud?qa.cursorOffset-ld:-1,endOfLine:"lf"},fd),vd=md.formatted.trimEnd(),{cursorOffset:Ad}=qa;Ad>ud?Ad+=vd.length-cd.length:md.cursorOffset>=0&&(Ad=md.cursorOffset+ld);let Nd=od.slice(0,ld)+vd+od.slice(ud);if(qa.endOfLine!=="lf"){let Id=Be(qa.endOfLine);Ad>=0&&Id=== ` \ r
` &&(Ad+=wt(Nd.slice(0,Ad), `
` )),Nd=ne $ 1(!1,Nd, `
` ,Id)}return{formatted:Nd,cursorOffset:Ad,comments:md.comments}}function tr(Ra,qa,nd){return typeof qa!="number"||Number.isNaN(qa)||qa<0||qa>Ra.length?nd:qa}function ru $ 1(Ra,qa){let{cursorOffset:nd,rangeStart:od,rangeEnd:ld}=qa;return nd=tr(Ra,nd,-1),od=tr(Ra,od,0),ld=tr(Ra,ld,Ra.length),{...qa,cursorOffset:nd,rangeStart:od,rangeEnd:ld}}function iu $ 1(Ra,qa){let{cursorOffset:nd,rangeStart:od,rangeEnd:ld,endOfLine:ud}=ru $ 1(Ra,qa),cd=Ra.charAt(0)===uu $ 1;if(cd&&(Ra=Ra.slice(1),nd--,od--,ld--),ud==="auto"&&(ud=Fr(Ra)),Ra.includes(" \r ")){let dd=pd=>wt(Ra.slice(0,Math.max(pd,0)), ` \ r
` );nd-=dd(nd),od-=dd(od),ld-=dd(ld),Ra=mr(Ra)}return{hasBOM:cd,text:Ra,options:ru $ 1(Ra,{...qa,cursorOffset:nd,rangeStart:od,rangeEnd:ld,endOfLine:ud})}}async function nu $ 1(Ra,qa){let nd=await ht $ 1(qa);return!nd.hasPragma||nd.hasPragma(Ra)}async function rr(Ra,qa){let{hasBOM:nd,text:od,options:ld}=iu $ 1(Ra,await se(qa));if(ld.rangeStart>=ld.rangeEnd&&od!==""||ld.requirePragma&&!await nu $ 1(od,ld))return{formatted:Ra,cursorOffset:qa.cursorOffset,comments:[]};let ud;return ld.rangeStart>0||ld.rangeEnd<od.length?ud=await Uo $ 1(od,ld):(!ld.requirePragma&&ld.insertPragma&&ld.printer.insertPragma&&!await nu $ 1(od,ld)&&(od=ld.printer.insertPragma(od)),ud=await ou $ 1(od,ld)),nd&&(ud.formatted=uu $ 1+ud.formatted,ud.cursorOffset>=0&&ud.cursorOffset++),ud}async function su $ 1(Ra,qa,nd){let{text:od,options:ld}=iu $ 1(Ra,await se(qa)),ud=await ce(od,ld);return nd&&(nd.preprocessForPrint&&(ud.ast=await Qt $ 1(ud.ast,ld)),nd.massage&&(ud.ast=qn $ 1(ud.ast,ld))),ud}async function au $ 1(Ra,qa){qa=await se(qa);let nd=await Ye(Ra,qa);return Fe(nd,qa)}async function Du(Ra,qa){let nd=Or(Ra),{formatted:od}=await rr(nd,{...qa,parser:"__js_expression"});return od}async function lu $ 1(Ra,qa){qa=await se(qa);let{ast:nd}=await ce(Ra,qa);return Ye(nd,qa)}async function cu $ 1(Ra,qa){return Fe(Ra,await se(qa))}var nr={};We(nr,{builders:()=>Go $ 1,printer:()=>Ko $ 1,utils:()=>qo});var Go $ 1={join:be $ 1,line:Ke $ 1,softline:vr,hardline:q $ 1,literalline:qe $ 1,group:_t,conditionalGroup:Ar,fill:Ge,lineSuffix:xe $ 1,lineSuffixBoundary:xr,cursor:ve,breakParent:de,ifBreak:Br,trim:_r,indent:De,indentIfBreak:wr,align:ae,addAlignmentToDoc:Je $ 1,markAsRoot:gr,dedentToRoot:Cr,dedent:yr,hardlineWithoutBreakParent:_e,literallineWithoutBreakParent:vt,label:br $ 2,concat:Ra=>Ra},Ko $ 1={printDocToString:Fe},qo={willBreak:Ir,traverseDoc:we,findInDoc:Xe,mapDoc:Ne,removeLines:Yr,stripTrailingHardline:Ze,replaceEndOfLine:jr,canBreak:Hr},fu $ 1="3.3.3",or={};We(or,{addDanglingComment:()=>re,addLeadingComment:()=>ue,addTrailingComment:()=>oe,getAlignmentSize:()=>me,getIndentSize:()=>pu $ 1,getMaxContinuousCount:()=>du $ 1,getNextNonSpaceNonCommentCharacter:()=>Fu,getNextNonSpaceNonCommentCharacterIndex:()=>si $ 1,getStringWidth:()=>Oe,hasNewline:()=>V $ 1,hasNewlineInRange:()=>mu,hasSpaces:()=>Eu,isNextLineEmpty:()=>ci $ 1,isNextLineEmptyAfterIndex:()=>gt,isPreviousLineEmpty:()=>Di $ 1,makeString:()=>hu,skip:()=>Ee,skipEverythingButNewLine:()=>nt $ 2,skipInlineComment:()=>Ce,skipNewline:()=>M $ 1,skipSpaces:()=>T $ 1,skipToLineEnd:()=>rt,skipTrailingComment:()=>ge,skipWhitespace:()=>zr});function Jo(Ra,qa){if(qa===!1)return!1;if(Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="*"){for(let nd=qa+2;nd<Ra.length;++nd)if(Ra.charAt(nd)==="*"&&Ra.charAt(nd+1)==="/")return nd+2}return qa}var Ce=Jo;function Xo(Ra,qa){return qa===!1?!1:Ra.charAt(qa)==="/"&&Ra.charAt(qa+1)==="/"?nt $ 2(Ra,qa):qa}var ge=Xo;function Zo(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=T $ 1(Ra,od),od=Ce(Ra,od),od=ge(Ra,od),od=M $ 1(Ra,od);return od}var je $ 1=Zo;function Qo(Ra,qa){let nd=null,od=qa;for(;od!==nd;)nd=od,od=rt(Ra,od),od=Ce(Ra,od),od=T $ 1(Ra,od);return od=ge(Ra,od),od=M $ 1(Ra,od),od!==!1&&V $ 1(Ra,od)}var gt=Qo;function ei $ 1(Ra,qa){let nd=Ra.lastIndexOf( `
` );return nd===-1?0:me(Ra.slice(nd+1).match(/^[ \t ]*/u)[0],qa)}var pu $ 1=ei $ 1;function ur(Ra){if(typeof Ra!="string")throw new TypeError("Expected a string");return Ra.replace(/[| \\ {}()[ \] ^ $ +*?.]/g," \\ $ &").replace(/-/g," \\ x2d")}function ti(Ra,qa){let nd=Ra.match(new RegExp( ` ( $ { ur ( qa ) } ) + ` ,"gu"));return nd===null?0:nd.reduce((od,ld)=>Math.max(od,ld.length/qa.length),0)}var du $ 1=ti;function ri(Ra,qa){let nd=je $ 1(Ra,qa);return nd===!1?"":Ra.charAt(nd)}var Fu=ri;function ni(Ra,qa,nd){for(let od=qa;od<nd;++od)if(Ra.charAt(od)=== `
` )return!0;return!1}var mu=ni;function ui $ 1(Ra,qa,nd={}){return T $ 1(Ra,nd.backwards?qa-1:qa,nd)!==qa}var Eu=ui $ 1;function oi $ 1(Ra,qa,nd){let od=qa==='"'?"'":'"',ld=ne $ 1(!1,Ra,/ \\ (.)|(["'])/gsu,(ud,cd,dd)=>cd===od?cd:dd===qa?" \\ "+dd:dd||(nd&&/^[^ \n \r "'0-7 \\ bfnrt-vx \u 2028 \u 2029] $ /u.test(cd)?cd:" \\ "+cd));return qa+ld+qa}var hu=oi $ 1;function ii $ 1(Ra,qa,nd){return je $ 1(Ra,nd(qa))}function si $ 1(Ra,qa){return arguments.length===2||typeof qa=="number"?je $ 1(Ra,qa):ii $ 1(...arguments)}function ai $ 1(Ra,qa,nd){return Le $ 1(Ra,nd(qa))}function Di $ 1(Ra,qa){return arguments.length===2||typeof qa=="number"?Le $ 1(Ra,qa):ai $ 1(...arguments)}function li $ 1(Ra,qa,nd){return gt(Ra,nd(qa))}function ci $ 1(Ra,qa){return arguments.length===2||typeof qa=="number"?gt(Ra,qa):li $ 1(...arguments)}function fe(Ra,qa=1){return async(...nd)=>{let od=nd[qa]??{},ld=od.plugins??[];return nd[qa]={...od,plugins:Array.isArray(ld)?ld:Object.values(ld)},Ra(...nd)}}var Cu $ 1=fe(rr);async function gu $ 1(Ra,qa){let{formatted:nd}=await Cu $ 1(Ra,{...qa,cursorOffset:-1});return nd}async function fi(Ra,qa){return await gu $ 1(Ra,qa)===Ra}var pi $ 2=fe(ot $ 1,0),di $ 1={parse:fe(su $ 1),formatAST:fe(au $ 1),formatDoc:fe(Du),printToDoc:fe(lu $ 1),printDocToString:fe(cu $ 1)};function addPrefix(Ra){return ` $ { prefix } _ _$ { Ra } ` }function customizeTheme(Ra,qa){const nd=JSON.parse(JSON.stringify(Ra)),{fontSize:od,color:ld}=qa;if(od)for(let ud=1;ud<=6;ud++){const cd=nd.block[ ` h$ { ud } ` ]["font-size"];nd.block[ ` h$ { ud } ` ]["font-size"]= ` $ { od * Number . parseFloat ( cd ) } px ` }return ld&&(nd.base["--md-primary-color"]=ld),nd}function customCssWithTemplate(Ra,qa,nd){const od=customizeTheme(nd,{color:qa}),ld=(dd,pd,fd)=>{fd.forEach(md=>{pd[md]&&(dd[md]=Object.assign(dd[md]||{},pd[md]))})},ud=["h1","h2","h3","h4","h5","h6","code","code_pre","p","hr","blockquote","blockquote_note","blockquote_tip","blockquote_important","blockquote_warning","blockquote_caution","blockquote_p","blockquote_p_note","blockquote_p_tip","blockquote_p_important","blockquote_p_warning","blockquote_p_caution","blockquote_title","blockquote_title_note","blockquote_title_tip","blockquote_title_important","blockquote_title_warning","blockquote_title_caution","image","ul","ol"],cd=["strong","codespan","link","wx_link","listitem"];return ld(od.block,Ra,ud),ld(od.inline,Ra,cd),od}function css2json(Ra){Ra=Ra.replace(/ \/ \* [ \s \S ]*? \* \/ /g,"");const qa={},nd=od=>od.reduce((ld,ud)=>{const[cd,dd]=ud.split(":").map(pd=>pd.trim());return cd&&(ld[cd]=dd),ld},{});for(;Ra.includes("{")&&Ra.includes("}");){const od=Ra.indexOf("{"),ld=Ra.indexOf("}"),ud=Ra.substring(od+1,ld).split(";").map(pd=>pd.trim()).filter(Boolean),cd=Ra.substring(0,od).split(",").map(pd=>pd.trim()),dd=nd(ud);cd.forEach(pd=>{qa[pd]={...qa[pd]||{},...dd}}),Ra=Ra.slice(ld+1).trim()}return qa}function getStyleString(Ra){return Object.entries(Ra??{}).map(([qa,nd])=> ` $ { qa } : $ { nd } ` ).join("; ")}async function formatDoc(Ra,qa="markdown"){const nd={markdown:[prettierPluginMarkdown,prettierPluginBabel,prettierPluginEstree],css:[prettierPluginCss]},od=qa in nd?qa:"markdown";return await gu $ 1(Ra,{parser:od,plugins:nd[od]})}function downloadMD(Ra){const qa=document.createElement("a");qa.download="content.md",qa.style.display="none";const nd=new Blob([Ra]);qa.href=URL.createObjectURL(nd),document.body.appendChild(qa),qa.click(),document.body.removeChild(qa)}function exportHTML(){const Ra=document.querySelector("#output");ld(Ra);const qa=Ra.innerHTML,nd=document.createElement("a");nd.download="content.html",nd.style.display="none";const od=new Blob([ ` < html > < head > < meta charset = "utf-8" / > < / h e a d > < b o d y > < d i v s t y l e = " w i d t h : 7 5 0 p x ; m a r g i n : a u t o ; " > $ { q a } < / d i v > < / b o d y > < / h t m l > ` ] ) ; n d . h r e f = U R L . c r e a t e O b j e c t U R L ( o d ) , d o c u m e n t . b o d y . a p p e n d C h i l d ( n d ) , n d . c l i c k ( ) , d o c u m e n t . b o d y . r e m o v e C h i l d ( n d ) ; f u n c t i o n l d ( u d ) { f u n c t i o n c d ( m d , v d = [ " w i d t h " , " h e i g h t " ] ) { c o n s t A d = g e t C o m p u t e d S t y l e ( m d , n u l l ) ; r e t u r n O b j e c t . e n t r i e s ( A d ) . f i l t e r ( ( [ N d ] ) = > A d . g e t P r o p e r t y V a l u e ( N d ) & & ! v d . i n c l u d e s ( N d ) ) . m a p ( ( [ N d , I d ] ) = > ` $ { N d } : $ { I d } ; ` ) . j o i n ( " " ) } s w i t c h ( ! 0 ) { c a s e d d ( u d ) : c a s e p d ( u d ) : c a s e f d ( u d ) : u d . s e t A t t r i b u t e ( " s t y l e " , c d ( u d ) ) } u d . c h i l d r e n . l e n g t h & & A r r a y . f r o m ( u d . c h i l d r e n ) . f o r E a c h ( m d = > l d ( m
` }return od}function toBase64 $ 1(Ra){return new Promise((qa,nd)=>{const od=new FileReader;od.readAsDataURL(Ra),od.onload=()=>qa(od.result.split(",").pop()),od.onerror=ld=>nd(ld)})}function checkImage(Ra){if(!/ \. (?:gif|jpe?g|png) $ /i.test(Ra.name))return{ok:!1,msg:"请上传 JPG/PNG/GIF 格式的图片"};const nd=10;return Ra.size>nd*1024*1024?{ok:!1,msg: ` 由于公众号限制 , 图片大小不能超过 $ { nd } M ` }:{ok:!0}}function removeLeft(Ra){const qa=Ra.split( `
` ),nd=qa.filter(od=>od.trim()).map(od=>od.match(/(^ \s +)?/)[0].length).sort((od,ld)=>od-ld)[0];return qa.map(od=>od.slice(nd)).join( `
2024-12-08 09:17:51 +08:00
` )}function solveWeChatImage(){const qa=document.getElementById("output").getElementsByTagName("img");for(let nd=0;nd<qa.length;nd++){const od=qa[nd],ld=od.getAttribute("width"),ud=od.getAttribute("height");od.removeAttribute("width"),od.removeAttribute("height"),od.style.width=ld,od.style.height=ud}}function mergeCss(Ra){return juice(Ra,{inlinePseudoElements:!0,preserveImportant:!0})}function deepFreeze(Ra){return Ra instanceof Map?Ra.clear=Ra.delete=Ra.set=function(){throw new Error("map is read-only")}:Ra instanceof Set&&(Ra.add=Ra.clear=Ra.delete=function(){throw new Error("set is read-only")}),Object.freeze(Ra),Object.getOwnPropertyNames(Ra).forEach(qa=>{const nd=Ra[qa],od=typeof nd;(od==="object"||od==="function")&&!Object.isFrozen(nd)&&deepFreeze(nd)}),Ra}let Response $ 1=class{constructor(qa){qa.data===void 0&&(qa.data={}),this.data=qa.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function escapeHTML(Ra){return Ra.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function inherit $ 1(Ra,...qa){const nd=Object.create(null);for(const od in Ra)nd[od]=Ra[od];return qa.forEach(function(od){for(const ld in od)nd[ld]=od[ld]}),nd}const SPAN_CLOSE="</span>",emitsWrappingTags=Ra=>!!Ra.scope,scopeToCSSClass=(Ra,{prefix:qa})=>{if(Ra.startsWith("language:"))return Ra.replace("language:","language-");if(Ra.includes(".")){const nd=Ra.split(".");return[ ` $ { qa } $ { nd . shift ( ) } ` ,...nd.map((od,ld)=> ` $ { od } $ { "_" . repeat ( ld + 1 ) } ` )].join(" ")}return ` $ { qa } $ { Ra } ` };class HTMLRenderer{constructor(qa,nd){this.buffer="",this.classPrefix=nd.classPrefix,qa.walk(this)}addText(qa){this.buffer+=escapeHTML(qa)}openNode(qa){if(!emitsWrappingTags(qa))return;const nd=scopeToCSSClass(qa.scope,{prefix:this.classPrefix});this.span(nd)}closeNode(qa){emitsWrappingTags(qa)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(qa){this.buffer+= ` < span class = "${qa}" > ` }}const newNode=(Ra={})=>{const qa={children:[]};return Object.assign(qa,Ra),qa};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(qa){this.top.children.push(qa)}openNode(qa){const nd=newNode({scope:qa});this.add(nd),this.stack.push(nd)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(qa){return this.constructor._walk(qa,this.rootNode)}static _walk(qa,nd){return typeof nd=="string"?qa.addText(nd):nd.children&&(qa.openNode(nd),nd.children.forEach(od=>this._walk(qa,od)),qa.closeNode(nd)),qa}static _collapse(qa){typeof qa!="string"&&qa.children&&(qa.children.every(nd=>typeof nd=="string")?qa.children=[qa.children.join("")]:qa.children.forEach(nd=>{TokenTree._collapse(nd)}))}}class TokenTreeEmitter extends TokenTree{constructor(qa){super(),this.options=qa}addText(qa){qa!==""&&this.add(qa)}startScope(qa){this.openNode(qa)}endScope(){this.closeNode()}__addSublanguage(qa,nd){const od=qa.root;nd&&(od.scope= ` language : $ { nd } ` ),this.add(od)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source(Ra){return Ra?typeof Ra=="string"?Ra:Ra.source:null}function lookahead(Ra){return concat $ 2("(?=",Ra,")")}function anyNumberOfTimes(Ra){return concat $ 2("(?:",Ra,")*")}function optional(Ra){return concat $ 2("(?:",Ra,")?")}function concat $ 2(...Ra){return Ra.map(nd=>source(nd)).join("")}function stripOptionsFromArgs(Ra){const qa=Ra[Ra.length-1];return typeof qa=="object"&&qa.constructor===Object?(Ra.splice(Ra.length-1,1),qa):{}}function either(...Ra){return"("+(stripOptionsFromArgs(Ra).capture?"":"?:")+Ra.map(od=>source(od)).join("|")+")"}function countMatchGroups(Ra){return new RegExp(Ra.toString()+"|").exec("").length-1}function startsWith $ 1(Ra,qa){const nd=Ra&&Ra.exec(qa);return nd&&nd.index===0}const BACKREF_RE=/ \[ (?:[^ \\ \] ]| \\ .)* \] | \( \? ?| \\ ([1-9][0-9]*)| \\ ./;function _rewriteBackreferences(Ra,{joinWith:qa}){let nd=0;return Ra.map(od=>{nd+=1;const ld=nd;let ud
https : //github.com/highlightjs/highlight.js/issues/2277`),eh=Tf,Zf=Mf),Kf===void 0&&(Kf=!0);const $f={code:Zf,language:eh};gf("before:highlight",$f);const Df=$f.result?$f.result:vd($f.language,$f.code,Kf);return Df.code=$f.code,gf("after:highlight",Df),Df}function vd(Tf,Mf,Kf,Zf){const eh=Object.create(null);function $f(Bh,Xh){return Bh.keywords[Xh]}function Df(){if(!Uf.keywords){gh.addText(ah);return}let Bh=0;Uf.keywordPatternRe.lastIndex=0;let Xh=Uf.keywordPatternRe.exec(ah),dm="";for(;Xh;){dm+=ah.substring(Bh,Xh.index);const nh=Gf.case_insensitive?Xh[0].toLowerCase():Xh[0],Of=$f(Uf,nh);if(Of){const[Nf,rh]=Of;if(gh.addText(dm),dm="",eh[nh]=(eh[nh]||0)+1,eh[nh]<=MAX_KEYWORD_HITS&&(Ah+=rh),Nf.startsWith("_"))dm+=Xh[0];else{const ch=Gf.classNameAliases[Nf]||Nf;Jf(Xh[0],ch)}}else dm+=Xh[0];Bh=Uf.keywordPatternRe.lastIndex,Xh=Uf.keywordPatternRe.exec(ah)}dm+=ah.substring(Bh),gh.addText(dm)}function Lf(){if(ah==="")return;let Bh=null;if(typeof Uf.subLanguage=="string"){if(!qa[Uf.subLanguage]){gh.addText(ah);return}Bh=vd(Uf.subLanguage,ah,!0,ph[Uf.subLanguage]),ph[Uf.subLanguage]=Bh._top}else Bh=Nd(ah,Uf.subLanguage.length?Uf.subLanguage:null);Uf.relevance>0&&(Ah+=Bh.relevance),gh.__addSublanguage(Bh._emitter,Bh.language)}function zf(){Uf.subLanguage!=null?Lf():Df(),ah=""}function Jf(Bh,Xh){Bh!==""&&(gh.startScope(Xh),gh.addText(Bh),gh.endScope())}function xf(Bh,Xh){let dm=1;const nh=Xh.length-1;for(;dm<=nh;){if(!Bh._emit[dm]){dm++;continue}const Of=Gf.classNameAliases[Bh[dm]]||Bh[dm],Nf=Xh[dm];Of?Jf(Nf,Of):(ah=Nf,Df(),ah=""),dm++}}function yf(Bh,Xh){return Bh.scope&&typeof Bh.scope=="string"&&gh.openNode(Gf.classNameAliases[Bh.scope]||Bh.scope),Bh.beginScope&&(Bh.beginScope._wrap?(Jf(ah,Gf.classNameAliases[Bh.beginScope._wrap]||Bh.beginScope._wrap),ah=""):Bh.beginScope._multi&&(xf(Bh.beginScope,Xh),ah="")),Uf=Object.create(Bh,{parent:{value:Uf}}),Uf}function Bf(Bh,Xh,dm){let nh=startsWith$1(Bh.endRe,dm);if(nh){if(Bh["on:end"]){const Of=new Response$1(Bh);Bh["on:end"](Xh,Of),Of.isMatchIgnored&&(nh=!1)}if(nh){for(;Bh.endsParent&&Bh.parent;)Bh=Bh.parent;return Bh}}if(Bh.endsWithParent)return Bf(Bh.parent,Xh,dm)}function qf(Bh){return Uf.matcher.regexIndex===0?(ah+=Bh[0],1):(Yh=!0,0)}function oh(Bh){const Xh=Bh[0],dm=Bh.rule,nh=new Response$1(dm),Of=[dm.__beforeBegin,dm["on:begin"]];for(const Nf of Of)if(Nf&&(Nf(Bh,nh),nh.isMatchIgnored))return qf(Xh);return dm.skip?ah+=Xh:(dm.excludeBegin&&(ah+=Xh),zf(),!dm.returnBegin&&!dm.excludeBegin&&(ah=Xh)),yf(dm,Bh),dm.returnBegin?0:Xh.length}function Yf(Bh){const Xh=Bh[0],dm=Mf.substring(Bh.index),nh=Bf(Uf,Bh,dm);if(!nh)return NO_MATCH;const Of=Uf;Uf.endScope&&Uf.endScope._wrap?(zf(),Jf(Xh,Uf.endScope._wrap)):Uf.endScope&&Uf.endScope._multi?(zf(),xf(Uf.endScope,Bh)):Of.skip?ah+=Xh:(Of.returnEnd||Of.excludeEnd||(ah+=Xh),zf(),Of.excludeEnd&&(ah=Xh));do Uf.scope&&gh.closeNode(),!Uf.skip&&!Uf.subLanguage&&(Ah+=Uf.relevance),Uf=Uf.parent;while(Uf!==nh.parent);return nh.starts&&yf(nh.starts,Bh),Of.returnEnd?0:Xh.length}function kf(){const Bh=[];for(let Xh=Uf;Xh!==Gf;Xh=Xh.parent)Xh.scope&&Bh.unshift(Xh.scope);Bh.forEach(Xh=>gh.openNode(Xh))}let Vf={};function fh(Bh,Xh){const dm=Xh&&Xh[0];if(ah+=Bh,dm==null)return zf(),0;if(Vf.type==="begin"&&Xh.type==="end"&&Vf.index===Xh.index&&dm===""){if(ah+=Mf.slice(Xh.index,Xh.index+1),!ld){const nh=new Error(`0 width match regex (${Tf})`);throw nh.languageName=Tf,nh.badRule=Vf.rule,nh}return 1}if(Vf=Xh,Xh.type==="begin")return oh(Xh);if(Xh.type==="illegal"&&!Kf){const nh=new Error('Illegal lexeme "'+dm+'" for mode "'+(Uf.scope||"<unnamed>")+'"');throw nh.mode=Uf,nh}else if(Xh.type==="end"){const nh=Yf(Xh);if(nh!==NO_MATCH)return nh}if(Xh.type==="illegal"&&dm==="")return 1;if(Mh>1e5&&Mh>Xh.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ah+=dm,dm.length}const Gf=Wd(Tf);if(!Gf)throw error(ud.replace("{}",Tf)),new Error('Unknown language: "'+Tf+'"');const wf=compileLanguage(Gf);let Rf="",Uf=Zf||wf;const ph={},gh=new dd.__emitter(dd);kf();let ah="",Ah=0,dh=0,Mh=0,Yh=!1;try{if(Gf.__emitTokens)Gf.__emitTokens(Mf,gh
` },Id]}}return kotlin_1=ld,kotlin_1}var lasso_1,hasRequiredLasso;function requireLasso(){if(hasRequiredLasso)return lasso_1;hasRequiredLasso=1;function Ra(qa){const nd="[a-zA-Z_][ \\ w.]*",od="< \\ ?(lasso(script)?|=)",ld=" \\ ]| \\ ?>",ud={ $ pattern:nd+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},cd=qa.COMMENT("<!--","-->",{relevance:0}),dd={className:"meta",begin:" \\ [noprocess \\ ]",starts:{end:" \\ [/noprocess \\ ]",returnEnd:!0,contains:[cd]}},pd={className:"meta",begin:" \\ [/noprocess|"+od},fd={className:"symbol",begin:"'"+nd+"'"},md=[qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.inherit(qa.C_NUMBER_MODE,{begin:qa.C_NUMBER_RE+"|(-?infinity|NaN) \\ b"}),qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:" ` ",end:" ` "},{variants:[{begin:"[# $ ]"+nd},{begin:"#",end:" \\ d+",illegal:" \\ W"}]},{className:"type",begin:":: \\ s*",end:nd,illegal:" \\ W"},{className:"params",variants:[{begin:"-(?!infinity)"+nd,relevance:0},{begin:"( \\ . \\ . \\ .)"}]},{begin:/(->| \. ) \s */,relevance:0,contains:[fd]},{className:"class",beginKeywords:"define",returnEnd:!0,end:" \\ (|=>",contains:[qa.inherit(qa.TITLE_MODE,{begin:nd+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:ud,contains:[{className:"meta",begin:ld,relevance:0,starts:{end:" \\ [|"+od,returnEnd:!0,relevance:0,contains:[cd]}},dd,pd,{className:"meta",begin:" \\ [no_square_brackets",starts:{end:" \\ [/no_square_brackets \\ ]",keywords:ud,contains:[{className:"meta",begin:ld,relevance:0,starts:{end:" \\ [noprocess \\ ]|"+od,returnEnd:!0,contains:[cd]}},dd,pd].concat(md)}},{className:"meta",begin:" \\ [",relevance:0},{className:"meta",begin:"^#!",end:"lasso9 $ ",relevance:10}].concat(md)}}return lasso_1=Ra,lasso_1}var latex_1,hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex_1;hasRequiredLatex=1;function Ra(qa){const od=qa.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middl
] ` ,Id={scope:"string",variants:[md,fd,vd,Ad]},Od={scope:"number",variants:[{begin:" \\ b0[bB][01]+(?:_[01]+)* \\ b"},{begin:" \\ b0[oO][0-7]+(?:_[0-7]+)* \\ b"},{begin:" \\ b0[xX][ \\ da-fA-F]+(?:_[ \\ da-fA-F]+)* \\ b"},{begin:"(?: \\ b \\ d+(?:_ \\ d+)*( \\ .(?: \\ d+(?:_ \\ d+)*))?| \\ B \\ . \\ d+)(?:[eE][+-]? \\ d+)?"}],relevance:0},Fd=["false","null","true"],Pd=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],Md=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],jd={keyword:Pd,literal:(Sf=>{const gf=[];return Sf.forEach(bf=>{gf.push(bf),bf.toLowerCase()===bf?gf.push(bf.toUpperCase()):gf.push(bf.toLowerCase())}),gf})(Fd),built_in:Md},Hd=Sf=>Sf.map(gf=>gf.replace(/ \| \d + $ /,"")),Gd={variants:[{match:[/new/,nd.concat(Nd,"+"),nd.concat("(?!",Hd(Md).join(" \\ b|")," \\ b)"),ud],scope:{1:"keyword",4:"title.class"}}]},zd=nd.concat(ld," \\ b(?! \\ ()"),df={variants:[{match:[nd.concat(/::/,nd.lookahead(/(?!class \b )/)),zd],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[ud,nd.concat(/::/,nd.lookahead(/(?!class \b )/)),zd],scope:{1:"title.class",3:"variable.constant"}},{match:[ud,nd.concat("::",nd.lookahead(/(?!class \b )/))],scope:{1:"title.class"}},{match:[ud,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},Wd={scope:"attr",match:nd.concat(ld,nd.lookahead(":"),nd.lookahead(/(?!::)/))},Jd={relevance:0,begin:/ \( /,end:/ \) /,keywords:jd,contains:[Wd,cd,df,qa.C_BLOCK_COMMENT_MODE,Id,Od,Gd]},Xd={relevance:0,match:[/ \b /,nd.concat("(?!fn \\ b|function \\ b|",Hd(Pd).join(" \\ b|"),"|",Hd(Md).join(" \\ b|")," \\ b)"),ld,nd.concat(Nd,"*"),nd.lookahead(/(?= \( )/)],scope:{3:"title.function.invoke"},contains:[Jd]};Jd.contains.push(Xd);const _f=[Wd,df,qa.C_BLOCK_COMMENT_MODE,Id,Od,Gd],vf={begin:nd.concat(/# \[ \s */,ud),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:Fd,keyword:["new","array"]},contains:[{begi
2024-11-28 09:28:59 +08:00
] * ; ` ,relevance:0},{begin:"[vp][0-9]+"}]}}return smali_1=Ra,smali_1}var smalltalk_1,hasRequiredSmalltalk;function requireSmalltalk(){if(hasRequiredSmalltalk)return smalltalk_1;hasRequiredSmalltalk=1;function Ra(qa){const nd="[a-z][a-zA-Z0-9_]*",od={className:"string",begin:" \\ $ .{1}"},ld={className:"symbol",begin:"#"+qa.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[qa.COMMENT('"','"'),qa.APOS_STRING_MODE,{className:"type",begin:" \\ b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:nd+":",relevance:0},qa.C_NUMBER_MODE,ld,od,{begin:" \\ |[ ]*"+nd+"([ ]+"+nd+")*[ ]* \\ |",returnBegin:!0,end:/ \| /,illegal:/ \S /,contains:[{begin:"( \\ |[ ]*)?"+nd}]},{begin:"# \\ (",end:" \\ )",contains:[qa.APOS_STRING_MODE,od,qa.C_NUMBER_MODE,ld]}]}}return smalltalk_1=Ra,smalltalk_1}var sml_1,hasRequiredSml;function requireSml(){if(hasRequiredSml)return sml_1;hasRequiredSml=1;function Ra(qa){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{ $ pattern:"[a-z_] \\ w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/ \/ \/ |>>/,contains:[{className:"literal",begin:/ \[ ( \| \| )? \] | \( \) /,relevance:0},qa.COMMENT(" \\ ( \\ *"," \\ * \\ )",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[ \\ w']*"},{className:"type",begin:" ` [ A - Z ] [ \ \ w ']*"},{className:"type",begin:"\\b[A-Z][\\w' ] * ",relevance:0},{begin:" [ a - z _ ] \ \ w * '[\\w' ] * "},qa.inherit(qa.APOS_STRING_MODE,{className:" string ",relevance:0}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:" number ",begin:" \ \ b ( 0 [ xX ] [ a - fA - F0 - 9_ ] + [ Lln ] ? | 0 [ oO ] [ 0 - 7_ ] + [ Lln ] ? | 0 [ bB ] [ 01_ ] + [ Lln ] ? | [ 0 - 9 ] [ 0 - 9_ ] * ( [ Lln ] | ( \ \ . [ 0 - 9_ ] * ) ? ( [ eE ] [ - + ] ? [ 0 - 9_ ] + ) ? ) ? ) ",relevance:0},{begin:/[-=]>/}]}}return sml_1=Ra,sml_1}var sqf_1,hasRequiredSqf;function requireSqf(){if(hasRequiredSqf)return sqf_1;hasRequiredSqf=1;function Ra(qa){const nd={className:" variable ",begin:/\b_+[a-zA-Z]\w*/},od={className:" title ",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},ld={className:" string ",variants:[{begin:'" ',end:' "',contains:[{begin:'" "',relevance:0}]},{begin:" '",end:"' ",contains:[{begin:" '' ",relevance:0}]}]},ud=[" break "," breakWith "," breakOut "," breakTo "," case "," catch "," continue "," continueWith "," default "," do "," else "," exit "," exitWith "," for "," forEach "," from "," if "," local "," private "," switch "," step "," then "," throw "," to "," try "," waitUntil "," while "," with "],cd=[" blufor "," civilian "," configNull "," controlNull "," displayNull "," diaryRecordNull "," east "," endl "," false "," grpNull "," independent "," lineBreak "," locationNull "," nil "," objNull "," opfor "," pi "," resistance "," scriptNull "," sideAmbientLife "," sideEmpty "," sideEnemy "," sideFriendly "," sideLogic "," sideUnknown "," taskNull "," teamMemberNull "," true "," west "],dd=[" abs "," accTime "," acos "," action "," actionIDs "," actionKeys "," actionKeysEx "," actionKeysImages "," actionKeysNames "," actionKeysNamesArray "," actionName "," actionParams "," activateAddons "," activatedAddons "," activateKey "," activeTitleEffectParams "," add3DENConnection "," add3DENEventHandler "," add3DENLayer "," addAction "," addBackpack "," addBackpackCargo "," addBackpackCargoGlobal "," addBackpackGlobal "," addBinocularItem "," addCamShake "," addCuratorAddons "," addCuratorCameraArea "," addCuratorEditableObjects "," addCuratorEditingArea "," addCuratorPoints "," addEditorObject "," addEventHandler "," addForce "," addForceGeneratorRTD "," addGoggles "," addGroupIcon "," addHandgunItem "," addHeadgear "," addItem "," addItemCargo "," addItemCargoGlobal "," addItemPool "," addItemToBackpack "," addItemToUniform "," addItemToVest "," addLiveStats "," addMagazine "," addMagazineAmmoCargo "," addMagazineCargo "," addMagazineCargoGlobal "," addMagazineGlobal "," addMagazinePool "," addMagazines "," addMagazineTurret "," addMenu "," addMenuItem "," addMissionEventHandler "," addMPEventHandler "," addMusicEventHandler "," addonFiles "," addOwnedMine "," addPlayerSc
2024-09-18 09:46:23 +08:00
] * ? "'`},{begin:`" [ ^ \ r
2024-11-28 09:28:59 +08:00
"]*" ` }]},{className:"built_in",variants:[{begin:" \\ b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?= \\ ()"}]},qa.COMMENT("^[ ]* \\ *.* $ ",!1),qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE]}}return stata_1=Ra,stata_1}var step21_1,hasRequiredStep21;function requireStep21(){if(hasRequiredStep21)return step21_1;hasRequiredStep21=1;function Ra(qa){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{ $ pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},qa.C_LINE_COMMENT_MODE,qa.C_BLOCK_COMMENT_MODE,qa.COMMENT("/ \\ * \\ *!"," \\ */"),qa.C_NUMBER_MODE,qa.inherit(qa.APOS_STRING_MODE,{illegal:null}),qa.inherit(qa.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:" \\ d+",illegal:" \\ W"}]}]}}return step21_1=Ra,step21_1}var stylus_1,hasRequiredStylus;function requireStylus(){if(hasRequiredStylus)return stylus_1;hasRequiredStylus=1;const Ra=fd=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:fd.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4})) \b /},FUNCTION_DISPATCH:{className:"built_in",begin:/[ \w -]+(?= \( )/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/ \[ /,end:/ \] /,illegal:" $ ",contains:[fd.APOS_STRING_MODE,fd.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:fd.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),qa=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],nd=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],od=[...qa,...nd],ld=["any
2024-09-18 09:46:23 +08:00
( multipart ) ? ` ,end: ` \ \ ]
2024-12-08 09:17:51 +08:00
` },{className:"string",begin:" \\ d{4}- \\ d{2}- \\ d{2}( \\ s+) \\ d{2}: \\ d{2}: \\ d{2}. \\ d+Z"},{className:"string",begin:"( \\ +|-) \\ d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?) \\ s+(test)?"},{begin:"^progress(:?)( \\ s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=Ra,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function Ra(df){return df?typeof df=="string"?df:df.source:null}function qa(df){return nd("(?=",df,")")}function nd(...df){return df.map(Jd=>Ra(Jd)).join("")}function od(df){const Wd=df[df.length-1];return typeof Wd=="object"&&Wd.constructor===Object?(df.splice(df.length-1,1),Wd):{}}function ld(...df){return"("+(od(df).capture?"":"?:")+df.map(Xd=>Ra(Xd)).join("|")+")"}const ud=df=>nd(/ \b /,df,/ \w $ /.test(df)?/ \b /:/ \B /),cd=["Protocol","Type"].map(ud),dd=["init","self"].map(ud),pd=["Any","Self"],fd=["actor","any","associatedtype","async","await",/as \? /,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate \( set \) /,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init \? /,/init!/,"inout",/internal \( set \) /,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open \( set \) /,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private \( set \) /,"private","protocol",/public \( set \) /,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try \? /,/try!/,"try","typealias",/unowned \( safe \) /,/unowned \( unsafe \) /,"unowned","var","weak","where","while","willSet"],md=["false","nil","true"],vd=["assignment","associativity","higherThan","left","lowerThan","none","right"],Ad=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Nd=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Id=ld(/[/= \- +!*%<>&|^~?]/,/[ \u 00A1- \u 00A7]/,/[ \u 00A9 \u 00AB]/,/[ \u 00AC \u 00AE]/,/[ \u 00B0 \u 00B1]/,/[ \u 00B6 \u 00BB \u 00BF \u 00D7 \u 00F7]/,/[ \u 2016- \u 2017]/,/[ \u 2020- \u 2027]/,/[ \u 2030- \u 203E]/,/[ \u 2041- \u 2053]/,/[ \u 2055- \u 205E]/,/[ \u 2190- \u 23FF]/,/[ \u 2500- \u 2775]/,/[ \u 2794- \u 2BFF]/,/[ \u 2E00- \u 2E7F]/,/[ \u 3001- \u 3003]/,/[ \u 3008- \u 3020]/,/[ \u 3030]/),Od=ld(Id,/[ \u 0300- \u 036F]/,/[ \u 1DC0- \u 1DFF]/,/[ \u 20D0- \u 20FF]/,/[ \u FE00- \u FE0F]/,/[ \u FE20- \u FE2F]/),Fd=nd(Id,Od,"*"),Pd=ld(/[a-zA-Z_]/,/[ \u 00A8 \u 00AA \u 00AD \u 00AF \u 00B2- \u 00B5 \u 00B7- \u 00BA]/,/[ \u 00BC- \u 00BE \u 00C0- \u 00D6 \u 00D8- \u 00F6 \u 00F8- \u 00FF]/,/[ \u 0100- \u 02FF \u 0370- \u 167F \u 1681- \u 180D \u 180F- \u 1DBF]/,/[ \u 1E00- \u 1FFF]/,/[ \u 200B- \u 200D \u 202A- \u 202E \u 203F- \u 2040 \u 2054 \u 2060- \u 206F]/,/[ \u 2070- \u 20CF \u 2100- \u 218F \u 2460- \u 24FF \u 2776- \u 2793]/,/[ \u 2C00- \u 2DFF \u 2E80- \u 2FFF]/,/[ \u 3004- \u 3007 \u 3021- \u 302F \u 3031- \u 303F \u 3040- \u D7FF]/,/[ \u F900- \u FD3D \u FD40- \u FDCF \u FDF0- \u FE1F \u FE30- \u FE44]/,/[ \u FE47- \u FEFE \u FF00- \u FFFD]/),Md=ld(Pd,/ \d /,/[ \u 0300- \u 036F \u 1DC0- \u 1DFF \u 20D0- \u 20FF \u FE20- \u FE2F]/),Bd=nd(Pd,Md,"*"),jd=nd(/[A-Z]/,Md,"*"),Hd=["attached","autoclosure",nd(/convention \( /,ld("swift","block","c"),/ \) /),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","N
2024-11-28 09:28:59 +08:00
] ` ).replace("lheading",lheading $ 1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 1 $ 1=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode$1 = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br$1 = /^( {2,}|\\)\n(?!\s*$)/ , inlineText$1 = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation$1 = new RegExp ( "\\p{P}\\p{S}" , "u" ) , punctuation$1 = edit$1 ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation$1 ) . getRegex ( ) , blockSkip$1 = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim$1 = edit$1 ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimAst$1 = edit$1 ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , emStrongRDelimUnd$1 = edit$1 ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , anyPunctuation$1 = edit$1 ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation$1 ) . getRegex ( ) , autolink$1 = edit$1 ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment$1 = edit$1 ( _comment$1 ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag$1 = edit$1 ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment$1 ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel$1 = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link$1 = edit$1 ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink$1 = edit$1 ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel$1 ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , nolink$1 = edit$1 ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel$1 ) . getRegex ( ) , reflinkSearch$1 = edit$1 ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink$1 ) . replace ( "nolink" , nolink$1 ) . getRegex ( ) , inlineNormal$1 = { _backpedal : noopTest$1 , anyPunctuation : anyPunctuation$1 , autolink : autolink$1 , blockSkip : blockSkip$1 , br : br$1 , code : inlineCode$1 , del : noopTest$1 , emStrongLDelim : emStrongLDelim$1 , emStrongRDelimAst : emStrongRDelimAst$1 , emStrongRDelimUnd : emStrongRDelimUnd$1 , escape : escape$1$1 , link : link$1 , nolink : nolink$1 , punctuation : punctuation$1 , reflink : reflink$1 , reflinkSearch : reflinkSearch$1 , tag : tag$1 , text : inlineText$1 , url : noopTest$1 } , inlinePedantic$1 = { ... inlineNormal$1 , link : edit$1 ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) , reflink : edit$1 ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel$1 ) . getRegex ( ) } , inlineGfm$1 = { ... inlineNormal$1 , escape : edit$1 ( escape$1$1 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit$1 ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/ , text : / ^ ( [ ` ~ ] + | [ ^ ` ~ ] ) ( ? : ( ? = { 2 , } \ n ) | ( ? = [ a - z A - Z 0 - 9 . ! # $ % & ' * + \ / = ? _ ` { \ | } ~ - ] + @ ) | [ \ s \ S ] * ? ( ? : ( ? = [ \ \ < ! \ [ ` * ~ _ ] | \ b _ | h t t p s ? : \ / \ / | f t p : \ / \ / | w w w \ . | $ ) | [ ^ ] ( ? = { 2 , } \ n ) | [ ^ a - z A - Z 0 - 9 . ! # $ % & ' * + \ / = ? _ ` { \ | } ~ - ] ( ? = [ a - z A - Z 0 - 9 . ! # $ % & ' * + \ / = ? _ ` { \ | } ~ - ] + @ ) )
` ).map(ud=>{const cd=ud.match(nd.other.beginningSpace);if(cd===null)return ud;const[dd]=cd;return dd.length>=ld.length?ud.slice(ld.length):ud}).join( `
` )}let _Tokenizer $ 1=class{constructor(qa){Km(this,"options");Km(this,"rules");Km(this,"lexer");this.options=qa||_defaults $ 1}space(qa){const nd=this.rules.block.newline.exec(qa);if(nd&&nd[0].length>0)return{type:"space",raw:nd[0]}}code(qa){const nd=this.rules.block.code.exec(qa);if(nd){const od=nd[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:nd[0],codeBlockStyle:"indented",text:this.options.pedantic?od:rtrim $ 1(od, `
` )}}}fences(qa){const nd=this.rules.block.fences.exec(qa);if(nd){const od=nd[0],ld=indentCodeCompensation $ 1(od,nd[3]||"",this.rules);return{type:"code",raw:od,lang:nd[2]?nd[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):nd[2],text:ld}}}heading(qa){const nd=this.rules.block.heading.exec(qa);if(nd){let od=nd[2].trim();if(this.rules.other.endingHash.test(od)){const ld=rtrim $ 1(od,"#");(this.options.pedantic||!ld||this.rules.other.endingSpaceChar.test(ld))&&(od=ld.trim())}return{type:"heading",raw:nd[0],depth:nd[1].length,text:od,tokens:this.lexer.inline(od)}}}hr(qa){const nd=this.rules.block.hr.exec(qa);if(nd)return{type:"hr",raw:rtrim $ 1(nd[0], `
` )}}blockquote(qa){const nd=this.rules.block.blockquote.exec(qa);if(nd){let od=rtrim $ 1(nd[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-11-28 09:28:59 +08:00
` ),ld="",ud="";const cd=[];for(;od.length>0;){let dd=!1;const pd=[];let fd;for(fd=0;fd<od.length;fd++)if(this.rules.other.blockquoteStart.test(od[fd]))pd.push(od[fd]),dd=!0;else if(!dd)pd.push(od[fd]);else break;od=od.slice(fd);const md=pd.join( `
` ),vd=md.replace(this.rules.other.blockquoteSetextReplace, `
$1 ` ).replace(this.rules.other.blockquoteSetextReplace2,"");ld=ld? ` $ { ld }
$ { md } ` :md,ud=ud? ` $ { ud }
$ { vd } ` :vd;const Ad=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(vd,cd,!0),this.lexer.state.top=Ad,od.length===0)break;const Nd=cd.at(-1);if((Nd==null?void 0:Nd.type)==="code")break;if((Nd==null?void 0:Nd.type)==="blockquote"){const Id=Nd,Od=Id.raw+ `
` +od.join( `
` ),Fd=this.blockquote(Od);cd[cd.length-1]=Fd,ld=ld.substring(0,ld.length-Id.raw.length)+Fd.raw,ud=ud.substring(0,ud.length-Id.text.length)+Fd.text;break}else if((Nd==null?void 0:Nd.type)==="list"){const Id=Nd,Od=Id.raw+ `
` +od.join( `
` ),Fd=this.list(Od);cd[cd.length-1]=Fd,ld=ld.substring(0,ld.length-Nd.raw.length)+Fd.raw,ud=ud.substring(0,ud.length-Id.raw.length)+Fd.raw,od=Od.substring(cd.at(-1).raw.length).split( `
` );continue}}return{type:"blockquote",raw:ld,tokens:cd,text:ud}}}list(qa){let nd=this.rules.block.list.exec(qa);if(nd){let od=nd[1].trim();const ld=od.length>1,ud={type:"list",raw:"",ordered:ld,start:ld?+od.slice(0,-1):"",loose:!1,items:[]};od=ld? ` \ \ d { 1 , 9 } \ \ $ { od . slice ( - 1 ) } ` : ` \ \ $ { od } ` ,this.options.pedantic&&(od=ld?od:"[*+-]");const cd=this.rules.other.listItemRegex(od);let dd=!1;for(;qa;){let fd=!1,md="",vd="";if(!(nd=cd.exec(qa))||this.rules.block.hr.test(qa))break;md=nd[0],qa=qa.substring(md.length);let Ad=nd[2].split( `
` ,1)[0].replace(this.rules.other.listReplaceTabs,Md=>" ".repeat(3*Md.length)),Nd=qa.split( `
` ,1)[0],Id=!Ad.trim(),Od=0;if(this.options.pedantic?(Od=2,vd=Ad.trimStart()):Id?Od=nd[1].length+1:(Od=nd[2].search(this.rules.other.nonSpaceChar),Od=Od>4?1:Od,vd=Ad.slice(Od),Od+=nd[1].length),Id&&this.rules.other.blankLine.test(Nd)&&(md+=Nd+ `
` ,qa=qa.substring(Nd.length+1),fd=!0),!fd){const Md=this.rules.other.nextBulletRegex(Od),Bd=this.rules.other.hrRegex(Od),jd=this.rules.other.fencesBeginRegex(Od),Hd=this.rules.other.headingBeginRegex(Od),Gd=this.rules.other.htmlBeginRegex(Od);for(;qa;){const zd=qa.split( `
` ,1)[0];let df;if(Nd=zd,this.options.pedantic?(Nd=Nd.replace(this.rules.other.listReplaceNesting," "),df=Nd):df=Nd.replace(this.rules.other.tabCharGlobal," "),jd.test(Nd)||Hd.test(Nd)||Gd.test(Nd)||Md.test(Nd)||Bd.test(Nd))break;if(df.search(this.rules.other.nonSpaceChar)>=Od||!Nd.trim())vd+= `
` +df.slice(Od);else{if(Id||Ad.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||jd.test(Ad)||Hd.test(Ad)||Bd.test(Ad))break;vd+= `
` +Nd}!Id&&!Nd.trim()&&(Id=!0),md+=zd+ `
` ,qa=qa.substring(zd.length+1),Ad=df.slice(Od)}}ud.loose||(dd?ud.loose=!0:this.rules.other.doubleBlankLine.test(md)&&(dd=!0));let Fd=null,Pd;this.options.gfm&&(Fd=this.rules.other.listIsTask.exec(vd),Fd&&(Pd=Fd[0]!=="[ ] ",vd=vd.replace(this.rules.other.listReplaceTask,""))),ud.items.push({type:"list_item",raw:md,task:!!Fd,checked:Pd,loose:!1,text:vd,tokens:[]}),ud.raw+=md}const pd=ud.items.at(-1);pd&&(pd.raw=pd.raw.trimEnd(),pd.text=pd.text.trimEnd()),ud.raw=ud.raw.trimEnd();for(let fd=0;fd<ud.items.length;fd++)if(this.lexer.state.top=!1,ud.items[fd].tokens=this.lexer.blockTokens(ud.items[fd].text,[]),!ud.loose){const md=ud.items[fd].tokens.filter(Ad=>Ad.type==="space"),vd=md.length>0&&md.some(Ad=>this.rules.other.anyLine.test(Ad.raw));ud.loose=vd}if(ud.loose)for(let fd=0;fd<ud.items.length;fd++)ud.items[fd].loose=!0;return ud}}html(qa){const nd=this.rules.block.html.exec(qa);if(nd)return{type:"html",block:!0,raw:nd[0],pre:nd[1]==="pre"||nd[1]==="script"||nd[1]==="style",text:nd[0]}}def(qa){const nd=this.rules.block.def.exec(qa);if(nd){const od=nd[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),ld=nd[2]?nd[2].replace(this.rules.other.hrefBrackets," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ud=nd[3]?nd[3].substring(1,nd[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):nd[3];return{type:"def",tag:od,raw:nd[0],href:ld,title:ud}}}table(qa){var dd;const nd=this.rules.block.table.exec(qa);if(!nd||!this.rules.other.tableDelimiter.test(nd[2]))return;const od=splitCells $ 1(nd[1]),ld=nd[2].replace(this.rules.other.tableAlignChars,"").split("|"),ud=(dd=nd[3])!=null&&dd.trim()?nd[3].replace(this.rules.other.tableRowBlankLine,"").split( `
` ):[],cd={type:"table",raw:nd[0],header:[],align:[],rows:[]};if(od.length===ld.length){for(const pd of ld)this.rules.other.tableAlignRight.test(pd)?cd.align.push("right"):this.rules.other.tableAlignCenter.test(pd)?cd.align.push("center"):this.rules.other.tableAlignLeft.test(pd)?cd.align.push("left"):cd.align.push(null);for(let pd=0;pd<od.length;pd++)cd.header.push({text:od[pd],tokens:this.lexer.inline(od[pd]),header:!0,align:cd.align[pd]});for(const pd of ud)cd.rows.push(splitCells $ 1(pd,cd.header.length).map((fd,md)=>({text:fd,tokens:this.lexer.inline(fd),header:!1,align:cd.align[md]})));return cd}}lheading(qa){const nd=this.rules.block.lheading.exec(qa);if(nd)return{type:"heading",raw:nd[0],depth:nd[2].charAt(0)==="="?1:2,text:nd[1],tokens:this.lexer.inline(nd[1])}}paragraph(qa){const nd=this.rules.block.paragraph.exec(qa);if(nd){const od=nd[1].charAt(nd[1].length-1)=== `
` ?nd[1].slice(0,-1):nd[1];return{type:"paragraph",raw:nd[0],text:od,tokens:this.lexer.inline(od)}}}text(qa){const nd=this.rules.block.text.exec(qa);if(nd)return{type:"text",raw:nd[0],text:nd[0],tokens:this.lexer.inline(nd[0])}}escape(qa){const nd=this.rules.inline.escape.exec(qa);if(nd)return{type:"escape",raw:nd[0],text:nd[1]}}tag(qa){const nd=this.rules.inline.tag.exec(qa);if(nd)return!this.lexer.state.inLink&&this.rules.other.startATag.test(nd[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(nd[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(nd[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(nd[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:nd[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:nd[0]}}link(qa){const nd=this.rules.inline.link.exec(qa);if(nd){const od=nd[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(od)){if(!this.rules.other.endAngleBracket.test(od))return;const cd=rtrim $ 1(od.slice(0,-1)," \\ ");if((od.length-cd.length)%2===0)return}else{const cd=findClosingBracket $ 1(nd[2],"()");if(cd>-1){const pd=(nd[0].indexOf("!")===0?5:4)+nd[1].length+cd;nd[2]=nd[2].substring(0,cd),nd[0]=nd[0].substring(0,pd).trim(),nd[3]=""}}let ld=nd[2],ud="";if(this.options.pedantic){const cd=this.rules.other.pedanticHrefTitle.exec(ld);cd&&(ld=cd[1],ud=cd[3])}else ud=nd[3]?nd[3].slice(1,-1):"";return ld=ld.trim(),this.rules.other.startAngleBracket.test(ld)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(od)?ld=ld.slice(1):ld=ld.slice(1,-1)),outputLink $ 1(nd,{href:ld&&ld.replace(this.rules.inline.anyPunctuation," $ 1"),title:ud&&ud.replace(this.rules.inline.anyPunctuation," $ 1")},nd[0],this.lexer,this.rules)}}reflink(qa,nd){let od;if((od=this.rules.inline.reflink.exec(qa))||(od=this.rules.inline.nolink.exec(qa))){const ld=(od[2]||od[1]).replace(this.rules.other.multipleSpaceGlobal," "),ud=nd[ld.toLowerCase()];if(!ud){const cd=od[0].charAt(0);return{type:"text",raw:cd,text:cd}}return outputLink $ 1(od,ud,od[0],this.lexer,this.rules)}}emStrong(qa,nd,od=""){let ld=this.rules.inline.emStrongLDelim.exec(qa);if(!ld||ld[3]&&od.match(this.rules.other.unicodeAlphaNumeric))return;if(!(ld[1]||ld[2]||"")||!od||this.rules.inline.punctuation.exec(od)){const cd=[...ld[0]].length-1;let dd,pd,fd=cd,md=0;const vd=ld[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(vd.lastIndex=0,nd=nd.slice(-1*qa.length+cd);(ld=vd.exec(nd))!=null;){if(dd=ld[1]||ld[2]||ld[3]||ld[4]||ld[5]||ld[6],!dd)continue;if(pd=[...dd].length,ld[3]||ld[4]){fd+=pd;continue}else if((ld[5]||ld[6])&&cd%3&&!((cd+pd)%3)){md+=pd;continue}if(fd-=pd,fd>0)continue;pd=Math.min(pd,pd+fd+md);const Ad=[...ld[0]][0].length,Nd=qa.slice(0,cd+ld.index+Ad+pd);if(Math.min(cd,pd)%2){const Od=Nd.slice(1,-1);return{type:"em",raw:Nd,text:Od,tokens:this.lexer.inlineTokens(Od)}}const Id=Nd.slice(2,-2);return{type:"strong",raw:Nd,text:Id,tokens:this.lexer.inlineTokens(Id)}}}}codespan(qa){const nd=this.rules.inline.code.exec(qa);if(nd){let od=nd[2].replace(this.rules.other.newLineCharGlobal," ");const ld=this.rules.other.nonSpaceChar.test(od),ud=this.rules.other.startingSpaceChar.test(od)&&this.rules.other.endingSpaceChar.test(od);return ld&&ud&&(od=od.substring(1,od.length-1)),{type:"codespan",raw:nd[0],text:od}}}br(qa){const nd=this.rules.inline.br.exec(qa);if(nd)return{type:"br",raw:nd[0]}}del(qa){const nd=this.rules.inline.del.exec(qa);if(nd)return{type:"del",raw:nd[0],text:nd[2],tokens:this.lexer.inlineTokens(nd[2])}}autolink(qa){const nd=this.rules.inline.autolink.exec(qa);if(nd){let od,ld;return nd[2]==="@"?(od=nd[1],ld="mailto:"+od):(od=nd[1],ld=od),{type:"link",raw:nd[0],text:od,href:ld,tokens:[{type:"text",raw:od,text:od}]}}}url(qa){var od;let nd;if(nd=this.rules.inline.url.exec(qa)){let ld,ud;if(nd[2]==="@")ld=nd[0],ud="mailto:"+ld;else{let cd;do cd=nd[0],nd[0]=((od=this.rules.inline._backpedal.exec(nd[0]))==null?void 0:od[0])??"";w
` ),this.blockTokens(qa,this.tokens);for(let nd=0;nd<this.inlineQueue.length;nd++){const od=this.inlineQueue[nd];this.inlineTokens(od.src,od.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,nd=[],od=!1){var ld,ud,cd;for(this.options.pedantic&&(qa=qa.replace(other.tabCharGlobal," ").replace(other.spaceLine,""));qa;){let dd;if((ud=(ld=this.options.extensions)==null?void 0:ld.block)!=null&&ud.some(fd=>(dd=fd.call({lexer:this},qa,nd))?(qa=qa.substring(dd.raw.length),nd.push(dd),!0):!1))continue;if(dd=this.tokenizer.space(qa)){qa=qa.substring(dd.raw.length);const fd=nd.at(-1);dd.raw.length===1&&fd!==void 0?fd.raw+= `
` :nd.push(dd);continue}if(dd=this.tokenizer.code(qa)){qa=qa.substring(dd.raw.length);const fd=nd.at(-1);(fd==null?void 0:fd.type)==="paragraph"||(fd==null?void 0:fd.type)==="text"?(fd.raw+= `
` +dd.raw,fd.text+= `
` +dd.text,this.inlineQueue.at(-1).src=fd.text):nd.push(dd);continue}if(dd=this.tokenizer.fences(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.heading(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.hr(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.blockquote(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.list(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.html(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.def(qa)){qa=qa.substring(dd.raw.length);const fd=nd.at(-1);(fd==null?void 0:fd.type)==="paragraph"||(fd==null?void 0:fd.type)==="text"?(fd.raw+= `
` +dd.raw,fd.text+= `
` +dd.raw,this.inlineQueue.at(-1).src=fd.text):this.tokens.links[dd.tag]||(this.tokens.links[dd.tag]={href:dd.href,title:dd.title});continue}if(dd=this.tokenizer.table(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}if(dd=this.tokenizer.lheading(qa)){qa=qa.substring(dd.raw.length),nd.push(dd);continue}let pd=qa;if((cd=this.options.extensions)!=null&&cd.startBlock){let fd=1/0;const md=qa.slice(1);let vd;this.options.extensions.startBlock.forEach(Ad=>{vd=Ad.call({lexer:this},md),typeof vd=="number"&&vd>=0&&(fd=Math.min(fd,vd))}),fd<1/0&&fd>=0&&(pd=qa.substring(0,fd+1))}if(this.state.top&&(dd=this.tokenizer.paragraph(pd))){const fd=nd.at(-1);od&&(fd==null?void 0:fd.type)==="paragraph"?(fd.raw+= `
` +dd.raw,fd.text+= `
` +dd.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=fd.text):nd.push(dd),od=pd.length!==qa.length,qa=qa.substring(dd.raw.length);continue}if(dd=this.tokenizer.text(qa)){qa=qa.substring(dd.raw.length);const fd=nd.at(-1);(fd==null?void 0:fd.type)==="text"?(fd.raw+= `
` +dd.raw,fd.text+= `
` +dd.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=fd.text):nd.push(dd);continue}if(qa){const fd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(fd);break}else throw new Error(fd)}}return this.state.top=!0,nd}inline(qa,nd=[]){return this.inlineQueue.push({src:qa,tokens:nd}),nd}inlineTokens(qa,nd=[]){var dd,pd,fd;let od=qa,ld=null;if(this.tokens.links){const md=Object.keys(this.tokens.links);if(md.length>0)for(;(ld=this.tokenizer.rules.inline.reflinkSearch.exec(od))!=null;)md.includes(ld[0].slice(ld[0].lastIndexOf("[")+1,-1))&&(od=od.slice(0,ld.index)+"["+"a".repeat(ld[0].length-2)+"]"+od.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ld=this.tokenizer.rules.inline.blockSkip.exec(od))!=null;)od=od.slice(0,ld.index)+"["+"a".repeat(ld[0].length-2)+"]"+od.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ld=this.tokenizer.rules.inline.anyPunctuation.exec(od))!=null;)od=od.slice(0,ld.index)+"++"+od.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let ud=!1,cd="";for(;qa;){ud||(cd=""),ud=!1;let md;if((pd=(dd=this.options.extensions)==null?void 0:dd.inline)!=null&&pd.some(Ad=>(md=Ad.call({lexer:this},qa,nd))?(qa=qa.substring(md.raw.length),nd.push(md),!0):!1))continue;if(md=this.tokenizer.escape(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.tag(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.link(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(md.raw.length);const Ad=nd.at(-1);md.type==="text"&&(Ad==null?void 0:Ad.type)==="text"?(Ad.raw+=md.raw,Ad.text+=md.text):nd.push(md);continue}if(md=this.tokenizer.emStrong(qa,od,cd)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.codespan(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.br(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.del(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(md=this.tokenizer.autolink(qa)){qa=qa.substring(md.raw.length),nd.push(md);continue}if(!this.state.inLink&&(md=this.tokenizer.url(qa))){qa=qa.substring(md.raw.length),nd.push(md);continue}let vd=qa;if((fd=this.options.extensions)!=null&&fd.startInline){let Ad=1/0;const Nd=qa.slice(1);let Id;this.options.extensions.startInline.forEach(Od=>{Id=Od.call({lexer:this},Nd),typeof Id=="number"&&Id>=0&&(Ad=Math.min(Ad,Id))}),Ad<1/0&&Ad>=0&&(vd=qa.substring(0,Ad+1))}if(md=this.tokenizer.inlineText(vd)){qa=qa.substring(md.raw.length),md.raw.slice(-1)!=="_"&&(cd=md.raw.slice(-1)),ud=!0;const Ad=nd.at(-1);(Ad==null?void 0:Ad.type)==="text"?(Ad.raw+=md.raw,Ad.text+=md.text):nd.push(md);continue}if(qa){const Ad="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(Ad);break}else throw new Error(Ad)}}return nd}},_Renderer $ 1=class{constructor(qa){Km(this,"options");Km(this,"parser");this.options=qa||_defaults $ 1}space(qa){return""}code({text:qa,lang:nd,escaped:od}){var cd;const ld=(cd=(nd||"").match(other.notSpaceStart))==null?void 0:cd[0],ud=qa.replace(other.endingNewline,"")+ `
` ;return ld?'<pre><code class="language-'+escape $ 3(ld)+'">'+(od?ud:escape $ 3(ud,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(od?ud:escape $ 3(ud,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-11-28 09:28:59 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:nd}){return ` < h$ { nd } > $ { this . parser . parseInline ( qa ) } < / h $ { n d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-11-28 09:28:59 +08:00
` }list(qa){const nd=qa.ordered,od=qa.start;let ld="";for(let dd=0;dd<qa.items.length;dd++){const pd=qa.items[dd];ld+=this.listitem(pd)}const ud=nd?"ol":"ul",cd=nd&&od!==1?' start="'+od+'"':"";return"<"+ud+cd+ ` >
` +ld+"</"+ud+ ` >
` }listitem(qa){var od;let nd="";if(qa.task){const ld=this.checkbox({checked:!!qa.checked});qa.loose?((od=qa.tokens[0])==null?void 0:od.type)==="paragraph"?(qa.tokens[0].text=ld+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=ld+" "+escape $ 3(qa.tokens[0].tokens[0].text),qa.tokens[0].tokens[0].escaped=!0)):qa.tokens.unshift({type:"text",raw:ld+" ",text:ld+" ",escaped:!0}):nd+=ld+" "}return nd+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { nd } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-11-28 09:28:59 +08:00
` }table(qa){let nd="",od="";for(let ud=0;ud<qa.header.length;ud++)od+=this.tablecell(qa.header[ud]);nd+=this.tablerow({text:od});let ld="";for(let ud=0;ud<qa.rows.length;ud++){const cd=qa.rows[ud];od="";for(let dd=0;dd<cd.length;dd++)od+=this.tablecell(cd[dd]);ld+=this.tablerow({text:od})}return ld&&(ld= ` < tbody > $ { ld } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-11-28 09:28:59 +08:00
` +nd+ ` < / t h e a d >
` +ld+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-11-28 09:28:59 +08:00
` }tablecell(qa){const nd=this.parser.parseInline(qa.tokens),od=qa.header?"th":"td";return(qa.align? ` < $ { od } align = "${qa.align}" > ` : ` < $ { od } > ` )+nd+ ` < / $ { o d } >
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { e s c a p e $ 3 ( q a , ! 0 ) } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : n d , t o k e n s : o d } ) { c o n s t l d = t h i s . p a r s e r . p a r s e I n l i n e ( o d ) , u d = c l e a n U r l $ 1 ( q a ) ; i f ( u d = = = n u l l ) r e t u r n l d ; q a = u d ; l e t c d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n n d & & ( c d + = ' t i t l e = " ' + e s c a p e $ 3 ( n d ) + ' " ' ) , c d + = " > " + l d + " < / a > " , c d } i m a g e ( { h r e f : q a , t i t l e : n d , t e x t : o d } ) { c o n s t l d = c l e a n U r l $ 1 ( q a ) ; i f ( l d = = = n u l l ) r e t u r n e s c a p e $ 3 ( o d ) ; q a = l d ; l e t u d = ` < i m g s r c = " $ { q a } " a l t = " $ { o d } " ` ; r e t u r n n d & & ( u d + = ` t i t l e = " $ { e s c a p e $ 3 ( n d ) } " ` ) , u d + = " > " , u d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : " e s c a p e d " i n q a & & q a . e s c a p e d ? q a . t e x t : e s c a p e $ 3 ( q a . t e x t ) } } , _ T e x t R e n d e r e r $ 1 = c l a s s { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } , _ P a r s e r $ 1 = c l a s s T T { c o n s t r u c t o r ( q a ) { K m ( t h i s , " o p t i o n s " ) ; K m ( t h i s , " r e n d e r e r " ) ; K m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s $ 1 , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r $ 1 , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r $ 1 } s t a t i c p a r s e ( q a , n d ) { r e t u r n n e w T T ( n d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , n d ) { r e t u r n n e w T T ( n d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , n d = ! 0 ) { v a r l d , u d ; l e t o d = " " ; f o r ( l e t c d = 0 ; c d < q a . l e n g t h ; c d + + ) { c o n s t d d = q a [ c d ] ; i f ( ( u d = ( l d = t h i s . o p t i o n s . e x t e n s i o n s ) = = n u l l ? v o i d 0 : l d . r e n d e r e r s ) ! = n u l l & & u d [ d d . t y p e ] ) { c o n s t f d = d d , m d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ f d . t y p e ] . c a l l ( { p a r s e r : t h i s } , f d ) ; i f ( m d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( f d . t y p e ) ) { o d + = m d | | " " ; c o n t i n u e } } c o n s t p d = d d ; s w i t c h ( p d . t y p e ) { c a s e " s p a c e " : { o d + = t h i s . r e n d e r e r . s p a c e ( p d ) ; c o n t i n u e } c a s e " h r " : { o d + = t h i s . r e n d e r e r . h r ( p d ) ; c o n t i n u e } c a s e " h e a d i n g " : { o d + = t h i s . r e n d e r e r . h e a d i n g ( p d ) ; c o n t i n u e } c a s e " c o d e " : { o d + = t h i s . r e n d e r e r . c o d e ( p d ) ; c o n t i n u e } c a s e " t a b l e " : { o d + = t h i s . r e n d e r e r . t a b l e ( p d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { o d + = t h i s . r e n d e r e r . b l o c k q u o t e ( p d ) ; c o n t i n u e } c a s e " l i s t " : { o d + = t h i s . r e n d e r e r . l i s t ( p d ) ; c o n t i n u e } c a s e " h t m l " : { o d + = t h i s . r e n d e r e r . h t m l ( p d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { o d + = t h i s . r e n d e r e r . p a r a g r a p h ( p d ) ; c o n t i n u e } c a s e " t e x t " : { l e t f d = p d , m d = t h i s . r e n d e r e r . t e x t ( f d ) ; f o r ( ; c d + 1 < q a . l e n g t h & & q a [ c d + 1 ] . t y p e = = = " t e x t " ; ) f d = q a [ + + c d ] , m d + = `
` +this.renderer.text(fd);nd?od+=this.renderer.paragraph({type:"paragraph",raw:md,text:md,tokens:[{type:"text",raw:md,text:md,escaped:!0}]}):od+=md;continue}default:{const fd='Token with "'+pd.type+'" type was not found.';if(this.options.silent)return console.error(fd),"";throw new Error(fd)}}}return od}parseInline(qa,nd=this.renderer){var ld,ud;let od="";for(let cd=0;cd<qa.length;cd++){const dd=qa[cd];if((ud=(ld=this.options.extensions)==null?void 0:ld.renderers)!=null&&ud[dd.type]){const fd=this.options.extensions.renderers[dd.type].call({parser:this},dd);if(fd!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(dd.type)){od+=fd||"";continue}}const pd=dd;switch(pd.type){case"escape":{od+=nd.text(pd);break}case"html":{od+=nd.html(pd);break}case"link":{od+=nd.link(pd);break}case"image":{od+=nd.image(pd);break}case"strong":{od+=nd.strong(pd);break}case"em":{od+=nd.em(pd);break}case"codespan":{od+=nd.codespan(pd);break}case"br":{od+=nd.br(pd);break}case"del":{od+=nd.del(pd);break}case"text":{od+=nd.text(pd);break}default:{const fd='Token with "'+pd.type+'" type was not found.';if(this.options.silent)return console.error(fd),"";throw new Error(fd)}}}return od}};var yT;let _Hooks $ 1=(yT=class{constructor(qa){Km(this,"options");Km(this,"block");this.options=qa||_defaults $ 1}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}provideLexer(){return this.block?_Lexer $ 1.lex:_Lexer $ 1.lexInline}provideParser(){return this.block?_Parser $ 1.parse:_Parser $ 1.parseInline}},Km(yT,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),yT),Marked $ 1=class{constructor(...qa){Km(this,"defaults",_getDefaults $ 1());Km(this,"options",this.setOptions);Km(this,"parse",this.parseMarkdown(!0));Km(this,"parseInline",this.parseMarkdown(!1));Km(this,"Parser",_Parser $ 1);Km(this,"Renderer",_Renderer $ 1);Km(this,"TextRenderer",_TextRenderer $ 1);Km(this,"Lexer",_Lexer $ 1);Km(this,"Tokenizer",_Tokenizer $ 1);Km(this,"Hooks",_Hooks $ 1);this.use(...qa)}walkTokens(qa,nd){var ld,ud;let od=[];for(const cd of qa)switch(od=od.concat(nd.call(this,cd)),cd.type){case"table":{const dd=cd;for(const pd of dd.header)od=od.concat(this.walkTokens(pd.tokens,nd));for(const pd of dd.rows)for(const fd of pd)od=od.concat(this.walkTokens(fd.tokens,nd));break}case"list":{const dd=cd;od=od.concat(this.walkTokens(dd.items,nd));break}default:{const dd=cd;(ud=(ld=this.defaults.extensions)==null?void 0:ld.childTokens)!=null&&ud[dd.type]?this.defaults.extensions.childTokens[dd.type].forEach(pd=>{const fd=dd[pd].flat(1/0);od=od.concat(this.walkTokens(fd,nd))}):dd.tokens&&(od=od.concat(this.walkTokens(dd.tokens,nd)))}}return od}use(...qa){const nd=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(od=>{const ld={...od};if(ld.async=this.defaults.async||ld.async||!1,od.extensions&&(od.extensions.forEach(ud=>{if(!ud.name)throw new Error("extension name required");if("renderer"in ud){const cd=nd.renderers[ud.name];cd?nd.renderers[ud.name]=function(...dd){let pd=ud.renderer.apply(this,dd);return pd===!1&&(pd=cd.apply(this,dd)),pd}:nd.renderers[ud.name]=ud.renderer}if("tokenizer"in ud){if(!ud.level||ud.level!=="block"&&ud.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const cd=nd[ud.level];cd?cd.unshift(ud.tokenizer):nd[ud.level]=[ud.tokenizer],ud.start&&(ud.level==="block"?nd.startBlock?nd.startBlock.push(ud.start):nd.startBlock=[ud.start]:ud.level==="inline"&&(nd.startInline?nd.startInline.push(ud.start):nd.startInline=[ud.start]))}"childTokens"in ud&&ud.childTokens&&(nd.childTokens[ud.name]=ud.childTokens)}),ld.extensions=nd),od.renderer){const ud=this.defaults.renderer||new _Renderer $ 1(this.defaults);for(const cd in od.renderer){if(!(cd in ud))throw new Error( ` renderer '${cd}' does not exist ` );if(["options","parser"].includes(cd))continue;const dd=cd,pd=od.renderer[dd],fd=ud[dd];ud[dd]=(...md)=>{let vd=pd.apply(ud,md);return vd===!1&&(vd=fd.apply(ud,md)),vd||""}}ld.renderer=ud}if(od.tokenizer){const ud=this.defaults.tokenizer||new _Tokenizer $ 1(this.defau
2024-12-08 09:17:51 +08:00
Please report this to https : //github.com/markedjs/marked.`,qa){const ld="<p>An error occurred:</p><pre>"+escape$3(od.message+"",!0)+"</pre>";return nd?Promise.resolve(ld):ld}if(nd)return Promise.reject(od);throw od}}};const markedInstance$1=new Marked$1;function marked$1(Ra,qa){return markedInstance$1.parse(Ra,qa)}marked$1.options=marked$1.setOptions=function(Ra){return markedInstance$1.setOptions(Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.getDefaults=_getDefaults$1;marked$1.defaults=_defaults$1;marked$1.use=function(...Ra){return markedInstance$1.use(...Ra),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.walkTokens=function(Ra,qa){return markedInstance$1.walkTokens(Ra,qa)};marked$1.parseInline=markedInstance$1.parseInline;marked$1.Parser=_Parser$1;marked$1.parser=_Parser$1.parse;marked$1.Renderer=_Renderer$1;marked$1.TextRenderer=_TextRenderer$1;marked$1.Lexer=_Lexer$1;marked$1.lexer=_Lexer$1.lex;marked$1.Tokenizer=_Tokenizer$1;marked$1.Hooks=_Hooks$1;marked$1.parse=marked$1;marked$1.options;marked$1.setOptions;marked$1.use;marked$1.walkTokens;marked$1.parseInline;_Parser$1.parse;_Lexer$1.lex;const scriptRel="modulepreload",assetsURL=function(Ra){return"/md/"+Ra},seen={},__vitePreload=function(qa,nd,od){let ld=Promise.resolve();if(nd&&nd.length>0){document.getElementsByTagName("link");const cd=document.querySelector("meta[property=csp-nonce]"),dd=(cd==null?void 0:cd.nonce)||(cd==null?void 0:cd.getAttribute("nonce"));ld=Promise.allSettled(nd.map(pd=>{if(pd=assetsURL(pd),pd in seen)return;seen[pd]=!0;const fd=pd.endsWith(".css"),md=fd?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${pd}"]${md}`))return;const vd=document.createElement("link");if(vd.rel=fd?"stylesheet":scriptRel,fd||(vd.as="script"),vd.crossOrigin="",vd.href=pd,dd&&vd.setAttribute("nonce",dd),document.head.appendChild(vd),fd)return new Promise((Ad,Nd)=>{vd.addEventListener("load",Ad),vd.addEventListener("error",()=>Nd(new Error(`Unable to preload CSS for ${pd}`)))})}))}function ud(cd){const dd=new Event("vite:preloadError",{cancelable:!0});if(dd.payload=cd,window.dispatchEvent(dd),!dd.defaultPrevented)throw cd}return ld.then(cd=>{for(const dd of cd||[])dd.status==="rejected"&&ud(dd.reason);return qa().catch(ud)})},Channel={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:Ra=>Ra>=255?255:Ra<0?0:Ra,g:Ra=>Ra>=255?255:Ra<0?0:Ra,b:Ra=>Ra>=255?255:Ra<0?0:Ra,h:Ra=>Ra%360,s:Ra=>Ra>=100?100:Ra<0?0:Ra,l:Ra=>Ra>=100?100:Ra<0?0:Ra,a:Ra=>Ra>=1?1:Ra<0?0:Ra},toLinear:Ra=>{const qa=Ra/255;return Ra>.03928?Math.pow((qa+.055)/1.055,2.4):qa/12.92},hue2rgb:(Ra,qa,nd)=>(nd<0&&(nd+=1),nd>1&&(nd-=1),nd<1/6?Ra+(qa-Ra)*6*nd:nd<1/2?qa:nd<2/3?Ra+(qa-Ra)*(2/3-nd)*6:Ra),hsl2rgb:({h:Ra,s:qa,l:nd},od)=>{if(!qa)return nd*2.55;Ra/=360,qa/=100,nd/=100;const ld=nd<.5?nd*(1+qa):nd+qa-nd*qa,ud=2*nd-ld;switch(od){case"r":return Channel.hue2rgb(ud,ld,Ra+1/3)*255;case"g":return Channel.hue2rgb(ud,ld,Ra)*255;case"b":return Channel.hue2rgb(ud,ld,Ra-1/3)*255}},rgb2hsl:({r:Ra,g:qa,b:nd},od)=>{Ra/=255,qa/=255,nd/=255;const ld=Math.max(Ra,qa,nd),ud=Math.min(Ra,qa,nd),cd=(ld+ud)/2;if(od==="l")return cd*100;if(ld===ud)return 0;const dd=ld-ud,pd=cd>.5?dd/(2-ld-ud):dd/(ld+ud);if(od==="s")return pd*100;switch(ld){case Ra:return((qa-nd)/dd+(qa<nd?6:0))*60;case qa:return((nd-Ra)/dd+2)*60;case nd:return((Ra-qa)/dd+4)*60;default:return-1}}},Lang={clamp:(Ra,qa,nd)=>qa>nd?Math.min(qa,Math.max(nd,Ra)):Math.min(nd,Math.max(qa,Ra)),round:Ra=>Math.round(Ra*1e10)/1e10},Unit={dec2hex:Ra=>{const qa=Math.round(Ra).toString(16);return qa.length>1?qa:`0${qa}`}},Utils={channel:Channel,lang:Lang,unit:Unit},DEC2HEX={};for(let Ra=0;Ra<=255;Ra++)DEC2HEX[Ra]=Utils.unit.dec2hex(Ra);const TYPE={ALL:0,RGB:1,HSL:2};class Type{constructor(){this.type=TYPE.ALL}get(){return this.type}set(qa){if(this.type&&this.type!==qa)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=qa}reset(){this.type=TYPE.ALL}is(qa){return this.type===qa}}class Channe
` +S_),Yf&&arrayForEach([_f,vf,Sf],C_=>{S_=stringReplace(S_,C_," ")}),jd&&Uf?jd.createHTML(S_):S_},qa.setConfig=function(){let wh=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};j_(wh),fh=!0},qa.clearConfig=function(){T_=null,fh=!1},qa.isValidAttribute=function(wh,_h,Jh){T_||j_({});const um=l_(wh),Um=l_(_h);return uh(um,Um,Jh)},qa.addHook=function(wh,_h){typeof _h=="function"&&(Xd[wh]=Xd[wh]||[],arrayPush(Xd[wh],_h))},qa.removeHook=function(wh){if(Xd[wh])return arrayPop(Xd[wh])},qa.removeHooks=function(wh){Xd[wh]&&(Xd[wh]=[])},qa.removeAllHooks=function(){Xd={}},qa}var purify=createDOMPurify(),__defProp=Object.defineProperty,__name=(Ra,qa)=>__defProp(Ra,"name",{value:qa,configurable:!0}),__export=(Ra,qa)=>{for(var nd in qa)__defProp(Ra,nd,{get:qa[nd],enumerable:!0})},LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},log $ 1={trace:__name((...Ra)=>{},"trace"),debug:__name((...Ra)=>{},"debug"),info:__name((...Ra)=>{},"info"),warn:__name((...Ra)=>{},"warn"),error:__name((...Ra)=>{},"error"),fatal:__name((...Ra)=>{},"fatal")},setLogLevel=__name(function(Ra="fatal"){let qa=LEVELS.fatal;typeof Ra=="string"?Ra.toLowerCase()in LEVELS&&(qa=LEVELS[Ra]):typeof Ra=="number"&&(qa=Ra),log $ 1.trace=()=>{},log $ 1.debug=()=>{},log $ 1.info=()=>{},log $ 1.warn=()=>{},log $ 1.error=()=>{},log $ 1.fatal=()=>{},qa<=LEVELS.fatal&&(log $ 1.fatal=console.error?console.error.bind(console,format $ 1("FATAL"),"color: orange"):console.log.bind(console," \x 1B[35m",format $ 1("FATAL"))),qa<=LEVELS.error&&(log $ 1.error=console.error?console.error.bind(console,format $ 1("ERROR"),"color: orange"):console.log.bind(console," \x 1B[31m",format $ 1("ERROR"))),qa<=LEVELS.warn&&(log $ 1.warn=console.warn?console.warn.bind(console,format $ 1("WARN"),"color: orange"):console.log.bind(console," \x 1B[33m",format $ 1("WARN"))),qa<=LEVELS.info&&(log $ 1.info=console.info?console.info.bind(console,format $ 1("INFO"),"color: lightblue"):console.log.bind(console," \x 1B[34m",format $ 1("INFO"))),qa<=LEVELS.debug&&(log $ 1.debug=console.debug?console.debug.bind(console,format $ 1("DEBUG"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("DEBUG"))),qa<=LEVELS.trace&&(log $ 1.trace=console.debug?console.debug.bind(console,format $ 1("TRACE"),"color: lightgreen"):console.log.bind(console," \x 1B[32m",format $ 1("TRACE")))},"setLogLevel"),format $ 1=__name(Ra=> ` % c$ { dayjs2 ( ) . format ( "ss.SSS" ) } : $ { Ra } : ` ,"format"),frontMatterRegex=/^-{3} \s *[ \n \r ](.*?)[ \n \r ]-{3} \s *[ \n \r ]+/s,directiveRegex=/%{2}{ \s *(?:( \w +) \s *:|( \w +)) \s *(?:( \w +)|((?:(?!}%{2}).| \r ? \n )*))? \s *(?:}%{2})?/gi,anyCommentRegex=/ \s *%%.* \n /gm,ay,UnknownDiagramError=(ay=class extends Error{constructor(qa){super(qa),this.name="UnknownDiagramError"}},__name(ay,"UnknownDiagramError"),ay),detectors={},detectType $ 1=__name(function(Ra,qa){Ra=Ra.replace(frontMatterRegex,"").replace(directiveRegex,"").replace(anyCommentRegex, `
2024-11-28 09:28:59 +08:00
` );for(const[nd,{detector:od}]of Object.entries(detectors))if(od(Ra,qa))return nd;throw new UnknownDiagramError( ` No diagram type detected matching given configuration for text : $ { Ra } ` )},"detectType"),registerLazyLoadedDiagrams=__name((...Ra)=>{for(const{id:qa,detector:nd,loader:od}of Ra)addDetector(qa,nd,od)},"registerLazyLoadedDiagrams"),addDetector=__name((Ra,qa,nd)=>{detectors[Ra]&&log $ 1.warn( ` Detector with key $ { Ra } already exists . Overwriting . ` ),detectors[Ra]={detector:qa,loader:nd},log $ 1.debug( ` Detector with key $ { Ra } added$ { nd ? " with loader" : "" } ` )},"addDetector"),getDiagramLoader=__name(Ra=>detectors[Ra].loader,"getDiagramLoader"),assignWithDepth=__name((Ra,qa,{depth:nd=2,clobber:od=!1}={})=>{const ld={depth:nd,clobber:od};return Array.isArray(qa)&&!Array.isArray(Ra)?(qa.forEach(ud=>assignWithDepth(Ra,ud,ld)),Ra):Array.isArray(qa)&&Array.isArray(Ra)?(qa.forEach(ud=>{Ra.includes(ud)||Ra.push(ud)}),Ra):Ra===void 0||nd<=0?Ra!=null&&typeof Ra=="object"&&typeof qa=="object"?Object.assign(Ra,qa):qa:(qa!==void 0&&typeof Ra=="object"&&typeof qa=="object"&&Object.keys(qa).forEach(ud=>{typeof qa[ud]=="object"&&(Ra[ud]===void 0||typeof Ra[ud]=="object")?(Ra[ud]===void 0&&(Ra[ud]=Array.isArray(qa[ud])?[]:{}),Ra[ud]=assignWithDepth(Ra[ud],qa[ud],{depth:nd-1,clobber:od})):(od||typeof Ra[ud]!="object"&&typeof qa[ud]!="object")&&(Ra[ud]=qa[ud])}),Ra)},"assignWithDepth"),assignWithDepth_default=assignWithDepth,oldAttributeBackgroundColorOdd="#ffffff",oldAttributeBackgroundColorEven="#f2f2f2",mkBorder=__name((Ra,qa)=>qa?adjust(Ra,{s:-40,l:10}):adjust(Ra,{s:-40,l:-10}),"mkBorder"),sy,Theme=(sy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var nd,od,ld,ud,cd,dd,pd,fd,md,vd,Ad;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||adjust(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||adjust(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||mkBorder(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||mkBorder(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||mkBorder(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||mkBorder(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||invert(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||invert(this.tertiaryColor),this.lineColor=this.lineColor||invert(this.background),this.arrowheadColor=this.arrowheadColor||invert(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?darken(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextCo
font - family : $ { nd . fontFamily } ;
font - size : $ { nd . fontSize } ;
fill : $ { nd . textColor }
2024-09-18 09:46:23 +08:00
}
/* Classes common for multiple diagrams */
& . error - icon {
2024-11-28 09:28:59 +08:00
fill : $ { nd . errorBkgColor } ;
2024-09-18 09:46:23 +08:00
}
& . error - text {
2024-11-28 09:28:59 +08:00
fill : $ { nd . errorTextColor } ;
stroke : $ { nd . errorTextColor } ;
2024-09-18 09:46:23 +08:00
}
& . edge - thickness - normal {
stroke - width : 1 px ;
}
& . edge - thickness - thick {
stroke - width : 3.5 px
}
& . edge - pattern - solid {
stroke - dasharray : 0 ;
}
& . edge - thickness - invisible {
stroke - width : 0 ;
fill : none ;
}
& . edge - pattern - dashed {
stroke - dasharray : 3 ;
}
. edge - pattern - dotted {
stroke - dasharray : 2 ;
}
& . marker {
2024-11-28 09:28:59 +08:00
fill : $ { nd . lineColor } ;
stroke : $ { nd . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& . marker . cross {
2024-11-28 09:28:59 +08:00
stroke : $ { nd . lineColor } ;
2024-09-18 09:46:23 +08:00
}
& svg {
2024-11-28 09:28:59 +08:00
font - family : $ { nd . fontFamily } ;
font - size : $ { nd . fontSize } ;
2024-09-18 09:46:23 +08:00
}
& p {
margin : 0
}
2024-11-28 09:28:59 +08:00
$ { od }
2024-09-18 09:46:23 +08:00
$ { qa }
2024-11-27 11:30:55 +08:00
` },"getStyles"),addStylesForDiagram=__name((Ra,qa)=>{qa!==void 0&&(themes[Ra]=qa)},"addStylesForDiagram"),styles_default=getStyles $ 1,commonDb_exports={};__export(commonDb_exports,{clear:()=>clear $ 2,getAccDescription:()=>getAccDescription,getAccTitle:()=>getAccTitle,getDiagramTitle:()=>getDiagramTitle,setAccDescription:()=>setAccDescription,setAccTitle:()=>setAccTitle,setDiagramTitle:()=>setDiagramTitle});var accTitle="",diagramTitle="",accDescription="",sanitizeText2=__name(Ra=>sanitizeText(Ra,getConfig $ 1()),"sanitizeText"),clear $ 2=__name(()=>{accTitle="",accDescription="",diagramTitle=""},"clear"),setAccTitle=__name(Ra=>{accTitle=sanitizeText2(Ra).replace(/^ \s +/g,"")},"setAccTitle"),getAccTitle=__name(()=>accTitle,"getAccTitle"),setAccDescription=__name(Ra=>{accDescription=sanitizeText2(Ra).replace(/ \n \s +/g, `
2024-11-28 09:28:59 +08:00
` )},"setAccDescription"),getAccDescription=__name(()=>accDescription,"getAccDescription"),setDiagramTitle=__name(Ra=>{diagramTitle=sanitizeText2(Ra)},"setDiagramTitle"),getDiagramTitle=__name(()=>diagramTitle,"getDiagramTitle"),log2=log $ 1,setLogLevel2=setLogLevel,getConfig2=getConfig $ 1,setConfig2=setConfig,defaultConfig2=defaultConfig,sanitizeText3=__name(Ra=>sanitizeText(Ra,getConfig2()),"sanitizeText"),setupGraphViewbox2=setupGraphViewbox,getCommonDb=__name(()=>commonDb_exports,"getCommonDb"),diagrams={},registerDiagram=__name((Ra,qa,nd)=>{var od;diagrams[Ra]&&log2.warn( ` Diagram with id $ { Ra } already registered . Overwriting . ` ),diagrams[Ra]=qa,nd&&addDetector(Ra,nd),addStylesForDiagram(Ra,qa.styles),(od=qa.injectUtils)==null||od.call(qa,log2,setLogLevel2,getConfig2,sanitizeText3,setupGraphViewbox2,getCommonDb(),()=>{})},"registerDiagram"),getDiagram=__name(Ra=>{if(Ra in diagrams)return diagrams[Ra];throw new DiagramNotFoundError(Ra)},"getDiagram"),Cy,DiagramNotFoundError=(Cy=class extends Error{constructor(qa){super( ` Diagram $ { qa } not found . ` )}},__name(Cy,"DiagramNotFoundError"),Cy);function isNothing(Ra){return typeof Ra>"u"||Ra===null}__name(isNothing,"isNothing");function isObject $ 3(Ra){return typeof Ra=="object"&&Ra!==null}__name(isObject $ 3,"isObject");function toArray $ 2(Ra){return Array.isArray(Ra)?Ra:isNothing(Ra)?[]:[Ra]}__name(toArray $ 2,"toArray");function extend $ 2(Ra,qa){var nd,od,ld,ud;if(qa)for(ud=Object.keys(qa),nd=0,od=ud.length;nd<od;nd+=1)ld=ud[nd],Ra[ld]=qa[ld];return Ra}__name(extend $ 2,"extend");function repeat(Ra,qa){var nd="",od;for(od=0;od<qa;od+=1)nd+=Ra;return nd}__name(repeat,"repeat");function isNegativeZero(Ra){return Ra===0&&Number.NEGATIVE_INFINITY===1/Ra}__name(isNegativeZero,"isNegativeZero");var isNothing_1=isNothing,isObject_1=isObject $ 3,toArray_1=toArray $ 2,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend $ 2,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(Ra,qa){var nd="",od=Ra.reason||"(unknown reason)";return Ra.mark?(Ra.mark.name&&(nd+='in "'+Ra.mark.name+'" '),nd+="("+(Ra.mark.line+1)+":"+(Ra.mark.column+1)+")",!qa&&Ra.mark.snippet&&(nd+= `
` +Ra.mark.snippet),od+" "+nd):od}__name(formatError,"formatError");function YAMLException $ 1(Ra,qa){Error.call(this),this.name="YAMLException",this.reason=Ra,this.mark=qa,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}__name(YAMLException $ 1,"YAMLException $ 1");YAMLException $ 1.prototype=Object.create(Error.prototype);YAMLException $ 1.prototype.constructor=YAMLException $ 1;YAMLException $ 1.prototype.toString=__name(function(qa){return this.name+": "+formatError(this,qa)},"toString");var exception=YAMLException $ 1;function getLine(Ra,qa,nd,od,ld){var ud="",cd="",dd=Math.floor(ld/2)-1;return od-qa>dd&&(ud=" ... ",qa=od-dd+ud.length),nd-od>dd&&(cd=" ...",nd=od+dd-cd.length),{str:ud+Ra.slice(qa,nd).replace(/ \t /g,"→")+cd,pos:od-qa+ud.length}}__name(getLine,"getLine");function padStart(Ra,qa){return common.repeat(" ",qa-Ra.length)+Ra}__name(padStart,"padStart");function makeSnippet(Ra,qa){if(qa=Object.create(qa||null),!Ra.buffer)return null;qa.maxLength||(qa.maxLength=79),typeof qa.indent!="number"&&(qa.indent=1),typeof qa.linesBefore!="number"&&(qa.linesBefore=3),typeof qa.linesAfter!="number"&&(qa.linesAfter=2);for(var nd=/ \r ? \n | \r | \0 /g,od=[0],ld=[],ud,cd=-1;ud=nd.exec(Ra.buffer);)ld.push(ud.index),od.push(ud.index+ud[0].length),Ra.position<=ud.index&&cd<0&&(cd=od.length-2);cd<0&&(cd=od.length-1);var dd="",pd,fd,md=Math.min(Ra.line+qa.linesAfter,ld.length).toString().length,vd=qa.maxLength-(qa.indent+md+3);for(pd=1;pd<=qa.linesBefore&&!(cd-pd<0);pd++)fd=getLine(Ra.buffer,od[cd-pd],ld[cd-pd],Ra.position-(od[cd]-od[cd-pd]),vd),dd=common.repeat(" ",qa.indent)+padStart((Ra.line-pd+1).toString(),md)+" | "+fd.str+ `
` +dd;for(fd=getLine(Ra.buffer,od[cd],ld[cd],Ra.position,vd),dd+=common.repeat(" ",qa.indent)+padStart((Ra.line+1).toString(),md)+" | "+fd.str+ `
` ,dd+=common.repeat("-",qa.indent+md+3+fd.pos)+ ` ^
` ,pd=1;pd<=qa.linesAfter&&!(cd+pd>=ld.length);pd++)fd=getLine(Ra.buffer,od[cd+pd],ld[cd+pd],Ra.position-(od[cd]-od[cd+pd]),vd),dd+=common.repeat(" ",qa.indent)+padStart((Ra.line+pd+1).toString(),md)+" | "+fd.str+ `
` ;return dd.replace(/ \n $ /,"")}__name(makeSnippet,"makeSnippet");var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(Ra){var qa={};return Ra!==null&&Object.keys(Ra).forEach(function(nd){Ra[nd].forEach(function(od){qa[String(od)]=nd})}),qa}__name(compileStyleAliases,"compileStyleAliases");function Type $ 1(Ra,qa){if(qa=qa||{},Object.keys(qa).forEach(function(nd){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(nd)===-1)throw new exception('Unknown option "'+nd+'" is met in definition of "'+Ra+'" YAML type.')}),this.options=qa,this.tag=Ra,this.kind=qa.kind||null,this.resolve=qa.resolve||function(){return!0},this.construct=qa.construct||function(nd){return nd},this.instanceOf=qa.instanceOf||null,this.predicate=qa.predicate||null,this.represent=qa.represent||null,this.representName=qa.representName||null,this.defaultStyle=qa.defaultStyle||null,this.multi=qa.multi||!1,this.styleAliases=compileStyleAliases(qa.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+Ra+'" YAML type.')}__name(Type $ 1,"Type $ 1");var type $ 1=Type $ 1;function compileList(Ra,qa){var nd=[];return Ra[qa].forEach(function(od){var ld=nd.length;nd.forEach(function(ud,cd){ud.tag===od.tag&&ud.kind===od.kind&&ud.multi===od.multi&&(ld=cd)}),nd[ld]=od}),nd}__name(compileList,"compileList");function compileMap(){var Ra={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},qa,nd;function od(ld){ld.multi?(Ra.multi[ld.kind].push(ld),Ra.multi.fallback.push(ld)):Ra[ld.kind][ld.tag]=Ra.fallback[ld.tag]=ld}for(__name(od,"collectType"),qa=0,nd=arguments.length;qa<nd;qa+=1)arguments[qa].forEach(od);return Ra}__name(compileMap,"compileMap");function Schema $ 1(Ra){return this.extend(Ra)}__name(Schema $ 1,"Schema $ 1");Schema $ 1.prototype.extend=__name(function(qa){var nd=[],od=[];if(qa instanceof type $ 1)od.push(qa);else if(Array.isArray(qa))od=od.concat(qa);else if(qa&&(Array.isArray(qa.implicit)||Array.isArray(qa.explicit)))qa.implicit&&(nd=nd.concat(qa.implicit)),qa.explicit&&(od=od.concat(qa.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");nd.forEach(function(ud){if(!(ud instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(ud.loadKind&&ud.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(ud.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),od.forEach(function(ud){if(!(ud instanceof type $ 1))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var ld=Object.create(Schema $ 1.prototype);return ld.implicit=(this.implicit||[]).concat(nd),ld.explicit=(this.explicit||[]).concat(od),ld.compiledImplicit=compileList(ld,"implicit"),ld.compiledExplicit=compileList(ld,"explicit"),ld.compiledTypeMap=compileMap(ld.compiledImplicit,ld.compiledExplicit),ld},"extend");var schema=Schema $ 1,str=new type $ 1("tag:yaml.org,2002:str",{kind:"scalar",construct:__name(function(Ra){return Ra!==null?Ra:""},"construct")}),seq $ 1=new type $ 1("tag:yaml.org,2002:seq",{kind:"sequence",construct:__name(function(Ra){return Ra!==null?Ra:[]},"construct")}),map $ 2=new type $ 1("tag:yaml.org,2002:map",{kind:"mapping",construct:__name(function(Ra){return Ra!==null?Ra:{}},"construct")}),failsafe=new schema({explicit:[str,seq $ 1,map $ 2]});function resolveYamlNull(Ra){if(Ra===null)return!0;var qa=Ra.length;return qa===1&&Ra==="~"||qa===4&&(Ra==="null"||Ra==="Null"||Ra==="NULL")}__name(resolveYamlNull,"resolveYamlNull");function constructYamlNull(){return null}__name(constructYamlNull,"constructYamlNull");function isNull(Ra){
\ r ` ;function resolveYamlBinary(Ra){if(Ra===null)return!1;var qa,nd,od=0,ld=Ra.length,ud=BASE64_MAP;for(nd=0;nd<ld;nd++)if(qa=ud.indexOf(Ra.charAt(nd)),!(qa>64)){if(qa<0)return!1;od+=6}return od%8===0}__name(resolveYamlBinary,"resolveYamlBinary");function constructYamlBinary(Ra){var qa,nd,od=Ra.replace(/[ \r \n =]/g,""),ld=od.length,ud=BASE64_MAP,cd=0,dd=[];for(qa=0;qa<ld;qa++)qa%4===0&&qa&&(dd.push(cd>>16&255),dd.push(cd>>8&255),dd.push(cd&255)),cd=cd<<6|ud.indexOf(od.charAt(qa));return nd=ld%4*6,nd===0?(dd.push(cd>>16&255),dd.push(cd>>8&255),dd.push(cd&255)):nd===18?(dd.push(cd>>10&255),dd.push(cd>>2&255)):nd===12&&dd.push(cd>>4&255),new Uint8Array(dd)}__name(constructYamlBinary,"constructYamlBinary");function representYamlBinary(Ra){var qa="",nd=0,od,ld,ud=Ra.length,cd=BASE64_MAP;for(od=0;od<ud;od++)od%3===0&&od&&(qa+=cd[nd>>18&63],qa+=cd[nd>>12&63],qa+=cd[nd>>6&63],qa+=cd[nd&63]),nd=(nd<<8)+Ra[od];return ld=ud%3,ld===0?(qa+=cd[nd>>18&63],qa+=cd[nd>>12&63],qa+=cd[nd>>6&63],qa+=cd[nd&63]):ld===2?(qa+=cd[nd>>10&63],qa+=cd[nd>>4&63],qa+=cd[nd<<2&63],qa+=cd[64]):ld===1&&(qa+=cd[nd>>2&63],qa+=cd[nd<<4&63],qa+=cd[64],qa+=cd[64]),qa}__name(representYamlBinary,"representYamlBinary");function isBinary(Ra){return Object.prototype.toString.call(Ra)==="[object Uint8Array]"}__name(isBinary,"isBinary");var binary=new type $ 1("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty $ 3=Object.prototype.hasOwnProperty,_toString $ 2=Object.prototype.toString;function resolveYamlOmap(Ra){if(Ra===null)return!0;var qa=[],nd,od,ld,ud,cd,dd=Ra;for(nd=0,od=dd.length;nd<od;nd+=1){if(ld=dd[nd],cd=!1,_toString $ 2.call(ld)!=="[object Object]")return!1;for(ud in ld)if(_hasOwnProperty $ 3.call(ld,ud))if(!cd)cd=!0;else return!1;if(!cd)return!1;if(qa.indexOf(ud)===-1)qa.push(ud);else return!1}return!0}__name(resolveYamlOmap,"resolveYamlOmap");function constructYamlOmap(Ra){return Ra!==null?Ra:[]}__name(constructYamlOmap,"constructYamlOmap");var omap=new type $ 1("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString $ 1=Object.prototype.toString;function resolveYamlPairs(Ra){if(Ra===null)return!0;var qa,nd,od,ld,ud,cd=Ra;for(ud=new Array(cd.length),qa=0,nd=cd.length;qa<nd;qa+=1){if(od=cd[qa],_toString $ 1.call(od)!=="[object Object]"||(ld=Object.keys(od),ld.length!==1))return!1;ud[qa]=[ld[0],od[ld[0]]]}return!0}__name(resolveYamlPairs,"resolveYamlPairs");function constructYamlPairs(Ra){if(Ra===null)return[];var qa,nd,od,ld,ud,cd=Ra;for(ud=new Array(cd.length),qa=0,nd=cd.length;qa<nd;qa+=1)od=cd[qa],ld=Object.keys(od),ud[qa]=[ld[0],od[ld[0]]];return ud}__name(constructYamlPairs,"constructYamlPairs");var pairs=new type $ 1("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty $ 2=Object.prototype.hasOwnProperty;function resolveYamlSet(Ra){if(Ra===null)return!0;var qa,nd=Ra;for(qa in nd)if(_hasOwnProperty $ 2.call(nd,qa)&&nd[qa]!==null)return!1;return!0}__name(resolveYamlSet,"resolveYamlSet");function constructYamlSet(Ra){return Ra!==null?Ra:{}}__name(constructYamlSet,"constructYamlSet");var set $ 2=new type $ 1("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core $ 1.extend({implicit:[timestamp,merge $ 1],explicit:[binary,omap,pairs,set $ 2]}),_hasOwnProperty $ 1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[ \x 00- \x 08 \x 0B \x 0C \x 0E- \x 1F \x 7F- \x 84 \x 86- \x 9F \u FFFE \u FFFF]|[ \u D800- \u DBFF](?![ \u DC00- \u DFFF])|(?:[^ \u D800- \u DBFF]|^)[ \u DC00- \u DFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[ \x 85 \u 2028 \u 2029]/,PATTERN_FLOW_INDICATORS=/[, \[ \] \{ \} ]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z \- ]+!) $ /i,PATTERN_TAG_URI=/^(?:!|[^, \[ \] \{ \} ])(?:%[0-9a-f]{2}|[0-9a-z \- #; \/ \? :@&= \+ \$ ,_ \. !~ \* ' \( \) \[ \] ])* $ /i;function _class(Ra){return Object.prototype.toString.call(Ra)}__name(_class,"_class");function is_EOL(Ra){return Ra===10|
` :Ra===118?" \v ":Ra===102?" \f ":Ra===114?" \r ":Ra===101?" \x 1B":Ra===32?" ":Ra===34?'"':Ra===47?"/":Ra===92?" \\ ":Ra===78?"
":Ra===95?" ":Ra===76?" \u 2028":Ra===80?" \u 2029":""}__name(simpleEscapeSequence,"simpleEscapeSequence");function charFromCodepoint(Ra){return Ra<=65535?String.fromCharCode(Ra):String.fromCharCode((Ra-65536>>10)+55296,(Ra-65536&1023)+56320)}__name(charFromCodepoint,"charFromCodepoint");var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i $ 1=0;i $ 1<256;i $ 1++)simpleEscapeCheck[i $ 1]=simpleEscapeSequence(i $ 1)?1:0,simpleEscapeMap[i $ 1]=simpleEscapeSequence(i $ 1);var i $ 1;function State $ 1(Ra,qa){this.input=Ra,this.filename=qa.filename||null,this.schema=qa.schema||_default,this.onWarning=qa.onWarning||null,this.legacy=qa.legacy||!1,this.json=qa.json||!1,this.listener=qa.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Ra.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}__name(State $ 1,"State $ 1");function generateError(Ra,qa){var nd={name:Ra.filename,buffer:Ra.input.slice(0,-1),position:Ra.position,line:Ra.line,column:Ra.position-Ra.lineStart};return nd.snippet=snippet(nd),new exception(qa,nd)}__name(generateError,"generateError");function throwError(Ra,qa){throw generateError(Ra,qa)}__name(throwError,"throwError");function throwWarning(Ra,qa){Ra.onWarning&&Ra.onWarning.call(null,generateError(Ra,qa))}__name(throwWarning,"throwWarning");var directiveHandlers={YAML:__name(function(qa,nd,od){var ld,ud,cd;qa.version!==null&&throwError(qa,"duplication of %YAML directive"),od.length!==1&&throwError(qa,"YAML directive accepts exactly one argument"),ld=/^([0-9]+) \. ([0-9]+) $ /.exec(od[0]),ld===null&&throwError(qa,"ill-formed argument of the YAML directive"),ud=parseInt(ld[1],10),cd=parseInt(ld[2],10),ud!==1&&throwError(qa,"unacceptable YAML version of the document"),qa.version=od[0],qa.checkLineBreaks=cd<2,cd!==1&&cd!==2&&throwWarning(qa,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:__name(function(qa,nd,od){var ld,ud;od.length!==2&&throwError(qa,"TAG directive accepts exactly two arguments"),ld=od[0],ud=od[1],PATTERN_TAG_HANDLE.test(ld)||throwError(qa,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty $ 1.call(qa.tagMap,ld)&&throwError(qa,'there is a previously declared suffix for "'+ld+'" tag handle'),PATTERN_TAG_URI.test(ud)||throwError(qa,"ill-formed tag prefix (second argument) of the TAG directive");try{ud=decodeURIComponent(ud)}catch{throwError(qa,"tag prefix is malformed: "+ud)}qa.tagMap[ld]=ud},"handleTagDirective")};function captureSegment(Ra,qa,nd,od){var ld,ud,cd,dd;if(qa<nd){if(dd=Ra.input.slice(qa,nd),od)for(ld=0,ud=dd.length;ld<ud;ld+=1)cd=dd.charCodeAt(ld),cd===9||32<=cd&&cd<=1114111||throwError(Ra,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(dd)&&throwError(Ra,"the stream contains non-printable characters");Ra.result+=dd}}__name(captureSegment,"captureSegment");function mergeMappings(Ra,qa,nd,od){var ld,ud,cd,dd;for(common.isObject(nd)||throwError(Ra,"cannot merge mappings; the provided source object is unacceptable"),ld=Object.keys(nd),cd=0,dd=ld.length;cd<dd;cd+=1)ud=ld[cd],_hasOwnProperty $ 1.call(qa,ud)||(qa[ud]=nd[ud],od[ud]=!0)}__name(mergeMappings,"mergeMappings");function storeMappingPair(Ra,qa,nd,od,ld,ud,cd,dd,pd){var fd,md;if(Array.isArray(ld))for(ld=Array.prototype.slice.call(ld),fd=0,md=ld.length;fd<md;fd+=1)Array.isArray(ld[fd])&&throwError(Ra,"nested arrays are not supported inside keys"),typeof ld=="object"&&_class(ld[fd])==="[object Object]"&&(ld[fd]="[object Object]");if(typeof ld=="object"&&_class(ld)==="[object Object]"&&(ld="[object Object]"),ld=String(ld),qa===null&&(qa={}),od==="tag:yaml.org,2002:merge")if(Array.isArray(ud))for(fd=0,md=ud.length;fd<md;fd+=1)mergeMappings(Ra,qa,ud[fd],nd);else mergeMappings(Ra,qa,ud,nd);else!Ra.json&&!_hasOwnProperty $ 1.call(nd,ld)&&_hasOwnProperty $ 1.call(qa,ld)&&(Ra.line=cd||Ra.line,Ra.lineStart=dd||Ra.lineStart,Ra.position=pd||Ra.positio
` ,qa-1))}__name(writeFoldedLines,"writeFoldedLines");function readPlainScalar(Ra,qa,nd){var od,ld,ud,cd,dd,pd,fd,md,vd=Ra.kind,Ad=Ra.result,Nd;if(Nd=Ra.input.charCodeAt(Ra.position),is_WS_OR_EOL(Nd)||is_FLOW_INDICATOR(Nd)||Nd===35||Nd===38||Nd===42||Nd===33||Nd===124||Nd===62||Nd===39||Nd===34||Nd===37||Nd===64||Nd===96||(Nd===63||Nd===45)&&(ld=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(ld)||nd&&is_FLOW_INDICATOR(ld)))return!1;for(Ra.kind="scalar",Ra.result="",ud=cd=Ra.position,dd=!1;Nd!==0;){if(Nd===58){if(ld=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(ld)||nd&&is_FLOW_INDICATOR(ld))break}else if(Nd===35){if(od=Ra.input.charCodeAt(Ra.position-1),is_WS_OR_EOL(od))break}else{if(Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)||nd&&is_FLOW_INDICATOR(Nd))break;if(is_EOL(Nd))if(pd=Ra.line,fd=Ra.lineStart,md=Ra.lineIndent,skipSeparationSpace(Ra,!1,-1),Ra.lineIndent>=qa){dd=!0,Nd=Ra.input.charCodeAt(Ra.position);continue}else{Ra.position=cd,Ra.line=pd,Ra.lineStart=fd,Ra.lineIndent=md;break}}dd&&(captureSegment(Ra,ud,cd,!1),writeFoldedLines(Ra,Ra.line-pd),ud=cd=Ra.position,dd=!1),is_WHITE_SPACE(Nd)||(cd=Ra.position+1),Nd=Ra.input.charCodeAt(++Ra.position)}return captureSegment(Ra,ud,cd,!1),Ra.result?!0:(Ra.kind=vd,Ra.result=Ad,!1)}__name(readPlainScalar,"readPlainScalar");function readSingleQuotedScalar(Ra,qa){var nd,od,ld;if(nd=Ra.input.charCodeAt(Ra.position),nd!==39)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,od=ld=Ra.position;(nd=Ra.input.charCodeAt(Ra.position))!==0;)if(nd===39)if(captureSegment(Ra,od,Ra.position,!0),nd=Ra.input.charCodeAt(++Ra.position),nd===39)od=Ra.position,Ra.position++,ld=Ra.position;else return!0;else is_EOL(nd)?(captureSegment(Ra,od,ld,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),od=ld=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a single quoted scalar"):(Ra.position++,ld=Ra.position);throwError(Ra,"unexpected end of the stream within a single quoted scalar")}__name(readSingleQuotedScalar,"readSingleQuotedScalar");function readDoubleQuotedScalar(Ra,qa){var nd,od,ld,ud,cd,dd;if(dd=Ra.input.charCodeAt(Ra.position),dd!==34)return!1;for(Ra.kind="scalar",Ra.result="",Ra.position++,nd=od=Ra.position;(dd=Ra.input.charCodeAt(Ra.position))!==0;){if(dd===34)return captureSegment(Ra,nd,Ra.position,!0),Ra.position++,!0;if(dd===92){if(captureSegment(Ra,nd,Ra.position,!0),dd=Ra.input.charCodeAt(++Ra.position),is_EOL(dd))skipSeparationSpace(Ra,!1,qa);else if(dd<256&&simpleEscapeCheck[dd])Ra.result+=simpleEscapeMap[dd],Ra.position++;else if((cd=escapedHexLen(dd))>0){for(ld=cd,ud=0;ld>0;ld--)dd=Ra.input.charCodeAt(++Ra.position),(cd=fromHexCode(dd))>=0?ud=(ud<<4)+cd:throwError(Ra,"expected hexadecimal character");Ra.result+=charFromCodepoint(ud),Ra.position++}else throwError(Ra,"unknown escape sequence");nd=od=Ra.position}else is_EOL(dd)?(captureSegment(Ra,nd,od,!0),writeFoldedLines(Ra,skipSeparationSpace(Ra,!1,qa)),nd=od=Ra.position):Ra.position===Ra.lineStart&&testDocumentSeparator(Ra)?throwError(Ra,"unexpected end of the document within a double quoted scalar"):(Ra.position++,od=Ra.position)}throwError(Ra,"unexpected end of the stream within a double quoted scalar")}__name(readDoubleQuotedScalar,"readDoubleQuotedScalar");function readFlowCollection(Ra,qa){var nd=!0,od,ld,ud,cd=Ra.tag,dd,pd=Ra.anchor,fd,md,vd,Ad,Nd,Id=Object.create(null),Od,Fd,Pd,Md;if(Md=Ra.input.charCodeAt(Ra.position),Md===91)md=93,Nd=!1,dd=[];else if(Md===123)md=125,Nd=!0,dd={};else return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=dd),Md=Ra.input.charCodeAt(++Ra.position);Md!==0;){if(skipSeparationSpace(Ra,!0,qa),Md=Ra.input.charCodeAt(Ra.position),Md===md)return Ra.position++,Ra.tag=cd,Ra.anchor=pd,Ra.kind=Nd?"mapping":"sequence",Ra.result=dd,!0;nd?Md===44&&throwError(Ra,"expected the node content, but found ','"):throwError(Ra,"missed comma between flow collection entries"),Fd=Od=Pd=null,vd=Ad=!1,Md===63&&(fd=Ra.input.charCodeAt(Ra.position+1),is_WS_OR_EOL(fd)&&(vd=Ad=!0,Ra.position++,skipSeparationSpace(Ra,!0,qa))),od=Ra.l
` ,ud?1+pd:pd):ld===CHOMPING_CLIP&&ud&&(Ra.result+= `
` );break}for(od?is_WHITE_SPACE(vd)?(fd=!0,Ra.result+=common.repeat( `
` ,ud?1+pd:pd)):fd?(fd=!1,Ra.result+=common.repeat( `
` ,pd+1)):pd===0?ud&&(Ra.result+=" "):Ra.result+=common.repeat( `
` ,pd):Ra.result+=common.repeat( `
` ,ud?1+pd:pd),ud=!0,cd=!0,pd=0,nd=Ra.position;!is_EOL(vd)&&vd!==0;)vd=Ra.input.charCodeAt(++Ra.position);captureSegment(Ra,nd,Ra.position,!1)}return!0}__name(readBlockScalar,"readBlockScalar");function readBlockSequence(Ra,qa){var nd,od=Ra.tag,ld=Ra.anchor,ud=[],cd,dd=!1,pd;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=ud),pd=Ra.input.charCodeAt(Ra.position);pd!==0&&(Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),!(pd!==45||(cd=Ra.input.charCodeAt(Ra.position+1),!is_WS_OR_EOL(cd))));){if(dd=!0,Ra.position++,skipSeparationSpace(Ra,!0,-1)&&Ra.lineIndent<=qa){ud.push(null),pd=Ra.input.charCodeAt(Ra.position);continue}if(nd=Ra.line,composeNode(Ra,qa,CONTEXT_BLOCK_IN,!1,!0),ud.push(Ra.result),skipSeparationSpace(Ra,!0,-1),pd=Ra.input.charCodeAt(Ra.position),(Ra.line===nd||Ra.lineIndent>qa)&&pd!==0)throwError(Ra,"bad indentation of a sequence entry");else if(Ra.lineIndent<qa)break}return dd?(Ra.tag=od,Ra.anchor=ld,Ra.kind="sequence",Ra.result=ud,!0):!1}__name(readBlockSequence,"readBlockSequence");function readBlockMapping(Ra,qa,nd){var od,ld,ud,cd,dd,pd,fd=Ra.tag,md=Ra.anchor,vd={},Ad=Object.create(null),Nd=null,Id=null,Od=null,Fd=!1,Pd=!1,Md;if(Ra.firstTabInLine!==-1)return!1;for(Ra.anchor!==null&&(Ra.anchorMap[Ra.anchor]=vd),Md=Ra.input.charCodeAt(Ra.position);Md!==0;){if(!Fd&&Ra.firstTabInLine!==-1&&(Ra.position=Ra.firstTabInLine,throwError(Ra,"tab characters must not be used in indentation")),od=Ra.input.charCodeAt(Ra.position+1),ud=Ra.line,(Md===63||Md===58)&&is_WS_OR_EOL(od))Md===63?(Fd&&(storeMappingPair(Ra,vd,Ad,Nd,Id,null,cd,dd,pd),Nd=Id=Od=null),Pd=!0,Fd=!0,ld=!0):Fd?(Fd=!1,ld=!0):throwError(Ra,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),Ra.position+=1,Md=od;else{if(cd=Ra.line,dd=Ra.lineStart,pd=Ra.position,!composeNode(Ra,nd,CONTEXT_FLOW_OUT,!1,!0))break;if(Ra.line===ud){for(Md=Ra.input.charCodeAt(Ra.position);is_WHITE_SPACE(Md);)Md=Ra.input.charCodeAt(++Ra.position);if(Md===58)Md=Ra.input.charCodeAt(++Ra.position),is_WS_OR_EOL(Md)||throwError(Ra,"a whitespace character is expected after the key-value separator within a block mapping"),Fd&&(storeMappingPair(Ra,vd,Ad,Nd,Id,null,cd,dd,pd),Nd=Id=Od=null),Pd=!0,Fd=!1,ld=!1,Nd=Ra.tag,Id=Ra.result;else if(Pd)throwError(Ra,"can not read an implicit mapping pair; a colon is missed");else return Ra.tag=fd,Ra.anchor=md,!0}else if(Pd)throwError(Ra,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Ra.tag=fd,Ra.anchor=md,!0}if((Ra.line===ud||Ra.lineIndent>qa)&&(Fd&&(cd=Ra.line,dd=Ra.lineStart,pd=Ra.position),composeNode(Ra,qa,CONTEXT_BLOCK_OUT,!0,ld)&&(Fd?Id=Ra.result:Od=Ra.result),Fd||(storeMappingPair(Ra,vd,Ad,Nd,Id,Od,cd,dd,pd),Nd=Id=Od=null),skipSeparationSpace(Ra,!0,-1),Md=Ra.input.charCodeAt(Ra.position)),(Ra.line===ud||Ra.lineIndent>qa)&&Md!==0)throwError(Ra,"bad indentation of a mapping entry");else if(Ra.lineIndent<qa)break}return Fd&&storeMappingPair(Ra,vd,Ad,Nd,Id,null,cd,dd,pd),Pd&&(Ra.tag=fd,Ra.anchor=md,Ra.kind="mapping",Ra.result=vd),Pd}__name(readBlockMapping,"readBlockMapping");function readTagProperty(Ra){var qa,nd=!1,od=!1,ld,ud,cd;if(cd=Ra.input.charCodeAt(Ra.position),cd!==33)return!1;if(Ra.tag!==null&&throwError(Ra,"duplication of a tag property"),cd=Ra.input.charCodeAt(++Ra.position),cd===60?(nd=!0,cd=Ra.input.charCodeAt(++Ra.position)):cd===33?(od=!0,ld="!!",cd=Ra.input.charCodeAt(++Ra.position)):ld="!",qa=Ra.position,nd){do cd=Ra.input.charCodeAt(++Ra.position);while(cd!==0&&cd!==62);Ra.position<Ra.length?(ud=Ra.input.slice(qa,Ra.position),cd=Ra.input.charCodeAt(++Ra.position)):throwError(Ra,"unexpected end of the stream within a verbatim tag")}else{for(;cd!==0&&!is_WS_OR_EOL(cd);)cd===33&&(od?throwError(Ra,"tag suffix cannot contain exclamation marks"):(ld=Ra.input.slice(qa-1,Ra.position+1),PATTERN_TAG_HANDLE.test(ld)||throwError(Ra,"named tag handle cannot contain such characters"),od=!0,qa=Ra.position+1)),cd=Ra.input.charCodeAt(++Ra.position);
` ),Ra.charCodeAt(0)===65279&&(Ra=Ra.slice(1)));var nd=new State $ 1(Ra,qa),od=Ra.indexOf(" \0 ");for(od!==-1&&(nd.position=od,throwError(nd,"null byte is not allowed in input")),nd.input+=" \0 ";nd.input.charCodeAt(nd.position)===32;)nd.lineIndent+=1,nd.position+=1;for(;nd.position<nd.length-1;)readDocument(nd);return nd.documents}__name(loadDocuments,"loadDocuments");function loadAll $ 1(Ra,qa,nd){qa!==null&&typeof qa=="object"&&typeof nd>"u"&&(nd=qa,qa=null);var od=loadDocuments(Ra,nd);if(typeof qa!="function")return od;for(var ld=0,ud=od.length;ld<ud;ld+=1)qa(od[ld])}__name(loadAll $ 1,"loadAll $ 1");function load $ 1(Ra,qa){var nd=loadDocuments(Ra,qa);if(nd.length!==0){if(nd.length===1)return nd[0];throw new exception("expected a single document in the stream, but found more")}}__name(load $ 1,"load $ 1");var loadAll_1=loadAll $ 1,load_1=load $ 1,loader $ 1={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]=" \\ 0";ESCAPE_SEQUENCES[7]=" \\ a";ESCAPE_SEQUENCES[8]=" \\ b";ESCAPE_SEQUENCES[9]=" \\ t";ESCAPE_SEQUENCES[10]=" \\ n";ESCAPE_SEQUENCES[11]=" \\ v";ESCAPE_SEQUENCES[12]=" \\ f";ESCAPE_SEQUENCES[13]=" \\ r";ESCAPE_SEQUENCES[27]=" \\ e";ESCAPE_SEQUENCES[34]=' \\ "';ESCAPE_SEQUENCES[92]=" \\ \\ ";ESCAPE_SEQUENCES[133]=" \\ N";ESCAPE_SEQUENCES[160]=" \\ _";ESCAPE_SEQUENCES[8232]=" \\ L";ESCAPE_SEQUENCES[8233]=" \\ P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?: \. [0-9_]*)? $ /;function compileStyleMap(Ra,qa){var nd,od,ld,ud,cd,dd,pd;if(qa===null)return{};for(nd={},od=Object.keys(qa),ld=0,ud=od.length;ld<ud;ld+=1)cd=od[ld],dd=String(qa[cd]),cd.slice(0,2)==="!!"&&(cd="tag:yaml.org,2002:"+cd.slice(2)),pd=Ra.compiledTypeMap.fallback[cd],pd&&_hasOwnProperty.call(pd.styleAliases,dd)&&(dd=pd.styleAliases[dd]),nd[cd]=dd;return nd}__name(compileStyleMap,"compileStyleMap");function encodeHex(Ra){var qa,nd,od;if(qa=Ra.toString(16).toUpperCase(),Ra<=255)nd="x",od=2;else if(Ra<=65535)nd="u",od=4;else if(Ra<=4294967295)nd="U",od=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return" \\ "+nd+common.repeat("0",od-qa.length)+qa}__name(encodeHex,"encodeHex");var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(Ra){this.schema=Ra.schema||_default,this.indent=Math.max(1,Ra.indent||2),this.noArrayIndent=Ra.noArrayIndent||!1,this.skipInvalid=Ra.skipInvalid||!1,this.flowLevel=common.isNothing(Ra.flowLevel)?-1:Ra.flowLevel,this.styleMap=compileStyleMap(this.schema,Ra.styles||null),this.sortKeys=Ra.sortKeys||!1,this.lineWidth=Ra.lineWidth||80,this.noRefs=Ra.noRefs||!1,this.noCompatMode=Ra.noCompatMode||!1,this.condenseFlow=Ra.condenseFlow||!1,this.quotingType=Ra.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=Ra.forceQuotes||!1,this.replacer=typeof Ra.replacer=="function"?Ra.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}__name(State,"State");function indentString(Ra,qa){for(var nd=common.repeat(" ",qa),od=0,ld=-1,ud="",cd,dd=Ra.length;od<dd;)ld=Ra.indexOf( `
` ,od),ld===-1?(cd=Ra.slice(od),od=dd):(cd=Ra.slice(od,ld+1),od=ld+1),cd.length&&cd!== `
` &&(ud+=nd),ud+=cd;return ud}__name(indentString,"indentString");function generateNextLine(Ra,qa){return `
` +common.repeat(" ",Ra.indent*qa)}__name(generateNextLine,"generateNextLine");function testImplicitResolving(Ra,qa){var nd,od,ld;for(nd=0,od=Ra.implicitTypes.length;nd<od;nd+=1)if(ld=Ra.implicitTypes[nd],ld.resolve(qa))return!0;return!1}__name(testImplicitResolving,"testImplicitResolving");function isWhitespace(Ra){return Ra===CHAR_SPACE||Ra===CHAR_TAB}__name(isWhitespace,"isWhitespace");function isPrintable(Ra){return 32<=Ra&&Ra<=126||161<=Ra&&Ra<=55295&&Ra!==8232&&Ra!==8233||57344<=Ra&&Ra<=65533&&Ra!==CHAR_BOM||65536<=Ra&&Ra<=1114111}__name(isPrintable,"isPrintable");function isNsCharOrWhitespace(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&Ra!==CHAR_CARRIAGE_RETURN&&Ra!==CHAR_LINE_FEED}__name(isNsCharOrWhitespace,"isNsCharOrWhitespace");function isPlainSafe(Ra,qa,nd){var od=isNsCharOrWhitespace(Ra),ld=od&&!isWhitespace(Ra);return(nd?od:od&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET)&&Ra!==CHAR_SHARP&&!(qa===CHAR_COLON&&!ld)||isNsCharOrWhitespace(qa)&&!isWhitespace(qa)&&Ra===CHAR_SHARP||qa===CHAR_COLON&&ld}__name(isPlainSafe,"isPlainSafe");function isPlainSafeFirst(Ra){return isPrintable(Ra)&&Ra!==CHAR_BOM&&!isWhitespace(Ra)&&Ra!==CHAR_MINUS&&Ra!==CHAR_QUESTION&&Ra!==CHAR_COLON&&Ra!==CHAR_COMMA&&Ra!==CHAR_LEFT_SQUARE_BRACKET&&Ra!==CHAR_RIGHT_SQUARE_BRACKET&&Ra!==CHAR_LEFT_CURLY_BRACKET&&Ra!==CHAR_RIGHT_CURLY_BRACKET&&Ra!==CHAR_SHARP&&Ra!==CHAR_AMPERSAND&&Ra!==CHAR_ASTERISK&&Ra!==CHAR_EXCLAMATION&&Ra!==CHAR_VERTICAL_LINE&&Ra!==CHAR_EQUALS&&Ra!==CHAR_GREATER_THAN&&Ra!==CHAR_SINGLE_QUOTE&&Ra!==CHAR_DOUBLE_QUOTE&&Ra!==CHAR_PERCENT&&Ra!==CHAR_COMMERCIAL_AT&&Ra!==CHAR_GRAVE_ACCENT}__name(isPlainSafeFirst,"isPlainSafeFirst");function isPlainSafeLast(Ra){return!isWhitespace(Ra)&&Ra!==CHAR_COLON}__name(isPlainSafeLast,"isPlainSafeLast");function codePointAt(Ra,qa){var nd=Ra.charCodeAt(qa),od;return nd>=55296&&nd<=56319&&qa+1<Ra.length&&(od=Ra.charCodeAt(qa+1),od>=56320&&od<=57343)?(nd-55296)*1024+od-56320+65536:nd}__name(codePointAt,"codePointAt");function needIndentIndicator(Ra){var qa=/^ \n * /;return qa.test(Ra)}__name(needIndentIndicator,"needIndentIndicator");var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(Ra,qa,nd,od,ld,ud,cd,dd){var pd,fd=0,md=null,vd=!1,Ad=!1,Nd=od!==-1,Id=-1,Od=isPlainSafeFirst(codePointAt(Ra,0))&&isPlainSafeLast(codePointAt(Ra,Ra.length-1));if(qa||cd)for(pd=0;pd<Ra.length;fd>=65536?pd+=2:pd++){if(fd=codePointAt(Ra,pd),!isPrintable(fd))return STYLE_DOUBLE;Od=Od&&isPlainSafe(fd,md,dd),md=fd}else{for(pd=0;pd<Ra.length;fd>=65536?pd+=2:pd++){if(fd=codePointAt(Ra,pd),fd===CHAR_LINE_FEED)vd=!0,Nd&&(Ad=Ad||pd-Id-1>od&&Ra[Id+1]!==" ",Id=pd);else if(!isPrintable(fd))return STYLE_DOUBLE;Od=Od&&isPlainSafe(fd,md,dd),md=fd}Ad=Ad||Nd&&pd-Id-1>od&&Ra[Id+1]!==" "}return!vd&&!Ad?Od&&!cd&&!ld(Ra)?STYLE_PLAIN:ud===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:nd>9&&needIndentIndicator(Ra)?STYLE_DOUBLE:cd?ud===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:Ad?STYLE_FOLDED:STYLE_LITERAL}__name(chooseScalarStyle,"chooseScalarStyle");function writeScalar(Ra,qa,nd,od,ld){Ra.dump=function(){if(qa.length===0)return Ra.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!Ra.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(qa)!==-1||DEPRECATED_BASE60_SYNTAX.test(qa)))return Ra.quotingType===QUOTING_TYPE_DOUBLE?'"'+qa+'"':"'"+qa+"'";var ud=Ra.indent*Math.max(1,nd),cd=Ra.lineWidth===-1?-1:Math.max(Math.min(Ra.lineWidth,40),Ra.lineWidth-ud),dd=od||Ra.flowLevel>-1&&nd>=Ra.flowLevel;function pd(fd){return testImplicitResolving(Ra,fd)}switch(__name(pd,"testAmbiguity"),chooseScalarStyle(qa,dd,Ra.indent,cd,pd,Ra.quotingType,Ra.forceQuotes&&!od,ld)){case STYLE_PLAIN:return qa;case STYLE_SINGLE:return"'"+qa.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(qa,ud));case STYLE_FOLDED:return">"+blockHeader(qa,Ra.indent)+dropEndingNewline(indentString(foldString(qa,cd),ud));case STYLE_DOUBLE:return'"'+escapeString(qa)+'"';default:throw new
` ,ld=od&&(Ra[Ra.length-2]=== `
2024-11-27 11:30:55 +08:00
` ||Ra=== `
2024-11-28 09:28:59 +08:00
` ),ud=ld?"+":od?"":"-";return nd+ud+ `
2024-11-27 11:30:55 +08:00
` }__name(blockHeader,"blockHeader");function dropEndingNewline(Ra){return Ra[Ra.length-1]=== `
2024-11-28 09:28:59 +08:00
` ?Ra.slice(0,-1):Ra}__name(dropEndingNewline,"dropEndingNewline");function foldString(Ra,qa){for(var nd=/( \n +)([^ \n ]*)/g,od=function(){var fd=Ra.indexOf( `
` );return fd=fd!==-1?fd:Ra.length,nd.lastIndex=fd,foldLine(Ra.slice(0,fd),qa)}(),ld=Ra[0]=== `
` ||Ra[0]===" ",ud,cd;cd=nd.exec(Ra);){var dd=cd[1],pd=cd[2];ud=pd[0]===" ",od+=dd+(!ld&&!ud&&pd!==""? `
` :"")+foldLine(pd,qa),ld=ud}return od}__name(foldString,"foldString");function foldLine(Ra,qa){if(Ra===""||Ra[0]===" ")return Ra;for(var nd=/ [^ ]/g,od,ld=0,ud,cd=0,dd=0,pd="";od=nd.exec(Ra);)dd=od.index,dd-ld>qa&&(ud=cd>ld?cd:dd,pd+= `
` +Ra.slice(ld,ud),ld=ud+1),cd=dd;return pd+= `
` ,Ra.length-ld>qa&&cd>ld?pd+=Ra.slice(ld,cd)+ `
` +Ra.slice(cd+1):pd+=Ra.slice(ld),pd.slice(1)}__name(foldLine,"foldLine");function escapeString(Ra){for(var qa="",nd=0,od,ld=0;ld<Ra.length;nd>=65536?ld+=2:ld++)nd=codePointAt(Ra,ld),od=ESCAPE_SEQUENCES[nd],!od&&isPrintable(nd)?(qa+=Ra[ld],nd>=65536&&(qa+=Ra[ld+1])):qa+=od||encodeHex(nd);return qa}__name(escapeString,"escapeString");function writeFlowSequence(Ra,qa,nd){var od="",ld=Ra.tag,ud,cd,dd;for(ud=0,cd=nd.length;ud<cd;ud+=1)dd=nd[ud],Ra.replacer&&(dd=Ra.replacer.call(nd,String(ud),dd)),(writeNode(Ra,qa,dd,!1,!1)||typeof dd>"u"&&writeNode(Ra,qa,null,!1,!1))&&(od!==""&&(od+=","+(Ra.condenseFlow?"":" ")),od+=Ra.dump);Ra.tag=ld,Ra.dump="["+od+"]"}__name(writeFlowSequence,"writeFlowSequence");function writeBlockSequence(Ra,qa,nd,od){var ld="",ud=Ra.tag,cd,dd,pd;for(cd=0,dd=nd.length;cd<dd;cd+=1)pd=nd[cd],Ra.replacer&&(pd=Ra.replacer.call(nd,String(cd),pd)),(writeNode(Ra,qa+1,pd,!0,!0,!1,!0)||typeof pd>"u"&&writeNode(Ra,qa+1,null,!0,!0,!1,!0))&&((!od||ld!=="")&&(ld+=generateNextLine(Ra,qa)),Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?ld+="-":ld+="- ",ld+=Ra.dump);Ra.tag=ud,Ra.dump=ld||"[]"}__name(writeBlockSequence,"writeBlockSequence");function writeFlowMapping(Ra,qa,nd){var od="",ld=Ra.tag,ud=Object.keys(nd),cd,dd,pd,fd,md;for(cd=0,dd=ud.length;cd<dd;cd+=1)md="",od!==""&&(md+=", "),Ra.condenseFlow&&(md+='"'),pd=ud[cd],fd=nd[pd],Ra.replacer&&(fd=Ra.replacer.call(nd,pd,fd)),writeNode(Ra,qa,pd,!1,!1)&&(Ra.dump.length>1024&&(md+="? "),md+=Ra.dump+(Ra.condenseFlow?'"':"")+":"+(Ra.condenseFlow?"":" "),writeNode(Ra,qa,fd,!1,!1)&&(md+=Ra.dump,od+=md));Ra.tag=ld,Ra.dump="{"+od+"}"}__name(writeFlowMapping,"writeFlowMapping");function writeBlockMapping(Ra,qa,nd,od){var ld="",ud=Ra.tag,cd=Object.keys(nd),dd,pd,fd,md,vd,Ad;if(Ra.sortKeys===!0)cd.sort();else if(typeof Ra.sortKeys=="function")cd.sort(Ra.sortKeys);else if(Ra.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(dd=0,pd=cd.length;dd<pd;dd+=1)Ad="",(!od||ld!=="")&&(Ad+=generateNextLine(Ra,qa)),fd=cd[dd],md=nd[fd],Ra.replacer&&(md=Ra.replacer.call(nd,fd,md)),writeNode(Ra,qa+1,fd,!0,!0,!0)&&(vd=Ra.tag!==null&&Ra.tag!=="?"||Ra.dump&&Ra.dump.length>1024,vd&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Ad+="?":Ad+="? "),Ad+=Ra.dump,vd&&(Ad+=generateNextLine(Ra,qa)),writeNode(Ra,qa+1,md,!0,vd)&&(Ra.dump&&CHAR_LINE_FEED===Ra.dump.charCodeAt(0)?Ad+=":":Ad+=": ",Ad+=Ra.dump,ld+=Ad));Ra.tag=ud,Ra.dump=ld||"{}"}__name(writeBlockMapping,"writeBlockMapping");function detectType(Ra,qa,nd){var od,ld,ud,cd,dd,pd;for(ld=nd?Ra.explicitTypes:Ra.implicitTypes,ud=0,cd=ld.length;ud<cd;ud+=1)if(dd=ld[ud],(dd.instanceOf||dd.predicate)&&(!dd.instanceOf||typeof qa=="object"&&qa instanceof dd.instanceOf)&&(!dd.predicate||dd.predicate(qa))){if(nd?dd.multi&&dd.representName?Ra.tag=dd.representName(qa):Ra.tag=dd.tag:Ra.tag="?",dd.represent){if(pd=Ra.styleMap[dd.tag]||dd.defaultStyle,_toString.call(dd.represent)==="[object Function]")od=dd.represent(qa,pd);else if(_hasOwnProperty.call(dd.represent,pd))od=dd.represent[pd](qa,pd);else throw new exception("!<"+dd.tag+'> tag resolver accepts not "'+pd+'" style');Ra.dump=od}return!0}return!1}__name(detectType,"detectType");function writeNode(Ra,qa,nd,od,ld,ud,cd){Ra.tag=null,Ra.dump=nd,detectType(Ra,nd,!1)||detectType(Ra,nd,!0);var dd=_toString.call(Ra.dump),pd=od,fd;od&&(od=Ra.flowLevel<0||Ra.flowLevel>qa);var md=dd==="[object Object]"||dd==="[object Array]",vd,Ad;if(md&&(vd=Ra.duplicates.indexOf(nd),Ad=vd!==-1),(Ra.tag!==null&&Ra.tag!=="?"||Ad||Ra.indent!==2&&qa>0)&&(ld=!1),Ad&&Ra.usedDuplicates[vd])Ra.dump="*ref_"+vd;else{if(md&&Ad&&!Ra.usedDuplicates[vd]&&(Ra.usedDuplicates[vd]=!0),dd==="[object Object]")od&&Object.keys(Ra.dump).length!==0?(writeBlockMapping(Ra,qa,Ra.dump,ld),Ad&&(Ra.dump="&ref_"+vd+Ra.dump)):(writeFlowMapping(Ra,qa,Ra.dump),Ad&&(Ra.dump="&ref_"+vd+" "+Ra.dump));else if(dd==="[object Array]")od&&Ra.dump.length!==0?(Ra.noArrayIndent&&!cd&&qa>0?writeBlockSequence(Ra,qa-1,Ra.dump,ld):writeBlockSequence(Ra,qa,Ra.dump,ld),Ad&&(Ra.dump="&ref_"+vd+Ra.dump)):(writeFlowSequence(Ra,qa,Ra.dump),Ad&&(Ra.dump="&ref
2024-11-27 11:30:55 +08:00
` :""}__name(dump $ 1,"dump $ 1");function renamed(Ra,qa){return function(){throw new Error("Function yaml."+Ra+" is removed in js-yaml 4. Use yaml."+qa+" instead, which is now safe by default.")}}__name(renamed,"renamed");var JSON_SCHEMA=json,load=loader $ 1.load;/*! Bundled license information:
js - yaml / dist / js - yaml . mjs :
( * ! js - yaml 4.1 . 0 https : //github.com/nodeca/js-yaml @license MIT *)
2024-11-28 09:28:59 +08:00
* /const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16}),defaultIconTransformations=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations}),defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:!1}),defaultIconSizeCustomisations=Object.freeze({width:null,height:null}),defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations}),matchIconName=/ ^ [ a - z0 - 9 ] + ( - [ a - z0 - 9 ] + ) * $ / , stringToIcon = ( Ra , qa , nd , od = "" ) => { const ld = Ra . split ( ":" ) ; if ( Ra . slice ( 0 , 1 ) === "@" ) { if ( ld . length < 2 || ld . length > 3 ) return null ; od = ld . shift ( ) . slice ( 1 ) } if ( ld . length > 3 || ! ld . length ) return null ; if ( ld . length > 1 ) { const dd = ld . pop ( ) , pd = ld . pop ( ) , fd = { provider : ld . length > 0 ? ld [ 0 ] : od , prefix : pd , name : dd } ; return validateIconName ( fd ) ? fd : null } const ud = ld [ 0 ] , cd = ud . split ( "-" ) ; if ( cd . length > 1 ) { const dd = { provider : od , prefix : cd . shift ( ) , name : cd . join ( "-" ) } ; return validateIconName ( dd ) ? dd : null } if ( nd && od === "" ) { const dd = { provider : od , prefix : "" , name : ud } ; return validateIconName ( dd , nd ) ? dd : null } return null } , validateIconName = ( Ra , qa ) => Ra ? ! ! ( ( Ra . provider === "" || Ra . provider . match ( matchIconName ) ) && ( qa && Ra . prefix === "" || Ra . prefix . match ( matchIconName ) ) && Ra . name . match ( matchIconName ) ) : ! 1 ; function mergeIconTransformations ( Ra , qa ) { const nd = { } ; ! Ra . hFlip != ! qa . hFlip && ( nd . hFlip = ! 0 ) , ! Ra . vFlip != ! qa . vFlip && ( nd . vFlip = ! 0 ) ; const od = ( ( Ra . rotate || 0 ) + ( qa . rotate || 0 ) ) % 4 ; return od && ( nd . rotate = od ) , nd } function mergeIconData ( Ra , qa ) { const nd = mergeIconTransformations ( Ra , qa ) ; for ( const od in defaultExtendedIconProps ) od in defaultIconTransformations ? od in Ra && ! ( od in nd ) && ( nd [ od ] = defaultIconTransformations [ od ] ) : od in qa ? nd [ od ] = qa [ od ] : od in Ra && ( nd [ od ] = Ra [ od ] ) ; return nd } function getIconsTree ( Ra , qa ) { const nd = Ra . icons , od = Ra . aliases || Object . create ( null ) , ld = Object . create ( null ) ; function ud ( cd ) { if ( nd [ cd ] ) return ld [ cd ] = [ ] ; if ( ! ( cd in ld ) ) { ld [ cd ] = null ; const dd = od [ cd ] && od [ cd ] . parent , pd = dd && ud ( dd ) ; pd && ( ld [ cd ] = [ dd ] . concat ( pd ) ) } return ld [ cd ] } return ( qa || Object . keys ( nd ) . concat ( Object . keys ( od ) ) ) . forEach ( ud ) , ld } function internalGetIconData ( Ra , qa , nd ) { const od = Ra . icons , ld = Ra . aliases || Object . create ( null ) ; let ud = { } ; function cd ( dd ) { ud = mergeIconData ( od [ dd ] || ld [ dd ] , ud ) } return cd ( qa ) , nd . forEach ( cd ) , mergeIconData ( Ra , ud ) } function getIconData ( Ra , qa ) { if ( Ra . icons [ qa ] ) return internalGetIconData ( Ra , qa , [ ] ) ; const nd = getIconsTree ( Ra , [ qa ] ) [ qa ] ; return nd ? internalGetIconData ( Ra , qa , nd ) : null } const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g , unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g ; function calculateSize ( Ra , qa , nd ) { if ( qa === 1 ) return Ra ; if ( nd = nd || 100 , typeof Ra == "number" ) return Math . ceil ( Ra * qa * nd ) / nd ; if ( typeof Ra != "string" ) return Ra ; const od = Ra . split ( unitsSplit ) ; if ( od === null || ! od . length ) return Ra ; const ld = [ ] ; let ud = od . shift ( ) , cd = unitsTest . test ( ud ) ; for ( ; ; ) { if ( cd ) { const dd = parseFloat ( ud ) ; isNaN ( dd ) ? ld . push ( ud ) : ld . push ( Math . ceil ( dd * qa * nd ) / nd ) } else ld . push ( ud ) ; if ( ud = od . shift ( ) , ud === void 0 ) return ld . join ( "" ) ; cd = ! cd } } function splitSVGDefs ( Ra , qa = "defs" ) { let nd = "" ; const od = Ra . indexOf ( "<" + qa ) ; for ( ; od >= 0 ; ) { const ld = Ra . indexOf ( ">" , od ) , ud = Ra . indexOf ( "</" + qa ) ; if ( ld === - 1 || ud === - 1 ) break ; const cd = Ra . indexOf ( ">" , ud ) ; if ( cd === - 1 ) break ; nd += Ra . slice ( ld + 1 , ud ) . trim ( ) , Ra = Ra . slice ( 0 , od ) . trim ( ) + Ra . slice ( cd + 1 ) } return { defs : nd , content : Ra } } function mergeDefsAndContent ( Ra , qa ) { return Ra ? "<defs>" + Ra + "</defs>" + qa : qa } function wrapSVGContent ( Ra , qa , nd ) { const od = splitSVGDefs ( Ra ) ; return mergeDefsAndContent ( od . defs , qa + od . content + nd ) } const isUnsetKeyword = Ra => Ra === "unset" || Ra === "undefined" || Ra === "none" ; function iconToSVG ( Ra , qa ) { const nd = { ... defaultIconProps , ... Ra } , od = { ... defaultIconCustomisations , ... qa } , ld = { left : nd . left , top : nd . top , width : nd . width , height : nd . height } ; let ud = nd . body ; [ nd , od ] . forEach ( Od => { const Fd = [ ] , Pd = Od . hFlip , Md = Od . vFlip ; let Bd = Od . rotate ; Pd ? Md ? Bd += 2 : ( Fd . push ( "translate(" + ( ld . width + ld . left ) . toString ( ) + " " + ( 0 - ld . top ) . toString ( ) + ")" ) , Fd . push ( "scale(-1 1)" ) , ld . top = ld . left = 0 ) : Md && ( Fd . push ( "translate(" + ( 0 - ld . left ) . toString ( ) + " " + ( ld . height + ld . top ) . toString ( ) + ")" ) , Fd . push ( "scale(1 -1)" ) , ld . top = ld . left = 0 ) ; let jd ; switch ( Bd < 0 && ( Bd -= Math . floor ( Bd / 4 ) * 4 ) , Bd = Bd % 4 , Bd ) { case 1
` ,"ig");Ra=Ra.trim().replace(ld,"").replace(/'/gm,'"'),log $ 1.debug( ` Detecting diagram directive$ { qa !== null ? " type:" + qa : "" } based on the text : $ { Ra } ` );let ud;const cd=[];for(;(ud=directiveRegex.exec(Ra))!==null;)if(ud.index===directiveRegex.lastIndex&&directiveRegex.lastIndex++,ud&&!qa||qa&&((nd=ud[1])!=null&&nd.match(qa))||qa&&((od=ud[2])!=null&&od.match(qa))){const dd=ud[1]?ud[1]:ud[2],pd=ud[3]?ud[3].trim():ud[4]?JSON.parse(ud[4].trim()):null;cd.push({type:dd,args:pd})}return cd.length===0?{type:Ra,args:null}:cd.length===1?cd[0]:cd}catch(ld){return log $ 1.error( ` ERROR : $ { ld . message } - Unable to parse directive type : '${qa}' based on the text : '${Ra}' ` ),{type:void 0,args:null}}},"detectDirective"),removeDirectives=__name(function(Ra){return Ra.replace(directiveRegex,"")},"removeDirectives"),isSubstringInArray=__name(function(Ra,qa){for(const[nd,od]of qa.entries())if(od.match(Ra))return nd;return-1},"isSubstringInArray");function interpolateToCurve(Ra,qa){if(!Ra)return qa;const nd= ` curve$ { Ra . charAt ( 0 ) . toUpperCase ( ) + Ra . slice ( 1 ) } ` ;return d3CurveTypes[nd]??qa}__name(interpolateToCurve,"interpolateToCurve");function formatUrl(Ra,qa){const nd=Ra.trim();if(nd)return qa.securityLevel!=="loose"?sanitizeUrl_1(nd):nd}__name(formatUrl,"formatUrl");var runFunc=__name((Ra,...qa)=>{const nd=Ra.split("."),od=nd.length-1,ld=nd[od];let ud=window;for(let cd=0;cd<od;cd++)if(ud=ud[nd[cd]],!ud){log $ 1.error( ` Function name : $ { Ra } not found in window ` );return}ud[ld](...qa)},"runFunc");function distance(Ra,qa){return!Ra||!qa?0:Math.sqrt(Math.pow(qa.x-Ra.x,2)+Math.pow(qa.y-Ra.y,2))}__name(distance,"distance");function traverseEdge(Ra){let qa,nd=0;Ra.forEach(ld=>{nd+=distance(ld,qa),qa=ld});const od=nd/2;return calculatePoint(Ra,od)}__name(traverseEdge,"traverseEdge");function calcLabelPosition(Ra){return Ra.length===1?Ra[0]:traverseEdge(Ra)}__name(calcLabelPosition,"calcLabelPosition");var roundNumber=__name((Ra,qa=2)=>{const nd=Math.pow(10,qa);return Math.round(Ra*nd)/nd},"roundNumber"),calculatePoint=__name((Ra,qa)=>{let nd,od=qa;for(const ld of Ra){if(nd){const ud=distance(ld,nd);if(ud<od)od-=ud;else{const cd=od/ud;if(cd<=0)return nd;if(cd>=1)return{x:ld.x,y:ld.y};if(cd>0&&cd<1)return{x:roundNumber((1-cd)*nd.x+cd*ld.x,5),y:roundNumber((1-cd)*nd.y+cd*ld.y,5)}}}nd=ld}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),calcCardinalityPosition=__name((Ra,qa,nd)=>{log $ 1.info( ` our points $ { JSON . stringify ( qa ) } ` ),qa[0]!==nd&&(qa=qa.reverse());const ld=calculatePoint(qa,25),ud=Ra?10:5,cd=Math.atan2(qa[0].y-ld.y,qa[0].x-ld.x),dd={x:0,y:0};return dd.x=Math.sin(cd)*ud+(qa[0].x+ld.x)/2,dd.y=-Math.cos(cd)*ud+(qa[0].y+ld.y)/2,dd},"calcCardinalityPosition");function calcTerminalLabelPosition(Ra,qa,nd){const od=structuredClone(nd);log $ 1.info("our points",od),qa!=="start_left"&&qa!=="start_right"&&od.reverse();const ld=25+Ra,ud=calculatePoint(od,ld),cd=10+Ra*.5,dd=Math.atan2(od[0].y-ud.y,od[0].x-ud.x),pd={x:0,y:0};return qa==="start_left"?(pd.x=Math.sin(dd+Math.PI)*cd+(od[0].x+ud.x)/2,pd.y=-Math.cos(dd+Math.PI)*cd+(od[0].y+ud.y)/2):qa==="end_right"?(pd.x=Math.sin(dd-Math.PI)*cd+(od[0].x+ud.x)/2-5,pd.y=-Math.cos(dd-Math.PI)*cd+(od[0].y+ud.y)/2-5):qa==="end_left"?(pd.x=Math.sin(dd)*cd+(od[0].x+ud.x)/2-5,pd.y=-Math.cos(dd)*cd+(od[0].y+ud.y)/2-5):(pd.x=Math.sin(dd)*cd+(od[0].x+ud.x)/2,pd.y=-Math.cos(dd)*cd+(od[0].y+ud.y)/2),pd}__name(calcTerminalLabelPosition,"calcTerminalLabelPosition");function getStylesFromArray(Ra){let qa="",nd="";for(const od of Ra)od!==void 0&&(od.startsWith("color:")||od.startsWith("text-align:")?nd=nd+od+";":qa=qa+od+";");return{style:qa,labelStyle:nd}}__name(getStylesFromArray,"getStylesFromArray");var cnt=0,generateId=__name(()=>(cnt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cnt),"generateId");function makeRandomHex(Ra){let qa="";const nd="0123456789abcdef",od=nd.length;for(let ld=0;ld<Ra;ld++)qa+=nd.charAt(Math.floor(Math.random()*od));return qa}__name(makeRandomHex,"makeRandomHex");var random=__name(Ra=>makeRandomHex(Ra.length),"random"),getTextObj=__name(function(){return{x:0,y:0,fill:vo
` ).map(ld=>{const ud=ld.match(/^ \s +/);if(ud===null)return ld;const[cd]=ud;return cd.length>=od.length?ld.slice(od.length):ld}).join( `
` )}class _Tokenizer{constructor(qa){Km(this,"options");Km(this,"rules");Km(this,"lexer");this.options=qa||_defaults}space(qa){const nd=this.rules.block.newline.exec(qa);if(nd&&nd[0].length>0)return{type:"space",raw:nd[0]}}code(qa){const nd=this.rules.block.code.exec(qa);if(nd){const od=nd[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:nd[0],codeBlockStyle:"indented",text:this.options.pedantic?od:rtrim(od, `
` )}}}fences(qa){const nd=this.rules.block.fences.exec(qa);if(nd){const od=nd[0],ld=indentCodeCompensation(od,nd[3]||"");return{type:"code",raw:od,lang:nd[2]?nd[2].trim().replace(this.rules.inline.anyPunctuation," $ 1"):nd[2],text:ld}}}heading(qa){const nd=this.rules.block.heading.exec(qa);if(nd){let od=nd[2].trim();if(/# $ /.test(od)){const ld=rtrim(od,"#");(this.options.pedantic||!ld||/ $ /.test(ld))&&(od=ld.trim())}return{type:"heading",raw:nd[0],depth:nd[1].length,text:od,tokens:this.lexer.inline(od)}}}hr(qa){const nd=this.rules.block.hr.exec(qa);if(nd)return{type:"hr",raw:rtrim(nd[0], `
` )}}blockquote(qa){const nd=this.rules.block.blockquote.exec(qa);if(nd){let od=rtrim(nd[0], `
2024-09-18 09:46:23 +08:00
` ).split( `
2024-11-28 09:28:59 +08:00
` ),ld="",ud="";const cd=[];for(;od.length>0;){let dd=!1;const pd=[];let fd;for(fd=0;fd<od.length;fd++)if(/^ {0,3}>/.test(od[fd]))pd.push(od[fd]),dd=!0;else if(!dd)pd.push(od[fd]);else break;od=od.slice(fd);const md=pd.join( `
` ),vd=md.replace(/ \n {0,3}((?:=+|-+) *)(?= \n | $ )/g, `
$1 ` ).replace(/^ {0,3}>[ \t ]?/gm,"");ld=ld? ` $ { ld }
$ { md } ` :md,ud=ud? ` $ { ud }
$ { vd } ` :vd;const Ad=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(vd,cd,!0),this.lexer.state.top=Ad,od.length===0)break;const Nd=cd[cd.length-1];if((Nd==null?void 0:Nd.type)==="code")break;if((Nd==null?void 0:Nd.type)==="blockquote"){const Id=Nd,Od=Id.raw+ `
` +od.join( `
` ),Fd=this.blockquote(Od);cd[cd.length-1]=Fd,ld=ld.substring(0,ld.length-Id.raw.length)+Fd.raw,ud=ud.substring(0,ud.length-Id.text.length)+Fd.text;break}else if((Nd==null?void 0:Nd.type)==="list"){const Id=Nd,Od=Id.raw+ `
` +od.join( `
` ),Fd=this.list(Od);cd[cd.length-1]=Fd,ld=ld.substring(0,ld.length-Nd.raw.length)+Fd.raw,ud=ud.substring(0,ud.length-Id.raw.length)+Fd.raw,od=Od.substring(cd[cd.length-1].raw.length).split( `
` );continue}}return{type:"blockquote",raw:ld,tokens:cd,text:ud}}}list(qa){let nd=this.rules.block.list.exec(qa);if(nd){let od=nd[1].trim();const ld=od.length>1,ud={type:"list",raw:"",ordered:ld,start:ld?+od.slice(0,-1):"",loose:!1,items:[]};od=ld? ` \ \ d { 1 , 9 } \ \ $ { od . slice ( - 1 ) } ` : ` \ \ $ { od } ` ,this.options.pedantic&&(od=ld?od:"[*+-]");const cd=new RegExp( ` ^ ( { 0 , 3 } $ { od } ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` );let dd=!1;for(;qa;){let pd=!1,fd="",md="";if(!(nd=cd.exec(qa))||this.rules.block.hr.test(qa))break;fd=nd[0],qa=qa.substring(fd.length);let vd=nd[2].split( `
` ,1)[0].replace(/^ \t +/,Pd=>" ".repeat(3*Pd.length)),Ad=qa.split( `
` ,1)[0],Nd=!vd.trim(),Id=0;if(this.options.pedantic?(Id=2,md=vd.trimStart()):Nd?Id=nd[1].length+1:(Id=nd[2].search(/[^ ]/),Id=Id>4?1:Id,md=vd.slice(Id),Id+=nd[1].length),Nd&&/^ * $ /.test(Ad)&&(fd+=Ad+ `
` ,qa=qa.substring(Ad.length+1),pd=!0),!pd){const Pd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Id - 1 ) } } ( ? : [ * + - ] | \ \ d { 1 , 9 } [ . ) ] ) ( ( ? : [ ] [ ^ \ \ n ] * ) ? ( ? : \ \ n | $ ) ) ` ),Md=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Id - 1 ) } } ( ( ? : - * ) { 3 , } | ( ? : _ * ) { 3 , } | ( ? : \ \ * * ) { 3 , } ) ( ? : \ \ n + | $ ) ` ),Bd=new RegExp( ` ^ { 0 , $ { Math . min ( 3 , Id - 1 ) } } ( ? : \ ` \` \` |~~~) ` ) , jd = new RegExp ( ` ^ {0, ${ Math . min ( 3 , Id - 1 ) } }# ` ) ; for ( ; qa ; ) { const Hd = qa . split ( `
` ,1)[0];if(Ad=Hd,this.options.pedantic&&(Ad=Ad.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),Bd.test(Ad)||jd.test(Ad)||Pd.test(Ad)||Md.test(qa))break;if(Ad.search(/[^ ]/)>=Id||!Ad.trim())md+= `
` +Ad.slice(Id);else{if(Nd||vd.search(/[^ ]/)>=4||Bd.test(vd)||jd.test(vd)||Md.test(vd))break;md+= `
` +Ad}!Nd&&!Ad.trim()&&(Nd=!0),fd+=Hd+ `
` ,qa=qa.substring(Hd.length+1),vd=Ad.slice(Id)}}ud.loose||(dd?ud.loose=!0:/ \n * \n * $ /.test(fd)&&(dd=!0));let Od=null,Fd;this.options.gfm&&(Od=/^ \[ [ xX] \] /.exec(md),Od&&(Fd=Od[0]!=="[ ] ",md=md.replace(/^ \[ [ xX] \] +/,""))),ud.items.push({type:"list_item",raw:fd,task:!!Od,checked:Fd,loose:!1,text:md,tokens:[]}),ud.raw+=fd}ud.items[ud.items.length-1].raw=ud.items[ud.items.length-1].raw.trimEnd(),ud.items[ud.items.length-1].text=ud.items[ud.items.length-1].text.trimEnd(),ud.raw=ud.raw.trimEnd();for(let pd=0;pd<ud.items.length;pd++)if(this.lexer.state.top=!1,ud.items[pd].tokens=this.lexer.blockTokens(ud.items[pd].text,[]),!ud.loose){const fd=ud.items[pd].tokens.filter(vd=>vd.type==="space"),md=fd.length>0&&fd.some(vd=>/ \n .* \n /.test(vd.raw));ud.loose=md}if(ud.loose)for(let pd=0;pd<ud.items.length;pd++)ud.items[pd].loose=!0;return ud}}html(qa){const nd=this.rules.block.html.exec(qa);if(nd)return{type:"html",block:!0,raw:nd[0],pre:nd[1]==="pre"||nd[1]==="script"||nd[1]==="style",text:nd[0]}}def(qa){const nd=this.rules.block.def.exec(qa);if(nd){const od=nd[1].toLowerCase().replace(/ \s +/g," "),ld=nd[2]?nd[2].replace(/^<(.*)> $ /," $ 1").replace(this.rules.inline.anyPunctuation," $ 1"):"",ud=nd[3]?nd[3].substring(1,nd[3].length-1).replace(this.rules.inline.anyPunctuation," $ 1"):nd[3];return{type:"def",tag:od,raw:nd[0],href:ld,title:ud}}}table(qa){const nd=this.rules.block.table.exec(qa);if(!nd||!/[:|]/.test(nd[2]))return;const od=splitCells(nd[1]),ld=nd[2].replace(/^ \| | \| * $ /g,"").split("|"),ud=nd[3]&&nd[3].trim()?nd[3].replace(/ \n [ \t ]* $ /,"").split( `
` ):[],cd={type:"table",raw:nd[0],header:[],align:[],rows:[]};if(od.length===ld.length){for(const dd of ld)/^ *-+: * $ /.test(dd)?cd.align.push("right"):/^ *:-+: * $ /.test(dd)?cd.align.push("center"):/^ *:-+ * $ /.test(dd)?cd.align.push("left"):cd.align.push(null);for(let dd=0;dd<od.length;dd++)cd.header.push({text:od[dd],tokens:this.lexer.inline(od[dd]),header:!0,align:cd.align[dd]});for(const dd of ud)cd.rows.push(splitCells(dd,cd.header.length).map((pd,fd)=>({text:pd,tokens:this.lexer.inline(pd),header:!1,align:cd.align[fd]})));return cd}}lheading(qa){const nd=this.rules.block.lheading.exec(qa);if(nd)return{type:"heading",raw:nd[0],depth:nd[2].charAt(0)==="="?1:2,text:nd[1],tokens:this.lexer.inline(nd[1])}}paragraph(qa){const nd=this.rules.block.paragraph.exec(qa);if(nd){const od=nd[1].charAt(nd[1].length-1)=== `
` ?nd[1].slice(0,-1):nd[1];return{type:"paragraph",raw:nd[0],text:od,tokens:this.lexer.inline(od)}}}text(qa){const nd=this.rules.block.text.exec(qa);if(nd)return{type:"text",raw:nd[0],text:nd[0],tokens:this.lexer.inline(nd[0])}}escape(qa){const nd=this.rules.inline.escape.exec(qa);if(nd)return{type:"escape",raw:nd[0],text:escape $ 1(nd[1])}}tag(qa){const nd=this.rules.inline.tag.exec(qa);if(nd)return!this.lexer.state.inLink&&/^<a /i.test(nd[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^< \/ a>/i.test(nd[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)( \s |>)/i.test(nd[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^< \/ (pre|code|kbd|script)( \s |>)/i.test(nd[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:nd[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:nd[0]}}link(qa){const nd=this.rules.inline.link.exec(qa);if(nd){const od=nd[2].trim();if(!this.options.pedantic&&/^</.test(od)){if(!/> $ /.test(od))return;const cd=rtrim(od.slice(0,-1)," \\ ");if((od.length-cd.length)%2===0)return}else{const cd=findClosingBracket(nd[2],"()");if(cd>-1){const pd=(nd[0].indexOf("!")===0?5:4)+nd[1].length+cd;nd[2]=nd[2].substring(0,cd),nd[0]=nd[0].substring(0,pd).trim(),nd[3]=""}}let ld=nd[2],ud="";if(this.options.pedantic){const cd=/^([^'"]*[^ \s ]) \s +(['"])(.*) \2 /.exec(ld);cd&&(ld=cd[1],ud=cd[3])}else ud=nd[3]?nd[3].slice(1,-1):"";return ld=ld.trim(),/^</.test(ld)&&(this.options.pedantic&&!/> $ /.test(od)?ld=ld.slice(1):ld=ld.slice(1,-1)),outputLink(nd,{href:ld&&ld.replace(this.rules.inline.anyPunctuation," $ 1"),title:ud&&ud.replace(this.rules.inline.anyPunctuation," $ 1")},nd[0],this.lexer)}}reflink(qa,nd){let od;if((od=this.rules.inline.reflink.exec(qa))||(od=this.rules.inline.nolink.exec(qa))){const ld=(od[2]||od[1]).replace(/ \s +/g," "),ud=nd[ld.toLowerCase()];if(!ud){const cd=od[0].charAt(0);return{type:"text",raw:cd,text:cd}}return outputLink(od,ud,od[0],this.lexer)}}emStrong(qa,nd,od=""){let ld=this.rules.inline.emStrongLDelim.exec(qa);if(!ld||ld[3]&&od.match(/[ \p {L} \p {N}]/u))return;if(!(ld[1]||ld[2]||"")||!od||this.rules.inline.punctuation.exec(od)){const cd=[...ld[0]].length-1;let dd,pd,fd=cd,md=0;const vd=ld[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(vd.lastIndex=0,nd=nd.slice(-1*qa.length+cd);(ld=vd.exec(nd))!=null;){if(dd=ld[1]||ld[2]||ld[3]||ld[4]||ld[5]||ld[6],!dd)continue;if(pd=[...dd].length,ld[3]||ld[4]){fd+=pd;continue}else if((ld[5]||ld[6])&&cd%3&&!((cd+pd)%3)){md+=pd;continue}if(fd-=pd,fd>0)continue;pd=Math.min(pd,pd+fd+md);const Ad=[...ld[0]][0].length,Nd=qa.slice(0,cd+ld.index+Ad+pd);if(Math.min(cd,pd)%2){const Od=Nd.slice(1,-1);return{type:"em",raw:Nd,text:Od,tokens:this.lexer.inlineTokens(Od)}}const Id=Nd.slice(2,-2);return{type:"strong",raw:Nd,text:Id,tokens:this.lexer.inlineTokens(Id)}}}}codespan(qa){const nd=this.rules.inline.code.exec(qa);if(nd){let od=nd[2].replace(/ \n /g," ");const ld=/[^ ]/.test(od),ud=/^ /.test(od)&&/ $ /.test(od);return ld&&ud&&(od=od.substring(1,od.length-1)),od=escape $ 1(od,!0),{type:"codespan",raw:nd[0],text:od}}}br(qa){const nd=this.rules.inline.br.exec(qa);if(nd)return{type:"br",raw:nd[0]}}del(qa){const nd=this.rules.inline.del.exec(qa);if(nd)return{type:"del",raw:nd[0],text:nd[2],tokens:this.lexer.inlineTokens(nd[2])}}autolink(qa){const nd=this.rules.inline.autolink.exec(qa);if(nd){let od,ld;return nd[2]==="@"?(od=escape $ 1(nd[1]),ld="mailto:"+od):(od=escape $ 1(nd[1]),ld=od),{type:"link",raw:nd[0],text:od,href:ld,tokens:[{type:"text",raw:od,text:od}]}}}url(qa){var od;let nd;if(nd=this.rules.inline.url.exec(qa)){let ld,ud;if(nd[2]==="@")ld=escape $ 1(nd[0]),ud="mailto:"+ld;else{let cd;do cd=nd[0],nd[0]=((od=this.rules.inline._backpedal.exec(nd[0]))==null?void 0:od[0])??"";while(cd!==nd[0]);ld=escape $ 1(nd[0]),nd[1]==="www."?ud="http://"+nd[0]:ud=nd[0]}return{type:"link",raw:nd[0],text:ld,href:ud,tokens:[{type:"text",raw:ld,text:ld}]}}}inlineText(qa){const nd=this.rules.inline.text.exec(qa);if(nd){let od;return this.lexer.state.inRawBlock?od=nd[0]:od=esca
] ` ).replace("lheading",lheading).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape $ 2=/^ \\ ([!"# $ %&'()*+, \- ./:;<=>?@ \[ \] \\ ^_ ` { | } ~ ] ) / , inlineCode = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/ , br = /^( {2,}|\\)\n(?!\s*$)/ , inlineText = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/ , _punctuation = "\\p{P}\\p{S}" , punctuation = edit ( /^((?![*_])[\spunctuation])/ , "u" ) . replace ( /punctuation/g , _punctuation ) . getRegex ( ) , blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g , emStrongLDelim = edit ( /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/ , "u" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimAst = edit ( "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , emStrongRDelimUnd = edit ( "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])" , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , anyPunctuation = edit ( /\\([punct])/ , "gu" ) . replace ( /punct/g , _punctuation ) . getRegex ( ) , autolink = edit ( /^<(scheme:[^\s\x00-\x1f<>]*|email)>/ ) . replace ( "scheme" , /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/ ) . replace ( "email" , /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/ ) . getRegex ( ) , _inlineComment = edit ( _comment ) . replace ( "(?:-->|$)" , "-->" ) . getRegex ( ) , tag = edit ( "^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>" ) . replace ( "comment" , _inlineComment ) . replace ( "attribute" , /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/ ) . getRegex ( ) , _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/ , link = edit ( /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/ ) . replace ( "label" , _inlineLabel ) . replace ( "href" , /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/ ) . replace ( "title" , /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/ ) . getRegex ( ) , reflink = edit ( /^!?\[(label)\]\[(ref)\]/ ) . replace ( "label" , _inlineLabel ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , nolink = edit ( /^!?\[(ref)\](?:\[\])?/ ) . replace ( "ref" , _blockLabel ) . getRegex ( ) , reflinkSearch = edit ( "reflink|nolink(?!\\()" , "g" ) . replace ( "reflink" , reflink ) . replace ( "nolink" , nolink ) . getRegex ( ) , inlineNormal = { _backpedal : noopTest , anyPunctuation , autolink , blockSkip , br , code : inlineCode , del : noopTest , emStrongLDelim , emStrongRDelimAst , emStrongRDelimUnd , escape : escape$2 , link , nolink , punctuation , reflink , reflinkSearch , tag , text : inlineText , url : noopTest } , inlinePedantic = { ... inlineNormal , link : edit ( /^!?\[(label)\]\((.*?)\)/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) , reflink : edit ( /^!?\[(label)\]\s*\[([^\]]*)\]/ ) . replace ( "label" , _inlineLabel ) . getRegex ( ) } , inlineGfm = { ... inlineNormal , escape : edit ( escape$2 ) . replace ( "])" , "~|])" ) . getRegex ( ) , url : edit ( /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/ , "i" ) . replace ( "email" , /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/ ) . getRegex ( ) , _backpedal : /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/ , del : /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/ , text : /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ } , inlineBreaks = { ... inlineGfm , br : edit ( br ) . replace ( "{2,}" , "*" ) . getRegex ( ) , text : edit ( inlineGfm . text ) . replace ( "\\b_" , "\\b_| {2,}\\n" ) . replace ( /\{2,\}/g , "*" ) . getRegex ( ) } , block = { normal : blockNormal , gfm : blockGfm , pedantic : blockPedantic } , inline = { normal : inlineNormal , gfm : inlineGfm , breaks : inlineBreaks , pedantic : inlinePedantic } ; class _Lexer { constructor ( qa ) { Km ( this , "
` ),this.blockTokens(qa,this.tokens);for(let nd=0;nd<this.inlineQueue.length;nd++){const od=this.inlineQueue[nd];this.inlineTokens(od.src,od.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(qa,nd=[],od=!1){this.options.pedantic?qa=qa.replace(/ \t /g," ").replace(/^ + $ /gm,""):qa=qa.replace(/^( *)( \t +)/gm,(dd,pd,fd)=>pd+" ".repeat(fd.length));let ld,ud,cd;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(dd=>(ld=dd.call({lexer:this},qa,nd))?(qa=qa.substring(ld.raw.length),nd.push(ld),!0):!1))){if(ld=this.tokenizer.space(qa)){qa=qa.substring(ld.raw.length),ld.raw.length===1&&nd.length>0?nd[nd.length-1].raw+= `
` :nd.push(ld);continue}if(ld=this.tokenizer.code(qa)){qa=qa.substring(ld.raw.length),ud=nd[nd.length-1],ud&&(ud.type==="paragraph"||ud.type==="text")?(ud.raw+= `
` +ld.raw,ud.text+= `
` +ld.text,this.inlineQueue[this.inlineQueue.length-1].src=ud.text):nd.push(ld);continue}if(ld=this.tokenizer.fences(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.heading(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.hr(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.blockquote(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.list(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.html(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.def(qa)){qa=qa.substring(ld.raw.length),ud=nd[nd.length-1],ud&&(ud.type==="paragraph"||ud.type==="text")?(ud.raw+= `
` +ld.raw,ud.text+= `
` +ld.raw,this.inlineQueue[this.inlineQueue.length-1].src=ud.text):this.tokens.links[ld.tag]||(this.tokens.links[ld.tag]={href:ld.href,title:ld.title});continue}if(ld=this.tokenizer.table(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(ld=this.tokenizer.lheading(qa)){qa=qa.substring(ld.raw.length),nd.push(ld);continue}if(cd=qa,this.options.extensions&&this.options.extensions.startBlock){let dd=1/0;const pd=qa.slice(1);let fd;this.options.extensions.startBlock.forEach(md=>{fd=md.call({lexer:this},pd),typeof fd=="number"&&fd>=0&&(dd=Math.min(dd,fd))}),dd<1/0&&dd>=0&&(cd=qa.substring(0,dd+1))}if(this.state.top&&(ld=this.tokenizer.paragraph(cd))){ud=nd[nd.length-1],od&&(ud==null?void 0:ud.type)==="paragraph"?(ud.raw+= `
` +ld.raw,ud.text+= `
` +ld.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ud.text):nd.push(ld),od=cd.length!==qa.length,qa=qa.substring(ld.raw.length);continue}if(ld=this.tokenizer.text(qa)){qa=qa.substring(ld.raw.length),ud=nd[nd.length-1],ud&&ud.type==="text"?(ud.raw+= `
` +ld.raw,ud.text+= `
` +ld.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=ud.text):nd.push(ld);continue}if(qa){const dd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(dd);break}else throw new Error(dd)}}return this.state.top=!0,nd}inline(qa,nd=[]){return this.inlineQueue.push({src:qa,tokens:nd}),nd}inlineTokens(qa,nd=[]){let od,ld,ud,cd=qa,dd,pd,fd;if(this.tokens.links){const md=Object.keys(this.tokens.links);if(md.length>0)for(;(dd=this.tokenizer.rules.inline.reflinkSearch.exec(cd))!=null;)md.includes(dd[0].slice(dd[0].lastIndexOf("[")+1,-1))&&(cd=cd.slice(0,dd.index)+"["+"a".repeat(dd[0].length-2)+"]"+cd.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dd=this.tokenizer.rules.inline.blockSkip.exec(cd))!=null;)cd=cd.slice(0,dd.index)+"["+"a".repeat(dd[0].length-2)+"]"+cd.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(dd=this.tokenizer.rules.inline.anyPunctuation.exec(cd))!=null;)cd=cd.slice(0,dd.index)+"++"+cd.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(pd||(fd=""),pd=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(md=>(od=md.call({lexer:this},qa,nd))?(qa=qa.substring(od.raw.length),nd.push(od),!0):!1))){if(od=this.tokenizer.escape(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.tag(qa)){qa=qa.substring(od.raw.length),ld=nd[nd.length-1],ld&&od.type==="text"&&ld.type==="text"?(ld.raw+=od.raw,ld.text+=od.text):nd.push(od);continue}if(od=this.tokenizer.link(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(od.raw.length),ld=nd[nd.length-1],ld&&od.type==="text"&&ld.type==="text"?(ld.raw+=od.raw,ld.text+=od.text):nd.push(od);continue}if(od=this.tokenizer.emStrong(qa,cd,fd)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.codespan(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.br(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.del(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(od=this.tokenizer.autolink(qa)){qa=qa.substring(od.raw.length),nd.push(od);continue}if(!this.state.inLink&&(od=this.tokenizer.url(qa))){qa=qa.substring(od.raw.length),nd.push(od);continue}if(ud=qa,this.options.extensions&&this.options.extensions.startInline){let md=1/0;const vd=qa.slice(1);let Ad;this.options.extensions.startInline.forEach(Nd=>{Ad=Nd.call({lexer:this},vd),typeof Ad=="number"&&Ad>=0&&(md=Math.min(md,Ad))}),md<1/0&&md>=0&&(ud=qa.substring(0,md+1))}if(od=this.tokenizer.inlineText(ud)){qa=qa.substring(od.raw.length),od.raw.slice(-1)!=="_"&&(fd=od.raw.slice(-1)),pd=!0,ld=nd[nd.length-1],ld&&ld.type==="text"?(ld.raw+=od.raw,ld.text+=od.text):nd.push(od);continue}if(qa){const md="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(md);break}else throw new Error(md)}}return nd}}class _Renderer{constructor(qa){Km(this,"options");Km(this,"parser");this.options=qa||_defaults}space(qa){return""}code({text:qa,lang:nd,escaped:od}){var cd;const ld=(cd=(nd||"").match(/^ \S */))==null?void 0:cd[0],ud=qa.replace(/ \n $ /,"")+ `
` ;return ld?'<pre><code class="language-'+escape $ 1(ld)+'">'+(od?ud:escape $ 1(ud,!0))+ ` < / c o d e > < / p r e >
` :"<pre><code>"+(od?ud:escape $ 1(ud,!0))+ ` < / c o d e > < / p r e >
2024-09-18 09:46:23 +08:00
` }blockquote({tokens:qa}){return ` < blockquote >
$ { this . parser . parse ( qa ) } < / b l o c k q u o t e >
2024-11-28 09:28:59 +08:00
` }html({text:qa}){return qa}heading({tokens:qa,depth:nd}){return ` < h$ { nd } > $ { this . parser . parseInline ( qa ) } < / h $ { n d } >
2024-09-18 09:46:23 +08:00
` }hr(qa){return ` < hr >
2024-11-28 09:28:59 +08:00
` }list(qa){const nd=qa.ordered,od=qa.start;let ld="";for(let dd=0;dd<qa.items.length;dd++){const pd=qa.items[dd];ld+=this.listitem(pd)}const ud=nd?"ol":"ul",cd=nd&&od!==1?' start="'+od+'"':"";return"<"+ud+cd+ ` >
` +ld+"</"+ud+ ` >
` }listitem(qa){let nd="";if(qa.task){const od=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=od+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=od+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:od+" ",text:od+" "}):nd+=od+" "}return nd+=this.parser.parse(qa.tokens,!!qa.loose), ` < li > $ { nd } < / l i >
2024-09-18 09:46:23 +08:00
` }checkbox({checked:qa}){return"<input "+(qa?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:qa}){return ` < p > $ { this . parser . parseInline ( qa ) } < / p >
2024-11-28 09:28:59 +08:00
` }table(qa){let nd="",od="";for(let ud=0;ud<qa.header.length;ud++)od+=this.tablecell(qa.header[ud]);nd+=this.tablerow({text:od});let ld="";for(let ud=0;ud<qa.rows.length;ud++){const cd=qa.rows[ud];od="";for(let dd=0;dd<cd.length;dd++)od+=this.tablecell(cd[dd]);ld+=this.tablerow({text:od})}return ld&&(ld= ` < tbody > $ { ld } < / t b o d y > ` ) , ` < t a b l e >
2024-09-18 09:46:23 +08:00
< thead >
2024-11-28 09:28:59 +08:00
` +nd+ ` < / t h e a d >
` +ld+ ` < / t a b l e >
2024-09-18 09:46:23 +08:00
` }tablerow({text:qa}){return ` < tr >
$ { qa } < / t r >
2024-11-28 09:28:59 +08:00
` }tablecell(qa){const nd=this.parser.parseInline(qa.tokens),od=qa.header?"th":"td";return(qa.align? ` < $ { od } align = "${qa.align}" > ` : ` < $ { od } > ` )+nd+ ` < / $ { o d } >
` }strong({tokens:qa}){return ` < strong > $ { this . parser . parseInline ( qa ) } < / s t r o n g > ` } e m ( { t o k e n s : q a } ) { r e t u r n ` < e m > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / e m > ` } c o d e s p a n ( { t e x t : q a } ) { r e t u r n ` < c o d e > $ { q a } < / c o d e > ` } b r ( q a ) { r e t u r n " < b r > " } d e l ( { t o k e n s : q a } ) { r e t u r n ` < d e l > $ { t h i s . p a r s e r . p a r s e I n l i n e ( q a ) } < / d e l > ` } l i n k ( { h r e f : q a , t i t l e : n d , t o k e n s : o d } ) { c o n s t l d = t h i s . p a r s e r . p a r s e I n l i n e ( o d ) , u d = c l e a n U r l ( q a ) ; i f ( u d = = = n u l l ) r e t u r n l d ; q a = u d ; l e t c d = ' < a h r e f = " ' + q a + ' " ' ; r e t u r n n d & & ( c d + = ' t i t l e = " ' + n d + ' " ' ) , c d + = " > " + l d + " < / a > " , c d } i m a g e ( { h r e f : q a , t i t l e : n d , t e x t : o d } ) { c o n s t l d = c l e a n U r l ( q a ) ; i f ( l d = = = n u l l ) r e t u r n o d ; q a = l d ; l e t u d = ` < i m g s r c = " $ { q a } " a l t = " $ { o d } " ` ; r e t u r n n d & & ( u d + = ` t i t l e = " $ { n d } " ` ) , u d + = " > " , u d } t e x t ( q a ) { r e t u r n " t o k e n s " i n q a & & q a . t o k e n s ? t h i s . p a r s e r . p a r s e I n l i n e ( q a . t o k e n s ) : q a . t e x t } } c l a s s _ T e x t R e n d e r e r { s t r o n g ( { t e x t : q a } ) { r e t u r n q a } e m ( { t e x t : q a } ) { r e t u r n q a } c o d e s p a n ( { t e x t : q a } ) { r e t u r n q a } d e l ( { t e x t : q a } ) { r e t u r n q a } h t m l ( { t e x t : q a } ) { r e t u r n q a } t e x t ( { t e x t : q a } ) { r e t u r n q a } l i n k ( { t e x t : q a } ) { r e t u r n " " + q a } i m a g e ( { t e x t : q a } ) { r e t u r n " " + q a } b r ( ) { r e t u r n " " } } c l a s s _ P a r s e r { c o n s t r u c t o r ( q a ) { K m ( t h i s , " o p t i o n s " ) ; K m ( t h i s , " r e n d e r e r " ) ; K m ( t h i s , " t e x t R e n d e r e r " ) ; t h i s . o p t i o n s = q a | | _ d e f a u l t s , t h i s . o p t i o n s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r | | n e w _ R e n d e r e r , t h i s . r e n d e r e r = t h i s . o p t i o n s . r e n d e r e r , t h i s . r e n d e r e r . o p t i o n s = t h i s . o p t i o n s , t h i s . r e n d e r e r . p a r s e r = t h i s , t h i s . t e x t R e n d e r e r = n e w _ T e x t R e n d e r e r } s t a t i c p a r s e ( q a , n d ) { r e t u r n n e w _ P a r s e r ( n d ) . p a r s e ( q a ) } s t a t i c p a r s e I n l i n e ( q a , n d ) { r e t u r n n e w _ P a r s e r ( n d ) . p a r s e I n l i n e ( q a ) } p a r s e ( q a , n d = ! 0 ) { l e t o d = " " ; f o r ( l e t l d = 0 ; l d < q a . l e n g t h ; l d + + ) { c o n s t u d = q a [ l d ] ; i f ( t h i s . o p t i o n s . e x t e n s i o n s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s & & t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ u d . t y p e ] ) { c o n s t d d = u d , p d = t h i s . o p t i o n s . e x t e n s i o n s . r e n d e r e r s [ d d . t y p e ] . c a l l ( { p a r s e r : t h i s } , d d ) ; i f ( p d ! = = ! 1 | | ! [ " s p a c e " , " h r " , " h e a d i n g " , " c o d e " , " t a b l e " , " b l o c k q u o t e " , " l i s t " , " h t m l " , " p a r a g r a p h " , " t e x t " ] . i n c l u d e s ( d d . t y p e ) ) { o d + = p d | | " " ; c o n t i n u e } } c o n s t c d = u d ; s w i t c h ( c d . t y p e ) { c a s e " s p a c e " : { o d + = t h i s . r e n d e r e r . s p a c e ( c d ) ; c o n t i n u e } c a s e " h r " : { o d + = t h i s . r e n d e r e r . h r ( c d ) ; c o n t i n u e } c a s e " h e a d i n g " : { o d + = t h i s . r e n d e r e r . h e a d i n g ( c d ) ; c o n t i n u e } c a s e " c o d e " : { o d + = t h i s . r e n d e r e r . c o d e ( c d ) ; c o n t i n u e } c a s e " t a b l e " : { o d + = t h i s . r e n d e r e r . t a b l e ( c d ) ; c o n t i n u e } c a s e " b l o c k q u o t e " : { o d + = t h i s . r e n d e r e r . b l o c k q u o t e ( c d ) ; c o n t i n u e } c a s e " l i s t " : { o d + = t h i s . r e n d e r e r . l i s t ( c d ) ; c o n t i n u e } c a s e " h t m l " : { o d + = t h i s . r e n d e r e r . h t m l ( c d ) ; c o n t i n u e } c a s e " p a r a g r a p h " : { o d + = t h i s . r e n d e r e r . p a r a g r a p h ( c d ) ; c o n t i n u e } c a s e " t e x t " : { l e t d d = c d , p d = t h i s . r e n d e r e r . t e x t ( d d ) ; f o r ( ; l d + 1 < q a . l e n g t h & & q a [ l d + 1 ] . t y p e = = = " t e x t " ; ) d d = q a [ + + l d ] , p d + = `
` +this.renderer.text(dd);nd?od+=this.renderer.paragraph({type:"paragraph",raw:pd,text:pd,tokens:[{type:"text",raw:pd,text:pd}]}):od+=pd;continue}default:{const dd='Token with "'+cd.type+'" type was not found.';if(this.options.silent)return console.error(dd),"";throw new Error(dd)}}}return od}parseInline(qa,nd){nd=nd||this.renderer;let od="";for(let ld=0;ld<qa.length;ld++){const ud=qa[ld];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ud.type]){const dd=this.options.extensions.renderers[ud.type].call({parser:this},ud);if(dd!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(ud.type)){od+=dd||"";continue}}const cd=ud;switch(cd.type){case"escape":{od+=nd.text(cd);break}case"html":{od+=nd.html(cd);break}case"link":{od+=nd.link(cd);break}case"image":{od+=nd.image(cd);break}case"strong":{od+=nd.strong(cd);break}case"em":{od+=nd.em(cd);break}case"codespan":{od+=nd.codespan(cd);break}case"br":{od+=nd.br(cd);break}case"del":{od+=nd.del(cd);break}case"text":{od+=nd.text(cd);break}default:{const dd='Token with "'+cd.type+'" type was not found.';if(this.options.silent)return console.error(dd),"";throw new Error(dd)}}}return od}}class _Hooks{constructor(qa){Km(this,"options");this.options=qa||_defaults}preprocess(qa){return qa}postprocess(qa){return qa}processAllTokens(qa){return qa}}Km(_Hooks,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var ev,oS,ST,lS;class Marked{constructor(...qa){rS(this,ev);Km(this,"defaults",_getDefaults());Km(this,"options",this.setOptions);Km(this,"parse",AE(this,ev,ST).call(this,_Lexer.lex,_Parser.parse));Km(this,"parseInline",AE(this,ev,ST).call(this,_Lexer.lexInline,_Parser.parseInline));Km(this,"Parser",_Parser);Km(this,"Renderer",_Renderer);Km(this,"TextRenderer",_TextRenderer);Km(this,"Lexer",_Lexer);Km(this,"Tokenizer",_Tokenizer);Km(this,"Hooks",_Hooks);this.use(...qa)}walkTokens(qa,nd){var ld,ud;let od=[];for(const cd of qa)switch(od=od.concat(nd.call(this,cd)),cd.type){case"table":{const dd=cd;for(const pd of dd.header)od=od.concat(this.walkTokens(pd.tokens,nd));for(const pd of dd.rows)for(const fd of pd)od=od.concat(this.walkTokens(fd.tokens,nd));break}case"list":{const dd=cd;od=od.concat(this.walkTokens(dd.items,nd));break}default:{const dd=cd;(ud=(ld=this.defaults.extensions)==null?void 0:ld.childTokens)!=null&&ud[dd.type]?this.defaults.extensions.childTokens[dd.type].forEach(pd=>{const fd=dd[pd].flat(1/0);od=od.concat(this.walkTokens(fd,nd))}):dd.tokens&&(od=od.concat(this.walkTokens(dd.tokens,nd)))}}return od}use(...qa){const nd=this.defaults.extensions||{renderers:{},childTokens:{}};return qa.forEach(od=>{const ld={...od};if(ld.async=this.defaults.async||ld.async||!1,od.extensions&&(od.extensions.forEach(ud=>{if(!ud.name)throw new Error("extension name required");if("renderer"in ud){const cd=nd.renderers[ud.name];cd?nd.renderers[ud.name]=function(...dd){let pd=ud.renderer.apply(this,dd);return pd===!1&&(pd=cd.apply(this,dd)),pd}:nd.renderers[ud.name]=ud.renderer}if("tokenizer"in ud){if(!ud.level||ud.level!=="block"&&ud.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const cd=nd[ud.level];cd?cd.unshift(ud.tokenizer):nd[ud.level]=[ud.tokenizer],ud.start&&(ud.level==="block"?nd.startBlock?nd.startBlock.push(ud.start):nd.startBlock=[ud.start]:ud.level==="inline"&&(nd.startInline?nd.startInline.push(ud.start):nd.startInline=[ud.start]))}"childTokens"in ud&&ud.childTokens&&(nd.childTokens[ud.name]=ud.childTokens)}),ld.extensions=nd),od.renderer){const ud=this.defaults.renderer||new _Renderer(this.defaults);for(const cd in od.renderer){if(!(cd in ud))throw new Error( ` renderer '${cd}' does not exist ` );if(["options","parser"].includes(cd))continue;const dd=cd;let pd=od.renderer[dd];od.useNewRenderer||(pd=AE(this,ev,oS).call(this,pd,dd,ud));const fd=ud[dd];ud[dd]=(...md)=>{let vd=pd.apply(ud,md);return vd===!1&&(vd=fd.apply(ud,md)),vd||""}}ld.renderer=ud}if(od.tokenizer){const ud=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const cd in
Please report this to https : //github.com/markedjs/marked.`,qa){const ld="<p>An error occurred:</p><pre>"+escape$1(od.message+"",!0)+"</pre>";return nd?Promise.resolve(ld):ld}if(nd)return Promise.reject(od);throw od}};const markedInstance=new Marked;function marked(Ra,qa){return markedInstance.parse(Ra,qa)}marked.options=marked.setOptions=function(Ra){return markedInstance.setOptions(Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.getDefaults=_getDefaults;marked.defaults=_defaults;marked.use=function(...Ra){return markedInstance.use(...Ra),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked};marked.walkTokens=function(Ra,qa){return markedInstance.walkTokens(Ra,qa)};marked.parseInline=markedInstance.parseInline;marked.Parser=_Parser;marked.parser=_Parser.parse;marked.Renderer=_Renderer;marked.TextRenderer=_TextRenderer;marked.Lexer=_Lexer;marked.lexer=_Lexer.lex;marked.Tokenizer=_Tokenizer;marked.Hooks=_Hooks;marked.parse=marked;marked.options;marked.setOptions;marked.use;marked.walkTokens;marked.parseInline;_Parser.parse;_Lexer.lex;function dedent(Ra){for(var qa=[],nd=1;nd<arguments.length;nd++)qa[nd-1]=arguments[nd];var od=Array.from(typeof Ra=="string"?[Ra]:Ra);od[od.length-1]=od[od.length-1].replace(/\r?\n([\t ]*)$/,"");var ld=od.reduce(function(dd,pd){var fd=pd.match(/\n([\t ]+|(?!\s).)/g);return fd?dd.concat(fd.map(function(md){var vd,Ad;return(Ad=(vd=md.match(/[\t ]/g))===null||vd===void 0?void 0:vd.length)!==null&&Ad!==void 0?Ad:0})):dd},[]);if(ld.length){var ud=new RegExp(`
[ ] { ` +Math.min.apply(Math,ld)+"}","g");od=od.map(function(dd){return dd.replace(ud, `
` )})}od[0]=od[0].replace(/^ \r ? \n /,"");var cd=od[0];return qa.forEach(function(dd,pd){var fd=cd.match(/(?:^| \n )( *) $ /),md=fd?fd[1]:"",vd=dd;typeof dd=="string"&&dd.includes( `
` )&&(vd=String(dd).split( `
` ).map(function(Ad,Nd){return Nd===0?Ad:""+md+Ad}).join( `
` )),cd+=vd+od[pd+1]}),cd}function preprocessMarkdown(Ra,{markdownAutoWrap:qa}){const od=Ra.replace(/<br \/ >/g, `
2024-09-18 09:46:23 +08:00
` ).replace(/ \n {2,}/g, `
2024-11-28 09:28:59 +08:00
` ),ld=dedent(od);return qa===!1?ld.replace(/ /g," "):ld}__name(preprocessMarkdown,"preprocessMarkdown");function markdownToLines(Ra,qa={}){const nd=preprocessMarkdown(Ra,qa),od=marked.lexer(nd),ld=[[]];let ud=0;function cd(dd,pd="normal"){dd.type==="text"?dd.text.split( `
` ).forEach((md,vd)=>{vd!==0&&(ud++,ld.push([])),md.split(" ").forEach(Ad=>{Ad=Ad.replace(/'/g,"'"),Ad&&ld[ud].push({content:Ad,type:pd})})}):dd.type==="strong"||dd.type==="em"?dd.tokens.forEach(fd=>{cd(fd,dd.type)}):dd.type==="html"&&ld[ud].push({content:dd.text,type:"normal"})}return __name(cd,"processNode"),od.forEach(dd=>{var pd;dd.type==="paragraph"?(pd=dd.tokens)==null||pd.forEach(fd=>{cd(fd)}):dd.type==="html"&&ld[ud].push({content:dd.text,type:"normal"})}),ld}__name(markdownToLines,"markdownToLines");function markdownToHTML(Ra,{markdownAutoWrap:qa}={}){const nd=marked.lexer(Ra);function od(ld){var ud,cd,dd;return ld.type==="text"?qa===!1?ld.text.replace(/ \n */g,"<br/>").replace(/ /g," "):ld.text.replace(/ \n */g,"<br/>"):ld.type==="strong"? ` < strong > $ { ( ud = ld . tokens ) == null ? void 0 : ud . map ( od ) . join ( "" ) } < / s t r o n g > ` : l d . t y p e = = = " e m " ? ` < e m > $ { ( c d = l d . t o k e n s ) = = n u l l ? v o i d 0 : c d . m a p ( o d ) . j o i n ( " " ) } < / e m > ` : l d . t y p e = = = " p a r a g r a p h " ? ` < p > $ { ( d d = l d . t o k e n s ) = = n u l l ? v o i d 0 : d d . m a p ( o d ) . j o i n ( " " ) } < / p > ` : l d . t y p e = = = " s p a c e " ? " " : l d . t y p e = = = " h t m l " ? ` $ { l d . t e x t } ` : l d . t y p e = = = " e s c a p e " ? l d . t e x t : ` U n s u p p o r t e d m a r k d o w n : $ { l d . t y p e } ` } r e t u r n _ _ n a m e ( o d , " o u t p u t " ) , n d . m a p ( o d ) . j o i n ( " " ) } _ _ n a m e ( m a r k d o w n T o H T M L , " m a r k d o w n T o H T M L " ) ; f u n c t i o n s p l i t T e x t T o C h a r s ( R a ) { r e t u r n I n t l . S e g m e n t e r ? [ . . . n e w I n t l . S e g m e n t e r ( ) . s e g m e n t ( R a ) ] . m a p ( q a = > q a . s e g m e n t ) : [ . . . R a ] } _ _ n a m e ( s p l i t T e x t T o C h a r s , " s p l i t T e x t T o C h a r s " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h ( R a , q a ) { c o n s t n d = s p l i t T e x t T o C h a r s ( q a . c o n t e n t ) ; r e t u r n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , [ ] , n d , q a . t y p e ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h , " s p l i t W o r d T o F i t W i d t h " ) ; f u n c t i o n s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , q a , n d , o d ) { i f ( n d . l e n g t h = = = 0 ) r e t u r n [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : o d } , { c o n t e n t : " " , t y p e : o d } ] ; c o n s t [ l d , . . . u d ] = n d , c d = [ . . . q a , l d ] ; r e t u r n R a ( [ { c o n t e n t : c d . j o i n ( " " ) , t y p e : o d } ] ) ? s p l i t W o r d T o F i t W i d t h R e c u r s i o n ( R a , c d , u d , o d ) : ( q a . l e n g t h = = = 0 & & l d & & ( q a . p u s h ( l d ) , n d . s h i f t ( ) ) , [ { c o n t e n t : q a . j o i n ( " " ) , t y p e : o d } , { c o n t e n t : n d . j o i n ( " " ) , t y p e : o d } ] ) } _ _ n a m e ( s p l i t W o r d T o F i t W i d t h R e c u r s i o n , " s p l i t W o r d T o F i t W i d t h R e c u r s i o n " ) ; f u n c t i o n s p l i t L i n e T o F i t W i d t h ( R a , q a ) { i f ( R a . s o m e ( ( { c o n t e n t : n d } ) = > n d . i n c l u d e s ( `
` )))throw new Error("splitLineToFitWidth does not support newlines in the line");return splitLineToFitWidthRecursion(Ra,qa)}__name(splitLineToFitWidth,"splitLineToFitWidth");function splitLineToFitWidthRecursion(Ra,qa,nd=[],od=[]){if(Ra.length===0)return od.length>0&&nd.push(od),nd.length>0?nd:[];let ld="";Ra[0].content===" "&&(ld=" ",Ra.shift());const ud=Ra.shift()??{content:" ",type:"normal"},cd=[...od];if(ld!==""&&cd.push({content:ld,type:"normal"}),cd.push(ud),qa(cd))return splitLineToFitWidthRecursion(Ra,qa,nd,cd);if(od.length>0)nd.push(od),Ra.unshift(ud);else if(ud.content){const[dd,pd]=splitWordToFitWidth(qa,ud);nd.push([dd]),pd.content&&Ra.unshift(pd)}return splitLineToFitWidthRecursion(Ra,qa,nd)}__name(splitLineToFitWidthRecursion,"splitLineToFitWidthRecursion");function applyStyle $ 1(Ra,qa){qa&&Ra.attr("style",qa)}__name(applyStyle $ 1,"applyStyle");async function addHtmlSpan(Ra,qa,nd,od,ld=!1){const ud=Ra.append("foreignObject");ud.attr("width", ` $ { 10 * nd } px ` ),ud.attr("height", ` $ { 10 * nd } px ` );const cd=ud.append("xhtml:div");let dd=qa.label;qa.label&&hasKatex(qa.label)&&(dd=await renderKatex(qa.label.replace(common_default.lineBreakRegex, `
2024-12-08 09:17:51 +08:00
` ),getConfig2()));const pd=qa.isNode?"nodeLabel":"edgeLabel",fd=cd.append("span");fd.html(dd),applyStyle $ 1(fd,qa.labelStyle),fd.attr("class", ` $ { pd } $ { od } ` ),applyStyle $ 1(cd,qa.labelStyle),cd.style("display","table-cell"),cd.style("white-space","nowrap"),cd.style("line-height","1.5"),cd.style("max-width",nd+"px"),cd.style("text-align","center"),cd.attr("xmlns","http://www.w3.org/1999/xhtml"),ld&&cd.attr("class","labelBkg");let md=cd.node().getBoundingClientRect();return md.width===nd&&(cd.style("display","table"),cd.style("white-space","break-spaces"),cd.style("width",nd+"px"),md=cd.node().getBoundingClientRect()),ud.node()}__name(addHtmlSpan,"addHtmlSpan");function createTspan(Ra,qa,nd){return Ra.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",qa*nd-.1+"em").attr("dy",nd+"em")}__name(createTspan,"createTspan");function computeWidthOfText(Ra,qa,nd){const od=Ra.append("text"),ld=createTspan(od,1,qa);updateTextContentAndStyles(ld,nd);const ud=ld.node().getComputedTextLength();return od.remove(),ud}__name(computeWidthOfText,"computeWidthOfText");function computeDimensionOfText(Ra,qa,nd){var cd;const od=Ra.append("text"),ld=createTspan(od,1,qa);updateTextContentAndStyles(ld,[{content:nd,type:"normal"}]);const ud=(cd=ld.node())==null?void 0:cd.getBoundingClientRect();return ud&&od.remove(),ud}__name(computeDimensionOfText,"computeDimensionOfText");function createFormattedText(Ra,qa,nd,od=!1){const ud=qa.append("g"),cd=ud.insert("rect").attr("class","background").attr("style","stroke: none"),dd=ud.append("text").attr("y","-10.1");let pd=0;for(const fd of nd){const md=__name(Ad=>computeWidthOfText(ud,1.1,Ad)<=Ra,"checkWidth"),vd=md(fd)?[fd]:splitLineToFitWidth(fd,md);for(const Ad of vd){const Nd=createTspan(dd,pd,1.1);updateTextContentAndStyles(Nd,Ad),pd++}}if(od){const fd=dd.node().getBBox(),md=2;return cd.attr("x",fd.x-md).attr("y",fd.y-md).attr("width",fd.width+2*md).attr("height",fd.height+2*md),ud.node()}else return dd.node()}__name(createFormattedText,"createFormattedText");function updateTextContentAndStyles(Ra,qa){Ra.text(""),qa.forEach((nd,od)=>{const ld=Ra.append("tspan").attr("font-style",nd.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",nd.type==="strong"?"bold":"normal");od===0?ld.text(nd.content):ld.text(" "+nd.content)})}__name(updateTextContentAndStyles,"updateTextContentAndStyles");function replaceIconSubstring(Ra){return Ra.replace(/fa[bklrs]?:fa-[ \w -]+/g,qa=> ` < i class = '${qa.replace(":"," ")}' > < /i>`)}__name(replaceIconSubstring,"replaceIconSubstring");var createText=__name(async(Ra,qa="",{style:nd="",isTitle:od=!1,classes:ld="",useHtmlLabels:ud=!0,isNode:cd=!0,width:dd=200,addSvgBackground:pd=!1}={},fd)=>{if(log$1.debug("XYZ createText",qa,nd,od,ld,ud,cd,"addSvgBackground: ",pd),ud){const md=markdownToHTML(qa,fd),vd=replaceIconSubstring(decodeEntities(md)),Ad=qa.replace(/ \ \ \ \ / g , "\\" ) , Nd = { isNode : cd , label : hasKatex ( qa ) ? Ad : vd , labelStyle : nd . replace ( "fill:" , "color:" ) } ; return await addHtmlSpan ( Ra , Nd , dd , ld , pd ) } else { const md = qa . replace ( /<br\s*\/?>/g , "<br/>" ) , vd = markdownToLines ( md . replace ( "<br>" , "<br/>" ) , fd ) , Ad = createFormattedText ( dd , Ra , vd , qa ? pd : ! 1 ) ; if ( cd ) { /stroke:/ . exec ( nd ) && ( nd = nd . replace ( "stroke:" , "lineColor:" ) ) ; const Nd = nd . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Ad ) . attr ( "style" , Nd ) } else { const Nd = nd . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /background:/g , "fill:" ) ; select ( Ad ) . select ( "rect" ) . attr ( "style" , Nd . replace ( /background:/g , "fill:" ) ) ; const Id = nd . replace ( /stroke:[^;]+;?/g , "" ) . replace ( /stroke-width:[^;]+;?/g , "" ) . replace ( /fill:[^;]+;?/g , "" ) . replace ( /color:/g , "fill:" ) ; select ( Ad ) . select ( "text" ) . attr ( "style" , Id ) } return Ad } } , "createText" ) ; function t ( Ra , qa , nd ) { if ( Ra && Ra . length ) { const [ od , ld ] = qa , ud = Math . PI / 180 * nd , cd = Math . cos ( ud ) , dd = Math . sin ( ud ) ; for ( const pd of Ra ) { const [ fd , md ] = pd ; pd [ 0 ] = ( fd - od ) * cd - ( md - ld ) * dd + od , pd [ 1 ] = ( fd - od ) * dd + ( md - ld ) * cd + ld } } } function e ( Ra , qa ) { return Ra [ 0 ] === qa [ 0 ] && Ra [ 1 ] === qa [ 1 ] } function s ( Ra , qa , nd , od = 1 )
` ),getConfig2()));const ld=Ra.isNode?"nodeLabel":"edgeLabel";return nd.html('<span class="'+ld+'" '+(Ra.labelStyle?'style="'+Ra.labelStyle+'"':"")+">"+od+"</span>"),applyStyle(nd,Ra.labelStyle),nd.style("display","inline-block"),nd.style("padding-right","1px"),nd.style("white-space","nowrap"),nd.attr("xmlns","http://www.w3.org/1999/xhtml"),qa.node()}__name(addHtmlLabel,"addHtmlLabel");var createLabel=__name(async(Ra,qa,nd,od)=>{let ld=Ra||"";if(typeof ld=="object"&&(ld=ld[0]),evaluate(getConfig2().flowchart.htmlLabels)){ld=ld.replace(/ \\ n| \n /g,"<br />"),log $ 1.info("vertexText"+ld);const ud={isNode:od,label:decodeEntities(ld).replace(/fa[blrs]?:fa-[ \w -]+/g,dd=> ` < i class = '${dd.replace(":"," ")}' > < /i>`),labelStyle:qa&&qa.replace("fill:","color:")};return await addHtmlLabel(ud)}else{const ud=document.createElementNS("http:/ / www . w3 . org / 2000 / svg "," text ");ud.setAttribute(" style ",qa.replace(" color : "," fill : "));let cd=[];typeof ld==" string "?cd=ld.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(ld)?cd=ld:cd=[];for(const dd of cd){const pd=document.createElementNS(" http : //www.w3.org/2000/svg","tspan");pd.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),pd.setAttribute("dy","1em"),pd.setAttribute("x","0"),nd?pd.setAttribute("class","title-row"):pd.setAttribute("class","row"),pd.textContent=dd.trim(),ud.appendChild(pd)}return ud}},"createLabel"),createLabel_default=createLabel,createRoundedRectPathD=__name((Ra,qa,nd,od,ld)=>["M",Ra+ld,qa,"H",Ra+nd-ld,"A",ld,ld,0,0,1,Ra+nd,qa+ld,"V",qa+od-ld,"A",ld,ld,0,0,1,Ra+nd-ld,qa+od,"H",Ra+ld,"A",ld,ld,0,0,1,Ra,qa+od-ld,"V",qa+ld,"A",ld,ld,0,0,1,Ra+ld,qa,"Z"].join(" "),"createRoundedRectPathD"),solidStateFill=__name(Ra=>{const{handDrawnSeed:qa}=getConfig2();return{fill:Ra,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:Ra,seed:qa}},"solidStateFill"),compileStyles=__name(Ra=>{const qa=styles2Map([...Ra.cssCompiledStyles||[],...Ra.cssStyles||[]]);return{stylesMap:qa,stylesArray:[...qa]}},"compileStyles"),styles2Map=__name(Ra=>{const qa=new Map;return Ra.forEach(nd=>{const[od,ld]=nd.split(":");qa.set(od.trim(),ld==null?void 0:ld.trim())}),qa},"styles2Map"),styles2String=__name(Ra=>{const{stylesArray:qa}=compileStyles(Ra),nd=[],od=[],ld=[],ud=[];return qa.forEach(cd=>{const dd=cd[0];dd==="color"||dd==="font-size"||dd==="font-family"||dd==="font-weight"||dd==="font-style"||dd==="text-decoration"||dd==="text-align"||dd==="text-transform"||dd==="line-height"||dd==="letter-spacing"||dd==="word-spacing"||dd==="text-shadow"||dd==="text-overflow"||dd==="white-space"||dd==="word-wrap"||dd==="word-break"||dd==="overflow-wrap"||dd==="hyphens"?nd.push(cd.join(":")+" !important"):(od.push(cd.join(":")+" !important"),dd.includes("stroke")&&ld.push(cd.join(":")+" !important"),dd==="fill"&&ud.push(cd.join(":")+" !important"))}),{labelStyles:nd.join(";"),nodeStyles:od.join(";"),stylesArray:qa,borderStyles:ld,backgroundStyles:ud}},"styles2String"),userNodeOverrides=__name((Ra,qa)=>{var pd;const{themeVariables:nd,handDrawnSeed:od}=getConfig2(),{nodeBorder:ld,mainBkg:ud}=nd,{stylesMap:cd}=compileStyles(Ra);return Object.assign({roughness:.7,fill:cd.get("fill")||ud,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:cd.get("stroke")||ld,seed:od,strokeWidth:((pd=cd.get("stroke-width"))==null?void 0:pd.replace("px",""))||1.3,fillLineDash:[0,0]},qa)},"userNodeOverrides"),rect=__name(async(Ra,qa)=>{log$1.info("Creating subgraph rect for ",qa.id,qa);const nd=getConfig2(),{themeVariables:od,handDrawnSeed:ld}=nd,{clusterBkg:ud,clusterBorder:cd}=od,{labelStyles:dd,nodeStyles:pd,borderStyles:fd,backgroundStyles:md}=styles2String(qa),vd=Ra.insert("g").attr("class","cluster "+qa.cssClasses).attr("id",qa.id).attr("data-look",qa.look),Ad=evaluate(nd.flowchart.htmlLabels),Nd=vd.insert("g").attr("class","cluster-label "),Id=await createText(Nd,qa.label,{style:qa.labelStyle,useHtmlLabels:Ad,isNode:!0});let Od=Id.getBBox();if(evaluate(nd.flowchart.htmlLabels)){const zd=Id.children[0],df=select(Id);Od=zd.getBoundingClientRect(),df.attr("width",Od.width),df.attr("height",Od.height)}const Fd=qa.wi
M $ { ld . x } , $ { ld . y } L $ { cd . x } , $ { cd . y } ` }__name(createLine,"createLine");function crossedCircle(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd,qa.label="";const ld=Ra.insert("g").attr("class",getNodeClasses(qa)).attr("id",qa.domId??qa.id),ud=Math.max(30,(qa==null?void 0:qa.width)??0),{cssStyles:cd}=qa,dd=at $ 1.svg(ld),pd=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(pd.roughness=0,pd.fillStyle="solid");const fd=dd.circle(0,0,ud*2,pd),md=createLine(ud),vd=dd.path(md,pd),Ad=ld.insert(()=>fd,":first-child");return Ad.insert(()=>vd),cd&&qa.look!=="handDrawn"&&Ad.selectAll("path").attr("style",cd),od&&qa.look!=="handDrawn"&&Ad.selectAll("path").attr("style",od),updateNodeBounds(qa,Ad),qa.intersect=function(Nd){return log $ 1.info("crossedCircle intersect",qa,{radius:ud,point:Nd}),intersect_default.circle(qa,ud,Nd)},ld}__name(crossedCircle,"crossedCircle");function generateCirclePoints2(Ra,qa,nd,od=100,ld=0,ud=180){const cd=[],dd=ld*Math.PI/180,md=(ud*Math.PI/180-dd)/(od-1);for(let vd=0;vd<od;vd++){const Ad=dd+vd*md,Nd=Ra+nd*Math.cos(Ad),Id=qa+nd*Math.sin(Ad);cd.push({x:-Nd,y:-Id})}return cd}__name(generateCirclePoints2,"generateCirclePoints");async function curlyBraceLeft(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd}=await labelHelper(Ra,qa,getNodeClasses(qa)),dd=ud.width+(qa.padding??0),pd=ud.height+(qa.padding??0),fd=Math.max(5,pd*.1),{cssStyles:md}=qa,vd=[...generateCirclePoints2(dd/2,-pd/2,fd,30,-90,0),{x:-dd/2-fd,y:fd},...generateCirclePoints2(dd/2+fd*2,-fd,fd,20,-180,-270),...generateCirclePoints2(dd/2+fd*2,fd,fd,20,-90,-180),{x:-dd/2-fd,y:-pd/2},...generateCirclePoints2(dd/2,pd/2,fd,20,0,90)],Ad=[{x:dd/2,y:-pd/2-fd},{x:-dd/2,y:-pd/2-fd},...generateCirclePoints2(dd/2,-pd/2,fd,20,-90,0),{x:-dd/2-fd,y:-fd},...generateCirclePoints2(dd/2+dd*.1,-fd,fd,20,-180,-270),...generateCirclePoints2(dd/2+dd*.1,fd,fd,20,-90,-180),{x:-dd/2-fd,y:pd/2},...generateCirclePoints2(dd/2,pd/2,fd,20,0,90),{x:-dd/2,y:pd/2+fd},{x:dd/2,y:pd/2+fd}],Nd=at $ 1.svg(ld),Id=userNodeOverrides(qa,{fill:"none"});qa.look!=="handDrawn"&&(Id.roughness=0,Id.fillStyle="solid");const Fd=createPathFromPoints(vd).replace("Z",""),Pd=Nd.path(Fd,Id),Md=createPathFromPoints(Ad),Bd=Nd.path(Md,{...Id}),jd=ld.insert("g",":first-child");return jd.insert(()=>Bd,":first-child").attr("stroke-opacity",0),jd.insert(()=>Pd,":first-child"),jd.attr("class","text"),md&&qa.look!=="handDrawn"&&jd.selectAll("path").attr("style",md),od&&qa.look!=="handDrawn"&&jd.selectAll("path").attr("style",od),jd.attr("transform", ` translate ( $ { fd } , 0 ) ` ),cd.attr("transform", ` translate ( $ { - dd / 2 + fd - ( ud . x - ( ud . left ? ? 0 ) ) } , $ { - pd / 2 + ( qa . padding ? ? 0 ) / 2 - ( ud . y - ( ud . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,jd),qa.intersect=function(Hd){return intersect_default.polygon(qa,Ad,Hd)},ld}__name(curlyBraceLeft,"curlyBraceLeft");function generateCirclePoints3(Ra,qa,nd,od=100,ld=0,ud=180){const cd=[],dd=ld*Math.PI/180,md=(ud*Math.PI/180-dd)/(od-1);for(let vd=0;vd<od;vd++){const Ad=dd+vd*md,Nd=Ra+nd*Math.cos(Ad),Id=qa+nd*Math.sin(Ad);cd.push({x:Nd,y:Id})}return cd}__name(generateCirclePoints3,"generateCirclePoints");async function curlyBraceRight(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd}=await labelHelper(Ra,qa,getNodeClasses(qa)),dd=ud.width+(qa.padding??0),pd=ud.height+(qa.padding??0),fd=Math.max(5,pd*.1),{cssStyles:md}=qa,vd=[...generateCirclePoints3(dd/2,-pd/2,fd,20,-90,0),{x:dd/2+fd,y:-fd},...generateCirclePoints3(dd/2+fd*2,-fd,fd,20,-180,-270),...generateCirclePoints3(dd/2+fd*2,fd,fd,20,-90,-180),{x:dd/2+fd,y:pd/2},...generateCirclePoints3(dd/2,pd/2,fd,20,0,90)],Ad=[{x:-dd/2,y:-pd/2-fd},{x:dd/2,y:-pd/2-fd},...generateCirclePoints3(dd/2,-pd/2,fd,20,-90,0),{x:dd/2+fd,y:-fd},...generateCirclePoints3(dd/2+fd*2,-fd,fd,20,-180,-270),...generateCirclePoints3(dd/2+fd*2,fd,fd,20,-90,-180),{x:dd/2+fd,y:pd/2},...generateCirclePoints3(dd/2,pd/2,fd,20,0,90),{x:dd/2,y:pd/2+fd},{x:-dd/2,y:pd/2+fd}],Nd=at $ 1.svg(ld),Id=userNodeOverrides(qa,{fill:"none"});qa.look!
2024-11-28 09:28:59 +08:00
point : ` ,Ad, `
2024-09-18 09:46:23 +08:00
node :
` ,qa, `
2024-12-08 09:17:51 +08:00
res : ` ,intersect_default.polygon(qa,fd,Ad)),intersect_default.polygon(qa,fd,Ad)},ld}__name(question,"question");async function rect_left_inv_arrow(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd}=await labelHelper(Ra,qa,getNodeClasses(qa)),dd=Math.max(ud.width+(qa.padding??0),(qa==null?void 0:qa.width)??0),pd=Math.max(ud.height+(qa.padding??0),(qa==null?void 0:qa.height)??0),fd=-dd/2,md=-pd/2,vd=md/2,Ad=[{x:fd+vd,y:md},{x:fd,y:0},{x:fd+vd,y:-md},{x:-fd,y:-md},{x:-fd,y:md}],{cssStyles:Nd}=qa,Id=at $ 1.svg(ld),Od=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(Od.roughness=0,Od.fillStyle="solid");const Fd=createPathFromPoints(Ad),Pd=Id.path(Fd,Od),Md=ld.insert(()=>Pd,":first-child");return Md.attr("class","basic label-container"),Nd&&qa.look!=="handDrawn"&&Md.selectAll("path").attr("style",Nd),od&&qa.look!=="handDrawn"&&Md.selectAll("path").attr("style",od),Md.attr("transform", ` translate ( $ { - vd / 2 } , 0 ) ` ),cd.attr("transform", ` translate ( $ { - vd / 2 - ud . width / 2 - ( ud . x - ( ud . left ? ? 0 ) ) } , $ { - ( ud . height / 2 ) - ( ud . y - ( ud . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Md),qa.intersect=function(Bd){return intersect_default.polygon(qa,Ad,Bd)},ld}__name(rect_left_inv_arrow,"rect_left_inv_arrow");async function rectWithTitle(Ra,qa){var df,Wd;const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;let ld;qa.cssClasses?ld="node "+qa.cssClasses:ld="node default";const ud=Ra.insert("g").attr("class",ld).attr("id",qa.domId||qa.id),cd=ud.insert("g"),dd=ud.insert("g").attr("class","label").attr("style",od),pd=qa.description,fd=qa.label,md=dd.node().appendChild(await createLabel_default(fd,qa.labelStyle,!0,!0));let vd={width:0,height:0};if(evaluate((Wd=(df=getConfig2())==null?void 0:df.flowchart)==null?void 0:Wd.htmlLabels)){const Jd=md.children[0],Xd=select(md);vd=Jd.getBoundingClientRect(),Xd.attr("width",vd.width),Xd.attr("height",vd.height)}log $ 1.info("Text 2",pd);const Ad=pd||[],Nd=md.getBBox(),Id=dd.node().appendChild(await createLabel_default(Ad.join?Ad.join("<br/>"):Ad,qa.labelStyle,!0,!0)),Od=Id.children[0],Fd=select(Id);vd=Od.getBoundingClientRect(),Fd.attr("width",vd.width),Fd.attr("height",vd.height);const Pd=(qa.padding||0)/2;select(Id).attr("transform","translate( "+(vd.width>Nd.width?0:(Nd.width-vd.width)/2)+", "+(Nd.height+Pd+5)+")"),select(md).attr("transform","translate( "+(vd.width<Nd.width?0:-(Nd.width-vd.width)/2)+", 0)"),vd=dd.node().getBBox(),dd.attr("transform","translate("+-vd.width/2+", "+(-vd.height/2-Pd+3)+")");const Md=vd.width+(qa.padding||0),Bd=vd.height+(qa.padding||0),jd=-vd.width/2-Pd,Hd=-vd.height/2-Pd;let Gd,zd;if(qa.look==="handDrawn"){const Jd=at $ 1.svg(ud),Xd=userNodeOverrides(qa,{}),_f=Jd.path(createRoundedRectPathD(jd,Hd,Md,Bd,qa.rx||0),Xd),vf=Jd.line(-vd.width/2-Pd,-vd.height/2-Pd+Nd.height+Pd,vd.width/2+Pd,-vd.height/2-Pd+Nd.height+Pd,Xd);zd=ud.insert(()=>(log $ 1.debug("Rough node insert CXC",_f),vf),":first-child"),Gd=ud.insert(()=>(log $ 1.debug("Rough node insert CXC",_f),_f),":first-child")}else Gd=cd.insert("rect",":first-child"),zd=cd.insert("line"),Gd.attr("class","outer title-state").attr("style",od).attr("x",-vd.width/2-Pd).attr("y",-vd.height/2-Pd).attr("width",vd.width+(qa.padding||0)).attr("height",vd.height+(qa.padding||0)),zd.attr("class","divider").attr("x1",-vd.width/2-Pd).attr("x2",vd.width/2+Pd).attr("y1",-vd.height/2-Pd+Nd.height+Pd).attr("y2",-vd.height/2-Pd+Nd.height+Pd);return updateNodeBounds(qa,Gd),qa.intersect=function(Jd){return intersect_default.rect(qa,Jd)},ud}__name(rectWithTitle,"rectWithTitle");async function roundedRect(Ra,qa){const nd={rx:5,ry:5,classes:"",labelPaddingX:((qa==null?void 0:qa.padding)||0)*1,labelPaddingY:((qa==null?void 0:qa.padding)||0)*1};return drawRect(Ra,qa,nd)}__name(roundedRect,"roundedRect");async function shadedProcess(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd}=await labelHelper(Ra,qa,getNodeClasses(qa)),dd=(qa==null?void 0:qa.padding)??0,pd=Math.max(ud.width+(qa.padding??0)*2,(qa==null?void 0:qa.width)??0),fd=Math.max(ud.height+(
2024-11-28 09:28:59 +08:00
a$ { ld } , $ { ud } 0 , 0 , 1 0 , $ { - od }
l$ { nd } , 0
a$ { ld } , $ { ud } 0 , 0 , 1 0 , $ { od }
M$ { nd } , $ { - od }
a$ { ld } , $ { ud } 0 , 0 , 0 0 , $ { od }
l$ { - nd } , 0 ` ,"createCylinderPathD"),createOuterCylinderPathD3=__name((Ra,qa,nd,od,ld,ud)=>[ ` M$ { Ra } , $ { qa } ` , ` M$ { Ra + nd } , $ { qa } ` , ` a$ { ld } , $ { ud } 0 , 0 , 0 0 , $ { - od } ` , ` l$ { - nd } , 0 ` , ` a$ { ld } , $ { ud } 0 , 0 , 0 0 , $ { od } ` , ` l$ { nd } , 0 ` ].join(" "),"createOuterCylinderPathD"),createInnerCylinderPathD3=__name((Ra,qa,nd,od,ld,ud)=>[ ` M$ { Ra + nd / 2 } , $ { - od / 2 } ` , ` a$ { ld } , $ { ud } 0 , 0 , 0 0 , $ { od } ` ].join(" "),"createInnerCylinderPathD");async function tiltedCylinder(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd,halfPadding:dd}=await labelHelper(Ra,qa,getNodeClasses(qa)),pd=qa.look==="neo"?dd*2:dd,fd=ud.height+pd,md=fd/2,vd=md/(2.5+fd/50),Ad=ud.width+vd+pd,{cssStyles:Nd}=qa;let Id;if(qa.look==="handDrawn"){const Od=at $ 1.svg(ld),Fd=createOuterCylinderPathD3(0,0,Ad,fd,vd,md),Pd=createInnerCylinderPathD3(0,0,Ad,fd,vd,md),Md=Od.path(Fd,userNodeOverrides(qa,{})),Bd=Od.path(Pd,userNodeOverrides(qa,{fill:"none"}));Id=ld.insert(()=>Bd,":first-child"),Id=ld.insert(()=>Md,":first-child"),Id.attr("class","basic label-container"),Nd&&Id.attr("style",Nd)}else{const Od=createCylinderPathD3(0,0,Ad,fd,vd,md);Id=ld.insert("path",":first-child").attr("d",Od).attr("class","basic label-container").attr("style",handleUndefinedAttr(Nd)).attr("style",od),Id.attr("class","basic label-container"),Nd&&Id.selectAll("path").attr("style",Nd),od&&Id.selectAll("path").attr("style",od)}return Id.attr("label-offset-x",vd),Id.attr("transform", ` translate ( $ { - Ad / 2 } , $ { fd / 2 } ) ` ),cd.attr("transform", ` translate ( $ { - ( ud . width / 2 ) - vd - ( ud . x - ( ud . left ? ? 0 ) ) } , $ { - ( ud . height / 2 ) - ( ud . y - ( ud . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Id),qa.intersect=function(Od){const Fd=intersect_default.rect(qa,Od),Pd=Fd.y-(qa.y??0);if(md!=0&&(Math.abs(Pd)<(qa.height??0)/2||Math.abs(Pd)==(qa.height??0)/2&&Math.abs(Fd.x-(qa.x??0))>(qa.width??0)/2-vd)){let Md=vd*vd*(1-Pd*Pd/(md*md));Md!=0&&(Md=Math.sqrt(Math.abs(Md))),Md=vd-Md,Od.x-(qa.x??0)>0&&(Md=-Md),Fd.x+=Md}return Fd},ld}__name(tiltedCylinder,"tiltedCylinder");async function trapezoid(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud}=await labelHelper(Ra,qa,getNodeClasses(qa)),cd=ud.width+qa.padding,dd=ud.height+qa.padding,pd=[{x:-3*dd/6,y:0},{x:cd+3*dd/6,y:0},{x:cd,y:-dd},{x:0,y:-dd}];let fd;const{cssStyles:md}=qa;if(qa.look==="handDrawn"){const vd=at $ 1.svg(ld),Ad=userNodeOverrides(qa,{}),Nd=createPathFromPoints(pd),Id=vd.path(Nd,Ad);fd=ld.insert(()=>Id,":first-child").attr("transform", ` translate ( $ { - cd / 2 } , $ { dd / 2 } ) ` ),md&&fd.attr("style",md)}else fd=insertPolygonShape(ld,cd,dd,pd);return od&&fd.attr("style",od),qa.width=cd,qa.height=dd,updateNodeBounds(qa,fd),qa.intersect=function(vd){return intersect_default.polygon(qa,pd,vd)},ld}__name(trapezoid,"trapezoid");async function trapezoidalPentagon(Ra,qa){const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud}=await labelHelper(Ra,qa,getNodeClasses(qa)),cd=60,dd=20,pd=Math.max(cd,ud.width+(qa.padding??0)*2,(qa==null?void 0:qa.width)??0),fd=Math.max(dd,ud.height+(qa.padding??0)*2,(qa==null?void 0:qa.height)??0),{cssStyles:md}=qa,vd=at $ 1.svg(ld),Ad=userNodeOverrides(qa,{});qa.look!=="handDrawn"&&(Ad.roughness=0,Ad.fillStyle="solid");const Nd=[{x:-pd/2*.8,y:-fd/2},{x:pd/2*.8,y:-fd/2},{x:pd/2,y:-fd/2*.6},{x:pd/2,y:fd/2},{x:-pd/2,y:fd/2},{x:-pd/2,y:-fd/2*.6}],Id=createPathFromPoints(Nd),Od=vd.path(Id,Ad),Fd=ld.insert(()=>Od,":first-child");return Fd.attr("class","basic label-container"),md&&qa.look!=="handDrawn"&&Fd.selectChildren("path").attr("style",md),od&&qa.look!=="handDrawn"&&Fd.selectChildren("path").attr("style",od),updateNodeBounds(qa,Fd),qa.intersect=function(Pd){return intersect_default.polygon(qa,Nd,Pd)},ld}__name(trapezoidalPentagon,"trapezoidalPentagon");async function triangle(Ra,qa){var Md;const{labelStyles:nd,nodeStyles:od}=styles2String(qa);qa.labelStyle=nd;const{shapeSvg:ld,bbox:ud,label:cd}=await labelHelper(Ra,qa,getNodeClasses(qa)),dd=evaluate((Md=getConfig2().flowchart)==null?void 0:Md.htmlLabels),pd=ud.width+(qa.padding??0),fd=pd+ud.height,md=pd+ud.height,vd=[{x:0,y
M$ { md - fd } , $ { vd } L$ { md + dd } , $ { vd }
2024-12-08 09:17:51 +08:00
M$ { md } , $ { vd - fd } L$ { md } , $ { vd + pd } ` ;qa.look!=="handDrawn"&&(Id.roughness=0,Id.fillStyle="solid");const Pd=Nd.path(Fd,Id),Md=ld.insert(()=>Pd,":first-child");return Md.attr("transform", ` translate ( $ { fd / 2 } , $ { fd / 2 } ) ` ),Md.attr("class","basic label-container"),Ad&&qa.look!=="handDrawn"&&Md.selectAll("path").attr("style",Ad),od&&qa.look!=="handDrawn"&&Md.selectAll("path").attr("style",od),cd.attr("transform", ` translate ( $ { - ( ud . width / 2 ) + fd / 2 - ( ud . x - ( ud . left ? ? 0 ) ) } , $ { - ( ud . height / 2 ) + fd / 2 - ( ud . y - ( ud . top ? ? 0 ) ) } ) ` ),updateNodeBounds(qa,Md),qa.intersect=function(Bd){return intersect_default.polygon(qa,Od,Bd)},ld}__name(windowPane,"windowPane");async function textHelper(Ra,qa,nd,od,ld=nd.class.padding??12){const ud=od?0:3,cd=Ra.insert("g").attr("class",getNodeClasses(qa)).attr("id",qa.domId||qa.id);let dd=null,pd=null,fd=null,md=null,vd=0,Ad=0,Nd=0;if(dd=cd.insert("g").attr("class","annotation-group text"),qa.annotations.length>0){const Md=qa.annotations[0];await addText(dd,{text: ` « $ { Md } » ` },0),vd=dd.node().getBBox().height}pd=cd.insert("g").attr("class","label-group text"),await addText(pd,qa,0,["font-weight: bolder"]);const Id=pd.node().getBBox();Ad=Id.height,fd=cd.insert("g").attr("class","members-group text");let Od=0;for(const Md of qa.members){const Bd=await addText(fd,Md,Od,[Md.parseClassifier()]);Od+=Bd+ud}Nd=fd.node().getBBox().height,Nd<=0&&(Nd=ld/2),md=cd.insert("g").attr("class","methods-group text");let Fd=0;for(const Md of qa.methods){const Bd=await addText(md,Md,Fd,[Md.parseClassifier()]);Fd+=Bd+ud}let Pd=cd.node().getBBox();if(dd!==null){const Md=dd.node().getBBox();dd.attr("transform", ` translate ( $ { - Md . width / 2 } ) ` )}return pd.attr("transform", ` translate ( $ { - Id . width / 2 } , $ { vd } ) ` ),Pd=cd.node().getBBox(),fd.attr("transform", ` translate ( 0 , $ { vd + Ad + ld * 2 } ) ` ),Pd=cd.node().getBBox(),md.attr("transform", ` translate ( 0 , $ { vd + Ad + ( Nd ? Nd + ld * 4 : ld * 2 ) } ) ` ),Pd=cd.node().getBBox(),{shapeSvg:cd,bbox:Pd}}__name(textHelper,"textHelper");async function addText(Ra,qa,nd,od=[]){const ld=Ra.insert("g").attr("class","label").attr("style",od.join("; ")),ud=getConfig $ 1();let cd="useHtmlLabels"in qa?qa.useHtmlLabels:evaluate(ud.htmlLabels)??!0,dd="";"text"in qa?dd=qa.text:dd=qa.label,!cd&&dd.startsWith(" \\ ")&&(dd=dd.substring(1)),hasKatex(dd)&&(cd=!0);const pd=await createText(ld,sanitizeText3(decodeEntities(dd)),{width:calculateTextWidth(dd,ud)+50,classes:"markdown-node-label",useHtmlLabels:cd},ud);let fd,md=1;if(cd){const vd=pd.children[0],Ad=select(pd);md=vd.innerHTML.split("<br>").length,vd.innerHTML.includes("</math>")&&(md+=vd.innerHTML.split("<mrow>").length-1);const Nd=vd.getElementsByTagName("img");if(Nd){const Id=dd.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...Nd].map(Od=>new Promise(Fd=>{function Pd(){var Md;if(Od.style.display="flex",Od.style.flexDirection="column",Id){const Bd=((Md=ud.fontSize)==null?void 0:Md.toString())??window.getComputedStyle(document.body).fontSize,Hd=parseInt(Bd,10)*5+"px";Od.style.minWidth=Hd,Od.style.maxWidth=Hd}else Od.style.width="100%";Fd(Od)}__name(Pd,"setupImage"),setTimeout(()=>{Od.complete&&Pd()}),Od.addEventListener("error",Pd),Od.addEventListener("load",Pd)})))}fd=vd.getBoundingClientRect(),Ad.attr("width",fd.width),Ad.attr("height",fd.height)}else{od.includes("font-weight: bolder")&&select(pd).selectAll("tspan").attr("font-weight",""),md=pd.children.length;const vd=pd.children[0];(pd.textContent===""||pd.textContent.includes(">"))&&(vd.textContent=dd[0]+dd.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),dd[1]===" "&&(vd.textContent=vd.textContent[0]+" "+vd.textContent.substring(1))),vd.textContent==="undefined"&&(vd.textContent=""),fd=pd.getBBox()}return ld.attr("transform","translate(0,"+(-fd.height/(2*md)+nd)+")"),fd.height}__name(addText,"addText");async function classBox(Ra,qa){var Wd,Jd;const nd=getConfig2(),od=nd.class.padding??12,ld=od,ud=qa.useHtmlLabels??evaluate(nd.htmlLabels)??!0,cd=qa;cd.annotations=cd.annotations??[],cd.members=cd.members??[],cd.methods=cd.methods??[];const{shapeSvg:dd,bbox:pd}=await textHelper(Ra,qa,nd,ud,ld),{labelStyles:fd,nodeSty
2024-11-27 11:30:55 +08:00
outsidePoint : $ { JSON . stringify ( qa ) }
2024-11-28 09:28:59 +08:00
insidePoint : $ { JSON . stringify ( nd ) }
2024-12-08 09:17:51 +08:00
node : x : $ { Ra . x } y : $ { Ra . y } w : $ { Ra . width } h : $ { Ra . height } ` );const od=Ra.x,ld=Ra.y,ud=Math.abs(od-nd.x),cd=Ra.width/2;let dd=nd.x<qa.x?cd-ud:cd+ud;const pd=Ra.height/2,fd=Math.abs(qa.y-nd.y),md=Math.abs(qa.x-nd.x);if(Math.abs(ld-qa.y)*cd>Math.abs(od-qa.x)*pd){let vd=nd.y<qa.y?qa.y-pd-ld:ld-pd-qa.y;dd=md*vd/fd;const Ad={x:nd.x<qa.x?nd.x+dd:nd.x-md+dd,y:nd.y<qa.y?nd.y+fd-vd:nd.y-fd+vd};return dd===0&&(Ad.x=qa.x,Ad.y=qa.y),md===0&&(Ad.x=qa.x),fd===0&&(Ad.y=qa.y),log $ 1.debug( ` abc89 top / bottom calc , Q $ { fd } , q $ { vd } , R $ { md } , r $ { dd } ` ,Ad),Ad}else{nd.x<qa.x?dd=qa.x-cd-od:dd=od-cd-qa.x;let vd=fd*dd/md,Ad=nd.x<qa.x?nd.x+md-dd:nd.x-md+dd,Nd=nd.y<qa.y?nd.y+vd:nd.y-vd;return log $ 1.debug( ` sides calc abc89 , Q $ { fd } , q $ { vd } , R $ { md } , r $ { dd } ` ,{_x:Ad,_y:Nd}),dd===0&&(Ad=qa.x,Nd=qa.y),md===0&&(Ad=qa.x),fd===0&&(Nd=qa.y),{x:Ad,y:Nd}}},"intersection"),cutPathAtIntersect=__name((Ra,qa)=>{log $ 1.warn("abc88 cutPathAtIntersect",Ra,qa);let nd=[],od=Ra[0],ld=!1;return Ra.forEach(ud=>{if(log $ 1.info("abc88 checking point",ud,qa),!outsideNode(qa,ud)&&!ld){const cd=intersection(qa,od,ud);log $ 1.debug("abc88 inside",ud,od,cd),log $ 1.debug("abc88 intersection",cd,qa);let dd=!1;nd.forEach(pd=>{dd=dd||pd.x===cd.x&&pd.y===cd.y}),nd.some(pd=>pd.x===cd.x&&pd.y===cd.y)?log $ 1.warn("abc88 no intersect",cd,nd):nd.push(cd),ld=!0}else log $ 1.warn("abc88 outside",ud,od),od=ud,ld||nd.push(ud)}),log $ 1.debug("returning points",nd),nd},"cutPathAtIntersect");function extractCornerPoints(Ra){const qa=[],nd=[];for(let od=1;od<Ra.length-1;od++){const ld=Ra[od-1],ud=Ra[od],cd=Ra[od+1];(ld.x===ud.x&&ud.y===cd.y&&Math.abs(ud.x-cd.x)>5&&Math.abs(ud.y-ld.y)>5||ld.y===ud.y&&ud.x===cd.x&&Math.abs(ud.x-ld.x)>5&&Math.abs(ud.y-cd.y)>5)&&(qa.push(ud),nd.push(od))}return{cornerPoints:qa,cornerPointPositions:nd}}__name(extractCornerPoints,"extractCornerPoints");var findAdjacentPoint=__name(function(Ra,qa,nd){const od=qa.x-Ra.x,ld=qa.y-Ra.y,ud=Math.sqrt(od*od+ld*ld),cd=nd/ud;return{x:qa.x-cd*od,y:qa.y-cd*ld}},"findAdjacentPoint"),fixCorners=__name(function(Ra){const{cornerPointPositions:qa}=extractCornerPoints(Ra),nd=[];for(let od=0;od<Ra.length;od++)if(qa.includes(od)){const ld=Ra[od-1],ud=Ra[od+1],cd=Ra[od],dd=findAdjacentPoint(ld,cd,5),pd=findAdjacentPoint(ud,cd,5),fd=pd.x-dd.x,md=pd.y-dd.y;nd.push(dd);const vd=Math.sqrt(2)*2;let Ad={x:cd.x,y:cd.y};if(Math.abs(ud.x-ld.x)>10&&Math.abs(ud.y-ld.y)>=10){log $ 1.debug("Corner point fixing",Math.abs(ud.x-ld.x),Math.abs(ud.y-ld.y));const Nd=5;cd.x===dd.x?Ad={x:fd<0?dd.x-Nd+vd:dd.x+Nd-vd,y:md<0?dd.y-vd:dd.y+vd}:Ad={x:fd<0?dd.x-vd:dd.x+vd,y:md<0?dd.y-Nd+vd:dd.y+Nd-vd}}else log $ 1.debug("Corner point skipping fixing",Math.abs(ud.x-ld.x),Math.abs(ud.y-ld.y));nd.push(Ad,pd)}else nd.push(Ra[od]);return nd},"fixCorners"),insertEdge=__name(function(Ra,qa,nd,od,ld,ud,cd){const{handDrawnSeed:dd}=getConfig2();let pd=qa.points,fd=!1;const md=ld;var vd=ud;vd.intersect&&md.intersect&&(pd=pd.slice(1,qa.points.length-1),pd.unshift(md.intersect(pd[0])),log $ 1.debug("Last point APA12",qa.start,"-->",qa.end,pd[pd.length-1],vd,vd.intersect(pd[pd.length-1])),pd.push(vd.intersect(pd[pd.length-1]))),qa.toCluster&&(log $ 1.info("to cluster abc88",nd.get(qa.toCluster)),pd=cutPathAtIntersect(qa.points,nd.get(qa.toCluster).node),fd=!0),qa.fromCluster&&(log $ 1.debug("from cluster abc88",nd.get(qa.fromCluster),JSON.stringify(pd,null,2)),pd=cutPathAtIntersect(pd.reverse(),nd.get(qa.fromCluster).node).reverse(),fd=!0);let Ad=pd.filter(zd=>!Number.isNaN(zd.y));Ad=fixCorners(Ad);let Nd=curveBasis;qa.curve&&(Nd=qa.curve);const{x:Id,y:Od}=getLineFunctionsWithOffset(qa),Fd=line $ 1().x(Id).y(Od).curve(Nd);let Pd;switch(qa.thickness){case"normal":Pd="edge-thickness-normal";break;case"thick":Pd="edge-thickness-thick";break;case"invisible":Pd="edge-thickness-invisible";break;default:Pd="edge-thickness-normal"}switch(qa.pattern){case"solid":Pd+=" edge-pattern-solid";break;case"dotted":Pd+=" edge-pattern-dotted";break;case"dashed":Pd+=" edge-pattern-dashed";break;default:Pd+=" edge-pattern-solid"}let Md,Bd=Fd(Ad);const jd=Array.isArray(qa.style)?qa.style:[qa.style];if(qa.look==="ha
` );const od=selectSvgElement(qa),ld=od.append("g");od.attr("viewBox","0 0 2412 512"),configureSvgSize(od,100,512,!0),ld.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),ld.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),ld.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),ld.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),ld.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),ld.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),ld.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),ld.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text( ` mermaid version $ { nd } ` )},"draw"),renderer={draw},errorRenderer_default=renderer,diagram={db:{},renderer,parser:{parse:__name(()=>{},"parse")}},errorDiagram_default=diagram,id18="flowchart-elk",detector18=__name((Ra,qa={})=>{var nd;return/^ \s *flowchart-elk/.test(Ra)||/^ \s *flowchart|graph/.test(Ra)&&((nd=qa==null?void 0:qa.flowchart)==null?void 0:nd.defaultRenderer)==="elk"?(qa.layout="elk",!0):!1},"detector"),loader18=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./flowDiagram-7ASYPVHJ-BDuUl95E.js");return{diagram:qa}},__vite__mapDeps([7,8,9]));return{id:id18,diagram:Ra}},"loader"),plugin16={id:id18,detector:detector18,loader:loader18},detector_default=plugin16,id19="timeline",detector19=__name(Ra=>/^ \s *timeline/.test(Ra),"detector"),loader19=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./timeline-definition-U7ZMHBDA-LHCGhwxr.js");return{diagram:qa}},__vite__mapDeps([33,20]));return{id:id19,diagram:Ra}},"loader"),plugin17={id:id19,detector:detector19,loader:loader19},detector_default2=plugin17,id20="mindmap",detector20=__name(Ra=>/^ \s *mindmap/.test(Ra),"detector"),loader20=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./mindmap-definition-GWI6TPTV-DSsFb0X4.js");return{diagram:qa}},__vite__mapDeps([34,35]));return{id:id20,diagram:Ra}},"loader"),plugin18={id:id20,detector:detector20,loader:loader20},detector_default3=plugin18,id21="kanban",detector21=__name(Ra=>/^ \s *kanban/.test(Ra),"detector"),loader21=__name(async()=>{const{diagram:Ra}=await __vitePreload(async()=>{const{diagram:qa}=await import("./kanban-definition-QRCXZQQD-BOsc5aHQ.js");return{diagram:qa}},[]);return{id:id21,diagram:Ra}},"loader"),plugin19={id:id21,detector:detector21,loader:loader21},detector_default4=plugin19,id22="sankey",detector22=__name(Ra=>/^ \s *sankey-beta/.test(Ra),"detector"),loader22=__name(async()=>{con
2024-11-28 09:28:59 +08:00
` ;try{getDiagram(ld)}catch{const vd=getDiagramLoader(ld);if(!vd)throw new UnknownDiagramError( ` Diagram $ { ld } not found . ` );const{id:Ad,diagram:Nd}=await vd();registerDiagram(Ad,Nd)}const{db:ud,parser:cd,renderer:dd,init:pd}=getDiagram(ld);return cd.parser&&(cd.parser.yy=ud),(fd=ud.clear)==null||fd.call(ud),pd==null||pd(od),nd.title&&((md=ud.setDiagramTitle)==null||md.call(ud,nd.title)),await cd.parse(qa),new m1(ld,qa,ud,cd,dd)}async render(qa,nd){await this.renderer.draw(this.text,qa,nd,this)}getParser(){return this.parser}getType(){return this.type}},__name(m1,"Diagram"),m1),interactionFunctions=[],attachFunctions=__name(()=>{interactionFunctions.forEach(Ra=>{Ra()}),interactionFunctions=[]},"attachFunctions"),cleanupComments=__name(Ra=>Ra.replace(/^ \s *%%(?!{)[^ \n ]+ \n ?/gm,"").trimStart(),"cleanupComments");function extractFrontMatter(Ra){const qa=Ra.match(frontMatterRegex);if(!qa)return{text:Ra,metadata:{}};let nd=load(qa[1],{schema:JSON_SCHEMA})??{};nd=typeof nd=="object"&&!Array.isArray(nd)?nd:{};const od={};return nd.displayMode&&(od.displayMode=nd.displayMode.toString()),nd.title&&(od.title=nd.title.toString()),nd.config&&(od.config=nd.config),{text:Ra.slice(qa[0].length),metadata:od}}__name(extractFrontMatter,"extractFrontMatter");var cleanupText=__name(Ra=>Ra.replace(/ \r \n ?/g, `
` ).replace(/<( \w +)([^>]*)>/g,(qa,nd,od)=>"<"+nd+od.replace(/="([^"]*)"/g,"=' $ 1'")+">"),"cleanupText"),processFrontmatter=__name(Ra=>{const{text:qa,metadata:nd}=extractFrontMatter(Ra),{displayMode:od,title:ld,config:ud={}}=nd;return od&&(ud.gantt||(ud.gantt={}),ud.gantt.displayMode=od),{title:ld,config:ud,text:qa}},"processFrontmatter"),processDirectives=__name(Ra=>{const qa=utils_default.detectInit(Ra)??{},nd=utils_default.detectDirective(Ra,"wrap");return Array.isArray(nd)?qa.wrap=nd.some(({type:od})=>od==="wrap"):(nd==null?void 0:nd.type)==="wrap"&&(qa.wrap=!0),{text:removeDirectives(Ra),directive:qa}},"processDirectives");function preprocessDiagram(Ra){const qa=cleanupText(Ra),nd=processFrontmatter(qa),od=processDirectives(nd.text),ld=cleanAndMerge(nd.config,od.directive);return Ra=cleanupComments(od.text),{code:Ra,title:nd.title,config:ld}}__name(preprocessDiagram,"preprocessDiagram");function toBase64(Ra){const qa=new TextEncoder().encode(Ra),nd=Array.from(qa,od=>String.fromCodePoint(od)).join("");return btoa(nd)}__name(toBase64,"toBase64");var MAX_TEXTLENGTH=5e4,MAX_TEXTLENGTH_EXCEEDED_MSG="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",SECURITY_LVL_SANDBOX="sandbox",SECURITY_LVL_LOOSE="loose",XMLNS_SVG_STD="http://www.w3.org/2000/svg",XMLNS_XLINK_STD="http://www.w3.org/1999/xlink",XMLNS_XHTML_STD="http://www.w3.org/1999/xhtml",IFRAME_WIDTH="100%",IFRAME_HEIGHT="100%",IFRAME_STYLES="border:0;margin:0;",IFRAME_BODY_STYLE="margin:0",IFRAME_SANDBOX_OPTS="allow-top-navigation-by-user-activation allow-popups",IFRAME_NOT_SUPPORTED_MSG='The "iframe" tag is not supported by your browser.',DOMPURIFY_TAGS=["foreignobject"],DOMPURIFY_ATTR=["dominant-baseline"];function processAndSetConfigs(Ra){const qa=preprocessDiagram(Ra);return reset(),addDirective(qa.config??{}),qa}__name(processAndSetConfigs,"processAndSetConfigs");async function parse(Ra,qa){addDiagrams();try{const{code:nd,config:od}=processAndSetConfigs(Ra);return{diagramType:(await getDiagramFromText(nd)).type,config:od}}catch(nd){if(qa!=null&&qa.suppressErrors)return!1;throw nd}}__name(parse,"parse");var cssImportantStyles=__name((Ra,qa,nd=[])=> `
. $ { Ra } $ { qa } { $ { nd . join ( " !important; " ) } ! important ; } ` ,"cssImportantStyles"),createCssStyles=__name((Ra,qa=new Map)=>{var od;let nd="";if(Ra.themeCSS!==void 0&&(nd+= `
$ { Ra . themeCSS } ` ),Ra.fontFamily!==void 0&&(nd+= `
: root { -- mermaid - font - family : $ { Ra . fontFamily } } ` ),Ra.altFontFamily!==void 0&&(nd+= `
: root { -- mermaid - alt - font - family : $ { Ra . altFontFamily } } ` ),qa instanceof Map){const dd=Ra.htmlLabels??((od=Ra.flowchart)==null?void 0:od.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];qa.forEach(pd=>{isEmpty $ 1(pd.styles)||dd.forEach(fd=>{nd+=cssImportantStyles(pd.id,fd,pd.styles)}),isEmpty $ 1(pd.textStyles)||(nd+=cssImportantStyles(pd.id,"tspan",((pd==null?void 0:pd.textStyles)||[]).map(fd=>fd.replace("color","fill"))))})}return nd},"createCssStyles"),createUserStyles=__name((Ra,qa,nd,od)=>{const ld=createCssStyles(Ra,nd),ud=styles_default(qa,ld,Ra.themeVariables);return serialize(compile( ` $ { od } { $ { ud } } ` ),stringify $ 1)},"createUserStyles"),cleanUpSvgCode=__name((Ra="",qa,nd)=>{let od=Ra;return!nd&&!qa&&(od=od.replace(/marker-end="url \( [ \d +./:=?A-Za-z-]*?#/g,'marker-end="url(#')),od=decodeEntities(od),od=od.replace(/<br>/g,"<br/>"),od},"cleanUpSvgCode"),putIntoIFrame=__name((Ra="",qa)=>{var ld,ud;const nd=(ud=(ld=qa==null?void 0:qa.viewBox)==null?void 0:ld.baseVal)!=null&&ud.height?qa.viewBox.baseVal.height+"px":IFRAME_HEIGHT,od=toBase64( ` < body style = "${IFRAME_BODY_STYLE}" > $ { Ra } < / b o d y > ` ) ; r e t u r n ` < i f r a m e s t y l e = " w i d t h : $ { I F R A M E _ W I D T H } ; h e i g h t : $ { n d } ; $ { I F R A M E _ S T Y L E S } " s r c = " d a t a : t e x t / h t m l ; c h a r s e t = U T F - 8 ; b a s e 6 4 , $ { o d } " s a n d b o x = " $ { I F R A M E _ S A N D B O X _ O P T S } " >
2024-09-18 09:46:23 +08:00
$ { IFRAME _NOT _SUPPORTED _MSG }
2024-12-08 09:17:51 +08:00
< / i f r a m e > ` } , " p u t I n t o I F r a m e " ) , a p p e n d D i v S v g G = _ _ n a m e ( ( R a , q a , n d , o d , l d ) = > { c o n s t u d = R a . a p p e n d ( " d i v " ) ; u d . a t t r ( " i d " , n d ) , o d & & u d . a t t r ( " s t y l e " , o d ) ; c o n s t c d = u d . a p p e n d ( " s v g " ) . a t t r ( " i d " , q a ) . a t t r ( " w i d t h " , " 1 0 0 % " ) . a t t r ( " x m l n s " , X M L N S _ S V G _ S T D ) ; r e t u r n l d & & c d . a t t r ( " x m l n s : x l i n k " , l d ) , c d . a p p e n d ( " g " ) , R a } , " a p p e n d D i v S v g G " ) ; f u n c t i o n s a n d b o x e d I f r a m e ( R a , q a ) { r e t u r n R a . a p p e n d ( " i f r a m e " ) . a t t r ( " i d " , q a ) . a t t r ( " s t y l e " , " w i d t h : 1 0 0 % ; h e i g h t : 1 0 0 % ; " ) . a t t r ( " s a n d b o x " , " " ) } _ _ n a m e ( s a n d b o x e d I f r a m e , " s a n d b o x e d I f r a m e " ) ; v a r r e m o v e E x i s t i n g E l e m e n t s = _ _ n a m e ( ( R a , q a , n d , o d ) = > { v a r l d , u d , c d ; ( l d = R a . g e t E l e m e n t B y I d ( q a ) ) = = n u l l | | l d . r e m o v e ( ) , ( u d = R a . g e t E l e m e n t B y I d ( n d ) ) = = n u l l | | u d . r e m o v e ( ) , ( c d = R a . g e t E l e m e n t B y I d ( o d ) ) = = n u l l | | c d . r e m o v e ( ) } , " r e m o v e E x i s t i n g E l e m e n t s " ) , r e n d e r = _ _ n a m e ( a s y n c f u n c t i o n ( R a , q a , n d ) { v a r _ f , v f , S f , g f , b f , T f ; a d d D i a g r a m s ( ) ; c o n s t o d = p r o c e s s A n d S e t C o n f i g s ( q a ) ; q a = o d . c o d e ; c o n s t l d = g e t C o n f i g $ 1 ( ) ; l o g $ 1 . d e b u g ( l d ) , q a . l e n g t h > ( ( l d = = n u l l ? v o i d 0 : l d . m a x T e x t S i z e ) ? ? M A X _ T E X T L E N G T H ) & & ( q a = M A X _ T E X T L E N G T H _ E X C E E D E D _ M S G ) ; c o n s t u d = " # " + R a , c d = " i " + R a , d d = " # " + c d , p d = " d " + R a , f d = " # " + p d , m d = _ _ n a m e ( ( ) = > { c o n s t K f = s e l e c t ( A d ? d d : f d ) . n o d e ( ) ; K f & & " r e m o v e " i n K f & & K f . r e m o v e ( ) } , " r e m o v e T e m p E l e m e n t s " ) ; l e t v d = s e l e c t ( " b o d y " ) ; c o n s t A d = l d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ S A N D B O X , N d = l d . s e c u r i t y L e v e l = = = S E C U R I T Y _ L V L _ L O O S E , I d = l d . f o n t F a m i l y ; i f ( n d ! = = v o i d 0 ) { i f ( n d & & ( n d . i n n e r H T M L = " " ) , A d ) { c o n s t M f = s a n d b o x e d I f r a m e ( s e l e c t ( n d ) , c d ) ; v d = s e l e c t ( M f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , v d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e v d = s e l e c t ( n d ) ; a p p e n d D i v S v g G ( v d , R a , p d , ` f o n t - f a m i l y : $ { I d } ` , X M L N S _ X L I N K _ S T D ) } e l s e { i f ( r e m o v e E x i s t i n g E l e m e n t s ( d o c u m e n t , R a , p d , c d ) , A d ) { c o n s t M f = s a n d b o x e d I f r a m e ( s e l e c t ( " b o d y " ) , c d ) ; v d = s e l e c t ( M f . n o d e s ( ) [ 0 ] . c o n t e n t D o c u m e n t . b o d y ) , v d . n o d e ( ) . s t y l e . m a r g i n = 0 } e l s e v d = s e l e c t ( " b o d y " ) ; a p p e n d D i v S v g G ( v d , R a , p d ) } l e t O d , F d ; t r y { O d = a w a i t D i a g r a m . f r o m T e x t ( q a , { t i t l e : o d . t i t l e } ) } c a t c h ( M f ) { i f ( l d . s u p p r e s s E r r o r R e n d e r i n g ) t h r o w m d ( ) , M f ; O d = a w a i t D i a g r a m . f r o m T e x t ( " e r r o r " ) , F d = M f } c o n s t P d = v d . s e l e c t ( f d ) . n o d e ( ) , M d = O d . t y p e , B d = P d . f i r s t C h i l d , j d = B d . f i r s t C h i l d , H d = ( v f = ( _ f = O d . r e n d e r e r ) . g e t C l a s s e s ) = = n u l l ? v o i d 0 : v f . c a l l ( _ f , q a , O d ) , G d = c r e a t e U s e r S t y l e s ( l d , M d , H d , u d ) , z d = d o c u m e n t . c r e a t e E l e m e n t ( " s t y l e " ) ; z d . i n n e r H T M L = G d , B d . i n s e r t B e f o r e ( z d , j d ) ; t r y { a w a i t O d . r e n d e r e r . d r a w ( q a , R a , v e r s i o n , O d ) } c a t c h ( M f ) { t h r o w l d . s u p p r e s s E r r o r R e n d e r i n g ? m d ( ) : e r r o r R e n d e r e r _ d e f a u l t . d r a w ( q a , R a , v e r s i o n ) , M f } c o n s t d f = v d . s e l e c t ( ` $ { f d } s v g ` ) , W d = ( g f = ( S f = O d . d b ) . g e t A c c T i t l e ) = = n u l l ? v o i d 0 : g f . c a l l ( S f ) , J d = ( T f = ( b f = O d . d b ) . g e t A c c D e s c r i p t i o n ) = = n u l l ? v o i d 0 : T f . c a l l ( b f ) ; a d d A 1 1 y I n f o ( M d , d f , W d , J d ) , v d . s e l e c t ( ` [ i d = " $ { R a } " ] ` ) . s e l e c t A l l ( " f o r e i g n o b j e c t > * " ) . a t t r ( " x m l n s " , X M L N S _ X H T M L _ S T D ) ; l e t X d = v d . s e l e c t ( f d ) . n o d e ( ) . i n n e r H T M L ; i f ( l o g $ 1 . d e b u g ( " c o n f i g . a r r o w M a r k e r A b s o l u t e " , l d . a r r o w M a r k e r A b s o l u t e ) , X d = c l e a n U p S v g C o d e ( X d , A d , e v a l u a t e ( l d . a r r o w M a r k e r A b s o l u t e ) ) , A d ) { c o n s t M f = v d . s e l e c t ( f d + " s v g " ) . n o d e ( ) ; X d = p u t I n t o I F r a m e ( X d , M f ) } e l s e N d | | ( X d = p u r i f y . s a n i t i z e ( X d , { A D D _ T A G S : D O M P U R I F Y _ T A G S , A D D _ A T T R : D O M P U R I F Y _ A T T R , H T M L _ I N T E G R A T I O N _ P O I N T S : { f o r e i g n o b j e c t : ! 0 } } ) ) ; i f ( a t t a c h F u n c t i o n s ( ) , F d ) t h r o w F d ; r e t u r n m d ( ) , { d i a g r a m T y p e : M d , s v g : X d , b i n d F u n c t i o n s : O d . d b . b i n d F u n c t i o n s } } , " r e n d e r " ) ; f u n c t i o n i n i t i a l i z e ( R a = { } ) { v a r o d ; c o n s t q a = a s s i g n W i t h D e p t h _ d e f a u l t ( { } , R a ) ; q a ! = n u l l & & q a . f o n t F a m i l y & & ! ( ( o d = q a . t h e m e V a r i a b l e s ) ! = n u l l & & o d . f o n t F a m i l y ) & & ( q a . t h e m e V a r i a b l e s | | ( q a . t h e m e V a r i a b l e s = { } ) , q a . t h e m e V a r i a b l e s . f o n t F a m i l y = q a . f o n t F a m i l y ) , s a v e C o n f i g F r o m I n i t i a l i z e ( q a ) , q a ! = n u l l & & q a . t h e m e & & q a . t h e m e i n t h e m e s _ d e f a u l t ? q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t [ q a . t h e m e ] . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) : q a & & ( q a . t h e m e V a r i a b l e s = t h e m e s _ d e f a u l t . d e f a u l t . g e t T h e m e V a r i a b l e s ( q a . t h e m e V a r i a b l e s ) ) ; c o n s t n d = t y p e o f q a = = " o b j e c t " ? s e t S i t e C o n f i g ( q a ) : g e t S i t e C o n f i g ( ) ; s e t L o g L e v e l ( n d . l o g L e v e l ) , a d d D i a g r a m s ( ) } _ _ n a m e ( i n i t i a l i z e , " i n i t i a l i z e " ) ; v a r g e t D i a g r a m F r o m T e x t = _ _ n a m e ( ( R a , q a = { } ) = > { c o n s t { c o d e : n d } = p r e p r o c e s s D i a g r a m ( R a ) ; r e t u r n D i a g r a m . f r o m T e x t ( n d , q a ) } , " g e t D i a g r a m F r o m T e x t " ) ; f u n c t i o n a d d A 1 1 y I n f o ( R a , q a , n d , o d ) { s e t A 1 1 y D i a g r a m I n f o ( q a , R a ) , a d d S V G a 1 1 y T i t l e D e s c r i p t i o n ( q a , n d , o d , q a . a t t r ( " i d " ) ) } _ _ n a m e ( a d d A 1 1 y I n f o , " a d d A 1 1 y I n f o " ) ; v a r m e r m a i d A P I = O b j e c t . f r e e z e ( { r e n d e r , p a r s e , g e t D i a g r a m F r o m T e x t , i n i t i a l i z e , g e t C o n f i g : g e t C o n f i g $ 1 , s e t C o n f i g , g e t S i t e C o n f i g , u p d a t e S i t e C o n f i g , r e s e t : _ _ n a m e ( ( ) = > { r e s e t ( ) } , " r e s e t " ) , g l o b a l R e s e t : _ _ n a m e ( ( ) = > { r e s e t ( d e f a u l t C o n f i g ) } , " g l o b a l R e s e t " ) , d e f a u l
2024-09-18 09:46:23 +08:00
* Wait for document loaded before starting the execution
2024-11-28 09:28:59 +08:00
* /function markedAlert(Ra={}){const{className:qa="markdown-alert",variants:nd=[]}=Ra,od=resolveVariants(nd);return{walkTokens(ld){var cd,dd,pd,fd;if(ld.type!=="blockquote")return;const ud=od.find(({type:md})=>new RegExp(createSyntaxPattern(md),"i").test(ld.text));if(ud){const{type:md,icon:vd,title:Ad=ucfirst(md),titleClassName:Nd=`${qa}-title`}=ud,Id=new RegExp(createSyntaxPattern(md),"i"),{styles:Od}=Ra;Object.assign(ld,{type:"alert",meta:{className:qa,variant:md,icon:vd,title:Ad,titleClassName:Nd,wrapperStyle:{...Od==null?void 0:Od.blockquote,...Od==null?void 0:Od[`blockquote_${md}`]},titleStyle:{...Od==null?void 0:Od.blockquote_title,...Od==null?void 0:Od[`blockquote_title_${md}`]},contentStyle:{...Od==null?void 0:Od.blockquote_p,...Od==null?void 0:Od[`blockquote_p_${md}`]}}});const Fd=(cd=ld.tokens)==null?void 0:cd[0];if((dd=Fd.raw)==null?void 0:dd.replace(Id,"").trim()){const Md=Fd.tokens[0];Object.assign(Md,{raw:Md.raw.replace(Id,""),text:Md.text.replace(Id,"")}),((pd=Fd.tokens[1])==null?void 0:pd.type)==="br"&&Fd.tokens.splice(1,1)}else(fd=ld.tokens)==null||fd.shift()}},extensions:[{name:"alert",level:"block",renderer({meta:ld,tokens:ud=[]}){var pd;let cd=this.parser.parse(ud);cd=cd.replace(/ < p . * ? > / g , ` < p s t y l e = " $ { g e t S t y l e S t r i n g ( l d . c o n t e n t S t y l e ) } " > ` ) ; l e t d d = ` < b l o c k q u o t e c l a s s = " $ { l d . c l a s s N a m e } $ { l d . c l a s s N a m e } - $ { l d . v a r i a n t } " s t y l e = " $ { g e t S t y l e S t r i n g ( l d . w r a p p e r S t y l e ) } " >
` ;return dd+= ` < p class = "${ld.titleClassName}" style = "${getStyleString(ld.titleStyle)}" > ` ,dd+=ld.icon.replace("<svg", ` < svg style = "fill: ${((pd=ld.titleStyle)==null?void 0:pd.color)??" inherit "}" ` ),dd+=ld.title,dd+= ` < / p >
` ,dd+=cd,dd+= ` < / b l o c k q u o t e >
` ,dd}}]}}const defaultAlertVariant=[{type:"note",icon:'<svg class="octicon octicon-info" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},{type:"tip",icon:'<svg class="octicon octicon-light-bulb" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>'},{type:"important",icon:'<svg class="octicon octicon-report" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"warning",icon:'<svg class="octicon octicon-alert" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>'},{type:"caution",icon:'<svg class="octicon octicon-stop" style="margin-right: 0.25em;" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'}];function resolveVariants(Ra){return Ra.length?Object.values([...defaultAlertVariant,...Ra].reduce((qa,nd)=>(qa[nd.type]=nd,qa),{})):defaultAlertVariant}function createSyntaxPattern(Ra){return ` ^ ( ? : \ \ [ ! $ { Ra } ] ) \ \ s * ?
* ` }function ucfirst(Ra){return Ra.slice(0,1).toUpperCase()+Ra.slice(1).toLowerCase()}const inlineRule=/^( \$ {1,2})(?! \$ )((?: \\ .|[^ \\ \n ])*?(?: \\ .|[^ \\ \n $ ])) \1 (?=[ \s ?!.,:?!。,:]| $ )/,inlineRuleNonStandard=/^( \$ {1,2})(?! \$ )((?: \\ .|[^ \\ \n ])*?(?: \\ .|[^ \\ \n $ ])) \1 /,blockRule=/^( \$ {1,2}) \n ((?: \\ [ \s \S ]|[^ \\ ])+?) \n \1 (?: \n | $ )/;function createRenderer(Ra){return qa=>{window.MathJax.texReset();const od=window.MathJax.tex2svg(qa.text,{display:Ra}).firstChild,ld=od.style["min-width"]||od.getAttribute("width");return od.removeAttribute("width"),od.style="max-width: 300vw !important;",od.style.width=ld,od.style.display="initial",Ra? ` < section style = "text-align: center; overflow: auto;" > $ { od . outerHTML } < / s e c t i o n > ` : ` < s p a n s t y l e = " v e r t i c a l - a l i g n : m i d d l e ; l i n e - h e i g h t : 1 ; " > $ { o d . o u t e r H T M L } < / s p a n > ` } } f u n c t i o n i n l i n e K a t e x ( R a , q a ) { c o n s t n d = R a & & R a . n o n S t a n d a r d , o d = n d ? i n l i n e R u l e N o n S t a n d a r d : i n l i n e R u l e ; r e t u r n { n a m e : " i n l i n e K a t e x " , l e v e l : " i n l i n e " , s t a r t ( l d ) { l e t u d , c d = l d ; f o r ( ; c d ; ) { i f ( u d = c d . i n d e x O f ( " $ " ) , u d = = = - 1 ) r e t u r n ; i f ( ( n d ? u d > - 1 : u d = = = 0 | | c d . c h a r A t ( u d - 1 ) = = = " " ) & & c d . s u b s t r i n g ( u d ) . m a t c h ( o d ) ) r e t u r n u d ; c d = c d . s u b s t r i n g ( u d + 1 ) . r e p l a c e ( / ^ \ $ + / , " " ) } } , t o k e n i z e r ( l d ) { c o n s t u d = l d . m a t c h ( o d ) ; i f ( u d ) r e t u r n { t y p e : " i n l i n e K a t e x " , r a w : u d [ 0 ] , t e x t : u d [ 2 ] . t r i m ( ) , d i s p l a y M o d e : u d [ 1 ] . l e n g t h = = = 2 } } , r e n d e r e r : q a } } f u n c t i o n b l o c k K a t e x ( R a , q a ) { r e t u r n { n a m e : " b l o c k K a t e x " , l e v e l : " b l o c k " , t o k e n i z e r ( n d ) { c o n s t o d = n d . m a t c h ( b l o c k R u l e ) ; i f ( o d ) r e t u r n { t y p e : " b l o c k K a t e x " , r a w : o d [ 0 ] , t e x t : o d [ 2 ] . t r i m ( ) , d i s p l a y M o d e : o d [ 1 ] . l e n g t h = = = 2 } } , r e n d e r e r : q a } } f u n c t i o n M D K a t e x ( R a = { } ) { r e t u r n { e x t e n s i o n s : [ i n l i n e K a t e x ( R a , c r e a t e R e n d e r e r ( ! 1 ) ) , b l o c k K a t e x ( R a , c r e a t e R e n d e r e r ( ! 0 ) ) ] } } m a r k e d $ 1 . u s e ( M D K a t e x ( { n o n S t a n d a r d : ! 0 } ) ) ; f u n c t i o n b u i l d T h e m e ( { t h e m e : R a , f o n t s : q a , s i z e : n d , i s U s e I n d e n t : o d } ) { c o n s t l d = c l o n e D e e p ( R a ) , u d = t o M e r g e d ( l d . b a s e , { " f o n t - f a m i l y " : q a , " f o n t - s i z e " : n d } ) ; o d & & ( l d . b l o c k . p = { " t e x t - i n d e n t " : " 2 e m " , . . . l d . b l o c k . p } ) ; c o n s t c d = d d = > O b j e c t . f r o m E n t r i e s ( O b j e c t . e n t r i e s ( d d ) . m a p ( ( [ p d , f d ] ) = > [ p d , t o M e r g e d ( u d , f d ) ] ) ) ; r e t u r n { . . . c d ( l d . i n l i n e ) , . . . c d ( l d . b l o c k ) } } f u n c t i o n b u i l d A d d i t i o n ( ) { r e t u r n `
2024-09-18 09:46:23 +08:00
< style >
. preview - wrapper pre : : before {
position : absolute ;
top : 0 ;
right : 0 ;
color : # ccc ;
text - align : center ;
font - size : 0.8 em ;
padding : 5 px 10 px 0 ;
line - height : 15 px ;
height : 15 px ;
font - weight : 600 ;
}
< / s t y l e >
2024-11-28 09:28:59 +08:00
` }function getStyles(Ra,qa,nd=""){const od=Ra[qa];return od? ` style = "${getStyleString(od)}${nd}" ` :""}function buildFootnoteArray(Ra){return Ra.map(([qa,nd,od])=>od===nd? ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code>: <i style="word-break: break-all">${nd}</i > < br / > ` : ` < code style = "font-size: 90%; opacity: 0.6;" > [ $ { qa } ] < /code> ${nd}: <i style="word-break: break-all">${od}</i > < br / > ` ).join( `
` )}function transform $ 1(Ra,qa,nd){const od=Ra.split("-");for(const ld of od){if(ld==="alt"&&qa)return qa;if(ld==="title"&&nd)return nd}return""}const macCodeSvg= `
2024-09-18 09:46:23 +08:00
< svg xmlns = "http://www.w3.org/2000/svg" version = "1.1" x = "0px" y = "0px" width = "45px" height = "13px" viewBox = "0 0 450 130" >
2024-11-22 15:41:57 +08:00
< ellipse cx = "50" cy = "65" rx = "50" ry = "52" stroke = "rgb(220,60,54)" stroke - width = "2" fill = "rgb(237,108,96)" / >
2024-09-18 09:46:23 +08:00
< ellipse cx = "225" cy = "65" rx = "50" ry = "52" stroke = "rgb(218,151,33)" stroke - width = "2" fill = "rgb(247,193,81)" / >
2024-11-22 15:41:57 +08:00
< ellipse cx = "400" cy = "65" rx = "50" ry = "52" stroke = "rgb(27,161,37)" stroke - width = "2" fill = "rgb(100,200,86)" / >
2024-09-18 09:46:23 +08:00
< / s v g >
2024-12-08 08:57:29 +08:00
` .trim();function initRenderer(Ra){const qa=[];let nd=0,od=buildTheme(Ra),ld=0,ud=0,cd=!1;function dd(Id,Od=""){return getStyles(od,Id,Od)}function pd(Id,Od,Fd){const Pd=Fd??Id;return ` < $ { Pd } $ { dd ( Id ) } > $ { Od } < /${Pd}>`}function fd(Id,Od){return qa.push([++nd,Id,Od]),nd}function md(Id){qa.length=0,nd=0,vd(Id)}function vd(Id){Ra={...Ra,...Id},od=buildTheme(Ra),marked$1.use(markedAlert({styles:od}))}const Ad=()=>qa.length?pd("h4","引用链接")+pd("footnotes",buildFootnoteArray(qa),"p"):"",Nd={heading({tokens:Id,depth:Od}){const Fd=this.parser.parseInline(Id),Pd=`h${Od}`;return pd(Pd,Fd)},paragraph({tokens:Id}){const Od=this.parser.parseInline(Id),Fd=Od.includes("<figure")&&Od.includes("<img"),Pd=Od.trim()==="";return Fd||Pd?Od:pd("p",Od)},blockquote({tokens:Id}){let Od=this.parser.parse(Id);return Od=Od.replace(/ < p . * ? > / g , ` < p $ { d d ( " b l o c k q u o t e _ p " ) } > ` ) , p d ( " b l o c k q u o t e " , O d ) } , c o d e ( { t e x t : I d , l a n g : O d = " " } ) { i f ( O d . s t a r t s W i t h ( " m e r m a i d " ) ) r e t u r n c l e a r T i m e o u t ( l d ) , l d = s e t T i m e o u t ( ( ) = > { m e r m a i d _ d e f a u l t . r u n ( ) } , 0 ) , ` < p r e c l a s s = " m e r m a i d " > $ { I d } < / p r e > ` ; c o n s t F d = O d . s p l i t ( " " ) [ 0 ] , P d = H i g h l i g h t J S . g e t L a n g u a g e ( F d ) ? F d : " p l a i n t e x t " ; l e t M d = H i g h l i g h t J S . h i g h l i g h t ( I d , { l a n g u a g e : P d } ) . v a l u e ; M d = M d . r e p l a c e ( / \ r \ n / g , " < b r / > " ) . r e p l a c e ( / \ n / g , " < b r / > " ) . r e p l a c e ( / ( > [ ^ < ] + ) | ( ^ [ ^ < ] + ) / g , H d = > H d . r e p l a c e ( / \ s / g , " & n b s p ; " ) ) ; c o n s t B d = ` < s p a n c l a s s = " m a c - s i g n " s t y l e = " p a d d i n g : 1 0 p x 1 4 p x 0 ; " h i d d e n > $ { m a c C o d e S v g } < / s p a n > ` , j d = ` < c o d e c l a s s = " l a n g u a g e - $ { O d } " $ { d d ( " c o d e " ) } > $ { M d } < / c o d e > ` ; r e t u r n ` < p r e c l a s s = " h l j s c o d e _ _ p r e " $ { d d ( " c o d e _ p r e " ) } > $ { B d } $ { j d } < / p r e > ` } , c o d e s p a n ( { t e x t : I d } ) { r e t u r n p d ( " c o d e s p a n " , I d , " c o d e " ) } , l i s t i t e m ( I d ) { c o n s t O d = c d ? ` $ { u d + 1 } . ` : " • " , F d = I d . t o k e n s . m a p ( P d = > t h i s [ P d . t y p e ] ( P d ) ) . j o i n ( " " ) ; r e t u r n p d ( " l i s t i t e m " , ` $ { O d } $ { F d } ` , " l i " ) } , l i s t ( { o r d e r e d : I d , i t e m s : O d , s t a r t : F d = 1 } ) { c o n s t P d = [ ] ; f o r ( l e t B d = 0 ; B d < O d . l e n g t h ; B d + + ) { c d = I d , u d = N u m b e r ( F d ) + B d - 1 ; c o n s t j d = O d [ B d ] ; P d . p u s h ( t h i s . l i s t i t e m ( j d ) ) } r e t u r n p d ( I d ? " o l " : " u l " , P d . j o i n ( " " ) ) } , i m a g e ( { h r e f : I d , t i t l e : O d , t e x t : F d } ) { c o n s t P d = p d ( " f i g c a p t i o n " , t r a n s f o r m $ 1 ( R a . l e g e n d , F d , O d ) ) , M d = d d ( " f i g u r e " ) , B d = d d ( " i m a g e " ) ; r e t u r n ` < f i g u r e $ { M d } > < i m g $ { B d } s r c = " $ { I d } " t i t l e = " $ { O d } " a l t = " $ { F d } " / > $ { P d } < / f i g u r e > ` } , l i n k ( { h r e f : I d , t i t l e : O d , t e x t : F d , t o k e n s : P d } ) { c o n s t M d = t h i s . p a r s e r . p a r s e I n l i n e ( P d ) ; i f ( I d . s t a r t s W i t h ( " h t t p s : / / m p . w e i x i n . q q . c o m " ) ) r e t u r n ` < a h r e f = " $ { I d } " t i t l e = " $ { O d | | F d } " $ { d d ( " w x _ l i n k " ) } > $ { M d } < / a > ` ; i f ( I d = = = F d ) r e t u r n M d ; i f ( R a . c i t e S t a t u s ) { c o n s t B d = f d ( O d | | F d , I d ) ; r e t u r n ` < s p a n $ { d d ( " l i n k " ) } > $ { M d } < s u p > [ $ { B d } ] < / s u p > < / s p a n > ` } r e t u r n p d ( " l i n k " , M d , " s p a n " ) } , s t r o n g ( { t o k e n s : I d } ) { r e t u r n p d ( " s t r o n g " , t h i s . p a r s e r . p a r s e I n l i n e ( I d ) ) } , e m ( { t o k e n s : I d } ) { r e t u r n p d ( " e m " , t h i s . p a r s e r . p a r s e I n l i n e ( I d ) , " s p a n " ) } , t a b l e ( { h e a d e r : I d , r o w s : O d } ) { c o n s t F d = I d . m a p ( M d = > t h i s . t a b l e c e l l ( M d ) ) . j o i n ( " " ) , P d = O d . m a p ( M d = > { c o n s t B d = M d . m a p ( j d = > t h i s . t a b l e c e l l ( j d ) ) . j o i n ( " " ) ; r e t u r n p d ( " t r " , B d ) } ) . j o i n ( " " ) ; r e t u r n `
2024-09-18 09:46:23 +08:00
< section style = "padding:0 8px; max-width: 100%; overflow: auto" >
< table class = "preview-table" >
2024-11-28 09:28:59 +08:00
< thead $ { dd ( "thead" ) } > $ { Fd } < / t h e a d >
< tbody > $ { Pd } < / t b o d y >
2024-09-18 09:46:23 +08:00
< / t a b l e >
< / s e c t i o n >
2024-12-08 09:17:51 +08:00
` },tablecell(Id){const Od=this.parser.parseInline(Id.tokens);return pd("td",Od)},hr(Id){return pd("hr","")}};return marked $ 1.use({renderer:Nd}),{buildAddition,buildFootnotes:Ad,setOptions:vd,reset:md}}function tryOnScopeDispose(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function toValue $ 2(Ra){return typeof Ra=="function"?Ra():unref(Ra)}const isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString $ 2=Object.prototype.toString,isObject $ 2=Ra=>toString $ 2.call(Ra)==="[object Object]",noop $ 3=()=>{};function createFilterWrapper(Ra,qa){function nd(...od){return new Promise((ld,ud)=>{Promise.resolve(Ra(()=>qa.apply(this,od),{fn:qa,thisArg:this,args:od})).then(ld).catch(ud)})}return nd}const bypassFilter=Ra=>Ra();function pausableFilter(Ra=bypassFilter){const qa=ref $ 1(!0);function nd(){qa.value=!1}function od(){qa.value=!0}const ld=(...ud)=>{qa.value&&Ra(...ud)};return{isActive:readonly(qa),pause:nd,resume:od,eventFilter:ld}}function getLifeCycleTarget(Ra){return getCurrentInstance()}function toRef(...Ra){if(Ra.length!==1)return toRef $ 1(...Ra);const qa=Ra[0];return typeof qa=="function"?readonly(customRef(()=>({get:qa,set:noop $ 3}))):ref $ 1(qa)}function watchWithFilter(Ra,qa,nd={}){const{eventFilter:od=bypassFilter,...ld}=nd;return watch(Ra,createFilterWrapper(od,qa),ld)}function watchPausable(Ra,qa,nd={}){const{eventFilter:od,...ld}=nd,{eventFilter:ud,pause:cd,resume:dd,isActive:pd}=pausableFilter(od);return{stop:watchWithFilter(Ra,qa,{...ld,eventFilter:ud}),pause:cd,resume:dd,isActive:pd}}function tryOnMounted(Ra,qa=!0,nd){getLifeCycleTarget()?onMounted(Ra,nd):qa?Ra():nextTick $ 1(Ra)}function useToggle(Ra=!1,qa={}){const{truthyValue:nd=!0,falsyValue:od=!1}=qa,ld=isRef(Ra),ud=ref $ 1(Ra);function cd(dd){if(arguments.length)return ud.value=dd,ud.value;{const pd=toValue $ 2(nd);return ud.value=ud.value===pd?toValue $ 2(od):pd,ud.value}}return ld?cd:[ud,cd]}const defaultWindow=isClient?window:void 0;function unrefElement(Ra){var qa;const nd=toValue $ 2(Ra);return(qa=nd==null?void 0:nd. $ el)!=null?qa:nd}function useEventListener(...Ra){let qa,nd,od,ld;if(typeof Ra[0]=="string"||Array.isArray(Ra[0])?([nd,od,ld]=Ra,qa=defaultWindow):[qa,nd,od,ld]=Ra,!qa)return noop $ 3;Array.isArray(nd)||(nd=[nd]),Array.isArray(od)||(od=[od]);const ud=[],cd=()=>{ud.forEach(md=>md()),ud.length=0},dd=(md,vd,Ad,Nd)=>(md.addEventListener(vd,Ad,Nd),()=>md.removeEventListener(vd,Ad,Nd)),pd=watch(()=>[unrefElement(qa),toValue $ 2(ld)],([md,vd])=>{if(cd(),!md)return;const Ad=isObject $ 2(vd)?{...vd}:vd;ud.push(...nd.flatMap(Nd=>od.map(Id=>dd(md,Nd,Id,Ad))))},{immediate:!0,flush:"post"}),fd=()=>{pd(),cd()};return tryOnScopeDispose(fd),fd}function useMounted(){const Ra=ref $ 1(!1),qa=getCurrentInstance();return qa&&onMounted(()=>{Ra.value=!0},qa),Ra}function useSupported(Ra){const qa=useMounted();return computed(()=>(qa.value,!!Ra()))}function useMediaQuery(Ra,qa={}){const{window:nd=defaultWindow}=qa,od=useSupported(()=>nd&&"matchMedia"in nd&&typeof nd.matchMedia=="function");let ld;const ud=ref $ 1(!1),cd=fd=>{ud.value=fd.matches},dd=()=>{ld&&("removeEventListener"in ld?ld.removeEventListener("change",cd):ld.removeListener(cd))},pd=watchEffect(()=>{od.value&&(dd(),ld=nd.matchMedia(toValue $ 2(Ra)),"addEventListener"in ld?ld.addEventListener("change",cd):ld.addListener(cd),ud.value=ld.matches)});return tryOnScopeDispose(()=>{pd(),dd(),ld=void 0}),ud}const _global $ 1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global $ 1<"u"?global $ 1:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global $ 1||(_global $ 1[globalKey]=_global $ 1[globalKey]||{}),_global $ 1[globalKey]}function getSSRHandler(Ra,qa){return handlers[Ra]||qa}function usePreferredDark(Ra){return useMediaQuery("(prefers-color-scheme: dark)",Ra)}function guessSerializerType(Ra){return Ra==null?"any":Ra instanceof Set?"set":Ra instanceof Map?"map":Ra instanceof Date?"date":typeof Ra=="boolean"?"boolean":typeof Ra=="string"?"string":typeof Ra=="obje
2024-11-28 09:28:59 +08:00
2024-12-08 09:17:51 +08:00
b ` .split(/ \n /).length!=3?function(kd){for(var Ud=0,Qd=[],Kd=kd.length;Ud<=Kd;){var pf=kd.indexOf( `
` ,Ud);pf==-1&&(pf=kd.length);var Cf=kd.slice(Ud,kd.charAt(pf-1)==" \r "?pf-1:pf),Pf=Cf.indexOf(" \r ");Pf!=-1?(Qd.push(Cf.slice(0,Pf)),Ud+=Pf+1):(Qd.push(Cf),Ud=pf+1)}return Qd}:function(kd){return kd.split(/ \r \n ?| \n /)},th=window.getSelection?function(kd){try{return kd.selectionStart!=kd.selectionEnd}catch{return!1}}:function(kd){var Ud;try{Ud=kd.ownerDocument.selection.createRange()}catch{}return!Ud||Ud.parentElement()!=kd?!1:Ud.compareEndPoints("StartToEnd",Ud)!=0},Xf=function(){var kd=gf("div");return"oncopy"in kd?!0:(kd.setAttribute("oncopy","return;"),typeof kd.oncopy=="function")}(),uh=null;function Th(kd){if(uh!=null)return uh;var Ud=Sf(kd,gf("span","x")),Qd=Ud.getBoundingClientRect(),Kd=Tf(Ud,0,1).getBoundingClientRect();return uh=Math.abs(Qd.left-Kd.left)>1}var yh={},Rh={};function wh(kd,Ud){arguments.length>2&&(Ud.dependencies=Array.prototype.slice.call(arguments,2)),yh[kd]=Ud}function _h(kd,Ud){Rh[kd]=Ud}function Jh(kd){if(typeof kd=="string"&&Rh.hasOwnProperty(kd))kd=Rh[kd];else if(kd&&typeof kd.name=="string"&&Rh.hasOwnProperty(kd.name)){var Ud=Rh[kd.name];typeof Ud=="string"&&(Ud={name:Ud}),kd=dh(Ud,kd),kd.name=Ud.name}else{if(typeof kd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ xml $ /.test(kd))return Jh("application/xml");if(typeof kd=="string"&&/^[ \w \- ]+ \/ [ \w \- ]+ \+ json $ /.test(kd))return Jh("application/json")}return typeof kd=="string"?{name:kd}:kd||{name:"null"}}function um(kd,Ud){Ud=Jh(Ud);var Qd=yh[Ud.name];if(!Qd)return um(kd,"text/plain");var Kd=Qd(kd,Ud);if(Um.hasOwnProperty(Ud.name)){var pf=Um[Ud.name];for(var Cf in pf)pf.hasOwnProperty(Cf)&&(Kd.hasOwnProperty(Cf)&&(Kd["_"+Cf]=Kd[Cf]),Kd[Cf]=pf[Cf])}if(Kd.name=Ud.name,Ud.helperType&&(Kd.helperType=Ud.helperType),Ud.modeProps)for(var Pf in Ud.modeProps)Kd[Pf]=Ud.modeProps[Pf];return Kd}var Um={};function Tm(kd,Ud){var Qd=Um.hasOwnProperty(kd)?Um[kd]:Um[kd]={};yf(Ud,Qd)}function zm(kd,Ud){if(Ud===!0)return Ud;if(kd.copyState)return kd.copyState(Ud);var Qd={};for(var Kd in Ud){var pf=Ud[Kd];pf instanceof Array&&(pf=pf.concat([])),Qd[Kd]=pf}return Qd}function S_(kd,Ud){for(var Qd;kd.innerMode&&(Qd=kd.innerMode(Ud),!(!Qd||Qd.mode==kd));)Ud=Qd.state,kd=Qd.mode;return Qd||{mode:kd,state:Ud}}function C_(kd,Ud,Qd){return kd.startState?kd.startState(Ud,Qd):!0}var d_=function(kd,Ud,Qd){this.pos=this.start=0,this.string=kd,this.tabSize=Ud||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Qd};d_.prototype.eol=function(){return this.pos>=this.string.length},d_.prototype.sol=function(){return this.pos==this.lineStart},d_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},d_.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},d_.prototype.eat=function(kd){var Ud=this.string.charAt(this.pos),Qd;if(typeof kd=="string"?Qd=Ud==kd:Qd=Ud&&(kd.test?kd.test(Ud):kd(Ud)),Qd)return++this.pos,Ud},d_.prototype.eatWhile=function(kd){for(var Ud=this.pos;this.eat(kd););return this.pos>Ud},d_.prototype.eatSpace=function(){for(var kd=this.pos;/[ \s \u 00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>kd},d_.prototype.skipToEnd=function(){this.pos=this.string.length},d_.prototype.skipTo=function(kd){var Ud=this.string.indexOf(kd,this.pos);if(Ud>-1)return this.pos=Ud,!0},d_.prototype.backUp=function(kd){this.pos-=kd},d_.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Bf(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Bf(this.string,this.lineStart,this.tabSize):0)},d_.prototype.indentation=function(){return Bf(this.string,null,this.tabSize)-(this.lineStart?Bf(this.string,this.lineStart,this.tabSize):0)},d_.prototype.match=function(kd,Ud,Qd){if(typeof kd=="string"){var Kd=function(Pf){return Qd?Pf.toLowerCase():Pf},pf=this.string.substr(this.pos,kd.length);if(Kd(pf)==Kd(kd))return Ud!==!1&&(this.pos+=kd.length),!0}else{var Cf=this.string.slice(this.pos).match(kd);return Cf&&Cf.index>0?null:(Cf&&Ud!==!1&&(this.pos+=Cf[0].length),Cf)}},d_.prototype.current=funct
` ?(fm=vh.appendChild(gf("span",qh[0]==" \r "?"␍":"","cm-invalidchar")),fm.setAttribute("cm-text",qh[0]),kd.col+=1):(fm=kd.cm.options.specialCharPlaceholder(qh[0]),fm.setAttribute("cm-text",qh[0]),pd&&fd<9?vh.appendChild(gf("span",[fm])):vh.appendChild(fm),kd.col+=1);kd.map.push(kd.pos,kd.pos+1,fm),kd.pos++}}if(kd.trailingSpace=jf.charCodeAt(Ud.length-1)==32,Qd||Kd||pf||ih||Cf||Pf){var jm=Qd||"";Kd&&(jm+=Kd),pf&&(jm+=pf);var Pm=gf("span",[vh],jm,Cf);if(Pf)for(var Vm in Pf)Pf.hasOwnProperty(Vm)&&Vm!="style"&&Vm!="class"&&Pm.setAttribute(Vm,Pf[Vm]);return kd.content.appendChild(Pm)}kd.content.appendChild(vh)}}function sv(kd,Ud){if(kd.length>1&&!/ /.test(kd))return kd;for(var Qd=Ud,Kd="",pf=0;pf<kd.length;pf++){var Cf=kd.charAt(pf);Cf==" "&&Qd&&(pf==kd.length-1||kd.charCodeAt(pf+1)==32)&&(Cf=" "),Kd+=Cf,Qd=Cf==" "}return Kd}function W_(kd,Ud){return function(Qd,Kd,pf,Cf,Pf,jf,Qf){pf=pf?pf+" cm-force-border":"cm-force-border";for(var ih=Qd.pos,vh=ih+Kd.length;;){for(var Ch=void 0,qh=0;qh<Ud.length&&(Ch=Ud[qh],!(Ch.to>ih&&Ch.from<=ih));qh++);if(Ch.to>=vh)return kd(Qd,Kd,pf,Cf,Pf,jf,Qf);kd(Qd,Kd.slice(0,Ch.to-ih),pf,Cf,null,jf,Qf),Cf=null,Kd=Kd.slice(Ch.to-ih),ih=Ch.to}}}function g0(kd,Ud,Qd,Kd){var pf=!Kd&&Qd.widgetNode;pf&&kd.map.push(kd.pos,kd.pos+Ud,pf),!Kd&&kd.cm.display.input.needsContentAttribute&&(pf||(pf=kd.content.appendChild(document.createElement("span"))),pf.setAttribute("cm-marker",Qd.id)),pf&&(kd.cm.display.input.setUneditable(pf),kd.content.appendChild(pf)),kd.pos+=Ud,kd.trailingSpace=!1}function Hv(kd,Ud,Qd){var Kd=kd.markedSpans,pf=kd.text,Cf=0;if(!Kd){for(var Pf=1;Pf<Qd.length;Pf+=2)Ud.addToken(Ud,pf.slice(Cf,Cf=Qd[Pf]),x1(Qd[Pf+1],Ud.cm.options));return}for(var jf=pf.length,Qf=0,ih=1,vh="",Ch,qh,Uh=0,om,fm,Nm, $ m,jm;;){if(Uh==Qf){om=fm=Nm=qh="",jm=null, $ m=null,Uh=1/0;for(var Pm=[],Vm=void 0,t_=0;t_<Kd.length;++t_){var Jm=Kd[t_],m_=Jm.marker;if(m_.type=="bookmark"&&Jm.from==Qf&&m_.widgetNode)Pm.push(m_);else if(Jm.from<=Qf&&(Jm.to==null||Jm.to>Qf||m_.collapsed&&Jm.to==Qf&&Jm.from==Qf)){if(Jm.to!=null&&Jm.to!=Qf&&Uh>Jm.to&&(Uh=Jm.to,fm=""),m_.className&&(om+=" "+m_.className),m_.css&&(qh=(qh?qh+";":"")+m_.css),m_.startStyle&&Jm.from==Qf&&(Nm+=" "+m_.startStyle),m_.endStyle&&Jm.to==Uh&&(Vm||(Vm=[])).push(m_.endStyle,Jm.to),m_.title&&((jm||(jm={})).title=m_.title),m_.attributes)for(var $ _ in m_.attributes)(jm||(jm={}))[ $ _]=m_.attributes[ $ _];m_.collapsed&&(! $ m||Lv( $ m.marker,m_)<0)&&( $ m=Jm)}else Jm.from>Qf&&Uh>Jm.from&&(Uh=Jm.from)}if(Vm)for(var ig=0;ig<Vm.length;ig+=2)Vm[ig+1]==Uh&&(fm+=" "+Vm[ig]);if(! $ m|| $ m.from==Qf)for(var K_=0;K_<Pm.length;++K_)g0(Ud,0,Pm[K_]);if( $ m&&( $ m.from||0)==Qf){if(g0(Ud,( $ m.to==null?jf+1: $ m.to)-Qf, $ m.marker, $ m.from==null), $ m.to==null)return; $ m.to==Qf&&( $ m=!1)}}if(Qf>=jf)break;for(var eg=Math.min(jf,Uh);;){if(vh){var og=Qf+vh.length;if(! $ m){var lg=og>eg?vh.slice(0,eg-Qf):vh;Ud.addToken(Ud,lg,Ch?Ch+om:om,Nm,Qf+lg.length==Uh?fm:"",qh,jm)}if(og>=eg){vh=vh.slice(eg-Qf),Qf=eg;break}Qf=og,Nm=""}vh=pf.slice(Cf,Cf=Qd[ih++]),Ch=x1(Qd[ih++],Ud.cm.options)}}}function C1(kd,Ud,Qd){this.line=Ud,this.rest=Y0(Ud),this.size=this.rest?Lm(ph(this.rest))-Qd+1:1,this.node=this.text=null,this.hidden=rg(kd,Ud)}function lb(kd,Ud,Qd){for(var Kd=[],pf,Cf=Ud;Cf<Qd;Cf=pf){var Pf=new C1(kd.doc,Dm(kd.doc,Cf),Cf);pf=Cf+Pf.size,Kd.push(Pf)}return Kd}var a0=null;function A1(kd){a0?a0.ops.push(kd):kd.ownsGroup=a0={ops:[kd],delayedCallbacks:[]}}function Dy(kd){var Ud=kd.delayedCallbacks,Qd=0;do{for(;Qd<Ud.length;Qd++)Ud[Qd].call(null);for(var Kd=0;Kd<kd.ops.length;Kd++){var pf=kd.ops[Kd];if(pf.cursorActivityHandlers)for(;pf.cursorActivityCalled<pf.cursorActivityHandlers.length;)pf.cursorActivityHandlers[pf.cursorActivityCalled++].call(null,pf.cm)}}while(Qd<Ud.length)}function Vd(kd,Ud){var Qd=kd.ownsGroup;if(Qd)try{Dy(Qd)}finally{a0=null,Ud(Qd)}}var Ld=null;function Yd(kd,Ud){var Qd=Fm(kd,Ud);if(Qd.length){var Kd=Array.prototype.slice.call(arguments,2),pf;a0?pf=a0.delayedCallbacks:Ld?pf=Ld:(pf=Ld=[],setTimeout(mf,0));for(var Cf=function(jf){pf.push(function(){return Qd[jf].apply(null,Kd)})},Pf=0;Pf<Qd.length;++Pf)C
2024-11-28 09:28:59 +08:00
top : ` +Vm+"px; width: "+(t_??Qf-Pm)+ ` px ;
2024-12-08 09:17:51 +08:00
height : ` +(Jm-Vm)+"px"))}function Ch(Pm,Vm,t_){var Jm=Dm(pf,Pm),m_=Jm.text.length, $ _,ig;function K_(lg,Mg){return cm(kd,mm(Pm,lg),"div",Jm,Mg)}function eg(lg,Mg,wg){var fg=U_(kd,Jm,null,lg),ug=Mg=="ltr"==(wg=="after")?"left":"right",tg=wg=="after"?fg.begin:fg.end-(/ \s /.test(Jm.text.charAt(fg.end-1))?2:1);return K_(tg,ug)[ug]}var og=Zh(Jm,pf.direction);return rh(og,Vm||0,t_??m_,function(lg,Mg,wg,fg){var ug=wg=="ltr",tg=K_(lg,ug?"left":"right"),jg=K_(Mg-1,ug?"right":"left"),kv=Vm==null&&lg==0,Tb=t_==null&&Mg==m_,Dg=fg==0,U0=!og||fg==og.length-1;if(jg.top-tg.top<=3){var Tg=(ih?kv:Tb)&&Dg,SE=(ih?Tb:kv)&&U0,H0=Tg?jf:(ug?tg:jg).left,Sb=SE?Qf:(ug?jg:tg).right;vh(H0,tg.top,Sb-H0,tg.bottom)}else{var xb,Pg,Mv,xE;ug?(xb=ih&&kv&&Dg?jf:tg.left,Pg=ih?Qf:eg(lg,wg,"before"),Mv=ih?jf:eg(Mg,wg,"after"),xE=ih&&Tb&&U0?Qf:jg.right):(xb=ih?eg(lg,wg,"before"):jf,Pg=!ih&&kv&&Dg?Qf:tg.right,Mv=!ih&&Tb&&U0?jf:jg.left,xE=ih?eg(Mg,wg,"after"):Qf),vh(xb,tg.top,Pg-xb,tg.bottom),tg.bottom<jg.top&&vh(jf,tg.bottom,null,jg.top),vh(Mv,jg.top,xE-Mv,jg.bottom)}(! $ _||Bb(tg, $ _)<0)&&( $ _=tg),Bb(jg, $ _)<0&&( $ _=jg),(!ig||Bb(tg,ig)<0)&&(ig=tg),Bb(jg,ig)<0&&(ig=jg)}),{start: $ _,end:ig}}var qh=Ud.from(),Uh=Ud.to();if(qh.line==Uh.line)Ch(qh.line,qh.ch,Uh.ch);else{var om=Dm(pf,qh.line),fm=Dm(pf,Uh.line),Nm=M_(om)==M_(fm), $ m=Ch(qh.line,qh.ch,Nm?om.text.length+1:null).end,jm=Ch(Uh.line,Nm?0:null,Uh.ch).start;Nm&&( $ m.top<jm.top-2?(vh( $ m.right, $ m.top,null, $ m.bottom),vh(jf,jm.top,jm.left,jm.bottom)):vh( $ m.right, $ m.top,jm.left- $ m.right, $ m.bottom)), $ m.bottom<jm.top&&vh(jf, $ m.bottom,null,jm.top)}Qd.appendChild(Cf)}function $ b(kd){if(kd.state.focused){var Ud=kd.display;clearInterval(Ud.blinker);var Qd=!0;Ud.cursorDiv.style.visibility="",kd.options.cursorBlinkRate>0?Ud.blinker=setInterval(function(){kd.hasFocus()||pv(kd),Ud.cursorDiv.style.visibility=(Qd=!Qd)?"":"hidden"},kd.options.cursorBlinkRate):kd.options.cursorBlinkRate<0&&(Ud.cursorDiv.style.visibility="hidden")}}function db(kd){kd.hasFocus()||(kd.display.input.focus(),kd.state.focused|| $ y(kd))}function dv(kd){kd.state.delayingBlurEvent=!0,setTimeout(function(){kd.state.delayingBlurEvent&&(kd.state.delayingBlurEvent=!1,kd.state.focused&&pv(kd))},100)}function $ y(kd,Ud){kd.state.delayingBlurEvent&&!kd.state.draggingText&&(kd.state.delayingBlurEvent=!1),kd.options.readOnly!="nocursor"&&(kd.state.focused||(Hm(kd,"focus",kd,Ud),kd.state.focused=!0,Zf(kd.display.wrapper,"CodeMirror-focused"),!kd.curOp&&kd.display.selForContextMenu!=kd.doc.sel&&(kd.display.input.reset(),md&&setTimeout(function(){return kd.display.input.reset(!0)},20)),kd.display.input.receivedFocus()), $ b(kd))}function pv(kd,Ud){kd.state.delayingBlurEvent||(kd.state.focused&&(Hm(kd,"blur",kd,Ud),kd.state.focused=!1,_f(kd.display.wrapper,"CodeMirror-focused")),clearInterval(kd.display.blinker),setTimeout(function(){kd.state.focused||(kd.display.shift=!1)},150))}function k1(kd){for(var Ud=kd.display,Qd=Ud.lineDiv.offsetTop,Kd=Math.max(0,Ud.scroller.getBoundingClientRect().top),pf=Ud.lineDiv.getBoundingClientRect().top,Cf=0,Pf=0;Pf<Ud.view.length;Pf++){var jf=Ud.view[Pf],Qf=kd.options.lineWrapping,ih=void 0,vh=0;if(!jf.hidden){if(pf+=jf.line.height,pd&&fd<8){var Ch=jf.node.offsetTop+jf.node.offsetHeight;ih=Ch-Qd,Qd=Ch}else{var qh=jf.node.getBoundingClientRect();ih=qh.bottom-qh.top,!Qf&&jf.text.firstChild&&(vh=jf.text.firstChild.getBoundingClientRect().right-qh.left-1)}var Uh=jf.line.height-ih;if((Uh>.005||Uh<-.005)&&(pf<Kd&&(Cf-=Uh),n_(jf.line,ih),Vv(jf.line),jf.rest))for(var om=0;om<jf.rest.length;om++)Vv(jf.rest[om]);if(vh>kd.display.sizerWidth){var fm=Math.ceil(vh/X0(kd.display));fm>kd.display.maxLineLength&&(kd.display.maxLineLength=fm,kd.display.maxLine=jf.line,kd.display.maxLineChanged=!0)}}}Math.abs(Cf)>2&&(Ud.scroller.scrollTop+=Cf)}function Vv(kd){if(kd.widgets)for(var Ud=0;Ud<kd.widgets.length;++Ud){var Qd=kd.widgets[Ud],Kd=Qd.node.parentNode;Kd&&(Qd.height=Kd.offsetHeight)}}function Lb(kd,Ud,Qd){var Kd=Qd&&Qd.top!=null?Math.max(0,Qd.top):kd.scroller.scrollTop;Kd=Math.floor(Kd-gg(kd));var pf=Qd&&Qd.bottom!=null?Qd.bottom:Kd+kd
top : ` +(Ud.top-Qd.viewOffset-gg(kd.display))+ ` px ;
height : ` +(Ud.bottom-Ud.top+M0(kd)+Qd.barHeight)+ ` px ;
left : ` +Ud.left+"px; width: "+Math.max(2,Ud.right-Ud.left)+"px;");kd.display.lineSpace.appendChild(Pf),Pf.scrollIntoView(pf),kd.display.lineSpace.removeChild(Pf)}}}function R2(kd,Ud,Qd,Kd){Kd==null&&(Kd=0);var pf;!kd.options.lineWrapping&&Ud==Qd&&(Qd=Ud.sticky=="before"?mm(Ud.line,Ud.ch+1,"before"):Ud,Ud=Ud.ch?mm(Ud.line,Ud.sticky=="before"?Ud.ch-1:Ud.ch,"after"):Ud);for(var Cf=0;Cf<5;Cf++){var Pf=!1,jf=im(kd,Ud),Qf=!Qd||Qd==Ud?jf:im(kd,Qd);pf={left:Math.min(jf.left,Qf.left),top:Math.min(jf.top,Qf.top)-Kd,right:Math.max(jf.left,Qf.left),bottom:Math.max(jf.bottom,Qf.bottom)+Kd};var ih=Hy(kd,pf),vh=kd.doc.scrollTop,Ch=kd.doc.scrollLeft;if(ih.scrollTop!=null&&(zv(kd,ih.scrollTop),Math.abs(kd.doc.scrollTop-vh)>1&&(Pf=!0)),ih.scrollLeft!=null&&(T0(kd,ih.scrollLeft),Math.abs(kd.doc.scrollLeft-Ch)>1&&(Pf=!0)),!Pf)break}return pf}function PE(kd,Ud){var Qd=Hy(kd,Ud);Qd.scrollTop!=null&&zv(kd,Qd.scrollTop),Qd.scrollLeft!=null&&T0(kd,Qd.scrollLeft)}function Hy(kd,Ud){var Qd=kd.display,Kd=v0(kd.display);Ud.top<0&&(Ud.top=0);var pf=kd.curOp&&kd.curOp.scrollTop!=null?kd.curOp.scrollTop:Qd.scroller.scrollTop,Cf=Iy(kd),Pf={};Ud.bottom-Ud.top>Cf&&(Ud.bottom=Ud.top+Cf);var jf=kd.doc.height+Rb(Qd),Qf=Ud.top<Kd,ih=Ud.bottom>jf-Kd;if(Ud.top<pf)Pf.scrollTop=Qf?0:Ud.top;else if(Ud.bottom>pf+Cf){var vh=Math.min(Ud.top,(ih?jf:Ud.bottom)-Cf);vh!=pf&&(Pf.scrollTop=vh)}var Ch=kd.options.fixedGutter?0:Qd.gutters.offsetWidth,qh=kd.curOp&&kd.curOp.scrollLeft!=null?kd.curOp.scrollLeft:Qd.scroller.scrollLeft-Ch,Uh=kb(kd)-Qd.gutters.offsetWidth,om=Ud.right-Ud.left>Uh;return om&&(Ud.right=Ud.left+Uh),Ud.left<10?Pf.scrollLeft=0:Ud.left<qh?Pf.scrollLeft=Math.max(0,Ud.left+Ch-(om?0:10)):Ud.right>Uh+qh-3&&(Pf.scrollLeft=Ud.right+(om?0:10)-Uh),Pf}function Wy(kd,Ud){Ud!=null&&(M1(kd),kd.curOp.scrollTop=(kd.curOp.scrollTop==null?kd.doc.scrollTop:kd.curOp.scrollTop)+Ud)}function X_(kd){M1(kd);var Ud=kd.getCursor();kd.curOp.scrollToPos={from:Ud,to:Ud,margin:kd.options.cursorScrollMargin}}function pg(kd,Ud,Qd){(Ud!=null||Qd!=null)&&M1(kd),Ud!=null&&(kd.curOp.scrollLeft=Ud),Qd!=null&&(kd.curOp.scrollTop=Qd)}function k2(kd,Ud){M1(kd),kd.curOp.scrollToPos=Ud}function M1(kd){var Ud=kd.curOp.scrollToPos;if(Ud){kd.curOp.scrollToPos=null;var Qd=Xm(kd,Ud.from),Kd=Xm(kd,Ud.to);Qy(kd,Qd,Kd,Ud.margin)}}function Qy(kd,Ud,Qd,Kd){var pf=Hy(kd,{left:Math.min(Ud.left,Qd.left),top:Math.min(Ud.top,Qd.top)-Kd,right:Math.max(Ud.right,Qd.right),bottom:Math.max(Ud.bottom,Qd.bottom)+Kd});pg(kd,pf.scrollLeft,pf.scrollTop)}function zv(kd,Ud){Math.abs(kd.doc.scrollTop-Ud)<2||(ld||S0(kd,{top:Ud}),P1(kd,Ud,!0),ld&&S0(kd),Kv(kd,100))}function P1(kd,Ud,Qd){Ud=Math.max(0,Math.min(kd.display.scroller.scrollHeight-kd.display.scroller.clientHeight,Ud)),!(kd.display.scroller.scrollTop==Ud&&!Qd)&&(kd.doc.scrollTop=Ud,kd.display.scrollbars.setScrollTop(Ud),kd.display.scroller.scrollTop!=Ud&&(kd.display.scroller.scrollTop=Ud))}function T0(kd,Ud,Qd,Kd){Ud=Math.max(0,Math.min(Ud,kd.display.scroller.scrollWidth-kd.display.scroller.clientWidth)),!((Qd?Ud==kd.doc.scrollLeft:Math.abs(kd.doc.scrollLeft-Ud)<2)&&!Kd)&&(kd.doc.scrollLeft=Ud,FE(kd),kd.display.scroller.scrollLeft!=Ud&&(kd.display.scroller.scrollLeft=Ud),kd.display.scrollbars.setScrollLeft(Ud))}function Fb(kd){var Ud=kd.display,Qd=Ud.gutters.offsetWidth,Kd=Math.round(kd.doc.height+Rb(kd.display));return{clientHeight:Ud.scroller.clientHeight,viewHeight:Ud.wrapper.clientHeight,scrollWidth:Ud.scroller.scrollWidth,clientWidth:Ud.scroller.clientWidth,viewWidth:Ud.wrapper.clientWidth,barLeft:kd.options.fixedGutter?Qd:0,docHeight:Kd,scrollHeight:Kd+M0(kd)+Ud.barHeight,nativeBarWidth:Ud.nativeBarWidth,gutterWidth:Qd}}var o0=function(kd,Ud,Qd){this.cm=Qd;var Kd=this.vert=gf("div",[gf("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pf=this.horiz=gf("div",[gf("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");Kd.tabIndex=pf.tabIndex=-1,kd(Kd),kd(pf),sm(Kd,"scroll",function(){Kd.clientHeight&&Ud(Kd.scrollTop,"vertical")}),sm(pf,"scroll",function(){pf.clientWidth&&Ud(pf.scrollLeft,"horizontal")}),thi
` },setDirection:bg(function(kd){kd!="rtl"&&(kd="ltr"),kd!=this.direction&&(this.direction=kd,this.iter(function(Ud){return Ud.order=null}),this.cm&&Z0(this.cm))})}),kg.prototype.eachLine=kg.prototype.iter;var G1=0;function W2(kd){var Ud=this;if(a2(Ud),!(Zm(Ud,kd)||I_(Ud.display,kd))){Qm(kd),pd&&(G1=+new Date);var Qd=P0(Ud,kd,!0),Kd=kd.dataTransfer.files;if(!(!Qd||Ud.isReadOnly()))if(Kd&&Kd.length&&window.FileReader&&window.File)for(var pf=Kd.length,Cf=Array(pf),Pf=0,jf=function(){++Pf==pf&&P_(Ud,function(){Qd=a_(Ud.doc,Qd);var Uh={from:Qd,to:Qd,text:Ud.doc.splitLines(Cf.filter(function(om){return om!=null}).join(Ud.doc.lineSeparator())),origin:"paste"};Ev(Ud.doc,Uh),_b(Ud.doc,fb(a_(Ud.doc,Qd),a_(Ud.doc,hb(Uh))))})()},Qf=function(Uh,om){if(Ud.options.allowDropFileTypes&&oh(Ud.options.allowDropFileTypes,Uh.type)==-1){jf();return}var fm=new FileReader;fm.onerror=function(){return jf()},fm.onload=function(){var Nm=fm.result;if(/[ \x 00- \x 08 \x 0e- \x 1f]{2}/.test(Nm)){jf();return}Cf[om]=Nm,jf()},fm.readAsText(Uh)},ih=0;ih<Kd.length;ih++)Qf(Kd[ih],ih);else{if(Ud.state.draggingText&&Ud.doc.sel.contains(Qd)>-1){Ud.state.draggingText(kd),setTimeout(function(){return Ud.display.input.focus()},20);return}try{var vh=kd.dataTransfer.getData("Text");if(vh){var Ch;if(Ud.state.draggingText&&!Ud.state.draggingText.copy&&(Ch=Ud.listSelections()),Ag(Ud.doc,fb(Qd,Qd)),Ch)for(var qh=0;qh<Ch.length;++qh)Vb(Ud.doc,"",Ch[qh].anchor,Ch[qh].head,"drag");Ud.replaceSelection(vh,"around","paste"),Ud.display.input.focus()}}catch{}}}}function pE(kd,Ud){if(pd&&(!kd.state.draggingText||+new Date-G1<100)){G_(Ud);return}if(!(Zm(kd,Ud)||I_(kd.display,Ud))&&(Ud.dataTransfer.setData("Text",kd.getSelection()),Ud.dataTransfer.effectAllowed="copyMove",Ud.dataTransfer.setDragImage&&!Od)){var Qd=gf("img",null,null,"position: fixed; left: 0; top: 0;");Qd.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Id&&(Qd.width=Qd.height=1,kd.display.wrapper.appendChild(Qd),Qd._top=Qd.offsetTop),Ud.dataTransfer.setDragImage(Qd,0,0),Id&&Qd.parentNode.removeChild(Qd)}}function g_(kd,Ud){var Qd=P0(kd,Ud);if(Qd){var Kd=document.createDocumentFragment();R1(kd,Qd,Kd),kd.display.dragCursor||(kd.display.dragCursor=gf("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),kd.display.lineSpace.insertBefore(kd.display.dragCursor,kd.display.cursorDiv)),Sf(kd.display.dragCursor,Kd)}}function a2(kd){kd.display.dragCursor&&(kd.display.lineSpace.removeChild(kd.display.dragCursor),kd.display.dragCursor=null)}function s2(kd){if(document.getElementsByClassName){for(var Ud=document.getElementsByClassName("CodeMirror"),Qd=[],Kd=0;Kd<Ud.length;Kd++){var pf=Ud[Kd].CodeMirror;pf&&Qd.push(pf)}Qd.length&&Qd[0].operation(function(){for(var Cf=0;Cf<Qd.length;Cf++)kd(Qd[Cf])})}}var Av=!1;function o2(){Av||(Y2(),Av=!0)}function Y2(){var kd;sm(window,"resize",function(){kd==null&&(kd=setTimeout(function(){kd=null,s2(K2)},100))}),sm(window,"blur",function(){return s2(pv)})}function K2(kd){var Ud=kd.display;Ud.cachedCharWidth=Ud.cachedTextHeight=Ud.cachedPaddingH=null,Ud.scrollbarsClipped=!1,kd.setSize()}for(var yg={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:" ` ",219:" [ ",220:" \ \ ",221:" ] ",222:" ' ",224:" Mod ",63232:" Up ",63233:" Down ",63234:" Left ",63235:" Right ",63272:" Delete ",63273:" Home ",63275:" End ",63276:" PageUp ",63277:" PageDown ",63302:" Insert "},e1=0;e1<10;e1++)yg[e1+48]=yg[e1+96]=String(e1);for(var Yb=65;Yb<=90;Yb++)yg[Yb]=String.fromCharCode(Yb);for(var Kb=1;Kb<=12;Kb++)yg[Kb+111]=yg[Kb+63235]=" F "+Kb;var L0={};L0.basic={Left:" goCharLeft ",Right:" goCharRight ",Up:" goLineUp ",Down:" goLineDown ",End:" goLineEnd ",Home:" goLineStartSmart ",PageUp:" goPageUp ",PageDown:" goPageDown ",Delete:" delCharAfter ",Backspace:" delCharBefore "," Shift - Backspace ":"
` ,"start")},toggleOverwrite:function(kd){return kd.toggleOverwrite()}};function tb(kd,Ud){var Qd=Dm(kd.doc,Ud),Kd=M_(Qd);return Kd!=Qd&&(Ud=Lm(Kd)),i1(!0,kd,Kd,Ud,1)}function u2(kd,Ud){var Qd=Dm(kd.doc,Ud),Kd=jv(Qd);return Kd!=Qd&&(Ud=Lm(Kd)),i1(!0,kd,Qd,Ud,-1)}function hE(kd,Ud){var Qd=tb(kd,Ud.line),Kd=Dm(kd.doc,Qd.line),pf=Zh(Kd,kd.doc.direction);if(!pf||pf[0].level==0){var Cf=Math.max(Qd.ch,Kd.text.search(/ \S /)),Pf=Ud.line==Qd.line&&Ud.ch<=Cf&&Ud.ch;return mm(Qd.line,Pf?0:Cf,Qd.sticky)}return Qd}function wv(kd,Ud,Qd){if(typeof Ud=="string"&&(Ud=a1[Ud],!Ud))return!1;kd.display.input.ensurePolled();var Kd=kd.display.shift,pf=!1;try{kd.isReadOnly()&&(kd.state.suppressEdits=!0),Qd&&(kd.display.shift=!1),pf=Ud(kd)!=kf}finally{kd.display.shift=Kd,kd.state.suppressEdits=!1}return pf}function X2(kd,Ud,Qd){for(var Kd=0;Kd<kd.state.keyMaps.length;Kd++){var pf=Xg(Ud,kd.state.keyMaps[Kd],Qd,kd);if(pf)return pf}return kd.options.extraKeys&&Xg(Ud,kd.options.extraKeys,Qd,kd)||Xg(Ud,kd.options.keyMap,Qd,kd)}var Q2=new qf;function s1(kd,Ud,Qd,Kd){var pf=kd.state.keySeq;if(pf){if(q1(Ud))return"handled";if(/ \' $ /.test(Ud)?kd.state.keySeq=null:Q2.set(50,function(){kd.state.keySeq==pf&&(kd.state.keySeq=null,kd.display.input.reset())}),mE(kd,pf+" "+Ud,Qd,Kd))return!0}return mE(kd,Ud,Qd,Kd)}function mE(kd,Ud,Qd,Kd){var pf=X2(kd,Ud,Kd);return pf=="multi"&&(kd.state.keySeq=Ud),pf=="handled"&&Yd(kd,"keyHandled",kd,Ud,Qd),(pf=="handled"||pf=="multi")&&(Qm(Qd), $ b(kd)),!!pf}function _E(kd,Ud){var Qd=t1(Ud,!0);return Qd?Ud.shiftKey&&!kd.state.keySeq?s1(kd,"Shift-"+Qd,Ud,function(Kd){return wv(kd,Kd,!0)})||s1(kd,Qd,Ud,function(Kd){if(typeof Kd=="string"?/^go[A-Z]/.test(Kd):Kd.motion)return wv(kd,Kd)}):s1(kd,Qd,Ud,function(Kd){return wv(kd,Kd)}):!1}function J2(kd,Ud,Qd){return s1(kd,"'"+Qd+"'",Ud,function(Kd){return wv(kd,Kd,!0)})}var z1=null;function gE(kd){var Ud=this;if(!(kd.target&&kd.target!=Ud.display.input.getField())&&(Ud.curOp.focus=Kf(Lf(Ud)),!Zm(Ud,kd))){pd&&fd<11&&kd.keyCode==27&&(kd.returnValue=!1);var Qd=kd.keyCode;Ud.display.shift=Qd==16||kd.shiftKey;var Kd=_E(Ud,kd);Id&&(z1=Kd?Qd:null,!Kd&&Qd==88&&!Xf&&(Hd?kd.metaKey:kd.ctrlKey)&&Ud.replaceSelection("",null,"cut")),ld&&!Hd&&!Kd&&Qd==46&&kd.shiftKey&&!kd.ctrlKey&&document.execCommand&&document.execCommand("cut"),Qd==18&&!/ \b CodeMirror-crosshair \b /.test(Ud.display.lineDiv.className)&&Vg(Ud)}}function Vg(kd){var Ud=kd.display.lineDiv;Zf(Ud,"CodeMirror-crosshair");function Qd(Kd){(Kd.keyCode==18||!Kd.altKey)&&(_f(Ud,"CodeMirror-crosshair"),Rm(document,"keyup",Qd),Rm(document,"mouseover",Qd))}sm(document,"keyup",Qd),sm(document,"mouseover",Qd)}function N0(kd){kd.keyCode==16&&(this.doc.sel.shift=!1),Zm(this,kd)}function c2(kd){var Ud=this;if(!(kd.target&&kd.target!=Ud.display.input.getField())&&!(I_(Ud.display,kd)||Zm(Ud,kd)||kd.ctrlKey&&!kd.altKey||Hd&&kd.metaKey)){var Qd=kd.keyCode,Kd=kd.charCode;if(Id&&Qd==z1){z1=null,Qm(kd);return}if(!(Id&&(!kd.which||kd.which<10)&&_E(Ud,kd))){var pf=String.fromCharCode(Kd??Qd);pf!=" \b "&&(J2(Ud,kd,pf)||Ud.display.input.onKeyPress(kd))}}}var Z2=400,Nv=function(kd,Ud,Qd){this.time=kd,this.pos=Ud,this.button=Qd};Nv.prototype.compare=function(kd,Ud,Qd){return this.time+Z2>kd&&i_(Ud,this.pos)==0&&Qd==this.button};var F0,Dv;function d2(kd,Ud){var Qd=+new Date;return Dv&&Dv.compare(Qd,kd,Ud)?(F0=Dv=null,"triple"):F0&&F0.compare(Qd,kd,Ud)?(Dv=new Nv(Qd,kd,Ud),F0=null,"double"):(F0=new Nv(Qd,kd,Ud),Dv=null,"single")}function p2(kd){var Ud=this,Qd=Ud.display;if(!(Zm(Ud,kd)||Qd.activeTouch&&Qd.input.supportsTouch())){if(Qd.input.ensurePolled(),Qd.shift=kd.shiftKey,I_(Qd,kd)){md||(Qd.scroller.draggable=!1,setTimeout(function(){return Qd.scroller.draggable=!0},100));return}if(!Ov(Ud,kd)){var Kd=P0(Ud,kd),pf=q_(kd),Cf=Kd?d2(Kd,pf):"single";Jf(Ud).focus(),pf==1&&Ud.state.selectingText&&Ud.state.selectingText(kd),!(Kd&&f2(Ud,pf,Kd,Cf,kd))&&(pf==1?Kd?o1(Ud,Kd,Cf,kd):Q_(kd)==Qd.scroller&&Qm(kd):pf==2?(Kd&&gv(Ud.doc,Kd),setTimeout(function(){return Qd.input.focus()},20)):pf==3&&(Jd?Ud.display.input.onContextMenu(kd):dv(Ud)))}}}function f2(kd,Ud,Qd,Kd,pf){var Cf="Click";
` )==Ud){if(Kd.ranges.length%u0.text.length==0){ih=[];for(var vh=0;vh<u0.text.length;vh++)ih.push(Cf.splitLines(u0.text[vh]))}}else Qf.length==Kd.ranges.length&&kd.options.pasteLinesPerSelection&&(ih=gh(Qf,function( $ m){return[ $ m]}));for(var Ch=kd.curOp.updateInput,qh=Kd.ranges.length-1;qh>=0;qh--){var Uh=Kd.ranges[qh],om=Uh.from(),fm=Uh.to();Uh.empty()&&(Qd&&Qd>0?om=mm(om.line,om.ch-Qd):kd.state.overwrite&&!jf?fm=mm(fm.line,Math.min(Dm(Cf,fm.line).text.length,fm.ch+ph(Qf).length)):jf&&u0&&u0.lineWise&&u0.text.join( `
2024-11-28 09:28:59 +08:00
` )==Qf.join( `
2024-12-08 09:17:51 +08:00
` )&&(om=fm=mm(om.line,0)));var Nm={from:om,to:fm,text:ih?ih[qh%ih.length]:Qf,origin:pf||(jf?"paste":kd.state.cutIncoming>Pf?"cut":"+input")};Ev(kd.doc,Nm),Yd(kd,"inputRead",kd,Nm)}Ud&&!jf&&J1(kd,Ud),X_(kd),kd.curOp.updateInput<2&&(kd.curOp.updateInput=Ch),kd.curOp.typing=!0,kd.state.pasteIncoming=kd.state.cutIncoming=-1}function j0(kd,Ud){var Qd=kd.clipboardData&&kd.clipboardData.getData("Text");if(Qd)return kd.preventDefault(),!Ud.isReadOnly()&&!Ud.options.disableInput&&Ud.hasFocus()&&Ng(Ud,function(){return TE(Ud,Qd,0,null,"paste")}),!0}function J1(kd,Ud){if(!(!kd.options.electricChars||!kd.options.smartIndent))for(var Qd=kd.doc.sel,Kd=Qd.ranges.length-1;Kd>=0;Kd--){var pf=Qd.ranges[Kd];if(!(pf.head.ch>100||Kd&&Qd.ranges[Kd-1].head.line==pf.head.line)){var Cf=kd.getModeAt(pf.head),Pf=!1;if(Cf.electricChars){for(var jf=0;jf<Cf.electricChars.length;jf++)if(Ud.indexOf(Cf.electricChars.charAt(jf))>-1){Pf=c1(kd,pf.head.line,"smart");break}}else Cf.electricInput&&Cf.electricInput.test(Dm(kd.doc,pf.head.line).text.slice(0,pf.head.ch))&&(Pf=c1(kd,pf.head.line,"smart"));Pf&&Yd(kd,"electricInput",kd,pf.head.line)}}}function Z1(kd){for(var Ud=[],Qd=[],Kd=0;Kd<kd.doc.sel.ranges.length;Kd++){var pf=kd.doc.sel.ranges[Kd].head.line,Cf={anchor:mm(pf,0),head:mm(pf+1,0)};Qd.push(Cf),Ud.push(kd.getRange(Cf.anchor,Cf.head))}return{text:Ud,ranges:Qd}}function d1(kd,Ud,Qd,Kd){kd.setAttribute("autocorrect",Qd?"on":"off"),kd.setAttribute("autocapitalize",Kd?"on":"off"),kd.setAttribute("spellcheck",!!Ud)}function p1(){var kd=gf("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),Ud=gf("div",[kd],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return md?kd.style.width="1000px":kd.setAttribute("wrap","off"),Md&&(kd.style.border="1px solid black"),Ud}function Rv(kd){var Ud=kd.optionHandlers,Qd=kd.helpers={};kd.prototype={constructor:kd,focus:function(){Jf(this).focus(),this.display.input.focus()},setOption:function(Kd,pf){var Cf=this.options,Pf=Cf[Kd];Cf[Kd]==pf&&Kd!="mode"||(Cf[Kd]=pf,Ud.hasOwnProperty(Kd)&&P_(this,Ud[Kd])(this,pf,Pf),Hm(this,"optionChange",this,Kd))},getOption:function(Kd){return this.options[Kd]},getDoc:function(){return this.doc},addKeyMap:function(Kd,pf){this.state.keyMaps[pf?"push":"unshift"](r1(Kd))},removeKeyMap:function(Kd){for(var pf=this.state.keyMaps,Cf=0;Cf<pf.length;++Cf)if(pf[Cf]==Kd||pf[Cf].name==Kd)return pf.splice(Cf,1),!0},addOverlay:o_(function(Kd,pf){var Cf=Kd.token?Kd:kd.getMode(this.options,Kd);if(Cf.startState)throw new Error("Overlays may not be stateful.");ah(this.state.overlays,{mode:Cf,modeSpec:Kd,opaque:pf&&pf.opaque,priority:pf&&pf.priority||0},function(Pf){return Pf.priority}),this.state.modeGen++,Fg(this)}),removeOverlay:o_(function(Kd){for(var pf=this.state.overlays,Cf=0;Cf<pf.length;++Cf){var Pf=pf[Cf].modeSpec;if(Pf==Kd||typeof Kd=="string"&&Pf.name==Kd){pf.splice(Cf,1),this.state.modeGen++,Fg(this);return}}}),indentLine:o_(function(Kd,pf,Cf){typeof pf!="string"&&typeof pf!="number"&&(pf==null?pf=this.options.smartIndent?"smart":"prev":pf=pf?"add":"subtract"),Jg(this.doc,Kd)&&c1(this,Kd,pf,Cf)}),indentSelection:o_(function(Kd){for(var pf=this.doc.sel.ranges,Cf=-1,Pf=0;Pf<pf.length;Pf++){var jf=pf[Pf];if(jf.empty())jf.head.line>Cf&&(c1(this,jf.head.line,Kd,!0),Cf=jf.head.line,Pf==this.doc.sel.primIndex&&X_(this));else{var Qf=jf.from(),ih=jf.to(),vh=Math.max(Cf,Qf.line);Cf=Math.min(this.lastLine(),ih.line-(ih.ch?0:1))+1;for(var Ch=vh;Ch<Cf;++Ch)c1(this,Ch,Kd);var qh=this.doc.sel.ranges;Qf.ch==0&&pf.length==qh.length&&qh[Pf].from().ch>0&&l0(this.doc,Pf,new O_(Qf,qh[Pf].to()),Vf)}}}),getTokenAt:function(Kd,pf){return ab(this,Kd,pf)},getLineTokens:function(Kd,pf){return ab(this,mm(Kd),pf,!0)},getTokenTypeAt:function(Kd){Kd=a_(this.doc,Kd);var pf=R0(this,Dm(this.doc,Kd.line)),Cf=0,Pf=(pf.length-1)/2,jf=Kd.ch,Qf;if(jf==0)Qf=pf[2];else for(;;){var ih=Cf+Pf>>1;if((ih?pf[ih*2-1]:0)>=jf)Pf=ih;else if(pf[ih*2+1]<jf)Cf=ih+1;else{Qf=pf[ih*2+2];break}}var vh=Qf?Qf.indexOf("overlay "):-1;return vh<0?Qf:vh==0?null:Q
2024-11-28 09:28:59 +08:00
` ,Nm=Bh(fm,Uh)?"w":qh&&fm== `
2024-12-08 09:17:51 +08:00
` ?"n":!qh||/ \s /.test(fm)?null:"p";if(qh&&!om&&!Nm&&(Nm="s"),Ch&&Ch!=Nm){Qd<0&&(Qd=1,vh(),Ud.sticky="after");break}if(Nm&&(Ch=Nm),Qd>0&&!vh(!om))break}var $ m=vv(kd,Ud,Cf,Pf,!0);return Og(Cf, $ m)&&( $ m.hitSide=!0), $ m}function f1(kd,Ud,Qd,Kd){var pf=kd.doc,Cf=Ud.left,Pf;if(Kd=="page"){var jf=Math.min(kd.display.wrapper.clientHeight,Jf(kd).innerHeight||pf(kd).documentElement.clientHeight),Qf=Math.max(jf-.5*v0(kd.display),3);Pf=(Qd>0?Ud.bottom:Ud.top)+Qd*Qf}else Kd=="line"&&(Pf=Qd>0?Ud.bottom+3:Ud.top-3);for(var ih;ih=A_(kd,Cf,Pf),!!ih.outside;){if(Qd<0?Pf<=0:Pf>=pf.height){ih.hitSide=!0;break}Pf+=Qd*5}return ih}var R_=function(kd){this.cm=kd,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new qf,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};R_.prototype.init=function(kd){var Ud=this,Qd=this,Kd=Qd.cm,pf=Qd.div=kd.lineDiv;pf.contentEditable=!0,d1(pf,Kd.options.spellcheck,Kd.options.autocorrect,Kd.options.autocapitalize);function Cf(jf){for(var Qf=jf.target;Qf;Qf=Qf.parentNode){if(Qf==pf)return!0;if(/ \b CodeMirror-(?:line)?widget \b /.test(Qf.className))break}return!1}sm(pf,"paste",function(jf){!Cf(jf)||Zm(Kd,jf)||j0(jf,Kd)||fd<=11&&setTimeout(P_(Kd,function(){return Ud.updateFromDOM()}),20)}),sm(pf,"compositionstart",function(jf){Ud.composing={data:jf.data,done:!1}}),sm(pf,"compositionupdate",function(jf){Ud.composing||(Ud.composing={data:jf.data,done:!1})}),sm(pf,"compositionend",function(jf){Ud.composing&&(jf.data!=Ud.composing.data&&Ud.readFromDOMSoon(),Ud.composing.done=!0)}),sm(pf,"touchstart",function(){return Qd.forceCompositionEnd()}),sm(pf,"input",function(){Ud.composing||Ud.readFromDOMSoon()});function Pf(jf){if(!(!Cf(jf)||Zm(Kd,jf))){if(Kd.somethingSelected())Q1({lineWise:!1,text:Kd.getSelections()}),jf.type=="cut"&&Kd.replaceSelection("",null,"cut");else if(Kd.options.lineWiseCopyCut){var Qf=Z1(Kd);Q1({lineWise:!0,text:Qf.text}),jf.type=="cut"&&Kd.operation(function(){Kd.setSelections(Qf.ranges,0,Vf),Kd.replaceSelection("",null,"cut")})}else return;if(jf.clipboardData){jf.clipboardData.clearData();var ih=u0.text.join( `
2024-11-28 09:28:59 +08:00
` );if(jf.clipboardData.setData("Text",ih),jf.clipboardData.getData("Text")==ih){jf.preventDefault();return}}var vh=p1(),Ch=vh.firstChild;d1(Ch),Kd.display.lineSpace.insertBefore(vh,Kd.display.lineSpace.firstChild),Ch.value=u0.text.join( `
2024-12-08 09:17:51 +08:00
` );var qh=Kf(zf(pf)); $ f(Ch),setTimeout(function(){Kd.display.lineSpace.removeChild(vh),qh.focus(),qh==pf&&Qd.showPrimarySelection()},50)}}sm(pf,"copy",Pf),sm(pf,"cut",Pf)},R_.prototype.screenReaderLabelChanged=function(kd){kd?this.div.setAttribute("aria-label",kd):this.div.removeAttribute("aria-label")},R_.prototype.prepareSelection=function(){var kd=By(this.cm,!1);return kd.focus=Kf(zf(this.div))==this.div,kd},R_.prototype.showSelection=function(kd,Ud){!kd||!this.cm.display.view.length||((kd.focus||Ud)&&this.showPrimarySelection(),this.showMultipleSelections(kd))},R_.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},R_.prototype.showPrimarySelection=function(){var kd=this.getSelection(),Ud=this.cm,Qd=Ud.doc.sel.primary(),Kd=Qd.from(),pf=Qd.to();if(Ud.display.viewTo==Ud.display.viewFrom||Kd.line>=Ud.display.viewTo||pf.line<Ud.display.viewFrom){kd.removeAllRanges();return}var Cf=Eg(Ud,kd.anchorNode,kd.anchorOffset),Pf=Eg(Ud,kd.focusNode,kd.focusOffset);if(!(Cf&&!Cf.bad&&Pf&&!Pf.bad&&i_(Hg(Cf,Pf),Kd)==0&&i_(h0(Cf,Pf),pf)==0)){var jf=Ud.display.view,Qf=Kd.line>=Ud.display.viewFrom&&yb(Ud,Kd)||{node:jf[0].measure.map[2],offset:0},ih=pf.line<Ud.display.viewTo&&yb(Ud,pf);if(!ih){var vh=jf[jf.length-1].measure,Ch=vh.maps?vh.maps[vh.maps.length-1]:vh.map;ih={node:Ch[Ch.length-1],offset:Ch[Ch.length-2]-Ch[Ch.length-3]}}if(!Qf||!ih){kd.removeAllRanges();return}var qh=kd.rangeCount&&kd.getRangeAt(0),Uh;try{Uh=Tf(Qf.node,Qf.offset,ih.offset,ih.node)}catch{}Uh&&(!ld&&Ud.state.focused?(kd.collapse(Qf.node,Qf.offset),Uh.collapsed||(kd.removeAllRanges(),kd.addRange(Uh))):(kd.removeAllRanges(),kd.addRange(Uh)),qh&&kd.anchorNode==null?kd.addRange(qh):ld&&this.startGracePeriod()),this.rememberSelection()}},R_.prototype.startGracePeriod=function(){var kd=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){kd.gracePeriod=!1,kd.selectionChanged()&&kd.cm.operation(function(){return kd.cm.curOp.selectionChanged=!0})},20)},R_.prototype.showMultipleSelections=function(kd){Sf(this.cm.display.cursorDiv,kd.cursors),Sf(this.cm.display.selectionDiv,kd.selection)},R_.prototype.rememberSelection=function(){var kd=this.getSelection();this.lastAnchorNode=kd.anchorNode,this.lastAnchorOffset=kd.anchorOffset,this.lastFocusNode=kd.focusNode,this.lastFocusOffset=kd.focusOffset},R_.prototype.selectionInEditor=function(){var kd=this.getSelection();if(!kd.rangeCount)return!1;var Ud=kd.getRangeAt(0).commonAncestorContainer;return Mf(this.div,Ud)},R_.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Kf(zf(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},R_.prototype.blur=function(){this.div.blur()},R_.prototype.getField=function(){return this.div},R_.prototype.supportsTouch=function(){return!0},R_.prototype.receivedFocus=function(){var kd=this,Ud=this;this.selectionInEditor()?setTimeout(function(){return kd.pollSelection()},20):Ng(this.cm,function(){return Ud.cm.curOp.selectionChanged=!0});function Qd(){Ud.cm.state.focused&&(Ud.pollSelection(),Ud.polling.set(Ud.cm.options.pollInterval,Qd))}this.polling.set(this.cm.options.pollInterval,Qd)},R_.prototype.selectionChanged=function(){var kd=this.getSelection();return kd.anchorNode!=this.lastAnchorNode||kd.anchorOffset!=this.lastAnchorOffset||kd.focusNode!=this.lastFocusNode||kd.focusOffset!=this.lastFocusOffset},R_.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var kd=this.getSelection(),Ud=this.cm;if(Bd&&Ad&&this.cm.display.gutterSpecs.length&&rT(kd.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var Qd=Eg(Ud,kd.anchorNode,kd.anchorOffset),Kd=Eg(Ud,kd.focusNode,kd.focusOffset);Qd&&Kd&&Ng(Ud,function(){Cg(Ud.doc,fb(Qd,Kd),Vf),(Qd.bad||Kd.bad)&&(Ud.curOp.selectionChanged=!0)})}}},R_.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMT
` ), $ f(pf))}else return;Pf.type=="cut"&&(Kd.state.cutIncoming=+new Date)}}sm(pf,"cut",Cf),sm(pf,"copy",Cf),sm(kd.scroller,"paste",function(Pf){if(!(I_(kd,Pf)||Zm(Kd,Pf))){if(!pf.dispatchEvent){Kd.state.pasteIncoming=+new Date,Qd.focus();return}var jf=new Event("paste");jf.clipboardData=Pf.clipboardData,pf.dispatchEvent(jf)}}),sm(kd.lineSpace,"selectstart",function(Pf){I_(kd,Pf)||Qm(Pf)}),sm(pf,"compositionstart",function(){var Pf=Kd.getCursor("from");Qd.composing&&Qd.composing.range.clear(),Qd.composing={start:Pf,range:Kd.markText(Pf,Kd.getCursor("to"),{className:"CodeMirror-composing"})}}),sm(pf,"compositionend",function(){Qd.composing&&(Qd.poll(),Qd.composing.range.clear(),Qd.composing=null)})},ng.prototype.createField=function(kd){this.wrapper=p1(),this.textarea=this.wrapper.firstChild;var Ud=this.cm.options;d1(this.textarea,Ud.spellcheck,Ud.autocorrect,Ud.autocapitalize)},ng.prototype.screenReaderLabelChanged=function(kd){kd?this.textarea.setAttribute("aria-label",kd):this.textarea.removeAttribute("aria-label")},ng.prototype.prepareSelection=function(){var kd=this.cm,Ud=kd.display,Qd=kd.doc,Kd=By(kd);if(kd.options.moveInputWithCursor){var pf=im(kd,Qd.sel.primary().head,"div"),Cf=Ud.wrapper.getBoundingClientRect(),Pf=Ud.lineDiv.getBoundingClientRect();Kd.teTop=Math.max(0,Math.min(Ud.wrapper.clientHeight-10,pf.top+Pf.top-Cf.top)),Kd.teLeft=Math.max(0,Math.min(Ud.wrapper.clientWidth-10,pf.left+Pf.left-Cf.left))}return Kd},ng.prototype.showSelection=function(kd){var Ud=this.cm,Qd=Ud.display;Sf(Qd.cursorDiv,kd.cursors),Sf(Qd.selectionDiv,kd.selection),kd.teTop!=null&&(this.wrapper.style.top=kd.teTop+"px",this.wrapper.style.left=kd.teLeft+"px")},ng.prototype.reset=function(kd){if(!(this.contextMenuPending||this.composing&&kd)){var Ud=this.cm;if(this.resetting=!0,Ud.somethingSelected()){this.prevInput="";var Qd=Ud.getSelection();this.textarea.value=Qd,Ud.state.focused&& $ f(this.textarea),pd&&fd>=9&&(this.hasSelection=Qd)}else kd||(this.prevInput=this.textarea.value="",pd&&fd>=9&&(this.hasSelection=null));this.resetting=!1}},ng.prototype.getField=function(){return this.textarea},ng.prototype.supportsTouch=function(){return!1},ng.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!jd||Kf(zf(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},ng.prototype.blur=function(){this.textarea.blur()},ng.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ng.prototype.receivedFocus=function(){this.slowPoll()},ng.prototype.slowPoll=function(){var kd=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){kd.poll(),kd.cm.state.focused&&kd.slowPoll()})},ng.prototype.fastPoll=function(){var kd=!1,Ud=this;Ud.pollingFast=!0;function Qd(){var Kd=Ud.poll();!Kd&&!kd?(kd=!0,Ud.polling.set(60,Qd)):(Ud.pollingFast=!1,Ud.slowPoll())}Ud.polling.set(20,Qd)},ng.prototype.poll=function(){var kd=this,Ud=this.cm,Qd=this.textarea,Kd=this.prevInput;if(this.contextMenuPending||this.resetting||!Ud.state.focused||th(Qd)&&!Kd&&!this.composing||Ud.isReadOnly()||Ud.options.disableInput||Ud.state.keySeq)return!1;var pf=Qd.value;if(pf==Kd&&!Ud.somethingSelected())return!1;if(pd&&fd>=9&&this.hasSelection===pf||Hd&&/[ \u f700- \u f7ff]/.test(pf))return Ud.display.input.reset(),!1;if(Ud.doc.sel==Ud.display.selForContextMenu){var Cf=pf.charCodeAt(0);if(Cf==8203&&!Kd&&(Kd=" "),Cf==8666)return this.reset(),this.cm.execCommand("undo")}for(var Pf=0,jf=Math.min(Kd.length,pf.length);Pf<jf&&Kd.charCodeAt(Pf)==pf.charCodeAt(Pf);)++Pf;return Ng(Ud,function(){TE(Ud,pf.slice(Pf),Kd.length-Pf,null,kd.composing?"*compose":null),pf.length>1e3||pf.indexOf( `
` )>-1?Qd.value=kd.prevInput="":kd.prevInput=pf,kd.composing&&(kd.composing.range.clear(),kd.composing.range=Ud.markText(kd.composing.start,Ud.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ng.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ng.prototype.onKeyPress=function(){pd&&fd>=9&&(this.hasSelection=null),this.fastPoll()},ng.prototype.onContextMenu=function(kd){var Ud=this,Qd=Ud.cm,Kd=Qd.display,pf=Ud.textarea;Ud.contextMenuPending&&Ud.contextMenuPending();var Cf=P0(Qd,kd),Pf=Kd.scroller.scrollTop;if(!Cf||Id)return;var jf=Qd.options.resetSelectionOnContextMenu;jf&&Qd.doc.sel.contains(Cf)==-1&&P_(Qd,Cg)(Qd.doc,fb(Cf),Vf);var Qf=pf.style.cssText,ih=Ud.wrapper.style.cssText,vh=Ud.wrapper.offsetParent.getBoundingClientRect();Ud.wrapper.style.cssText="position: static",pf.style.cssText= ` position : absolute ; width : 30 px ; height : 30 px ;
2024-11-28 09:28:59 +08:00
top : ` +(kd.clientY-vh.top-5)+"px; left: "+(kd.clientX-vh.left-5)+ ` px ;
z - index : 1000 ; background : ` +(pd?"rgba(255, 255, 255, .05)":"transparent")+ ` ;
2024-12-08 09:17:51 +08:00
outline : none ; border - width : 0 ; outline : none ; overflow : hidden ; opacity : . 05 ; filter : alpha ( opacity = 5 ) ; ` ;var Ch;md&&(Ch=pf.ownerDocument.defaultView.scrollY),Kd.input.focus(),md&&pf.ownerDocument.defaultView.scrollTo(null,Ch),Kd.input.reset(),Qd.somethingSelected()||(pf.value=Ud.prevInput=" "),Ud.contextMenuPending=Uh,Kd.selForContextMenu=Qd.doc.sel,clearTimeout(Kd.detectingSelectAll);function qh(){if(pf.selectionStart!=null){var fm=Qd.somethingSelected(),Nm=" "+(fm?pf.value:"");pf.value="⇚",pf.value=Nm,Ud.prevInput=fm?"":" ",pf.selectionStart=1,pf.selectionEnd=Nm.length,Kd.selForContextMenu=Qd.doc.sel}}function Uh(){if(Ud.contextMenuPending==Uh&&(Ud.contextMenuPending=!1,Ud.wrapper.style.cssText=ih,pf.style.cssText=Qf,pd&&fd<9&&Kd.scrollbars.setScrollTop(Kd.scroller.scrollTop=Pf),pf.selectionStart!=null)){(!pd||pd&&fd<9)&&qh();var fm=0,Nm=function(){Kd.selForContextMenu==Qd.doc.sel&&pf.selectionStart==0&&pf.selectionEnd>0&&Ud.prevInput==" "?P_(Qd,yv)(Qd):fm++<10?Kd.detectingSelectAll=setTimeout(Nm,500):(Kd.selForContextMenu=null,Kd.input.reset())};Kd.detectingSelectAll=setTimeout(Nm,200)}}if(pd&&fd>=9&&qh(),Jd){G_(kd);var om=function(){Rm(window,"mouseup",om),setTimeout(Uh,20)};sm(window,"mouseup",om)}else setTimeout(Uh,50)},ng.prototype.readOnlyChanged=function(kd){kd||this.reset(),this.textarea.disabled=kd=="nocursor",this.textarea.readOnly=!!kd},ng.prototype.setUneditable=function(){},ng.prototype.needsContentAttribute=!1;function v2(kd,Ud){if(Ud=Ud?yf(Ud):{},Ud.value=kd.value,!Ud.tabindex&&kd.tabIndex&&(Ud.tabindex=kd.tabIndex),!Ud.placeholder&&kd.placeholder&&(Ud.placeholder=kd.placeholder),Ud.autofocus==null){var Qd=Kf(zf(kd));Ud.autofocus=Qd==kd||kd.getAttribute("autofocus")!=null&&Qd==document.body}function Kd(){kd.value=jf.getValue()}var pf;if(kd.form&&(sm(kd.form,"submit",Kd),!Ud.leaveSubmitMethodAlone)){var Cf=kd.form;pf=Cf.submit;try{var Pf=Cf.submit=function(){Kd(),Cf.submit=pf,Cf.submit(),Cf.submit=Pf}}catch{}}Ud.finishInit=function(Qf){Qf.save=Kd,Qf.getTextArea=function(){return kd},Qf.toTextArea=function(){Qf.toTextArea=isNaN,Kd(),kd.parentNode.removeChild(Qf.getWrapperElement()),kd.style.display="",kd.form&&(Rm(kd.form,"submit",Kd),!Ud.leaveSubmitMethodAlone&&typeof kd.form.submit=="function"&&(kd.form.submit=pf))}},kd.style.display="none";var jf=w_(function(Qf){return kd.parentNode.insertBefore(Qf,kd.nextSibling)},Ud);return jf}function iT(kd){kd.off=Rm,kd.on=sm,kd.wheelEventPixels=H2,kd.Doc=kg,kd.splitLines=If,kd.countColumn=Bf,kd.findColumn=wf,kd.isWordChar=Yh,kd.Pass=kf,kd.signal=Hm,kd.Line=_0,kd.changeEnd=hb,kd.scrollbarModel=jb,kd.Pos=mm,kd.cmpPos=i_,kd.modes=yh,kd.mimeModes=Rh,kd.resolveMode=Jh,kd.getMode=um,kd.modeExtensions=Um,kd.extendMode=Tm,kd.copyState=zm,kd.startState=C_,kd.innerMode=S_,kd.commands=a1,kd.keyMap=L0,kd.keyName=t1,kd.isModifierKey=q1,kd.lookupKey=Xg,kd.normalizeKeyMap=Kg,kd.StringStream=d_,kd.SharedTextMarker=Cv,kd.TextMarker=w0,kd.LineWidget=Wb,kd.e_preventDefault=Qm,kd.e_stopPropagation=F_,kd.e_stop=G_,kd.addClass=Zf,kd.contains=Mf,kd.rmClass=_f,kd.keyNames=yg}yE(w_),Rv(w_);var y2="iter insert remove copy getEditor constructor".split(" ");for(var ry in kg.prototype)kg.prototype.hasOwnProperty(ry)&&oh(y2,ry)<0&&(w_.prototype[ry]=function(kd){return function(){return kd.apply(this.doc,arguments)}}(kg.prototype[ry]));return T_(kg),w_.inputStyles={textarea:ng,contenteditable:R_},w_.defineMode=function(kd){!w_.defaults.mode&&kd!="null"&&(w_.defaults.mode=kd),wh.apply(this,arguments)},w_.defineMIME=_h,w_.defineMode("null",function(){return{token:function(kd){return kd.skipToEnd()}}}),w_.defineMIME("text/plain","null"),w_.defineExtension=function(kd,Ud){w_.prototype[kd]=Ud},w_.defineDocExtension=function(kd,Ud){kg.prototype[kd]=Ud},w_.fromTextArea=v2,iT(w_),w_.version="5.65.18",w_})}(codemirror)),codemirror.exports}var codemirrorExports=requireCodemirror();const CodeMirror=getDefaultExportFromCjs(codemirrorExports),useStore=defineStore("store",()=>{const Ra=useDark(),qa=useToggle(Ra),nd=useStorage("isMacCodeBlock",!0),od=useToggle(nd),ld=useStorage("isEditOnLeft",!
2024-09-18 09:46:23 +08:00
< style >
. hljs . code _ _pre > . mac - sign {
2024-11-22 15:41:57 +08:00
display : flex ;
2024-09-18 09:46:23 +08:00
}
< / s t y l e >
2024-12-08 09:17:51 +08:00
` ),Vf+= `
2024-11-22 15:41:57 +08:00
< style >
. code _ _pre {
padding : 0 ! important ;
}
. hljs . code _ _pre code {
display : - webkit - box ;
padding : 0.5 em 1 em 1 em ;
overflow - x : auto ;
text - indent : 0 ;
}
< / s t y l e >
2024-12-08 09:17:51 +08:00
` ,md.value=Vf},Tf=()=>{const Vf=css2json(Gd.value.getValue()),fh=customCssWithTemplate(Vf,Id.value,customizeTheme(themeMap[vd.value],{fontSize:Pd.value,color:Id.value}));gf.setOptions({theme:fh}),bf()};onMounted(()=>{const Vf=document.querySelector("#cssEditor");Vf.value=Jd().content;const fh=Ra.value?"darcula":"xq-light";Gd.value=markRaw(CodeMirror.fromTextArea(Vf,{mode:"css",theme:fh,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(wf){formatDoc(wf.getValue(),"css").then(Rf=>{Jd().content=Rf,wf.setValue(Rf)})}}})),Gd.value.on("keyup",(Gf,wf)=>{(wf.keyCode>=65&&wf.keyCode<=90||wf.keyCode===189)&&Gf.showHint(wf)}),Gd.value.on("update",()=>{Tf(),Jd().content=Gd.value.getValue()})}),watch(Ra,()=>{var fh,Gf;const Vf=Ra.value?"darcula":"xq-light";(Gf=(fh=toRaw(Gd.value))==null?void 0:fh.setOption)==null||Gf.call(fh,"theme",Vf)});const Mf=()=>{cd.value=!1,nd.value=!0,vd.value=themeOptions[0].value,Ad.value=fontFamilyOptions[0].value,Ad.value=fontFamilyOptions[0].value,Nd.value=fontSizeOptions[2].value,Id.value=colorOptions[0].value,Od.value=codeBlockThemeOptions[2].value,Fd.value=legendOptions[3].value,Wd.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:df.value||DEFAULT_CSS_CONTENT}]},Gd.value.setValue(DEFAULT_CSS_CONTENT),Tf(),bf()},Kf=Vf=>(...fh)=>{Vf(...fh),bf()},Zf=(Vf,fh)=>{const Gf=themeMap[vd.value],wf=Number(Vf.replace("px",""));return customCssWithTemplate(css2json(Jd().content),fh,customizeTheme(Gf,{fontSize:wf,color:fh}))},eh=Kf(Vf=>{gf.setOptions({theme:customCssWithTemplate(css2json(Jd().content),Id.value,customizeTheme(themeMap[Vf],{fontSize:Pd.value}))}),vd.value=Vf}), $ f=Kf(Vf=>{gf.setOptions({fonts:Vf}),Ad.value=Vf}),Df=Kf(Vf=>{const fh=Zf(Vf,Id.value);gf.setOptions({size:Vf,theme:fh}),Nd.value=Vf}),Lf=Kf(Vf=>{const fh=Zf(Nd.value,Vf);gf.setOptions({theme:fh}),Id.value=Vf}),zf=Kf(Vf=>{Od.value=Vf}),Jf=Kf(Vf=>{Fd.value=Vf}),xf=Kf(()=>{od()}),yf=Kf(()=>{dd()}),Bf=Kf(()=>{fd()});return{isDark:Ra,toggleDark:qa,isEditOnLeft:ld,toggleEditOnLeft:ud,isMacCodeBlock:nd,isCiteStatus:cd,citeStatusChanged:yf,isUseIndent:pd,useIndentChanged:Bf,output:md,editor:Md,cssEditor:Gd,theme:vd,fontFamily:Ad,fontSize:Nd,primaryColor:Id,codeBlockTheme:Od,legend:Fd,editorRefresh:bf,themeChanged:eh,fontChanged: $ f,sizeChanged:Df,colorChanged:Lf,codeBlockThemeChanged:zf,legendChanged:Jf,macCodeBlockChanged:xf,formatContent:jd,exportEditorContent2HTML:()=>{exportHTML(),document.querySelector("#output").innerHTML=md.value},exportEditorContent2MD:()=>{downloadMD(Md.value.getValue())},importMarkdownContent:()=>{const Vf=document.body,fh=document.createElement("input");fh.type="file",fh.name="filename",fh.accept=".md",fh.onchange=()=>{const Gf=fh.files[0];if(!Gf)return;const wf=new FileReader;wf.readAsText(Gf),wf.onload=Rf=>{Md.value.setValue(Rf.target.result),ElMessage.success("文档导入成功")}},Vf.appendChild(fh),fh.click(),Vf.removeChild(fh)},resetStyleConfirm:()=>{ElMessageBox.confirm("此操作将丢失本地自定义样式,是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then(()=>{Mf(),ElMessage({type:"success",message:"样式重置成功~"})}).catch(()=>{Md.value.focus()})},editorContent:Bd,cssContentConfig:Wd,addCssContentTab:vf,validatorTabName:Sf,setCssEditorValue:zd,tabChanged:Xd,renameTab:_f}}),useDisplayStore=defineStore("display",()=>{const Ra=ref $ 1(!1),qa=useToggle(Ra),nd=ref $ 1(!1),od=useToggle(nd),ld=ref $ 1(!1),ud=useToggle(ld);return{isShowCssEditor:Ra,toggleShowCssEditor:qa,isShowInsertFormDialog:nd,toggleShowInsertFormDialog:od,isShowUploadImgDialog:ld,toggleShowUploadImgDialog:ud}}),_sfc_main $ N=defineComponent({__name:"CssEditor",setup(Ra){const qa=useStore(),nd=useDisplayStore();function od(){ElMessageBox.prompt("请输入新的方案名称","编辑方案名称",{confirmButtonText:"确认",cancelButtonText:"取消",inputValue:qa.cssContentConfig.active,inputErrorMessage:"不能与现有方案重名",inputValidator:qa.validatorTabName}).then(({value:ud})
2024-09-18 09:46:23 +08:00
` )].join( `
2024-12-08 09:17:51 +08:00
` ))}return()=>ud.value||ld.value||dd.value?h $ 1(qa.default({present:dd})[0],{ref:md=>{const vd= $ e(md);return typeof(vd==null?void 0:vd.hasAttribute)>"u"||(vd!=null&&vd.hasAttribute("data-radix-popper-content-wrapper")?cd.value=vd.firstElementChild:cd.value=vd),vd}}):null}}),[et,Xi]=Q("DialogRoot"),Zi=defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const nd=Ra,od=ne(nd,"open",qa,{defaultValue:nd.defaultOpen,passive:nd.open===void 0}),ld=ref $ 1(),ud=ref $ 1(),{modal:cd}=toRefs(nd);return Xi({open:od,modal:cd,openModal:()=>{od.value=!0},onOpenChange:dd=>{od.value=dd},onOpenToggle:()=>{od.value=!od.value},contentId:"",titleId:"",descriptionId:"",triggerElement:ld,contentElement:ud}),(dd,pd)=>renderSlot(dd. $ slots,"default",{open:unref(od)})}}),nt=defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=ja();return(nd,od)=>unref(qa)||nd.forceMount?(openBlock(),createBlock(Teleport $ 1,{key:0,to:nd.to,disabled:nd.disabled},[renderSlot(nd. $ slots,"default")],8,["to","disabled"])):createCommentVNode("",!0)}}),xv=defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(nd,od)=>(openBlock(),createBlock(unref(nt),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(nd. $ slots,"default")]),_:3},16))}}),Qi="dismissableLayer.pointerDownOutside",eu="dismissableLayer.focusOutside";function zl(Ra,qa){const nd=qa.closest("[data-dismissable-layer]"),od=Ra.dataset.dismissableLayer===""?Ra:Ra.querySelector("[data-dismissable-layer]"),ld=Array.from(Ra.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(nd&&od===nd||ld.indexOf(od)<ld.indexOf(nd))}function Kl(Ra,qa){var nd;const od=((nd=qa==null?void 0:qa.value)==null?void 0:nd.ownerDocument)??(globalThis==null?void 0:globalThis.document),ld=ref $ 1(!1),ud=ref $ 1(()=>{});return watchEffect(cd=>{if(!qe)return;const dd=async fd=>{const md=fd.target;if(qa!=null&&qa.value){if(zl(qa.value,md)){ld.value=!1;return}if(fd.target&&!ld.value){let vd=function(){Ht(Qi,Ra,Ad)};const Ad={originalEvent:fd};fd.pointerType==="touch"?(od.removeEventListener("click",ud.value),ud.value=vd,od.addEventListener("click",ud.value,{once:!0})):vd()}else od.removeEventListener("click",ud.value);ld.value=!1}},pd=window.setTimeout(()=>{od.addEventListener("pointerdown",dd)},0);cd(()=>{window.clearTimeout(pd),od.removeEventListener("pointerdown",dd),od.removeEventListener("click",ud.value)})}),{onPointerDownCapture:()=>ld.value=!0}}function Hl(Ra,qa){var nd;const od=((nd=qa==null?void 0:qa.value)==null?void 0:nd.ownerDocument)??(globalThis==null?void 0:globalThis.document),ld=ref $ 1(!1);return watchEffect(ud=>{if(!qe)return;const cd=async dd=>{qa!=null&&qa.value&&(await nextTick $ 1(),!(!qa.value||zl(qa.value,dd.target))&&dd.target&&!ld.value&&Ht(eu,Ra,{originalEvent:dd}))};od.addEventListener("focusin",cd),ud(()=>od.removeEventListener("focusin",cd))}),{onFocusCapture:()=>ld.value=!0,onBlurCapture:()=>ld.value=!1}}const je=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yt=defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(Ra,{emit:qa}){const nd=Ra,od=qa,{forwardRef:ld,currentElement:ud}=R $ 1(),cd=computed(()=>{var Id;return((Id=ud.value)==null?void 0:Id.ownerDocument)??globalThis.document}),dd=computed(()=>je.layersRoot),pd=computed(()=>ud.value?Array.from(dd.value).indexOf(ud.value):-1),fd=computed(()=>je.layersWithOutsidePointerEventsDisabled.size>0),md=computed(()=>{const Id=Array.from(dd.value),[Od]=[...je.layersWithOutsidePointerEventsDisabled].slice(-1),Fd=Id.indexOf(Od);return pd.value>=Fd}),vd=Kl(async Id=>{const Od=[...je.branches].some(Fd=>Fd==null?void 0:Fd.contains(Id
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const toKebabCase=Ra=>Ra.replace(/ ( [ a - z0 - 9 ] ) ( [ A - Z ] ) / g , "$1-$2" ) . toLowerCase ( ) ; / * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /var defaultAttributes={xmlns:"http:/ / www . w3 . org / 2000 / svg ",width:24,height:24,viewBox:" 0 0 24 24 ",fill:" none ",stroke:" currentColor "," stroke - width ":2," stroke - linecap ":" round "," stroke - linejoin ":" round " } ; / * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-11-28 09:28:59 +08:00
* / c o n s t I c o n = ( { s i z e : R a , s t r o k e W i d t h : q a = 2 , a b s o l u t e S t r o k e W i d t h : n d , c o l o r : o d , i c o n N o d e : l d , n a m e : u d , c l a s s : c d , . . . d d } , { s l o t s : p d } ) = > h $ 1 ( " s v g " , { . . . d e f a u l t A t t r i b u t e s , w i d t h : R a | | d e f a u l t A t t r i b u t e s . w i d t h , h e i g h t : R a | | d e f a u l t A t t r i b u t e s . h e i g h t , s t r o k e : o d | | d e f a u l t A t t r i b u t e s . s t r o k e , " s t r o k e - w i d t h " : n d ? N u m b e r ( q a ) * 2 4 / N u m b e r ( R a ) : q a , c l a s s : [ " l u c i d e " , ` l u c i d e - $ { t o K e b a b C a s e ( u d ? ? " i c o n " ) } ` ] , . . . d d } , [ . . . l d . m a p ( f d = > h $ 1 ( . . . f d ) ) , . . . p d . d e f a u l t ? [ p d . d e f a u l t ( ) ] : [ ] ] ) ; / * *
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-11-28 09:28:59 +08:00
* /const createLucideIcon=(Ra,qa)=>(nd,{slots:od})=>h$1(Icon,{...nd,iconNode:qa,name:Ra},od);/ * *
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Check=createLucideIcon("CheckIcon",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronDown=createLucideIcon("ChevronDownIcon",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronRight=createLucideIcon("ChevronRightIcon",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const ChevronUp=createLucideIcon("ChevronUpIcon",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const CloudUpload=createLucideIcon("CloudUploadIcon",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Moon=createLucideIcon("MoonIcon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Paintbrush=createLucideIcon("PaintbrushIcon",[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Sun=createLucideIcon("SunIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
* /const Table=createLucideIcon("TableIcon",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/ * *
2024-11-28 09:28:59 +08:00
* @ license lucide - vue - next v0 . 462.0 - ISC
2024-09-18 09:46:23 +08:00
*
* This source code is licensed under the ISC license .
* See the LICENSE file in the root directory of this source tree .
2024-12-08 09:17:51 +08:00
* / c o n s t X = c r e a t e L u c i d e I c o n ( " X I c o n " , [ [ " p a t h " , { d : " M 1 8 6 6 1 8 " , k e y : " 1 b l 5 f 8 " } ] , [ " p a t h " , { d : " m 6 6 1 2 1 2 " , k e y : " d 8 b k 6 v " } ] ] ) , _ s f c _ m a i n $ K = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e : { } , s i d e O f f s e t : { d e f a u l t : 8 } , a l i g n : { d e f a u l t : " s t a r t " } , a l i g n O f f s e t : { d e f a u l t : - 4 } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : l d , . . . u d } = q a ; r e t u r n u d } ) , o d = I t ( n d ) ; r e t u r n ( l d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( K h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( H h ) , m e r g e P r o p s ( u n r e f ( o d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 4 8 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d s h a d o w - m d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l o s e d ] : z o o m - o u t - 9 5 d a t a - [ s t a t e = o p e n ] : z o o m - i n - 9 5 d a t a - [ s i d e = b o t t o m ] : s l i d e - i n - f r o m - t o p - 2 d a t a - [ s i d e = l e f t ] : s l i d e - i n - f r o m - r i g h t - 2 d a t a - [ s i d e = r i g h t ] : s l i d e - i n - f r o m - l e f t - 2 d a t a - [ s i d e = t o p ] : s l i d e - i n - f r o m - b o t t o m - 2 " , q a . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( l d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ] ) , _ : 3 } ) ) } } ) , _ s f c _ m a i n $ J = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r I t e m " , p r o p s : { d i s a b l e d : { t y p e : B o o l e a n } , t e x t V a l u e : { } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } , i n s e t : { t y p e : B o o l e a n } } , e m i t s : [ " s e l e c t " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t n d = R a , o d = q a , l d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : c d , . . . d d } = n d ; r e t u r n d d } ) , u d = x e ( l d , o d ) ; r e t u r n ( c d , d d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( j h ) , m e r g e P r o p s ( u n r e f ( u d ) , { c l a s s : u n r e f ( c n ) ( " r e l a t i v e f l e x c u r s o r - d e f a u l t s e l e c t - n o n e i t e m s - c e n t e r r o u n d e d - s m p x - 2 p y - 1 . 5 t e x t - s m o u t l i n e - n o n e f o c u s : b g - a c c e n t f o c u s : t e x t - a c c e n t - f o r e g r o u n d d a t a - [ d i s a b l e d ] : p o i n t e r - e v e n t s - n o n e d a t a - [ d i s a b l e d ] : o p a c i t y - 5 0 " , c d . i n s e t & & " p l - 8 " , n d . c l a s s ) } ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( c d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ I = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r M e n u " , p r o p s : { v a l u e : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( n d , o d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( L h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( q a ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( n d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ H = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S e p a r a t o r " , p r o p s : { a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a , n d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : l d , . . . u d } = q a ; r e t u r n u d } ) , o d = I t ( n d ) ; r e t u r n ( l d , u d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( G h ) , m e r g e P r o p s ( { c l a s s : u n r e f ( c n ) ( " - m x - 1 m y - 1 h - p x b g - m u t e d " , q a . c l a s s ) } , u n r e f ( o d ) ) , n u l l , 1 6 , [ " c l a s s " ] ) ) } } ) , _ s f c _ m a i n $ G = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S h o r t c u t " , p r o p s : { c l a s s : { } } , s e t u p ( R a ) { c o n s t q a = R a ; r e t u r n ( n d , o d ) = > ( o p e n B l o c k ( ) , c r e a t e E l e m e n t B l o c k ( " s p a n " , { c l a s s : n o r m a l i z e C l a s s ( u n r e f ( c n ) ( " m l - a u t o t e x t - x s t r a c k i n g - w i d e s t t e x t - m u t e d - f o r e g r o u n d " , q a . c l a s s ) ) } , [ r e n d e r S l o t ( n d . $ s l o t s , " d e f a u l t " ) ] , 2 ) ) } } ) , _ s f c _ m a i n $ F = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b " , p r o p s : { d e f a u l t O p e n : { t y p e : B o o l e a n } , o p e n : { t y p e : B o o l e a n } } , e m i t s : [ " u p d a t e : o p e n " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t l d = x e ( R a , q a ) ; r e t u r n ( u d , c d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( Q h ) , n o r m a l i z e P r o p s ( g u a r d R e a c t i v e P r o p s ( u n r e f ( l d ) ) ) , { d e f a u l t : w i t h C t x ( ( ) = > [ r e n d e r S l o t ( u d . $ s l o t s , " d e f a u l t " ) ] ) , _ : 3 } , 1 6 ) ) } } ) , _ s f c _ m a i n $ E = d e f i n e C o m p o n e n t ( { _ _ n a m e : " M e n u b a r S u b C o n t e n t " , p r o p s : { f o r c e M o u n t : { t y p e : B o o l e a n } , l o o p : { t y p e : B o o l e a n } , s i d e O f f s e t : { } , a l i g n O f f s e t : { } , a v o i d C o l l i s i o n s : { t y p e : B o o l e a n } , c o l l i s i o n B o u n d a r y : { } , c o l l i s i o n P a d d i n g : { } , a r r o w P a d d i n g : { } , s t i c k y : { } , h i d e W h e n D e t a c h e d : { t y p e : B o o l e a n } , u p d a t e P o s i t i o n S t r a t e g y : { } , p r i o r i t i z e P o s i t i o n : { t y p e : B o o l e a n } , a s C h i l d : { t y p e : B o o l e a n } , a s : { } , c l a s s : { } } , e m i t s : [ " e s c a p e K e y D o w n " , " p o i n t e r D o w n O u t s i d e " , " f o c u s O u t s i d e " , " i n t e r a c t O u t s i d e " , " e n t r y F o c u s " , " o p e n A u t o F o c u s " , " c l o s e A u t o F o c u s " ] , s e t u p ( R a , { e m i t : q a } ) { c o n s t n d = R a , o d = q a , l d = c o m p u t e d ( ( ) = > { c o n s t { c l a s s : c d , . . . d d } = n d ; r e t u r n d d } ) , u d = x e ( l d , o d ) ; r e t u r n ( c d , d d ) = > ( o p e n B l o c k ( ) , c r e a t e B l o c k ( u n r e f ( K h ) , n u l l , { d e f a u l t : w i t h C t x ( ( ) = > [ c r e a t e V N o d e ( u n r e f ( e y ) , m e r g e P r o p s ( u n r e f ( u d ) , { c l a s s : u n r e f ( c n ) ( " z - 5 0 m i n - w - 3 2 o v e r f l o w - h i d d e n r o u n d e d - m d b o r d e r b g - p o p o v e r p - 1 t e x t - p o p o v e r - f o r e g r o u n d d a t a - [ s t a t e = o p e n ] : a n i m a t e - i n d a t a - [ s t a t e = c l o s e d ] : a n i m a t e - o u t d a t a - [ s t a t e = c l o s e d ] : f a d e - o u t - 0 d a t a - [ s t a t e = o p e n ] : f a d e - i n - 0 d a t a - [ s t a t e = c l
2024-11-28 09:28:59 +08:00
$ { md }
2024-12-08 09:17:51 +08:00
` ,"end"),dd(),od()}function fd(md){md||od(!1)}return(md,vd)=>{const Ad=ElInputNumber,Nd=ElCol,Id=ElRow,Od=ElInput,Fd=_sfc_main $ M;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(nd).isShowInsertFormDialog,"onUpdate:open":fd},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>vd[3]||(vd[3]=[createTextVNode("插入表格")])),_:1})]),_:1}),createVNode(Id,{class:"tb-options",type:"flex",align:"middle",gutter:10},{default:withCtx(()=>[createVNode(Nd,{span:12},{default:withCtx(()=>[vd[4]||(vd[4]=createTextVNode(" 行数: ")),createVNode(Ad,{modelValue:ld.value,"onUpdate:modelValue":vd[0]||(vd[0]=Pd=>ld.value=Pd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1}),createVNode(Nd,{span:12},{default:withCtx(()=>[vd[5]||(vd[5]=createTextVNode(" 列数: ")),createVNode(Ad,{modelValue:ud.value,"onUpdate:modelValue":vd[1]||(vd[1]=Pd=>ud.value=Pd),"controls-position":"right",min:1,max:100,size:"small"},null,8,["modelValue"])]),_:1})]),_:1}),createBaseVNode("table",_hoisted_1 $ 2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ld.value+1,Pd=>(openBlock(),createElementBlock("tr",{key:Pd,class:normalizeClass({"head-style":Pd===1})},[(openBlock(!0),createElementBlock(Fragment,null,renderList(ud.value,Md=>(openBlock(),createElementBlock("td",{key:Md},[createVNode(Od,{modelValue:cd.value[ ` k _$ { Pd - 1 } _$ { Md - 1 } ` ],"onUpdate:modelValue":Bd=>cd.value[ ` k _$ { Pd - 1 } _$ { Md - 1 } ` ]=Bd,align:"center",placeholder:Pd===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])]))),128))],2))),128))]),createVNode(unref(_sfc_main $ n),null,{default:withCtx(()=>[createVNode(Fd,{variant:"outline",onClick:vd[2]||(vd[2]=Pd=>unref(od)(!1))},{default:withCtx(()=>vd[6]||(vd[6]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Fd,{onClick:pd},{default:withCtx(()=>vd[7]||(vd[7]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),InsertFormDialog=_export_sfc(_sfc_main $ a,[["__scopeId","data-v-054300b0"]]),_sfc_main $ 9=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(Ra,{emit:qa}){const nd=qa,od=useDisplayStore(),ld=ref $ 1({repo:"",branch:"",accessToken:""}),ud=ref $ 1({accessKeyId:"",accessKeySecret:"",bucket:"",region:"",path:"",cdnHost:"",useSSL:!0}),cd=ref $ 1({secretId:"",secretKey:"",bucket:"",region:"",path:"",cdnHost:""}),dd=ref $ 1({accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""}),pd=ref $ 1({endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""}),fd=ref $ 1({appID:"",appsecret:""}),md=ref $ 1(window.location.href.startsWith("http")),vd=ref $ 1({code:localStorage.getItem("formCustomConfig")||removeLeft( `
2024-09-18 09:46:23 +08:00
const { file , util , okCb , errCb } = CUSTOM _ARG
const param = new FormData ( )
param . append ( 'file' , file )
util . axios . post ( '${window.location.origin}/upload' , param , {
headers : { 'Content-Type' : 'multipart/form-data' }
} ) . then ( res => {
okCb ( res . url )
} ) . catch ( err => {
errCb ( err )
} )
2024-12-08 09:17:51 +08:00
` ).trim(),editor:null}),Ad=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"mp",label:"公众号素材",disabled:md.value},{value:"formCustom",label:"自定义代码"}],Nd=ref $ 1("default"),Id=ref $ 1(null),Od=ref $ 1("upload");watch(Od,async Jd=>{Jd==="formCustom"&&nextTick $ 1(()=>{var _f;const Xd=Id.value. $ el.querySelector("textarea");(_f=vd.value).editor||(_f.editor=CodeMirror.fromTextArea(Xd,{mode:"javascript"}))})},{immediate:!0}),onBeforeMount(()=>{localStorage.getItem("githubConfig")&&(ld.value=JSON.parse(localStorage.getItem("githubConfig"))),localStorage.getItem("aliOSSConfig")&&(ud.value=JSON.parse(localStorage.getItem("aliOSSConfig"))),localStorage.getItem("txCOSConfig")&&(cd.value=JSON.parse(localStorage.getItem("txCOSConfig"))),localStorage.getItem("qiniuConfig")&&(dd.value=JSON.parse(localStorage.getItem("qiniuConfig"))),localStorage.getItem("minioConfig")&&(pd.value=JSON.parse(localStorage.getItem("minioConfig"))),localStorage.getItem("imgHost")&&(Nd.value=localStorage.getItem("imgHost")),localStorage.getItem("mpConfig")&&(fd.value=JSON.parse(localStorage.getItem("mpConfig")))});function Fd(){localStorage.setItem("imgHost",Nd.value),ElMessage.success("已成功切换图床")}function Pd(){if(!(ld.value.repo&&ld.value.accessToken)){const Jd=ld.value.repo?"token":"GitHub 仓库";ElMessage.error( ` 参数 「 $ { Jd } 」 不能为空 ` );return}localStorage.setItem("githubConfig",JSON.stringify(ld.value)),ElMessage.success("保存成功")}function Md(){if(!(ud.value.accessKeyId&&ud.value.accessKeySecret&&ud.value.bucket&&ud.value.region)){ElMessage.error("阿里云 OSS 参数配置不全");return}localStorage.setItem("aliOSSConfig",JSON.stringify(ud.value)),ElMessage.success("保存成功")}function Bd(){if(!(pd.value.endpoint&&pd.value.bucket&&pd.value.accessKey&&pd.value.secretKey)){ElMessage.error("MinIO 参数配置不全");return}localStorage.setItem("minioConfig",JSON.stringify(pd.value)),ElMessage.success("保存成功")}function jd(){if(!(cd.value.secretId&&cd.value.secretKey&&cd.value.bucket&&cd.value.region)){ElMessage.error("腾讯云 COS 参数配置不全");return}localStorage.setItem("txCOSConfig",JSON.stringify(cd.value)),ElMessage.success("保存成功")}function Hd(){if(!(dd.value.accessKey&&dd.value.secretKey&&dd.value.bucket&&dd.value.domain)){ElMessage.error("七牛云 Kodo 参数配置不全");return}localStorage.setItem("qiniuConfig",JSON.stringify(dd.value)),ElMessage.success("保存成功")}function Gd(){if(!(fd.value.appID&&fd.value.appsecret)){ElMessage.error("公众号图床 参数配置不全");return}localStorage.setItem("mpConfig",JSON.stringify(fd.value)),ElMessage.success("保存成功")}function zd(){const Jd=vd.value.editor.getValue();localStorage.setItem("formCustomConfig",Jd),ElMessage.success("保存成功")}function df(Jd){const Xd=checkImage(Jd);if(!Xd.ok)return ElMessage.error(Xd.msg),!1;let _f=localStorage.getItem("imgHost");_f=_f||"default",localStorage.setItem("imgHost",_f);const vf=localStorage.getItem( ` $ { _f } Config ` );return _f==="default"||vf?!0:(ElMessage.error( ` 请先配置 $ { _f } 图床参数 ` ),!1)}function Wd(Jd){nd("uploadImage",Jd.file)}return(Jd,Xd)=>{const _f=ElOption,vf=ElSelect,Sf=ElIcon,gf=ElUpload,bf=ElTabPane,Tf=ElInput,Mf=ElFormItem,Kf=ElLink,Zf=ElButton,eh=ElForm, $ f=ElSwitch,Df=ElTooltip,Lf=ElTabs;return openBlock(),createBlock(unref(_sfc_main $ p),{open:unref(od).isShowUploadImgDialog,"onUpdate:open":Xd[33]||(Xd[33]=zf=>unref(od).isShowUploadImgDialog=zf)},{default:withCtx(()=>[createVNode(unref(_sfc_main $ o),{class:"max-w-max"},{default:withCtx(()=>[createVNode(unref(_sfc_main $ m),null,{default:withCtx(()=>[createVNode(unref(_sfc_main $ l),null,{default:withCtx(()=>Xd[34]||(Xd[34]=[createTextVNode("本地上传")])),_:1})]),_:1}),createVNode(Lf,{modelValue:Od.value,"onUpdate:modelValue":Xd[32]||(Xd[32]=zf=>Od.value=zf)},{default:withCtx(()=>[createVNode(bf,{class:"upload-panel",label:"选择上传",name:"upload"},{d
2024-11-28 09:28:59 +08:00
` ).forEach(function(cd){ld=cd.indexOf(":"),nd=cd.substring(0,ld).trim().toLowerCase(),od=cd.substring(ld+1).trim(),!(!nd||qa[nd]&&ignoreDuplicateOf[nd])&&(nd==="set-cookie"?qa[nd]?qa[nd].push(od):qa[nd]=[od]:qa[nd]=qa[nd]?qa[nd]+", "+od:od)}),qa}, $ internals=Symbol("internals");function normalizeHeader(Ra){return Ra&&String(Ra).trim().toLowerCase()}function normalizeValue(Ra){return Ra===!1||Ra==null?Ra:utils $ 2.isArray(Ra)?Ra.map(normalizeValue):String(Ra)}function parseTokens(Ra){const qa=Object.create(null),nd=/([^ \s ,;=]+) \s *(?:= \s *([^,;]+))?/g;let od;for(;od=nd.exec(Ra);)qa[od[1]]=od[2];return qa}const isValidHeaderName=Ra=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( Ra . trim ( ) ) ; function matchHeaderValue ( Ra , qa , nd , od , ld ) { if ( utils$2 . isFunction ( od ) ) return od . call ( this , qa , nd ) ; if ( ld && ( qa = nd ) , ! ! utils$2 . isString ( qa ) ) { if ( utils$2 . isString ( od ) ) return qa . indexOf ( od ) !== - 1 ; if ( utils$2 . isRegExp ( od ) ) return od . test ( qa ) } } function formatHeader ( Ra ) { return Ra . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( qa , nd , od ) => nd . toUpperCase ( ) + od ) } function buildAccessors ( Ra , qa ) { const nd = utils$2 . toCamelCase ( " " + qa ) ; [ "get" , "set" , "has" ] . forEach ( od => { Object . defineProperty ( Ra , od + nd , { value : function ( ld , ud , cd ) { return this [ od ] . call ( this , qa , ld , ud , cd ) } , configurable : ! 0 } ) } ) } class AxiosHeaders { constructor ( qa ) { qa && this . set ( qa ) } set ( qa , nd , od ) { const ld = this ; function ud ( dd , pd , fd ) { const md = normalizeHeader ( pd ) ; if ( ! md ) throw new Error ( "header name must be a non-empty string" ) ; const vd = utils$2 . findKey ( ld , md ) ; ( ! vd || ld [ vd ] === void 0 || fd === ! 0 || fd === void 0 && ld [ vd ] !== ! 1 ) && ( ld [ vd || pd ] = normalizeValue ( dd ) ) } const cd = ( dd , pd ) => utils$2 . forEach ( dd , ( fd , md ) => ud ( fd , md , pd ) ) ; if ( utils$2 . isPlainObject ( qa ) || qa instanceof this . constructor ) cd ( qa , nd ) ; else if ( utils$2 . isString ( qa ) && ( qa = qa . trim ( ) ) && ! isValidHeaderName ( qa ) ) cd ( parseHeaders ( qa ) , nd ) ; else if ( utils$2 . isHeaders ( qa ) ) for ( const [ dd , pd ] of qa . entries ( ) ) ud ( pd , dd , od ) ; else qa != null && ud ( nd , qa , od ) ; return this } get ( qa , nd ) { if ( qa = normalizeHeader ( qa ) , qa ) { const od = utils$2 . findKey ( this , qa ) ; if ( od ) { const ld = this [ od ] ; if ( ! nd ) return ld ; if ( nd === ! 0 ) return parseTokens ( ld ) ; if ( utils$2 . isFunction ( nd ) ) return nd . call ( this , ld , od ) ; if ( utils$2 . isRegExp ( nd ) ) return nd . exec ( ld ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( qa , nd ) { if ( qa = normalizeHeader ( qa ) , qa ) { const od = utils$2 . findKey ( this , qa ) ; return ! ! ( od && this [ od ] !== void 0 && ( ! nd || matchHeaderValue ( this , this [ od ] , od , nd ) ) ) } return ! 1 } delete ( qa , nd ) { const od = this ; let ld = ! 1 ; function ud ( cd ) { if ( cd = normalizeHeader ( cd ) , cd ) { const dd = utils$2 . findKey ( od , cd ) ; dd && ( ! nd || matchHeaderValue ( od , od [ dd ] , dd , nd ) ) && ( delete od [ dd ] , ld = ! 0 ) } } return utils$2 . isArray ( qa ) ? qa . forEach ( ud ) : ud ( qa ) , ld } clear ( qa ) { const nd = Object . keys ( this ) ; let od = nd . length , ld = ! 1 ; for ( ; od -- ; ) { const ud = nd [ od ] ; ( ! qa || matchHeaderValue ( this , this [ ud ] , ud , qa , ! 0 ) ) && ( delete this [ ud ] , ld = ! 0 ) } return ld } normalize ( qa ) { const nd = this , od = { } ; return utils$2 . forEach ( this , ( ld , ud ) => { const cd = utils$2 . findKey ( od , ud ) ; if ( cd ) { nd [ cd ] = normalizeValue ( ld ) , delete nd [ ud ] ; return } const dd = qa ? formatHeader ( ud ) : String ( ud ) . trim ( ) ; dd !== ud && delete nd [ ud ] , nd [ dd ] = normalizeValue ( ld ) , od [ dd ] = ! 0 } ) , this } concat ( ... qa ) { return this . constructor . concat ( this , ... qa ) } toJSON ( qa ) { const nd = Object . create ( null ) ; return utils$2 . forEach ( this , ( od , ld ) => { od != null && od !== ! 1 && ( nd [ ld ] = qa && utils$2 . isArray ( od ) ? od . join ( ", " ) : od ) } ) , nd } [ Symbol . iterator ] ( ) { return Object . entries ( this . toJSON ( ) ) [ Symbol . iterator ] ( ) } toString ( ) { return Object . entries ( this . toJSON ( ) ) . map ( ( [ qa , nd ] ) => qa + ": " + nd ) . join ( `
` )}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(qa){return qa instanceof this?qa:new this(qa)}static concat(qa,...nd){const od=new this(qa);return nd.forEach(ld=>od.set(ld)),od}static accessor(qa){const od=(this[ $ internals]=this[ $ internals]={accessors:{}}).accessors,ld=this.prototype;function ud(cd){const dd=normalizeHeader(cd);od[dd]||(buildAccessors(ld,cd),od[dd]=!0)}return utils $ 2.isArray(qa)?qa.forEach(ud):ud(qa),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils $ 2.reduceDescriptors(AxiosHeaders.prototype,({value:Ra},qa)=>{let nd=qa[0].toUpperCase()+qa.slice(1);return{get:()=>Ra,set(od){this[nd]=od}}});utils $ 2.freezeMethods(AxiosHeaders);function transformData(Ra,qa){const nd=this||defaults $ 1,od=qa||nd,ld=AxiosHeaders.from(od.headers);let ud=od.data;return utils $ 2.forEach(Ra,function(dd){ud=dd.call(nd,ud,ld.normalize(),qa?qa.status:void 0)}),ld.normalize(),ud}function isCancel(Ra){return!!(Ra&&Ra.__CANCEL__)}function CanceledError(Ra,qa,nd){AxiosError.call(this,Ra??"canceled",AxiosError.ERR_CANCELED,qa,nd),this.name="CanceledError"}utils $ 2.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ra,qa,nd){const od=nd.config.validateStatus;!nd.status||!od||od(nd.status)?Ra(nd):qa(new AxiosError("Request failed with status code "+nd.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(nd.status/100)-4],nd.config,nd.request,nd))}function parseProtocol(Ra){const qa=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(Ra);return qa&&qa[1]||""}function speedometer(Ra,qa){Ra=Ra||10;const nd=new Array(Ra),od=new Array(Ra);let ld=0,ud=0,cd;return qa=qa!==void 0?qa:1e3,function(pd){const fd=Date.now(),md=od[ud];cd||(cd=fd),nd[ld]=pd,od[ld]=fd;let vd=ud,Ad=0;for(;vd!==ld;)Ad+=nd[vd++],vd=vd%Ra;if(ld=(ld+1)%Ra,ld===ud&&(ud=(ud+1)%Ra),fd-cd<qa)return;const Nd=md&&fd-md;return Nd?Math.round(Ad*1e3/Nd):void 0}}function throttle(Ra,qa){let nd=0,od=1e3/qa,ld,ud;const cd=(fd,md=Date.now())=>{nd=md,ld=null,ud&&(clearTimeout(ud),ud=null),Ra.apply(null,fd)};return[(...fd)=>{const md=Date.now(),vd=md-nd;vd>=od?cd(fd,md):(ld=fd,ud||(ud=setTimeout(()=>{ud=null,cd(ld)},od-vd)))},()=>ld&&cd(ld)]}const progressEventReducer=(Ra,qa,nd=3)=>{let od=0;const ld=speedometer(50,250);return throttle(ud=>{const cd=ud.loaded,dd=ud.lengthComputable?ud.total:void 0,pd=cd-od,fd=ld(pd),md=cd<=dd;od=cd;const vd={loaded:cd,total:dd,progress:dd?cd/dd:void 0,bytes:pd,rate:fd||void 0,estimated:fd&&dd&&md?(dd-cd)/fd:void 0,event:ud,lengthComputable:dd!=null,[qa?"download":"upload"]:!0};Ra(vd)},nd)},progressEventDecorator=(Ra,qa)=>{const nd=Ra!=null;return[od=>qa[0]({lengthComputable:nd,total:Ra,loaded:od}),qa[1]]},asyncDecorator=Ra=>(...qa)=>utils $ 2.asap(()=>Ra(...qa)),isURLSameOrigin=platform.hasStandardBrowserEnv?((Ra,qa)=>nd=>(nd=new URL(nd,platform.origin),Ra.protocol===nd.protocol&&Ra.host===nd.host&&(qa||Ra.port===nd.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(Ra,qa,nd,od,ld,ud){const cd=[Ra+"="+encodeURIComponent(qa)];utils $ 2.isNumber(nd)&&cd.push("expires="+new Date(nd).toGMTString()),utils $ 2.isString(od)&&cd.push("path="+od),utils $ 2.isString(ld)&&cd.push("domain="+ld),ud===!0&&cd.push("secure"),document.cookie=cd.join("; ")},read(Ra){const qa=document.cookie.match(new RegExp("(^|; \\ s*)("+Ra+")=([^;]*)"));return qa?decodeURIComponent(qa[3]):null},remove(Ra){this.write(Ra,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ra){return/^([a-z][a-z \d + \- .]*:)? \/ \/ /i.test(Ra)}function combineURLs(Ra,qa){return qa?Ra.replace(/ \/ ? \/ $ /,"")+"/"+qa.replace(/^ \/ +/,""):Ra}function buildFullPath(Ra,qa){return Ra&&!isAbsoluteURL(qa)?combineURLs(Ra,qa):qa}const headersToObject=Ra=>Ra instanceof AxiosHeaders?{...Ra}:Ra;function mergeConfig(Ra,qa){qa=qa||{};const nd={};function od(fd,md,vd,Ad){return utils $ 2.isPlainObject(fd)&&utils $ 2.isPlainObject(md)?utils $ 2.merge.call({caseless:Ad},fd,md):utils $ 2.isPlainObject(md)?utils $ 2
` +ud.map(renderReason).join( `
` ):" "+renderReason(ud[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+cd,"ERR_NOT_SUPPORT")}return od},adapters:knownAdapters};function throwIfCancellationRequested(Ra){if(Ra.cancelToken&&Ra.cancelToken.throwIfRequested(),Ra.signal&&Ra.signal.aborted)throw new CanceledError(null,Ra)}function dispatchRequest(Ra){return throwIfCancellationRequested(Ra),Ra.headers=AxiosHeaders.from(Ra.headers),Ra.data=transformData.call(Ra,Ra.transformRequest),["post","put","patch"].indexOf(Ra.method)!==-1&&Ra.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ra.adapter||defaults $ 1.adapter)(Ra).then(function(od){return throwIfCancellationRequested(Ra),od.data=transformData.call(Ra,Ra.transformResponse,od),od.headers=AxiosHeaders.from(od.headers),od},function(od){return isCancel(od)||(throwIfCancellationRequested(Ra),od&&od.response&&(od.response.data=transformData.call(Ra,Ra.transformResponse,od.response),od.response.headers=AxiosHeaders.from(od.response.headers))),Promise.reject(od)})}const VERSION="1.7.8",validators $ 1={};["object","boolean","number","function","string","symbol"].forEach((Ra,qa)=>{validators $ 1[Ra]=function(od){return typeof od===Ra||"a"+(qa<1?"n ":" ")+Ra}});const deprecatedWarnings={};validators $ 1.transitional=function(qa,nd,od){function ld(ud,cd){return"[Axios v"+VERSION+"] Transitional option '"+ud+"'"+cd+(od?". "+od:"")}return(ud,cd,dd)=>{if(qa===!1)throw new AxiosError(ld(cd," has been removed"+(nd?" in "+nd:"")),AxiosError.ERR_DEPRECATED);return nd&&!deprecatedWarnings[cd]&&(deprecatedWarnings[cd]=!0,console.warn(ld(cd," has been deprecated since v"+nd+" and will be removed in the near future"))),qa?qa(ud,cd,dd):!0}};validators $ 1.spelling=function(qa){return(nd,od)=>(console.warn( ` $ { od } is likely a misspelling of $ { qa } ` ),!0)};function assertOptions(Ra,qa,nd){if(typeof Ra!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const od=Object.keys(Ra);let ld=od.length;for(;ld-- >0;){const ud=od[ld],cd=qa[ud];if(cd){const dd=Ra[ud],pd=dd===void 0||cd(dd,ud,Ra);if(pd!==!0)throw new AxiosError("option "+ud+" must be "+pd,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(nd!==!0)throw new AxiosError("Unknown option "+ud,AxiosError.ERR_BAD_OPTION)}}const validator $ 3={assertOptions,validators:validators $ 1},validators=validator $ 3.validators;class Axios{constructor(qa){this.defaults=qa,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(qa,nd){try{return await this._request(qa,nd)}catch(od){if(od instanceof Error){let ld={};Error.captureStackTrace?Error.captureStackTrace(ld):ld=new Error;const ud=ld.stack?ld.stack.replace(/^.+ \n /,""):"";try{od.stack?ud&&!String(od.stack).endsWith(ud.replace(/^.+ \n .+ \n /,""))&&(od.stack+= `
2024-12-08 09:17:51 +08:00
` +ud):od.stack=ud}catch{}}throw od}}_request(qa,nd){typeof qa=="string"?(nd=nd||{},nd.url=qa):nd=qa||{},nd=mergeConfig(this.defaults,nd);const{transitional:od,paramsSerializer:ld,headers:ud}=nd;od!==void 0&&validator $ 3.assertOptions(od,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),ld!=null&&(utils $ 2.isFunction(ld)?nd.paramsSerializer={serialize:ld}:validator $ 3.assertOptions(ld,{encode:validators.function,serialize:validators.function},!0)),validator $ 3.assertOptions(nd,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),nd.method=(nd.method||this.defaults.method||"get").toLowerCase();let cd=ud&&utils $ 2.merge(ud.common,ud[nd.method]);ud&&utils $ 2.forEach(["delete","get","head","post","put","patch","common"],Id=>{delete ud[Id]}),nd.headers=AxiosHeaders.concat(cd,ud);const dd=[];let pd=!0;this.interceptors.request.forEach(function(Od){typeof Od.runWhen=="function"&&Od.runWhen(nd)===!1||(pd=pd&&Od.synchronous,dd.unshift(Od.fulfilled,Od.rejected))});const fd=[];this.interceptors.response.forEach(function(Od){fd.push(Od.fulfilled,Od.rejected)});let md,vd=0,Ad;if(!pd){const Id=[dispatchRequest.bind(this),void 0];for(Id.unshift.apply(Id,dd),Id.push.apply(Id,fd),Ad=Id.length,md=Promise.resolve(nd);vd<Ad;)md=md.then(Id[vd++],Id[vd++]);return md}Ad=dd.length;let Nd=nd;for(vd=0;vd<Ad;){const Id=dd[vd++],Od=dd[vd++];try{Nd=Id(Nd)}catch(Fd){Od.call(this,Fd);break}}try{md=dispatchRequest.call(this,Nd)}catch(Id){return Promise.reject(Id)}for(vd=0,Ad=fd.length;vd<Ad;)md=md.then(fd[vd++],fd[vd++]);return md}getUri(qa){qa=mergeConfig(this.defaults,qa);const nd=buildFullPath(qa.baseURL,qa.url);return buildURL(nd,qa.params,qa.paramsSerializer)}}utils $ 2.forEach(["delete","get","head","options"],function(qa){Axios.prototype[qa]=function(nd,od){return this.request(mergeConfig(od||{},{method:qa,url:nd,data:(od||{}).data}))}});utils $ 2.forEach(["post","put","patch"],function(qa){function nd(od){return function(ud,cd,dd){return this.request(mergeConfig(dd||{},{method:qa,headers:od?{"Content-Type":"multipart/form-data"}:{},url:ud,data:cd}))}}Axios.prototype[qa]=nd(),Axios.prototype[qa+"Form"]=nd(!0)});class CancelToken{constructor(qa){if(typeof qa!="function")throw new TypeError("executor must be a function.");let nd;this.promise=new Promise(function(ud){nd=ud});const od=this;this.promise.then(ld=>{if(!od._listeners)return;let ud=od._listeners.length;for(;ud-- >0;)od._listeners[ud](ld);od._listeners=null}),this.promise.then=ld=>{let ud;const cd=new Promise(dd=>{od.subscribe(dd),ud=dd}).then(ld);return cd.cancel=function(){od.unsubscribe(ud)},cd},qa(function(ud,cd,dd){od.reason||(od.reason=new CanceledError(ud,cd,dd),nd(od.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(qa){if(this.reason){qa(this.reason);return}this._listeners?this._listeners.push(qa):this._listeners=[qa]}unsubscribe(qa){if(!this._listeners)return;const nd=this._listeners.indexOf(qa);nd!==-1&&this._listeners.splice(nd,1)}toAbortSignal(){const qa=new AbortController,nd=od=>{qa.abort(od)};return this.subscribe(nd),qa.signal.unsubscribe=()=>this.unsubscribe(nd),qa.signal}static source(){let qa;return{token:new CancelToken(function(ld){qa=ld}),cancel:qa}}}function spread(Ra){return function(nd){return Ra.apply(null,nd)}}function isAxiosError(Ra){return utils $ 2.isObject(Ra)&&Ra.isAxiosError===!0}const HttpStatusCode={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,Len
` ).forEach(function(Pd){if(Pd){var Md=Pd.indexOf(":"),Bd=Pd.substr(0,Md).trim().toLowerCase(),jd=Pd.substr(Md+1).trim();Od[Bd]=jd}}),{error:Ad,statusCode:Nd.status,statusMessage:Nd.statusText,headers:Od,body:Id}},fd=function(Ad,Nd){return!Nd&&Nd==="text"?Ad.responseText:Ad.response},md=function(Ad,Nd){var Id=(Ad.method||"GET").toUpperCase(),Od=Ad.url;if(Ad.qs){var Fd=dd(Ad.qs);Fd&&(Od+=(Od.indexOf("?")===-1?"?":"&")+Fd)}var Pd=new XMLHttpRequest;if(Pd.open(Id,Od,!0),Pd.responseType=Ad.dataType||"text",Ad.xhrFields)for(var Md in Ad.xhrFields)Pd[Md]=Ad.xhrFields[Md];var Bd=Ad.headers;if(Bd)for(var jd in Bd)Bd.hasOwnProperty(jd)&&jd.toLowerCase()!=="content-length"&&jd.toLowerCase()!=="user-agent"&&jd.toLowerCase()!=="origin"&&jd.toLowerCase()!=="host"&&Pd.setRequestHeader(jd,Bd[jd]);return Ad.onProgress&&Pd.upload&&(Pd.upload.onprogress=Ad.onProgress),Ad.onDownloadProgress&&(Pd.onprogress=Ad.onDownloadProgress),Ad.timeout&&(Pd.timeout=Ad.timeout),Pd.ontimeout=function(Hd){var Gd=new Error("timeout");Nd(pd(Gd,Pd))},Pd.onload=function(){Nd(pd(null,Pd,fd(Pd,Ad.dataType)))},Pd.onerror=function(Hd){var Gd=fd(Pd,Ad.dataType);if(Gd)Nd(pd(null,Pd,Gd));else{var zd=Pd.statusText;!zd&&Pd.status===0&&(zd=new Error("CORS blocked or network error")),Nd(pd(zd,Pd,Gd))}},Pd.send(Ad.body||""),Pd};nd.exports=md},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(nd,od){function ld(ud,cd){if(!(ud instanceof cd))throw new TypeError("Cannot call a class as a function")}nd.exports=ld,nd.exports.__esModule=!0,nd.exports.default=nd.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(nd,od,ld){var ud=ld("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function cd(pd,fd){for(var md=0;md<fd.length;md++){var vd=fd[md];vd.enumerable=vd.enumerable||!1,vd.configurable=!0,"value"in vd&&(vd.writable=!0),Object.defineProperty(pd,ud(vd.key),vd)}}function dd(pd,fd,md){return fd&&cd(pd.prototype,fd),md&&cd(pd,md),Object.defineProperty(pd,"prototype",{writable:!1}),pd}nd.exports=dd,nd.exports.__esModule=!0,nd.exports.default=nd.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":function(nd,od,ld){var ud=ld("./node_modules/@babel/runtime/helpers/typeof.js").default;function cd(dd,pd){if(ud(dd)!=="object"||dd===null)return dd;var fd=dd[Symbol.toPrimitive];if(fd!==void 0){var md=fd.call(dd,pd||"default");if(ud(md)!=="object")return md;throw new TypeError("@@toPrimitive must return a primitive value.")}return(pd==="string"?String:Number)(dd)}nd.exports=cd,nd.exports.__esModule=!0,nd.exports.default=nd.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":function(nd,od,ld){var ud=ld("./node_modules/@babel/runtime/helpers/typeof.js").default,cd=ld("./node_modules/@babel/runtime/helpers/toPrimitive.js");function dd(pd){var fd=cd(pd,"string");return ud(fd)==="symbol"?fd:String(fd)}nd.exports=dd,nd.exports.__esModule=!0,nd.exports.default=nd.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(nd,od){function ld(ud){"@babel/helpers - typeof";return nd.exports=ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(cd){return typeof cd}:function(cd){return cd&&typeof Symbol=="function"&&cd.constructor===Symbol&&cd!==Symbol.prototype?"symbol":typeof cd},nd.exports.__esModule=!0,nd.exports.default=nd.exports,ld(ud)}nd.exports=ld,nd.exports.__esModule=!0,nd.exports.default=nd.exports},"./node_modules/fast-xml-parser/src/fxp.js":function(nd,od,ld){const ud=ld("./node_modules/fast-xml-parser/src/validator.js"),cd=ld("./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js"),dd=ld("./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js");nd.exports={XMLParser:cd,XMLValidator:ud,XMLBuilder:dd}},"./node_modules/fast-xml-parser/src/util.js":function(nd,od,ld){const ud=":A-Za-z_ \\ u00C0- \\ u00D6 \\ u00D8- \\ u00F6 \\ u00F8- \\ u02FF \\ u0370- \\ u037D \\ u037F- \\ u1FFF \\ u200C- \\ u200D \\ u2070- \\ u218F \\ u2C00- \\ u2FEF \\ u3001- \\ uD7FF \\ uF900- \\ uFDCF \\ uFDF0- \\ uFFFD",cd=ud+" \\ -. \\ d \\ u00B7 \\ u0300- \\ u036F \\ u203F- \\ u2040",dd="["+ud+"]["+cd+"]*",pd=new RegExp("^"+dd+" $ "),fd=function(vd,Ad){const Nd=[];l
` &&Gd[Xd]!==" \r ";Xd++)Sf+=Gd[Xd];if(Sf=Sf.trim(),Sf[Sf.length-1]==="/"&&(Sf=Sf.substring(0,Sf.length-1),Xd--),!Bd(Sf)){let Tf;return Sf.trim().length===0?Tf="Invalid space after '<'.":Tf="Tag '"+Sf+"' is an invalid name.",Pd("InvalidTag",Tf,jd(Gd,Xd))}const gf=Ad(Gd,Xd);if(gf===!1)return Pd("InvalidAttr","Attributes for '"+Sf+"' have open quote.",jd(Gd,Xd));let bf=gf.value;if(Xd=gf.index,bf[bf.length-1]==="/"){const Tf=Xd-bf.length;bf=bf.substring(0,bf.length-1);const Mf=Id(bf,zd);if(Mf===!0)Wd=!0;else return Pd(Mf.err.code,Mf.err.msg,jd(Gd,Tf+Mf.err.line))}else if(vf)if(gf.tagClosed){if(bf.trim().length>0)return Pd("InvalidTag","Closing tag '"+Sf+"' can't have attributes or invalid starting.",jd(Gd,_f));if(df.length===0)return Pd("InvalidTag","Closing tag '"+Sf+"' has not been opened.",jd(Gd,_f));{const Tf=df.pop();if(Sf!==Tf.tagName){let Mf=jd(Gd,Tf.tagStartPos);return Pd("InvalidTag","Expected closing tag '"+Tf.tagName+"' (opened in line "+Mf.line+", col "+Mf.col+") instead of closing tag '"+Sf+"'.",jd(Gd,_f))}df.length==0&&(Jd=!0)}}else return Pd("InvalidTag","Closing tag '"+Sf+"' doesn't have proper closing.",jd(Gd,Xd));else{const Tf=Id(bf,zd);if(Tf!==!0)return Pd(Tf.err.code,Tf.err.msg,jd(Gd,Xd-bf.length+Tf.err.line));if(Jd===!0)return Pd("InvalidXml","Multiple possible root nodes found.",jd(Gd,Xd));zd.unpairedTags.indexOf(Sf)!==-1||df.push({tagName:Sf,tagStartPos:_f}),Wd=!0}for(Xd++;Xd<Gd.length;Xd++)if(Gd[Xd]==="<")if(Gd[Xd+1]==="!"){Xd++,Xd=fd(Gd,Xd);continue}else if(Gd[Xd+1]==="?"){if(Xd=pd(Gd,++Xd),Xd.err)return Xd}else break;else if(Gd[Xd]==="&"){const Tf=Fd(Gd,Xd);if(Tf==-1)return Pd("InvalidChar","char '&' is not expected.",jd(Gd,Xd));Xd=Tf}else if(Jd===!0&&!dd(Gd[Xd]))return Pd("InvalidXml","Extra text at the end",jd(Gd,Xd));Gd[Xd]==="<"&&Xd--}}else{if(dd(Gd[Xd]))continue;return Pd("InvalidChar","char '"+Gd[Xd]+"' is not expected.",jd(Gd,Xd))}if(Wd){if(df.length==1)return Pd("InvalidTag","Unclosed tag '"+df[0].tagName+"'.",jd(Gd,df[0].tagStartPos));if(df.length>0)return Pd("InvalidXml","Invalid '"+JSON.stringify(df.map(Xd=>Xd.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return Pd("InvalidXml","Start tag expected.",1);return!0};function dd(Gd){return Gd===" "||Gd===" "||Gd=== `
` ||Gd===" \r "}function pd(Gd,zd){const df=zd;for(;zd<Gd.length;zd++)if(Gd[zd]=="?"||Gd[zd]==" "){const Wd=Gd.substr(df,zd-df);if(zd>5&&Wd==="xml")return Pd("InvalidXml","XML declaration allowed only at the start of the document.",jd(Gd,zd));if(Gd[zd]=="?"&&Gd[zd+1]==">"){zd++;break}else continue}return zd}function fd(Gd,zd){if(Gd.length>zd+5&&Gd[zd+1]==="-"&&Gd[zd+2]==="-"){for(zd+=3;zd<Gd.length;zd++)if(Gd[zd]==="-"&&Gd[zd+1]==="-"&&Gd[zd+2]===">"){zd+=2;break}}else if(Gd.length>zd+8&&Gd[zd+1]==="D"&&Gd[zd+2]==="O"&&Gd[zd+3]==="C"&&Gd[zd+4]==="T"&&Gd[zd+5]==="Y"&&Gd[zd+6]==="P"&&Gd[zd+7]==="E"){let df=1;for(zd+=8;zd<Gd.length;zd++)if(Gd[zd]==="<")df++;else if(Gd[zd]===">"&&(df--,df===0))break}else if(Gd.length>zd+9&&Gd[zd+1]==="["&&Gd[zd+2]==="C"&&Gd[zd+3]==="D"&&Gd[zd+4]==="A"&&Gd[zd+5]==="T"&&Gd[zd+6]==="A"&&Gd[zd+7]==="["){for(zd+=8;zd<Gd.length;zd++)if(Gd[zd]==="]"&&Gd[zd+1]==="]"&&Gd[zd+2]===">"){zd+=2;break}}return zd}const md='"',vd="'";function Ad(Gd,zd){let df="",Wd="",Jd=!1;for(;zd<Gd.length;zd++){if(Gd[zd]===md||Gd[zd]===vd)Wd===""?Wd=Gd[zd]:Wd!==Gd[zd]||(Wd="");else if(Gd[zd]===">"&&Wd===""){Jd=!0;break}df+=Gd[zd]}return Wd!==""?!1:{value:df,index:zd,tagClosed:Jd}}const Nd=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function Id(Gd,zd){const df=ud.getAllMatches(Gd,Nd),Wd={};for(let Jd=0;Jd<df.length;Jd++){if(df[Jd][1].length===0)return Pd("InvalidAttr","Attribute ' "+df[Jd][2]+" ' has no space in starting.",Hd(df[Jd]));if(df[Jd][3]!==void 0&&df[Jd][4]===void 0)return Pd("InvalidAttr","Attribute ' "+df[Jd][2]+" ' is without value.",Hd(df[Jd]));if(df[Jd][3]===void 0&&!zd.allowBooleanAttributes)return Pd("InvalidAttr","boolean attribute ' "+df[Jd][2]+" ' is not allowed.",Hd(df[Jd]));const Xd=df[Jd][2];if(!Md(Xd))return Pd("InvalidAttr","Attribute ' "+Xd+" ' is an invalid name.",Hd(df[Jd]));if(!Wd.hasOwnProperty(Xd))Wd[Xd]=1;else return Pd("InvalidAttr","Attribute ' "+Xd+" ' is repeated.",Hd(df[Jd]))}return!0}function Od(Gd,zd){let df=/\d/;for(Gd[zd]==="x"&&(zd++,df=/[\da-fA-F]/);zd<Gd.length;zd++){if(Gd[zd]===";")return zd;if(!Gd[zd].match(df))break}return-1}function Fd(Gd,zd){if(zd++,Gd[zd]===";")return-1;if(Gd[zd]==="#")return zd++,Od(Gd,zd);let df=0;for(;zd<Gd.length;zd++,df++)if(!(Gd[zd].match(/\w/)&&df<20)){if(Gd[zd]===";")break;return-1}return zd}function Pd(Gd,zd,df){return{err:{code:Gd,msg:zd,line:df.line||df,col:df.col}}}function Md(Gd){return ud.isName(Gd)}function Bd(Gd){return ud.isName(Gd)}function jd(Gd,zd){const df=Gd.substring(0,zd).split(/\r?\n/);return{line:df.length,col:df[df.length-1].length+1}}function Hd(Gd){return Gd.startIndex+Gd[1].length}},"./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js":function(nd,od,ld){const ud=ld("./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js"),cd={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(vd,Ad){return Ad},attributeValueProcessor:function(vd,Ad){return Ad},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("' "," g "),val:" & apos ; "},{regex:new RegExp('" ' , "g" ) , val : """ } ] , processEntities : ! 0 , stopNodes : [ ] , oneListGroup : ! 1 } ; function dd ( vd ) { this . options = Object . assign ( { } , cd , vd ) , this . options . ignoreAttributes || this . options . attributesGroupName ? this . isAttribute = function ( ) { return ! 1 } : ( this . attrPrefixLen = this . options . attributeNamePrefix . length , this . isAttribute = md ) , this . processTextOrObjNode = pd , this . options . format ? ( this . indentate = fd , this . tagEndChar = ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-11-28 09:28:59 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}dd.prototype.build=function(vd){return this.options.preserveOrder?ud(vd,this.options):(Array.isArray(vd)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(vd={[this.options.arrayNodeName]:vd}),this.j2x(vd,0).val)},dd.prototype.j2x=function(vd,Ad){let Nd="",Id="";for(let Od in vd)if(Object.prototype.hasOwnProperty.call(vd,Od))if(typeof vd[Od]>"u")this.isAttribute(Od)&&(Id+="");else if(vd[Od]===null)this.isAttribute(Od)?Id+="":Od[0]==="?"?Id+=this.indentate(Ad)+"<"+Od+"?"+this.tagEndChar:Id+=this.indentate(Ad)+"<"+Od+"/"+this.tagEndChar;else if(vd[Od]instanceof Date)Id+=this.buildTextValNode(vd[Od],Od,"",Ad);else if(typeof vd[Od]!="object"){const Fd=this.isAttribute(Od);if(Fd)Nd+=this.buildAttrPairStr(Fd,""+vd[Od]);else if(Od===this.options.textNodeName){let Pd=this.options.tagValueProcessor(Od,""+vd[Od]);Id+=this.replaceEntitiesValue(Pd)}else Id+=this.buildTextValNode(vd[Od],Od,"",Ad)}else if(Array.isArray(vd[Od])){const Fd=vd[Od].length;let Pd="";for(let Md=0;Md<Fd;Md++){const Bd=vd[Od][Md];typeof Bd>"u"||(Bd===null?Od[0]==="?"?Id+=this.indentate(Ad)+"<"+Od+"?"+this.tagEndChar:Id+=this.indentate(Ad)+"<"+Od+"/"+this.tagEndChar:typeof Bd=="object"?this.options.oneListGroup?Pd+=this.j2x(Bd,Ad+1).val:Pd+=this.processTextOrObjNode(Bd,Od,Ad):Pd+=this.buildTextValNode(Bd,Od,"",Ad))}this.options.oneListGroup&&(Pd=this.buildObjectNode(Pd,Od,"",Ad)),Id+=Pd}else if(this.options.attributesGroupName&&Od===this.options.attributesGroupName){const Fd=Object.keys(vd[Od]),Pd=Fd.length;for(let Md=0;Md<Pd;Md++)Nd+=this.buildAttrPairStr(Fd[Md],""+vd[Od][Fd[Md]])}else Id+=this.processTextOrObjNode(vd[Od],Od,Ad);return{attrStr:Nd,val:Id}},dd.prototype.buildAttrPairStr=function(vd,Ad){return Ad=this.options.attributeValueProcessor(vd,""+Ad),Ad=this.replaceEntitiesValue(Ad),this.options.suppressBooleanAttributes&&Ad==="true"?" "+vd:" "+vd+'="'+Ad+'"'};function pd(vd,Ad,Nd){const Id=this.j2x(vd,Nd+1);return vd[this.options.textNodeName]!==void 0&&Object.keys(vd).length===1?this.buildTextValNode(vd[this.options.textNodeName],Ad,Id.attrStr,Nd):this.buildObjectNode(Id.val,Ad,Id.attrStr,Nd)}dd.prototype.buildObjectNode=function(vd,Ad,Nd,Id){if(vd==="")return Ad[0]==="?"?this.indentate(Id)+"<"+Ad+Nd+"?"+this.tagEndChar:this.indentate(Id)+"<"+Ad+Nd+this.closeTag(Ad)+this.tagEndChar;{let Od="</"+Ad+this.tagEndChar,Fd="";return Ad[0]==="?"&&(Fd="?",Od=""),(Nd||Nd==="")&&vd.indexOf("<")===-1?this.indentate(Id)+"<"+Ad+Nd+Fd+">"+vd+Od:this.options.commentPropName!==!1&&Ad===this.options.commentPropName&&Fd.length===0?this.indentate(Id)+ ` <!-- $ { vd } -- > ` +this.newLine:this.indentate(Id)+"<"+Ad+Nd+Fd+this.tagEndChar+vd+this.indentate(Id)+Od}},dd.prototype.closeTag=function(vd){let Ad="";return this.options.unpairedTags.indexOf(vd)!==-1?this.options.suppressUnpairedNode||(Ad="/"):this.options.suppressEmptyNode?Ad="/":Ad= ` > < /${vd}`,Ad},dd.prototype.buildTextValNode=function(vd,Ad,Nd,Id){if(this.options.cdataPropName!==!1&&Ad===this.options.cdataPropName)return this.indentate(Id)+`<![CDATA[${vd}]]>`+this.newLine;if(this.options.commentPropName!==!1&&Ad===this.options.commentPropName)return this.indentate(Id)+`<!--${vd}-->`+this.newLine;if(Ad[0]==="?")return this.indentate(Id)+"<"+Ad+Nd+"?"+this.tagEndChar;{let Od=this.options.tagValueProcessor(Ad,vd);return Od=this.replaceEntitiesValue(Od),Od===""?this.indentate(Id)+"<"+Ad+Nd+this.closeTag(Ad)+this.tagEndChar:this.indentate(Id)+"<"+Ad+Nd+">"+Od+"</ "+Ad+this.tagEndChar}},dd.prototype.replaceEntitiesValue=function(vd){if(vd&&vd.length>0&&this.options.processEntities)for(let Ad=0;Ad<this.options.entities.length;Ad++){const Nd=this.options.entities[Ad];vd=vd.replace(Nd.regex,Nd.val)}return vd};function fd(vd){return this.options.indentBy.repeat(vd)}function md(vd){return vd.startsWith(this.options.attributeNamePrefix)&&vd!==this.options.textNodeName?vd.substr(this.attrPrefixLen):!1}nd.exports=dd}," . / node _modules / fast - xml - parser / src / xmlbuilder / orderedJs2Xml . js " : function ( nd , od ) { const ld = `
2024-12-08 09:17:51 +08:00
` ;function ud(vd,Ad){let Nd="";return Ad.format&&Ad.indentBy.length>0&&(Nd=ld),cd(vd,Ad,"",Nd)}function cd(vd,Ad,Nd,Id){let Od="",Fd=!1;for(let Pd=0;Pd<vd.length;Pd++){const Md=vd[Pd],Bd=dd(Md);if(Bd===void 0)continue;let jd="";if(Nd.length===0?jd=Bd:jd= ` $ { Nd } . $ { Bd } ` ,Bd===Ad.textNodeName){let Wd=Md[Bd];fd(jd,Ad)||(Wd=Ad.tagValueProcessor(Bd,Wd),Wd=md(Wd,Ad)),Fd&&(Od+=Id),Od+=Wd,Fd=!1;continue}else if(Bd===Ad.cdataPropName){Fd&&(Od+=Id),Od+= ` < ! [ CDATA [ $ { Md [ Bd ] [ 0 ] [ Ad . textNodeName ] } ] ] > ` ,Fd=!1;continue}else if(Bd===Ad.commentPropName){Od+=Id+ ` <!-- $ { Md [ Bd ] [ 0 ] [ Ad . textNodeName ] } -- > ` ,Fd=!0;continue}else if(Bd[0]==="?"){const Wd=pd(Md[":@"],Ad),Jd=Bd==="?xml"?"":Id;let Xd=Md[Bd][0][Ad.textNodeName];Xd=Xd.length!==0?" "+Xd:"",Od+=Jd+ ` < $ { Bd } $ { Xd } $ { Wd } ? > ` ,Fd=!0;continue}let Hd=Id;Hd!==""&&(Hd+=Ad.indentBy);const Gd=pd(Md[":@"],Ad),zd=Id+ ` < $ { Bd } $ { Gd } ` ,df=cd(Md[Bd],Ad,jd,Hd);Ad.unpairedTags.indexOf(Bd)!==-1?Ad.suppressUnpairedNode?Od+=zd+">":Od+=zd+"/>":(!df||df.length===0)&&Ad.suppressEmptyNode?Od+=zd+"/>":df&&df.endsWith(">")?Od+=zd+ ` > $ { df } $ { Id } < /${Bd}>`:(Od+=zd+">",df&&Id!==""&&(df.includes("/ > ")||df.includes(" < /"))?Od+=Id+Ad.indentBy+df+Id:Od+=df,Od+=`</ $ { Bd } > ` ),Fd=!0}return Od}function dd(vd){const Ad=Object.keys(vd);for(let Nd=0;Nd<Ad.length;Nd++){const Id=Ad[Nd];if(vd.hasOwnProperty(Id)&&Id!==":@")return Id}}function pd(vd,Ad){let Nd="";if(vd&&!Ad.ignoreAttributes)for(let Id in vd){if(!vd.hasOwnProperty(Id))continue;let Od=Ad.attributeValueProcessor(Id,vd[Id]);Od=md(Od,Ad),Od===!0&&Ad.suppressBooleanAttributes?Nd+= ` $ { Id . substr ( Ad . attributeNamePrefix . length ) } ` :Nd+= ` $ { Id . substr ( Ad . attributeNamePrefix . length ) } = "${Od}" ` }return Nd}function fd(vd,Ad){vd=vd.substr(0,vd.length-Ad.textNodeName.length-1);let Nd=vd.substr(vd.lastIndexOf(".")+1);for(let Id in Ad.stopNodes)if(Ad.stopNodes[Id]===vd||Ad.stopNodes[Id]==="*."+Nd)return!0;return!1}function md(vd,Ad){if(vd&&vd.length>0&&Ad.processEntities)for(let Nd=0;Nd<Ad.entities.length;Nd++){const Id=Ad.entities[Nd];vd=vd.replace(Id.regex,Id.val)}return vd}nd.exports=ud},"./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js":function(nd,od,ld){const ud=ld("./node_modules/fast-xml-parser/src/util.js");function cd(Id,Od){const Fd={};if(Id[Od+3]==="O"&&Id[Od+4]==="C"&&Id[Od+5]==="T"&&Id[Od+6]==="Y"&&Id[Od+7]==="P"&&Id[Od+8]==="E"){Od=Od+9;let Pd=1,Md=!1,Bd=!1,jd="";for(;Od<Id.length;Od++)if(Id[Od]==="<"&&!Bd){if(Md&&fd(Id,Od))Od+=7,[entityName,val,Od]=dd(Id,Od+1),val.indexOf("&")===-1&&(Fd[Nd(entityName)]={regx:RegExp( ` & $ { entityName } ; ` ,"g"),val});else if(Md&&md(Id,Od))Od+=8;else if(Md&&vd(Id,Od))Od+=8;else if(Md&&Ad(Id,Od))Od+=9;else if(pd)Bd=!0;else throw new Error("Invalid DOCTYPE");Pd++,jd=""}else if(Id[Od]===">"){if(Bd?Id[Od-1]==="-"&&Id[Od-2]==="-"&&(Bd=!1,Pd--):Pd--,Pd===0)break}else Id[Od]==="["?Md=!0:jd+=Id[Od];if(Pd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:Fd,i:Od}}function dd(Id,Od){let Fd="";for(;Od<Id.length&&Id[Od]!=="'"&&Id[Od]!=='"';Od++)Fd+=Id[Od];if(Fd=Fd.trim(),Fd.indexOf(" ")!==-1)throw new Error("External entites are not supported");const Pd=Id[Od++];let Md="";for(;Od<Id.length&&Id[Od]!==Pd;Od++)Md+=Id[Od];return[Fd,Md,Od]}function pd(Id,Od){return Id[Od+1]==="!"&&Id[Od+2]==="-"&&Id[Od+3]==="-"}function fd(Id,Od){return Id[Od+1]==="!"&&Id[Od+2]==="E"&&Id[Od+3]==="N"&&Id[Od+4]==="T"&&Id[Od+5]==="I"&&Id[Od+6]==="T"&&Id[Od+7]==="Y"}function md(Id,Od){return Id[Od+1]==="!"&&Id[Od+2]==="E"&&Id[Od+3]==="L"&&Id[Od+4]==="E"&&Id[Od+5]==="M"&&Id[Od+6]==="E"&&Id[Od+7]==="N"&&Id[Od+8]==="T"}function vd(Id,Od){return Id[Od+1]==="!"&&Id[Od+2]==="A"&&Id[Od+3]==="T"&&Id[Od+4]==="T"&&Id[Od+5]==="L"&&Id[Od+6]==="I"&&Id[Od+7]==="S"&&Id[Od+8]==="T"}function Ad(Id,Od){return Id[Od+1]==="!"&&Id[Od+2]==="N"&&Id[Od+3]==="O"&&Id[Od+4]==="T"&&Id[Od+5]==="A"&&Id[Od+6]==="T"&&Id[Od+7]==="I"&&Id[Od+8]==="O"&&Id[Od+9]==="N"}function Nd(Id){if(ud.isName(Id))return Id;throw new Error( ` Invalid entity name $ { Id } ` )}nd.exports=cd},"./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js":function(nd,od){const ld={preserveOrd
` );const Jd=new cd("!xml");let Xd=Jd,_f="",vf="";for(let Sf=0;Sf<Wd.length;Sf++)if(Wd[Sf]==="<")if(Wd[Sf+1]==="/"){const bf=Hd(Wd,">",Sf,"Closing Tag is not closed.");let Tf=Wd.substring(Sf+2,bf).trim();if(this.options.removeNSPrefix){const Zf=Tf.indexOf(":");Zf!==-1&&(Tf=Tf.substr(Zf+1))}this.options.transformTagName&&(Tf=this.options.transformTagName(Tf)),Xd&&(_f=this.saveTextToParentTag(_f,Xd,vf));const Mf=vf.substring(vf.lastIndexOf(".")+1);if(Tf&&this.options.unpairedTags.indexOf(Tf)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${Tf}>`);let Kf=0;Mf&&this.options.unpairedTags.indexOf(Mf)!==-1?(Kf=vf.lastIndexOf(".",vf.lastIndexOf(".")-1),this.tagsNodeStack.pop()):Kf=vf.lastIndexOf("."),vf=vf.substring(0,Kf),Xd=this.tagsNodeStack.pop(),_f="",Sf=bf}else if(Wd[Sf+1]==="?"){let bf=Gd(Wd,Sf,!1,"?>");if(!bf)throw new Error("Pi Tag is not closed.");if(_f=this.saveTextToParentTag(_f,Xd,vf),!(this.options.ignoreDeclaration&&bf.tagName==="?xml"||this.options.ignorePiTags)){const Tf=new cd(bf.tagName);Tf.add(this.options.textNodeName,""),bf.tagName!==bf.tagExp&&bf.attrExpPresent&&(Tf[":@"]=this.buildAttributesMap(bf.tagExp,vf,bf.tagName)),this.addChild(Xd,Tf,vf)}Sf=bf.closeIndex+1}else if(Wd.substr(Sf+1,3)==="!--"){const bf=Hd(Wd,"-->",Sf+4,"Comment is not closed.");if(this.options.commentPropName){const Tf=Wd.substring(Sf+4,bf-2);_f=this.saveTextToParentTag(_f,Xd,vf),Xd.add(this.options.commentPropName,[{[this.options.textNodeName]:Tf}])}Sf=bf}else if(Wd.substr(Sf+1,2)==="!D"){const bf=dd(Wd,Sf);this.docTypeEntities=bf.entities,Sf=bf.i}else if(Wd.substr(Sf+1,2)==="!["){const bf=Hd(Wd,"]]>",Sf,"CDATA is not closed.")-2,Tf=Wd.substring(Sf+9,bf);_f=this.saveTextToParentTag(_f,Xd,vf);let Mf=this.parseTextData(Tf,Xd.tagname,vf,!0,!1,!0,!0);Mf==null&&(Mf=""),this.options.cdataPropName?Xd.add(this.options.cdataPropName,[{[this.options.textNodeName]:Tf}]):Xd.add(this.options.textNodeName,Mf),Sf=bf+2}else{let bf=Gd(Wd,Sf,this.options.removeNSPrefix),Tf=bf.tagName;const Mf=bf.rawTagName;let Kf=bf.tagExp,Zf=bf.attrExpPresent,eh=bf.closeIndex;this.options.transformTagName&&(Tf=this.options.transformTagName(Tf)),Xd&&_f&&Xd.tagname!=="!xml"&&(_f=this.saveTextToParentTag(_f,Xd,vf,!1));const $f=Xd;if($f&&this.options.unpairedTags.indexOf($f.tagname)!==-1&&(Xd=this.tagsNodeStack.pop(),vf=vf.substring(0,vf.lastIndexOf("."))),Tf!==Jd.tagname&&(vf+=vf?"."+Tf:Tf),this.isItStopNode(this.options.stopNodes,vf,Tf)){let Df="";if(Kf.length>0&&Kf.lastIndexOf("/ ")===Kf.length-1)Tf[Tf.length-1]===" / "?(Tf=Tf.substr(0,Tf.length-1),vf=vf.substr(0,vf.length-1),Kf=Tf):Kf=Kf.substr(0,Kf.length-1),Sf=bf.closeIndex;else if(this.options.unpairedTags.indexOf(Tf)!==-1)Sf=bf.closeIndex;else{const zf=this.readStopNodeData(Wd,Mf,eh+1);if(!zf)throw new Error(`Unexpected end of ${Mf}`);Sf=zf.i,Df=zf.tagContent}const Lf=new cd(Tf);Tf!==Kf&&Zf&&(Lf[" : @ "]=this.buildAttributesMap(Kf,vf,Tf)),Df&&(Df=this.parseTextData(Df,Tf,vf,!0,Zf,!0,!0)),vf=vf.substr(0,vf.lastIndexOf(" . ")),Lf.add(this.options.textNodeName,Df),this.addChild(Xd,Lf,vf)}else{if(Kf.length>0&&Kf.lastIndexOf(" / ")===Kf.length-1){Tf[Tf.length-1]===" / "?(Tf=Tf.substr(0,Tf.length-1),vf=vf.substr(0,vf.length-1),Kf=Tf):Kf=Kf.substr(0,Kf.length-1),this.options.transformTagName&&(Tf=this.options.transformTagName(Tf));const Df=new cd(Tf);Tf!==Kf&&Zf&&(Df[" : @ "]=this.buildAttributesMap(Kf,vf,Tf)),this.addChild(Xd,Df,vf),vf=vf.substr(0,vf.lastIndexOf(" . "))}else{const Df=new cd(Tf);this.tagsNodeStack.push(Xd),Tf!==Kf&&Zf&&(Df[" : @ "]=this.buildAttributesMap(Kf,vf,Tf)),this.addChild(Xd,Df,vf),Xd=Df}_f=" ",Sf=eh}}else _f+=Wd[Sf];return Jd.child};function Fd(Wd,Jd,Xd){const _f=this.options.updateTag(Jd.tagname,Xd,Jd[" : @ "]);_f===!1||(typeof _f==" string " && ( Jd . tagname = _f ) , Wd . addChild ( Jd ) ) } const Pd = function ( Wd ) { if ( this . options . processEntities ) { for ( let Jd in this . docTypeEntities ) { const Xd = this . docTypeEntities [ Jd ] ; Wd = Wd . replace ( Xd . regx , Xd . val ) } for ( let Jd in this . lastEntities ) { const Xd = this . lastEntities [ Jd ] ; Wd = Wd . replace ( Xd . regex , Xd . val ) } if ( this . options . htmlEntities ) for ( let Jd in this . htmlEntities ) { const Xd = this . htm
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var Oh=!0,Zh=!1,hm;return{s:function(){rh=rh.call(Of)},n:function(){var Fm=rh.next();return Oh=Fm.done,Fm},e:function(Fm){Zh=!0,hm=Fm},f:function(){try{!Oh&&rh.return!=null&&rh.return()}finally{if(Zh)throw hm}}}}function pd(Of,Nf){if(Of){if(typeof Of=="string")return fd(Of,Nf);var rh=Object.prototype.toString.call(Of).slice(8,-1);if(rh==="Object"&&Of.constructor&&(rh=Of.constructor.name),rh==="Map"||rh==="Set")return Array.from(Of);if(rh==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array $ /.test(rh))return fd(Of,Nf)}}function fd(Of,Nf){(Nf==null||Nf>Of.length)&&(Nf=Of.length);for(var rh=0,ch=new Array(Nf);rh<Nf;rh++)ch[rh]=Of[rh];return ch}var md=ld("./lib/md5.js"),vd=ld("./lib/crypto.js"),Ad=ld("./node_modules/fast-xml-parser/src/fxp.js"),Nd=Ad.XMLParser,Id=Ad.XMLBuilder,Od=new Nd({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1}),Fd=new Id,Pd=ld("./lib/base64.js"),Md=ld("./src/tracker.js"),Bd=function(Nf){var rh=Od.parse(Nf);return rh},jd=function(Nf){var rh=Fd.build(Nf);return rh};function Hd(Of){return encodeURIComponent(Of).replace(/!/g,"%21").replace(/'/g,"%27").replace(/ \( /g,"%28").replace(/ \) /g,"%29").replace(/ \* /g,"%2A")}function Gd(Of,Nf){var rh=[];for(var ch in Of)Of.hasOwnProperty(ch)&&rh.push(Nf?Hd(ch).toLowerCase():ch);return rh.sort(function(Sh,Oh){return Sh=Sh.toLowerCase(),Oh=Oh.toLowerCase(),Sh===Oh?0:Sh>Oh?1:-1})}var zd=function(Nf,rh){var ch,Sh,Oh,Zh=[],hm=Gd(Nf);for(ch=0;ch<hm.length;ch++)Sh=hm[ch],Oh=Nf[Sh]===void 0||Nf[Sh]===null?"":""+Nf[Sh],Sh=rh?Hd(Sh).toLowerCase():Hd(Sh),Oh=Hd(Oh)||"",Zh.push(Sh+"="+Oh);return Zh.join("&")},df=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding","pic-operations"],Wd=function(Nf){var rh={};for(var ch in Nf){var Sh=ch.toLowerCase();(Sh.indexOf("x-cos-")>-1||df.indexOf(Sh)>-1)&&(rh[ch]=Nf[ch])}return rh},Jd=function(Nf){Nf=Nf||{};var rh=Nf.SecretId,ch=Nf.SecretKey,Sh=Nf.KeyTime,Oh=(Nf.method||Nf.Method||"get").toLowerCase(),Zh=Df(Nf.Query||Nf.params||{}),hm=Wd(Df(Nf.Headers||Nf.headers||{})),sm=Nf.Key||"",Fm;Nf.UseRawKey?Fm=Nf.Pathname||Nf.pathname||"/"+sm:(Fm=Nf.Pathname||Nf.pathname||sm,Fm.indexOf("/")!==0&&(Fm="/"+Fm));var Rm=Nf.ForceSignHost!==!1;if(!hm.Host&&!hm.host&&Nf.Bucket&&Nf.Region&&Rm&&(hm.Host=Nf.Bucket+".cos."+Nf.Region+".myqcloud.com"),!rh)throw new Error("missing param SecretId");if(!ch)throw new Error("missing param SecretKey");var Hm=Math.round(Uf(Nf.SystemClockOffset)/1e3)-1,Zm=Hm,L_=Nf.Expires||Nf.expires;L_===void 0?Zm+=900:Zm+=L_*1||0;var l_="sha1",T_=rh,Qm=Sh||Hm+";"+Zm,F_=Sh||Hm+";"+Zm,j_=Gd(hm,!0).join(";").toLowerCase(),G_=Gd(Zh,!0).join(";").toLowerCase(),Q_=vd.HmacSHA1(F_,ch).toString(),q_=[Oh,Fm,nh.obj2str(Zh,!0),nh.obj2str(hm,!0),""].join( `
2024-11-28 09:28:59 +08:00
` ),D_=["sha1",Qm,vd.SHA1(q_).toString(),""].join( `
2024-12-08 09:17:51 +08:00
` ),Im=vd.HmacSHA1(D_,Q_).toString(),Ig=["q-sign-algorithm="+l_,"q-ak="+T_,"q-sign-time="+Qm,"q-key-time="+F_,"q-header-list="+j_,"q-url-param-list="+G_,"q-signature="+Im].join("&");return Ig},Xd=function(Nf,rh,ch){var Sh=rh/8,Oh=Nf.slice(ch,ch+Sh);return new Uint8Array(Oh).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[rh](Oh)[0]},_f=function(Nf,rh,ch,Sh){var Oh=Nf.slice(rh,ch),Zh="";return new Uint8Array(Oh).forEach(function(hm){Zh+=String.fromCharCode(hm)}),Sh&&(Zh=decodeURIComponent(escape(Zh))),Zh},vf=function(Nf){for(var rh={},ch=_f(Nf),Sh={records:[]};Nf.byteLength;){var Oh=Xd(Nf,32,0),Zh=Xd(Nf,32,4),hm=Oh-Zh-16,sm=0,Fm;for(Nf=Nf.slice(12);sm<Zh;){var Rm=Xd(Nf,8,sm),Hm=_f(Nf,sm+1,sm+1+Rm),Zm=Xd(Nf,16,sm+Rm+2),L_=_f(Nf,sm+Rm+4,sm+Rm+4+Zm);rh[Hm]=L_,sm+=Rm+4+Zm}if(rh[":event-type"]==="Records")Fm=_f(Nf,sm,sm+hm,!0),Sh.records.push(Fm);else if(rh[":event-type"]==="Stats")Fm=_f(Nf,sm,sm+hm,!0),Sh.stats=nh.xml2json(Fm).Stats;else if(rh[":event-type"]==="error"){var l_=rh[":error-code"],T_=rh[":error-message"],Qm=new Error(T_);Qm.message=T_,Qm.name=Qm.code=l_,Sh.error=Qm}Nf=Nf.slice(sm+hm+4)}return{payload:Sh.records.join(""),body:ch}},Sf=function(Nf){var rh=this.options.CopySourceParser;if(rh)return rh(Nf);var ch=Nf.match(/^([^.]+- \d +) \. cos(v6|-cdc|-cdz|-internal)? \. ([^.]+) \. ((myqcloud \. com)|(tencentcos \. cn)) \/ (.+) $ /);return ch?{Bucket:ch[1],Region:ch[3],Key:ch[7]}:null},gf=function(){},bf=function(Nf){var rh={};for(var ch in Nf)Nf.hasOwnProperty(ch)&&Nf[ch]!==void 0&&Nf[ch]!==null&&(rh[ch]=Nf[ch]);return rh},Tf=function(Nf,rh){var ch,Sh=new FileReader;FileReader.prototype.readAsBinaryString?(ch=FileReader.prototype.readAsBinaryString,Sh.onload=function(){rh(this.result)}):FileReader.prototype.readAsArrayBuffer?ch=function(Zh){var hm="",sm=new FileReader;sm.onload=function(Fm){for(var Rm=new Uint8Array(sm.result),Hm=Rm.byteLength,Zm=0;Zm<Hm;Zm++)hm+=String.fromCharCode(Rm[Zm]);rh(hm)},sm.readAsArrayBuffer(Zh)}:console.error("FileReader not support readAsBinaryString"),ch.call(Sh,Nf)},Mf=function(){var Of=function(ch,Sh){ch=ch.split("."),Sh=Sh.split(".");for(var Oh=0;Oh<Sh.length;Oh++)if(ch[Oh]!==Sh[Oh])return parseInt(ch[Oh])>parseInt(Sh[Oh])?1:-1;return 0},Nf=function(ch){if(!ch)return!1;var Sh=(ch.match(/Chrome \/ ([. \d ]+)/)||[])[1],Oh=(ch.match(/QBCore \/ ([. \d ]+)/)||[])[1],Zh=(ch.match(/QQBrowser \/ ([. \d ]+)/)||[])[1],hm=Sh&&Of(Sh,"53.0.2785.116")<0&&Oh&&Of(Oh,"3.53.991.400")<0&&Zh&&Of(Zh,"9.0.2524.400")<=0||!1;return hm};return Nf(typeof navigator<"u"&&navigator.userAgent)}(),Kf=function(Nf,rh,ch,Sh,Oh){var Zh;if(Nf.slice?Zh=Nf.slice(rh,ch):Nf.mozSlice?Zh=Nf.mozSlice(rh,ch):Nf.webkitSlice&&(Zh=Nf.webkitSlice(rh,ch)),Sh&&Mf){var hm=new FileReader;hm.onload=function(sm){Zh=null,Oh(new Blob([hm.result]))},hm.readAsArrayBuffer(Zh)}else Oh(Zh)},Zf=function(Nf,rh,ch,Sh){ch=ch||gf,Nf?typeof rh=="string"?ch(nh.md5(rh,!0)):Blob&&rh instanceof Blob?nh.getFileMd5(rh,function(Oh,Zh){ch(Zh)},Sh):ch():ch()},eh=1024*1024, $ f=function(Nf,rh,ch){var Sh=Nf.size,Oh=0,Zh=md.getCtx(),hm=function sm(Fm){if(Fm>=Sh){var Rm=Zh.digest("hex");rh(null,Rm);return}var Hm=Math.min(Sh,Fm+eh);nh.fileSlice(Nf,Fm,Hm,!1,function(Zm){Tf(Zm,function(L_){Zm=null,Zh=Zh.update(L_,!0),Oh+=L_.length,L_=null,ch&&ch({loaded:Oh,total:Sh,percent:Math.round(Oh/Sh*1e4)/1e4}),sm(Fm+eh)})})};hm(0)};function Df(Of){return qf(Of,function(Nf){return cd(Nf)==="object"&&Nf!==null?Df(Nf):Nf})}function Lf(Of,Nf,rh){return Of&&Nf in Of?Of[Nf]:rh}function zf(Of,Nf){return Bf(Nf,function(rh,ch){Of[ch]=Nf[ch]}),Of}function Jf(Of){return Of instanceof Array}function xf(Of,Nf){for(var rh=!1,ch=0;ch<Of.length;ch++)if(Nf===Of[ch]){rh=!0;break}return rh}function yf(Of){return Jf(Of)?Of:[Of]}function Bf(Of,Nf){for(var rh in Of)Of.hasOwnProperty(rh)&&Nf(Of[rh],rh)}function qf(Of,Nf){var rh=Jf(Of)?[]:{};for(var ch in Of)Of.hasOwnProperty(ch)&&(rh[ch]=Nf(Of[ch],ch));return rh}function oh(Of,Nf){var rh=Jf(Of),ch=rh?[]:{};for(var Sh in Of)Of.hasOwnProperty(Sh)&&Nf(Of[Sh],Sh)&&(rh?ch.push(Of[Sh]):ch[Sh]=Of[Sh]);return ch}var Yf=function(Nf){var rh,ch,Sh,Oh="";for(rh=0,ch=Nf.length/2
2024-09-18 09:46:23 +08:00
( c ) 2012 by Cédric Mesnil . All rights reserved .
Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met :
- Redistributions of source code must retain the above copyright notice , this list of conditions and the following disclaimer .
- Redistributions in binary form must reproduce the above copyright notice , this list of conditions and the following disclaimer in the documentation and / or other materials provided with the distribution .
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
2024-12-08 09:17:51 +08:00
* / r e t u r n f u n c t i o n ( o d ) { v a r l d = n d , u d = l d . l i b , c d = u d . W o r d A r r a y , d d = u d . H a s h e r , p d = l d . a l g o , f d = c d . c r e a t e ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 , 1 1 , 1 2 , 1 3 , 1 4 , 1 5 , 7 , 4 , 1 3 , 1 , 1 0 , 6 , 1 5 , 3 , 1 2 , 0 , 9 , 5 , 2 , 1 4 , 1 1 , 8 , 3 , 1 0 , 1 4 , 4 , 9 , 1 5 , 8 , 1 , 2 , 7 , 0 , 6 , 1 3 , 1 1 , 5 , 1 2 , 1 , 9 , 1 1 , 1 0 , 0 , 8 , 1 2 , 4 , 1 3 , 3 , 7 , 1 5 , 1 4 , 5 , 6 , 2 , 4 , 0 , 5 , 9 , 7 , 1 2 , 2 , 1 0 , 1 4 , 1 , 3 , 8 , 1 1 , 6 , 1 5 , 1 3 ] ) , m d = c d . c r e a t e ( [ 5 , 1 4 , 7 , 0 , 9 , 2 , 1 1 , 4 , 1 3 , 6 , 1 5 , 8 , 1 , 1 0 , 3 , 1 2 , 6 , 1 1 , 3 , 7 , 0 , 1 3 , 5 , 1 0 , 1 4 , 1 5 , 8 , 1 2 , 4 , 9 , 1 , 2 , 1 5 , 5 , 1 , 3 , 7 , 1 4 , 6 , 9 , 1 1 , 8 , 1 2 , 2 , 1 0 , 0 , 4 , 1 3 , 8 , 6 , 4 , 1 , 3 , 1 1 , 1 5 , 0 , 5 , 1 2 , 2 , 1 3 , 9 , 7 , 1 0 , 1 4 , 1 2 , 1 5 , 1 0 , 4 , 1 , 5 , 8 , 7 , 6 , 2 , 1 3 , 1 4 , 0 , 3 , 9 , 1 1 ] ) , v d = c d . c r e a t e ( [ 1 1 , 1 4 , 1 5 , 1 2 , 5 , 8 , 7 , 9 , 1 1 , 1 3 , 1 4 , 1 5 , 6 , 7 , 9 , 8 , 7 , 6 , 8 , 1 3 , 1 1 , 9 , 7 , 1 5 , 7 , 1 2 , 1 5 , 9 , 1 1 , 7 , 1 3 , 1 2 , 1 1 , 1 3 , 6 , 7 , 1 4 , 9 , 1 3 , 1 5 , 1 4 , 8 , 1 3 , 6 , 5 , 1 2 , 7 , 5 , 1 1 , 1 2 , 1 4 , 1 5 , 1 4 , 1 5 , 9 , 8 , 9 , 1 4 , 5 , 6 , 8 , 6 , 5 , 1 2 , 9 , 1 5 , 5 , 1 1 , 6 , 8 , 1 3 , 1 2 , 5 , 1 2 , 1 3 , 1 4 , 1 1 , 8 , 5 , 6 ] ) , A d = c d . c r e a t e ( [ 8 , 9 , 9 , 1 1 , 1 3 , 1 5 , 1 5 , 5 , 7 , 7 , 8 , 1 1 , 1 4 , 1 4 , 1 2 , 6 , 9 , 1 3 , 1 5 , 7 , 1 2 , 8 , 9 , 1 1 , 7 , 7 , 1 2 , 7 , 6 , 1 5 , 1 3 , 1 1 , 9 , 7 , 1 5 , 1 1 , 8 , 6 , 6 , 1 4 , 1 2 , 1 3 , 5 , 1 4 , 1 3 , 1 3 , 7 , 5 , 1 5 , 5 , 8 , 1 1 , 1 4 , 1 4 , 6 , 1 4 , 6 , 9 , 1 2 , 9 , 1 2 , 5 , 1 5 , 8 , 8 , 5 , 1 2 , 9 , 1 2 , 5 , 1 4 , 6 , 8 , 1 3 , 6 , 5 , 1 5 , 1 3 , 1 1 , 1 1 ] ) , N d = c d . c r e a t e ( [ 0 , 1 5 1 8 5 0 0 2 4 9 , 1 8 5 9 7 7 5 3 9 3 , 2 4 0 0 9 5 9 7 0 8 , 2 8 4 0 8 5 3 8 3 8 ] ) , I d = c d . c r e a t e ( [ 1 3 5 2 8 2 9 9 2 6 , 1 5 4 8 6 0 3 6 8 4 , 1 8 3 6 0 7 2 6 9 1 , 2 0 5 3 9 9 4 2 1 7 , 0 ] ) , O d = p d . R I P E M D 1 6 0 = d d . e x t e n d ( { _ d o R e s e t : f u n c t i o n ( ) { t h i s . _ h a s h = c d . c r e a t e ( [ 1 7 3 2 5 8 4 1 9 3 , 4 0 2 3 2 3 3 4 1 7 , 2 5 6 2 3 8 3 1 0 2 , 2 7 1 7 3 3 8 7 8 , 3 2 8 5 3 7 7 5 2 0 ] ) } , _ d o P r o c e s s B l o c k : f u n c t i o n ( G d , z d ) { f o r ( v a r d f = 0 ; d f < 1 6 ; d f + + ) { v a r W d = z d + d f , J d = G d [ W d ] ; G d [ W d ] = ( J d < < 8 | J d > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( J d < < 2 4 | J d > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } v a r X d = t h i s . _ h a s h . w o r d s , _ f = N d . w o r d s , v f = I d . w o r d s , S f = f d . w o r d s , g f = m d . w o r d s , b f = v d . w o r d s , T f = A d . w o r d s , M f , K f , Z f , e h , $ f , D f , L f , z f , J f , x f ; D f = M f = X d [ 0 ] , L f = K f = X d [ 1 ] , z f = Z f = X d [ 2 ] , J f = e h = X d [ 3 ] , x f = $ f = X d [ 4 ] ; f o r ( v a r y f , d f = 0 ; d f < 8 0 ; d f + = 1 ) y f = M f + G d [ z d + S f [ d f ] ] | 0 , d f < 1 6 ? y f + = F d ( K f , Z f , e h ) + _ f [ 0 ] : d f < 3 2 ? y f + = P d ( K f , Z f , e h ) + _ f [ 1 ] : d f < 4 8 ? y f + = M d ( K f , Z f , e h ) + _ f [ 2 ] : d f < 6 4 ? y f + = B d ( K f , Z f , e h ) + _ f [ 3 ] : y f + = j d ( K f , Z f , e h ) + _ f [ 4 ] , y f = y f | 0 , y f = H d ( y f , b f [ d f ] ) , y f = y f + $ f | 0 , M f = $ f , $ f = e h , e h = H d ( Z f , 1 0 ) , Z f = K f , K f = y f , y f = D f + G d [ z d + g f [ d f ] ] | 0 , d f < 1 6 ? y f + = j d ( L f , z f , J f ) + v f [ 0 ] : d f < 3 2 ? y f + = B d ( L f , z f , J f ) + v f [ 1 ] : d f < 4 8 ? y f + = M d ( L f , z f , J f ) + v f [ 2 ] : d f < 6 4 ? y f + = P d ( L f , z f , J f ) + v f [ 3 ] : y f + = F d ( L f , z f , J f ) + v f [ 4 ] , y f = y f | 0 , y f = H d ( y f , T f [ d f ] ) , y f = y f + x f | 0 , D f = x f , x f = J f , J f = H d ( z f , 1 0 ) , z f = L f , L f = y f ; y f = X d [ 1 ] + Z f + J f | 0 , X d [ 1 ] = X d [ 2 ] + e h + x f | 0 , X d [ 2 ] = X d [ 3 ] + $ f + D f | 0 , X d [ 3 ] = X d [ 4 ] + M f + L f | 0 , X d [ 4 ] = X d [ 0 ] + K f + z f | 0 , X d [ 0 ] = y f } , _ d o F i n a l i z e : f u n c t i o n ( ) { v a r G d = t h i s . _ d a t a , z d = G d . w o r d s , d f = t h i s . _ n D a t a B y t e s * 8 , W d = G d . s i g B y t e s * 8 ; z d [ W d > > > 5 ] | = 1 2 8 < < 2 4 - W d % 3 2 , z d [ ( W d + 6 4 > > > 9 < < 4 ) + 1 4 ] = ( d f < < 8 | d f > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( d f < < 2 4 | d f > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 , G d . s i g B y t e s = ( z d . l e n g t h + 1 ) * 4 , t h i s . _ p r o c e s s ( ) ; f o r ( v a r J d = t h i s . _ h a s h , X d = J d . w o r d s , _ f = 0 ; _ f < 5 ; _ f + + ) { v a r v f = X d [ _ f ] ; X d [ _ f ] = ( v f < < 8 | v f > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( v f < < 2 4 | v f > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 } r e t u r n J d } , c l o n e : f u n c t i o n ( ) { v a r G d = d d . c l o n e . c a l l ( t h i s ) ; r e t u r n G d . _ h a s h = t h i s . _ h a s h . c l o n e ( ) , G d } } ) ; f u n c t i o n F d ( G d , z d , d f ) { r e t u r n G d ^ z d ^ d f } f u n c t i o n P d ( G d , z d , d f ) { r e t u r n G d & z d | ~ G d & d f } f u n c t i o n M d ( G d , z d , d f ) { r e t u r n ( G d | ~ z d ) ^ d f } f u n c t i o n B d ( G d , z d , d f ) { r e t u r n G d & d f | z d & ~ d f } f u n c t i o n j d ( G d , z d , d f ) { r e t u r n G d ^ ( z d | ~ d f ) } f u n c t i o n H d ( G d , z d ) { r e t u r n G d < < z d | G d > > > 3 2 - z d } l d . R I P E M D 1 6 0 = d d . _ c r e a t e H e l p e r ( O d ) , l d . H m a c R I P E M D 1 6 0 = d d . _ c r e a t e H m a c H e l p e r ( O d ) } ( ) , n d . R I P E M D 1 6 0 } ) } ( r i p e m d 1 6 0 ) ) , r i p e m d 1 6 0 . e x p o r t s } v a r h m a c = { e x p o r t s : { } } , h a s R e q u i r e d H m a c ; f u n c t i o n r e q u i r e H m a c ( ) { r e t u r n h a s R e q u i r e d H m a c | | ( h a s R e q u i r e d H m a c = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { ( f u n c t i o n ( ) { v a r o d = n d , l d = o d . l i b , u d = l d . B a s e , c d = o d . e n c , d d = c d . U t f 8 , p d = o d . a l g o ; p d . H M A C = u d . e x t e n d ( { i n i t : f u n c t i o n ( f d , m d ) { f d = t h i s . _ h a s h e r = n e w f d . i n i t , t y p e o f m d = = " s t r i n g " & & ( m d = d d . p a r s e ( m d ) ) ; v a r v d = f d . b l o c k S i z e , A d = v d * 4 ; m d . s i g B y t e s > A d & & ( m d = f d . f i n a l i z e ( m d ) ) , m d . c l a m p ( ) ; f o r ( v a r N d = t h i s . _ o K e y = m d . c l o n e ( ) , I d = t h i s . _ i K e y = m d . c l o n e ( ) , O d = N d . w o r d s , F d = I d . w o r d s , P d = 0 ; P d < v d ; P d + + ) O d [ P d ] ^ = 1 5 4 9 5 5 6 8 2 8 , F d [ P d ] ^ = 9 0 9 5 2 2 4 8 6 ; N d . s i g B y t e s = I d . s i g B y t e s = A d , t h i s . r e s e t ( ) } , r e s e t : f u n c t i o n ( ) { v a r f d = t h i s . _ h a s h e r ; f d . r e s e t ( ) , f d . u p d a t e ( t h i s . _ i K e y ) } , u p d a t e : f u n c t i o n ( f d ) { r e t u r n t h i s . _ h a s h e r . u p d a t e ( f d ) , t h i s } , f i n a l i z e : f u n c t i o n ( f d ) { v a r m d = t h i s . _ h a s h e r , v d = m d . f i n a l i z e ( f d ) ; m d . r e s e t ( ) ; v a r A d = m d . f i n a l i z e ( t h i s . _ o K e y . c l o n e ( ) . c o n c a t ( v d ) ) ; r e t u r n A d } } ) } ) ( ) } ) } ( h m a c ) ) , h m a c . e x p o r t s } v a r p b k d f 2 = { e x p o r t s : { } } , h a s R e q u i r e d P b k d f 2 ; f u n c t i o n r e q u i r e P b k d f 2 ( ) { r e t u r n h a s R e q u i r e d P b k d f 2 | | ( h a s R e q u i r e d P b k d f 2 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e S h a 2 5 6 ( ) , r e q u i r e H m a c ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u
2024-09-18 09:46:23 +08:00
* Counter block mode compatible with Dr Brian Gladman fileenc . c
* derived from CryptoJS . mode . CTR
* Jan Hruby jhruby . web @ gmail . com
2024-12-08 09:17:51 +08:00
* / r e t u r n n d . m o d e . C T R G l a d m a n = f u n c t i o n ( ) { v a r o d = n d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; f u n c t i o n l d ( d d ) { i f ( ( d d > > 2 4 & 2 5 5 ) = = = 2 5 5 ) { v a r p d = d d > > 1 6 & 2 5 5 , f d = d d > > 8 & 2 5 5 , m d = d d & 2 5 5 ; p d = = = 2 5 5 ? ( p d = 0 , f d = = = 2 5 5 ? ( f d = 0 , m d = = = 2 5 5 ? m d = 0 : + + m d ) : + + f d ) : + + p d , d d = 0 , d d + = p d < < 1 6 , d d + = f d < < 8 , d d + = m d } e l s e d d + = 1 < < 2 4 ; r e t u r n d d } f u n c t i o n u d ( d d ) { r e t u r n ( d d [ 0 ] = l d ( d d [ 0 ] ) ) = = = 0 & & ( d d [ 1 ] = l d ( d d [ 1 ] ) ) , d d } v a r c d = o d . E n c r y p t o r = o d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( d d , p d ) { v a r f d = t h i s . _ c i p h e r , m d = f d . b l o c k S i z e , v d = t h i s . _ i v , A d = t h i s . _ c o u n t e r ; v d & & ( A d = t h i s . _ c o u n t e r = v d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , u d ( A d ) ; v a r N d = A d . s l i c e ( 0 ) ; f d . e n c r y p t B l o c k ( N d , 0 ) ; f o r ( v a r I d = 0 ; I d < m d ; I d + + ) d d [ p d + I d ] ^ = N d [ I d ] } } ) ; r e t u r n o d . D e c r y p t o r = c d , o d } ( ) , n d . m o d e . C T R G l a d m a n } ) } ( m o d e C t r G l a d m a n ) ) , m o d e C t r G l a d m a n . e x p o r t s } v a r m o d e O f b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e O f b ; f u n c t i o n r e q u i r e M o d e O f b ( ) { r e t u r n h a s R e q u i r e d M o d e O f b | | ( h a s R e q u i r e d M o d e O f b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . m o d e . O F B = f u n c t i o n ( ) { v a r o d = n d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) , l d = o d . E n c r y p t o r = o d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( u d , c d ) { v a r d d = t h i s . _ c i p h e r , p d = d d . b l o c k S i z e , f d = t h i s . _ i v , m d = t h i s . _ k e y s t r e a m ; f d & & ( m d = t h i s . _ k e y s t r e a m = f d . s l i c e ( 0 ) , t h i s . _ i v = v o i d 0 ) , d d . e n c r y p t B l o c k ( m d , 0 ) ; f o r ( v a r v d = 0 ; v d < p d ; v d + + ) u d [ c d + v d ] ^ = m d [ v d ] } } ) ; r e t u r n o d . D e c r y p t o r = l d , o d } ( ) , n d . m o d e . O F B } ) } ( m o d e O f b ) ) , m o d e O f b . e x p o r t s } v a r m o d e E c b = { e x p o r t s : { } } , h a s R e q u i r e d M o d e E c b ; f u n c t i o n r e q u i r e M o d e E c b ( ) { r e t u r n h a s R e q u i r e d M o d e E c b | | ( h a s R e q u i r e d M o d e E c b = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . m o d e . E C B = f u n c t i o n ( ) { v a r o d = n d . l i b . B l o c k C i p h e r M o d e . e x t e n d ( ) ; r e t u r n o d . E n c r y p t o r = o d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( l d , u d ) { t h i s . _ c i p h e r . e n c r y p t B l o c k ( l d , u d ) } } ) , o d . D e c r y p t o r = o d . e x t e n d ( { p r o c e s s B l o c k : f u n c t i o n ( l d , u d ) { t h i s . _ c i p h e r . d e c r y p t B l o c k ( l d , u d ) } } ) , o d } ( ) , n d . m o d e . E C B } ) } ( m o d e E c b ) ) , m o d e E c b . e x p o r t s } v a r p a d A n s i x 9 2 3 = { e x p o r t s : { } } , h a s R e q u i r e d P a d A n s i x 9 2 3 ; f u n c t i o n r e q u i r e P a d A n s i x 9 2 3 ( ) { r e t u r n h a s R e q u i r e d P a d A n s i x 9 2 3 | | ( h a s R e q u i r e d P a d A n s i x 9 2 3 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . p a d . A n s i X 9 2 3 = { p a d : f u n c t i o n ( o d , l d ) { v a r u d = o d . s i g B y t e s , c d = l d * 4 , d d = c d - u d % c d , p d = u d + d d - 1 ; o d . c l a m p ( ) , o d . w o r d s [ p d > > > 2 ] | = d d < < 2 4 - p d % 4 * 8 , o d . s i g B y t e s + = d d } , u n p a d : f u n c t i o n ( o d ) { v a r l d = o d . w o r d s [ o d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; o d . s i g B y t e s - = l d } } , n d . p a d . A n s i x 9 2 3 } ) } ( p a d A n s i x 9 2 3 ) ) , p a d A n s i x 9 2 3 . e x p o r t s } v a r p a d I s o 1 0 1 2 6 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 1 0 1 2 6 ; f u n c t i o n r e q u i r e P a d I s o 1 0 1 2 6 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 1 0 1 2 6 | | ( h a s R e q u i r e d P a d I s o 1 0 1 2 6 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . p a d . I s o 1 0 1 2 6 = { p a d : f u n c t i o n ( o d , l d ) { v a r u d = l d * 4 , c d = u d - o d . s i g B y t e s % u d ; o d . c o n c a t ( n d . l i b . W o r d A r r a y . r a n d o m ( c d - 1 ) ) . c o n c a t ( n d . l i b . W o r d A r r a y . c r e a t e ( [ c d < < 2 4 ] , 1 ) ) } , u n p a d : f u n c t i o n ( o d ) { v a r l d = o d . w o r d s [ o d . s i g B y t e s - 1 > > > 2 ] & 2 5 5 ; o d . s i g B y t e s - = l d } } , n d . p a d . I s o 1 0 1 2 6 } ) } ( p a d I s o 1 0 1 2 6 ) ) , p a d I s o 1 0 1 2 6 . e x p o r t s } v a r p a d I s o 9 7 9 7 1 = { e x p o r t s : { } } , h a s R e q u i r e d P a d I s o 9 7 9 7 1 ; f u n c t i o n r e q u i r e P a d I s o 9 7 9 7 1 ( ) { r e t u r n h a s R e q u i r e d P a d I s o 9 7 9 7 1 | | ( h a s R e q u i r e d P a d I s o 9 7 9 7 1 = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . p a d . I s o 9 7 9 7 1 = { p a d : f u n c t i o n ( o d , l d ) { o d . c o n c a t ( n d . l i b . W o r d A r r a y . c r e a t e ( [ 2 1 4 7 4 8 3 6 4 8 ] , 1 ) ) , n d . p a d . Z e r o P a d d i n g . p a d ( o d , l d ) } , u n p a d : f u n c t i o n ( o d ) { n d . p a d . Z e r o P a d d i n g . u n p a d ( o d ) , o d . s i g B y t e s - - } } , n d . p a d . I s o 9 7 9 7 1 } ) } ( p a d I s o 9 7 9 7 1 ) ) , p a d I s o 9 7 9 7 1 . e x p o r t s } v a r p a d Z e r o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d Z e r o p a d d i n g ; f u n c t i o n r e q u i r e P a d Z e r o p a d d i n g ( ) { r e t u r n h a s R e q u i r e d P a d Z e r o p a d d i n g | | ( h a s R e q u i r e d P a d Z e r o p a d d i n g = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( n d , o d , l d ) { R a . e x p o r t s = o d ( r e q u i r e C o r e ( ) , r e q u i r e C i p h e r C o r e ( ) ) } ) ( c o m m o n j s G l o b a l , f u n c t i o n ( n d ) { r e t u r n n d . p a d . Z e r o P a d d i n g = { p a d : f u n c t i o n ( o d , l d ) { v a r u d = l d * 4 ; o d . c l a m p ( ) , o d . s i g B y t e s + = u d - ( o d . s i g B y t e s % u d | | u d ) } , u n p a d : f u n c t i o n ( o d ) { f o r ( v a r l d = o d . w o r d s , u d = o d . s i g B y t e s - 1 , u d = o d . s i g B y t e s - 1 ; u d > = 0 ; u d - - ) i f ( l d [ u d > > > 2 ] > > > 2 4 - u d % 4 * 8 & 2 5 5 ) { o d . s i g B y t e s = u d + 1 ; b r e a k } } } , n d . p a d . Z e r o P a d d i n g } ) } ( p a d Z e r o p a d d i n g ) ) , p a d Z e r o p a d d i n g . e x p o r t s } v a r p a d N o p a d d i n g = { e x p o r t s : { } } , h a s R e q u i r e d P a d N o p a d d i n g ; f u n c t i o n r e q u i r e P a d N o p a d d i
2024-09-18 09:46:23 +08:00
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-12-08 09:17:51 +08:00
* / ( f u n c t i o n ( R a ) { v a r q a = r e q u i r e B a s e 6 4 J s ( ) , n d = i e e e 7 5 4 , o d = t y p e o f S y m b o l = = " f u n c t i o n " & & t y p e o f S y m b o l . f o r = = " f u n c t i o n " ? S y m b o l . f o r ( " n o d e j s . u t i l . i n s p e c t . c u s t o m " ) : n u l l ; R a . B u f f e r = d d , R a . S l o w B u f f e r = M d , R a . I N S P E C T _ M A X _ B Y T E S = 5 0 ; v a r l d = 2 1 4 7 4 8 3 6 4 7 ; R a . k M a x L e n g t h = l d , d d . T Y P E D _ A R R A Y _ S U P P O R T = u d ( ) , ! d d . T Y P E D _ A R R A Y _ S U P P O R T & & t y p e o f c o n s o l e < " u " & & t y p e o f c o n s o l e . e r r o r = = " f u n c t i o n " & & c o n s o l e . e r r o r ( " T h i s b r o w s e r l a c k s t y p e d a r r a y ( U i n t 8 A r r a y ) s u p p o r t w h i c h i s r e q u i r e d b y ` b u f f e r ` v 5 . x . U s e ` b u f f e r ` v 4 . x i f y o u r e q u i r e o l d b r o w s e r s u p p o r t . " ) ; f u n c t i o n u d ( ) { t r y { v a r G f = n e w U i n t 8 A r r a y ( 1 ) , w f = { f o o : f u n c t i o n ( ) { r e t u r n 4 2 } } ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( G f , w f ) , G f . f o o ( ) = = = 4 2 } c a t c h { r e t u r n ! 1 } } O b j e c t . d e f i n e P r o p e r t y ( d d . p r o t o t y p e , " p a r e n t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( d d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b u f f e r } } ) , O b j e c t . d e f i n e P r o p e r t y ( d d . p r o t o t y p e , " o f f s e t " , { e n u m e r a b l e : ! 0 , g e t : f u n c t i o n ( ) { i f ( d d . i s B u f f e r ( t h i s ) ) r e t u r n t h i s . b y t e O f f s e t } } ) ; f u n c t i o n c d ( G f ) { i f ( G f > l d ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + G f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) ; v a r w f = n e w U i n t 8 A r r a y ( G f ) ; r e t u r n O b j e c t . s e t P r o t o t y p e O f ( w f , d d . p r o t o t y p e ) , w f } f u n c t i o n d d ( G f , w f , R f ) { i f ( t y p e o f G f = = " n u m b e r " ) { i f ( t y p e o f w f = = " s t r i n g " ) t h r o w n e w T y p e E r r o r ( ' T h e " s t r i n g " a r g u m e n t m u s t b e o f t y p e s t r i n g . R e c e i v e d t y p e n u m b e r ' ) ; r e t u r n v d ( G f ) } r e t u r n p d ( G f , w f , R f ) } d d . p o o l S i z e = 8 1 9 2 ; f u n c t i o n p d ( G f , w f , R f ) { i f ( t y p e o f G f = = " s t r i n g " ) r e t u r n A d ( G f , w f ) ; i f ( A r r a y B u f f e r . i s V i e w ( G f ) ) r e t u r n I d ( G f ) ; i f ( G f = = n u l l ) t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f G f ) ; i f ( k f ( G f , A r r a y B u f f e r ) | | G f & & k f ( G f . b u f f e r , A r r a y B u f f e r ) | | t y p e o f S h a r e d A r r a y B u f f e r < " u " & & ( k f ( G f , S h a r e d A r r a y B u f f e r ) | | G f & & k f ( G f . b u f f e r , S h a r e d A r r a y B u f f e r ) ) ) r e t u r n O d ( G f , w f , R f ) ; i f ( t y p e o f G f = = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' T h e " v a l u e " a r g u m e n t m u s t n o t b e o f t y p e n u m b e r . R e c e i v e d t y p e n u m b e r ' ) ; v a r U f = G f . v a l u e O f & & G f . v a l u e O f ( ) ; i f ( U f ! = n u l l & & U f ! = = G f ) r e t u r n d d . f r o m ( U f , w f , R f ) ; v a r p h = F d ( G f ) ; i f ( p h ) r e t u r n p h ; i f ( t y p e o f S y m b o l < " u " & & S y m b o l . t o P r i m i t i v e ! = n u l l & & t y p e o f G f [ S y m b o l . t o P r i m i t i v e ] = = " f u n c t i o n " ) r e t u r n d d . f r o m ( G f [ S y m b o l . t o P r i m i t i v e ] ( " s t r i n g " ) , w f , R f ) ; t h r o w n e w T y p e E r r o r ( " T h e f i r s t a r g u m e n t m u s t b e o n e o f t y p e s t r i n g , B u f f e r , A r r a y B u f f e r , A r r a y , o r A r r a y - l i k e O b j e c t . R e c e i v e d t y p e " + t y p e o f G f ) } d d . f r o m = f u n c t i o n ( G f , w f , R f ) { r e t u r n p d ( G f , w f , R f ) } , O b j e c t . s e t P r o t o t y p e O f ( d d . p r o t o t y p e , U i n t 8 A r r a y . p r o t o t y p e ) , O b j e c t . s e t P r o t o t y p e O f ( d d , U i n t 8 A r r a y ) ; f u n c t i o n f d ( G f ) { i f ( t y p e o f G f ! = " n u m b e r " ) t h r o w n e w T y p e E r r o r ( ' " s i z e " a r g u m e n t m u s t b e o f t y p e n u m b e r ' ) ; i f ( G f < 0 ) t h r o w n e w R a n g e E r r o r ( ' T h e v a l u e " ' + G f + ' " i s i n v a l i d f o r o p t i o n " s i z e " ' ) } f u n c t i o n m d ( G f , w f , R f ) { r e t u r n f d ( G f ) , G f < = 0 ? c d ( G f ) : w f ! = = v o i d 0 ? t y p e o f R f = = " s t r i n g " ? c d ( G f ) . f i l l ( w f , R f ) : c d ( G f ) . f i l l ( w f ) : c d ( G f ) } d d . a l l o c = f u n c t i o n ( G f , w f , R f ) { r e t u r n m d ( G f , w f , R f ) } ; f u n c t i o n v d ( G f ) { r e t u r n f d ( G f ) , c d ( G f < 0 ? 0 : P d ( G f ) | 0 ) } d d . a l l o c U n s a f e = f u n c t i o n ( G f ) { r e t u r n v d ( G f ) } , d d . a l l o c U n s a f e S l o w = f u n c t i o n ( G f ) { r e t u r n v d ( G f ) } ; f u n c t i o n A d ( G f , w f ) { i f ( ( t y p e o f w f ! = " s t r i n g " | | w f = = = " " ) & & ( w f = " u t f 8 " ) , ! d d . i s E n c o d i n g ( w f ) ) t h r o w n e w T y p e E r r o r ( " U n k n o w n e n c o d i n g : " + w f ) ; v a r R f = B d ( G f , w f ) | 0 , U f = c d ( R f ) , p h = U f . w r i t e ( G f , w f ) ; r e t u r n p h ! = = R f & & ( U f = U f . s l i c e ( 0 , p h ) ) , U f } f u n c t i o n N d ( G f ) { f o r ( v a r w f = G f . l e n g t h < 0 ? 0 : P d ( G f . l e n g t h ) | 0 , R f = c d ( w f ) , U f = 0 ; U f < w f ; U f + = 1 ) R f [ U f ] = G f [ U f ] & 2 5 5 ; r e t u r n R f } f u n c t i o n I d ( G f ) { i f ( k f ( G f , U i n t 8 A r r a y ) ) { v a r w f = n e w U i n t 8 A r r a y ( G f ) ; r e t u r n O d ( w f . b u f f e r , w f . b y t e O f f s e t , w f . b y t e L e n g t h ) } r e t u r n N d ( G f ) } f u n c t i o n O d ( G f , w f , R f ) { i f ( w f < 0 | | G f . b y t e L e n g t h < w f ) t h r o w n e w R a n g e E r r o r ( ' " o f f s e t " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; i f ( G f . b y t e L e n g t h < w f + ( R f | | 0 ) ) t h r o w n e w R a n g e E r r o r ( ' " l e n g t h " i s o u t s i d e o f b u f f e r b o u n d s ' ) ; v a r U f ; r e t u r n w f = = = v o i d 0 & & R f = = = v o i d 0 ? U f = n e w U i n t 8 A r r a y ( G f ) : R f = = = v o i d 0 ? U f = n e w U i n t 8 A r r a y ( G f , w f ) : U f = n e w U i n t 8 A r r a y ( G f , w f , R f ) , O b j e c t . s e t P r o t o t y p e O f ( U f , d d . p r o t o t y p e ) , U f } f u n c t i o n F d ( G f ) { i f ( d d . i s B u f f e r ( G f ) ) { v a r w f = P d ( G f . l e n g t h ) | 0 , R f = c d ( w f ) ; r e t u r n R f . l e n g t h = = = 0 | | G f . c o p y ( R f , 0 , 0 , w f ) , R f } i f ( G f . l e n g t h ! = = v o i d 0 ) r e t u r n t y p e o f G f . l e n g t h ! = " n u m b e r " | | V f ( G f . l e n g t h ) ? c d ( 0 ) : N d ( G f ) ; i f ( G f . t y p e = = = " B u f f e r " & & A r r a y . i s A r r a y ( G f . d a t a ) ) r e t u r n N d ( G f . d a t a ) } f u n c t i o n P d ( G f ) { i f ( G f > = l d ) t h r o w n e w R a n g e E r r o r ( " A t t e m p t t o a l l o c a t e B u f f e r l a r g e r t h a n m a x i m u m s i z e : 0 x " + l d . t o S t r i
2024-11-28 09:28:59 +08:00
` )>-1&&(Bf?oh=oh.split( `
` ).map(function(kf){return" "+kf}).join( `
` ).slice(2):oh= `
` +oh.split( `
` ).map(function(kf){return" "+kf}).join( `
2024-12-08 09:17:51 +08:00
` ))):oh=Lf.stylize("[Circular]","special")),Wd(qf)){if(Bf&&yf.match(/^ \d + $ /))return oh;qf=JSON.stringify(""+yf),qf.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)" $ /)?(qf=qf.slice(1,-1),qf=Lf.stylize(qf,"name")):(qf=qf.replace(/'/g," \\ '").replace(/ \\ "/g,'"').replace(/(^"|" $ )/g,"'"),qf=Lf.stylize(qf,"string"))}return qf+": "+oh}function Pd(Lf,zf,Jf){var xf=Lf.reduce(function(yf,Bf){return Bf.indexOf( `
` )>=0,yf+Bf.replace(/ \u 001b \[ \d \d ?m/g,"").length+1},0);return xf>60?Jf[0]+(zf===""?"":zf+ `
2024-11-28 09:28:59 +08:00
` )+" "+Lf.join( ` ,
2024-12-08 09:17:51 +08:00
` )+" "+Jf[1]:Jf[0]+zf+" "+Lf.join(", ")+" "+Jf[1]}Ra.types=types;function Md(Lf){return Array.isArray(Lf)}Ra.isArray=Md;function Bd(Lf){return typeof Lf=="boolean"}Ra.isBoolean=Bd;function jd(Lf){return Lf===null}Ra.isNull=jd;function Hd(Lf){return Lf==null}Ra.isNullOrUndefined=Hd;function Gd(Lf){return typeof Lf=="number"}Ra.isNumber=Gd;function zd(Lf){return typeof Lf=="string"}Ra.isString=zd;function df(Lf){return typeof Lf=="symbol"}Ra.isSymbol=df;function Wd(Lf){return Lf===void 0}Ra.isUndefined=Wd;function Jd(Lf){return Xd(Lf)&&bf(Lf)==="[object RegExp]"}Ra.isRegExp=Jd,Ra.types.isRegExp=Jd;function Xd(Lf){return typeof Lf=="object"&&Lf!==null}Ra.isObject=Xd;function _f(Lf){return Xd(Lf)&&bf(Lf)==="[object Date]"}Ra.isDate=_f,Ra.types.isDate=_f;function vf(Lf){return Xd(Lf)&&(bf(Lf)==="[object Error]"||Lf instanceof Error)}Ra.isError=vf,Ra.types.isNativeError=vf;function Sf(Lf){return typeof Lf=="function"}Ra.isFunction=Sf;function gf(Lf){return Lf===null||typeof Lf=="boolean"||typeof Lf=="number"||typeof Lf=="string"||typeof Lf=="symbol"||typeof Lf>"u"}Ra.isPrimitive=gf,Ra.isBuffer=isBufferBrowser;function bf(Lf){return Object.prototype.toString.call(Lf)}function Tf(Lf){return Lf<10?"0"+Lf.toString(10):Lf.toString(10)}var Mf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Kf(){var Lf=new Date,zf=[Tf(Lf.getHours()),Tf(Lf.getMinutes()),Tf(Lf.getSeconds())].join(":");return[Lf.getDate(),Mf[Lf.getMonth()],zf].join(" ")}Ra.log=function(){console.log("%s - %s",Kf(),Ra.format.apply(Ra,arguments))},Ra.inherits=inherits_browserExports,Ra._extend=function(Lf,zf){if(!zf||!Xd(zf))return Lf;for(var Jf=Object.keys(zf),xf=Jf.length;xf--;)Lf[Jf[xf]]=zf[Jf[xf]];return Lf};function Zf(Lf,zf){return Object.prototype.hasOwnProperty.call(Lf,zf)}var eh=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Ra.promisify=function(zf){if(typeof zf!="function")throw new TypeError('The "original" argument must be of type Function');if(eh&&zf[eh]){var Jf=zf[eh];if(typeof Jf!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Jf,eh,{value:Jf,enumerable:!1,writable:!1,configurable:!0}),Jf}function Jf(){for(var xf,yf,Bf=new Promise(function(Yf,kf){xf=Yf,yf=kf}),qf=[],oh=0;oh<arguments.length;oh++)qf.push(arguments[oh]);qf.push(function(Yf,kf){Yf?yf(Yf):xf(kf)});try{zf.apply(this,qf)}catch(Yf){yf(Yf)}return Bf}return Object.setPrototypeOf(Jf,Object.getPrototypeOf(zf)),eh&&Object.defineProperty(Jf,eh,{value:Jf,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Jf,od(zf))},Ra.promisify.custom=eh;function $ f(Lf,zf){if(!Lf){var Jf=new Error("Promise was rejected with a falsy value");Jf.reason=Lf,Lf=Jf}return zf(Lf)}function Df(Lf){if(typeof Lf!="function")throw new TypeError('The "original" argument must be of type Function');function zf(){for(var Jf=[],xf=0;xf<arguments.length;xf++)Jf.push(arguments[xf]);var yf=Jf.pop();if(typeof yf!="function")throw new TypeError("The last argument must be of type Function");var Bf=this,qf=function(){return yf.apply(Bf,arguments)};Lf.apply(this,Jf).then(function(oh){qa.nextTick(qf.bind(null,null,oh))},function(oh){qa.nextTick( $ f.bind(null,oh,qf))})}return Object.setPrototypeOf(zf,Object.getPrototypeOf(Lf)),Object.defineProperties(zf,od(Lf)),zf}Ra.callbackify=Df})(util $ 5);var buffer_list,hasRequiredBuffer_list;function requireBuffer_list(){if(hasRequiredBuffer_list)return buffer_list;hasRequiredBuffer_list=1;function Ra(Id,Od){var Fd=Object.keys(Id);if(Object.getOwnPropertySymbols){var Pd=Object.getOwnPropertySymbols(Id);Od&&(Pd=Pd.filter(function(Md){return Object.getOwnPropertyDescriptor(Id,Md).enumerable})),Fd.push.apply(Fd,Pd)}return Fd}function qa(Id){for(var Od=1;Od<arguments.length;Od++){var Fd=arguments[Od]!=null?arguments[Od]:{};Od%2?Ra(Object(Fd),!0).forEach(function(Pd){nd(Id,Pd,Fd[Pd])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Id,Object.getOwnPropertyDescriptors(Fd)):Ra(Object(Fd)).forEach(function(Pd){Object.defineProperty(Id,Pd,Object.getOwnPropertyDescript
2024-11-28 09:28:59 +08:00
` ,nd);nd=ld===-1?Ra.length:ld}else if(od!==-1&&Ra[nd]==="/"&&Ra[nd+1]==="*"){let ld=Ra.indexOf("*/",nd);ld!==-1?(nd=ld+2,od=Ra.indexOf("*/",nd)):(qa+=Ra[nd],nd++)}else qa+=Ra[nd],nd++;return qa}function parseParams(Ra){const qa=stripComments(Ra.toString());let nd=qa.match(FN_ARGS);if(nd||(nd=qa.match(ARROW_FN_ARGS)),!nd)throw new Error( ` could not parse args in autoInject
2024-09-18 09:46:23 +08:00
Source :
2024-12-08 09:17:51 +08:00
` +qa);let[,od]=nd;return od.replace(/ \s /g,"").split(FN_ARG_SPLIT).map(ld=>ld.replace(FN_ARG,"").trim())}function autoInject(Ra,qa){var nd={};return Object.keys(Ra).forEach(od=>{var ld=Ra[od],ud,cd=isAsync(ld),dd=!cd&&ld.length===1||cd&&ld.length===0;if(Array.isArray(ld))ud=[...ld],ld=ud.pop(),nd[od]=ud.concat(ud.length>0?pd:ld);else if(dd)nd[od]=ld;else{if(ud=parseParams(ld),ld.length===0&&!cd&&ud.length===0)throw new Error("autoInject task functions require explicit parameters.");cd||ud.pop(),nd[od]=ud.concat(pd)}function pd(fd,md){var vd=ud.map(Ad=>fd[Ad]);vd.push(md),wrapAsync(ld)(...vd)}}),auto(nd,qa)}class DLL{constructor(){this.head=this.tail=null,this.length=0}removeLink(qa){return qa.prev?qa.prev.next=qa.next:this.head=qa.next,qa.next?qa.next.prev=qa.prev:this.tail=qa.prev,qa.prev=qa.next=null,this.length-=1,qa}empty(){for(;this.head;)this.shift();return this}insertAfter(qa,nd){nd.prev=qa,nd.next=qa.next,qa.next?qa.next.prev=nd:this.tail=nd,qa.next=nd,this.length+=1}insertBefore(qa,nd){nd.prev=qa.prev,nd.next=qa,qa.prev?qa.prev.next=nd:this.head=nd,qa.prev=nd,this.length+=1}unshift(qa){this.head?this.insertBefore(this.head,qa):setInitial(this,qa)}push(qa){this.tail?this.insertAfter(this.tail,qa):setInitial(this,qa)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var qa=this.head;qa;)yield qa.data,qa=qa.next}remove(qa){for(var nd=this.head;nd;){var{next:od}=nd;qa(nd)&&this.removeLink(nd),nd=od}return this}}function setInitial(Ra,qa){Ra.length=1,Ra.head=Ra.tail=qa}function queue $ 1(Ra,qa,nd){if(qa==null)qa=1;else if(qa===0)throw new RangeError("Concurrency must not be zero");var od=wrapAsync(Ra),ld=0,ud=[];const cd={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function dd(Md,Bd){cd[Md].push(Bd)}function pd(Md,Bd){const jd=(...Hd)=>{fd(Md,jd),Bd(...Hd)};cd[Md].push(jd)}function fd(Md,Bd){if(!Md)return Object.keys(cd).forEach(jd=>cd[jd]=[]);if(!Bd)return cd[Md]=[];cd[Md]=cd[Md].filter(jd=>jd!==Bd)}function md(Md,...Bd){cd[Md].forEach(jd=>jd(...Bd))}var vd=!1;function Ad(Md,Bd,jd,Hd){if(Hd!=null&&typeof Hd!="function")throw new Error("task callback must be a function");Pd.started=!0;var Gd,zd;function df(Jd,...Xd){if(Jd)return jd?zd(Jd):Gd();if(Xd.length<=1)return Gd(Xd[0]);Gd(Xd)}var Wd=Pd._createTaskItem(Md,jd?df:Hd||df);if(Bd?Pd._tasks.unshift(Wd):Pd._tasks.push(Wd),vd||(vd=!0,setImmediate $ 1 $ 1(()=>{vd=!1,Pd.process()})),jd||!Hd)return new Promise((Jd,Xd)=>{Gd=Jd,zd=Xd})}function Nd(Md){return function(Bd,...jd){ld-=1;for(var Hd=0,Gd=Md.length;Hd<Gd;Hd++){var zd=Md[Hd],df=ud.indexOf(zd);df===0?ud.shift():df>0&&ud.splice(df,1),zd.callback(Bd,...jd),Bd!=null&&md("error",Bd,zd.data)}ld<=Pd.concurrency-Pd.buffer&&md("unsaturated"),Pd.idle()&&md("drain"),Pd.process()}}function Id(Md){return Md.length===0&&Pd.idle()?(setImmediate $ 1 $ 1(()=>md("drain")),!0):!1}const Od=Md=>Bd=>{if(!Bd)return new Promise((jd,Hd)=>{pd(Md,(Gd,zd)=>{if(Gd)return Hd(Gd);jd(zd)})});fd(Md),dd(Md,Bd)};var Fd=!1,Pd={_tasks:new DLL,_createTaskItem(Md,Bd){return{data:Md,callback:Bd}},*[Symbol.iterator](){yield*Pd._tasks[Symbol.iterator]()},concurrency:qa,payload:nd,buffer:qa/4,started:!1,paused:!1,push(Md,Bd){return Array.isArray(Md)?Id(Md)?void 0:Md.map(jd=>Ad(jd,!1,!1,Bd)):Ad(Md,!1,!1,Bd)},pushAsync(Md,Bd){return Array.isArray(Md)?Id(Md)?void 0:Md.map(jd=>Ad(jd,!1,!0,Bd)):Ad(Md,!1,!0,Bd)},kill(){fd(),Pd._tasks.empty()},unshift(Md,Bd){return Array.isArray(Md)?Id(Md)?void 0:Md.map(jd=>Ad(jd,!0,!1,Bd)):Ad(Md,!0,!1,Bd)},unshiftAsync(Md,Bd){return Array.isArray(Md)?Id(Md)?void 0:Md.map(jd=>Ad(jd,!0,!0,Bd)):Ad(Md,!0,!0,Bd)},remove(Md){Pd._tasks.remove(Md)},process(){if(!Fd){for(Fd=!0;!Pd.paused&&ld<Pd.concurrency&&Pd._tasks.length;){var Md=[],Bd=[],jd=Pd._tasks.length;Pd.payload&&(jd=Math.min(jd,Pd.payload));for(var Hd=0;Hd<jd;Hd++){var Gd=Pd._tasks.shift();Md.push(Gd),ud.push(Gd),Bd.push(Gd.data)}ld+=1,Pd._tasks.length===0&&md("empty"),ld===Pd.concurrency&&md("saturated");var zd=onlyOnce(Nd(Md));od(Bd,zd)}Fd=!1}},length(){return Pd._tasks.
2024-09-18 09:46:23 +08:00
* @ license
* Lodash < https : //lodash.com/>
* Copyright OpenJS Foundation and other contributors < https : //openjsf.org/>
* Released under MIT license < https : //lodash.com/license>
* Based on Underscore . js 1.8 . 3 < http : //underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas , DocumentCloud and Investigative Reporters & Editors
2024-12-08 09:17:51 +08:00
* /lodash.exports;(function(Ra,qa){(function(){var nd,od="4.17.21",ld=200,ud="Unsupported core-js use. Try https:/ / npms . io / search ? q = ponyfill . ",cd=" Expected a function ",dd=" Invalid ` variable ` option passed into ` _.template ` ",pd=" _ _lodash _hash _undefined _ _ ",fd=500,md=" _ _lodash _placeholder _ _ ",vd=1,Ad=2,Nd=4,Id=1,Od=2,Fd=1,Pd=2,Md=4,Bd=8,jd=16,Hd=32,Gd=64,zd=128,df=256,Wd=512,Jd=30,Xd=" ... ",_f=800,vf=16,Sf=1,gf=2,bf=3,Tf=1/0,Mf=9007199254740991,Kf=17976931348623157e292,Zf=NaN,eh=4294967295,$f=eh-1,Df=eh>>>1,Lf=[[" ary ",zd],[" bind ",Fd],[" bindKey ",Pd],[" curry ",Bd],[" curryRight ",jd],[" flip ",Wd],[" partial ",Hd],[" partialRight ",Gd],[" rearg ",df]],zf=" [ object Arguments ] ",Jf=" [ object Array ] ",xf=" [ object AsyncFunction ] ",yf=" [ object Boolean ] ",Bf=" [ object Date ] ",qf=" [ object DOMException ] ",oh=" [ object Error ] ",Yf=" [ object Function ] ",kf=" [ object GeneratorFunction ] ",Vf=" [ object Map ] ",fh=" [ object Number ] ",Gf=" [ object Null ] ",wf=" [ object Object ] ",Rf=" [ object Promise ] ",Uf=" [ object Proxy ] ",ph=" [ object RegExp ] ",gh=" [ object Set ] ",ah=" [ object String ] ",Ah=" [ object Symbol ] ",dh=" [ object Undefined ] ",Mh=" [ object WeakMap ] ",Yh=" [ object WeakSet ] ",Bh=" [ object ArrayBuffer ] ",Xh=" [ object DataView ] ",dm=" [ object Float32Array ] ",nh=" [ object Float64Array ] ",Of=" [ object Int8Array ] ",Nf=" [ object Int16Array ] ",rh=" [ object Int32Array ] ",ch=" [ object Uint8Array ] ",Sh=" [ object Uint8ClampedArray ] ",Oh=" [ object Uint16Array ] ",Zh=" [ object Uint32Array ] ",hm=/\b__p \+= '';/g,sm=/\b(__p \+=) '' \+/g,Fm=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Rm=/&(?:amp|lt|gt|quot|#39);/g,Hm=/[&<>" ']/g,Zm=RegExp(Rm.source),L_=RegExp(Hm.source),l_=/<%-([\s\S]+?)%>/g,T_=/<%([\s\S]+?)%>/g,Qm=/<%=([\s\S]+?)%>/g,F_=/\.|\[(?:[^[\]]*|(["' ] ) ( ? : ( ? ! \ 1 ) [ ^ \ \ ] | \ \ . ) * ? \ 1 ) \ ] / , j _ = /^\w*$/ , G _ = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g , Q _ = /[\\^$.*+?()[\]{}|]/g , q _ = RegExp ( Q _ . source ) , D _ = /^\s+/ , Im = /\s/ , Ig = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/ , Ug = /\{\n\/\* \[wrapped with (.+)\] \*/ , $g = /,? & / , If = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g , th = /[()=,{}\[\]\/\s]/ , Xf = /\\(\\)?/g , uh = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g , Th = /\w*$/ , yh = /^[-+]0x[0-9a-f]+$/i , Rh = /^0b[01]+$/i , wh = /^\[object .+?Constructor\]$/ , _h = /^0o[0-7]+$/i , Jh = /^(?:0|[1-9]\d*)$/ , um = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g , Um = /($^)/ , Tm = /['\n\r\u2028\u2029\\]/g , zm = "\\ud800-\\udfff" , S _ = "\\u0300-\\u036f" , C _ = "\\ufe20-\\ufe2f" , d _ = "\\u20d0-\\u20ff" , Dm = S _ + C _ + d _ , V _ = "\\u2700-\\u27bf" , h _ = "a-z\\xdf-\\xf6\\xf8-\\xff" , n _ = "\\xac\\xb1\\xd7\\xf7" , Lm = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf" , v _ = "\\u2000-\\u206f" , Jg = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000" , Zg = "A-Z\\xc0-\\xd6\\xd8-\\xde" , mm = "\\ufe0e\\ufe0f" , i _ = n _ + Lm + v _ + Jg , Og = "['’ ]" , f0 = "[" + zm + "]" , h0 = "[" + i _ + "]" , Hg = "[" + Dm + "]" , e0 = "\\d+" , a _ = "[" + V _ + "]" , Rg = "[" + h _ + "]" , z _ = "[^" + zm + i _ + e0 + V _ + h _ + Zg + "]" , mg = "\\ud83c[\\udffb-\\udfff]" , ag = "(?:" + Hg + "|" + mg + ")" , t0 = "[^" + zm + "]" , R0 = "(?:\\ud83c[\\udde6-\\uddff]){2}" , _g = "[\\ud800-\\udbff][\\udc00-\\udfff]" , r0 = "[" + Zg + "]" , Cb = "\\u200d" , ib = "(?:" + Rg + "|" + z _ + ")" , e _ = "(?:" + r0 + "|" + z _ + ")" , ab = "(?:" + Og + "(?:d|ll|m|re|s|t|ve))?" , V0 = "(?:" + Og + "(?:D|LL|M|RE|S|T|VE))?" , Ab = ag + "?" , tv = "[" + mm + "]?" , rv = "(?:" + Cb + "(?:" + [ t0 , R0 , _g ] . join ( "|" ) + ")" + tv + Ab + ")*" , z0 = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])" , sg = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])" , Gg = tv + Ab + rv , m0 = "(?:" + [ a _ , R0 , _g ] . join ( "|" ) + ")" + Gg , W0 = "(?:" + [ t0 + Hg + "?" , Hg , R0 , _g , f0 ] . join ( "|" ) + ")" , sb = RegExp ( Og , "g" ) , _1 = RegExp ( Hg , "g" ) , Bv = RegExp ( mg + "(?=" + mg + ")|" + W0 + Gg , "g" ) , g1 = RegExp ( [ r0 + "?" + Rg + "+" + ab + "(?=" + [ h0 , r0 , "$" ] . join ( "|" ) + ")" , e _ + "+" + V0 + "(?=" + [ h0 , r0 + ib , "$" ] . join ( "|" ) + ")" , r0 + "?" + ib + "+" + ab , r0 + "+" + V0 , sg , z0 , e0 , m0 ] . join ( "|" ) , "g" ) , Ny = RegExp ( "[" + Cb + zm + Dm + mm + "]" ) , $v = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/ , b1 = [ "Array" , "Buffer" , "DataView" , "Date" , "Error" , "Float32Array" , "Float64Array" , "Function" , "Int8Array" , "Int16Array" , "Int32Array" , "Map" , "Math" , "Object" , "Promise" , "RegExp" , "Set" , "String" , "Symbol" , "TypeError" , "Uint8Array" , "Uint8ClampedArray" , "Uint16Array" , "Uint32Array" , "WeakMap" , "_" , " clearTim
2024-11-28 09:28:59 +08:00
/* [wrapped with `+Zd+`] */
2024-12-08 09:17:51 +08:00
` )}function Ud(qd){return __(qd)||h1(qd)||!!(ME&&qd&&qd[ME])}function Qd(qd,Zd){var Ef=typeof qd;return Zd=Zd??Mf,!!Zd&&(Ef=="number"||Ef!="symbol"&&Jh.test(qd))&&qd>-1&&qd%1==0&&qd<Zd}function Kd(qd,Zd,Ef){if(!cg(Ef))return!1;var Ff=typeof Zd;return(Ff=="number"?c0(Ef)&&Qd(Zd,Ef.length):Ff=="string"&&Zd in Ef)?rb(Ef[Zd],qd):!1}function pf(qd,Zd){if(__(qd))return!1;var Ef=typeof qd;return Ef=="number"||Ef=="symbol"||Ef=="boolean"||qd==null||D0(qd)?!0:j_.test(qd)||!F_.test(qd)||Zd!=null&&qd in U_(Zd)}function Cf(qd){var Zd=typeof qd;return Zd=="string"||Zd=="number"||Zd=="symbol"||Zd=="boolean"?qd!=="__proto__":qd===null}function Pf(qd){var Zd=p1(qd),Ef=hh[Zd];if(typeof Ef!="function"||!(Zd in o_.prototype))return!1;if(qd===Ef)return!0;var Ff=d1(Ef);return!!Ff&&qd===Ff[0]}function jf(qd){return!!I1&&I1 in qd}var Qf=X0?Qb:vT;function ih(qd){var Zd=qd&&qd.constructor,Ef=typeof Zd=="function"&&Zd.prototype||v0;return qd===Ef}function vh(qd){return qd===qd&&!cg(qd)}function Ch(qd,Zd){return function(Ef){return Ef==null?!1:Ef[qd]===Zd&&(Zd!==nd||qd in U_(Ef))}}function qh(qd){var Zd=x2(qd,function(Ff){return Ef.size===fd&&Ef.clear(),Ff}),Ef=Zd.cache;return Zd}function Uh(qd,Zd){var Ef=qd[1],Ff=Zd[1],sh=Ef|Ff,mh=sh<(Fd|Pd|zd),kh=Ff==zd&&Ef==Bd||Ff==zd&&Ef==df&&qd[7].length<=Zd[8]||Ff==(zd|df)&&Zd[7].length<=Zd[8]&&Ef==Bd;if(!(mh||kh))return qd;Ff&Fd&&(qd[2]=Zd[2],sh|=Ef&Fd?0:Md);var Fh=Zd[3];if(Fh){var Wh=qd[3];qd[3]=Wh?z1(Wh,Fh,Zd[4]):Fh,qd[4]=Wh?zg(qd[3],md):Zd[4]}return Fh=Zd[5],Fh&&(Wh=qd[5],qd[5]=Wh?gE(Wh,Fh,Zd[6]):Fh,qd[6]=Wh?zg(qd[5],md):Zd[6]),Fh=Zd[7],Fh&&(qd[7]=Fh),Ff&zd&&(qd[8]=qd[8]==null?Zd[8]:pg(qd[8],Zd[8])),qd[9]==null&&(qd[9]=Zd[9]),qd[0]=Zd[0],qd[1]=sh,qd}function om(qd){var Zd=[];if(qd!=null)for(var Ef in U_(qd))Zd.push(Ef);return Zd}function fm(qd){return P0.call(qd)}function Nm(qd,Zd,Ef){return Zd=X_(Zd===nd?qd.length-1:Zd,0),function(){for(var Ff=arguments,sh=-1,mh=X_(Ff.length-Zd,0),kh=im(mh);++sh<mh;)kh[sh]=Ff[Zd+sh];sh=-1;for(var Fh=im(Zd+1);++sh<Zd;)Fh[sh]=Ff[sh];return Fh[Zd]=Ef(kh),Lg(qd,this,Fh)}}function $ m(qd,Zd){return Zd.length<2?qd:_b(qd,yg(Zd,0,-1))}function jm(qd,Zd){for(var Ef=qd.length,Ff=pg(Zd.length,Ef),sh=Vg(qd);Ff--;){var mh=Zd[Ff];qd[Ff]=Qd(mh,Ef)?sh[mh]:nd}return qd}function Pm(qd,Zd){if(!(Zd==="constructor"&&typeof qd[Zd]=="function")&&Zd!="__proto__")return qd[Zd]}var Vm= $ _(o2),t_=k1||function(qd,Zd){return M_.setTimeout(qd,Zd)},Jm= $ _(Y2);function m_(qd,Zd,Ef){var Ff=Zd+"";return Jm(qd,kd(Ff,lg(ng(Ff),Ef)))}function $ _(qd){var Zd=0,Ef=0;return function(){var Ff=k2(),sh=vf-(Ff-Ef);if(Ef=Ff,sh>0){if(++Zd>=_f)return arguments[0]}else Zd=0;return qd.apply(nd,arguments)}}function ig(qd,Zd){var Ef=-1,Ff=qd.length,sh=Ff-1;for(Zd=Zd===nd?Ff:Zd;++Ef<Zd;){var mh=G1(Ef,sh),kh=qd[mh];qd[mh]=qd[Ef],qd[Ef]=kh}return qd.length=Zd,qd}var K_=qh(function(qd){var Zd=[];return qd.charCodeAt(0)===46&&Zd.push(""),qd.replace(G_,function(Ef,Ff,sh,mh){Zd.push(sh?mh.replace(Xf," $ 1"):Ff||Ef)}),Zd});function eg(qd){if(typeof qd=="string"||D0(qd))return qd;var Zd=qd+"";return Zd=="0"&&1/qd==-Tf?"-0":Zd}function og(qd){if(qd!=null){try{return cv.call(qd)}catch{}try{return qd+""}catch{}}return""}function lg(qd,Zd){return qg(Lf,function(Ef){var Ff="_."+Ef[0];Zd&Ef[1]&&!av(qd,Ff)&&qd.push(Ff)}),qd.sort()}function Mg(qd){if(qd instanceof o_)return qd.clone();var Zd=new P_(qd.__wrapped__,qd.__chain__);return Zd.__actions__=Vg(qd.__actions__),Zd.__index__=qd.__index__,Zd.__values__=qd.__values__,Zd}function wg(qd,Zd,Ef){(Ef?Kd(qd,Zd,Ef):Zd===nd)?Zd=1:Zd=X_(b_(Zd),0);var Ff=qd==null?0:qd.length;if(!Ff||Zd<1)return[];for(var sh=0,mh=0,kh=im(Vv(Ff/Zd));sh<Ff;)kh[mh++]=yg(qd,sh,sh+=Zd);return kh}function fg(qd){for(var Zd=-1,Ef=qd==null?0:qd.length,Ff=0,sh=[];++Zd<Ef;){var mh=qd[Zd];mh&&(sh[Ff++]=mh)}return sh}function ug(){var qd=arguments.length;if(!qd)return[];for(var Zd=im(qd-1),Ef=arguments[0],Ff=qd;Ff--;)Zd[Ff-1]=arguments[Ff];return g0(__(Ef)?Vg(Ef):[Ef],vg(Zd,1))}var tg=g_(function(qd,Zd){return Sg(qd)?Qv(qd,vg(Zd,1,Sg,!0)):[]}),jg=g_(function(qd,Zd){var Ef=G0(Zd);return Sg(Ef)&&(Ef=nd),Sg(qd)?Qv(qd,vg(Zd,1,Sg,!0
2024-11-28 09:28:59 +08:00
` ;qd.replace(Wm,function(c_,x_,N_,I0,Qg,O0){return N_||(N_=I0),Sm+=qd.slice(_m,O0).replace(Tm,kb),x_&&(Fh=!0,Sm+= ` ' +
2024-09-25 14:23:53 +08:00
_ _e ( ` +x_+ ` ) +
2024-11-28 09:28:59 +08:00
'`),Qg&&(Wh=!0,Sm+=`' ;
` +Qg+ ` ;
_ _p += '`),N_&&(Sm+=`' +
( ( _ _t = ( ` +N_+ ` ) ) == null ? '' : _ _t ) +
'`),_m=O0+c_.length,c_}),Sm+=`' ;
` ;var u_=k_.call(Zd,"variable")&&Zd.variable;if(!u_)Sm= ` with ( obj ) {
` +Sm+ `
2024-09-18 09:46:23 +08:00
}
2024-12-08 09:17:51 +08:00
` ;else if(th.test(u_))throw new f_(dd);Sm=(Wh?Sm.replace(hm,""):Sm).replace(sm," $ 1").replace(Fm," $ 1;"),Sm="function("+(u_||"obj")+ ` ) {
2024-11-28 09:28:59 +08:00
` +(u_?"": ` obj || ( obj = { } ) ;
` )+"var __t, __p = ''"+(Fh?", __e = _.escape":"")+(Wh? ` , _ _j = Array . prototype . join ;
2024-09-18 09:46:23 +08:00
function print ( ) { _ _p += _ _j . call ( arguments , '' ) }
` : ` ;
2024-11-28 09:28:59 +08:00
` )+Sm+ ` return _ _p
2024-12-08 09:17:51 +08:00
} ` ;var y_=JT(function(){return A_(mh,r_+"return "+Sm).apply(nd,kh)});if(y_.source=Sm,uT(y_))throw y_;return y_}function gA(qd){return H_(qd).toLowerCase()}function bA(qd){return H_(qd).toUpperCase()}function vA(qd,Zd,Ef){if(qd=H_(qd),qd&&(Ef||Zd===nd))return Ym(qd);if(!qd||!(Zd=Kg(Zd)))return qd;var Ff=b0(qd),sh=b0(Zd),mh=I_(Ff,sh),kh=gg(Ff,sh)+1;return tb(Ff,mh,kh).join("")}function yA(qd,Zd,Ef){if(qd=H_(qd),qd&&(Ef||Zd===nd))return qd.slice(0,Oy(qd)+1);if(!qd||!(Zd=Kg(Zd)))return qd;var Ff=b0(qd),sh=gg(Ff,b0(Zd))+1;return tb(Ff,0,sh).join("")}function EA(qd,Zd,Ef){if(qd=H_(qd),qd&&(Ef||Zd===nd))return qd.replace(D_,"");if(!qd||!(Zd=Kg(Zd)))return qd;var Ff=b0(qd),sh=I_(Ff,b0(Zd));return tb(Ff,sh).join("")}function TA(qd,Zd){var Ef=Jd,Ff=Xd;if(cg(Zd)){var sh="separator"in Zd?Zd.separator:sh;Ef="length"in Zd?b_(Zd.length):Ef,Ff="omission"in Zd?Kg(Zd.omission):Ff}qd=H_(qd);var mh=qd.length;if(lv(qd)){var kh=b0(qd);mh=kh.length}if(Ef>=mh)return qd;var Fh=Ef-uv(Ff);if(Fh<1)return Ff;var Wh=kh?tb(kh,0,Fh).join(""):qd.slice(0,Fh);if(sh===nd)return Wh+Ff;if(kh&&(Fh+=Wh.length-Fh),cT(sh)){if(qd.slice(Fh).search(sh)){var _m,gm=Wh;for(sh.global||(sh=qv(sh.source,H_(Th.exec(sh))+"g")),sh.lastIndex=0;_m=sh.exec(gm);)var Sm=_m.index;Wh=Wh.slice(0,Sm===nd?Fh:Sm)}}else if(qd.indexOf(Kg(sh),Fh)!=Fh){var Wm=Wh.lastIndexOf(sh);Wm>-1&&(Wh=Wh.slice(0,Wm))}return Wh+Ff}function SA(qd){return qd=H_(qd),qd&&Zm.test(qd)?qd.replace(Rm,IE):qd}var xA=Iv(function(qd,Zd,Ef){return qd+(Ef?" ":"")+Zd.toUpperCase()}),fT=f2("toUpperCase");function QT(qd,Zd,Ef){return qd=H_(qd),Zd=Ef?nd:Zd,Zd===nd?wE(qd)?RE(qd):Dy(qd):qd.match(Zd)||[]}var JT=g_(function(qd,Zd){try{return Lg(qd,nd,Zd)}catch(Ef){return uT(Ef)?Ef:new f_(Ef)}}),CA=j0(function(qd,Zd){return qg(Zd,function(Ef){Ef=eg(Ef),Z0(qd,Ef,oT(qd[Ef],qd))}),qd});function AA(qd){var Zd=qd==null?0:qd.length,Ef=s_();return qd=Zd?W_(qd,function(Ff){if(typeof Ff[1]!="function")throw new s0(cd);return[Ef(Ff[0]),Ff[1]]}):[],g_(function(Ff){for(var sh=-1;++sh<Zd;){var mh=qd[sh];if(Lg(mh[0],this,Ff))return Lg(mh[1],this,Ff)}})}function wA(qd){return q2(Yg(qd,vd))}function hT(qd){return function(){return qd}}function NA(qd,Zd){return qd==null||qd!==qd?Zd:qd}var DA=h2(),IA=h2(!0);function p0(qd){return qd}function mT(qd){return Tv(typeof qd=="function"?qd:Yg(qd,vd))}function OA(qd){return t2(Yg(qd,vd))}function RA(qd,Zd){return cE(qd,Yg(Zd,vd))}var kA=g_(function(qd,Zd){return function(Ef){return yv(Ef,qd,Zd)}}),MA=g_(function(qd,Zd){return function(Ef){return yv(qd,Ef,Zd)}});function _T(qd,Zd,Ef){var Ff=Bg(Zd),sh=U1(Zd,Ff);Ef==null&&!(cg(Zd)&&(sh.length||!Ff.length))&&(Ef=Zd,Zd=qd,qd=this,sh=U1(Zd,Bg(Zd)));var mh=!(cg(Ef)&&"chain"in Ef)||!!Ef.chain,kh=Qb(qd);return qg(sh,function(Fh){var Wh=Zd[Fh];qd[Fh]=Wh,kh&&(qd.prototype[Fh]=function(){var _m=this.__chain__;if(mh||_m){var gm=qd(this.__wrapped__),Sm=gm.__actions__=Vg(this.__actions__);return Sm.push({func:Wh,args:arguments,thisArg:qd}),gm.__chain__=_m,gm}return Wh.apply(qd,g0([this.value()],arguments))})}),qd}function PA(){return M_._===this&&(M_._=Fg),this}function gT(){}function BA(qd){return qd=b_(qd),g_(function(Zd){return Cv(Zd,qd)})}var $ A=Y1(W_),LA=Y1(Ib),FA=Y1(lb);function ZT(qd){return pf(qd)?lh(eg(qd)):z2(qd)}function jA(qd){return function(Zd){return qd==null?nd:_b(qd,Zd)}}var UA=Xb(),HA=Xb(!0);function bT(){return[]}function vT(){return!1}function GA(){return{}}function qA(){return""}function VA(){return!0}function zA(qd,Zd){if(qd=b_(qd),qd<1||qd>Mf)return[];var Ef=eh,Ff=pg(qd,eh);Zd=s_(Zd),qd-=eh;for(var sh=Mm(Ff,Zd);++Ef<qd;)Zd(Ef);return sh}function WA(qd){return __(qd)?W_(qd,eg):D0(qd)?[qd]:Vg(K_(H_(qd)))}function YA(qd){var Zd=++kE;return H_(qd)+Zd}var KA=Ov(function(qd,Zd){return qd+Zd},0),XA=yE("ceil"),QA=Ov(function(qd,Zd){return qd/Zd},1),JA=yE("floor");function ZA(qd){return qd&&qd.length?F1(qd,p0,H1):nd}function ew(qd,Zd){return qd&&qd.length?F1(qd,s_(Zd,2),H1):nd}function tw(qd){return Wf(qd,p0)}function rw(qd,Zd){return Wf(qd,s_(Zd,2))}function nw(qd){return qd&&qd.length?F1(qd,p0,Wb):nd}function iw(qd,Zd){return qd&&qd.length?F1(qd,s_
2024-11-28 09:28:59 +08:00
` :"")),nd&&nd()}function ud(cd){return cd.interrupt?(cd.interrupt.append=Ra,cd.interrupt.end=ld,cd.interrupt=!1,Ra(!0),!0):!1}if(Ra(!1,qa.indents+(qa.name?"<"+qa.name:"")+(qa.attributes.length?" "+qa.attributes.join(" "):"")+(od?qa.name?">":"":qa.name?"/>":"")+(qa.indent&&od>1? `
` :"")),!od)return Ra(!1,qa.indent? `
` :"");ud(qa)||ld()}function attribute(Ra,qa){return Ra+'="'+escapeForXML(qa)+'"'}xml $ 2.exports=xml $ 1;xml $ 2.exports.element=xml $ 2.exports.Element=element;var xmlExports=xml $ 2.exports;const Xml=getDefaultExportFromCjs(xmlExports);var xml2js={},defaults={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,(function(){defaults.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:" $ ",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:" $ $ ",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline: `
2024-12-08 09:17:51 +08:00
` },headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(commonjsGlobal)),defaults}var builder={},lib $ 2={},Utility={},hasRequiredUtility;function requireUtility(){return hasRequiredUtility||(hasRequiredUtility=1,(function(){var Ra,qa,nd,od,ld,ud,cd,dd=[].slice,pd={}.hasOwnProperty;Ra=function(){var fd,md,vd,Ad,Nd,Id;if(Id=arguments[0],Nd=2<=arguments.length?dd.call(arguments,1):[],ld(Object.assign))Object.assign.apply(null,arguments);else for(fd=0,vd=Nd.length;fd<vd;fd++)if(Ad=Nd[fd],Ad!=null)for(md in Ad)pd.call(Ad,md)&&(Id[md]=Ad[md]);return Id},ld=function(fd){return!!fd&&Object.prototype.toString.call(fd)==="[object Function]"},ud=function(fd){var md;return!!fd&&((md=typeof fd)=="function"||md==="object")},nd=function(fd){return ld(Array.isArray)?Array.isArray(fd):Object.prototype.toString.call(fd)==="[object Array]"},od=function(fd){var md;if(nd(fd))return!fd.length;for(md in fd)if(pd.call(fd,md))return!1;return!0},cd=function(fd){var md,vd;return ud(fd)&&(vd=Object.getPrototypeOf(fd))&&(md=vd.constructor)&&typeof md=="function"&&md instanceof md&&Function.prototype.toString.call(md)===Function.prototype.toString.call(Object)},qa=function(fd){return ld(fd.valueOf)?fd.valueOf():fd},Utility.assign=Ra,Utility.isFunction=ld,Utility.isObject=ud,Utility.isArray=nd,Utility.isEmpty=od,Utility.isPlainObject=cd,Utility.getValue=qa}).call(commonjsGlobal)),Utility}var XMLDOMImplementation={exports:{}},hasRequiredXMLDOMImplementation;function requireXMLDOMImplementation(){return hasRequiredXMLDOMImplementation||(hasRequiredXMLDOMImplementation=1,(function(){XMLDOMImplementation.exports=function(){function Ra(){}return Ra.prototype.hasFeature=function(qa,nd){return!0},Ra.prototype.createDocumentType=function(qa,nd,od){throw new Error("This DOM method is not implemented.")},Ra.prototype.createDocument=function(qa,nd,od){throw new Error("This DOM method is not implemented.")},Ra.prototype.createHTMLDocument=function(qa){throw new Error("This DOM method is not implemented.")},Ra.prototype.getFeature=function(qa,nd){throw new Error("This DOM method is not implemented.")},Ra}()}).call(commonjsGlobal)),XMLDOMImplementation.exports}var XMLDocument={exports:{}},XMLDOMConfiguration={exports:{}},XMLDOMErrorHandler={exports:{}},hasRequiredXMLDOMErrorHandler;function requireXMLDOMErrorHandler(){return hasRequiredXMLDOMErrorHandler||(hasRequiredXMLDOMErrorHandler=1,(function(){XMLDOMErrorHandler.exports=function(){function Ra(){}return Ra.prototype.handleError=function(qa){throw new Error(qa)},Ra}()}).call(commonjsGlobal)),XMLDOMErrorHandler.exports}var XMLDOMStringList={exports:{}},hasRequiredXMLDOMStringList;function requireXMLDOMStringList(){return hasRequiredXMLDOMStringList||(hasRequiredXMLDOMStringList=1,(function(){XMLDOMStringList.exports=function(){function Ra(qa){this.arr=qa||[]}return Object.defineProperty(Ra.prototype,"length",{get:function(){return this.arr.length}}),Ra.prototype.item=function(qa){return this.arr[qa]||null},Ra.prototype.contains=function(qa){return this.arr.indexOf(qa)!==-1},Ra}()}).call(commonjsGlobal)),XMLDOMStringList.exports}var hasRequiredXMLDOMConfiguration;function requireXMLDOMConfiguration(){return hasRequiredXMLDOMConfiguration||(hasRequiredXMLDOMConfiguration=1,(function(){var Ra,qa;Ra=requireXMLDOMErrorHandler(),qa=requireXMLDOMStringList(),XMLDOMConfiguration.exports=function(){function nd(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new Ra,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(nd.prototype,"parameterNames",{get:function(){return new qa(Object.keys(this.defaultParams))}}),nd.prototype.getParameter=function(od){return this.params.hasOwnProperty(od)?this.params[od]:null},nd.prototype.canSetParameter=function(od,ld){return!0},nd.prototype.setParameter=func
` ,cd.offset=(fd=ud.offset)!=null?fd:0,cd.dontPrettyTextNodes=(md=(vd=ud.dontPrettyTextNodes)!=null?vd:ud.dontprettytextnodes)!=null?md:0,cd.spaceBeforeSlash=(Ad=(Nd=ud.spaceBeforeSlash)!=null?Nd:ud.spacebeforeslash)!=null?Ad:"",cd.spaceBeforeSlash===!0&&(cd.spaceBeforeSlash=" "),cd.suppressPrettyCount=0,cd.user={},cd.state=qa.None,cd},ld.prototype.indent=function(ud,cd,dd){var pd;return!cd.pretty||cd.suppressPrettyCount?"":cd.pretty&&(pd=(dd||0)+cd.offset+1,pd>0)?new Array(pd).join(cd.indent):""},ld.prototype.endline=function(ud,cd,dd){return!cd.pretty||cd.suppressPrettyCount?"":cd.newline},ld.prototype.attribute=function(ud,cd,dd){var pd;return this.openAttribute(ud,cd,dd),pd=" "+ud.name+'="'+ud.value+'"',this.closeAttribute(ud,cd,dd),pd},ld.prototype.cdata=function(ud,cd,dd){var pd;return this.openNode(ud,cd,dd),cd.state=qa.OpenTag,pd=this.indent(ud,cd,dd)+"<![CDATA[",cd.state=qa.InsideTag,pd+=ud.value,cd.state=qa.CloseTag,pd+="]]>"+this.endline(ud,cd,dd),cd.state=qa.None,this.closeNode(ud,cd,dd),pd},ld.prototype.comment=function(ud,cd,dd){var pd;return this.openNode(ud,cd,dd),cd.state=qa.OpenTag,pd=this.indent(ud,cd,dd)+"<!-- ",cd.state=qa.InsideTag,pd+=ud.value,cd.state=qa.CloseTag,pd+=" -->"+this.endline(ud,cd,dd),cd.state=qa.None,this.closeNode(ud,cd,dd),pd},ld.prototype.declaration=function(ud,cd,dd){var pd;return this.openNode(ud,cd,dd),cd.state=qa.OpenTag,pd=this.indent(ud,cd,dd)+"<?xml",cd.state=qa.InsideTag,pd+=' version="'+ud.version+'"',ud.encoding!=null&&(pd+=' encoding="'+ud.encoding+'"'),ud.standalone!=null&&(pd+=' standalone="'+ud.standalone+'"'),cd.state=qa.CloseTag,pd+=cd.spaceBeforeSlash+"?>",pd+=this.endline(ud,cd,dd),cd.state=qa.None,this.closeNode(ud,cd,dd),pd},ld.prototype.docType=function(ud,cd,dd){var pd,fd,md,vd,Ad;if(dd||(dd=0),this.openNode(ud,cd,dd),cd.state=qa.OpenTag,vd=this.indent(ud,cd,dd),vd+="<!DOCTYPE "+ud.root().name,ud.pubID&&ud.sysID?vd+=' PUBLIC "'+ud.pubID+'" "'+ud.sysID+'"':ud.sysID&&(vd+=' SYSTEM "'+ud.sysID+'"'),ud.children.length>0){for(vd+=" [",vd+=this.endline(ud,cd,dd),cd.state=qa.InsideTag,Ad=ud.children,fd=0,md=Ad.length;fd<md;fd++)pd=Ad[fd],vd+=this.writeChildNode(pd,cd,dd+1);cd.state=qa.CloseTag,vd+="]"}return cd.state=qa.CloseTag,vd+=cd.spaceBeforeSlash+">",vd+=this.endline(ud,cd,dd),cd.state=qa.None,this.closeNode(ud,cd,dd),vd},ld.prototype.element=function(ud,cd,dd){var pd,fd,md,vd,Ad,Nd,Id,Od,Fd,Pd,Md,Bd,jd,Hd;dd||(dd=0),Pd=!1,Md="",this.openNode(ud,cd,dd),cd.state=qa.OpenTag,Md+=this.indent(ud,cd,dd)+"<"+ud.name,Bd=ud.attribs;for(Fd in Bd)od.call(Bd,Fd)&&(pd=Bd[Fd],Md+=this.attribute(pd,cd,dd));if(md=ud.children.length,vd=md===0?null:ud.children[0],md===0||ud.children.every(function(Gd){return(Gd.type===Ra.Text||Gd.type===Ra.Raw)&&Gd.value===""}))cd.allowEmpty?(Md+=">",cd.state=qa.CloseTag,Md+="</"+ud.name+">"+this.endline(ud,cd,dd)):(cd.state=qa.CloseTag,Md+=cd.spaceBeforeSlash+"/>"+this.endline(ud,cd,dd));else if(cd.pretty&&md===1&&(vd.type===Ra.Text||vd.type===Ra.Raw)&&vd.value!=null)Md+=">",cd.state=qa.InsideTag,cd.suppressPrettyCount++,Pd=!0,Md+=this.writeChildNode(vd,cd,dd+1),cd.suppressPrettyCount--,Pd=!1,cd.state=qa.CloseTag,Md+="</"+ud.name+">"+this.endline(ud,cd,dd);else{if(cd.dontPrettyTextNodes){for(jd=ud.children,Ad=0,Id=jd.length;Ad<Id;Ad++)if(fd=jd[Ad],(fd.type===Ra.Text||fd.type===Ra.Raw)&&fd.value!=null){cd.suppressPrettyCount++,Pd=!0;break}}for(Md+=">"+this.endline(ud,cd,dd),cd.state=qa.InsideTag,Hd=ud.children,Nd=0,Od=Hd.length;Nd<Od;Nd++)fd=Hd[Nd],Md+=this.writeChildNode(fd,cd,dd+1);cd.state=qa.CloseTag,Md+=this.indent(ud,cd,dd)+"</"+ud.name+">",Pd&&cd.suppressPrettyCount--,Md+=this.endline(ud,cd,dd),cd.state=qa.None}return this.closeNode(ud,cd,dd),Md},ld.prototype.writeChildNode=function(ud,cd,dd){switch(ud.type){case Ra.CData:return this.cdata(ud,cd,dd);case Ra.Comment:return this.comment(ud,cd,dd);case Ra.Element:return this.element(ud,cd,dd);case Ra.Raw:return this.raw(ud,cd,dd);case Ra.Text:return this.text(ud,cd,dd);case Ra.ProcessingInstruction:return this.processingInstruction(ud,cd,dd);case Ra.Dummy:return"";case Ra.Declaration:return
` ||xf===" \r "||xf===" "}function Hd(xf){return xf==='"'||xf==="'"}function Gd(xf){return xf===">"||jd(xf)}function zd(xf,yf){return xf.test(yf)}function df(xf,yf){return!zd(xf,yf)}var Wd=0;qa.STATE={BEGIN:Wd++,BEGIN_WHITESPACE:Wd++,TEXT:Wd++,TEXT_ENTITY:Wd++,OPEN_WAKA:Wd++,SGML_DECL:Wd++,SGML_DECL_QUOTED:Wd++,DOCTYPE:Wd++,DOCTYPE_QUOTED:Wd++,DOCTYPE_DTD:Wd++,DOCTYPE_DTD_QUOTED:Wd++,COMMENT_STARTING:Wd++,COMMENT:Wd++,COMMENT_ENDING:Wd++,COMMENT_ENDED:Wd++,CDATA:Wd++,CDATA_ENDING:Wd++,CDATA_ENDING_2:Wd++,PROC_INST:Wd++,PROC_INST_BODY:Wd++,PROC_INST_ENDING:Wd++,OPEN_TAG:Wd++,OPEN_TAG_SLASH:Wd++,ATTRIB:Wd++,ATTRIB_NAME:Wd++,ATTRIB_NAME_SAW_WHITE:Wd++,ATTRIB_VALUE:Wd++,ATTRIB_VALUE_QUOTED:Wd++,ATTRIB_VALUE_CLOSED:Wd++,ATTRIB_VALUE_UNQUOTED:Wd++,ATTRIB_VALUE_ENTITY_Q:Wd++,ATTRIB_VALUE_ENTITY_U:Wd++,CLOSE_TAG:Wd++,CLOSE_TAG_SAW_WHITE:Wd++,SCRIPT:Wd++,SCRIPT_ENDING:Wd++},qa.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},qa.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(qa.ENTITIES).forEach(function(xf){var yf=qa.ENTITIES[xf],Bf=typeof yf=="number"?String.fromCharCode(yf):yf;qa.ENTITIES[xf]=Bf});for(var Jd in qa.STATE)qa.STATE[qa.STATE[Jd]]=Jd;Wd=qa.STATE;function Xd(xf,yf,Bf){xf[yf]&&xf[yf](Bf)}function _f(xf,yf,Bf){xf.textNode&&vf(xf),Xd(xf,yf,Bf)}function vf(xf){xf.textNode=Sf(xf.opt,xf.textNode),xf.textNode&&Xd(xf,"ontext",xf.textNode),xf.textNode=""}function Sf(xf,yf){return xf.trim&&(yf=yf.trim()),xf.normalize&&(yf=yf.replace(/ \s +/g," ")),yf}function gf(xf,yf){return vf(xf),xf.trackPosition&&(yf+= `
Line : ` +xf.line+ `
Column : ` +xf.column+ `
Char : ` +xf.c),yf=new Error(yf),xf.error=yf,Xd(xf,"onerror",yf),xf}function bf(xf){return xf.sawRoot&&!xf.closedRoot&&Tf(xf,"Unclosed root tag"),xf.state!==Wd.BEGIN&&xf.state!==Wd.BEGIN_WHITESPACE&&xf.state!==Wd.TEXT&&gf(xf,"Unexpected end"),vf(xf),xf.c="",xf.closed=!0,Xd(xf,"onend"),od.call(xf,xf.strict,xf.opt),xf}function Tf(xf,yf){if(typeof xf!="object"||!(xf instanceof od))throw new Error("bad call to strictFail");xf.strict&&gf(xf,yf)}function Mf(xf){xf.strict||(xf.tagName=xf.tagName[xf.looseCase]());var yf=xf.tags[xf.tags.length-1]||xf,Bf=xf.tag={name:xf.tagName,attributes:{}};xf.opt.xmlns&&(Bf.ns=yf.ns),xf.attribList.length=0,_f(xf,"onopentagstart",Bf)}function Kf(xf,yf){var Bf=xf.indexOf(":"),qf=Bf<0?["",xf]:xf.split(":"),oh=qf[0],Yf=qf[1];return yf&&xf==="xmlns"&&(oh="xmlns",Yf=""),{prefix:oh,local:Yf}}function Zf(xf){if(xf.strict||(xf.attribName=xf.attribName[xf.looseCase]()),xf.attribList.indexOf(xf.attribName)!==-1||xf.tag.attributes.hasOwnProperty(xf.attribName)){xf.attribName=xf.attribValue="";return}if(xf.opt.xmlns){var yf=Kf(xf.attribName,!0),Bf=yf.prefix,qf=yf.local;if(Bf==="xmlns")if(qf==="xml"&&xf.attribValue!==Nd)Tf(xf,"xml: prefix must be bound to "+Nd+ `
Actual : ` +xf.attribValue);else if(qf==="xmlns"&&xf.attribValue!==Id)Tf(xf,"xmlns: prefix must be bound to "+Id+ `
Actual : ` +xf.attribValue);else{var oh=xf.tag,Yf=xf.tags[xf.tags.length-1]||xf;oh.ns===Yf.ns&&(oh.ns=Object.create(Yf.ns)),oh.ns[qf]=xf.attribValue}xf.attribList.push([xf.attribName,xf.attribValue])}else xf.tag.attributes[xf.attribName]=xf.attribValue,_f(xf,"onattribute",{name:xf.attribName,value:xf.attribValue});xf.attribName=xf.attribValue=""}function eh(xf,yf){if(xf.opt.xmlns){var Bf=xf.tag,qf=Kf(xf.tagName);Bf.prefix=qf.prefix,Bf.local=qf.local,Bf.uri=Bf.ns[qf.prefix]||"",Bf.prefix&&!Bf.uri&&(Tf(xf,"Unbound namespace prefix: "+JSON.stringify(xf.tagName)),Bf.uri=qf.prefix);var oh=xf.tags[xf.tags.length-1]||xf;Bf.ns&&oh.ns!==Bf.ns&&Object.keys(Bf.ns).forEach(function(ah){_f(xf,"onopennamespace",{prefix:ah,uri:Bf.ns[ah]})});for(var Yf=0,kf=xf.attribList.length;Yf<kf;Yf++){var Vf=xf.attribList[Yf],fh=Vf[0],Gf=Vf[1],wf=Kf(fh,!0),Rf=wf.prefix,Uf=wf.local,ph=Rf===""?"":Bf.ns[Rf]||"",gh={name:fh,value:Gf,prefix:Rf,local:Uf,uri:ph};Rf&&Rf!=="xmlns"&&!ph&&(Tf(xf,"Unbound namespace prefix: "+JSON.stringify(Rf)),gh.uri=Rf),xf.tag.attributes[fh]=gh,_f(xf,"onattribute",gh)}xf.attribList.length=0}xf.tag.isSelfClosing=!!yf,xf.sawRoot=!0,xf.tags.push(xf.tag),_f(xf,"onopentag",xf.tag),yf||(!xf.noscript&&xf.tagName.toLowerCase()==="script"?xf.state=Wd.SCRIPT:xf.state=Wd.TEXT,xf.tag=null,xf.tagName=""),xf.attribName=xf.attribValue="",xf.attribList.length=0}function $ f(xf){if(!xf.tagName){Tf(xf,"Weird empty close tag."),xf.textNode+="</>",xf.state=Wd.TEXT;return}if(xf.script){if(xf.tagName!=="script"){xf.script+="</"+xf.tagName+">",xf.tagName="",xf.state=Wd.SCRIPT;return}_f(xf,"onscript",xf.script),xf.script=""}var yf=xf.tags.length,Bf=xf.tagName;xf.strict||(Bf=Bf[xf.looseCase]());for(var qf=Bf;yf--;){var oh=xf.tags[yf];if(oh.name!==qf)Tf(xf,"Unexpected close tag");else break}if(yf<0){Tf(xf,"Unmatched closing tag: "+xf.tagName),xf.textNode+="</"+xf.tagName+">",xf.state=Wd.TEXT;return}xf.tagName=Bf;for(var Yf=xf.tags.length;Yf-- >yf;){var kf=xf.tag=xf.tags.pop();xf.tagName=xf.tag.name,_f(xf,"onclosetag",xf.tagName);var Vf={};for(var fh in kf.ns)Vf[fh]=kf.ns[fh];var Gf=xf.tags[xf.tags.length-1]||xf;xf.opt.xmlns&&kf.ns!==Gf.ns&&Object.keys(kf.ns).forEach(function(wf){var Rf=kf.ns[wf];_f(xf,"onclosenamespace",{prefix:wf,uri:Rf})})}yf===0&&(xf.closedRoot=!0),xf.tagName=xf.attribValue=xf.attribName="",xf.attribList.length=0,xf.state=Wd.TEXT}function Df(xf){var yf=xf.entity,Bf=yf.toLowerCase(),qf,oh="";return xf.ENTITIES[yf]?xf.ENTITIES[yf]:xf.ENTITIES[Bf]?xf.ENTITIES[Bf]:(yf=Bf,yf.charAt(0)==="#"&&(yf.charAt(1)==="x"?(yf=yf.slice(2),qf=parseInt(yf,16),oh=qf.toString(16)):(yf=yf.slice(1),qf=parseInt(yf,10),oh=qf.toString(10))),yf=yf.replace(/^0+/,""),isNaN(qf)||oh.toLowerCase()!==yf?(Tf(xf,"Invalid character entity"),"&"+xf.entity+";"):String.fromCodePoint(qf))}function Lf(xf,yf){yf==="<"?(xf.state=Wd.OPEN_WAKA,xf.startTagPosition=xf.position):jd(yf)||(Tf(xf,"Non-whitespace before first tag."),xf.textNode=yf,xf.state=Wd.TEXT)}function zf(xf,yf){var Bf="";return yf<xf.length&&(Bf=xf.charAt(yf)),Bf}function Jf(xf){var yf=this;if(this.error)throw this.error;if(yf.closed)return gf(yf,"Cannot write after close. Assign an onready handler.");if(xf===null)return bf(yf);typeof xf=="object"&&(xf=xf.toString());for(var Bf=0,qf="";qf=zf(xf,Bf++),yf.c=qf,!!qf;)switch(yf.trackPosition&&(yf.position++,qf=== `
` ?(yf.line++,yf.column=0):yf.column++),yf.state){case Wd.BEGIN:if(yf.state=Wd.BEGIN_WHITESPACE,qf===" \u FEFF")continue;Lf(yf,qf);continue;case Wd.BEGIN_WHITESPACE:Lf(yf,qf);continue;case Wd.TEXT:if(yf.sawRoot&&!yf.closedRoot){for(var oh=Bf-1;qf&&qf!=="<"&&qf!=="&";)qf=zf(xf,Bf++),qf&&yf.trackPosition&&(yf.position++,qf=== `
` ?(yf.line++,yf.column=0):yf.column++);yf.textNode+=xf.substring(oh,Bf-1)}qf==="<"&&!(yf.sawRoot&&yf.closedRoot&&!yf.strict)?(yf.state=Wd.OPEN_WAKA,yf.startTagPosition=yf.position):(!jd(qf)&&(!yf.sawRoot||yf.closedRoot)&&Tf(yf,"Text data outside of root node."),qf==="&"?yf.state=Wd.TEXT_ENTITY:yf.textNode+=qf);continue;case Wd.SCRIPT:qf==="<"?yf.state=Wd.SCRIPT_ENDING:yf.script+=qf;continue;case Wd.SCRIPT_ENDING:qf==="/"?yf.state=Wd.CLOSE_TAG:(yf.script+="<"+qf,yf.state=Wd.SCRIPT);continue;case Wd.OPEN_WAKA:if(qf==="!")yf.state=Wd.SGML_DECL,yf.sgmlDecl="";else if(!jd(qf))if(zd(Fd,qf))yf.state=Wd.OPEN_TAG,yf.tagName=qf;else if(qf==="/")yf.state=Wd.CLOSE_TAG,yf.tagName="";else if(qf==="?")yf.state=Wd.PROC_INST,yf.procInstName=yf.procInstBody="";else{if(Tf(yf,"Unencoded <"),yf.startTagPosition+1<yf.position){var Yf=yf.position-yf.startTagPosition;qf=new Array(Yf).join(" ")+qf}yf.textNode+="<"+qf,yf.state=Wd.TEXT}continue;case Wd.SGML_DECL:if(yf.sgmlDecl+qf==="--"){yf.state=Wd.COMMENT,yf.comment="",yf.sgmlDecl="";continue}yf.doctype&&yf.doctype!==!0&&yf.sgmlDecl?(yf.state=Wd.DOCTYPE_DTD,yf.doctype+="<!"+yf.sgmlDecl+qf,yf.sgmlDecl=""):(yf.sgmlDecl+qf).toUpperCase()===vd?(_f(yf,"onopencdata"),yf.state=Wd.CDATA,yf.sgmlDecl="",yf.cdata=""):(yf.sgmlDecl+qf).toUpperCase()===Ad?(yf.state=Wd.DOCTYPE,(yf.doctype||yf.sawRoot)&&Tf(yf,"Inappropriately located doctype declaration"),yf.doctype="",yf.sgmlDecl=""):qf===">"?(_f(yf,"onsgmldeclaration",yf.sgmlDecl),yf.sgmlDecl="",yf.state=Wd.TEXT):(Hd(qf)&&(yf.state=Wd.SGML_DECL_QUOTED),yf.sgmlDecl+=qf);continue;case Wd.SGML_DECL_QUOTED:qf===yf.q&&(yf.state=Wd.SGML_DECL,yf.q=""),yf.sgmlDecl+=qf;continue;case Wd.DOCTYPE:qf===">"?(yf.state=Wd.TEXT,_f(yf,"ondoctype",yf.doctype),yf.doctype=!0):(yf.doctype+=qf,qf==="["?yf.state=Wd.DOCTYPE_DTD:Hd(qf)&&(yf.state=Wd.DOCTYPE_QUOTED,yf.q=qf));continue;case Wd.DOCTYPE_QUOTED:yf.doctype+=qf,qf===yf.q&&(yf.q="",yf.state=Wd.DOCTYPE);continue;case Wd.DOCTYPE_DTD:qf==="]"?(yf.doctype+=qf,yf.state=Wd.DOCTYPE):qf==="<"?(yf.state=Wd.OPEN_WAKA,yf.startTagPosition=yf.position):Hd(qf)?(yf.doctype+=qf,yf.state=Wd.DOCTYPE_DTD_QUOTED,yf.q=qf):yf.doctype+=qf;continue;case Wd.DOCTYPE_DTD_QUOTED:yf.doctype+=qf,qf===yf.q&&(yf.state=Wd.DOCTYPE_DTD,yf.q="");continue;case Wd.COMMENT:qf==="-"?yf.state=Wd.COMMENT_ENDING:yf.comment+=qf;continue;case Wd.COMMENT_ENDING:qf==="-"?(yf.state=Wd.COMMENT_ENDED,yf.comment=Sf(yf.opt,yf.comment),yf.comment&&_f(yf,"oncomment",yf.comment),yf.comment=""):(yf.comment+="-"+qf,yf.state=Wd.COMMENT);continue;case Wd.COMMENT_ENDED:qf!==">"?(Tf(yf,"Malformed comment"),yf.comment+="--"+qf,yf.state=Wd.COMMENT):yf.doctype&&yf.doctype!==!0?yf.state=Wd.DOCTYPE_DTD:yf.state=Wd.TEXT;continue;case Wd.CDATA:qf==="]"?yf.state=Wd.CDATA_ENDING:yf.cdata+=qf;continue;case Wd.CDATA_ENDING:qf==="]"?yf.state=Wd.CDATA_ENDING_2:(yf.cdata+="]"+qf,yf.state=Wd.CDATA);continue;case Wd.CDATA_ENDING_2:qf===">"?(yf.cdata&&_f(yf,"oncdata",yf.cdata),_f(yf,"onclosecdata"),yf.cdata="",yf.state=Wd.TEXT):qf==="]"?yf.cdata+="]":(yf.cdata+="]]"+qf,yf.state=Wd.CDATA);continue;case Wd.PROC_INST:qf==="?"?yf.state=Wd.PROC_INST_ENDING:jd(qf)?yf.state=Wd.PROC_INST_BODY:yf.procInstName+=qf;continue;case Wd.PROC_INST_BODY:if(!yf.procInstBody&&jd(qf))continue;qf==="?"?yf.state=Wd.PROC_INST_ENDING:yf.procInstBody+=qf;continue;case Wd.PROC_INST_ENDING:qf===">"?(_f(yf,"onprocessinginstruction",{name:yf.procInstName,body:yf.procInstBody}),yf.procInstName=yf.procInstBody="",yf.state=Wd.TEXT):(yf.procInstBody+="?"+qf,yf.state=Wd.PROC_INST_BODY);continue;case Wd.OPEN_TAG:zd(Pd,qf)?yf.tagName+=qf:(Mf(yf),qf===">"?eh(yf):qf==="/"?yf.state=Wd.OPEN_TAG_SLASH:(jd(qf)||Tf(yf,"Invalid character in tag name"),yf.state=Wd.ATTRIB));continue;case Wd.OPEN_TAG_SLASH:qf===">"?(eh(yf,!0), $ f(yf)):(Tf(yf,"Forward-slash in opening tag not followed by >"),yf.state=Wd.ATTRIB);continue;case Wd.ATTRIB:if(jd(qf))continue;qf===">"?eh(yf):qf==="/"?yf.state=Wd.OPEN_TAG_SLASH:zd(Fd,qf)?(yf.attribName=qf,yf.attribValue="",yf.state=Wd.ATTRIB_NAME):Tf(yf,"Invalid attribute name");continue;case Wd.ATTRIB_NAME:qf==="="?yf.state
2024-11-28 09:28:59 +08:00
` &&Ra[ud]!==" \r ";ud++)pd+=Ra[ud];if(pd=pd.trim(),pd[pd.length-1]==="/"&&(pd=pd.substring(0,pd.length-1),ud--),!validateTagName(pd)){let vd;return pd.trim().length===0?vd="Invalid space after '<'.":vd="Tag '"+pd+"' is an invalid name.",getErrorObject("InvalidTag",vd,getLineNumberForPosition(Ra,ud))}const fd=readAttributeStr(Ra,ud);if(fd===!1)return getErrorObject("InvalidAttr","Attributes for '"+pd+"' have open quote.",getLineNumberForPosition(Ra,ud));let md=fd.value;if(ud=fd.index,md[md.length-1]==="/"){const vd=ud-md.length;md=md.substring(0,md.length-1);const Ad=validateAttributeString(md,qa);if(Ad===!0)od=!0;else return getErrorObject(Ad.err.code,Ad.err.msg,getLineNumberForPosition(Ra,vd+Ad.err.line))}else if(dd)if(fd.tagClosed){if(md.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+pd+"' can't have attributes or invalid starting.",getLineNumberForPosition(Ra,cd));if(nd.length===0)return getErrorObject("InvalidTag","Closing tag '"+pd+"' has not been opened.",getLineNumberForPosition(Ra,cd));{const vd=nd.pop();if(pd!==vd.tagName){let Ad=getLineNumberForPosition(Ra,vd.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+vd.tagName+"' (opened in line "+Ad.line+", col "+Ad.col+") instead of closing tag '"+pd+"'.",getLineNumberForPosition(Ra,cd))}nd.length==0&&(ld=!0)}}else return getErrorObject("InvalidTag","Closing tag '"+pd+"' doesn't have proper closing.",getLineNumberForPosition(Ra,ud));else{const vd=validateAttributeString(md,qa);if(vd!==!0)return getErrorObject(vd.err.code,vd.err.msg,getLineNumberForPosition(Ra,ud-md.length+vd.err.line));if(ld===!0)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(Ra,ud));qa.unpairedTags.indexOf(pd)!==-1||nd.push({tagName:pd,tagStartPos:cd}),od=!0}for(ud++;ud<Ra.length;ud++)if(Ra[ud]==="<")if(Ra[ud+1]==="!"){ud++,ud=readCommentAndCDATA(Ra,ud);continue}else if(Ra[ud+1]==="?"){if(ud=readPI(Ra,++ud),ud.err)return ud}else break;else if(Ra[ud]==="&"){const vd=validateAmpersand(Ra,ud);if(vd==-1)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(Ra,ud));ud=vd}else if(ld===!0&&!isWhiteSpace(Ra[ud]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(Ra,ud));Ra[ud]==="<"&&ud--}}else{if(isWhiteSpace(Ra[ud]))continue;return getErrorObject("InvalidChar","char '"+Ra[ud]+"' is not expected.",getLineNumberForPosition(Ra,ud))}if(od){if(nd.length==1)return getErrorObject("InvalidTag","Unclosed tag '"+nd[0].tagName+"'.",getLineNumberForPosition(Ra,nd[0].tagStartPos));if(nd.length>0)return getErrorObject("InvalidXml","Invalid '"+JSON.stringify(nd.map(ud=>ud.tagName),null,4).replace(/ \r ? \n /g,"")+"' found.",{line:1,col:1})}else return getErrorObject("InvalidXml","Start tag expected.",1);return!0};function isWhiteSpace(Ra){return Ra===" "||Ra===" "||Ra=== `
` ||Ra===" \r "}function readPI(Ra,qa){const nd=qa;for(;qa<Ra.length;qa++)if(Ra[qa]=="?"||Ra[qa]==" "){const od=Ra.substr(nd,qa-nd);if(qa>5&&od==="xml")return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(Ra,qa));if(Ra[qa]=="?"&&Ra[qa+1]==">"){qa++;break}else continue}return qa}function readCommentAndCDATA(Ra,qa){if(Ra.length>qa+5&&Ra[qa+1]==="-"&&Ra[qa+2]==="-"){for(qa+=3;qa<Ra.length;qa++)if(Ra[qa]==="-"&&Ra[qa+1]==="-"&&Ra[qa+2]===">"){qa+=2;break}}else if(Ra.length>qa+8&&Ra[qa+1]==="D"&&Ra[qa+2]==="O"&&Ra[qa+3]==="C"&&Ra[qa+4]==="T"&&Ra[qa+5]==="Y"&&Ra[qa+6]==="P"&&Ra[qa+7]==="E"){let nd=1;for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="<")nd++;else if(Ra[qa]===">"&&(nd--,nd===0))break}else if(Ra.length>qa+9&&Ra[qa+1]==="["&&Ra[qa+2]==="C"&&Ra[qa+3]==="D"&&Ra[qa+4]==="A"&&Ra[qa+5]==="T"&&Ra[qa+6]==="A"&&Ra[qa+7]==="["){for(qa+=8;qa<Ra.length;qa++)if(Ra[qa]==="]"&&Ra[qa+1]==="]"&&Ra[qa+2]===">"){qa+=2;break}}return qa}const doubleQuote='"',singleQuote="'";function readAttributeStr(Ra,qa){let nd="",od="",ld=!1;for(;qa<Ra.length;qa++){if(Ra[qa]===doubleQuote||Ra[qa]===singleQuote)od===""?od=Ra[qa]:od!==Ra[qa]||(od="");else if(Ra[qa]===">"&&od===""){ld=!0;break}nd+=Ra[qa]}return od!==""?!1:{value:nd,index:qa,tagClosed:ld}}const validAttrStrRegxp=new RegExp( ` ( \ \ s * ) ( [ ^ \ \ s = ] + ) ( \ \ s *= ) ? ( \ \ s * ( [ '"])(([\\s\\S])*?)\\5)?`,"g");function validateAttributeString(Ra,qa){const nd=util$3.getAllMatches(Ra,validAttrStrRegxp),od={};for(let ld=0;ld<nd.length;ld++){if(nd[ld][1].length===0)return getErrorObject("InvalidAttr","Attribute ' "+nd[ld][2]+" ' has no space in starting.",getPositionFromMatch(nd[ld]));if(nd[ld][3]!==void 0&&nd[ld][4]===void 0)return getErrorObject("InvalidAttr","Attribute ' "+nd[ld][2]+" ' is without value.",getPositionFromMatch(nd[ld]));if(nd[ld][3]===void 0&&!qa.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute ' "+nd[ld][2]+" ' is not allowed.",getPositionFromMatch(nd[ld]));const ud=nd[ld][2];if(!validateAttrName(ud))return getErrorObject("InvalidAttr","Attribute ' "+ud+" ' is an invalid name.",getPositionFromMatch(nd[ld]));if(!od.hasOwnProperty(ud))od[ud]=1;else return getErrorObject("InvalidAttr","Attribute ' "+ud+" ' is repeated . ",getPositionFromMatch(nd[ld]))}return!0}function validateNumberAmpersand(Ra,qa){let nd=/\d/;for(Ra[qa]===" x "&&(qa++,nd=/[\da-fA-F]/);qa<Ra.length;qa++){if(Ra[qa]===" ; ")return qa;if(!Ra[qa].match(nd))break}return-1}function validateAmpersand(Ra,qa){if(qa++,Ra[qa]===" ; ")return-1;if(Ra[qa]===" # ")return qa++,validateNumberAmpersand(Ra,qa);let nd=0;for(;qa<Ra.length;qa++,nd++)if(!(Ra[qa].match(/\w/)&&nd<20)){if(Ra[qa]===" ; ")break;return-1}return qa}function getErrorObject(Ra,qa,nd){return{err:{code:Ra,msg:qa,line:nd.line||nd,col:nd.col}}}function validateAttrName(Ra){return util$3.isName(Ra)}function validateTagName(Ra){return util$3.isName(Ra)}function getLineNumberForPosition(Ra,qa){const nd=Ra.substring(0,qa).split(/\r?\n/);return{line:nd.length,col:nd[nd.length-1].length+1}}function getPositionFromMatch(Ra){return Ra.startIndex+Ra[1].length}var OptionsBuilder={};const defaultOptions$1={preserveOrder:!1,attributeNamePrefix:" @ _ ",attributesGroupName:!1,textNodeName:" # text ",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Ra,qa,nd){return Ra}},buildOptions$1=function(Ra){return Object.assign({},defaultOptions$1,Ra)};OptionsBuilder.buildOptions=buildOptions$1;OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(qa){this.tagname=qa,this.child=[],this[" : @ "]={}}add(qa,nd){qa===" _ _proto _ _ "&&(qa=" # _ _proto _ _ " ) , this . child . push ( { [ qa ] : nd } ) } addChild ( qa )
` );const qa=new xmlNode("!xml");let nd=qa,od="",ld="";for(let ud=0;ud<Ra.length;ud++)if(Ra[ud]==="<")if(Ra[ud+1]==="/"){const dd=findClosingIndex(Ra,">",ud,"Closing Tag is not closed.");let pd=Ra.substring(ud+2,dd).trim();if(this.options.removeNSPrefix){const vd=pd.indexOf(":");vd!==-1&&(pd=pd.substr(vd+1))}this.options.transformTagName&&(pd=this.options.transformTagName(pd)),nd&&(od=this.saveTextToParentTag(od,nd,ld));const fd=ld.substring(ld.lastIndexOf(".")+1);if(pd&&this.options.unpairedTags.indexOf(pd)!==-1)throw new Error( ` Unpaired tag can not be used as closing tag : < /${pd}>`);let md=0;fd&&this.options.unpairedTags.indexOf(fd)!==-1?(md=ld.lastIndexOf(".",ld.lastIndexOf(".")-1),this.tagsNodeStack.pop()):md=ld.lastIndexOf("."),ld=ld.substring(0,md),nd=this.tagsNodeStack.pop(),od="",ud=dd}else if(Ra[ud+1]==="?"){let dd=readTagExp(Ra,ud,!1,"?>");if(!dd)throw new Error("Pi Tag is not closed.");if(od=this.saveTextToParentTag(od,nd,ld),!(this.options.ignoreDeclaration&&dd.tagName==="?xml"||this.options.ignorePiTags)){const pd=new xmlNode(dd.tagName);pd.add(this.options.textNodeName,""),dd.tagName!==dd.tagExp&&dd.attrExpPresent&&(pd[":@"]=this.buildAttributesMap(dd.tagExp,ld,dd.tagName)),this.addChild(nd,pd,ld)}ud=dd.closeIndex+1}else if(Ra.substr(ud+1,3)==="!--"){const dd=findClosingIndex(Ra,"-->",ud+4,"Comment is not closed.");if(this.options.commentPropName){const pd=Ra.substring(ud+4,dd-2);od=this.saveTextToParentTag(od,nd,ld),nd.add(this.options.commentPropName,[{[this.options.textNodeName]:pd}])}ud=dd}else if(Ra.substr(ud+1,2)==="!D"){const dd=readDocType(Ra,ud);this.docTypeEntities=dd.entities,ud=dd.i}else if(Ra.substr(ud+1,2)==="!["){const dd=findClosingIndex(Ra,"]]>",ud,"CDATA is not closed.")-2,pd=Ra.substring(ud+9,dd);od=this.saveTextToParentTag(od,nd,ld);let fd=this.parseTextData(pd,nd.tagname,ld,!0,!1,!0,!0);fd==null&&(fd=""),this.options.cdataPropName?nd.add(this.options.cdataPropName,[{[this.options.textNodeName]:pd}]):nd.add(this.options.textNodeName,fd),ud=dd+2}else{let dd=readTagExp(Ra,ud,this.options.removeNSPrefix),pd=dd.tagName;const fd=dd.rawTagName;let md=dd.tagExp,vd=dd.attrExpPresent,Ad=dd.closeIndex;this.options.transformTagName&&(pd=this.options.transformTagName(pd)),nd&&od&&nd.tagname!=="!xml"&&(od=this.saveTextToParentTag(od,nd,ld,!1));const Nd=nd;if(Nd&&this.options.unpairedTags.indexOf(Nd.tagname)!==-1&&(nd=this.tagsNodeStack.pop(),ld=ld.substring(0,ld.lastIndexOf("."))),pd!==qa.tagname&&(ld+=ld?"."+pd:pd),this.isItStopNode(this.options.stopNodes,ld,pd)){let Id="";if(md.length>0&&md.lastIndexOf("/ ")===md.length-1)pd[pd.length-1]===" / "?(pd=pd.substr(0,pd.length-1),ld=ld.substr(0,ld.length-1),md=pd):md=md.substr(0,md.length-1),ud=dd.closeIndex;else if(this.options.unpairedTags.indexOf(pd)!==-1)ud=dd.closeIndex;else{const Fd=this.readStopNodeData(Ra,fd,Ad+1);if(!Fd)throw new Error(`Unexpected end of ${fd}`);ud=Fd.i,Id=Fd.tagContent}const Od=new xmlNode(pd);pd!==md&&vd&&(Od[" : @ "]=this.buildAttributesMap(md,ld,pd)),Id&&(Id=this.parseTextData(Id,pd,ld,!0,vd,!0,!0)),ld=ld.substr(0,ld.lastIndexOf(" . ")),Od.add(this.options.textNodeName,Id),this.addChild(nd,Od,ld)}else{if(md.length>0&&md.lastIndexOf(" / ")===md.length-1){pd[pd.length-1]===" / "?(pd=pd.substr(0,pd.length-1),ld=ld.substr(0,ld.length-1),md=pd):md=md.substr(0,md.length-1),this.options.transformTagName&&(pd=this.options.transformTagName(pd));const Id=new xmlNode(pd);pd!==md&&vd&&(Id[" : @ "]=this.buildAttributesMap(md,ld,pd)),this.addChild(nd,Id,ld),ld=ld.substr(0,ld.lastIndexOf(" . "))}else{const Id=new xmlNode(pd);this.tagsNodeStack.push(nd),pd!==md&&vd&&(Id[" : @ "]=this.buildAttributesMap(md,ld,pd)),this.addChild(nd,Id,ld),nd=Id}od=" ",ud=Ad}}else od+=Ra[ud];return qa.child};function addChild(Ra,qa,nd){const od=this.options.updateTag(qa.tagname,nd,qa[" : @ "]);od===!1||(typeof od==" string " && ( qa . tagname = od ) , Ra . addChild ( qa ) ) } const replaceEntitiesValue$1 = function ( Ra ) { if ( this . options . processEntities ) { for ( let qa in this . docTypeEntities ) { const nd = this . docTypeEntities [ qa ] ; Ra = Ra . replace ( nd . regx , nd . val ) } for ( let qa in this . lastEntities ) { const nd = this . lastEntit
` ;function toXml(Ra,qa){let nd="";return qa.format&&qa.indentBy.length>0&&(nd=EOL),arrToStr(Ra,qa,"",nd)}function arrToStr(Ra,qa,nd,od){let ld="",ud=!1;for(let cd=0;cd<Ra.length;cd++){const dd=Ra[cd],pd=propName(dd);if(pd===void 0)continue;let fd="";if(nd.length===0?fd=pd:fd= ` $ { nd } . $ { pd } ` ,pd===qa.textNodeName){let Id=dd[pd];isStopNode(fd,qa)||(Id=qa.tagValueProcessor(pd,Id),Id=replaceEntitiesValue(Id,qa)),ud&&(ld+=od),ld+=Id,ud=!1;continue}else if(pd===qa.cdataPropName){ud&&(ld+=od),ld+= ` < ! [ CDATA [ $ { dd [ pd ] [ 0 ] [ qa . textNodeName ] } ] ] > ` ,ud=!1;continue}else if(pd===qa.commentPropName){ld+=od+ ` <!-- $ { dd [ pd ] [ 0 ] [ qa . textNodeName ] } -- > ` ,ud=!0;continue}else if(pd[0]==="?"){const Id=attr_to_str(dd[":@"],qa),Od=pd==="?xml"?"":od;let Fd=dd[pd][0][qa.textNodeName];Fd=Fd.length!==0?" "+Fd:"",ld+=Od+ ` < $ { pd } $ { Fd } $ { Id } ? > ` ,ud=!0;continue}let md=od;md!==""&&(md+=qa.indentBy);const vd=attr_to_str(dd[":@"],qa),Ad=od+ ` < $ { pd } $ { vd } ` ,Nd=arrToStr(dd[pd],qa,fd,md);qa.unpairedTags.indexOf(pd)!==-1?qa.suppressUnpairedNode?ld+=Ad+">":ld+=Ad+"/>":(!Nd||Nd.length===0)&&qa.suppressEmptyNode?ld+=Ad+"/>":Nd&&Nd.endsWith(">")?ld+=Ad+ ` > $ { Nd } $ { od } < /${pd}>`:(ld+=Ad+">",Nd&&od!==""&&(Nd.includes("/ > ")||Nd.includes(" < /"))?ld+=od+qa.indentBy+Nd+od:ld+=Nd,ld+=`</ $ { pd } > ` ),ud=!0}return ld}function propName(Ra){const qa=Object.keys(Ra);for(let nd=0;nd<qa.length;nd++){const od=qa[nd];if(Ra.hasOwnProperty(od)&&od!==":@")return od}}function attr_to_str(Ra,qa){let nd="";if(Ra&&!qa.ignoreAttributes)for(let od in Ra){if(!Ra.hasOwnProperty(od))continue;let ld=qa.attributeValueProcessor(od,Ra[od]);ld=replaceEntitiesValue(ld,qa),ld===!0&&qa.suppressBooleanAttributes?nd+= ` $ { od . substr ( qa . attributeNamePrefix . length ) } ` :nd+= ` $ { od . substr ( qa . attributeNamePrefix . length ) } = "${ld}" ` }return nd}function isStopNode(Ra,qa){Ra=Ra.substr(0,Ra.length-qa.textNodeName.length-1);let nd=Ra.substr(Ra.lastIndexOf(".")+1);for(let od in qa.stopNodes)if(qa.stopNodes[od]===Ra||qa.stopNodes[od]==="*."+nd)return!0;return!1}function replaceEntitiesValue(Ra,qa){if(Ra&&Ra.length>0&&qa.processEntities)for(let nd=0;nd<qa.entities.length;nd++){const od=qa.entities[nd];Ra=Ra.replace(od.regex,od.val)}return Ra}var orderedJs2Xml=toXml;const buildFromOrderedJs=orderedJs2Xml,getIgnoreAttributesFn=ignoreAttributes,defaultOptions={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(Ra,qa){return qa},attributeValueProcessor:function(Ra,qa){return qa},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(Ra){this.options=Object.assign({},defaultOptions,Ra),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=getIgnoreAttributesFn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar= ` >
2024-09-18 09:46:23 +08:00
` ,this.newLine= `
2024-11-28 09:28:59 +08:00
` ):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Builder.prototype.build=function(Ra){return this.options.preserveOrder?buildFromOrderedJs(Ra,this.options):(Array.isArray(Ra)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ra={[this.options.arrayNodeName]:Ra}),this.j2x(Ra,0,[]).val)};Builder.prototype.j2x=function(Ra,qa,nd){let od="",ld="";const ud=nd.join(".");for(let cd in Ra)if(Object.prototype.hasOwnProperty.call(Ra,cd))if(typeof Ra[cd]>"u")this.isAttribute(cd)&&(ld+="");else if(Ra[cd]===null)this.isAttribute(cd)?ld+="":cd[0]==="?"?ld+=this.indentate(qa)+"<"+cd+"?"+this.tagEndChar:ld+=this.indentate(qa)+"<"+cd+"/"+this.tagEndChar;else if(Ra[cd]instanceof Date)ld+=this.buildTextValNode(Ra[cd],cd,"",qa);else if(typeof Ra[cd]!="object"){const dd=this.isAttribute(cd);if(dd&&!this.ignoreAttributesFn(dd,ud))od+=this.buildAttrPairStr(dd,""+Ra[cd]);else if(!dd)if(cd===this.options.textNodeName){let pd=this.options.tagValueProcessor(cd,""+Ra[cd]);ld+=this.replaceEntitiesValue(pd)}else ld+=this.buildTextValNode(Ra[cd],cd,"",qa)}else if(Array.isArray(Ra[cd])){const dd=Ra[cd].length;let pd="",fd="";for(let md=0;md<dd;md++){const vd=Ra[cd][md];if(!(typeof vd>"u"))if(vd===null)cd[0]==="?"?ld+=this.indentate(qa)+"<"+cd+"?"+this.tagEndChar:ld+=this.indentate(qa)+"<"+cd+"/"+this.tagEndChar;else if(typeof vd=="object")if(this.options.oneListGroup){const Ad=this.j2x(vd,qa+1,nd.concat(cd));pd+=Ad.val,this.options.attributesGroupName&&vd.hasOwnProperty(this.options.attributesGroupName)&&(fd+=Ad.attrStr)}else pd+=this.processTextOrObjNode(vd,cd,qa,nd);else if(this.options.oneListGroup){let Ad=this.options.tagValueProcessor(cd,vd);Ad=this.replaceEntitiesValue(Ad),pd+=Ad}else pd+=this.buildTextValNode(vd,cd,"",qa)}this.options.oneListGroup&&(pd=this.buildObjectNode(pd,cd,fd,qa)),ld+=pd}else if(this.options.attributesGroupName&&cd===this.options.attributesGroupName){const dd=Object.keys(Ra[cd]),pd=dd.length;for(let fd=0;fd<pd;fd++)od+=this.buildAttrPairStr(dd[fd],""+Ra[cd][dd[fd]])}else ld+=this.processTextOrObjNode(Ra[cd],cd,qa,nd);return{attrStr:od,val:ld}};Builder.prototype.buildAttrPairStr=function(Ra,qa){return qa=this.options.attributeValueProcessor(Ra,""+qa),qa=this.replaceEntitiesValue(qa),this.options.suppressBooleanAttributes&&qa==="true"?" "+Ra:" "+Ra+'="'+qa+'"'};function processTextOrObjNode(Ra,qa,nd,od){const ld=this.j2x(Ra,nd+1,od.concat(qa));return Ra[this.options.textNodeName]!==void 0&&Object.keys(Ra).length===1?this.buildTextValNode(Ra[this.options.textNodeName],qa,ld.attrStr,nd):this.buildObjectNode(ld.val,qa,ld.attrStr,nd)}Builder.prototype.buildObjectNode=function(Ra,qa,nd,od){if(Ra==="")return qa[0]==="?"?this.indentate(od)+"<"+qa+nd+"?"+this.tagEndChar:this.indentate(od)+"<"+qa+nd+this.closeTag(qa)+this.tagEndChar;{let ld="</"+qa+this.tagEndChar,ud="";return qa[0]==="?"&&(ud="?",ld=""),(nd||nd==="")&&Ra.indexOf("<")===-1?this.indentate(od)+"<"+qa+nd+ud+">"+Ra+ld:this.options.commentPropName!==!1&&qa===this.options.commentPropName&&ud.length===0?this.indentate(od)+ ` <!-- $ { Ra } -- > ` +this.newLine:this.indentate(od)+"<"+qa+nd+ud+this.tagEndChar+Ra+this.indentate(od)+ld}};Builder.prototype.closeTag=function(Ra){let qa="";return this.options.unpairedTags.indexOf(Ra)!==-1?this.options.suppressUnpairedNode||(qa="/"):this.options.suppressEmptyNode?qa="/":qa= ` > < /${Ra}`,qa};Builder.prototype.buildTextValNode=function(Ra,qa,nd,od){if(this.options.cdataPropName!==!1&&qa===this.options.cdataPropName)return this.indentate(od)+`<![CDATA[${Ra}]]>`+this.newLine;if(this.options.commentPropName!==!1&&qa===this.options.commentPropName)return this.indentate(od)+`<!--${Ra}-->`+this.newLine;if(qa[0]==="?")return this.indentate(od)+"<"+qa+nd+"?"+this.tagEndChar;{let ld=this.options.tagValueProcessor(qa,Ra);return ld=this.replaceEntitiesValue(ld),ld===""?this.indentate(od)+"<"+qa+nd+this.closeTag(qa)+this.tagEndChar:this.indentate(od)+"<"+qa+nd+">"+ld+"</ " + qa + this . tagEndChar } } ; Builder . prototype . replaceEntitiesValue = function ( Ra ) { if ( Ra && Ra . length > 0 && this . options . processEntities ) for ( let qa = 0 ; qa < this . op
2024-09-18 09:46:23 +08:00
* mime - db
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 - 2022 Douglas Christopher Wilson
* MIT Licensed
* /var mimeDb=require$$0;/ * !
* mime - types
* Copyright ( c ) 2014 Jonathan Ong
* Copyright ( c ) 2015 Douglas Christopher Wilson
* MIT Licensed
2024-12-08 09:17:51 +08:00
* /(function(Ra){var qa=mimeDb,nd=pathBrowserify.extname,od=/ ^ \ s * ( [ ^ ; \ s ] * ) ( ? : ; | \ s | $ ) / , ld = /^text\//i ; Ra . charset = ud , Ra . charsets = { lookup : ud } , Ra . contentType = cd , Ra . extension = dd , Ra . extensions = Object . create ( null ) , Ra . lookup = pd , Ra . types = Object . create ( null ) , fd ( Ra . extensions , Ra . types ) ; function ud ( md ) { if ( ! md || typeof md != "string" ) return ! 1 ; var vd = od . exec ( md ) , Ad = vd && qa [ vd [ 1 ] . toLowerCase ( ) ] ; return Ad && Ad . charset ? Ad . charset : vd && ld . test ( vd [ 1 ] ) ? "UTF-8" : ! 1 } function cd ( md ) { if ( ! md || typeof md != "string" ) return ! 1 ; var vd = md . indexOf ( "/" ) === - 1 ? Ra . lookup ( md ) : md ; if ( ! vd ) return ! 1 ; if ( vd . indexOf ( "charset" ) === - 1 ) { var Ad = Ra . charset ( vd ) ; Ad && ( vd += "; charset=" + Ad . toLowerCase ( ) ) } return vd } function dd ( md ) { if ( ! md || typeof md != "string" ) return ! 1 ; var vd = od . exec ( md ) , Ad = vd && Ra . extensions [ vd [ 1 ] . toLowerCase ( ) ] ; return ! Ad || ! Ad . length ? ! 1 : Ad [ 0 ] } function pd ( md ) { if ( ! md || typeof md != "string" ) return ! 1 ; var vd = nd ( "x." + md ) . toLowerCase ( ) . substr ( 1 ) ; return vd && Ra . types [ vd ] || ! 1 } function fd ( md , vd ) { var Ad = [ "nginx" , "apache" , void 0 , "iana" ] ; Object . keys ( qa ) . forEach ( function ( Id ) { var Od = qa [ Id ] , Fd = Od . extensions ; if ( ! ( ! Fd || ! Fd . length ) ) { md [ Id ] = Fd ; for ( var Pd = 0 ; Pd < Fd . length ; Pd ++ ) { var Md = Fd [ Pd ] ; if ( vd [ Md ] ) { var Bd = Ad . indexOf ( qa [ vd [ Md ] ] . source ) , jd = Ad . indexOf ( Od . source ) ; if ( vd [ Md ] !== "application/octet-stream" && ( Bd > jd || Bd === jd && vd [ Md ] . substr ( 0 , 12 ) === "application/" ) ) continue } vd [ Md ] = Id } } } ) } } ) ( mimeTypes$1 ) ; let ENCRYPTION _TYPES = function ( Ra ) { return Ra . SSEC = "SSE-C" , Ra . KMS = "KMS" , Ra } ( { } ) , RETENTION _MODES = function ( Ra ) { return Ra . GOVERNANCE = "GOVERNANCE" , Ra . COMPLIANCE = "COMPLIANCE" , Ra } ( { } ) , RETENTION _VALIDITY _UNITS = function ( Ra ) { return Ra . DAYS = "Days" , Ra . YEARS = "Years" , Ra } ( { } ) , LEGAL _HOLD _STATUS = function ( Ra ) { return Ra . ENABLED = "ON" , Ra . DISABLED = "OFF" , Ra } ( { } ) ; const MetaDataHeaderPrefix = "x-amz-meta-" ; function uriEscape ( Ra ) { return Ra . split ( "" ) . reduce ( ( qa , nd ) => { const od = Buffer$2 . from ( nd ) ; if ( od . length === 1 && ( "A" <= nd && nd <= "Z" || "a" <= nd && nd <= "z" || "0" <= nd && nd <= "9" || nd === "_" || nd === "." || nd === "~" || nd === "-" ) ) return qa = qa + nd , qa ; for ( const ld of od ) qa = qa + "%" + ld . toString ( 16 ) . toUpperCase ( ) ; return qa } , "" ) } function uriResourceEscape ( Ra ) { return uriEscape ( Ra ) . replace ( /%2F/g , "/" ) } function getScope ( Ra , qa , nd = "s3" ) { return ` ${ makeDateShort ( qa ) } / ${ Ra } / ${ nd } /aws4_request ` } function isAmazonEndpoint ( Ra ) { return Ra === "s3.amazonaws.com" || Ra === "s3.cn-north-1.amazonaws.com.cn" } function isVirtualHostStyle ( Ra , qa , nd , od ) { return qa === "https:" && nd . includes ( "." ) ? ! 1 : isAmazonEndpoint ( Ra ) || ! od } function isValidIP ( Ra ) { return ipaddr . isValid ( Ra ) } function isValidEndpoint ( Ra ) { return isValidDomain ( Ra ) || isValidIP ( Ra ) } function isValidDomain ( Ra ) { if ( ! isString ( Ra ) || Ra . length === 0 || Ra . length > 255 || Ra [ 0 ] === "-" || Ra . slice ( - 1 ) === "-" || Ra [ 0 ] === "_" || Ra . slice ( - 1 ) === "_" || Ra [ 0 ] === "." ) return ! 1 ; const qa = "`~!@#$%^&*()+={}[]|\\\"';:><?/" ; for ( const nd of qa ) if ( Ra . includes ( nd ) ) return ! 1 ; return ! 0 } function probeContentType ( Ra ) { let qa = mimeTypes$1 . lookup ( Ra ) ; return qa || ( qa = "application/octet-stream" ) , qa } function isValidPort ( Ra ) { return isNumber ( Ra ) ? 0 <= Ra && Ra <= 65535 : ! 1 } function isValidBucketName ( Ra ) { return ! isString ( Ra ) || Ra . length < 3 || Ra . length > 63 || Ra . includes ( ".." ) || /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/ . test ( Ra ) ? ! 1 : ! ! /^[a-z0-9][a-z0-9.-]+[a-z0-9]$/ . test ( Ra ) } function isValidObjectName ( Ra ) { return isValidPrefix ( Ra ) ? Ra . length !== 0 : ! 1 } function isValidPrefix ( Ra ) { return ! ( ! isString ( Ra ) || Ra . length > 1024 ) } function isNumber ( Ra ) { return typeof Ra == "number" } function isFunction ( Ra ) { return typeof Ra == "function" } function isString ( Ra ) { return typeof Ra == "string" } function isObject ( Ra ) { return typeof Ra == "object" && Ra !== null } function isReadableStream ( Ra ) { return isObject ( Ra ) && isFunction ( Ra . _read ) } function isBoolean ( Ra ) { return typeof Ra == "boolean" } function isEmpty ( Ra ) { return _ . isEmpty ( Ra ) } function isEmptyObject ( Ra ) { return Object . values ( Ra ) . filter ( qa => qa !== void 0 ) . length !== 0 } function isDefined ( Ra ) { return Ra != null } function isValidDate ( Ra ) { return Ra instanceof Date && ! isNaN ( Ra ) } function makeDateLong ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . slice ( 5 , 7 ) + qa . slice ( 8 , 13 ) + qa . slice ( 14 , 16 ) + qa . slice ( 17 , 19 ) + "Z" } function makeDateShort ( Ra ) { Ra = Ra || new Date ; const qa = Ra . toISOString ( ) ; return qa . slice ( 0 , 4 ) + qa . slice ( 5 , 7 ) + qa . slice ( 8 , 10 ) }
2024-09-18 09:46:23 +08:00
` )+ `
2024-11-28 09:28:59 +08:00
` ,od.join(";").toLowerCase(),ld].join( `
` )}function getCredential(Ra,qa,nd,od="s3"){if(!isString(Ra))throw new TypeError('accessKey should be of type "string"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isObject(nd))throw new TypeError('requestDate should be of type "object"');return ` $ { Ra } / $ { getScope ( qa , nd , od ) } ` }function getSignedHeaders(Ra){if(!isObject(Ra))throw new TypeError('request should be of type "object"');const qa=["authorization","content-length","content-type","user-agent"];return Object.keys(Ra).filter(nd=>!qa.includes(nd)).sort()}function getSigningKey(Ra,qa,nd,od="s3"){if(!isObject(Ra))throw new TypeError('date should be of type "object"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isString(nd))throw new TypeError('secretKey should be of type "string"');const ld=makeDateShort(Ra);return(void 0)("sha256",(void 0)("sha256",(void 0)("sha256",(void 0)("sha256","AWS4"+nd).update(ld).digest()).update(qa).digest()).update(od).digest()).update("aws4_request").digest()}function getStringToSign(Ra,qa,nd,od="s3"){if(!isString(Ra))throw new TypeError('canonicalRequest should be of type "string"');if(!isObject(qa))throw new TypeError('requestDate should be of type "object"');if(!isString(nd))throw new TypeError('region should be of type "string"');const ld=(void 0)("sha256").update(Ra).digest("hex"),ud=getScope(nd,qa,od);return[signV4Algorithm,makeDateLong(qa),ud,ld].join( `
2024-12-08 09:17:51 +08:00
` )}function postPresignSignatureV4(Ra,qa,nd,od){if(!isString(Ra))throw new TypeError('region should be of type "string"');if(!isObject(qa))throw new TypeError('date should be of type "object"');if(!isString(nd))throw new TypeError('secretKey should be of type "string"');if(!isString(od))throw new TypeError('policyBase64 should be of type "string"');return(void 0)("sha256",getSigningKey(qa,Ra,nd)).update(od).digest("hex").toLowerCase()}function signV4(Ra,qa,nd,od,ld,ud,cd="s3"){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(nd))throw new TypeError('secretKey should be of type "string"');if(!isString(od))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for signing");if(!nd)throw new SecretKeyRequiredError("secretKey is required for signing");const dd=getSignedHeaders(Ra.headers),pd=getCanonicalRequest(Ra.method,Ra.path,Ra.headers,dd,ud),fd=cd||"s3",md=getStringToSign(pd,ld,od,fd),vd=getSigningKey(ld,od,nd,fd),Ad=getCredential(qa,od,ld,fd),Nd=(void 0)("sha256",vd).update(md).digest("hex").toLowerCase();return ` $ { signV4Algorithm } Credential = $ { Ad } , SignedHeaders = $ { dd . join ( ";" ) . toLowerCase ( ) } , Signature = $ { Nd } ` }function presignSignatureV4(Ra,qa,nd,od,ld,ud,cd){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(nd))throw new TypeError('secretKey should be of type "string"');if(!isString(ld))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for presigning");if(!nd)throw new SecretKeyRequiredError("secretKey is required for presigning");if(!isNumber(cd))throw new TypeError('expires should be of type "number"');if(cd<1)throw new ExpiresParamError("expires param cannot be less than 1 seconds");if(cd>604800)throw new ExpiresParamError("expires param cannot be greater than 7 days");const dd=makeDateLong(ud),pd=getSignedHeaders(Ra.headers),fd=getCredential(qa,ld,ud),md="UNSIGNED-PAYLOAD",vd=[];vd.push( ` X - Amz - Algorithm = $ { signV4Algorithm } ` ),vd.push( ` X - Amz - Credential = $ { uriEscape ( fd ) } ` ),vd.push( ` X - Amz - Date = $ { dd } ` ),vd.push( ` X - Amz - Expires = $ { cd } ` ),vd.push( ` X - Amz - SignedHeaders = $ { uriEscape ( pd . join ( ";" ) . toLowerCase ( ) ) } ` ),od&&vd.push( ` X - Amz - Security - Token = $ { uriEscape ( od ) } ` );const Ad=Ra.path.split("?")[0];let Nd=Ra.path.split("?")[1];Nd?Nd=Nd+"&"+vd.join("&"):Nd=vd.join("&");const Id=Ad+"?"+Nd,Od=getCanonicalRequest(Ra.method,Id,Ra.headers,pd,md),Fd=getStringToSign(Od,ud,ld),Md=(void 0)("sha256",getSigningKey(ud,ld,nd)).update(Fd).digest("hex").toLowerCase();return Ra.protocol+"//"+Ra.headers.host+Id+ ` & X - Amz - Signature = $ { Md } ` }async function readAsBuffer(Ra){return new Promise((qa,nd)=>{const od=[];Ra.on("data",ld=>od.push(ld)).on("error",ld=>nd(ld)).on("end",()=>qa(Buffer $ 2.concat(od)))})}async function readAsString(Ra){return(await readAsBuffer(Ra)).toString()}async function drainResponse(Ra){return new Promise((qa,nd)=>{Ra.on("data",()=>{}).on("error",od=>nd(od)).on("end",()=>qa())})}function parseBucketRegion(Ra){return parseXml(Ra).LocationConstraint}const fxp=new fxp $ 2.XMLParser;function parseError(Ra,qa){let nd={};const od=fxp.parse(Ra);od.Error&&(nd=od.Error);const ld=new S3Error;return Object.entries(nd).forEach(([ud,cd])=>{ld[ud.toLowerCase()]=cd}),Object.entries(qa).forEach(([ud,cd])=>{ld[ud]=cd}),ld}async function parseResponseError(Ra){const qa=Ra.statusCode;let nd,od;qa===301?(nd="MovedPermanently",od="Moved Permanently"):qa===307?(nd="TemporaryRedirect",od="Are you using the correct endpoint URL?"):qa===403?(nd="AccessDenied",od="Valid and authorized credentials required"):qa===404?(nd="NotFound",od="Not Found"):qa===405||qa===501?(nd="MethodNotAllowed",od="Method Not Allowed"):(nd="UnknownError",od= ` $ { qa } ` );const ld={};ld.amzRequestid=Ra.headers["x-amz-request-id"],ld.amzId2=Ra.headers["x-amz-id-2"],ld.amzBucketRegion=Ra.headers["x-amz-bucket-region"];const ud=await r
2024-11-28 09:28:59 +08:00
` )}),ld.write( `
` )};if(ld.write( ` REQUEST : $ { qa . method } $ { qa . path }
` ),ud(qa.headers),nd&&(this.logStream.write( ` RESPONSE : $ { nd . statusCode }
` ),ud(nd.headers)),od){ld.write( ` ERROR BODY :
` );const cd=JSON.stringify(od,null," ");ld.write( ` $ { cd }
2024-12-08 09:17:51 +08:00
` )}}traceOn(qa){qa||(qa=define_process_default $ 2.stdout),this.logStream=qa}traceOff(){this.logStream=void 0}async makeRequestAsync(qa,nd="",od=[200],ld=""){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!isString(nd)&&!isObject(nd))throw new TypeError('payload should be of type "string" or "Buffer"');if(od.forEach(cd=>{if(!isNumber(cd))throw new TypeError('statusCode should be of type "number"')}),!isString(ld))throw new TypeError('region should be of type "string"');qa.headers||(qa.headers={}),(qa.method==="POST"||qa.method==="PUT"||qa.method==="DELETE")&&(qa.headers["content-length"]=nd.length.toString());const ud=this.enableSHA256?toSha256(nd):"";return this.makeRequestStreamAsync(qa,nd,ud,od,ld)}async makeRequestAsyncOmit(qa,nd="",od=[200],ld=""){const ud=await this.makeRequestAsync(qa,nd,od,ld);return await drainResponse(ud),ud}async makeRequestStreamAsync(qa,nd,od,ld,ud){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!(Buffer $ 2.isBuffer(nd)||typeof nd=="string"||isReadableStream(nd)))throw new InvalidArgumentError( ` stream should be a Buffer , string or readable Stream , got $ { typeof nd } instead ` );if(!isString(od))throw new TypeError('sha256sum should be of type "string"');if(ld.forEach(pd=>{if(!isNumber(pd))throw new TypeError('statusCode should be of type "number"')}),!isString(ud))throw new TypeError('region should be of type "string"');if(!this.enableSHA256&&od.length!==0)throw new InvalidArgumentError("sha256sum expected to be empty for anonymous or https requests");if(this.enableSHA256&&od.length!==64)throw new InvalidArgumentError( ` Invalid sha256sum : $ { od } ` );await this.checkAndRefreshCreds(),ud=ud||await this.getBucketRegionAsync(qa.bucketName);const cd=this.getRequestOptions({...qa,region:ud});if(!this.anonymous){this.enableSHA256||(od="UNSIGNED-PAYLOAD");const pd=new Date;cd.headers["x-amz-date"]=makeDateLong(pd),cd.headers["x-amz-content-sha256"]=od,this.sessionToken&&(cd.headers["x-amz-security-token"]=this.sessionToken),cd.headers.authorization=signV4(cd,this.accessKey,this.secretKey,ud,pd,od)}const dd=await request $ 1(this.transport,cd,nd);if(!dd.statusCode)throw new Error("BUG: response doesn't have a statusCode");if(!ld.includes(dd.statusCode)){delete this.regionMap[qa.bucketName];const pd=await parseResponseError(dd);throw this.logHTTP(cd,dd,pd),pd}return this.logHTTP(cd,dd),dd}async getBucketRegionAsync(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError( ` Invalid bucket name : $ { qa } ` );if(this.region)return this.region;const nd=this.regionMap[qa];if(nd)return nd;const od=async fd=>{const md=await readAsString(fd),vd=parseBucketRegion(md)||DEFAULT_REGION;return this.regionMap[qa]=vd,vd},ld="GET",ud="location",cd=this.pathStyle&&!isBrowser_1;let dd;try{const fd=await this.makeRequestAsync({method:ld,bucketName:qa,query:ud,pathStyle:cd},"",[200],DEFAULT_REGION);return od(fd)}catch(fd){if(fd.name!=="AuthorizationHeaderMalformed"||(dd=fd.Region,!dd))throw fd}const pd=await this.makeRequestAsync({method:ld,bucketName:qa,query:ud,pathStyle:cd},"",[200],dd);return await od(pd)}makeRequest(qa,nd="",od=[200],ld="",ud,cd){let dd;ud?dd=this.makeRequestAsync(qa,nd,od,ld):dd=this.makeRequestAsyncOmit(qa,nd,od,ld),dd.then(pd=>cd(null,pd),pd=>{cd(pd)})}makeRequestStream(qa,nd,od,ld,ud,cd,dd){(async()=>{const fd=await this.makeRequestStreamAsync(qa,nd,od,ld,ud);return cd||await drainResponse(fd),fd})().then(fd=>dd(null,fd),fd=>dd(fd))}getBucketRegion(qa,nd){return this.getBucketRegionAsync(qa).then(od=>nd(null,od),od=>nd(od))}async removeBucket(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:qa},"",[204]),delete this.regionMap[qa]}async statObject(qa,nd,od={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(nd))throw new InvalidObjectNameError( ` Invalid object name : $ { nd } ` );if(!isObject(od))throw new InvalidArgumentError('statOpts should be of type "object"');const ld=queryString.string
2024-09-18 09:46:23 +08:00
object - assign
( c ) Sindre Sorhus
@ license MIT
2024-11-28 09:28:59 +08:00
* /var objectAssign,hasRequiredObjectAssign;function requireObjectAssign(){if(hasRequiredObjectAssign)return objectAssign;hasRequiredObjectAssign=1;var Ra=Object.getOwnPropertySymbols,qa=Object.prototype.hasOwnProperty,nd=Object.prototype.propertyIsEnumerable;function od(ud){if(ud==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(ud)}function ld(){try{if(!Object.assign)return!1;var ud=new String("abc");if(ud[5]="de",Object.getOwnPropertyNames(ud)[0]==="5")return!1;for(var cd={},dd=0;dd<10;dd++)cd["_"+String.fromCharCode(dd)]=dd;var pd=Object.getOwnPropertyNames(cd).map(function(md){return cd[md]});if(pd.join("")!=="0123456789")return!1;var fd={};return"abcdefghijklmnopqrst".split("").forEach(function(md){fd[md]=md}),Object.keys(Object.assign({},fd)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return objectAssign=ld()?Object.assign:function(ud,cd){for(var dd,pd=od(ud),fd,md=1;md<arguments.length;md++){dd=Object(arguments[md]);for(var vd in dd)qa.call(dd,vd)&&(pd[vd]=dd[vd]);if(Ra){fd=Ra(dd);for(var Ad=0;Ad<fd.length;Ad++)nd.call(dd,fd[Ad])&&(pd[fd[Ad]]=dd[fd[Ad]])}}return pd},objectAssign}var ajax={},hasRequiredAjax;function requireAjax(){return hasRequiredAjax||(hasRequiredAjax=1,function(Ra){Ra.__esModule=!0,Ra.default=qa;function qa(nd,od){return od===void 0&&(od={}),new Promise(function(ld,ud){var cd=od,dd=cd.async,pd=dd===void 0?!0:dd,fd=cd.data,md=fd===void 0?null:fd,vd=cd.headers,Ad=vd===void 0?{}:vd,Nd=cd.method,Id=Nd===void 0?"get":Nd,Od=cd.timeout,Fd=Od===void 0?0:Od,Pd=cd.onprogress,Md=new XMLHttpRequest,Bd;Fd&&(Bd=setTimeout(function(){ud(new Error("the request timeout "+Fd+"ms"))},Fd)),Md.onerror=function(){ud(new Error("unknown error"))},Md.upload&&(Md.upload.onprogress=Pd),Md.onreadystatechange=function(){if(Md.readyState===4)if(Fd&&clearTimeout(Bd),Md.status>=200&&Md.status<300)ld(Md.response,Md);else{var jd=new Error("the request is error");ud(jd)}},Md.open(Id,nd,pd),Object.keys(Ad).forEach(function(jd){Md.setRequestHeader(jd,Ad[jd])});try{Md.send(md)}catch(jd){ud(jd)}})}}(ajax)),ajax}var utils={},md5={exports:{}},crypt={exports:{}},hasRequiredCrypt;function requireCrypt(){return hasRequiredCrypt||(hasRequiredCrypt=1,function(){var Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ ",qa={rotl:function(nd,od){return nd<<od|nd>>>32-od},rotr:function(nd,od){return nd<<32-od|nd>>>od},endian:function(nd){if(nd.constructor==Number)return qa.rotl(nd,8)&16711935|qa.rotl(nd,24)&4278255360;for(var od=0;od<nd.length;od++)nd[od]=qa.endian(nd[od]);return nd},randomBytes:function(nd){for(var od=[];nd>0;nd--)od.push(Math.floor(Math.random()*256));return od},bytesToWords:function(nd){for(var od=[],ld=0,ud=0;ld<nd.length;ld++,ud+=8)od[ud>>>5]|=nd[ld]<<24-ud%32;return od},wordsToBytes:function(nd){for(var od=[],ld=0;ld<nd.length*32;ld+=8)od.push(nd[ld>>>5]>>>24-ld%32&255);return od},bytesToHex:function(nd){for(var od=[],ld=0;ld<nd.length;ld++)od.push((nd[ld]>>>4).toString(16)),od.push((nd[ld]&15).toString(16));return od.join(" ")},hexToBytes:function(nd){for(var od=[],ld=0;ld<nd.length;ld+=2)od.push(parseInt(nd.substr(ld,2),16));return od},bytesToBase64:function(nd){for(var od=[],ld=0;ld<nd.length;ld+=3)for(var ud=nd[ld]<<16|nd[ld+1]<<8|nd[ld+2],cd=0;cd<4;cd++)ld*8+cd*6<=nd.length*8?od.push(Ra.charAt(ud>>>6*(3-cd)&63)):od.push(" = ");return od.join(" ")},base64ToBytes:function(nd){nd=nd.replace(/[^A-Z0-9+\/]/ig," " ) ; for ( var od = [ ] , ld = 0 , ud = 0 ; ld < nd . length ; ud = ++ ld % 4 ) ud != 0 && od . push ( ( Ra . indexOf ( nd . charAt ( ld - 1 ) ) & Math . pow ( 2 , - 2 * ud + 8 ) - 1 ) << ud * 2 | Ra . indexOf ( nd . charAt ( ld ) ) >>> 6 - ud * 2 ) ; return od } } ; crypt . exports = qa } ( ) ) , crypt . exports } var charenc _1 , hasRequiredCharenc ; function requireCharenc ( ) { if ( hasRequiredCharenc ) return charenc _1 ; hasRequiredCharenc = 1 ; var Ra = { utf8 : { stringToBytes : function ( qa ) { return Ra . bin . stringToBytes ( unescape ( encodeURIComponent ( qa ) ) ) } , bytesToString : function ( qa ) { return decodeURIComponent ( escape ( Ra . bin . bytesToString ( qa ) ) ) } } , bin : { stringToBytes : function ( qa ) { for ( var nd = [ ] , od = 0 ; od < qa . length ; od ++ ) nd . push ( qa . charCodeAt ( od ) & 255 ) ; return nd } , bytesToString : function ( qa ) { fo
2024-09-18 09:46:23 +08:00
* Determine if an object is a Buffer
*
* @ author Feross Aboukhadijeh < https : //feross.org>
* @ license MIT
2024-11-28 09:28:59 +08:00
* / v a r i s B u f f e r _ 1 , h a s R e q u i r e d I s B u f f e r ; f u n c t i o n r e q u i r e I s B u f f e r ( ) { i f ( h a s R e q u i r e d I s B u f f e r ) r e t u r n i s B u f f e r _ 1 ; h a s R e q u i r e d I s B u f f e r = 1 , i s B u f f e r _ 1 = f u n c t i o n ( n d ) { r e t u r n n d ! = n u l l & & ( R a ( n d ) | | q a ( n d ) | | ! ! n d . _ i s B u f f e r ) } ; f u n c t i o n R a ( n d ) { r e t u r n ! ! n d . c o n s t r u c t o r & & t y p e o f n d . c o n s t r u c t o r . i s B u f f e r = = " f u n c t i o n " & & n d . c o n s t r u c t o r . i s B u f f e r ( n d ) } f u n c t i o n q a ( n d ) { r e t u r n t y p e o f n d . r e a d F l o a t L E = = " f u n c t i o n " & & t y p e o f n d . s l i c e = = " f u n c t i o n " & & R a ( n d . s l i c e ( 0 , 0 ) ) } r e t u r n i s B u f f e r _ 1 } v a r h a s R e q u i r e d M d 5 ; f u n c t i o n r e q u i r e M d 5 ( ) { r e t u r n h a s R e q u i r e d M d 5 | | ( h a s R e q u i r e d M d 5 = 1 , f u n c t i o n ( ) { v a r R a = r e q u i r e C r y p t ( ) , q a = r e q u i r e C h a r e n c ( ) . u t f 8 , n d = r e q u i r e I s B u f f e r ( ) , o d = r e q u i r e C h a r e n c ( ) . b i n , l d = f u n c t i o n ( u d , c d ) { u d . c o n s t r u c t o r = = S t r i n g ? c d & & c d . e n c o d i n g = = = " b i n a r y " ? u d = o d . s t r i n g T o B y t e s ( u d ) : u d = q a . s t r i n g T o B y t e s ( u d ) : n d ( u d ) ? u d = A r r a y . p r o t o t y p e . s l i c e . c a l l ( u d , 0 ) : ! A r r a y . i s A r r a y ( u d ) & & u d . c o n s t r u c t o r ! = = U i n t 8 A r r a y & & ( u d = u d . t o S t r i n g ( ) ) ; f o r ( v a r d d = R a . b y t e s T o W o r d s ( u d ) , p d = u d . l e n g t h * 8 , f d = 1 7 3 2 5 8 4 1 9 3 , m d = - 2 7 1 7 3 3 8 7 9 , v d = - 1 7 3 2 5 8 4 1 9 4 , A d = 2 7 1 7 3 3 8 7 8 , N d = 0 ; N d < d d . l e n g t h ; N d + + ) d d [ N d ] = ( d d [ N d ] < < 8 | d d [ N d ] > > > 2 4 ) & 1 6 7 1 1 9 3 5 | ( d d [ N d ] < < 2 4 | d d [ N d ] > > > 8 ) & 4 2 7 8 2 5 5 3 6 0 ; d d [ p d > > > 5 ] | = 1 2 8 < < p d % 3 2 , d d [ ( p d + 6 4 > > > 9 < < 4 ) + 1 4 ] = p d ; f o r ( v a r I d = l d . _ f f , O d = l d . _ g g , F d = l d . _ h h , P d = l d . _ i i , N d = 0 ; N d < d d . l e n g t h ; N d + = 1 6 ) { v a r M d = f d , B d = m d , j d = v d , H d = A d ; f d = I d ( f d , m d , v d , A d , d d [ N d + 0 ] , 7 , - 6 8 0 8 7 6 9 3 6 ) , A d = I d ( A d , f d , m d , v d , d d [ N d + 1 ] , 1 2 , - 3 8 9 5 6 4 5 8 6 ) , v d = I d ( v d , A d , f d , m d , d d [ N d + 2 ] , 1 7 , 6 0 6 1 0 5 8 1 9 ) , m d = I d ( m d , v d , A d , f d , d d [ N d + 3 ] , 2 2 , - 1 0 4 4 5 2 5 3 3 0 ) , f d = I d ( f d , m d , v d , A d , d d [ N d + 4 ] , 7 , - 1 7 6 4 1 8 8 9 7 ) , A d = I d ( A d , f d , m d , v d , d d [ N d + 5 ] , 1 2 , 1 2 0 0 0 8 0 4 2 6 ) , v d = I d ( v d , A d , f d , m d , d d [ N d + 6 ] , 1 7 , - 1 4 7 3 2 3 1 3 4 1 ) , m d = I d ( m d , v d , A d , f d , d d [ N d + 7 ] , 2 2 , - 4 5 7 0 5 9 8 3 ) , f d = I d ( f d , m d , v d , A d , d d [ N d + 8 ] , 7 , 1 7 7 0 0 3 5 4 1 6 ) , A d = I d ( A d , f d , m d , v d , d d [ N d + 9 ] , 1 2 , - 1 9 5 8 4 1 4 4 1 7 ) , v d = I d ( v d , A d , f d , m d , d d [ N d + 1 0 ] , 1 7 , - 4 2 0 6 3 ) , m d = I d ( m d , v d , A d , f d , d d [ N d + 1 1 ] , 2 2 , - 1 9 9 0 4 0 4 1 6 2 ) , f d = I d ( f d , m d , v d , A d , d d [ N d + 1 2 ] , 7 , 1 8 0 4 6 0 3 6 8 2 ) , A d = I d ( A d , f d , m d , v d , d d [ N d + 1 3 ] , 1 2 , - 4 0 3 4 1 1 0 1 ) , v d = I d ( v d , A d , f d , m d , d d [ N d + 1 4 ] , 1 7 , - 1 5 0 2 0 0 2 2 9 0 ) , m d = I d ( m d , v d , A d , f d , d d [ N d + 1 5 ] , 2 2 , 1 2 3 6 5 3 5 3 2 9 ) , f d = O d ( f d , m d , v d , A d , d d [ N d + 1 ] , 5 , - 1 6 5 7 9 6 5 1 0 ) , A d = O d ( A d , f d , m d , v d , d d [ N d + 6 ] , 9 , - 1 0 6 9 5 0 1 6 3 2 ) , v d = O d ( v d , A d , f d , m d , d d [ N d + 1 1 ] , 1 4 , 6 4 3 7 1 7 7 1 3 ) , m d = O d ( m d , v d , A d , f d , d d [ N d + 0 ] , 2 0 , - 3 7 3 8 9 7 3 0 2 ) , f d = O d ( f d , m d , v d , A d , d d [ N d + 5 ] , 5 , - 7 0 1 5 5 8 6 9 1 ) , A d = O d ( A d , f d , m d , v d , d d [ N d + 1 0 ] , 9 , 3 8 0 1 6 0 8 3 ) , v d = O d ( v d , A d , f d , m d , d d [ N d + 1 5 ] , 1 4 , - 6 6 0 4 7 8 3 3 5 ) , m d = O d ( m d , v d , A d , f d , d d [ N d + 4 ] , 2 0 , - 4 0 5 5 3 7 8 4 8 ) , f d = O d ( f d , m d , v d , A d , d d [ N d + 9 ] , 5 , 5 6 8 4 4 6 4 3 8 ) , A d = O d ( A d , f d , m d , v d , d d [ N d + 1 4 ] , 9 , - 1 0 1 9 8 0 3 6 9 0 ) , v d = O d ( v d , A d , f d , m d , d d [ N d + 3 ] , 1 4 , - 1 8 7 3 6 3 9 6 1 ) , m d = O d ( m d , v d , A d , f d , d d [ N d + 8 ] , 2 0 , 1 1 6 3 5 3 1 5 0 1 ) , f d = O d ( f d , m d , v d , A d , d d [ N d + 1 3 ] , 5 , - 1 4 4 4 6 8 1 4 6 7 ) , A d = O d ( A d , f d , m d , v d , d d [ N d + 2 ] , 9 , - 5 1 4 0 3 7 8 4 ) , v d = O d ( v d , A d , f d , m d , d d [ N d + 7 ] , 1 4 , 1 7 3 5 3 2 8 4 7 3 ) , m d = O d ( m d , v d , A d , f d , d d [ N d + 1 2 ] , 2 0 , - 1 9 2 6 6 0 7 7 3 4 ) , f d = F d ( f d , m d , v d , A d , d d [ N d + 5 ] , 4 , - 3 7 8 5 5 8 ) , A d = F d ( A d , f d , m d , v d , d d [ N d + 8 ] , 1 1 , - 2 0 2 2 5 7 4 4 6 3 ) , v d = F d ( v d , A d , f d , m d , d d [ N d + 1 1 ] , 1 6 , 1 8 3 9 0 3 0 5 6 2 ) , m d = F d ( m d , v d , A d , f d , d d [ N d + 1 4 ] , 2 3 , - 3 5 3 0 9 5 5 6 ) , f d = F d ( f d , m d , v d , A d , d d [ N d + 1 ] , 4 , - 1 5 3 0 9 9 2 0 6 0 ) , A d = F d ( A d , f d , m d , v d , d d [ N d + 4 ] , 1 1 , 1 2 7 2 8 9 3 3 5 3 ) , v d = F d ( v d , A d , f d , m d , d d [ N d + 7 ] , 1 6 , - 1 5 5 4 9 7 6 3 2 ) , m d = F d ( m d , v d , A d , f d , d d [ N d + 1 0 ] , 2 3 , - 1 0 9 4 7 3 0 6 4 0 ) , f d = F d ( f d , m d , v d , A d , d d [ N d + 1 3 ] , 4 , 6 8 1 2 7 9 1 7 4 ) , A d = F d ( A d , f d , m d , v d , d d [ N d + 0 ] , 1 1 , - 3 5 8 5 3 7 2 2 2 ) , v d = F d ( v d , A d , f d , m d , d d [ N d + 3 ] , 1 6 , - 7 2 2 5 2 1 9 7 9 ) , m d = F d ( m d , v d , A d , f d , d d [ N d + 6 ] , 2 3 , 7 6 0 2 9 1 8 9 ) , f d = F d ( f d , m d , v d , A d , d d [ N d + 9 ] , 4 , - 6 4 0 3 6 4 4 8 7 ) , A d = F d ( A d , f d , m d , v d , d d [ N d + 1 2 ] , 1 1 , - 4 2 1 8 1 5 8 3 5 ) , v d = F d ( v d , A d , f d , m d , d d [ N d + 1 5 ] , 1 6 , 5 3 0 7 4 2 5 2 0 ) , m d = F d ( m d , v d , A d , f d , d d [ N d + 2 ] , 2 3 , - 9 9 5 3 3 8 6 5 1 ) , f d = P d ( f d , m d , v d , A d , d d [ N d + 0 ] , 6 , - 1 9 8 6 3 0 8 4 4 ) , A d = P d ( A d , f d , m d , v d , d d [ N d + 7 ] , 1 0 , 1 1 2 6 8 9 1 4 1 5 ) , v d = P d ( v d , A d , f d , m d , d d [ N d + 1 4 ] , 1 5 , - 1 4 1 6 3 5 4 9 0 5 ) , m d = P d ( m d , v d , A d , f d , d d [ N d + 5 ] , 2 1 , - 5 7 4 3 4 0 5 5 ) , f d = P d ( f d , m d , v d , A d , d d [ N d + 1 2 ] , 6 , 1 7 0 0 4 8 5 5 7 1 ) , A d = P d ( A d , f d , m d , v d , d d [ N d + 3 ] , 1 0 , - 1 8 9 4 9 8 6 6 0 6 ) , v d = P d ( v d , A d , f d , m d , d d [ N d + 1 0 ] , 1 5 , - 1 0 5 1 5 2 3 ) , m d = P d ( m d , v d , A d , f d , d d [ N d + 1 ] , 2 1 , - 2 0 5 4 9 2 2 7 9 9 ) , f d = P d ( f d , m d , v d , A d , d d [ N d + 8 ] , 6 , 1 8 7 3 3 1 3 3 5 9 ) , A d = P d ( A d , f d , m d , v d , d d [ N d + 1 5 ] , 1 0 , - 3 0 6 1 1 7 4 4 ) , v d = P d ( v d , A d , f d , m d , d d [ N d + 6 ] , 1 5 , - 1 5 6 0 1 9 8 3 8 0 ) , m d = P d ( m d , v d , A d , f d , d d [ N d + 1 3 ] , 2 1 , 1 3 0 9 1 5 1 6 4 9 ) , f d = P d ( f d , m d , v d , A d , d d [ N d + 4 ] , 6 , - 1 4 5 5 2 3 0 7 0 ) , A d = P d ( A d , f d , m d , v d , d d [ N d + 1 1 ] , 1 0 , - 1 1 2 0 2 1 0 3 7 9 ) , v d = P d ( v d , A d , f d , m d , d d [ N d + 2 ] , 1 5 , 7 1 8 7 8 7 2 5 9 ) , m d = P d ( m d , v d , A d , f d , d d [ N d + 9 ] , 2 1 , - 3 4 3 4 8 5 5 5 1 ) , f d = f d + M d > > > 0 , m d = m d + B d > > > 0 , v d = v d + j d > > > 0 , A d = A d + H d > > > 0 } r e t u r n R a . e n d i a n ( [ f d , m d , v d , A d ] ) } ; l d . _ f f = f u n c t i o n ( u d , c d , d d , p d , f d , m d , v d ) { v a r A d = u d + ( c d & d d | ~ c d & p d ) + ( f d > > > 0 ) + v d ; r e t u r n ( A d < < m d | A d > > > 3 2 - m d ) + c d } , l d . _ g g = f u n c t i o n ( u d , c
2024-09-18 09:46:23 +08:00
* !
* ! Copyright 2011 - 2012 , 2014 Jean - Christophe Sirot < sirot @ chelonix . com >
* !
* ! This file is part of digest . js
* !
* ! digest . js is free software : you can redistribute it and / or modify it under
* ! the terms of the GNU General Public License as published by the Free Software
* ! Foundation , either version 3 of the License , or ( at your option ) any later
* ! version .
* !
* ! digest . js is distributed in the hope that it will be useful , but
* ! WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY
* ! or FITNESS FOR A PARTICULAR PURPOSE . See the GNU General Public License for
* ! more details .
* !
* ! You should have received a copy of the GNU General Public License along with
* ! digest . js . If not , see http : //www.gnu.org/licenses/.
* !
2024-11-28 09:28:59 +08:00
* ! * * * * * END LICENSE BLOCK * * * * * * / v a r h a s R e q u i r e d D i g e s t ; f u n c t i o n r e q u i r e D i g e s t ( ) { r e t u r n h a s R e q u i r e d D i g e s t | | ( h a s R e q u i r e d D i g e s t = 1 , f u n c t i o n ( R a , q a ) { ( f u n c t i o n ( ) { A r r a y B u f f e r . p r o t o t y p e . s l i c e | | ( A r r a y B u f f e r . p r o t o t y p e . s l i c e = f u n c t i o n ( n d , o d ) { v a r l d , u d = n e w U i n t 8 A r r a y ( t h i s ) ; o d = = = v o i d 0 & & ( o d = u d . l e n g t h ) ; v a r c d = n e w A r r a y B u f f e r ( o d - n d ) , d d = n e w U i n t 8 A r r a y ( c d ) ; f o r ( l d = 0 ; l d < d d . l e n g t h ; l d + + ) d d [ l d ] = u d [ l d + n d ] ; r e t u r n c d } ) } ) ( ) , f u n c t i o n ( n d ) { f u n c t i o n o d ( ) { } o d . p r o t o t y p e . p r o c e s s B l o c k = f u n c t i o n ( m d ) { v a r v d = t h i s . c u r r e n t [ 0 ] , A d = t h i s . c u r r e n t [ 1 ] , N d = t h i s . c u r r e n t [ 2 ] , I d = t h i s . c u r r e n t [ 3 ] , O d = t h i s . c u r r e n t [ 4 ] , F d = [ m d [ 0 ] < < 2 4 | m d [ 1 ] < < 1 6 | m d [ 2 ] < < 8 | m d [ 3 ] , m d [ 4 ] < < 2 4 | m d [ 5 ] < < 1 6 | m d [ 6 ] < < 8 | m d [ 7 ] , m d [ 8 ] < < 2 4 | m d [ 9 ] < < 1 6 | m d [ 1 0 ] < < 8 | m d [ 1 1 ] , m d [ 1 2 ] < < 2 4 | m d [ 1 3 ] < < 1 6 | m d [ 1 4 ] < < 8 | m d [ 1 5 ] , m d [ 1 6 ] < < 2 4 | m d [ 1 7 ] < < 1 6 | m d [ 1 8 ] < < 8 | m d [ 1 9 ] , m d [ 2 0 ] < < 2 4 | m d [ 2 1 ] < < 1 6 | m d [ 2 2 ] < < 8 | m d [ 2 3 ] , m d [ 2 4 ] < < 2 4 | m d [ 2 5 ] < < 1 6 | m d [ 2 6 ] < < 8 | m d [ 2 7 ] , m d [ 2 8 ] < < 2 4 | m d [ 2 9 ] < < 1 6 | m d [ 3 0 ] < < 8 | m d [ 3 1 ] , m d [ 3 2 ] < < 2 4 | m d [ 3 3 ] < < 1 6 | m d [ 3 4 ] < < 8 | m d [ 3 5 ] , m d [ 3 6 ] < < 2 4 | m d [ 3 7 ] < < 1 6 | m d [ 3 8 ] < < 8 | m d [ 3 9 ] , m d [ 4 0 ] < < 2 4 | m d [ 4 1 ] < < 1 6 | m d [ 4 2 ] < < 8 | m d [ 4 3 ] , m d [ 4 4 ] < < 2 4 | m d [ 4 5 ] < < 1 6 | m d [ 4 6 ] < < 8 | m d [ 4 7 ] , m d [ 4 8 ] < < 2 4 | m d [ 4 9 ] < < 1 6 | m d [ 5 0 ] < < 8 | m d [ 5 1 ] , m d [ 5 2 ] < < 2 4 | m d [ 5 3 ] < < 1 6 | m d [ 5 4 ] < < 8 | m d [ 5 5 ] , m d [ 5 6 ] < < 2 4 | m d [ 5 7 ] < < 1 6 | m d [ 5 8 ] < < 8 | m d [ 5 9 ] , m d [ 6 0 ] < < 2 4 | m d [ 6 1 ] < < 1 6 | m d [ 6 2 ] < < 8 | m d [ 6 3 ] ] , P d , M d ; f o r ( M d = 1 6 ; M d < 8 0 ; M d + + ) F d . p u s h ( ( F d [ M d - 3 ] ^ F d [ M d - 8 ] ^ F d [ M d - 1 4 ] ^ F d [ M d - 1 6 ] ) < < 1 | ( F d [ M d - 3 ] ^ F d [ M d - 8 ] ^ F d [ M d - 1 4 ] ^ F d [ M d - 1 6 ] ) > > > 3 1 ) ; f o r ( M d = 0 ; M d < 8 0 ; M d + + ) P d = ( v d < < 5 | v d > > > 2 7 ) + O d + F d [ M d ] , M d < 2 0 ? P d + = ( A d & N d | ~ A d & I d ) + 1 5 1 8 5 0 0 2 4 9 | 0 : M d < 4 0 ? P d + = ( A d ^ N d ^ I d ) + 1 8 5 9 7 7 5 3 9 3 | 0 : M d < 6 0 ? P d + = ( A d & N d | A d & I d | N d & I d ) + 2 4 0 0 9 5 9 7 0 8 | 0 : P d + = ( A d ^ N d ^ I d ) + 3 3 9 5 4 6 9 7 8 2 | 0 , O d = I d , I d = N d , N d = A d < < 3 0 | A d > > > 2 , A d = v d , v d = P d ; t h i s . c u r r e n t [ 0 ] + = v d , t h i s . c u r r e n t [ 1 ] + = A d , t h i s . c u r r e n t [ 2 ] + = N d , t h i s . c u r r e n t [ 3 ] + = I d , t h i s . c u r r e n t [ 4 ] + = O d , t h i s . c u r r e n t L e n + = 6 4 } , o d . p r o t o t y p e . d o P a d d i n g = f u n c t i o n ( ) { v a r m d = ( t h i s . i n L e n + t h i s . c u r r e n t L e n ) * 8 , v d = 0 , A d = m d & 4 2 9 4 9 6 7 2 9 5 , N d = t h i s . i n L e n < = 5 5 ? 5 5 - t h i s . i n L e n : 1 1 9 - t h i s . i n L e n , I d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( N d + 1 + 8 ) ) ; r e t u r n I d [ 0 ] = 1 2 8 , I d [ I d . l e n g t h - 1 ] = A d & 2 5 5 , I d [ I d . l e n g t h - 2 ] = A d > > > 8 & 2 5 5 , I d [ I d . l e n g t h - 3 ] = A d > > > 1 6 & 2 5 5 , I d [ I d . l e n g t h - 4 ] = A d > > > 2 4 & 2 5 5 , I d [ I d . l e n g t h - 5 ] = v d & 2 5 5 , I d [ I d . l e n g t h - 6 ] = v d > > > 8 & 2 5 5 , I d [ I d . l e n g t h - 7 ] = v d > > > 1 6 & 2 5 5 , I d [ I d . l e n g t h - 8 ] = v d > > > 2 4 & 2 5 5 , I d } , o d . p r o t o t y p e . g e t D i g e s t = f u n c t i o n ( ) { v a r m d = n e w U i n t 8 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) ; r e t u r n m d [ 3 ] = t h i s . c u r r e n t [ 0 ] & 2 5 5 , m d [ 2 ] = t h i s . c u r r e n t [ 0 ] > > > 8 & 2 5 5 , m d [ 1 ] = t h i s . c u r r e n t [ 0 ] > > > 1 6 & 2 5 5 , m d [ 0 ] = t h i s . c u r r e n t [ 0 ] > > > 2 4 & 2 5 5 , m d [ 7 ] = t h i s . c u r r e n t [ 1 ] & 2 5 5 , m d [ 6 ] = t h i s . c u r r e n t [ 1 ] > > > 8 & 2 5 5 , m d [ 5 ] = t h i s . c u r r e n t [ 1 ] > > > 1 6 & 2 5 5 , m d [ 4 ] = t h i s . c u r r e n t [ 1 ] > > > 2 4 & 2 5 5 , m d [ 1 1 ] = t h i s . c u r r e n t [ 2 ] & 2 5 5 , m d [ 1 0 ] = t h i s . c u r r e n t [ 2 ] > > > 8 & 2 5 5 , m d [ 9 ] = t h i s . c u r r e n t [ 2 ] > > > 1 6 & 2 5 5 , m d [ 8 ] = t h i s . c u r r e n t [ 2 ] > > > 2 4 & 2 5 5 , m d [ 1 5 ] = t h i s . c u r r e n t [ 3 ] & 2 5 5 , m d [ 1 4 ] = t h i s . c u r r e n t [ 3 ] > > > 8 & 2 5 5 , m d [ 1 3 ] = t h i s . c u r r e n t [ 3 ] > > > 1 6 & 2 5 5 , m d [ 1 2 ] = t h i s . c u r r e n t [ 3 ] > > > 2 4 & 2 5 5 , m d [ 1 9 ] = t h i s . c u r r e n t [ 4 ] & 2 5 5 , m d [ 1 8 ] = t h i s . c u r r e n t [ 4 ] > > > 8 & 2 5 5 , m d [ 1 7 ] = t h i s . c u r r e n t [ 4 ] > > > 1 6 & 2 5 5 , m d [ 1 6 ] = t h i s . c u r r e n t [ 4 ] > > > 2 4 & 2 5 5 , m d . b u f f e r } , o d . p r o t o t y p e . r e s e t = f u n c t i o n ( ) { t h i s . c u r r e n t L e n = 0 , t h i s . i n L e n = 0 , t h i s . c u r r e n t = n e w U i n t 3 2 A r r a y ( n e w A r r a y B u f f e r ( 2 0 ) ) , t h i s . c u r r e n t [ 0 ] = 1 7 3 2 5 8 4 1 9 3 , t h i s . c u r r e n t [ 1 ] = 4 0 2 3 2 3 3 4 1 7 , t h i s . c u r r e n t [ 2 ] = 2 5 6 2 3 8 3 1 0 2 , t h i s . c u r r e n t [ 3 ] = 2 7 1 7 3 3 8 7 8 , t h i s . c u r r e n t [ 4 ] = 3 2 8 5 3 7 7 5 2 0 } , o d . p r o t o t y p e . b l o c k L e n = 6 4 , o d . p r o t o t y p e . d i g e s t L e n = 2 0 ; v a r l d = f u n c t i o n ( m d ) { v a r v d = n e w A r r a y B u f f e r ( m d . l e n g t h ) , A d = n e w U i n t 8 A r r a y ( v d ) , N d ; f o r ( N d = 0 ; N d < m d . l e n g t h ; N d + + ) A d [ N d ] = m d . c h a r C o d e A t ( N d ) ; r e t u r n A d } , u d = f u n c t i o n ( m d ) { v a r v d = n e w A r r a y B u f f e r ( 1 ) , A d = n e w U i n t 8 A r r a y ( v d ) ; r e t u r n A d [ 0 ] = m d , A d } , c d = f u n c t i o n ( m d ) { i f ( m d . c o n s t r u c t o r = = = U i n t 8 A r r a y ) r e t u r n m d ; i f ( m d . c o n s t r u c t o r = = = A r r a y B u f f e r ) r e t u r n n e w U i n t 8 A r r a y ( m d ) ; i f ( m d . c o n s t r u c t o r = = = S t r i n g ) r e t u r n l d ( m d ) ; i f ( m d . c o n s t r u c t o r = = = N u m b e r ) { i f ( m d > 2 5 5 ) t h r o w " F o r m o r e t h a n o n e b y t e , u s e a n a r r a y b u f f e r " ; i f ( m d < 0 ) t h r o w " I n p u t v a l u e m u s t b e p o s i t i v e " ; r e t u r n u d ( m d ) } e l s e t h r o w " U n s u p p o r t e d t y p e " } , d d = f u n c t i o n ( m d ) { v a r v d = f u n c t i o n ( I d ) { f o r ( v a r O d = I d . l e n g t h , F d = 0 ; O d > 0 ; ) { v a r P d = t h i s . b l o c k L e n - t h i s . i n L e n ; P d > O d & & ( P d = O d ) ; v a r M d = I d . s u b a r r a y ( F d , F d + P d ) ; t h i s . i n b u f . s e t ( M d , t h i s . i n L e n ) , F d + = P d , O d - = P d , t h i s . i n L e n + = P d , t h i s . i n L e n = = = t h i s . b l o c k L e n & & ( t h i s . p r o c e s s B l o c k ( t h i s . i n b u f ) , t h i s . i n L e n = 0 ) } } , A d = f u n c t i o n ( ) { v a r I d = t h i s . d o P a d d i n g ( ) ; t h i s . u p d a t e ( I d ) ; v a r O d = t h i s . g e t D i g e s t ( ) ; r e t u r n t h i s . r e s e t ( ) , O d } , N d = f u n c t i o n ( ) { i f ( ! m d ) t h r o w " U n s u p p o r t e d a l g o r i t h m : " + m d . t o S t r i n g ( ) ; m d . p r o t o t y p e .
2024-12-08 09:17:51 +08:00
` )}),Id}function vd(Nd,Id,Od){Nd===void 0&&(Nd=""),Id===void 0&&(Id="");var Fd="";Nd&&(Fd+="/"+Nd),Id&&(Id.charAt(0)!=="/"&&(Fd+="/"),Fd+=Id);var Pd=""+Fd,Md="?";if(Od){var Bd=function(Gd,zd){return Gd[0]>zd[0]?1:Gd[0]<zd[0]?-1:0},jd=function(Gd){Pd+=Md+Gd,Od[Gd]&&(Pd+="="+Od[Gd]),Md="&"};Object.keys(Od).sort(Bd).forEach(jd)}return Pd}function Ad(Nd){Nd===void 0&&(Nd={});var Id=Nd,Od=Id.type,Fd=Od===void 0?"header":Od,Pd=Id.verb,Md=Pd===void 0?"":Pd,Bd=Id.contentMd5,jd=Bd===void 0?"":Bd,Hd=Id.expires,Gd=Hd===void 0?ud()+3600:Hd,zd=Id.bucket,df=Id.objectName,Wd=Id.accessKeySecret,Jd=Id.headers,Xd=Jd===void 0?{}:Jd,_f=Id.subResource,vf=Xd["x-oss-date"]||"",Sf=Xd["Content-Type"]||"",gf=[Md,jd,Sf];Fd==="header"?gf.push(vf):gf.push(Gd);var bf=md(Xd),Tf=vd(zd,df,_f);gf.push(""+bf+Tf);var Mf=gf.join( `
` ),Kf=new od.default.HMAC_SHA1;Kf.setKey(Wd),Kf.update(Mf);var Zf=new Uint8Array(Kf.finalize()),eh=nd.default.fromByteArray(Zf);return eh}return utils}(function(Ra){var qa=interopRequireDefaultExports;Ra.__esModule=!0,Ra.default=void 0;var nd=qa(requireObjectAssign()),od=qa(requireAjax()),ld=requireUtils(),ud=function(){function cd(pd){pd===void 0&&(pd={}),(0,ld.assertOptions)(pd),this.opts=(0,nd.default)({region:"oss-cn-hangzhou",internal:!1,cname:!1,secure:!1,timeout:6e4},pd);var fd=this.opts,md=fd.bucket,vd=fd.region,Ad=fd.endpoint,Nd=fd.internal;if(this.host="",Ad)this.host=Ad;else{var Id=md;Nd&&(Id+="-internal"),Id+="."+vd+".aliyuncs.com",this.host=Id}}var dd=cd.prototype;return dd.put=function(fd,md,vd){var Ad=this;return vd===void 0&&(vd={}),new Promise(function(Nd,Id){(0,ld.blobToBuffer)(md).then(function(Od){var Fd=Ad.opts,Pd=Fd.accessKeyId,Md=Fd.accessKeySecret,Bd=Fd.stsToken,jd=Fd.bucket,Hd="PUT",Gd=(0,ld.getContentMd5)(Od),zd=md.type,df={"Content-Md5":Gd,"Content-Type":zd,"x-oss-date":new Date().toGMTString()};Bd&&(df["x-oss-security-token"]=Bd);var Wd=(0,ld.getSignature)({verb:Hd,contentMd5:Gd,headers:df,bucket:jd,objectName:fd,accessKeyId:Pd,accessKeySecret:Md});df.Authorization="OSS "+Pd+":"+Wd;var Jd=Ad.opts.secure?"https":"http",Xd=Jd+"://"+Ad.host+"/"+fd;return(0,od.default)(Xd,{method:Hd,headers:df,data:md,timeout:Ad.opts.timeout,onprogress:vd.onprogress})}).then(Nd).catch(Id)})},dd.putSymlink=function(fd,md){var vd=this.opts,Ad=vd.accessKeyId,Nd=vd.accessKeySecret,Id=vd.stsToken,Od=vd.bucket,Fd="PUT",Pd={"x-oss-date":new Date().toGMTString(),"x-oss-symlink-target":encodeURI(md)};Id&&(Pd["x-oss-security-token"]=Id);var Md=(0,ld.getSignature)({verb:Fd,headers:Pd,bucket:Od,objectName:fd,accessKeyId:Ad,accessKeySecret:Nd,subResource:{symlink:""}});Pd.Authorization="OSS "+Ad+":"+Md;var Bd=this.opts.secure?"https":"http",jd=Bd+"://"+this.host+"/"+fd+"?symlink";return(0,od.default)(jd,{method:Fd,headers:Pd,timeout:this.opts.timeout})},dd.signatureUrl=function(fd,md){md===void 0&&(md={});var vd=md,Ad=vd.expires,Nd=Ad===void 0?1800:Ad,Id=vd.method,Od=vd.process,Fd=vd.response,Pd=this.opts,Md=Pd.accessKeyId,Bd=Pd.accessKeySecret,jd=Pd.stsToken,Hd=Pd.bucket,Gd={},zd={};if(Od){var df="x-oss-process";zd[df]=Od}Fd&&Object.keys(Fd).forEach(function(Sf){var gf="response-"+Sf.toLowerCase();zd[gf]=Fd[Sf]}),Object.keys(md).forEach(function(Sf){var gf=Sf.toLowerCase(),bf=md[Sf];gf.indexOf("x-oss-")===0?Gd[gf]=bf:gf.indexOf("content-md5")===0||gf.indexOf("content-type")===0?Gd[Sf]=bf:gf!=="expires"&&gf!=="response"&&gf!=="process"&&gf!=="method"&&(zd[gf]=bf)});var Wd=md["security-token"]||jd;Wd&&(zd["security-token"]=Wd);var Jd=(0,ld.unix)()+Nd,Xd=(0,ld.getSignature)({type:"url",verb:Id||"GET",accessKeyId:Md,accessKeySecret:Bd,bucket:Hd,objectName:fd,headers:Gd,subResource:zd,expires:Jd}),_f=this.opts.secure?"https":"http",vf=_f+"://"+this.host+"/"+fd;return vf+="?OSSAccessKeyId="+Md,vf+="&Expires="+Jd,vf+="&Signature="+encodeURIComponent(Xd),Object.keys(zd).forEach(function(Sf){vf+="&"+Sf+"="+encodeURIComponent(zd[Sf])}),vf},cd}();Ra.default=ud})(TinyOSS);var lib=TinyOSS.default;const OSS=getDefaultExportFromCjs(lib),byteToHex=[];for(let Ra=0;Ra<256;++Ra)byteToHex.push((Ra+256).toString(16).slice(1));function unsafeStringify(Ra,qa=0){return(byteToHex[Ra[qa+0]]+byteToHex[Ra[qa+1]]+byteToHex[Ra[qa+2]]+byteToHex[Ra[qa+3]]+"-"+byteToHex[Ra[qa+4]]+byteToHex[Ra[qa+5]]+"-"+byteToHex[Ra[qa+6]]+byteToHex[Ra[qa+7]]+"-"+byteToHex[Ra[qa+8]]+byteToHex[Ra[qa+9]]+"-"+byteToHex[Ra[qa+10]]+byteToHex[Ra[qa+11]]+byteToHex[Ra[qa+12]]+byteToHex[Ra[qa+13]]+byteToHex[Ra[qa+14]]+byteToHex[Ra[qa+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={rand
2024-09-18 09:46:23 +08:00
async ( CUSTOM _ARG ) => {
$ { localStorage . getItem ( "formCustomConfig" ) }
}
2024-12-08 09:17:51 +08:00
` ;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer:Buffer $ 1,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(Ra=>{console.error(Ra),reject(Ra)})})}function fileUpload(Ra,qa){const nd=localStorage.getItem("imgHost");switch(nd||localStorage.setItem("imgHost","default"),nd){case"aliOSS":return aliOSSFileUpload(qa);case"minio":return minioFileUpload(Ra,qa.name);case"txCOS":return txCOSFileUpload(qa);case"qiniu":return qiniuUpload(qa);case"gitee":return giteeUpload(Ra,qa.name);case"github":return ghFileUpload(Ra,qa.name);case"mp":return mpFileUpload(qa);case"formCustom":return formCustomUpload(Ra,qa);default:return ghFileUpload(Ra,qa.name)}}const fileApi={fileUpload},_hoisted_1={class:"container-main flex-1"},_hoisted_2={class:"preview border shadow-xl"},_hoisted_3=["innerHTML"],_hoisted_4={key:0,class:"loading-mask"},_sfc_main $ 1=defineComponent({__name:"CodemirrorEditor",setup(Ra){const qa=useStore(),nd=useDisplayStore(),{isDark:od,output:ld,editor:ud,editorContent:cd}=storeToRefs(qa),{isShowCssEditor:dd}=storeToRefs(nd),{editorRefresh:pd,exportEditorContent2HTML:fd,exportEditorContent2MD:md,formatContent:vd,importMarkdownContent:Ad,resetStyleConfirm:Nd}=qa,{toggleShowInsertFormDialog:Id,toggleShowUploadImgDialog:Od}=nd,Fd=ref $ 1(!1),Pd=ref $ 1(),Md=ref $ 1(null);function Bd(){const Mf=eh=>{let $ f,Df;clearTimeout(Pd.value),eh==="preview"?( $ f=Md.value. $ el,Df=document.querySelector(".CodeMirror-scroll"),ud.value.off("scroll",Kf),Pd.value=setTimeout(()=>{ud.value.on("scroll",Kf)},300)):( $ f=document.querySelector(".CodeMirror-scroll"),Df=Md.value. $ el,Df.removeEventListener("scroll",Zf,!1),Pd.value=setTimeout(()=>{Df.addEventListener("scroll",Zf,!1)},300));const zf= $ f.scrollTop/( $ f.scrollHeight- $ f.offsetHeight)*(Df.scrollHeight-Df.offsetHeight);Df.scrollTo(0,zf)};function Kf(){Mf("editor")}function Zf(){Mf("preview")}Md.value. $ el.addEventListener("scroll",Zf,!1),ud.value.on("scroll",Kf)}onMounted(()=>{setTimeout(()=>{Bd()},300)});function jd(){pd()}const Hd=ref $ 1(!1),Gd=ref $ 1(!1);function zd(){Gd.value=!0,Hd.value=!0}function df(){Hd.value=!1,setTimeout(()=>{Gd.value=!1},800)}function Wd(Mf){const Kf=checkImage(Mf);if(!Kf.ok)return ElMessage.error(Kf.msg),!1;const Zf=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",Zf);const eh=localStorage.getItem( ` $ { Zf } Config ` );return Zf==="default"||eh?!0:(ElMessage.error( ` 请先配置 $ { Zf } 图床参数 ` ),!1)}function Jd(Mf){if(!Mf){ElMessage.error("上传图片未知异常");return}Od(!1);const Kf=ud.value.getCursor(),Zf= ` ! [ ] ( $ { Mf } ) ` ;toRaw(qa.editor).replaceSelection( `
2024-11-28 09:28:59 +08:00
$ { Zf }
2024-12-08 09:17:51 +08:00
` ,Kf),ElMessage.success("图片上传成功")}function Xd(Mf,Kf){Fd.value=!0,toBase64 $ 1(Mf).then(Zf=>fileApi.fileUpload(Zf,Mf)).then(Zf=>{Kf?Kf(Zf):Jd(Zf)}).catch(Zf=>{ElMessage.error(Zf.message)}).finally(()=>{Fd.value=!1})}const _f=ref $ 1();watch(od,()=>{var Kf,Zf;const Mf=od.value?"darcula":"xq-light";(Zf=(Kf=toRaw(ud.value))==null?void 0:Kf.setOption)==null||Zf.call(Kf,"theme",Mf)});function vf(){const Mf=document.querySelector("#editor");Mf.value||(Mf.value=cd.value),ud.value=CodeMirror.fromTextArea(Mf,{mode:"text/x-markdown",theme:od.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{[ ` $ { shiftKey } - $ { altKey } - F ` ]:function(Zf){formatDoc(Zf.getValue()).then(eh=>{Zf.setValue(eh)})},[ ` $ { ctrlKey } - B ` ]:function(Zf){const eh=Zf.getSelection();Zf.replaceSelection( ` * * $ { eh } * * ` )},[ ` $ { ctrlKey } - I ` ]:function(Zf){const eh=Zf.getSelection();Zf.replaceSelection( ` * $ { eh } * ` )},[ ` $ { ctrlKey } - D ` ]:function(Zf){const eh=Zf.getSelection();Zf.replaceSelection( ` ~ ~ $ { eh } ~ ~ ` )},[ ` $ { ctrlKey } - K ` ]:function(Zf){const eh=Zf.getSelection();Zf.replaceSelection( ` [ $ { eh } ] ( ) ` )},[ ` $ { ctrlKey } - E ` ]:function(Zf){const eh=Zf.getSelection();Zf.replaceSelection( ` \ ` ${ eh } \` ` ) } , [ ` ${ ctrlKey } -L ` ] : function ( Zf ) { const eh = Zf . getSelection ( ) ; Zf . replaceSelection ( ` \` ${ eh } \` ` ) } } } ) , ud . value . on ( "change" , Kf => { clearTimeout ( _f . value ) , _f . value = setTimeout ( ( ) => { jd ( ) , cd . value = Kf . getValue ( ) } , 300 ) } ) , ud . value . on ( "paste" , ( Kf , Zf ) => { if ( ! ( ! ( Zf . clipboardData && Zf . clipboardData . items ) || Fd . value ) ) for ( let eh = 0 , $f = Zf . clipboardData . items . length ; eh < $f ; ++ eh ) { const Df = Zf . clipboardData . items [ eh ] ; if ( Df . kind === "file" ) { const Lf = Df . getAsFile ( ) ; if ( ! Wd ( Lf ) ) continue ; Xd ( Lf ) } } } ) } const Sf = ref$1 ( null ) ; function gf ( Mf ) { ud . value . options . extraKeys [ Mf ] ( ud . value ) } const bf = ref$1 ( null ) ; function Tf ( ) { const Mf = bf . value . $el , Kf = async ( { md : $f , list : Df } ) => { const Lf = [ ... $f . str . matchAll ( /!\[(.*?)\]\((.*?)\)/g ) || [ ] ] . filter ( xf => xf ) , zf = $f . path . match ( /.+?\// ) [ 0 ] ; ( await Promise . all ( Lf . map ( xf => new Promise ( yf => { let [ , , Bf ] = xf ; Bf = Bf . replace ( /^.\// , "" ) ; const { file : qf } = Df . find ( oh => oh . path === ` ${ zf } ${ Bf } ` ) || { } ; Xd ( qf , oh => { yf ( { matchStr : Bf , url : oh } ) } ) } ) ) ) ) . forEach ( xf => { $f . str = $f . str . replace ( ` ](./ ${ xf . matchStr } ) ` , ` ]( ${ xf . url } ) ` ) . replace ( ` ]( ${ xf . matchStr } ) ` , ` ]( ${ xf . url } ) ` ) } ) , ud . value . setValue ( $f . str ) } ; Mf . ondragover = $f => $f . preventDefault ( ) , Mf . ondrop = async $f => { $f . preventDefault ( ) ; for ( const Df of $f . dataTransfer . items ) Df . getAsFileSystemHandle ( ) . then ( async Lf => { if ( Lf . kind === "directory" ) { const zf = await eh ( Lf ) , Jf = await Zf ( { list : zf } ) ; Kf ( { md : Jf , list : zf } ) } else { const zf = await Lf . getFile ( ) ; console . log ( "file" , zf ) } } ) } ; async function Zf ( { list : $f } ) { return new Promise ( Df => { const { path : Lf , file : zf } = $f . find ( xf => xf . path . match ( /\.md$/ ) ) , Jf = new FileReader ; Jf . readAsText ( zf , "UTF-8" ) , Jf . onload = xf => { Df ( { str : xf . target . result , file : zf , path : Lf } ) } } ) } async function eh ( $f ) { const Df = [ ] ; let Lf = "" ; try { const zf = [ $f ] ; for ( const Jf of zf ) { Lf += ` ${ Jf . name } / ` ; for await ( const [ , xf ] of Jf ) xf . kind === "file" ? Df . push ( { path : Lf + xf . name , file : await xf . getFile ( ) } ) : ( Df . push ( { path : ` ${ Lf + xf . name } / ` } ) , zf . push ( xf ) ) } } catch ( zf ) { console . error ( zf ) } return Df } } return onMounted ( ( ) => { vf ( ) , jd ( ) , Tf ( ) } ) , ( Mf , Kf ) => { const Zf = ElRow ; return openBlock ( ) , createElementBlock ( "div" , { ref _key : "container" , ref : Sf , class : "container flex flex-col" } , [ createVNode ( EditorHeader , { onAddFormat : gf , onFormatContent : unref ( vd ) , onStartCopy : zd , onEndCopy : df } , null , 8 , [ "onFormatContent" ] ) , createBaseVNode ( "main" , _hoisted _1 , [ createVNode ( Zf , { class : "container-main-section h-full border-1" } , { default : withCtx ( ( ) => [ createVNode ( unref ( ElCol ) , { ref _key : "codeMirrorWrapper" , ref : bf , span : unref ( dd ) ? 8 : 12 , class : normalizeClass ( [ "codeMirror-wrapper border-r-1" , { "order-1" : ! unref ( qa ) . isEditOnLeft } ] ) } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$7 ) , null , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$2 ) , null , { default : withCtx ( ( ) => Kf [ 7 ] || ( Kf [ 7 ] = [ createBaseVNode ( "textarea" , { id : "editor" , type : "textarea" , placeholder : "Your markdown text here." } , null , - 1 ) ] ) ) , _ : 1 } ) , createVNode ( unref ( _sfc _main$6 ) , { class : "w-64" } , { default : withCtx ( ( ) => [ createVNode ( unref ( _sfc _main$5 ) , { inset : "" , onClick : Kf [ 0 ] || ( Kf [ 0 ] = eh => unref ( Od ) ( ) ) } , { default : withCtx ( ( ) => K
` ;Pd.replaceSelection(zd+zd,null),Ad(Pd,-1),jd=Pd.listSelections();for(var df=0;df<jd.length;df++){var Wd=jd[df].head.line;Pd.indentLine(Wd,null,!0),Pd.indentLine(Wd+1,null,!0)}})}function Ad(Pd,Md){for(var Bd=[],jd=Pd.listSelections(),Hd=0,Gd=0;Gd<jd.length;Gd++){var zd=jd[Gd];zd.head==Pd.getCursor()&&(Hd=Gd);var df=zd.head.ch||Md>0?{line:zd.head.line,ch:zd.head.ch+Md}:{line:zd.head.line-1};Bd.push({anchor:df,head:df})}Pd.setSelections(Bd,Hd)}function Nd(Pd){var Md=nd.cmpPos(Pd.anchor,Pd.head)>0;return{anchor:new ld(Pd.anchor.line,Pd.anchor.ch+(Md?-1:1)),head:new ld(Pd.head.line,Pd.head.ch+(Md?1:-1))}}function Id(Pd,Md){var Bd=fd(Pd);if(!Bd||Pd.getOption("disableInput"))return nd.Pass;var jd=ud(Bd,"pairs"),Hd=jd.indexOf(Md);if(Hd==-1)return nd.Pass;for(var Gd=ud(Bd,"closeBefore"),zd=ud(Bd,"triples"),df=jd.charAt(Hd+1)==Md,Wd=Pd.listSelections(),Jd=Hd%2==0,Xd,_f=0;_f<Wd.length;_f++){var vf=Wd[_f],Sf=vf.head,gf,bf=Pd.getRange(Sf,ld(Sf.line,Sf.ch+1));if(Jd&&!vf.empty())gf="surround";else if((df||!Jd)&&bf==Md)df&&Fd(Pd,Sf)?gf="both":zd.indexOf(Md)>=0&&Pd.getRange(Sf,ld(Sf.line,Sf.ch+3))==Md+Md+Md?gf="skipThree":gf="skip";else if(df&&Sf.ch>1&&zd.indexOf(Md)>=0&&Pd.getRange(ld(Sf.line,Sf.ch-2),Sf)==Md+Md){if(Sf.ch>2&&/ \b string/.test(Pd.getTokenTypeAt(ld(Sf.line,Sf.ch-2))))return nd.Pass;gf="addFour"}else if(df){var Tf=Sf.ch==0?" ":Pd.getRange(ld(Sf.line,Sf.ch-1),Sf);if(!nd.isWordChar(bf)&&Tf!=Md&&!nd.isWordChar(Tf))gf="both";else return nd.Pass}else if(Jd&&(bf.length===0||/ \s /.test(bf)||Gd.indexOf(bf)>-1))gf="both";else return nd.Pass;if(!Xd)Xd=gf;else if(Xd!=gf)return nd.Pass}var Mf=Hd%2?jd.charAt(Hd-1):Md,Kf=Hd%2?Md:jd.charAt(Hd+1);Pd.operation(function(){if(Xd=="skip")Ad(Pd,1);else if(Xd=="skipThree")Ad(Pd,3);else if(Xd=="surround"){for(var Zf=Pd.getSelections(),eh=0;eh<Zf.length;eh++)Zf[eh]=Mf+Zf[eh]+Kf;Pd.replaceSelections(Zf,"around"),Zf=Pd.listSelections().slice();for(var eh=0;eh<Zf.length;eh++)Zf[eh]=Nd(Zf[eh]);Pd.setSelections(Zf)}else Xd=="both"?(Pd.replaceSelection(Mf+Kf,null),Pd.triggerElectric(Mf+Kf),Ad(Pd,-1)):Xd=="addFour"&&(Pd.replaceSelection(Mf+Mf+Mf+Mf,"before"),Ad(Pd,1))})}function Od(Pd,Md){var Bd=Pd.getRange(ld(Md.line,Md.ch-1),ld(Md.line,Md.ch+1));return Bd.length==2?Bd:null}function Fd(Pd,Md){var Bd=Pd.getTokenAt(ld(Md.line,Md.ch+1));return/ \b string/.test(Bd.type)&&Bd.start==Md.ch&&(Md.ch==0||!/ \b string/.test(Pd.getTokenTypeAt(Md)))}})})();(function(Ra,qa){(function(nd){nd(requireCodemirror())})(function(nd){var od=/MSIE \d /.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),ld=nd.Pos,ud={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function cd(Ad){return Ad&&Ad.bracketRegex||/[(){}[ \] ]/}function dd(Ad,Nd,Id){var Od=Ad.getLineHandle(Nd.line),Fd=Nd.ch-1,Pd=Id&&Id.afterCursor;Pd==null&&(Pd=/(^| )cm-fat-cursor( $ | )/.test(Ad.getWrapperElement().className));var Md=cd(Id),Bd=!Pd&&Fd>=0&&Md.test(Od.text.charAt(Fd))&&ud[Od.text.charAt(Fd)]||Md.test(Od.text.charAt(Fd+1))&&ud[Od.text.charAt(++Fd)];if(!Bd)return null;var jd=Bd.charAt(1)==">"?1:-1;if(Id&&Id.strict&&jd>0!=(Fd==Nd.ch))return null;var Hd=Ad.getTokenTypeAt(ld(Nd.line,Fd+1)),Gd=pd(Ad,ld(Nd.line,Fd+(jd>0?1:0)),jd,Hd,Id);return Gd==null?null:{from:ld(Nd.line,Fd),to:Gd&&Gd.pos,match:Gd&&Gd.ch==Bd.charAt(0),forward:jd>0}}function pd(Ad,Nd,Id,Od,Fd){for(var Pd=Fd&&Fd.maxScanLineLength||1e4,Md=Fd&&Fd.maxScanLines||1e3,Bd=[],jd=cd(Fd),Hd=Id>0?Math.min(Nd.line+Md,Ad.lastLine()+1):Math.max(Ad.firstLine()-1,Nd.line-Md),Gd=Nd.line;Gd!=Hd;Gd+=Id){var zd=Ad.getLine(Gd);if(zd){var df=Id>0?0:zd.length-1,Wd=Id>0?zd.length:-1;if(!(zd.length>Pd))for(Gd==Nd.line&&(df=Nd.ch-(Id<0?1:0));df!=Wd;df+=Id){var Jd=zd.charAt(df);if(jd.test(Jd)&&(Od===void 0||(Ad.getTokenTypeAt(ld(Gd,df+1))||"")==(Od||""))){var Xd=ud[Jd];if(Xd&&Xd.charAt(1)==">"==Id>0)Bd.push(Jd);else if(Bd.length)Bd.pop();else return{pos:ld(Gd,df),ch:Jd}}}}}return Gd-Id==(Id>0?Ad.lastLine():Ad.firstLine())?!1:null}function fd(Ad,Nd,Id){for(var Od=Ad.state.matchBrackets.maxHighlightLineLength||1e3,Fd=Id&&Id.highlightNonMatching,Pd=[],Md=Ad.listSelections(