rapidoc-min.js 843 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915
  1. /*! RapiDoc 9.3.8 | Author - Mrinmoy Majumdar | License information can be found in rapidoc-min.js.LICENSE.txt */
  2. (()=>{var e,t,r={557:(e,t,r)=>{"use strict";const s=globalThis,n=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),o=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(n&&void 0===e){const r=void 0!==t&&1===t.length;r&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&o.set(t,e))}return e}toString(){return this.cssText}}const l=e=>new a("string"==typeof e?e:e+"",void 0,i),c=(e,...t)=>{const r=1===e.length?e[0]:t.reduce(((t,r,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[s+1]),e[0]);return new a(r,e,i)},p=(e,t)=>{if(n)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const r of t){const t=document.createElement("style"),n=s.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}},u=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:d,defineProperty:h,getOwnPropertyDescriptor:m,getOwnPropertyNames:f,getOwnPropertySymbols:g,getPrototypeOf:y}=Object,v=globalThis,b=v.trustedTypes,x=b?b.emptyScript:"",w=v.reactiveElementPolyfillSupport,$=(e,t)=>e,S={toAttribute(e,t){switch(t){case Boolean:e=e?x:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},E=(e,t)=>!d(e,t),k={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:E};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=k){if(t.state&&(t.attribute=!1),this._$Ei(),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),s=this.getPropertyDescriptor(e,r,t);void 0!==s&&h(this.prototype,e,s)}}static getPropertyDescriptor(e,t,r){const{get:s,set:n}=m(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get(){return s?.call(this)},set(t){const i=s?.call(this);n.call(this,t),this.requestUpdate(e,i,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}static _$Ei(){if(this.hasOwnProperty($("elementProperties")))return;const e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty($("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty($("properties"))){const e=this.properties,t=[...f(e),...g(e)];for(const r of t)this.createProperty(r,e[r])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,r]of t)this.elementProperties.set(e,r)}this._$Eh=new Map;for(const[e,t]of this.elementProperties){const r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const e of r)t.unshift(u(e))}else void 0!==e&&t.push(u(e));return t}static _$Eu(e,t){const r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return p(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$EC(e,t){const r=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,r);if(void 0!==s&&!0===r.reflect){const n=(void 0!==r.converter?.toAttribute?r.converter:S).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(s):this.setAttribute(s,n),this._$Em=null}}_$AK(e,t){const r=this.constructor,s=r._$Eh.get(e);if(void 0!==s&&this._$Em!==s){const e=r.getPropertyOptions(s),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:S;this._$Em=s,this[s]=n.fromAttribute(t,e.type),this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){if(r??=this.constructor.getPropertyOptions(e),!(r.hasChanged??E)(this[e],t))return;this.P(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(e,t,r){this._$AL.has(e)||this._$AL.set(e,t),!0===r.reflect&&this._$Em!==e&&(this._$Ej??=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,r]of e)!0!==r.wrapped||this._$AL.has(t)||void 0===this[t]||this.P(t,this[t],r)}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&=this._$Ej.forEach((e=>this._$EC(e,this[e]))),this._$EU()}updated(e){}firstUpdated(e){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[$("elementProperties")]=new Map,A[$("finalized")]=new Map,w?.({ReactiveElement:A}),(v.reactiveElementVersions??=[]).push("2.0.4");const O=globalThis,j=O.trustedTypes,T=j?j.createPolicy("lit-html",{createHTML:e=>e}):void 0,P="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,I="?"+C,_=`<${I}>`,R=document,F=()=>R.createComment(""),M=e=>null===e||"object"!=typeof e&&"function"!=typeof e,L=Array.isArray,D=e=>L(e)||"function"==typeof e?.[Symbol.iterator],B="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,U=/>/g,z=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,V=/"/g,W=/^(?:script|style|textarea|title)$/i,G=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),J=G(1),K=(G(2),G(3),Symbol.for("lit-noChange")),Y=Symbol.for("lit-nothing"),X=new WeakMap,Z=R.createTreeWalker(R,129);function Q(e,t){if(!L(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(t):t}const ee=(e,t)=>{const r=e.length-1,s=[];let n,i=2===t?"<svg>":3===t?"<math>":"",o=q;for(let t=0;t<r;t++){const r=e[t];let a,l,c=-1,p=0;for(;p<r.length&&(o.lastIndex=p,l=o.exec(r),null!==l);)p=o.lastIndex,o===q?"!--"===l[1]?o=N:void 0!==l[1]?o=U:void 0!==l[2]?(W.test(l[2])&&(n=RegExp("</"+l[2],"g")),o=z):void 0!==l[3]&&(o=z):o===z?">"===l[0]?(o=n??q,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?z:'"'===l[3]?V:H):o===V||o===H?o=z:o===N||o===U?o=q:(o=z,n=void 0);const u=o===z&&e[t+1].startsWith("/>")?" ":"";i+=o===q?r+_:c>=0?(s.push(a),r.slice(0,c)+P+r.slice(c)+C+u):r+C+(-2===c?t:u)}return[Q(e,i+(e[r]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]};class te{constructor({strings:e,_$litType$:t},r){let s;this.parts=[];let n=0,i=0;const o=e.length-1,a=this.parts,[l,c]=ee(e,t);if(this.el=te.createElement(l,r),Z.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=Z.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(P)){const t=c[i++],r=s.getAttribute(e).split(C),o=/([.?@])?(.*)/.exec(t);a.push({type:1,index:n,name:o[2],strings:r,ctor:"."===o[1]?oe:"?"===o[1]?ae:"@"===o[1]?le:ie}),s.removeAttribute(e)}else e.startsWith(C)&&(a.push({type:6,index:n}),s.removeAttribute(e));if(W.test(s.tagName)){const e=s.textContent.split(C),t=e.length-1;if(t>0){s.textContent=j?j.emptyScript:"";for(let r=0;r<t;r++)s.append(e[r],F()),Z.nextNode(),a.push({type:2,index:++n});s.append(e[t],F())}}}else if(8===s.nodeType)if(s.data===I)a.push({type:2,index:n});else{let e=-1;for(;-1!==(e=s.data.indexOf(C,e+1));)a.push({type:7,index:n}),e+=C.length-1}n++}}static createElement(e,t){const r=R.createElement("template");return r.innerHTML=e,r}}function re(e,t,r=e,s){if(t===K)return t;let n=void 0!==s?r.o?.[s]:r.l;const i=M(t)?void 0:t._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),void 0===i?n=void 0:(n=new i(e),n._$AT(e,r,s)),void 0!==s?(r.o??=[])[s]=n:r.l=n),void 0!==n&&(t=re(e,n._$AS(e,t.values),n,s)),t}class se{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,s=(e?.creationScope??R).importNode(t,!0);Z.currentNode=s;let n=Z.nextNode(),i=0,o=0,a=r[0];for(;void 0!==a;){if(i===a.index){let t;2===a.type?t=new ne(n,n.nextSibling,this,e):1===a.type?t=new a.ctor(n,a.name,a.strings,this,e):6===a.type&&(t=new ce(n,this,e)),this._$AV.push(t),a=r[++o]}i!==a?.index&&(n=Z.nextNode(),i++)}return Z.currentNode=R,s}p(e){let t=0;for(const r of this._$AV)void 0!==r&&(void 0!==r.strings?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class ne{get _$AU(){return this._$AM?._$AU??this.v}constructor(e,t,r,s){this.type=2,this._$AH=Y,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=s,this.v=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=re(this,e,t),M(e)?e===Y||null==e||""===e?(this._$AH!==Y&&this._$AR(),this._$AH=Y):e!==this._$AH&&e!==K&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):D(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==Y&&M(this._$AH)?this._$AA.nextSibling.data=e:this.T(R.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,s="number"==typeof r?this._$AC(e):(void 0===r.el&&(r.el=te.createElement(Q(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(t);else{const e=new se(s,this),r=e.u(this.options);e.p(t),this.T(r),this._$AH=e}}_$AC(e){let t=X.get(e.strings);return void 0===t&&X.set(e.strings,t=new te(e)),t}k(e){L(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,s=0;for(const n of e)s===t.length?t.push(r=new ne(this.O(F()),this.O(F()),this,this.options)):r=t[s],r._$AI(n),s++;s<t.length&&(this._$AR(r&&r._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this.v=e,this._$AP?.(e))}}class ie{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,s,n){this.type=1,this._$AH=Y,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Y}_$AI(e,t=this,r,s){const n=this.strings;let i=!1;if(void 0===n)e=re(this,e,t,0),i=!M(e)||e!==this._$AH&&e!==K,i&&(this._$AH=e);else{const s=e;let o,a;for(e=n[0],o=0;o<n.length-1;o++)a=re(this,s[r+o],t,o),a===K&&(a=this._$AH[o]),i||=!M(a)||a!==this._$AH[o],a===Y?e=Y:e!==Y&&(e+=(a??"")+n[o+1]),this._$AH[o]=a}i&&!s&&this.j(e)}j(e){e===Y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class oe extends ie{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Y?void 0:e}}class ae extends ie{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Y)}}class le extends ie{constructor(e,t,r,s,n){super(e,t,r,s,n),this.type=5}_$AI(e,t=this){if((e=re(this,e,t,0)??Y)===K)return;const r=this._$AH,s=e===Y&&r!==Y||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,n=e!==Y&&(r===Y||s);s&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class ce{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){re(this,e)}}const pe={M:P,P:C,A:I,C:1,L:ee,R:se,D,V:re,I:ne,H:ie,N:ae,U:le,B:oe,F:ce},ue=O.litHtmlPolyfillSupport;ue?.(te,ne),(O.litHtmlVersions??=[]).push("3.2.0");class de extends A{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=((e,t,r)=>{const s=r?.renderBefore??t;let n=s._$litPart$;if(void 0===n){const e=r?.renderBefore??null;s._$litPart$=n=new ne(t.insertBefore(F(),e),e,void 0,r??{})}return n._$AI(e),n})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return K}}de._$litElement$=!0,de.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:de});const he=globalThis.litElementPolyfillSupport;he?.({LitElement:de});function me(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}(globalThis.litElementVersions??=[]).push("4.1.0");let fe={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const ge=/[&<>"']/,ye=new RegExp(ge.source,"g"),ve=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,be=new RegExp(ve.source,"g"),xe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we=e=>xe[e];function $e(e,t){if(t){if(ge.test(e))return e.replace(ye,we)}else if(ve.test(e))return e.replace(be,we);return e}const Se=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Ee(e){return e.replace(Se,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const ke=/(^|[^\[])\^/g;function Ae(e,t){e="string"==typeof e?e:e.source,t=t||"";const r={replace:(t,s)=>(s=(s=s.source||s).replace(ke,"$1"),e=e.replace(t,s),r),getRegex:()=>new RegExp(e,t)};return r}const Oe=/[^\w:]/g,je=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Te(e,t,r){if(e){let e;try{e=decodeURIComponent(Ee(r)).replace(Oe,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!je.test(r)&&(r=function(e,t){Pe[" "+e]||(Ce.test(e)?Pe[" "+e]=e+"/":Pe[" "+e]=Me(e,"/",!0));e=Pe[" "+e];const r=-1===e.indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(Ie,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(_e,"$1")+t:e+t}(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r}const Pe={},Ce=/^[^:]+:\/*[^/]*$/,Ie=/^([^:]+:)[\s\S]*$/,_e=/^([^:]+:\/*[^/]*)[\s\S]*$/;const Re={exec:function(){}};function Fe(e,t){const r=e.replace(/\|/g,((e,t,r)=>{let s=!1,n=t;for(;--n>=0&&"\\"===r[n];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(/\\\|/g,"|");return r}function Me(e,t,r){const s=e.length;if(0===s)return"";let n=0;for(;n<s;){const i=e.charAt(s-n-1);if(i!==t||r){if(i===t||!r)break;n++}else n++}return e.slice(0,s-n)}function Le(e,t){if(t<1)return"";let r="";for(;t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function De(e,t,r,s){const n=t.href,i=t.title?$e(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:r,href:n,title:i,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,e}return{type:"image",raw:r,href:n,title:i,text:$e(o)}}class Be{constructor(e){this.options=e||fe}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Me(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],r=function(e,t){const r=e.match(/^(\s+)(?:```)/);if(null===r)return t;const s=r[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[r]=t;return r.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Me(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),r=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(e);return this.lexer.state.top=r,{type:"blockquote",raw:t[0],tokens:s,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r,s,n,i,o,a,l,c,p,u,d,h,m=t[1].trim();const f=m.length>1,g={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const y=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=y.exec(e))&&!this.rules.block.hr.test(e);){if(r=t[0],e=e.substring(r.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),p=e.split("\n",1)[0],this.options.pedantic?(i=2,d=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,d=c.slice(i),i+=t[1].length),a=!1,!c&&/^ *$/.test(p)&&(r+=p+"\n",e=e.substring(p.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),s=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),n=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,i-1)}}#`);for(;e&&(u=e.split("\n",1)[0],p=u,this.options.pedantic&&(p=p.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!n.test(p))&&!o.test(p)&&!t.test(p)&&!s.test(e);){if(p.search(/[^ ]/)>=i||!p.trim())d+="\n"+p.slice(i);else{if(a)break;if(c.search(/[^ ]/)>=4)break;if(n.test(c))break;if(o.test(c))break;if(s.test(c))break;d+="\n"+p}a||p.trim()||(a=!0),r+=u+"\n",e=e.substring(u.length+1),c=p.slice(i)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(r)&&(l=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(d),s&&(n="[ ] "!==s[0],d=d.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:r,task:!!s,checked:n,loose:!1,text:d}),g.raw+=r}g.items[g.items.length-1].raw=r.trimRight(),g.items[g.items.length-1].text=d.trimRight(),g.raw=g.raw.trimRight();const v=g.items.length;for(o=0;o<v;o++)if(this.lexer.state.top=!1,g.items[o].tokens=this.lexer.blockTokens(g.items[o].text,[]),!g.loose){const e=g.items[o].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));g.loose=t}if(g.loose)for(o=0;o<v;o++)g.items[o].loose=!0;return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const r=this.options.sanitizer?this.options.sanitizer(t[0]):$e(t[0]);e.type="paragraph",e.text=r,e.tokens=this.lexer.inline(r)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:r,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Fe(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let r,s,n,i,o=e.align.length;for(r=0;r<o;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(o=e.rows.length,r=0;r<o;r++)e.rows[r]=Fe(e.rows[r],e.header.length).map((e=>({text:e})));for(o=e.header.length,s=0;s<o;s++)e.header[s].tokens=this.lexer.inline(e.header[s].text);for(o=e.rows.length,s=0;s<o;s++)for(i=e.rows[s],n=0;n<i.length;n++)i[n].tokens=this.lexer.inline(i[n].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:$e(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):$e(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=Me(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const r=e.length;let s=0,n=0;for(;n<r;n++)if("\\"===e[n])n++;else if(e[n]===t[0])s++;else if(e[n]===t[1]&&(s--,s<0))return n;return-1}(t[2],"()");if(e>-1){const r=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);e&&(r=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),/^</.test(r)&&(r=this.options.pedantic&&!/>$/.test(e)?r.slice(1):r.slice(1,-1)),De(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0],this.lexer)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let e=(r[2]||r[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=r[0].charAt(0);return{type:"text",raw:e,text:e}}return De(r,e,r[0],this.lexer)}}emStrong(e,t,r=""){let s=this.rules.inline.emStrong.lDelim.exec(e);if(!s)return;if(s[3]&&r.match(/[\p{L}\p{N}]/u))return;const n=s[1]||s[2]||"";if(!n||n&&(""===r||this.rules.inline.punctuation.exec(r))){const r=s[0].length-1;let n,i,o=r,a=0;const l="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+r);null!=(s=l.exec(t));){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(i=n.length,s[3]||s[4]){o+=i;continue}if((s[5]||s[6])&&r%3&&!((r+i)%3)){a+=i;continue}if(o-=i,o>0)continue;i=Math.min(i,i+o+a);const t=e.slice(0,r+s.index+(s[0].length-n.length)+i);if(Math.min(r,i)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const r=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return r&&s&&(e=e.substring(1,e.length-1)),e=$e(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const r=this.rules.inline.autolink.exec(e);if(r){let e,s;return"@"===r[2]?(e=$e(this.options.mangle?t(r[1]):r[1]),s="mailto:"+e):(e=$e(r[1]),s=e),{type:"link",raw:r[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let r;if(r=this.rules.inline.url.exec(e)){let e,s;if("@"===r[2])e=$e(this.options.mangle?t(r[0]):r[0]),s="mailto:"+e;else{let t;do{t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(t!==r[0]);e=$e(r[0]),s="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const r=this.rules.inline.text.exec(e);if(r){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):$e(r[0]):r[0]:$e(this.options.smartypants?t(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}const qe={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Re,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};qe.def=Ae(qe.def).replace("label",qe._label).replace("title",qe._title).getRegex(),qe.bullet=/(?:[*+-]|\d{1,9}[.)])/,qe.listItemStart=Ae(/^( *)(bull) */).replace("bull",qe.bullet).getRegex(),qe.list=Ae(qe.list).replace(/bull/g,qe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+qe.def.source+")").getRegex(),qe._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",qe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,qe.html=Ae(qe.html,"i").replace("comment",qe._comment).replace("tag",qe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qe.paragraph=Ae(qe._paragraph).replace("hr",qe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qe._tag).getRegex(),qe.blockquote=Ae(qe.blockquote).replace("paragraph",qe.paragraph).getRegex(),qe.normal={...qe},qe.gfm={...qe.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},qe.gfm.table=Ae(qe.gfm.table).replace("hr",qe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qe._tag).getRegex(),qe.gfm.paragraph=Ae(qe._paragraph).replace("hr",qe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",qe.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",qe._tag).getRegex(),qe.pedantic={...qe.normal,html:Ae("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",qe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Re,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ae(qe.normal._paragraph).replace("hr",qe.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",qe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Ne={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Re,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Re,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function Ue(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function ze(e){let t,r,s="";const n=e.length;for(t=0;t<n;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),s+="&#"+r+";";return s}Ne._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Ne.punctuation=Ae(Ne.punctuation).replace(/punctuation/g,Ne._punctuation).getRegex(),Ne.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Ne.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Ne._comment=Ae(qe._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Ne.emStrong.lDelim=Ae(Ne.emStrong.lDelim).replace(/punct/g,Ne._punctuation).getRegex(),Ne.emStrong.rDelimAst=Ae(Ne.emStrong.rDelimAst,"g").replace(/punct/g,Ne._punctuation).getRegex(),Ne.emStrong.rDelimUnd=Ae(Ne.emStrong.rDelimUnd,"g").replace(/punct/g,Ne._punctuation).getRegex(),Ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Ne._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])?)+(?![-_])/,Ne.autolink=Ae(Ne.autolink).replace("scheme",Ne._scheme).replace("email",Ne._email).getRegex(),Ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Ne.tag=Ae(Ne.tag).replace("comment",Ne._comment).replace("attribute",Ne._attribute).getRegex(),Ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Ne._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Ne.link=Ae(Ne.link).replace("label",Ne._label).replace("href",Ne._href).replace("title",Ne._title).getRegex(),Ne.reflink=Ae(Ne.reflink).replace("label",Ne._label).replace("ref",qe._label).getRegex(),Ne.nolink=Ae(Ne.nolink).replace("ref",qe._label).getRegex(),Ne.reflinkSearch=Ae(Ne.reflinkSearch,"g").replace("reflink",Ne.reflink).replace("nolink",Ne.nolink).getRegex(),Ne.normal={...Ne},Ne.pedantic={...Ne.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Ne._label).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ne._label).getRegex()},Ne.gfm={...Ne.normal,escape:Ae(Ne.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Ne.gfm.url=Ae(Ne.gfm.url,"i").replace("email",Ne.gfm._extended_email).getRegex(),Ne.breaks={...Ne.gfm,br:Ae(Ne.br).replace("{2,}","*").getRegex(),text:Ae(Ne.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class He{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||fe,this.options.tokenizer=this.options.tokenizer||new Be,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:qe.normal,inline:Ne.normal};this.options.pedantic?(t.block=qe.pedantic,t.inline=Ne.pedantic):this.options.gfm&&(t.block=qe.gfm,this.options.breaks?t.inline=Ne.breaks:t.inline=Ne.gfm),this.tokenizer.rules=t}static get rules(){return{block:qe,inline:Ne}}static lex(e,t){return new He(t).lex(e)}static lexInline(e,t){return new He(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let r,s,n,i;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,r)=>t+" ".repeat(r.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((s=>!!(r=s.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),1===r.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(r);else if(r=this.tokenizer.code(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(r):(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.list(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.def(e))e=e.substring(r.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(s.raw+="\n"+r.raw,s.text+="\n"+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else{if(n=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const r=e.slice(1);let s;this.options.extensions.startBlock.forEach((function(e){s=e.call({lexer:this},r),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(n)))s=t[t.length-1],i&&"paragraph"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r),i=n.length!==e.length,e=e.substring(r.raw.length);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+r.raw,s.text+="\n"+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let r,s,n,i,o,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+Le("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,i.index)+"["+Le("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,i.index+i[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(o||(a=""),o=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>!!(r=s.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))))if(r=this.tokenizer.escape(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.tag(e))e=e.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);else if(r=this.tokenizer.link(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(r.raw.length),s=t[t.length-1],s&&"text"===r.type&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);else if(r=this.tokenizer.emStrong(e,l,a))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.codespan(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.br(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.del(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.autolink(e,ze))e=e.substring(r.raw.length),t.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(e,ze))){if(n=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const r=e.slice(1);let s;this.options.extensions.startInline.forEach((function(e){s=e.call({lexer:this},r),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(n=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(n,Ue))e=e.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),o=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=r.raw,s.text+=r.text):t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(r.raw.length),t.push(r);return t}}class Ve{constructor(e){this.options=e||fe}code(e,t,r){const s=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,s);null!=t&&t!==e&&(r=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",s?'<pre><code class="'+this.options.langPrefix+$e(s)+'">'+(r?e:$e(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:$e(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,r,s){if(this.options.headerIds){return`<h${t} id="${this.options.headerPrefix+s.slug(r)}">${e}</h${t}>\n`}return`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,r){const s=t?"ol":"ul";return"<"+s+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+s+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,r){if(null===(e=Te(this.options.sanitize,this.options.baseUrl,e)))return r;let s='<a href="'+e+'"';return t&&(s+=' title="'+t+'"'),s+=">"+r+"</a>",s}image(e,t,r){if(null===(e=Te(this.options.sanitize,this.options.baseUrl,e)))return r;let s=`<img src="${e}" alt="${r}"`;return t&&(s+=` title="${t}"`),s+=this.options.xhtml?"/>":">",s}text(e){return e}}class We{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,r){return""+r}image(e,t,r){return""+r}br(){return""}}class Ge{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let r=e,s=0;if(this.seen.hasOwnProperty(r)){s=this.seen[e];do{s++,r=e+"-"+s}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=s,this.seen[r]=0),r}slug(e,t={}){const r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)}}class Je{constructor(e){this.options=e||fe,this.options.renderer=this.options.renderer||new Ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new We,this.slugger=new Ge}static parse(e,t){return new Je(t).parse(e)}static parseInline(e,t){return new Je(t).parseInline(e)}parse(e,t=!0){let r,s,n,i,o,a,l,c,p,u,d,h,m,f,g,y,v,b,x,w="";const $=e.length;for(r=0;r<$;r++)if(u=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[u.type]&&(x=this.options.extensions.renderers[u.type].call({parser:this},u),!1!==x||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)))w+=x||"";else switch(u.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(u.tokens),u.depth,Ee(this.parseInline(u.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(u.text,u.lang,u.escaped);continue;case"table":for(c="",l="",i=u.header.length,s=0;s<i;s++)l+=this.renderer.tablecell(this.parseInline(u.header[s].tokens),{header:!0,align:u.align[s]});for(c+=this.renderer.tablerow(l),p="",i=u.rows.length,s=0;s<i;s++){for(a=u.rows[s],l="",o=a.length,n=0;n<o;n++)l+=this.renderer.tablecell(this.parseInline(a[n].tokens),{header:!1,align:u.align[n]});p+=this.renderer.tablerow(l)}w+=this.renderer.table(c,p);continue;case"blockquote":p=this.parse(u.tokens),w+=this.renderer.blockquote(p);continue;case"list":for(d=u.ordered,h=u.start,m=u.loose,i=u.items.length,p="",s=0;s<i;s++)g=u.items[s],y=g.checked,v=g.task,f="",g.task&&(b=this.renderer.checkbox(y),m?g.tokens.length>0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):f+=b),f+=this.parse(g.tokens,m),p+=this.renderer.listitem(f,v,y);w+=this.renderer.list(p,d,h);continue;case"html":w+=this.renderer.html(u.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(u.tokens));continue;case"text":for(p=u.tokens?this.parseInline(u.tokens):u.text;r+1<$&&"text"===e[r+1].type;)u=e[++r],p+="\n"+(u.tokens?this.parseInline(u.tokens):u.text);w+=t?this.renderer.paragraph(p):p;continue;default:{const e='Token with "'+u.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return w}parseInline(e,t){t=t||this.renderer;let r,s,n,i="";const o=e.length;for(r=0;r<o;r++)if(s=e[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(n=this.options.extensions.renderers[s.type].call({parser:this},s),!1!==n||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)))i+=n||"";else switch(s.type){case"escape":case"text":i+=t.text(s.text);break;case"html":i+=t.html(s.text);break;case"link":i+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break;case"image":i+=t.image(s.href,s.title,s.text);break;case"strong":i+=t.strong(this.parseInline(s.tokens,t));break;case"em":i+=t.em(this.parseInline(s.tokens,t));break;case"codespan":i+=t.codespan(s.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(s.tokens,t));break;default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}class Ke{constructor(e){this.options=e||fe}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(e){return e}postprocess(e){return e}}function Ye(e,t){return(r,s,n)=>{"function"==typeof s&&(n=s,s=null);const i={...s},o=function(e,t,r){return s=>{if(s.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+$e(s.message+"",!0)+"</pre>";return t?Promise.resolve(e):r?void r(null,e):e}if(t)return Promise.reject(s);if(!r)throw s;r(s)}}((s={...Xe.defaults,...i}).silent,s.async,n);if(null==r)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}(s),s.hooks&&(s.hooks.options=s),n){const i=s.highlight;let a;try{s.hooks&&(r=s.hooks.preprocess(r)),a=e(r,s)}catch(e){return o(e)}const l=function(e){let r;if(!e)try{s.walkTokens&&Xe.walkTokens(a,s.walkTokens),r=t(a,s),s.hooks&&(r=s.hooks.postprocess(r))}catch(t){e=t}return s.highlight=i,e?o(e):n(null,r)};if(!i||i.length<3)return l();if(delete s.highlight,!a.length)return l();let c=0;return Xe.walkTokens(a,(function(e){"code"===e.type&&(c++,setTimeout((()=>{i(e.text,e.lang,(function(t,r){if(t)return l(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),c--,0===c&&l()}))}),0))})),void(0===c&&l())}if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then((t=>e(t,s))).then((e=>s.walkTokens?Promise.all(Xe.walkTokens(e,s.walkTokens)).then((()=>e)):e)).then((e=>t(e,s))).then((e=>s.hooks?s.hooks.postprocess(e):e)).catch(o);try{s.hooks&&(r=s.hooks.preprocess(r));const n=e(r,s);s.walkTokens&&Xe.walkTokens(n,s.walkTokens);let i=t(n,s);return s.hooks&&(i=s.hooks.postprocess(i)),i}catch(e){return o(e)}}}function Xe(e,t,r){return Ye(He.lex,Je.parse)(e,t,r)}Xe.options=Xe.setOptions=function(e){var t;return Xe.defaults={...Xe.defaults,...e},t=Xe.defaults,fe=t,Xe},Xe.getDefaults=me,Xe.defaults=fe,Xe.use=function(...e){const t=Xe.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const r={...e};if(r.async=Xe.defaults.async||r.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const r=t.renderers[e.name];t.renderers[e.name]=r?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=r.apply(this,t)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),r.extensions=t),e.renderer){const t=Xe.defaults.renderer||new Ve;for(const r in e.renderer){const s=t[r];t[r]=(...n)=>{let i=e.renderer[r].apply(t,n);return!1===i&&(i=s.apply(t,n)),i}}r.renderer=t}if(e.tokenizer){const t=Xe.defaults.tokenizer||new Be;for(const r in e.tokenizer){const s=t[r];t[r]=(...n)=>{let i=e.tokenizer[r].apply(t,n);return!1===i&&(i=s.apply(t,n)),i}}r.tokenizer=t}if(e.hooks){const t=Xe.defaults.hooks||new Ke;for(const r in e.hooks){const s=t[r];Ke.passThroughHooks.has(r)?t[r]=n=>{if(Xe.defaults.async)return Promise.resolve(e.hooks[r].call(t,n)).then((e=>s.call(t,e)));const i=e.hooks[r].call(t,n);return s.call(t,i)}:t[r]=(...n)=>{let i=e.hooks[r].apply(t,n);return!1===i&&(i=s.apply(t,n)),i}}r.hooks=t}if(e.walkTokens){const t=Xe.defaults.walkTokens;r.walkTokens=function(r){let s=[];return s.push(e.walkTokens.call(this,r)),t&&(s=s.concat(t.call(this,r))),s}}Xe.setOptions(r)}))},Xe.walkTokens=function(e,t){let r=[];for(const s of e)switch(r=r.concat(t.call(Xe,s)),s.type){case"table":for(const e of s.header)r=r.concat(Xe.walkTokens(e.tokens,t));for(const e of s.rows)for(const s of e)r=r.concat(Xe.walkTokens(s.tokens,t));break;case"list":r=r.concat(Xe.walkTokens(s.items,t));break;default:Xe.defaults.extensions&&Xe.defaults.extensions.childTokens&&Xe.defaults.extensions.childTokens[s.type]?Xe.defaults.extensions.childTokens[s.type].forEach((function(e){r=r.concat(Xe.walkTokens(s[e],t))})):s.tokens&&(r=r.concat(Xe.walkTokens(s.tokens,t)))}return r},Xe.parseInline=Ye(He.lexInline,Je.parseInline),Xe.Parser=Je,Xe.parser=Je.parse,Xe.Renderer=Ve,Xe.TextRenderer=We,Xe.Lexer=He,Xe.lexer=He.lex,Xe.Tokenizer=Be,Xe.Slugger=Ge,Xe.Hooks=Ke,Xe.parse=Xe;Xe.options,Xe.setOptions,Xe.use,Xe.walkTokens,Xe.parseInline,Je.parse,He.lex;var Ze=r(848),Qe=r.n(Ze);r(113),r(83),r(378),r(976),r(514),r(22),r(342),r(784),r(651);const et=c`
  3. .hover-bg:hover {
  4. background: var(--bg3);
  5. }
  6. ::selection {
  7. background: var(--selection-bg);
  8. color: var(--selection-fg);
  9. }
  10. .regular-font {
  11. font-family:var(--font-regular);
  12. }
  13. .mono-font {
  14. font-family:var(--font-mono);
  15. }
  16. .title {
  17. font-size: calc(var(--font-size-small) + 18px);
  18. font-weight: normal
  19. }
  20. .sub-title{ font-size: 20px; }
  21. .req-res-title {
  22. font-family: var(--font-regular);
  23. font-size: calc(var(--font-size-small) + 4px);
  24. font-weight:bold;
  25. margin-bottom:8px;
  26. text-align:left;
  27. }
  28. .tiny-title {
  29. font-size:calc(var(--font-size-small) + 1px);
  30. font-weight:bold;
  31. }
  32. .regular-font-size { font-size: var(--font-size-regular); }
  33. .small-font-size { font-size: var(--font-size-small); }
  34. .upper { text-transform: uppercase; }
  35. .primary-text { color: var(--primary-color); }
  36. .bold-text { font-weight:bold; }
  37. .gray-text { color: var(--light-fg); }
  38. .red-text { color: var(--red) }
  39. .blue-text { color: var(--blue) }
  40. .multiline {
  41. overflow: scroll;
  42. max-height: var(--resp-area-height, 400px);
  43. color: var(--fg3);
  44. }
  45. .method-fg.put { color: var(--orange); }
  46. .method-fg.post { color: var(--green); }
  47. .method-fg.get { color: var(--blue); }
  48. .method-fg.delete { color: var(--red); }
  49. .method-fg.options,
  50. .method-fg.head,
  51. .method-fg.patch {
  52. color: var(--yellow);
  53. }
  54. h1 { font-family:var(--font-regular); font-size:28px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  55. h2 { font-family:var(--font-regular); font-size:24px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  56. h3 { font-family:var(--font-regular); font-size:18px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  57. h4 { font-family:var(--font-regular); font-size:16px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  58. h5 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  59. h6 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
  60. h1,h2,h3,h4,h5,h5 {
  61. margin-block-end: 0.2em;
  62. }
  63. p { margin-block-start: 0.5em; }
  64. a { color: var(--blue); cursor:pointer; }
  65. a.inactive-link {
  66. color:var(--fg);
  67. text-decoration: none;
  68. cursor:text;
  69. }
  70. code,
  71. pre {
  72. margin: 0px;
  73. font-family: var(--font-mono);
  74. font-size: calc(var(--font-size-mono) - 1px);
  75. }
  76. .m-markdown,
  77. .m-markdown-small {
  78. display:block;
  79. }
  80. .m-markdown p,
  81. .m-markdown span {
  82. font-size: var(--font-size-regular);
  83. line-height:calc(var(--font-size-regular) + 8px);
  84. }
  85. .m-markdown li {
  86. font-size: var(--font-size-regular);
  87. line-height:calc(var(--font-size-regular) + 10px);
  88. }
  89. .m-markdown-small p,
  90. .m-markdown-small span,
  91. .m-markdown-small li {
  92. font-size: var(--font-size-small);
  93. line-height: calc(var(--font-size-small) + 6px);
  94. }
  95. .m-markdown-small li {
  96. line-height: calc(var(--font-size-small) + 8px);
  97. }
  98. .m-markdown p:not(:first-child) {
  99. margin-block-start: 24px;
  100. }
  101. .m-markdown-small p:not(:first-child) {
  102. margin-block-start: 12px;
  103. }
  104. .m-markdown-small p:first-child {
  105. margin-block-start: 0;
  106. }
  107. .m-markdown p,
  108. .m-markdown-small p {
  109. margin-block-end: 0
  110. }
  111. .m-markdown code span {
  112. font-size:var(--font-size-mono);
  113. }
  114. .m-markdown-small code,
  115. .m-markdown code {
  116. padding: 1px 6px;
  117. border-radius: 2px;
  118. color: var(--inline-code-fg);
  119. background-color: var(--bg3);
  120. font-size: calc(var(--font-size-mono));
  121. line-height: 1.2;
  122. }
  123. .m-markdown-small code {
  124. font-size: calc(var(--font-size-mono) - 1px);
  125. }
  126. .m-markdown-small pre,
  127. .m-markdown pre {
  128. white-space: pre-wrap;
  129. overflow-x: auto;
  130. line-height: normal;
  131. border-radius: 2px;
  132. border: 1px solid var(--code-border-color);
  133. }
  134. .m-markdown pre {
  135. padding: 12px;
  136. background-color: var(--code-bg);
  137. color:var(--code-fg);
  138. }
  139. .m-markdown-small pre {
  140. margin-top: 4px;
  141. padding: 2px 4px;
  142. background-color: var(--bg3);
  143. color: var(--fg2);
  144. }
  145. .m-markdown-small pre code,
  146. .m-markdown pre code {
  147. border:none;
  148. padding:0;
  149. }
  150. .m-markdown pre code {
  151. color: var(--code-fg);
  152. background-color: var(--code-bg);
  153. background-color: transparent;
  154. }
  155. .m-markdown-small pre code {
  156. color: var(--fg2);
  157. background-color: var(--bg3);
  158. }
  159. .m-markdown ul,
  160. .m-markdown ol {
  161. padding-inline-start: 30px;
  162. }
  163. .m-markdown-small ul,
  164. .m-markdown-small ol {
  165. padding-inline-start: 20px;
  166. }
  167. .m-markdown-small a,
  168. .m-markdown a {
  169. color:var(--blue);
  170. }
  171. .m-markdown-small img,
  172. .m-markdown img {
  173. max-width: 100%;
  174. }
  175. /* Markdown table */
  176. .m-markdown-small table,
  177. .m-markdown table {
  178. border-spacing: 0;
  179. margin: 10px 0;
  180. border-collapse: separate;
  181. border: 1px solid var(--border-color);
  182. border-radius: var(--border-radius);
  183. font-size: calc(var(--font-size-small) + 1px);
  184. line-height: calc(var(--font-size-small) + 4px);
  185. max-width: 100%;
  186. }
  187. .m-markdown-small table {
  188. font-size: var(--font-size-small);
  189. line-height: calc(var(--font-size-small) + 2px);
  190. margin: 8px 0;
  191. }
  192. .m-markdown-small td,
  193. .m-markdown-small th,
  194. .m-markdown td,
  195. .m-markdown th {
  196. vertical-align: top;
  197. border-top: 1px solid var(--border-color);
  198. line-height: calc(var(--font-size-small) + 4px);
  199. }
  200. .m-markdown-small tr:first-child th,
  201. .m-markdown tr:first-child th {
  202. border-top: 0 none;
  203. }
  204. .m-markdown th,
  205. .m-markdown td {
  206. padding: 10px 12px;
  207. }
  208. .m-markdown-small th,
  209. .m-markdown-small td {
  210. padding: 8px 8px;
  211. }
  212. .m-markdown th,
  213. .m-markdown-small th {
  214. font-weight: 600;
  215. background-color: var(--bg2);
  216. vertical-align: middle;
  217. }
  218. .m-markdown-small table code {
  219. font-size: calc(var(--font-size-mono) - 2px);
  220. }
  221. .m-markdown table code {
  222. font-size: calc(var(--font-size-mono) - 1px);
  223. }
  224. .m-markdown blockquote,
  225. .m-markdown-small blockquote {
  226. margin-inline-start: 0;
  227. margin-inline-end: 0;
  228. border-left: 3px solid var(--border-color);
  229. padding: 6px 0 6px 6px;
  230. }
  231. .m-markdown hr{
  232. border: 1px solid var(--border-color);
  233. }
  234. `,tt=c`
  235. /* Button */
  236. .m-btn {
  237. border-radius: var(--border-radius);
  238. font-weight: 600;
  239. display: inline-block;
  240. padding: 6px 16px;
  241. font-size: var(--font-size-small);
  242. outline: 0;
  243. line-height: 1;
  244. text-align: center;
  245. white-space: nowrap;
  246. border: 2px solid var(--primary-color);
  247. background-color:transparent;
  248. user-select: none;
  249. cursor: pointer;
  250. box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  251. transition-duration: 0.75s;
  252. }
  253. .m-btn.primary {
  254. background-color: var(--primary-color);
  255. color: var(--primary-color-invert);
  256. }
  257. .m-btn.thin-border { border-width: 1px; }
  258. .m-btn.large { padding:8px 14px; }
  259. .m-btn.small { padding:5px 12px; }
  260. .m-btn.tiny { padding:5px 6px; }
  261. .m-btn.circle { border-radius: 50%; }
  262. .m-btn:hover {
  263. background-color: var(--primary-color);
  264. color: var(--primary-color-invert);
  265. }
  266. .m-btn.nav { border: 2px solid var(--nav-accent-color); }
  267. .m-btn.nav:hover {
  268. background-color: var(--nav-accent-color);
  269. }
  270. .m-btn:disabled {
  271. background-color: var(--bg3);
  272. color: var(--fg3);
  273. border-color: var(--fg3);
  274. cursor: not-allowed;
  275. opacity: 0.4;
  276. }
  277. .m-btn:active {
  278. filter: brightness(75%);
  279. transform: scale(0.95);
  280. transition:scale 0s;
  281. }
  282. .toolbar-btn {
  283. cursor: pointer;
  284. padding: 4px;
  285. margin:0 2px;
  286. font-size: var(--font-size-small);
  287. min-width: 50px;
  288. color: var(--primary-color-invert);
  289. border-radius: 2px;
  290. border: none;
  291. background-color: var(--primary-color);
  292. }
  293. input, textarea, select, button, pre {
  294. color:var(--fg);
  295. outline: none;
  296. background-color: var(--input-bg);
  297. border: 1px solid var(--border-color);
  298. border-radius: var(--border-radius);
  299. }
  300. button {
  301. font-family: var(--font-regular);
  302. }
  303. /* Form Inputs */
  304. pre,
  305. select,
  306. textarea,
  307. input[type="file"],
  308. input[type="text"],
  309. input[type="password"] {
  310. font-family: var(--font-mono);
  311. font-weight: 400;
  312. font-size: var(--font-size-small);
  313. transition: border .2s;
  314. padding: 6px 5px;
  315. }
  316. select {
  317. font-family: var(--font-regular);
  318. padding: 5px 30px 5px 5px;
  319. background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E");
  320. background-position: calc(100% - 5px) center;
  321. background-repeat: no-repeat;
  322. background-size: 10px;
  323. -webkit-appearance: none;
  324. -moz-appearance: none;
  325. appearance: none;
  326. cursor: pointer;
  327. }
  328. select:hover {
  329. border-color: var(--primary-color);
  330. }
  331. textarea::placeholder,
  332. input[type="text"]::placeholder,
  333. input[type="password"]::placeholder {
  334. color: var(--placeholder-color);
  335. opacity:1;
  336. }
  337. input[type="file"]{
  338. font-family: var(--font-regular);
  339. padding:2px;
  340. cursor:pointer;
  341. border: 1px solid var(--primary-color);
  342. min-height: calc(var(--font-size-small) + 18px);
  343. }
  344. input[type="file"]::-webkit-file-upload-button {
  345. font-family: var(--font-regular);
  346. font-size: var(--font-size-small);
  347. outline: none;
  348. cursor:pointer;
  349. padding: 3px 8px;
  350. border: 1px solid var(--primary-color);
  351. background-color: var(--primary-color);
  352. color: var(--primary-color-invert);
  353. border-radius: var(--border-radius);;
  354. -webkit-appearance: none;
  355. }
  356. pre,
  357. textarea {
  358. scrollbar-width: thin;
  359. scrollbar-color: var(--border-color) var(--input-bg);
  360. }
  361. pre::-webkit-scrollbar,
  362. textarea::-webkit-scrollbar {
  363. width: 8px;
  364. height: 8px;
  365. }
  366. pre::-webkit-scrollbar-track,
  367. textarea::-webkit-scrollbar-track {
  368. background:var(--input-bg);
  369. }
  370. pre::-webkit-scrollbar-thumb,
  371. textarea::-webkit-scrollbar-thumb {
  372. border-radius: 2px;
  373. background-color: var(--border-color);
  374. }
  375. .link {
  376. font-size:var(--font-size-small);
  377. text-decoration: underline;
  378. color:var(--blue);
  379. font-family:var(--font-mono);
  380. margin-bottom:2px;
  381. }
  382. /* Toggle Body */
  383. input[type="checkbox"] {
  384. appearance: none;
  385. display: inline-block;
  386. background-color: var(--light-bg);
  387. border: 1px solid var(--light-bg);
  388. border-radius: 9px;
  389. cursor: pointer;
  390. height: 18px;
  391. position: relative;
  392. transition: border .25s .15s, box-shadow .25s .3s, padding .25s;
  393. min-width: 36px;
  394. width: 36px;
  395. vertical-align: top;
  396. }
  397. /* Toggle Thumb */
  398. input[type="checkbox"]:after {
  399. position: absolute;
  400. background-color: var(--bg);
  401. border: 1px solid var(--light-bg);
  402. border-radius: 8px;
  403. content: '';
  404. top: 0px;
  405. left: 0px;
  406. right: 16px;
  407. display: block;
  408. height: 16px;
  409. transition: border .25s .15s, left .25s .1s, right .15s .175s;
  410. }
  411. /* Toggle Body - Checked */
  412. input[type="checkbox"]:checked {
  413. background-color: var(--green);
  414. border-color: var(--green);
  415. }
  416. /* Toggle Thumb - Checked*/
  417. input[type="checkbox"]:checked:after {
  418. border: 1px solid var(--green);
  419. left: 16px;
  420. right: 1px;
  421. transition: border .25s, left .15s .25s, right .25s .175s;
  422. }`,rt=c`
  423. .row, .col {
  424. display:flex;
  425. }
  426. .row {
  427. align-items:center;
  428. flex-direction: row;
  429. }
  430. .col {
  431. align-items:stretch;
  432. flex-direction: column;
  433. }
  434. `,st=c`
  435. .m-table {
  436. border-spacing: 0;
  437. border-collapse: separate;
  438. border: 1px solid var(--light-border-color);
  439. border-radius: var(--border-radius);
  440. margin: 0;
  441. max-width: 100%;
  442. direction: ltr;
  443. }
  444. .m-table tr:first-child td,
  445. .m-table tr:first-child th {
  446. border-top: 0 none;
  447. }
  448. .m-table td,
  449. .m-table th {
  450. font-size: var(--font-size-small);
  451. line-height: calc(var(--font-size-small) + 4px);
  452. padding: 4px 5px 4px;
  453. vertical-align: top;
  454. }
  455. .m-table.padded-12 td,
  456. .m-table.padded-12 th {
  457. padding: 12px;
  458. }
  459. .m-table td:not([align]),
  460. .m-table th:not([align]) {
  461. text-align: left;
  462. }
  463. .m-table th {
  464. color: var(--fg2);
  465. font-size: var(--font-size-small);
  466. line-height: calc(var(--font-size-small) + 18px);
  467. font-weight: 600;
  468. letter-spacing: normal;
  469. background-color: var(--bg2);
  470. vertical-align: bottom;
  471. border-bottom: 1px solid var(--light-border-color);
  472. }
  473. .m-table > tbody > tr > td,
  474. .m-table > tr > td {
  475. border-top: 1px solid var(--light-border-color);
  476. text-overflow: ellipsis;
  477. overflow: hidden;
  478. }
  479. .table-title {
  480. font-size:var(--font-size-small);
  481. font-weight:bold;
  482. vertical-align: middle;
  483. margin: 12px 0 4px 0;
  484. }
  485. `,nt=c`
  486. :host {
  487. container-type: inline-size;
  488. }
  489. .only-large-screen { display:none; }
  490. .endpoint-head .path {
  491. display: flex;
  492. font-family:var(--font-mono);
  493. font-size: var(--font-size-small);
  494. align-items: center;
  495. overflow-wrap: break-word;
  496. word-break: break-all;
  497. }
  498. .endpoint-head .descr {
  499. font-size: var(--font-size-small);
  500. color:var(--light-fg);
  501. font-weight:400;
  502. align-items: center;
  503. overflow-wrap: break-word;
  504. word-break: break-all;
  505. display:none;
  506. }
  507. .m-endpoint.expanded { margin-bottom:16px; }
  508. .m-endpoint > .endpoint-head{
  509. border-width:1px 1px 1px 5px;
  510. border-style:solid;
  511. border-color:transparent;
  512. border-top-color:var(--light-border-color);
  513. display:flex;
  514. padding:6px 16px;
  515. align-items: center;
  516. cursor: pointer;
  517. }
  518. .m-endpoint > .endpoint-head.put:hover,
  519. .m-endpoint > .endpoint-head.put.expanded {
  520. border-color:var(--orange);
  521. background-color:var(--light-orange);
  522. }
  523. .m-endpoint > .endpoint-head.post:hover,
  524. .m-endpoint > .endpoint-head.post.expanded {
  525. border-color:var(--green);
  526. background-color:var(--light-green);
  527. }
  528. .m-endpoint > .endpoint-head.get:hover,
  529. .m-endpoint > .endpoint-head.get.expanded {
  530. border-color:var(--blue);
  531. background-color:var(--light-blue);
  532. }
  533. .m-endpoint > .endpoint-head.delete:hover,
  534. .m-endpoint > .endpoint-head.delete.expanded {
  535. border-color:var(--red);
  536. background-color:var(--light-red);
  537. }
  538. .m-endpoint > .endpoint-head.head:hover,
  539. .m-endpoint > .endpoint-head.head.expanded,
  540. .m-endpoint > .endpoint-head.patch:hover,
  541. .m-endpoint > .endpoint-head.patch.expanded,
  542. .m-endpoint > .endpoint-head.options:hover,
  543. .m-endpoint > .endpoint-head.options.expanded {
  544. border-color:var(--yellow);
  545. background-color:var(--light-yellow);
  546. }
  547. .m-endpoint > .endpoint-head.deprecated:hover,
  548. .m-endpoint > .endpoint-head.deprecated.expanded {
  549. border-color:var(--border-color);
  550. filter:opacity(0.6);
  551. }
  552. .m-endpoint .endpoint-body {
  553. flex-wrap:wrap;
  554. padding:16px 0px 0 0px;
  555. border-width:0px 1px 1px 5px;
  556. border-style:solid;
  557. box-shadow: 0px 4px 3px -3px rgba(0, 0, 0, 0.15);
  558. }
  559. .m-endpoint .endpoint-body.delete{ border-color:var(--red); }
  560. .m-endpoint .endpoint-body.put{ border-color:var(--orange); }
  561. .m-endpoint .endpoint-body.post { border-color:var(--green); }
  562. .m-endpoint .endpoint-body.get { border-color:var(--blue); }
  563. .m-endpoint .endpoint-body.head,
  564. .m-endpoint .endpoint-body.patch,
  565. .m-endpoint .endpoint-body.options {
  566. border-color:var(--yellow);
  567. }
  568. .m-endpoint .endpoint-body.deprecated {
  569. border-color:var(--border-color);
  570. filter:opacity(0.6);
  571. }
  572. .endpoint-head .deprecated {
  573. color: var(--light-fg);
  574. filter:opacity(0.6);
  575. }
  576. .summary{
  577. padding:8px 8px;
  578. }
  579. .summary .title {
  580. font-size:calc(var(--font-size-regular) + 2px);
  581. margin-bottom: 6px;
  582. word-break: break-all;
  583. }
  584. .endpoint-head .method {
  585. padding:2px 5px;
  586. vertical-align: middle;
  587. font-size:var(--font-size-small);
  588. height: calc(var(--font-size-small) + 16px);
  589. line-height: calc(var(--font-size-small) + 8px);
  590. width: 60px;
  591. border-radius: 2px;
  592. display:inline-block;
  593. text-align: center;
  594. font-weight: bold;
  595. text-transform:uppercase;
  596. margin-right:5px;
  597. }
  598. .endpoint-head .method.delete{ border: 2px solid var(--red);}
  599. .endpoint-head .method.put{ border: 2px solid var(--orange); }
  600. .endpoint-head .method.post{ border: 2px solid var(--green); }
  601. .endpoint-head .method.get{ border: 2px solid var(--blue); }
  602. .endpoint-head .method.get.deprecated{ border: 2px solid var(--border-color); }
  603. .endpoint-head .method.head,
  604. .endpoint-head .method.patch,
  605. .endpoint-head .method.options {
  606. border: 2px solid var(--yellow);
  607. }
  608. .req-resp-container {
  609. display: flex;
  610. margin-top:16px;
  611. align-items: stretch;
  612. flex-wrap: wrap;
  613. flex-direction: column;
  614. border-top:1px solid var(--light-border-color);
  615. }
  616. .view-mode-request,
  617. api-response.view-mode {
  618. flex:1;
  619. min-height:100px;
  620. padding:16px 8px;
  621. overflow:hidden;
  622. }
  623. .view-mode-request {
  624. border-width:0 0 1px 0;
  625. border-style:dashed;
  626. }
  627. .head .view-mode-request,
  628. .patch .view-mode-request,
  629. .options .view-mode-request {
  630. border-color:var(--yellow);
  631. }
  632. .put .view-mode-request {
  633. border-color:var(--orange);
  634. }
  635. .post .view-mode-request {
  636. border-color:var(--green);
  637. }
  638. .get .view-mode-request {
  639. border-color:var(--blue);
  640. }
  641. .delete .view-mode-request {
  642. border-color:var(--red);
  643. }
  644. @container (min-width: 1024px) {
  645. .only-large-screen { display:block; }
  646. .endpoint-head .path{
  647. font-size: var(--font-size-regular);
  648. }
  649. .endpoint-head .descr{
  650. display: flex;
  651. }
  652. .endpoint-head .m-markdown-small,
  653. .descr .m-markdown-small{
  654. display:block;
  655. }
  656. .req-resp-container{
  657. flex-direction: var(--layout, row);
  658. flex-wrap: nowrap;
  659. }
  660. api-response.view-mode {
  661. padding:16px;
  662. }
  663. .view-mode-request.row-layout {
  664. border-width:0 1px 0 0;
  665. padding:16px;
  666. }
  667. .summary{
  668. padding:8px 16px;
  669. }
  670. }
  671. `,it=c`
  672. code[class*="language-"],
  673. pre[class*="language-"] {
  674. text-align: left;
  675. white-space: pre;
  676. word-spacing: normal;
  677. word-break: normal;
  678. word-wrap: normal;
  679. line-height: 1.5;
  680. tab-size: 2;
  681. -webkit-hyphens: none;
  682. -moz-hyphens: none;
  683. -ms-hyphens: none;
  684. hyphens: none;
  685. }
  686. /* Code blocks */
  687. pre[class*="language-"] {
  688. padding: 1em;
  689. margin: .5em 0;
  690. overflow: auto;
  691. }
  692. /* Inline code */
  693. :not(pre) > code[class*="language-"] {
  694. white-space: normal;
  695. }
  696. .token.comment,
  697. .token.block-comment,
  698. .token.prolog,
  699. .token.doctype,
  700. .token.cdata {
  701. color: var(--light-fg)
  702. }
  703. .token.punctuation {
  704. color: var(--fg);
  705. }
  706. .token.tag,
  707. .token.attr-name,
  708. .token.namespace,
  709. .token.deleted {
  710. color:var(--pink);
  711. }
  712. .token.function-name {
  713. color: var(--blue);
  714. }
  715. .token.boolean,
  716. .token.number,
  717. .token.function {
  718. color: var(--red);
  719. }
  720. .token.property,
  721. .token.class-name,
  722. .token.constant,
  723. .token.symbol {
  724. color: var(--code-property-color);
  725. }
  726. .token.selector,
  727. .token.important,
  728. .token.atrule,
  729. .token.keyword,
  730. .token.builtin {
  731. color: var(--code-keyword-color);
  732. }
  733. .token.string,
  734. .token.char,
  735. .token.attr-value,
  736. .token.regex,
  737. .token.variable {
  738. color: var(--green);
  739. }
  740. .token.operator,
  741. .token.entity,
  742. .token.url {
  743. color: var(--code-operator-color);
  744. }
  745. .token.important,
  746. .token.bold {
  747. font-weight: bold;
  748. }
  749. .token.italic {
  750. font-style: italic;
  751. }
  752. .token.entity {
  753. cursor: help;
  754. }
  755. .token.inserted {
  756. color: green;
  757. }
  758. `,ot=c`
  759. .tab-panel {
  760. border: none;
  761. }
  762. .tab-buttons {
  763. height:30px;
  764. padding: 4px 4px 0 4px;
  765. border-bottom: 1px solid var(--light-border-color) ;
  766. align-items: stretch;
  767. overflow-y: hidden;
  768. overflow-x: auto;
  769. scrollbar-width: thin;
  770. }
  771. .tab-buttons::-webkit-scrollbar {
  772. height: 1px;
  773. background-color: var(--border-color);
  774. }
  775. .tab-btn {
  776. border: none;
  777. border-bottom: 3px solid transparent;
  778. color: var(--light-fg);
  779. background-color: transparent;
  780. white-space: nowrap;
  781. cursor:pointer;
  782. outline:none;
  783. font-family:var(--font-regular);
  784. font-size:var(--font-size-small);
  785. margin-right:16px;
  786. padding:1px;
  787. }
  788. .tab-btn.active {
  789. border-bottom: 3px solid var(--primary-color);
  790. font-weight:bold;
  791. color:var(--primary-color);
  792. }
  793. .tab-btn:hover {
  794. color:var(--primary-color);
  795. }
  796. .tab-content {
  797. margin:-1px 0 0 0;
  798. position:relative;
  799. min-height: 50px;
  800. }
  801. `,at=c`
  802. .nav-bar-info:focus-visible,
  803. .nav-bar-tag:focus-visible,
  804. .nav-bar-path:focus-visible {
  805. outline: 1px solid;
  806. box-shadow: none;
  807. outline-offset: -4px;
  808. }
  809. .nav-bar-expand-all:focus-visible,
  810. .nav-bar-collapse-all:focus-visible,
  811. .nav-bar-tag-icon:focus-visible {
  812. outline: 1px solid;
  813. box-shadow: none;
  814. outline-offset: 2px;
  815. }
  816. .nav-bar {
  817. width:0;
  818. height:100%;
  819. overflow: hidden;
  820. color:var(--nav-text-color);
  821. background-color: var(--nav-bg-color);
  822. background-blend-mode: multiply;
  823. line-height: calc(var(--font-size-small) + 4px);
  824. display:none;
  825. position:relative;
  826. flex-direction:column;
  827. flex-wrap:nowrap;
  828. word-break:break-word;
  829. }
  830. ::slotted([slot=nav-logo]) {
  831. padding:16px 16px 0 16px;
  832. }
  833. .nav-scroll {
  834. overflow-x: hidden;
  835. overflow-y: auto;
  836. overflow-y: overlay;
  837. scrollbar-width: thin;
  838. scrollbar-color: var(--nav-hover-bg-color) transparent;
  839. }
  840. .nav-bar-tag {
  841. display: flex;
  842. align-items: center;
  843. justify-content: space-between;
  844. flex-direction: row;
  845. }
  846. .nav-bar.read .nav-bar-tag-icon {
  847. display:none;
  848. }
  849. .nav-bar-paths-under-tag {
  850. overflow:hidden;
  851. transition: max-height .2s ease-out, visibility .3s;
  852. }
  853. .collapsed .nav-bar-paths-under-tag {
  854. visibility: hidden;
  855. }
  856. .nav-bar-expand-all {
  857. transform: rotate(90deg);
  858. cursor:pointer;
  859. margin-right:10px;
  860. }
  861. .nav-bar-collapse-all {
  862. transform: rotate(270deg);
  863. cursor:pointer;
  864. }
  865. .nav-bar-expand-all:hover, .nav-bar-collapse-all:hover {
  866. color: var(--primary-color);
  867. }
  868. .nav-bar-tag-icon {
  869. color: var(--nav-text-color);
  870. font-size: 20px;
  871. }
  872. .nav-bar-tag-icon:hover {
  873. color:var(--nav-hover-text-color);
  874. }
  875. .nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon::after {
  876. content: '⌵';
  877. width:16px;
  878. height:16px;
  879. text-align: center;
  880. display: inline-block;
  881. transform: rotate(-90deg);
  882. transition: transform 0.2s ease-out 0s;
  883. }
  884. .nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon::after {
  885. content: '⌵';
  886. width:16px;
  887. height:16px;
  888. text-align: center;
  889. display: inline-block;
  890. transition: transform 0.2s ease-out 0s;
  891. }
  892. .nav-scroll::-webkit-scrollbar {
  893. width: var(--scroll-bar-width, 8px);
  894. }
  895. .nav-scroll::-webkit-scrollbar-track {
  896. background:transparent;
  897. }
  898. .nav-scroll::-webkit-scrollbar-thumb {
  899. background-color: var(--nav-hover-bg-color);
  900. }
  901. .nav-bar-tag {
  902. font-size: var(--font-size-regular);
  903. color: var(--nav-accent-color);
  904. border-left:4px solid transparent;
  905. font-weight:bold;
  906. padding: 15px 15px 15px 10px;
  907. text-transform: capitalize;
  908. }
  909. .nav-bar-components,
  910. .nav-bar-h1,
  911. .nav-bar-h2,
  912. .nav-bar-info,
  913. .nav-bar-tag,
  914. .nav-bar-path {
  915. display:flex;
  916. cursor: pointer;
  917. width: 100%;
  918. border: none;
  919. border-radius:4px;
  920. color: var(--nav-text-color);
  921. background: transparent;
  922. border-left:4px solid transparent;
  923. }
  924. .nav-bar-h1,
  925. .nav-bar-h2,
  926. .nav-bar-path {
  927. font-size: calc(var(--font-size-small) + 1px);
  928. padding: var(--nav-item-padding);
  929. }
  930. .nav-bar-path.small-font {
  931. font-size: var(--font-size-small);
  932. }
  933. .nav-bar-info {
  934. font-size: var(--font-size-regular);
  935. padding: 16px 10px;
  936. font-weight:bold;
  937. }
  938. .nav-bar-section {
  939. display: flex;
  940. flex-direction: row;
  941. justify-content: space-between;
  942. font-size: var(--font-size-small);
  943. color: var(--nav-text-color);
  944. padding: var(--nav-item-padding);
  945. font-weight:bold;
  946. }
  947. .nav-bar-section.operations {
  948. cursor:pointer;
  949. }
  950. .nav-bar-section.operations:hover {
  951. color:var(--nav-hover-text-color);
  952. background-color:var(--nav-hover-bg-color);
  953. }
  954. .nav-bar-section:first-child {
  955. display: none;
  956. }
  957. .nav-bar-h2 {margin-left:12px;}
  958. .nav-bar-h1.left-bar.active,
  959. .nav-bar-h2.left-bar.active,
  960. .nav-bar-info.left-bar.active,
  961. .nav-bar-tag.left-bar.active,
  962. .nav-bar-path.left-bar.active,
  963. .nav-bar-section.left-bar.operations.active {
  964. border-left:4px solid var(--nav-accent-color);
  965. color:var(--nav-hover-text-color);
  966. }
  967. .nav-bar-h1.colored-block.active,
  968. .nav-bar-h2.colored-block.active,
  969. .nav-bar-info.colored-block.active,
  970. .nav-bar-tag.colored-block.active,
  971. .nav-bar-path.colored-block.active,
  972. .nav-bar-section.colored-block.operations.active {
  973. background-color: var(--nav-accent-color);
  974. color: var(--nav-accent-text-color);
  975. border-radius: 0;
  976. }
  977. .nav-bar-h1:hover,
  978. .nav-bar-h2:hover,
  979. .nav-bar-info:hover,
  980. .nav-bar-tag:hover,
  981. .nav-bar-path:hover {
  982. color:var(--nav-hover-text-color);
  983. background-color:var(--nav-hover-bg-color);
  984. }
  985. `,lt=c`
  986. #api-info {
  987. font-size: calc(var(--font-size-regular) - 1px);
  988. margin-top: 8px;
  989. margin-left: -15px;
  990. }
  991. #api-info span:before {
  992. content: "|";
  993. display: inline-block;
  994. opacity: 0.5;
  995. width: 15px;
  996. text-align: center;
  997. }
  998. #api-info span:first-child:before {
  999. content: "";
  1000. width: 0px;
  1001. }
  1002. `,ct=c`
  1003. `;const pt=/[\s#:?&={}]/g,ut="_rapidoc_api_key";function dt(e){return new Promise((t=>setTimeout(t,e)))}function ht(e,t){const r=t.target,s=document.createElement("textarea");s.value=e,s.style.position="fixed",document.body.appendChild(s),s.focus(),s.select();try{document.execCommand("copy"),r.innerText="Copied",setTimeout((()=>{r.innerText="Copy"}),5e3)}catch(e){console.error("Unable to copy",e)}document.body.removeChild(s)}function mt(e,t,r=""){return`${t.method} ${t.path} ${t.summary||""} ${t.description||""} ${t.operationId||""} ${r}`.toLowerCase().includes(e.toLowerCase())}function ft(e,t=new Set){return e?(Object.keys(e).forEach((r=>{var s;if(t.add(r),e[r].properties)ft(e[r].properties,t);else if(null!==(s=e[r].items)&&void 0!==s&&s.properties){var n;ft(null===(n=e[r].items)||void 0===n?void 0:n.properties,t)}})),t):t}function gt(e,t){if(e){const r=document.createElement("a");document.body.appendChild(r),r.style="display: none",r.href=e,r.download=t,r.click(),r.remove()}}function yt(e){if(e){const t=document.createElement("a");document.body.appendChild(t),t.style="display: none",t.href=e,t.target="_blank",t.click(),t.remove()}}const vt=Object.freeze({url:"/"}),{fetch:bt,Response:xt,Headers:wt,Request:$t,FormData:St,File:Et,Blob:kt}=globalThis;function At(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!=typeof e||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||!!ArrayBuffer.isView(e)||null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function Ot(e,t){return Array.isArray(e)&&e.some((e=>At(e,t)))}void 0===globalThis.fetch&&(globalThis.fetch=bt),void 0===globalThis.Headers&&(globalThis.Headers=wt),void 0===globalThis.Request&&(globalThis.Request=$t),void 0===globalThis.Response&&(globalThis.Response=xt),void 0===globalThis.FormData&&(globalThis.FormData=St),void 0===globalThis.File&&(globalThis.File=Et),void 0===globalThis.Blob&&(globalThis.Blob=kt);class jt extends File{constructor(e,t="",r={}){super([e],t,r),this.data=e}valueOf(){return this.data}toString(){return this.valueOf()}}function Tt(e,t="reserved"){return[...e].map((e=>{if((e=>/^[a-z0-9\-._~]+$/i.test(e))(e))return e;if((e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1)(e)&&"unsafe"===t)return e;const r=new TextEncoder;return Array.from(r.encode(e)).map((e=>`0${e.toString(16).toUpperCase()}`.slice(-2))).map((e=>`%${e}`)).join("")})).join("")}function Pt(e){const{value:t}=e;return Array.isArray(t)?function({key:e,value:t,style:r,explode:s,escape:n}){if("simple"===r)return t.map((e=>Ct(e,n))).join(",");if("label"===r)return`.${t.map((e=>Ct(e,n))).join(".")}`;if("matrix"===r)return t.map((e=>Ct(e,n))).reduce(((t,r)=>!t||s?`${t||""};${e}=${r}`:`${t},${r}`),"");if("form"===r){const r=s?`&${e}=`:",";return t.map((e=>Ct(e,n))).join(r)}if("spaceDelimited"===r){const r=s?`${e}=`:"";return t.map((e=>Ct(e,n))).join(` ${r}`)}if("pipeDelimited"===r){const r=s?`${e}=`:"";return t.map((e=>Ct(e,n))).join(`|${r}`)}}(e):"object"==typeof t?function({key:e,value:t,style:r,explode:s,escape:n}){const i=Object.keys(t);return"simple"===r?i.reduce(((e,r)=>{const i=Ct(t[r],n);return`${e?`${e},`:""}${r}${s?"=":","}${i}`}),""):"label"===r?i.reduce(((e,r)=>{const i=Ct(t[r],n);return`${e?`${e}.`:"."}${r}${s?"=":"."}${i}`}),""):"matrix"===r&&s?i.reduce(((e,r)=>`${e?`${e};`:";"}${r}=${Ct(t[r],n)}`),""):"matrix"===r?i.reduce(((r,s)=>{const i=Ct(t[s],n);return`${r?`${r},`:`;${e}=`}${s},${i}`}),""):"form"===r?i.reduce(((e,r)=>{const i=Ct(t[r],n);return`${e?`${e}${s?"&":","}`:""}${r}${s?"=":","}${i}`}),""):void 0}(e):function({key:e,value:t,style:r,escape:s}){return"simple"===r?Ct(t,s):"label"===r?`.${Ct(t,s)}`:"matrix"===r?`;${e}=${Ct(t,s)}`:"form"===r||"deepObject"===r?Ct(t,s):void 0}(e)}function Ct(e,t=!1){return Array.isArray(e)||null!==e&&"object"==typeof e?e=JSON.stringify(e):"number"!=typeof e&&"boolean"!=typeof e||(e=String(e)),t&&e.length>0?Tt(e,t):e}const It={form:",",spaceDelimited:"%20",pipeDelimited:"|"},_t={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function Rt(e,t,r=!1){const{collectionFormat:s,allowEmptyValue:n,serializationOption:i,encoding:o}=t,a="object"!=typeof t||Array.isArray(t)?t:t.value,l=r?e=>e.toString():e=>encodeURIComponent(e),c=l(e);if(void 0===a&&n)return[[c,""]];if(At(a)||Ot(a))return[[c,a]];if(i)return Ft(e,a,r,i);if(o){if([typeof o.style,typeof o.explode,typeof o.allowReserved].some((e=>"undefined"!==e))){const{style:t,explode:s,allowReserved:n}=o;return Ft(e,a,r,{style:t,explode:s,allowReserved:n})}if("string"==typeof o.contentType){if(o.contentType.startsWith("application/json")){const e=l("string"==typeof a?a:JSON.stringify(a));return[[c,new jt(e,"blob",{type:o.contentType})]]}const e=l(String(a));return[[c,new jt(e,"blob",{type:o.contentType})]]}return"object"!=typeof a?[[c,l(a)]]:Array.isArray(a)&&a.every((e=>"object"!=typeof e))?[[c,a.map(l).join(",")]]:[[c,l(JSON.stringify(a))]]}return"object"!=typeof a?[[c,l(a)]]:Array.isArray(a)?"multi"===s?[[c,a.map(l)]]:[[c,a.map(l).join(_t[s||"csv"])]]:[[c,""]]}function Ft(e,t,r,s){const n=s.style||"form",i=void 0===s.explode?"form"===n:s.explode,o=!r&&(s&&s.allowReserved?"unsafe":"reserved"),a=e=>Ct(e,o),l=r?e=>e:e=>a(e);return"object"!=typeof t?[[l(e),a(t)]]:Array.isArray(t)?i?[[l(e),t.map(a)]]:[[l(e),t.map(a).join(It[n])]]:"deepObject"===n?Object.keys(t).map((r=>[l(`${e}[${r}]`),a(t[r])])):i?Object.keys(t).map((e=>[l(e),a(t[e])])):[[l(e),Object.keys(t).map((e=>[`${l(e)},${a(t[e])}`])).join(",")]]}function Mt(e){return((e,{encode:t=!0}={})=>{const r=(e,t,s)=>(null==s?e.append(t,""):Array.isArray(s)?s.reduce(((s,n)=>r(e,t,n)),e):s instanceof Date?e.append(t,s.toISOString()):"object"==typeof s?Object.entries(s).reduce(((s,[n,i])=>r(e,`${t}[${n}]`,i)),e):e.append(t,s),e),s=Object.entries(e).reduce(((e,[t,s])=>r(e,t,s)),new URLSearchParams),n=String(s);return t?n:decodeURIComponent(n)})(Object.keys(e).reduce(((t,r)=>{for(const[s,n]of Rt(r,e[r]))t[s]=n instanceof jt?n.valueOf():n;return t}),{}),{encode:!1})}function Lt(e={}){const{url:t="",query:r,form:s}=e;if(s){const t=Object.keys(s).some((e=>{const{value:t}=s[e];return At(t)||Ot(t)})),r=e.headers["content-type"]||e.headers["Content-Type"];if(t||/multipart\/form-data/i.test(r)){const t=(n=e.form,Object.entries(n).reduce(((e,[t,r])=>{for(const[s,n]of Rt(t,r,!0))if(Array.isArray(n))for(const t of n)if(ArrayBuffer.isView(t)){const r=new Blob([t]);e.append(s,r)}else e.append(s,t);else if(ArrayBuffer.isView(n)){const t=new Blob([n]);e.append(s,t)}else e.append(s,n);return e}),new FormData));e.formdata=t,e.body=t}else e.body=Mt(s);delete e.form}var n;if(r){const[s,n]=t.split("?");let i="";if(n){const e=new URLSearchParams(n);Object.keys(r).forEach((t=>e.delete(t))),i=String(e)}const o=((...e)=>{const t=e.filter((e=>e)).join("&");return t?`?${t}`:""})(i,Mt(r));e.url=s+o,delete e.query}return e}function Dt(e){return null==e}var Bt={isNothing:Dt,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:Dt(e)?[]:[e]},repeat:function(e,t){var r,s="";for(r=0;r<t;r+=1)s+=e;return s},isNegativeZero:function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},extend:function(e,t){var r,s,n,i;if(t)for(r=0,s=(i=Object.keys(t)).length;r<s;r+=1)e[n=i[r]]=t[n];return e}};function qt(e,t){var r="",s=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+="\n\n"+e.mark.snippet),s+" "+r):s}function Nt(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Nt.prototype=Object.create(Error.prototype),Nt.prototype.constructor=Nt,Nt.prototype.toString=function(e){return this.name+": "+qt(this,e)};var Ut=Nt;function zt(e,t,r,s,n){var i="",o="",a=Math.floor(n/2)-1;return s-t>a&&(t=s-a+(i=" ... ").length),r-s>a&&(r=s+a-(o=" ...").length),{str:i+e.slice(t,r).replace(/\t/g,"→")+o,pos:s-t+i.length}}function Ht(e,t){return Bt.repeat(" ",t-e.length)+e}var Vt=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,s=/\r?\n|\r|\0/g,n=[0],i=[],o=-1;r=s.exec(e.buffer);)i.push(r.index),n.push(r.index+r[0].length),e.position<=r.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var a,l,c="",p=Math.min(e.line+t.linesAfter,i.length).toString().length,u=t.maxLength-(t.indent+p+3);for(a=1;a<=t.linesBefore&&!(o-a<0);a++)l=zt(e.buffer,n[o-a],i[o-a],e.position-(n[o]-n[o-a]),u),c=Bt.repeat(" ",t.indent)+Ht((e.line-a+1).toString(),p)+" | "+l.str+"\n"+c;for(l=zt(e.buffer,n[o],i[o],e.position,u),c+=Bt.repeat(" ",t.indent)+Ht((e.line+1).toString(),p)+" | "+l.str+"\n",c+=Bt.repeat("-",t.indent+p+3+l.pos)+"^\n",a=1;a<=t.linesAfter&&!(o+a>=i.length);a++)l=zt(e.buffer,n[o+a],i[o+a],e.position-(n[o]-n[o+a]),u),c+=Bt.repeat(" ",t.indent)+Ht((e.line+a+1).toString(),p)+" | "+l.str+"\n";return c.replace(/\n$/,"")},Wt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Gt=["scalar","sequence","mapping"],Jt=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===Wt.indexOf(t))throw new Ut('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===Gt.indexOf(this.kind))throw new Ut('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function Kt(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,s){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=s)})),r[t]=e})),r}function Yt(e){return this.extend(e)}Yt.prototype.extend=function(e){var t=[],r=[];if(e instanceof Jt)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new Ut("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof Jt))throw new Ut("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new Ut("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new Ut("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof Jt))throw new Ut("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var s=Object.create(Yt.prototype);return s.implicit=(this.implicit||[]).concat(t),s.explicit=(this.explicit||[]).concat(r),s.compiledImplicit=Kt(s,"implicit"),s.compiledExplicit=Kt(s,"explicit"),s.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(s);return r}(s.compiledImplicit,s.compiledExplicit),s};var Xt=Yt,Zt=new Jt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}}),Qt=new Jt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}}),er=new Jt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}}),tr=new Xt({explicit:[Zt,Qt,er]}),rr=new Jt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),sr=new Jt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function nr(e){return 48<=e&&e<=55}function ir(e){return 48<=e&&e<=57}var or=new Jt("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,s=e.length,n=0,i=!1;if(!s)return!1;if("-"!==(t=e[n])&&"+"!==t||(t=e[++n]),"0"===t){if(n+1===s)return!0;if("b"===(t=e[++n])){for(n++;n<s;n++)if("_"!==(t=e[n])){if("0"!==t&&"1"!==t)return!1;i=!0}return i&&"_"!==t}if("x"===t){for(n++;n<s;n++)if("_"!==(t=e[n])){if(!(48<=(r=e.charCodeAt(n))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;i=!0}return i&&"_"!==t}if("o"===t){for(n++;n<s;n++)if("_"!==(t=e[n])){if(!nr(e.charCodeAt(n)))return!1;i=!0}return i&&"_"!==t}}if("_"===t)return!1;for(;n<s;n++)if("_"!==(t=e[n])){if(!ir(e.charCodeAt(n)))return!1;i=!0}return!(!i||"_"===t)},construct:function(e){var t,r=e,s=1;if(-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(s=-1),t=(r=r.slice(1))[0]),"0"===r)return 0;if("0"===t){if("b"===r[1])return s*parseInt(r.slice(2),2);if("x"===r[1])return s*parseInt(r.slice(2),16);if("o"===r[1])return s*parseInt(r.slice(2),8)}return s*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!Bt.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ar=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),lr=/^[-+]?[0-9]+e/,cr=new Jt("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!ar.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Bt.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Bt.isNegativeZero(e))return"-0.0";return r=e.toString(10),lr.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),pr=tr.extend({implicit:[rr,sr,or,cr]}),ur=pr,dr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),hr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),mr=new Jt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==dr.exec(e)||null!==hr.exec(e))},construct:function(e){var t,r,s,n,i,o,a,l,c=0,p=null;if(null===(t=dr.exec(e))&&(t=hr.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],s=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,s,n));if(i=+t[4],o=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),l=new Date(Date.UTC(r,s,n,i,o,a,c)),p&&l.setTime(l.getTime()-p),l},instanceOf:Date,represent:function(e){return e.toISOString()}}),fr=new Jt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),gr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",yr=new Jt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,s=0,n=e.length,i=gr;for(r=0;r<n;r++)if(!((t=i.indexOf(e.charAt(r)))>64)){if(t<0)return!1;s+=6}return s%8==0},construct:function(e){var t,r,s=e.replace(/[\r\n=]/g,""),n=s.length,i=gr,o=0,a=[];for(t=0;t<n;t++)t%4==0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|i.indexOf(s.charAt(t));return 0==(r=n%4*6)?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18===r?(a.push(o>>10&255),a.push(o>>2&255)):12===r&&a.push(o>>4&255),new Uint8Array(a)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,s="",n=0,i=e.length,o=gr;for(t=0;t<i;t++)t%3==0&&t&&(s+=o[n>>18&63],s+=o[n>>12&63],s+=o[n>>6&63],s+=o[63&n]),n=(n<<8)+e[t];return 0==(r=i%3)?(s+=o[n>>18&63],s+=o[n>>12&63],s+=o[n>>6&63],s+=o[63&n]):2===r?(s+=o[n>>10&63],s+=o[n>>4&63],s+=o[n<<2&63],s+=o[64]):1===r&&(s+=o[n>>2&63],s+=o[n<<4&63],s+=o[64],s+=o[64]),s}}),vr=Object.prototype.hasOwnProperty,br=Object.prototype.toString,xr=new Jt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,s,n,i,o=[],a=e;for(t=0,r=a.length;t<r;t+=1){if(s=a[t],i=!1,"[object Object]"!==br.call(s))return!1;for(n in s)if(vr.call(s,n)){if(i)return!1;i=!0}if(!i)return!1;if(-1!==o.indexOf(n))return!1;o.push(n)}return!0},construct:function(e){return null!==e?e:[]}}),wr=Object.prototype.toString,$r=new Jt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,s,n,i,o=e;for(i=new Array(o.length),t=0,r=o.length;t<r;t+=1){if(s=o[t],"[object Object]"!==wr.call(s))return!1;if(1!==(n=Object.keys(s)).length)return!1;i[t]=[n[0],s[n[0]]]}return!0},construct:function(e){if(null===e)return[];var t,r,s,n,i,o=e;for(i=new Array(o.length),t=0,r=o.length;t<r;t+=1)s=o[t],n=Object.keys(s),i[t]=[n[0],s[n[0]]];return i}}),Sr=Object.prototype.hasOwnProperty,Er=new Jt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,r=e;for(t in r)if(Sr.call(r,t)&&null!==r[t])return!1;return!0},construct:function(e){return null!==e?e:{}}}),kr=ur.extend({implicit:[mr,fr],explicit:[yr,xr,$r,Er]}),Ar=Object.prototype.hasOwnProperty,Or=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jr=/[\x85\u2028\u2029]/,Tr=/[,\[\]\{\}]/,Pr=/^(?:!|!!|![a-z\-]+!)$/i,Cr=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ir(e){return Object.prototype.toString.call(e)}function _r(e){return 10===e||13===e}function Rr(e){return 9===e||32===e}function Fr(e){return 9===e||32===e||10===e||13===e}function Mr(e){return 44===e||91===e||93===e||123===e||125===e}function Lr(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function Dr(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function Br(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var qr=new Array(256),Nr=new Array(256),Ur=0;Ur<256;Ur++)qr[Ur]=Dr(Ur)?1:0,Nr[Ur]=Dr(Ur);function zr(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||kr,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Hr(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Vt(r),new Ut(t,r)}function Vr(e,t){throw Hr(e,t)}function Wr(e,t){e.onWarning&&e.onWarning.call(null,Hr(e,t))}var Gr={YAML:function(e,t,r){var s,n,i;null!==e.version&&Vr(e,"duplication of %YAML directive"),1!==r.length&&Vr(e,"YAML directive accepts exactly one argument"),null===(s=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Vr(e,"ill-formed argument of the YAML directive"),n=parseInt(s[1],10),i=parseInt(s[2],10),1!==n&&Vr(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&Wr(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var s,n;2!==r.length&&Vr(e,"TAG directive accepts exactly two arguments"),s=r[0],n=r[1],Pr.test(s)||Vr(e,"ill-formed tag handle (first argument) of the TAG directive"),Ar.call(e.tagMap,s)&&Vr(e,'there is a previously declared suffix for "'+s+'" tag handle'),Cr.test(n)||Vr(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(t){Vr(e,"tag prefix is malformed: "+n)}e.tagMap[s]=n}};function Jr(e,t,r,s){var n,i,o,a;if(t<r){if(a=e.input.slice(t,r),s)for(n=0,i=a.length;n<i;n+=1)9===(o=a.charCodeAt(n))||32<=o&&o<=1114111||Vr(e,"expected valid JSON character");else Or.test(a)&&Vr(e,"the stream contains non-printable characters");e.result+=a}}function Kr(e,t,r,s){var n,i,o,a;for(Bt.isObject(r)||Vr(e,"cannot merge mappings; the provided source object is unacceptable"),o=0,a=(n=Object.keys(r)).length;o<a;o+=1)i=n[o],Ar.call(t,i)||(t[i]=r[i],s[i]=!0)}function Yr(e,t,r,s,n,i,o,a,l){var c,p;if(Array.isArray(n))for(c=0,p=(n=Array.prototype.slice.call(n)).length;c<p;c+=1)Array.isArray(n[c])&&Vr(e,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===Ir(n[c])&&(n[c]="[object Object]");if("object"==typeof n&&"[object Object]"===Ir(n)&&(n="[object Object]"),n=String(n),null===t&&(t={}),"tag:yaml.org,2002:merge"===s)if(Array.isArray(i))for(c=0,p=i.length;c<p;c+=1)Kr(e,t,i[c],r);else Kr(e,t,i,r);else e.json||Ar.call(r,n)||!Ar.call(t,n)||(e.line=o||e.line,e.lineStart=a||e.lineStart,e.position=l||e.position,Vr(e,"duplicated mapping key")),"__proto__"===n?Object.defineProperty(t,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):t[n]=i,delete r[n];return t}function Xr(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):Vr(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Zr(e,t,r){for(var s=0,n=e.input.charCodeAt(e.position);0!==n;){for(;Rr(n);)9===n&&-1===e.firstTabInLine&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&35===n)do{n=e.input.charCodeAt(++e.position)}while(10!==n&&13!==n&&0!==n);if(!_r(n))break;for(Xr(e),n=e.input.charCodeAt(e.position),s++,e.lineIndent=0;32===n;)e.lineIndent++,n=e.input.charCodeAt(++e.position)}return-1!==r&&0!==s&&e.lineIndent<r&&Wr(e,"deficient indentation"),s}function Qr(e){var t,r=e.position;return!(45!==(t=e.input.charCodeAt(r))&&46!==t||t!==e.input.charCodeAt(r+1)||t!==e.input.charCodeAt(r+2)||(r+=3,0!==(t=e.input.charCodeAt(r))&&!Fr(t)))}function es(e,t){1===t?e.result+=" ":t>1&&(e.result+=Bt.repeat("\n",t-1))}function ts(e,t){var r,s,n=e.tag,i=e.anchor,o=[],a=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),s=e.input.charCodeAt(e.position);0!==s&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,Vr(e,"tab characters must not be used in indentation")),45===s)&&Fr(e.input.charCodeAt(e.position+1));)if(a=!0,e.position++,Zr(e,!0,-1)&&e.lineIndent<=t)o.push(null),s=e.input.charCodeAt(e.position);else if(r=e.line,ns(e,t,3,!1,!0),o.push(e.result),Zr(e,!0,-1),s=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==s)Vr(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!a&&(e.tag=n,e.anchor=i,e.kind="sequence",e.result=o,!0)}function rs(e){var t,r,s,n,i=!1,o=!1;if(33!==(n=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&Vr(e,"duplication of a tag property"),60===(n=e.input.charCodeAt(++e.position))?(i=!0,n=e.input.charCodeAt(++e.position)):33===n?(o=!0,r="!!",n=e.input.charCodeAt(++e.position)):r="!",t=e.position,i){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&62!==n);e.position<e.length?(s=e.input.slice(t,e.position),n=e.input.charCodeAt(++e.position)):Vr(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==n&&!Fr(n);)33===n&&(o?Vr(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(t-1,e.position+1),Pr.test(r)||Vr(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),n=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Tr.test(s)&&Vr(e,"tag suffix cannot contain flow indicator characters")}s&&!Cr.test(s)&&Vr(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch(t){Vr(e,"tag name is malformed: "+s)}return i?e.tag=s:Ar.call(e.tagMap,r)?e.tag=e.tagMap[r]+s:"!"===r?e.tag="!"+s:"!!"===r?e.tag="tag:yaml.org,2002:"+s:Vr(e,'undeclared tag handle "'+r+'"'),!0}function ss(e){var t,r;if(38!==(r=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&Vr(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!Fr(r)&&!Mr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Vr(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function ns(e,t,r,s,n){var i,o,a,l,c,p,u,d,h,m=1,f=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=o=a=4===r||3===r,s&&Zr(e,!0,-1)&&(f=!0,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)),1===m)for(;rs(e)||ss(e);)Zr(e,!0,-1)?(f=!0,a=i,e.lineIndent>t?m=1:e.lineIndent===t?m=0:e.lineIndent<t&&(m=-1)):a=!1;if(a&&(a=f||n),1!==m&&4!==r||(d=1===r||2===r?t:t+1,h=e.position-e.lineStart,1===m?a&&(ts(e,h)||function(e,t,r){var s,n,i,o,a,l,c,p=e.tag,u=e.anchor,d={},h=Object.create(null),m=null,f=null,g=null,y=!1,v=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=d),c=e.input.charCodeAt(e.position);0!==c;){if(y||-1===e.firstTabInLine||(e.position=e.firstTabInLine,Vr(e,"tab characters must not be used in indentation")),s=e.input.charCodeAt(e.position+1),i=e.line,63!==c&&58!==c||!Fr(s)){if(o=e.line,a=e.lineStart,l=e.position,!ns(e,r,2,!1,!0))break;if(e.line===i){for(c=e.input.charCodeAt(e.position);Rr(c);)c=e.input.charCodeAt(++e.position);if(58===c)Fr(c=e.input.charCodeAt(++e.position))||Vr(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Yr(e,d,h,m,f,null,o,a,l),m=f=g=null),v=!0,y=!1,n=!1,m=e.tag,f=e.result;else{if(!v)return e.tag=p,e.anchor=u,!0;Vr(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return e.tag=p,e.anchor=u,!0;Vr(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(Yr(e,d,h,m,f,null,o,a,l),m=f=g=null),v=!0,y=!0,n=!0):y?(y=!1,n=!0):Vr(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,c=s;if((e.line===i||e.lineIndent>t)&&(y&&(o=e.line,a=e.lineStart,l=e.position),ns(e,t,4,!0,n)&&(y?f=e.result:g=e.result),y||(Yr(e,d,h,m,f,g,o,a,l),m=f=g=null),Zr(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&0!==c)Vr(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Yr(e,d,h,m,f,null,o,a,l),v&&(e.tag=p,e.anchor=u,e.kind="mapping",e.result=d),v}(e,h,d))||function(e,t){var r,s,n,i,o,a,l,c,p,u,d,h,m=!0,f=e.tag,g=e.anchor,y=Object.create(null);if(91===(h=e.input.charCodeAt(e.position)))o=93,c=!1,i=[];else{if(123!==h)return!1;o=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),h=e.input.charCodeAt(++e.position);0!==h;){if(Zr(e,!0,t),(h=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=f,e.anchor=g,e.kind=c?"mapping":"sequence",e.result=i,!0;m?44===h&&Vr(e,"expected the node content, but found ','"):Vr(e,"missed comma between flow collection entries"),d=null,a=l=!1,63===h&&Fr(e.input.charCodeAt(e.position+1))&&(a=l=!0,e.position++,Zr(e,!0,t)),r=e.line,s=e.lineStart,n=e.position,ns(e,t,1,!1,!0),u=e.tag,p=e.result,Zr(e,!0,t),h=e.input.charCodeAt(e.position),!l&&e.line!==r||58!==h||(a=!0,h=e.input.charCodeAt(++e.position),Zr(e,!0,t),ns(e,t,1,!1,!0),d=e.result),c?Yr(e,i,y,u,p,d,r,s,n):a?i.push(Yr(e,null,y,u,p,d,r,s,n)):i.push(p),Zr(e,!0,t),44===(h=e.input.charCodeAt(e.position))?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}Vr(e,"unexpected end of the stream within a flow collection")}(e,d)?g=!0:(o&&function(e,t){var r,s,n,i,o,a=1,l=!1,c=!1,p=t,u=0,d=!1;if(124===(i=e.input.charCodeAt(e.position)))s=!1;else{if(62!==i)return!1;s=!0}for(e.kind="scalar",e.result="";0!==i;)if(43===(i=e.input.charCodeAt(++e.position))||45===i)1===a?a=43===i?3:2:Vr(e,"repeat of a chomping mode identifier");else{if(!((n=48<=(o=i)&&o<=57?o-48:-1)>=0))break;0===n?Vr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Vr(e,"repeat of an indentation width identifier"):(p=t+n-1,c=!0)}if(Rr(i)){do{i=e.input.charCodeAt(++e.position)}while(Rr(i));if(35===i)do{i=e.input.charCodeAt(++e.position)}while(!_r(i)&&0!==i)}for(;0!==i;){for(Xr(e),e.lineIndent=0,i=e.input.charCodeAt(e.position);(!c||e.lineIndent<p)&&32===i;)e.lineIndent++,i=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>p&&(p=e.lineIndent),_r(i))u++;else{if(e.lineIndent<p){3===a?e.result+=Bt.repeat("\n",l?1+u:u):1===a&&l&&(e.result+="\n");break}for(s?Rr(i)?(d=!0,e.result+=Bt.repeat("\n",l?1+u:u)):d?(d=!1,e.result+=Bt.repeat("\n",u+1)):0===u?l&&(e.result+=" "):e.result+=Bt.repeat("\n",u):e.result+=Bt.repeat("\n",l?1+u:u),l=!0,c=!0,u=0,r=e.position;!_r(i)&&0!==i;)i=e.input.charCodeAt(++e.position);Jr(e,r,e.position,!1)}}return!0}(e,d)||function(e,t){var r,s,n;if(39!==(r=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,s=n=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(Jr(e,s,e.position,!0),39!==(r=e.input.charCodeAt(++e.position)))return!0;s=e.position,e.position++,n=e.position}else _r(r)?(Jr(e,s,n,!0),es(e,Zr(e,!1,t)),s=n=e.position):e.position===e.lineStart&&Qr(e)?Vr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Vr(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var r,s,n,i,o,a,l;if(34!==(a=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=s=e.position;0!==(a=e.input.charCodeAt(e.position));){if(34===a)return Jr(e,r,e.position,!0),e.position++,!0;if(92===a){if(Jr(e,r,e.position,!0),_r(a=e.input.charCodeAt(++e.position)))Zr(e,!1,t);else if(a<256&&qr[a])e.result+=Nr[a],e.position++;else if((o=120===(l=a)?2:117===l?4:85===l?8:0)>0){for(n=o,i=0;n>0;n--)(o=Lr(a=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+o:Vr(e,"expected hexadecimal character");e.result+=Br(i),e.position++}else Vr(e,"unknown escape sequence");r=s=e.position}else _r(a)?(Jr(e,r,s,!0),es(e,Zr(e,!1,t)),r=s=e.position):e.position===e.lineStart&&Qr(e)?Vr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,s=e.position)}Vr(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?g=!0:function(e){var t,r,s;if(42!==(s=e.input.charCodeAt(e.position)))return!1;for(s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!Fr(s)&&!Mr(s);)s=e.input.charCodeAt(++e.position);return e.position===t&&Vr(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ar.call(e.anchorMap,r)||Vr(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Zr(e,!0,-1),!0}(e)?(g=!0,null===e.tag&&null===e.anchor||Vr(e,"alias node should not have any properties")):function(e,t,r){var s,n,i,o,a,l,c,p,u=e.kind,d=e.result;if(Fr(p=e.input.charCodeAt(e.position))||Mr(p)||35===p||38===p||42===p||33===p||124===p||62===p||39===p||34===p||37===p||64===p||96===p)return!1;if((63===p||45===p)&&(Fr(s=e.input.charCodeAt(e.position+1))||r&&Mr(s)))return!1;for(e.kind="scalar",e.result="",n=i=e.position,o=!1;0!==p;){if(58===p){if(Fr(s=e.input.charCodeAt(e.position+1))||r&&Mr(s))break}else if(35===p){if(Fr(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Qr(e)||r&&Mr(p))break;if(_r(p)){if(a=e.line,l=e.lineStart,c=e.lineIndent,Zr(e,!1,-1),e.lineIndent>=t){o=!0,p=e.input.charCodeAt(e.position);continue}e.position=i,e.line=a,e.lineStart=l,e.lineIndent=c;break}}o&&(Jr(e,n,i,!1),es(e,e.line-a),n=i=e.position,o=!1),Rr(p)||(i=e.position+1),p=e.input.charCodeAt(++e.position)}return Jr(e,n,i,!1),!!e.result||(e.kind=u,e.result=d,!1)}(e,d,1===r)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(g=a&&ts(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&Vr(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l<c;l+=1)if((u=e.implicitTypes[l]).resolve(e.result)){e.result=u.construct(e.result),e.tag=u.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else if("!"!==e.tag){if(Ar.call(e.typeMap[e.kind||"fallback"],e.tag))u=e.typeMap[e.kind||"fallback"][e.tag];else for(u=null,l=0,c=(p=e.typeMap.multi[e.kind||"fallback"]).length;l<c;l+=1)if(e.tag.slice(0,p[l].tag.length)===p[l].tag){u=p[l];break}u||Vr(e,"unknown tag !<"+e.tag+">"),null!==e.result&&u.kind!==e.kind&&Vr(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):Vr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function is(e){var t,r,s,n,i=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(Zr(e,!0,-1),n=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==n));){for(o=!0,n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!Fr(n);)n=e.input.charCodeAt(++e.position);for(s=[],(r=e.input.slice(t,e.position)).length<1&&Vr(e,"directive name must not be less than one character in length");0!==n;){for(;Rr(n);)n=e.input.charCodeAt(++e.position);if(35===n){do{n=e.input.charCodeAt(++e.position)}while(0!==n&&!_r(n));break}if(_r(n))break;for(t=e.position;0!==n&&!Fr(n);)n=e.input.charCodeAt(++e.position);s.push(e.input.slice(t,e.position))}0!==n&&Xr(e),Ar.call(Gr,r)?Gr[r](e,r,s):Wr(e,'unknown document directive "'+r+'"')}Zr(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Zr(e,!0,-1)):o&&Vr(e,"directives end mark is expected"),ns(e,e.lineIndent-1,4,!1,!0),Zr(e,!0,-1),e.checkLineBreaks&&jr.test(e.input.slice(i,e.position))&&Wr(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Qr(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Zr(e,!0,-1)):e.position<e.length-1&&Vr(e,"end of the stream or a document separator is expected")}function os(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var r=new zr(e,t),s=e.indexOf("\0");for(-1!==s&&(r.position=s,Vr(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)is(r);return r.documents}var as=function(e,t,r){null!==t&&"object"==typeof t&&void 0===r&&(r=t,t=null);var s=os(e,r);if("function"!=typeof t)return s;for(var n=0,i=s.length;n<i;n+=1)t(s[n])},ls=function(e,t){var r=os(e,t);if(0!==r.length){if(1===r.length)return r[0];throw new Ut("expected a single document in the stream, but found more")}},cs=Object.prototype.toString,ps=Object.prototype.hasOwnProperty,us={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},ds=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],hs=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ms(e){var t,r,s;if(t=e.toString(16).toUpperCase(),e<=255)r="x",s=2;else if(e<=65535)r="u",s=4;else{if(!(e<=4294967295))throw new Ut("code point within a string may not be greater than 0xFFFFFFFF");r="U",s=8}return"\\"+r+Bt.repeat("0",s-t.length)+t}function fs(e){this.schema=e.schema||kr,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Bt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var r,s,n,i,o,a,l;if(null===t)return{};for(r={},n=0,i=(s=Object.keys(t)).length;n<i;n+=1)o=s[n],a=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=e.compiledTypeMap.fallback[o])&&ps.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function gs(e,t){for(var r,s=Bt.repeat(" ",t),n=0,i=-1,o="",a=e.length;n<a;)-1===(i=e.indexOf("\n",n))?(r=e.slice(n),n=a):(r=e.slice(n,i+1),n=i+1),r.length&&"\n"!==r&&(o+=s),o+=r;return o}function ys(e,t){return"\n"+Bt.repeat(" ",e.indent*t)}function vs(e){return 32===e||9===e}function bs(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function xs(e){return bs(e)&&65279!==e&&13!==e&&10!==e}function ws(e,t,r){var s=xs(e),n=s&&!vs(e);return(r?s:s&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e)&&35!==e&&!(58===t&&!n)||xs(t)&&!vs(t)&&35===e||58===t&&n}function $s(e,t){var r,s=e.charCodeAt(t);return s>=55296&&s<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1))>=56320&&r<=57343?1024*(s-55296)+r-56320+65536:s}function Ss(e){return/^\n* /.test(e)}function Es(e,t,r,s,n){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==ds.indexOf(t)||hs.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=s||e.flowLevel>-1&&r>=e.flowLevel;switch(function(e,t,r,s,n,i,o,a){var l,c,p=0,u=null,d=!1,h=!1,m=-1!==s,f=-1,g=bs(c=$s(e,0))&&65279!==c&&!vs(c)&&45!==c&&63!==c&&58!==c&&44!==c&&91!==c&&93!==c&&123!==c&&125!==c&&35!==c&&38!==c&&42!==c&&33!==c&&124!==c&&61!==c&&62!==c&&39!==c&&34!==c&&37!==c&&64!==c&&96!==c&&function(e){return!vs(e)&&58!==e}($s(e,e.length-1));if(t||o)for(l=0;l<e.length;p>=65536?l+=2:l++){if(!bs(p=$s(e,l)))return 5;g=g&&ws(p,u,a),u=p}else{for(l=0;l<e.length;p>=65536?l+=2:l++){if(10===(p=$s(e,l)))d=!0,m&&(h=h||l-f-1>s&&" "!==e[f+1],f=l);else if(!bs(p))return 5;g=g&&ws(p,u,a),u=p}h=h||m&&l-f-1>s&&" "!==e[f+1]}return d||h?r>9&&Ss(e)?5:o?2===i?5:2:h?4:3:!g||o||n(e)?2===i?5:2:1}(t,a,e.indent,o,(function(t){return function(e,t){var r,s;for(r=0,s=e.implicitTypes.length;r<s;r+=1)if(e.implicitTypes[r].resolve(t))return!0;return!1}(e,t)}),e.quotingType,e.forceQuotes&&!s,n)){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+ks(t,e.indent)+As(gs(t,i));case 4:return">"+ks(t,e.indent)+As(gs(function(e,t){for(var r,s,n,i=/(\n+)([^\n]*)/g,o=(n=-1!==(n=e.indexOf("\n"))?n:e.length,i.lastIndex=n,Os(e.slice(0,n),t)),a="\n"===e[0]||" "===e[0];s=i.exec(e);){var l=s[1],c=s[2];r=" "===c[0],o+=l+(a||r||""===c?"":"\n")+Os(c,t),a=r}return o}(t,o),i));case 5:return'"'+function(e){for(var t,r="",s=0,n=0;n<e.length;s>=65536?n+=2:n++)s=$s(e,n),!(t=us[s])&&bs(s)?(r+=e[n],s>=65536&&(r+=e[n+1])):r+=t||ms(s);return r}(t)+'"';default:throw new Ut("impossible error: invalid scalar style")}}()}function ks(e,t){var r=Ss(e)?String(t):"",s="\n"===e[e.length-1];return r+(!s||"\n"!==e[e.length-2]&&"\n"!==e?s?"":"-":"+")+"\n"}function As(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Os(e,t){if(""===e||" "===e[0])return e;for(var r,s,n=/ [^ ]/g,i=0,o=0,a=0,l="";r=n.exec(e);)(a=r.index)-i>t&&(s=o>i?o:a,l+="\n"+e.slice(i,s),i=s+1),o=a;return l+="\n",e.length-i>t&&o>i?l+=e.slice(i,o)+"\n"+e.slice(o+1):l+=e.slice(i),l.slice(1)}function js(e,t,r,s){var n,i,o,a="",l=e.tag;for(n=0,i=r.length;n<i;n+=1)o=r[n],e.replacer&&(o=e.replacer.call(r,String(n),o)),(Ps(e,t+1,o,!0,!0,!1,!0)||void 0===o&&Ps(e,t+1,null,!0,!0,!1,!0))&&(s&&""===a||(a+=ys(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=l,e.dump=a||"[]"}function Ts(e,t,r){var s,n,i,o,a,l;for(i=0,o=(n=r?e.explicitTypes:e.implicitTypes).length;i<o;i+=1)if(((a=n[i]).instanceOf||a.predicate)&&(!a.instanceOf||"object"==typeof t&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(l=e.styleMap[a.tag]||a.defaultStyle,"[object Function]"===cs.call(a.represent))s=a.represent(t,l);else{if(!ps.call(a.represent,l))throw new Ut("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');s=a.represent[l](t,l)}e.dump=s}return!0}return!1}function Ps(e,t,r,s,n,i,o){e.tag=null,e.dump=r,Ts(e,r,!1)||Ts(e,r,!0);var a,l=cs.call(e.dump),c=s;s&&(s=e.flowLevel<0||e.flowLevel>t);var p,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(n=!1),u&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&u&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===l)s&&0!==Object.keys(e.dump).length?(function(e,t,r,s){var n,i,o,a,l,c,p="",u=e.tag,d=Object.keys(r);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new Ut("sortKeys must be a boolean or a function");for(n=0,i=d.length;n<i;n+=1)c="",s&&""===p||(c+=ys(e,t)),a=r[o=d[n]],e.replacer&&(a=e.replacer.call(r,o,a)),Ps(e,t+1,o,!0,!0,!0)&&((l=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,l&&(c+=ys(e,t)),Ps(e,t+1,a,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",p+=c+=e.dump));e.tag=u,e.dump=p||"{}"}(e,t,e.dump,n),u&&(e.dump="&ref_"+p+e.dump)):(function(e,t,r){var s,n,i,o,a,l="",c=e.tag,p=Object.keys(r);for(s=0,n=p.length;s<n;s+=1)a="",""!==l&&(a+=", "),e.condenseFlow&&(a+='"'),o=r[i=p[s]],e.replacer&&(o=e.replacer.call(r,i,o)),Ps(e,t,i,!1,!1)&&(e.dump.length>1024&&(a+="? "),a+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ps(e,t,o,!1,!1)&&(l+=a+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===l)s&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?js(e,t-1,e.dump,n):js(e,t,e.dump,n),u&&(e.dump="&ref_"+p+e.dump)):(function(e,t,r){var s,n,i,o="",a=e.tag;for(s=0,n=r.length;s<n;s+=1)i=r[s],e.replacer&&(i=e.replacer.call(r,String(s),i)),(Ps(e,t,i,!1,!1)||void 0===i&&Ps(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}(e,t,e.dump),u&&(e.dump="&ref_"+p+" "+e.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(e.skipInvalid)return!1;throw new Ut("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&Es(e,e.dump,t,i,c)}null!==e.tag&&"?"!==e.tag&&(a=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),a="!"===e.tag[0]?"!"+a:"tag:yaml.org,2002:"===a.slice(0,18)?"!!"+a.slice(18):"!<"+a+">",e.dump=a+" "+e.dump)}return!0}function Cs(e,t){var r,s,n=[],i=[];for(Is(e,n,i),r=0,s=i.length;r<s;r+=1)t.duplicates.push(n[i[r]]);t.usedDuplicates=new Array(s)}function Is(e,t,r){var s,n,i;if(null!==e&&"object"==typeof e)if(-1!==(n=t.indexOf(e)))-1===r.indexOf(n)&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,i=e.length;n<i;n+=1)Is(e[n],t,r);else for(n=0,i=(s=Object.keys(e)).length;n<i;n+=1)Is(e[s[n]],t,r)}function _s(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Rs=Jt,Fs=Xt,Ms=tr,Ls=pr,Ds=ur,Bs=kr,qs=ls,Ns=as,Us=function(e,t){var r=new fs(t=t||{});r.noRefs||Cs(e,r);var s=e;return r.replacer&&(s=r.replacer.call({"":s},"",s)),Ps(r,0,s,!0,!0)?r.dump+"\n":""},zs=Ut,Hs={binary:yr,float:cr,map:er,null:rr,pairs:$r,set:Er,timestamp:mr,bool:sr,int:or,merge:fr,omap:xr,seq:Qt,str:Zt},Vs=_s("safeLoad","load"),Ws=_s("safeLoadAll","loadAll"),Gs=_s("safeDump","dump"),Js={Type:Rs,Schema:Fs,FAILSAFE_SCHEMA:Ms,JSON_SCHEMA:Ls,CORE_SCHEMA:Ds,DEFAULT_SCHEMA:Bs,load:qs,loadAll:Ns,dump:Us,YAMLException:zs,types:Hs,safeLoad:Vs,safeLoadAll:Ws,safeDump:Gs};function Ks(e={}){return"function"!=typeof e.entries?{}:Array.from(e.entries()).reduce(((e,[t,r])=>(e[t]=function(e){return e.includes(", ")?e.split(", "):e}(r),e)),{})}function Ys(e,t,{loadSpec:r=!1}={}){const s={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:Ks(e.headers)},n=s.headers["content-type"],i=r||((e="")=>/(json|xml|yaml|text)\b/.test(e))(n);return(i?e.text:e.blob||e.buffer).call(e).then((e=>{if(s.text=e,s.data=e,i)try{const t=function(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):Js.load(e)}(e,n);s.body=t,s.obj=t}catch(e){s.parseError=e}return s}))}async function Xs(e,t={}){"object"==typeof e&&(e=(t=e).url),t.headers=t.headers||{},(t=Lt(t)).headers&&Object.keys(t.headers).forEach((e=>{const r=t.headers[e];"string"==typeof r&&(t.headers[e]=r.replace(/\n+/g," "))})),t.requestInterceptor&&(t=await t.requestInterceptor(t)||t);const r=t.headers["content-type"]||t.headers["Content-Type"];let s;/multipart\/form-data/i.test(r)&&(delete t.headers["content-type"],delete t.headers["Content-Type"]);try{s=await(t.userFetch||fetch)(t.url,t),s=await Ys(s,e,t),t.responseInterceptor&&(s=await t.responseInterceptor(s)||s)}catch(e){if(!s)throw e;const t=new Error(s.statusText||`response status is ${s.status}`);throw t.status=s.status,t.statusCode=s.status,t.responseError=e,t}if(!s.ok){const e=new Error(s.statusText||`response status is ${s.status}`);throw e.status=s.status,e.statusCode=s.status,e.response=s,e}return s}function Zs(e,t={}){const{requestInterceptor:r,responseInterceptor:s}=t,n=e.withCredentials?"include":"same-origin";return t=>e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:s,headers:{Accept:"application/json, application/yaml"},credentials:n}).then((e=>e.body))}const Qs=e=>{var t,r;const{baseDoc:s,url:n}=e,i=null!==(t=null!=s?s:n)&&void 0!==t?t:"";return"string"==typeof(null===(r=globalThis.document)||void 0===r?void 0:r.baseURI)?String(new URL(i,globalThis.document.baseURI)):i},en=e=>{const{fetch:t,http:r}=e;return t||r||Xs};var tn,rn=(tn=function(e,t){return tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},tn(e,t)},function(e,t){function r(){this.constructor=e}tn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),sn=Object.prototype.hasOwnProperty;function nn(e,t){return sn.call(e,t)}function on(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var s=[];for(var n in e)nn(e,n)&&s.push(n);return s}function an(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function ln(e){for(var t,r=0,s=e.length;r<s;){if(!((t=e.charCodeAt(r))>=48&&t<=57))return!1;r++}return!0}function cn(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function pn(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function un(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,r=e.length;t<r;t++)if(un(e[t]))return!0}else if("object"==typeof e)for(var s=on(e),n=s.length,i=0;i<n;i++)if(un(e[s[i]]))return!0;return!1}function dn(e,t){var r=[e];for(var s in t){var n="object"==typeof t[s]?JSON.stringify(t[s],null,2):t[s];void 0!==n&&r.push(s+": "+n)}return r.join("\n")}var hn=function(e){function t(t,r,s,n,i){var o=this.constructor,a=e.call(this,dn(t,{name:r,index:s,operation:n,tree:i}))||this;return a.name=r,a.index=s,a.operation=n,a.tree=i,Object.setPrototypeOf(a,o.prototype),a.message=dn(t,{name:r,index:s,operation:n,tree:i}),a}return rn(t,e),t}(Error),mn=hn,fn=an,gn={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var s=e[t];return delete e[t],{newDocument:r,removed:s}},replace:function(e,t,r){var s=e[t];return e[t]=this.value,{newDocument:r,removed:s}},move:function(e,t,r){var s=vn(r,this.path);s&&(s=an(s));var n=bn(r,{op:"remove",path:this.from}).removed;return bn(r,{op:"add",path:this.path,value:n}),{newDocument:r,removed:s}},copy:function(e,t,r){var s=vn(r,this.from);return bn(r,{op:"add",path:this.path,value:an(s)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:Sn(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},yn={add:function(e,t,r){return ln(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){return{newDocument:r,removed:e.splice(t,1)[0]}},replace:function(e,t,r){var s=e[t];return e[t]=this.value,{newDocument:r,removed:s}},move:gn.move,copy:gn.copy,test:gn.test,_get:gn._get};function vn(e,t){if(""==t)return e;var r={op:"_get",path:t};return bn(e,r),r.value}function bn(e,t,r,s,n,i){if(void 0===r&&(r=!1),void 0===s&&(s=!0),void 0===n&&(n=!0),void 0===i&&(i=0),r&&("function"==typeof r?r(t,0,e,t.path):wn(t,0)),""===t.path){var o={newDocument:e};if("add"===t.op)return o.newDocument=t.value,o;if("replace"===t.op)return o.newDocument=t.value,o.removed=e,o;if("move"===t.op||"copy"===t.op)return o.newDocument=vn(e,t.from),"move"===t.op&&(o.removed=e),o;if("test"===t.op){if(o.test=Sn(e,t.value),!1===o.test)throw new mn("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o.newDocument=e,o}if("remove"===t.op)return o.removed=e,o.newDocument=null,o;if("_get"===t.op)return t.value=e,o;if(r)throw new mn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return o}s||(e=an(e));var a=(t.path||"").split("/"),l=e,c=1,p=a.length,u=void 0,d=void 0,h=void 0;for(h="function"==typeof r?r:wn;;){if((d=a[c])&&-1!=d.indexOf("~")&&(d=pn(d)),n&&("__proto__"==d||"prototype"==d&&c>0&&"constructor"==a[c-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&void 0===u&&(void 0===l[d]?u=a.slice(0,c).join("/"):c==p-1&&(u=t.path),void 0!==u&&h(t,0,e,u)),c++,Array.isArray(l)){if("-"===d)d=l.length;else{if(r&&!ln(d))throw new mn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);ln(d)&&(d=~~d)}if(c>=p){if(r&&"add"===t.op&&d>l.length)throw new mn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);if(!1===(o=yn[t.op].call(t,l,d,e)).test)throw new mn("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o}}else if(c>=p){if(!1===(o=gn[t.op].call(t,l,d,e)).test)throw new mn("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return o}if(l=l[d],r&&c<p&&(!l||"object"!=typeof l))throw new mn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",i,t,e)}}function xn(e,t,r,s,n){if(void 0===s&&(s=!0),void 0===n&&(n=!0),r&&!Array.isArray(t))throw new mn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");s||(e=an(e));for(var i=new Array(t.length),o=0,a=t.length;o<a;o++)i[o]=bn(e,t[o],r,!0,n,o),e=i[o].newDocument;return i.newDocument=e,i}function wn(e,t,r,s){if("object"!=typeof e||null===e||Array.isArray(e))throw new mn("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);if(!gn[e.op])throw new mn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r);if("string"!=typeof e.path)throw new mn("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new mn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new mn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new mn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&un(e.value))throw new mn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r)if("add"==e.op){var n=e.path.split("/").length,i=s.split("/").length;if(n!==i+1&&n!==i)throw new mn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==s)throw new mn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if("move"===e.op||"copy"===e.op){var o=$n([{op:"_get",path:e.from,value:void 0}],r);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new mn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}function $n(e,t,r){try{if(!Array.isArray(e))throw new mn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)xn(an(t),an(e),r||!0);else{r=r||wn;for(var s=0;s<e.length;s++)r(e[s],s,t,void 0)}}catch(e){if(e instanceof mn)return e;throw e}}function Sn(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var r,s,n,i=Array.isArray(e),o=Array.isArray(t);if(i&&o){if((s=e.length)!=t.length)return!1;for(r=s;0!=r--;)if(!Sn(e[r],t[r]))return!1;return!0}if(i!=o)return!1;var a=Object.keys(e);if((s=a.length)!==Object.keys(t).length)return!1;for(r=s;0!=r--;)if(!t.hasOwnProperty(a[r]))return!1;for(r=s;0!=r--;)if(!Sn(e[n=a[r]],t[n]))return!1;return!0}return e!=e&&t!=t}const En=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:mn,_areEquals:Sn,applyOperation:bn,applyPatch:xn,applyReducer:function(e,t,r){var s=bn(e,t);if(!1===s.test)throw new mn("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return s.newDocument},deepClone:fn,getValueByPointer:vn,validate:$n,validator:wn},Symbol.toStringTag,{value:"Module"}));var kn=new WeakMap,An=function(e){this.observers=new Map,this.obj=e},On=function(e,t){this.callback=e,this.observer=t};function jn(e,t){void 0===t&&(t=!1);var r=kn.get(e.object);Tn(r.value,e.object,e.patches,"",t),e.patches.length&&xn(r.value,e.patches);var s=e.patches;return s.length>0&&(e.patches=[],e.callback&&e.callback(s)),s}function Tn(e,t,r,s,n){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=on(t),o=on(e),a=!1,l=o.length-1;l>=0;l--){var c=e[u=o[l]];if(!nn(t,u)||void 0===t[u]&&void 0!==c&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:s+"/"+cn(u),value:an(c)}),r.push({op:"remove",path:s+"/"+cn(u)}),a=!0):(n&&r.push({op:"test",path:s,value:e}),r.push({op:"replace",path:s,value:t}));else{var p=t[u];"object"==typeof c&&null!=c&&"object"==typeof p&&null!=p&&Array.isArray(c)===Array.isArray(p)?Tn(c,p,r,s+"/"+cn(u),n):c!==p&&(n&&r.push({op:"test",path:s+"/"+cn(u),value:an(c)}),r.push({op:"replace",path:s+"/"+cn(u),value:an(p)}))}}if(a||i.length!=o.length)for(l=0;l<i.length;l++){var u;nn(e,u=i[l])||void 0===t[u]||r.push({op:"add",path:s+"/"+cn(u),value:an(t[u])})}}}const Pn=Object.freeze(Object.defineProperty({__proto__:null,compare:function(e,t,r){void 0===r&&(r=!1);var s=[];return Tn(e,t,s,"",r),s},generate:jn,observe:function(e,t){var r,s=function(e){return kn.get(e)}(e);if(s){var n=function(e,t){return e.observers.get(t)}(s,t);r=n&&n.observer}else s=new An(e),kn.set(e,s);if(r)return r;if(r={},s.value=an(e),t){r.callback=t,r.next=null;var i=function(){jn(r)},o=function(){clearTimeout(r.next),r.next=setTimeout(i)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return r.patches=[],r.object=e,r.unobserve=function(){jn(r),clearTimeout(r.next),function(e,t){e.observers.delete(t.callback)}(s,r),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},s.observers.set(t,new On(t,r)),r},unobserve:function(e,t){t.unobserve()}},Symbol.toStringTag,{value:"Module"}));function Cn(e){return e&&e.t&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.assign({},En,Pn,{JsonPatchError:hn,deepClone:an,escapePathComponent:cn,unescapePathComponent:pn});var In=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===_n}(e)}(e)},_n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Rn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Dn((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function Fn(e,t,r){return e.concat(t).map((function(e){return Rn(e,r)}))}function Mn(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ln(e,t){try{return t in e}catch(e){return!1}}function Dn(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Fn,r.isMergeableObject=r.isMergeableObject||In,r.cloneUnlessOtherwiseSpecified=Rn;var s=Array.isArray(t);return s===Array.isArray(e)?s?r.arrayMerge(e,t,r):function(e,t,r){var s={};return r.isMergeableObject(e)&&Mn(e).forEach((function(t){s[t]=Rn(e[t],r)})),Mn(t).forEach((function(n){(function(e,t){return Ln(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,n)||(Ln(e,n)&&r.isMergeableObject(t[n])?s[n]=function(e,t){if(!t.customMerge)return Dn;var r=t.customMerge(e);return"function"==typeof r?r:Dn}(n,r)(e[n],t[n],r):s[n]=Rn(t[n],r))})),s}(e,t,r):Rn(t,r)}Dn.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Dn(e,r,t)}),{})};const Bn=Cn(Dn),qn={add:function(e,t){return{op:"add",path:e,value:t}},replace:Un,remove:function(e){return{op:"remove",path:e}},merge:function(e,t){return{type:"mutation",op:"merge",path:e,value:t}},mergeDeep:function(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}},context:function(e,t){return{type:"context",path:e,value:t}},getIn:function(e,t){return t.reduce(((e,t)=>void 0!==t&&e?e[t]:e),e)},applyPatch:function(e,t,r){if(r=r||{},"merge"===(t={...t,path:t.path&&Nn(t.path)}).op){const r=ti(e,t.path);Object.assign(r,t.value),xn(e,[Un(t.path,r)])}else if("mergeDeep"===t.op){const r=ti(e,t.path),s=Bn(r,t.value);e=xn(e,[Un(t.path,s)]).newDocument}else if("add"===t.op&&""===t.path&&Kn(t.value)){const r=Object.keys(t.value).reduce(((e,r)=>(e.push({op:"add",path:`/${Nn(r)}`,value:t.value[r]}),e)),[]);xn(e,r)}else if("replace"===t.op&&""===t.path){let{value:s}=t;r.allowMetaPatches&&t.meta&&Qn(t)&&(Array.isArray(t.value)||Kn(t.value))&&(s={...s,...t.meta}),e=s}else if(xn(e,[t]),r.allowMetaPatches&&t.meta&&Qn(t)&&(Array.isArray(t.value)||Kn(t.value))){const r={...ti(e,t.path),...t.meta};xn(e,[Un(t.path,r)])}return e},parentPathMatch:function(e,t){if(!Array.isArray(t))return!1;for(let r=0,s=t.length;r<s;r+=1)if(t[r]!==e[r])return!1;return!0},flatten:Gn,fullyNormalizeArray:function(e){return Jn(Gn(Wn(e)))},normalizeArray:Wn,isPromise:function(e){return Kn(e)&&Yn(e.then)},forEachNew:function(e,t){try{return zn(e,Vn,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return zn(e,Hn,t)}catch(e){return e}},isJsonPatch:Xn,isContextPatch:function(e){return ei(e)&&"context"===e.type},isPatch:ei,isMutation:Zn,isAdditiveMutation:Qn,isGenerator:function(e){return"[object GeneratorFunction]"===Object.prototype.toString.call(e)},isFunction:Yn,isObject:Kn,isError:function(e){return e instanceof Error}};function Nn(e){return Array.isArray(e)?e.length<1?"":`/${e.map((e=>(e+"").replace(/~/g,"~0").replace(/\//g,"~1"))).join("/")}`:e}function Un(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function zn(e,t,r){return Jn(Gn(e.filter(Qn).map((e=>t(e.value,r,e.path)))||[]))}function Hn(e,t,r){return r=r||[],Array.isArray(e)?e.map(((e,s)=>Hn(e,t,r.concat(s)))):Kn(e)?Object.keys(e).map((s=>Hn(e[s],t,r.concat(s)))):t(e,r[r.length-1],r)}function Vn(e,t,r){let s=[];if((r=r||[]).length>0){const n=t(e,r[r.length-1],r);n&&(s=s.concat(n))}if(Array.isArray(e)){const n=e.map(((e,s)=>Vn(e,t,r.concat(s))));n&&(s=s.concat(n))}else if(Kn(e)){const n=Object.keys(e).map((s=>Vn(e[s],t,r.concat(s))));n&&(s=s.concat(n))}return s=Gn(s),s}function Wn(e){return Array.isArray(e)?e:[e]}function Gn(e){return[].concat(...e.map((e=>Array.isArray(e)?Gn(e):e)))}function Jn(e){return e.filter((e=>void 0!==e))}function Kn(e){return e&&"object"==typeof e}function Yn(e){return e&&"function"==typeof e}function Xn(e){if(ei(e)){const{op:t}=e;return"add"===t||"remove"===t||"replace"===t}return!1}function Zn(e){return Xn(e)||ei(e)&&"mutation"===e.type}function Qn(e){return Zn(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function ei(e){return e&&"object"==typeof e}function ti(e,t){try{return vn(e,t)}catch(e){return console.error(e),{}}}var ri=function(e){return e&&e.Math===Math&&e},si=ri("object"==typeof globalThis&&globalThis)||ri("object"==typeof window&&window)||ri("object"==typeof self&&self)||ri("object"==typeof global&&global)||ri(!1)||function(){return this}()||Function("return this")(),ni=function(e){try{return!!e()}catch(e){return!0}},ii=!ni((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),oi=ii,ai=Function.prototype,li=ai.apply,ci=ai.call,pi="object"==typeof Reflect&&Reflect.apply||(oi?ci.bind(li):function(){return ci.apply(li,arguments)}),ui=ii,di=Function.prototype,hi=di.call,mi=ui&&di.bind.bind(hi,hi),fi=ui?mi:function(e){return function(){return hi.apply(e,arguments)}},gi=fi,yi=gi({}.toString),vi=gi("".slice),bi=function(e){return vi(yi(e),8,-1)},xi=bi,wi=fi,$i=function(e){if("Function"===xi(e))return wi(e)},Si="object"==typeof document&&document.all,Ei=void 0===Si&&void 0!==Si?function(e){return"function"==typeof e||e===Si}:function(e){return"function"==typeof e},ki={},Ai=!ni((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Oi=ii,ji=Function.prototype.call,Ti=Oi?ji.bind(ji):function(){return ji.apply(ji,arguments)},Pi={},Ci={}.propertyIsEnumerable,Ii=Object.getOwnPropertyDescriptor,_i=Ii&&!Ci.call({1:2},1);Pi.f=_i?function(e){var t=Ii(this,e);return!!t&&t.enumerable}:Ci;var Ri,Fi,Mi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Li=ni,Di=bi,Bi=Object,qi=fi("".split),Ni=Li((function(){return!Bi("z").propertyIsEnumerable(0)}))?function(e){return"String"===Di(e)?qi(e,""):Bi(e)}:Bi,Ui=function(e){return null==e},zi=Ui,Hi=TypeError,Vi=function(e){if(zi(e))throw new Hi("Can't call method on "+e);return e},Wi=Ni,Gi=Vi,Ji=function(e){return Wi(Gi(e))},Ki=Ei,Yi=function(e){return"object"==typeof e?null!==e:Ki(e)},Xi={},Zi=Xi,Qi=si,eo=Ei,to=function(e){return eo(e)?e:void 0},ro=function(e,t){return arguments.length<2?to(Zi[e])||to(Qi[e]):Zi[e]&&Zi[e][t]||Qi[e]&&Qi[e][t]},so=fi({}.isPrototypeOf),no=si.navigator,io=no&&no.userAgent,oo=si,ao=io?String(io):"",lo=oo.process,co=oo.Deno,po=lo&&lo.versions||co&&co.version,uo=po&&po.v8;uo&&(Fi=(Ri=uo.split("."))[0]>0&&Ri[0]<4?1:+(Ri[0]+Ri[1])),!Fi&&ao&&(!(Ri=ao.match(/Edge\/(\d+)/))||Ri[1]>=74)&&(Ri=ao.match(/Chrome\/(\d+)/))&&(Fi=+Ri[1]);var ho=Fi,mo=ni,fo=si.String,go=!!Object.getOwnPropertySymbols&&!mo((function(){var e=Symbol("symbol detection");return!fo(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ho&&ho<41})),yo=go&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,vo=ro,bo=Ei,xo=so,wo=Object,$o=yo?function(e){return"symbol"==typeof e}:function(e){var t=vo("Symbol");return bo(t)&&xo(t.prototype,wo(e))},So=String,Eo=function(e){try{return So(e)}catch(e){return"Object"}},ko=Ei,Ao=Eo,Oo=TypeError,jo=function(e){if(ko(e))return e;throw new Oo(Ao(e)+" is not a function")},To=jo,Po=Ui,Co=function(e,t){var r=e[t];return Po(r)?void 0:To(r)},Io=Ti,_o=Ei,Ro=Yi,Fo=TypeError,Mo={exports:{}},Lo=si,Do=Object.defineProperty,Bo=si,qo=Mo.exports=Bo.o||function(e,t){try{Do(Lo,e,{value:t,configurable:!0,writable:!0})}catch(r){Lo[e]=t}return t}("__core-js_shared__",{});(qo.versions||(qo.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var No=Mo.exports,Uo=No,zo=function(e,t){return Uo[e]||(Uo[e]=t||{})},Ho=Vi,Vo=Object,Wo=function(e){return Vo(Ho(e))},Go=Wo,Jo=fi({}.hasOwnProperty),Ko=Object.hasOwn||function(e,t){return Jo(Go(e),t)},Yo=fi,Xo=0,Zo=Math.random(),Qo=Yo(1..toString),ea=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Qo(++Xo+Zo,36)},ta=zo,ra=Ko,sa=ea,na=go,ia=yo,oa=si.Symbol,aa=ta("wks"),la=ia?oa.for||oa:oa&&oa.withoutSetter||sa,ca=function(e){return ra(aa,e)||(aa[e]=na&&ra(oa,e)?oa[e]:la("Symbol."+e)),aa[e]},pa=Ti,ua=Yi,da=$o,ha=Co,ma=TypeError,fa=ca("toPrimitive"),ga=function(e,t){if(!ua(e)||da(e))return e;var r,s=ha(e,fa);if(s){if(void 0===t&&(t="default"),r=pa(s,e,t),!ua(r)||da(r))return r;throw new ma("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,s;if("string"===t&&_o(r=e.toString)&&!Ro(s=Io(r,e)))return s;if(_o(r=e.valueOf)&&!Ro(s=Io(r,e)))return s;if("string"!==t&&_o(r=e.toString)&&!Ro(s=Io(r,e)))return s;throw new Fo("Can't convert object to primitive value")}(e,t)},ya=$o,va=function(e){var t=ga(e,"string");return ya(t)?t:t+""},ba=Yi,xa=si.document,wa=ba(xa)&&ba(xa.createElement),$a=function(e){return wa?xa.createElement(e):{}},Sa=$a,Ea=!Ai&&!ni((function(){return 7!==Object.defineProperty(Sa("div"),"a",{get:function(){return 7}}).a})),ka=Ai,Aa=Ti,Oa=Pi,ja=Mi,Ta=Ji,Pa=va,Ca=Ko,Ia=Ea,_a=Object.getOwnPropertyDescriptor;ki.f=ka?_a:function(e,t){if(e=Ta(e),t=Pa(t),Ia)try{return _a(e,t)}catch(e){}if(Ca(e,t))return ja(!Aa(Oa.f,e,t),e[t])};var Ra=ni,Fa=Ei,Ma=/#|\.prototype\./,La=function(e,t){var r=Ba[Da(e)];return r===Na||r!==qa&&(Fa(t)?Ra(t):!!t)},Da=La.normalize=function(e){return String(e).replace(Ma,".").toLowerCase()},Ba=La.data={},qa=La.NATIVE="N",Na=La.POLYFILL="P",Ua=La,za=jo,Ha=ii,Va=$i($i.bind),Wa=function(e,t){return za(e),void 0===t?e:Ha?Va(e,t):function(){return e.apply(t,arguments)}},Ga={},Ja=Ai&&ni((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ka=Yi,Ya=String,Xa=TypeError,Za=function(e){if(Ka(e))return e;throw new Xa(Ya(e)+" is not an object")},Qa=Ai,el=Ea,tl=Ja,rl=Za,sl=va,nl=TypeError,il=Object.defineProperty,ol=Object.getOwnPropertyDescriptor;Ga.f=Qa?tl?function(e,t,r){if(rl(e),t=sl(t),rl(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var s=ol(e,t);s&&s.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:s.configurable,enumerable:"enumerable"in r?r.enumerable:s.enumerable,writable:!1})}return il(e,t,r)}:il:function(e,t,r){if(rl(e),t=sl(t),rl(r),el)try{return il(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new nl("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var al=Ga,ll=Mi,cl=Ai?function(e,t,r){return al.f(e,t,ll(1,r))}:function(e,t,r){return e[t]=r,e},pl=si,ul=pi,dl=$i,hl=Ei,ml=ki.f,fl=Ua,gl=Xi,yl=Wa,vl=cl,bl=Ko,xl=function(e){var t=function(r,s,n){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,s)}return new e(r,s,n)}return ul(e,this,arguments)};return t.prototype=e.prototype,t},wl=function(e,t){var r,s,n,i,o,a,l,c,p,u=e.target,d=e.global,h=e.stat,m=e.proto,f=d?pl:h?pl[u]:pl[u]&&pl[u].prototype,g=d?gl:gl[u]||vl(gl,u,{})[u],y=g.prototype;for(i in t)s=!(r=fl(d?i:u+(h?".":"#")+i,e.forced))&&f&&bl(f,i),a=g[i],s&&(l=e.dontCallGetSet?(p=ml(f,i))&&p.value:f[i]),o=s&&l?l:t[i],(r||m||typeof a!=typeof o)&&(c=e.bind&&s?yl(o,pl):e.wrap&&s?xl(o):m&&hl(o)?dl(o):o,(e.sham||o&&o.sham||a&&a.sham)&&vl(c,"sham",!0),vl(g,i,c),m&&(bl(gl,n=u+"Prototype")||vl(gl,n,{}),vl(gl[n],i,o),e.real&&y&&(r||!y[i])&&vl(y,i,o)))},$l=ea,Sl=zo("keys"),El=function(e){return Sl[e]||(Sl[e]=$l(e))},kl=!ni((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Al=Ko,Ol=Ei,jl=Wo,Tl=kl,Pl=El("IE_PROTO"),Cl=Object,Il=Cl.prototype,_l=Tl?Cl.getPrototypeOf:function(e){var t=jl(e);if(Al(t,Pl))return t[Pl];var r=t.constructor;return Ol(r)&&t instanceof r?r.prototype:t instanceof Cl?Il:null},Rl=fi,Fl=jo,Ml=Yi,Ll=String,Dl=TypeError,Bl=Yi,ql=Vi,Nl=function(e){if(function(e){return Ml(e)||null===e}(e))return e;throw new Dl("Can't set "+Ll(e)+" as a prototype")},Ul=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return Rl(Fl(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,s){return ql(r),Nl(s),Bl(r)?(t?e(r,s):r.__proto__=s,r):r}}():void 0),zl={},Hl=Math.ceil,Vl=Math.floor,Wl=Math.trunc||function(e){var t=+e;return(t>0?Vl:Hl)(t)},Gl=function(e){var t=+e;return t!=t||0===t?0:Wl(t)},Jl=Gl,Kl=Math.max,Yl=Math.min,Xl=Gl,Zl=Math.min,Ql=function(e){return function(e){var t=Xl(e);return t>0?Zl(t,9007199254740991):0}(e.length)},ec=Ji,tc=Ql,rc=function(e){return function(t,r,s){var n=ec(t),i=tc(n);if(0===i)return!e&&-1;var o,a=function(e,t){var r=Jl(e);return r<0?Kl(r+t,0):Yl(r,t)}(s,i);if(e&&r!=r){for(;i>a;)if((o=n[a++])!=o)return!0}else for(;i>a;a++)if((e||a in n)&&n[a]===r)return e||a||0;return!e&&-1}},sc={includes:rc(!0),indexOf:rc(!1)},nc={},ic=Ko,oc=Ji,ac=sc.indexOf,lc=nc,cc=fi([].push),pc=function(e,t){var r,s=oc(e),n=0,i=[];for(r in s)!ic(lc,r)&&ic(s,r)&&cc(i,r);for(;t.length>n;)ic(s,r=t[n++])&&(~ac(i,r)||cc(i,r));return i},uc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dc=pc,hc=uc.concat("length","prototype");zl.f=Object.getOwnPropertyNames||function(e){return dc(e,hc)};var mc={};mc.f=Object.getOwnPropertySymbols;var fc=ro,gc=zl,yc=mc,vc=Za,bc=fi([].concat),xc=fc("Reflect","ownKeys")||function(e){var t=gc.f(vc(e)),r=yc.f;return r?bc(t,r(e)):t},wc=Ko,$c=xc,Sc=ki,Ec=Ga,kc=function(e,t,r){for(var s=$c(t),n=Ec.f,i=Sc.f,o=0;o<s.length;o++){var a=s[o];wc(e,a)||r&&wc(r,a)||n(e,a,i(t,a))}},Ac={},Oc=pc,jc=uc,Tc=Object.keys||function(e){return Oc(e,jc)},Pc=Ai,Cc=Ja,Ic=Ga,_c=Za,Rc=Ji,Fc=Tc;Ac.f=Pc&&!Cc?Object.defineProperties:function(e,t){_c(e);for(var r,s=Rc(t),n=Fc(t),i=n.length,o=0;i>o;)Ic.f(e,r=n[o++],s[r]);return e};var Mc,Lc=ro("document","documentElement"),Dc=Za,Bc=Ac,qc=uc,Nc=nc,Uc=Lc,zc=$a,Hc=El("IE_PROTO"),Vc=function(){},Wc=function(e){return"<script>"+e+"<\/script>"},Gc=function(e){e.write(Wc("")),e.close();var t=e.parentWindow.Object;return e=null,t},Jc=function(){try{Mc=new ActiveXObject("htmlfile")}catch(e){}var e,t;Jc="undefined"!=typeof document?document.domain&&Mc?Gc(Mc):((t=zc("iframe")).style.display="none",Uc.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Wc("document.F=Object")),e.close(),e.F):Gc(Mc);for(var r=qc.length;r--;)delete Jc.prototype[qc[r]];return Jc()};Nc[Hc]=!0;var Kc=Object.create||function(e,t){var r;return null!==e?(Vc.prototype=Dc(e),r=new Vc,Vc.prototype=null,r[Hc]=e):r=Jc(),void 0===t?r:Bc.f(r,t)},Yc=Yi,Xc=cl,Zc=function(e,t){Yc(t)&&"cause"in t&&Xc(e,"cause",t.cause)},Qc=Error,ep=fi("".replace),tp=String(new Qc("zxcasd").stack),rp=/\n\s*at [^:]*:[^\n]*/,sp=rp.test(tp),np=Mi,ip=!ni((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",np(1,7)),7!==e.stack)})),op=cl,ap=ip,lp=Error.captureStackTrace,cp=function(e,t,r,s){ap&&(lp?lp(e,t):op(e,"stack",function(e,t){if(sp&&"string"==typeof e&&!Qc.prepareStackTrace)for(;t--;)e=ep(e,rp,"");return e}(r,s)))},pp={},up=pp,dp=ca("iterator"),hp=Array.prototype,mp={};mp[ca("toStringTag")]="z";var fp="[object z]"===String(mp),gp=fp,yp=Ei,vp=bi,bp=ca("toStringTag"),xp=Object,wp="Arguments"===vp(function(){return arguments}()),$p=gp?vp:function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=xp(e),bp))?r:wp?vp(t):"Object"===(s=vp(t))&&yp(t.callee)?"Arguments":s},Sp=$p,Ep=Co,kp=Ui,Ap=pp,Op=ca("iterator"),jp=function(e){if(!kp(e))return Ep(e,Op)||Ep(e,"@@iterator")||Ap[Sp(e)]},Tp=Ti,Pp=jo,Cp=Za,Ip=Eo,_p=jp,Rp=TypeError,Fp=Ti,Mp=Za,Lp=Co,Dp=Wa,Bp=Ti,qp=Za,Np=Eo,Up=Ql,zp=so,Hp=jp,Vp=function(e,t,r){var s,n;Mp(e);try{if(!(s=Lp(e,"return"))){if("throw"===t)throw r;return r}s=Fp(s,e)}catch(e){n=!0,s=e}if("throw"===t)throw r;if(n)throw s;return Mp(s),r},Wp=TypeError,Gp=function(e,t){this.stopped=e,this.result=t},Jp=Gp.prototype,Kp=$p,Yp=String,Xp=function(e){if("Symbol"===Kp(e))throw new TypeError("Cannot convert a Symbol value to a string");return Yp(e)},Zp=Xp,Qp=function(e,t){return void 0===e?arguments.length<2?"":t:Zp(e)},eu=wl,tu=so,ru=_l,su=Ul,nu=kc,iu=Kc,ou=cl,au=Mi,lu=Zc,cu=cp,pu=function(e,t,r){var s,n,i,o,a,l,c,p=r&&r.that,u=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),m=!(!r||!r.INTERRUPTED),f=Dp(t,p),g=function(e){return s&&Vp(s,"normal",e),new Gp(!0,e)},y=function(e){return u?(qp(e),m?f(e[0],e[1],g):f(e[0],e[1])):m?f(e,g):f(e)};if(d)s=e.iterator;else if(h)s=e;else{if(!(n=Hp(e)))throw new Wp(Np(e)+" is not iterable");if(function(e){return void 0!==e&&(up.Array===e||hp[dp]===e)}(n)){for(i=0,o=Up(e);o>i;i++)if((a=y(e[i]))&&zp(Jp,a))return a;return new Gp(!1)}s=function(e,t){var r=arguments.length<2?_p(e):t;if(Pp(r))return Cp(Tp(r,e));throw new Rp(Ip(e)+" is not iterable")}(e,n)}for(l=d?e.next:s.next;!(c=Bp(l,s)).done;){try{a=y(c.value)}catch(e){Vp(s,"throw",e)}if("object"==typeof a&&a&&zp(Jp,a))return a}return new Gp(!1)},uu=Qp,du=ca("toStringTag"),hu=Error,mu=[].push,fu=function(e,t){var r,s=tu(gu,this);su?r=su(new hu,s?ru(this):gu):(r=s?this:iu(gu),ou(r,du,"Error")),void 0!==t&&ou(r,"message",uu(t)),cu(r,fu,r.stack,1),arguments.length>2&&lu(r,arguments[2]);var n=[];return pu(e,mu,{that:n}),ou(r,"errors",n),r};su?su(fu,hu):nu(fu,hu,{name:!0});var gu=fu.prototype=iu(hu.prototype,{constructor:au(1,fu),message:au(1,""),name:au(1,"AggregateError")});eu({global:!0,constructor:!0,arity:2},{AggregateError:fu});var yu=Ga.f,vu=Ei,bu=Yi,xu=Ul,wu=ro,$u=cl,Su=so,Eu=Ul,ku=kc,Au=function(e,t,r){r in e||yu(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Ou=Qp,ju=Zc,Tu=cp,Pu=Ai,Cu=function(e,t,r,s){var n="stackTraceLimit",i=s?2:1,o=e.split("."),a=o[o.length-1],l=wu.apply(null,o);if(l){var c=l.prototype;if(!r)return l;var p=wu("Error"),u=t((function(e,t){var r=Ou(s?t:e,void 0),n=s?new l(e):new l;return void 0!==r&&$u(n,"message",r),Tu(n,u,n.stack,2),this&&Su(c,this)&&function(e,t,r){var s,n;xu&&vu(s=t.constructor)&&s!==r&&bu(n=s.prototype)&&n!==r.prototype&&xu(e,n)}(n,this,u),arguments.length>i&&ju(n,arguments[i]),n}));return u.prototype=c,"Error"!==a?Eu?Eu(u,p):ku(u,p,{name:!0}):Pu&&n in l&&(Au(u,l,n),Au(u,l,"prepareStackTrace")),ku(u,l),u}},Iu=wl,_u=pi,Ru=Cu,Fu=si.WebAssembly,Mu=7!==new Error("e",{cause:7}).cause,Lu=function(e,t){var r={};r[e]=Ru(e,t,Mu),Iu({global:!0,constructor:!0,arity:1,forced:Mu},r)},Du=function(e,t){if(Fu&&Fu[e]){var r={};r[e]=Ru("WebAssembly."+e,t,Mu),Iu({target:"WebAssembly",stat:!0,constructor:!0,arity:1,forced:Mu},r)}};Lu("Error",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("EvalError",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("RangeError",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("ReferenceError",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("SyntaxError",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("TypeError",(function(e){return function(t){return _u(e,this,arguments)}})),Lu("URIError",(function(e){return function(t){return _u(e,this,arguments)}})),Du("CompileError",(function(e){return function(t){return _u(e,this,arguments)}})),Du("LinkError",(function(e){return function(t){return _u(e,this,arguments)}})),Du("RuntimeError",(function(e){return function(t){return _u(e,this,arguments)}}));var Bu=wl,qu=pi,Nu=ni,Uu=Cu,zu=ro("AggregateError"),Hu=!Nu((function(){return 1!==zu([1]).errors[0]}))&&Nu((function(){return 7!==zu([1],"AggregateError",{cause:7}).cause}));Bu({global:!0,constructor:!0,arity:2,forced:Hu},{AggregateError:Uu("AggregateError",(function(e){return function(t,r){return qu(e,this,arguments)}}),Hu,!0)});var Vu,Wu,Gu,Ju=Ei,Ku=si.WeakMap,Yu=Ju(Ku)&&/native code/.test(String(Ku)),Xu=si,Zu=Yi,Qu=cl,ed=Ko,td=No,rd=El,sd=nc,nd=Xu.TypeError,id=Xu.WeakMap;if(Yu||td.state){var od=td.state||(td.state=new id);od.get=od.get,od.has=od.has,od.set=od.set,Vu=function(e,t){if(od.has(e))throw new nd("Object already initialized");return t.facade=e,od.set(e,t),t},Wu=function(e){return od.get(e)||{}},Gu=function(e){return od.has(e)}}else{var ad=rd("state");sd[ad]=!0,Vu=function(e,t){if(ed(e,ad))throw new nd("Object already initialized");return t.facade=e,Qu(e,ad,t),t},Wu=function(e){return ed(e,ad)?e[ad]:{}},Gu=function(e){return ed(e,ad)}}var ld,cd,pd,ud={set:Vu,get:Wu,has:Gu,enforce:function(e){return Gu(e)?Wu(e):Vu(e,{})},getterFor:function(e){return function(t){var r;if(!Zu(t)||(r=Wu(t)).type!==e)throw new nd("Incompatible receiver, "+e+" required");return r}}},dd=Ai,hd=Ko,md=Function.prototype,fd=dd&&Object.getOwnPropertyDescriptor,gd=hd(md,"name"),yd={EXISTS:gd,PROPER:gd&&"something"===function(){}.name,CONFIGURABLE:gd&&(!dd||dd&&fd(md,"name").configurable)},vd=cl,bd=function(e,t,r,s){return s&&s.enumerable?e[t]=r:vd(e,t,r),e},xd=ni,wd=Ei,$d=Yi,Sd=Kc,Ed=_l,kd=bd,Ad=ca("iterator"),Od=!1;[].keys&&("next"in(pd=[].keys())?(cd=Ed(Ed(pd)))!==Object.prototype&&(ld=cd):Od=!0);var jd=!$d(ld)||xd((function(){var e={};return ld[Ad].call(e)!==e}));wd((ld=jd?{}:Sd(ld))[Ad])||kd(ld,Ad,(function(){return this}));var Td={IteratorPrototype:ld,BUGGY_SAFARI_ITERATORS:Od},Pd=$p,Cd=fp?{}.toString:function(){return"[object "+Pd(this)+"]"},Id=fp,_d=Ga.f,Rd=cl,Fd=Ko,Md=Cd,Ld=ca("toStringTag"),Dd=function(e,t,r,s){var n=r?e:e&&e.prototype;n&&(Fd(n,Ld)||_d(n,Ld,{configurable:!0,value:t}),s&&!Id&&Rd(n,"toString",Md))},Bd=Td.IteratorPrototype,qd=Kc,Nd=Mi,Ud=Dd,zd=pp,Hd=function(){return this},Vd=wl,Wd=Ti,Gd=_l,Jd=Dd,Kd=bd,Yd=pp,Xd=yd.PROPER,Zd=Td.BUGGY_SAFARI_ITERATORS,Qd=ca("iterator"),eh=function(){return this},th=function(e,t,r,s,n,i,o){!function(e,t,r,s){var n=t+" Iterator";e.prototype=qd(Bd,{next:Nd(+!s,r)}),Ud(e,n,!1,!0),zd[n]=Hd}(r,t,s);var a,l,c,p=function(e){if(e===n&&f)return f;if(!Zd&&e&&e in h)return h[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},u=t+" Iterator",d=!1,h=e.prototype,m=h[Qd]||h["@@iterator"]||n&&h[n],f=!Zd&&m||p(n),g="Array"===t&&h.entries||m;if(g&&(a=Gd(g.call(new e)))!==Object.prototype&&a.next&&(Jd(a,u,!0,!0),Yd[u]=eh),Xd&&"values"===n&&m&&"values"!==m.name&&(d=!0,f=function(){return Wd(m,this)}),n)if(l={values:p("values"),keys:i?f:p("keys"),entries:p("entries")},o)for(c in l)(Zd||d||!(c in h))&&Kd(h,c,l[c]);else Vd({target:t,proto:!0,forced:Zd||d},l);return o&&h[Qd]!==f&&Kd(h,Qd,f,{name:n}),Yd[t]=f,l},rh=function(e,t){return{value:e,done:t}},sh=Ji,nh=pp,ih=ud;Ga.f;var oh=th,ah=rh,lh=ih.set,ch=ih.getterFor("Array Iterator");oh(Array,"Array",(function(e,t){lh(this,{type:"Array Iterator",target:sh(e),index:0,kind:t})}),(function(){var e=ch(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,ah(void 0,!0);switch(e.kind){case"keys":return ah(r,!1);case"values":return ah(t[r],!1)}return ah([r,t[r]],!1)}),"values"),nh.Arguments=nh.Array;var ph=fi,uh=Gl,dh=Xp,hh=Vi,mh=ph("".charAt),fh=ph("".charCodeAt),gh=ph("".slice),yh=function(e){return function(t,r){var s,n,i=dh(hh(t)),o=uh(r),a=i.length;return o<0||o>=a?e?"":void 0:(s=fh(i,o))<55296||s>56319||o+1===a||(n=fh(i,o+1))<56320||n>57343?e?mh(i,o):s:e?gh(i,o,o+2):n-56320+(s-55296<<10)+65536}},vh=(yh(!1),yh(!0)),bh=Xp,xh=ud,wh=th,$h=rh,Sh=xh.set,Eh=xh.getterFor("String Iterator");wh(String,"String",(function(e){Sh(this,{type:"String Iterator",string:bh(e),index:0})}),(function(){var e,t=Eh(this),r=t.string,s=t.index;return s>=r.length?$h(void 0,!0):(e=vh(r,s),t.index+=e.length,$h(e,!1))}));var kh=Xi.AggregateError,Ah=si,Oh=Dd,jh=pp;for(var Th in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})Oh(Ah[Th],Th),jh[Th]=jh.Array;const Ph=Cn(kh);class Ch extends Ph{constructor(e,t,r){if(super(e,t,r),this.name=this.constructor.name,"string"==typeof t&&(this.message=t),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:e}=r;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class Ih extends Error{static[Symbol.hasInstance](e){return super[Symbol.hasInstance](e)||Function.prototype[Symbol.hasInstance].call(Ch,e)}constructor(e,t){if(super(e,t),this.name=this.constructor.name,"string"==typeof e&&(this.message=e),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack,null!=t&&"object"==typeof t&&Object.hasOwn(t,"cause")&&!("cause"in this)){const{cause:e}=t;this.cause=e,e instanceof Error&&"stack"in e&&(this.stack=`${this.stack}\nCAUSE: ${e.stack}`)}}}class _h extends Ih{constructor(e,t){if(super(e,t),null!=t&&"object"==typeof t){const{cause:e,...r}=t;Object.assign(this,r)}}}class Rh extends Ih{}class Fh extends Rh{}var Mh=function(){return!1},Lh=function(){return!0};function Dh(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function Bh(e){return function t(r){return 0===arguments.length||Dh(r)?t:e.apply(this,arguments)}}function qh(e){return function t(r,s){switch(arguments.length){case 0:return t;case 1:return Dh(r)?t:Bh((function(t){return e(r,t)}));default:return Dh(r)&&Dh(s)?t:Dh(r)?Bh((function(t){return e(t,s)})):Dh(s)?Bh((function(t){return e(r,t)})):e(r,s)}}}function Nh(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,r){return t.apply(this,arguments)};case 3:return function(e,r,s){return t.apply(this,arguments)};case 4:return function(e,r,s,n){return t.apply(this,arguments)};case 5:return function(e,r,s,n,i){return t.apply(this,arguments)};case 6:return function(e,r,s,n,i,o){return t.apply(this,arguments)};case 7:return function(e,r,s,n,i,o,a){return t.apply(this,arguments)};case 8:return function(e,r,s,n,i,o,a,l){return t.apply(this,arguments)};case 9:return function(e,r,s,n,i,o,a,l,c){return t.apply(this,arguments)};case 10:return function(e,r,s,n,i,o,a,l,c,p){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function Uh(e,t,r){return function(){for(var s=[],n=0,i=e,o=0,a=!1;o<t.length||n<arguments.length;){var l;o<t.length&&(!Dh(t[o])||n>=arguments.length)?l=t[o]:(l=arguments[n],n+=1),s[o]=l,Dh(l)?a=!0:i-=1,o+=1}return!a&&i<=0?r.apply(this,s):Nh(Math.max(0,i),Uh(e,s,r))}}var zh=qh((function(e,t){return 1===e?Bh(t):Nh(e,Uh(e,[],t))}));function Hh(e){return function t(r,s,n){switch(arguments.length){case 0:return t;case 1:return Dh(r)?t:qh((function(t,s){return e(r,t,s)}));case 2:return Dh(r)&&Dh(s)?t:Dh(r)?qh((function(t,r){return e(t,s,r)})):Dh(s)?qh((function(t,s){return e(r,t,s)})):Bh((function(t){return e(r,s,t)}));default:return Dh(r)&&Dh(s)&&Dh(n)?t:Dh(r)&&Dh(s)?qh((function(t,r){return e(t,r,n)})):Dh(r)&&Dh(n)?qh((function(t,r){return e(t,s,r)})):Dh(s)&&Dh(n)?qh((function(t,s){return e(r,t,s)})):Dh(r)?Bh((function(t){return e(t,s,n)})):Dh(s)?Bh((function(t){return e(r,t,n)})):Dh(n)?Bh((function(t){return e(r,s,t)})):e(r,s,n)}}}const Vh=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function Wh(e,t,r){return function(){if(0===arguments.length)return r();var s=arguments[arguments.length-1];if(!Vh(s)){for(var n=0;n<e.length;){if("function"==typeof s[e[n]])return s[e[n]].apply(s,Array.prototype.slice.call(arguments,0,-1));n+=1}if(function(e){return null!=e&&"function"==typeof e["@@transducer/step"]}(s))return t.apply(null,Array.prototype.slice.call(arguments,0,-1))(s)}return r.apply(this,arguments)}}function Gh(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const Jh=function(){return this.xf["@@transducer/init"]()},Kh=function(e){return this.xf["@@transducer/result"](e)};var Yh=function(){function e(e,t){this.xf=t,this.f=e,this.all=!0}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=function(e){return this.all&&(e=this.xf["@@transducer/step"](e,!0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)||(this.all=!1,e=Gh(this.xf["@@transducer/step"](e,!1))),e},e}();var Xh=qh(Wh(["all"],(function(e){return function(t){return new Yh(e,t)}}),(function(e,t){for(var r=0;r<t.length;){if(!e(t[r]))return!1;r+=1}return!0})));function Zh(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function Qh(e,t,r){for(var s=0,n=r.length;s<n;){if(e(t,r[s]))return!0;s+=1}return!1}function em(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const tm="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var rm=Object.prototype.toString,sm=function(){return"[object Arguments]"===rm.call(arguments)?function(e){return"[object Arguments]"===rm.call(e)}:function(e){return em("callee",e)}}(),nm=!{toString:null}.propertyIsEnumerable("toString"),im=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],om=function(){return arguments.propertyIsEnumerable("length")}(),am=function(e,t){for(var r=0;r<e.length;){if(e[r]===t)return!0;r+=1}return!1},lm="function"!=typeof Object.keys||om?Bh((function(e){if(Object(e)!==e)return[];var t,r,s=[],n=om&&sm(e);for(t in e)!em(t,e)||n&&"length"===t||(s[s.length]=t);if(nm)for(r=im.length-1;r>=0;)em(t=im[r],e)&&!am(s,t)&&(s[s.length]=t),r-=1;return s})):Bh((function(e){return Object(e)!==e?[]:Object.keys(e)})),cm=Bh((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function pm(e,t,r,s){var n=Zh(e);function i(e,t){return um(e,t,r.slice(),s.slice())}return!Qh((function(e,t){return!Qh(i,t,e)}),Zh(t),n)}function um(e,t,r,s){if(tm(e,t))return!0;var n=cm(e);if(n!==cm(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(n){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!tm(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!tm(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=r.length-1;i>=0;){if(r[i]===e)return s[i]===t;i-=1}switch(n){case"Map":return e.size===t.size&&pm(e.entries(),t.entries(),r.concat([e]),s.concat([t]));case"Set":return e.size===t.size&&pm(e.values(),t.values(),r.concat([e]),s.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=lm(e);if(o.length!==lm(t).length)return!1;var a=r.concat([e]),l=s.concat([t]);for(i=o.length-1;i>=0;){var c=o[i];if(!em(c,t)||!um(t[c],e[c],a,l))return!1;i-=1}return!0}var dm=qh((function(e,t){return um(e,t,[],[])}));function hm(e,t){return function(e,t,r){var s,n;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(s=1/t;r<e.length;){if(0===(n=e[r])&&1/n===s)return r;r+=1}return-1}if(t!=t){for(;r<e.length;){if("number"==typeof(n=e[r])&&n!=n)return r;r+=1}return-1}return e.indexOf(t,r);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,r);case"object":if(null===t)return e.indexOf(t,r)}for(;r<e.length;){if(dm(e[r],t))return r;r+=1}return-1}(t,e,0)>=0}function mm(e,t){for(var r=0,s=t.length,n=Array(s);r<s;)n[r]=e(t[r]),r+=1;return n}function fm(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var gm=function(e){return(e<10?"0":"")+e},ym="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+gm(e.getUTCMonth()+1)+"-"+gm(e.getUTCDate())+"T"+gm(e.getUTCHours())+":"+gm(e.getUTCMinutes())+":"+gm(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function vm(e){return function(){return!e.apply(this,arguments)}}function bm(e,t,r){for(var s=0,n=r.length;s<n;)t=e(t,r[s]),s+=1;return t}function xm(e){return"[object Object]"===Object.prototype.toString.call(e)}var wm=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=Kh,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}();var $m=qh(Wh(["fantasy-land/filter","filter"],(function(e){return function(t){return new wm(e,t)}}),(function(e,t){return xm(t)?bm((function(r,s){return e(t[s])&&(r[s]=t[s]),r}),{},lm(t)):function(e,t){for(var r=0,s=t.length,n=[];r<s;)e(t[r])&&(n[n.length]=t[r]),r+=1;return n}(e,t)}))),Sm=qh((function(e,t){return $m(vm(e),t)}));function Em(e,t){var r=function(r){var s=t.concat([e]);return hm(r,s)?"<Circular>":Em(r,s)},s=function(e,t){return mm((function(t){return fm(t)+": "+r(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+mm(r,e).join(", ")+"))";case"[object Array]":return"["+mm(r,e).concat(s(e,Sm((function(e){return/^\d+$/.test(e)}),lm(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):fm(ym(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":fm(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var n=e.toString();if("[object Object]"!==n)return n}return"{"+s(e,lm(e)).join(", ")+"}"}}var km=Bh((function(e){return Em(e,[])})),Am=qh((function(e,t){if(e===t)return t;function r(e,t){if(e>t!=t>e)return t>e?t:e}var s=r(e,t);if(void 0!==s)return s;var n=r(typeof e,typeof t);if(void 0!==n)return n===typeof e?e:t;var i=km(e),o=r(i,km(t));return void 0!==o&&o===i?e:t})),Om=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=Kh,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),jm=qh(Wh(["fantasy-land/map","map"],(function(e){return function(t){return new Om(e,t)}}),(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return zh(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return bm((function(r,s){return r[s]=e(t[s]),r}),{},lm(t));default:return mm(e,t)}})));const Tm=Number.isInteger||function(e){return(e|0)===e};function Pm(e){return"[object String]"===Object.prototype.toString.call(e)}function Cm(e,t){var r=e<0?t.length+e:e;return Pm(t)?t.charAt(r):t[r]}var Im=qh((function(e,t){if(null!=t)return Tm(e)?Cm(e,t):t[e]})),_m=qh((function(e,t){return jm(Im(e),t)})),Rm=Bh((function(e){return!!Vh(e)||!!e&&"object"==typeof e&&!Pm(e)&&(0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),Fm="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Mm(e,t,r){return function(s,n,i){if(Rm(i))return e(s,n,i);if(null==i)return n;if("function"==typeof i["fantasy-land/reduce"])return t(s,n,i,"fantasy-land/reduce");if(null!=i[Fm])return r(s,n,i[Fm]());if("function"==typeof i.next)return r(s,n,i);if("function"==typeof i.reduce)return t(s,n,i,"reduce");throw new TypeError("reduce: list must be array or iterable")}}var Lm=qh((function(e,t){return Nh(e.length,(function(){return e.apply(t,arguments)}))}));var Dm=Mm((function(e,t,r){for(var s=0,n=r.length;s<n;){if((t=e["@@transducer/step"](t,r[s]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s+=1}return e["@@transducer/result"](t)}),(function(e,t,r,s){return e["@@transducer/result"](r[s](Lm(e["@@transducer/step"],e),t))}),(function(e,t,r){for(var s=r.next();!s.done;){if((t=e["@@transducer/step"](t,s.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}s=r.next()}return e["@@transducer/result"](t)})),Bm=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();function qm(e){return new Bm(e)}var Nm=Hh((function(e,t,r){return Dm("function"==typeof e?qm(e):e,t,r)})),Um=Bh((function(e){return zh(Nm(Am,0,_m("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(!e[t].apply(this,arguments))return!1;t+=1}return!0}))})),zm=Bh((function(e){return function(){return e}})),Hm=qh((function(e,t){return e&&t})),Vm=Bh((function(e){return zh(Nm(Am,0,_m("length",e)),(function(){for(var t=0,r=e.length;t<r;){if(e[t].apply(this,arguments))return!0;t+=1}return!1}))}));var Wm=Mm(bm,(function(e,t,r,s){return r[s](e,t)}),(function(e,t,r){for(var s=r.next();!s.done;)t=e(t,s.value),s=r.next();return t})),Gm=qh((function(e,t){return"function"==typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"==typeof e.ap?e.ap(t):"function"==typeof e?function(r){return e(r)(t(r))}:Wm((function(e,r){return function(e,t){var r;t=t||[];var s=(e=e||[]).length,n=t.length,i=[];for(r=0;r<s;)i[i.length]=e[r],r+=1;for(r=0;r<n;)i[i.length]=t[r],r+=1;return i}(e,jm(r,t))}),[],e)})),Jm=qh((function(e,t){return e.apply(this,t)})),Km=Bh((function(e){return zh(e.length,e)})),Ym=Bh((function(e){return null==e})),Xm=Hh((function e(t,r,s){if(0===t.length)return r;var n=t[0];if(t.length>1){var i=!Ym(s)&&em(n,s)&&"object"==typeof s[n]?s[n]:Tm(t[1])?[]:{};r=e(Array.prototype.slice.call(t,1),r,i)}return function(e,t,r){if(Tm(e)&&Vh(r)){var s=[].concat(r);return s[e]=t,s}var n={};for(var i in r)n[i]=r[i];return n[e]=t,n}(n,r,s)}));function Zm(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}var Qm=qh((function(e,t){var r=zh(e,t);return zh(e,(function(){return bm(Gm,jm(r,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),ef=Bh((function(e){return Qm(e.length,e)})),tf=qh((function(e,t){return Zm(e)?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:ef(Hm)(e,t)}));function rf(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function sf(e,t,r){if(r||(r=new nf),function(e){var t=typeof e;return null==e||"object"!=t&&"function"!=t}(e))return e;var s=function(t){var s=r.get(e);if(s)return s;for(var n in r.set(e,t),e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t};switch(cm(e)){case"Object":return s(Object.create(Object.getPrototypeOf(e)));case"Array":return s(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return rf(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}var nf=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(e,t){var r=this.hash(e),s=this.map[r];s||(this.map[r]=s=[]),s.push([e,t]),this.length+=1},e.prototype.hash=function(e){var t=[];for(var r in e)t.push(Object.prototype.toString.call(e[r]));return t.join()},e.prototype.get=function(e){if(this.length<=180){for(var t in this.map)for(var r=this.map[t],s=0;s<r.length;s+=1)if((i=r[s])[0]===e)return i[1]}else{var n=this.hash(e);if(r=this.map[n])for(s=0;s<r.length;s+=1){var i;if((i=r[s])[0]===e)return i[1]}}},e}(),of=Bh((function(e){return function(t,r){return e(t,r)?-1:e(r,t)?1:0}})),af=ef(Bh((function(e){return!e})));function lf(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function cf(e,t){return function(){var r=arguments.length;if(0===r)return t();var s=arguments[r-1];return Vh(s)||"function"!=typeof s[e]?t.apply(this,arguments):s[e].apply(s,Array.prototype.slice.call(arguments,0,r-1))}}var pf=Hh(cf("slice",(function(e,t,r){return Array.prototype.slice.call(r,e,t)}))),uf=Bh(cf("tail",pf(1,1/0)));function df(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return Nh(arguments[0].length,Nm(lf,arguments[0],uf(arguments)))}var hf=Bh((function(e){return Cm(0,e)}));var mf=Bh((function(e){return e})),ff=qh((function(e,t){return zh(Nm(Am,0,_m("length",t)),(function(){var r=arguments,s=this;return e.apply(s,mm((function(e){return e.apply(s,r)}),t))}))})),gf=function(){function e(e,t,r,s){this.valueFn=e,this.valueAcc=t,this.keyFn=r,this.xf=s,this.inputs={}}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=function(e){var t;for(t in this.inputs)if(em(t,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[t]))["@@transducer/reduced"]){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){var r=this.keyFn(t);return this.inputs[r]=this.inputs[r]||[r,sf(this.valueAcc)],this.inputs[r][1]=this.valueFn(this.inputs[r][1],t),e},e}();var yf=Uh(4,[],Wh([],(function(e,t,r){return function(s){return new gf(e,t,r,s)}}),(function(e,t,r,s){var n=qm((function(s,n){var i=r(n),o=e(em(i,s)?s[i]:sf(t),n);return o&&o["@@transducer/reduced"]?Gh(s):(s[i]=o,s)}));return Dm(n,{},s)}))),vf=qh((function(e,t){return null==t||t!=t?e:t})),bf=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!xf(e,!0,this)},e.prototype.has=function(e){return xf(e,!1,this)},e}();function xf(e,t,r){var s,n=typeof e;switch(n){case"string":case"number":return 0===e&&1/e==-1/0?!!r._items["-0"]||(t&&(r._items["-0"]=!0),!1):null!==r._nativeSet?t?(s=r._nativeSet.size,r._nativeSet.add(e),r._nativeSet.size===s):r._nativeSet.has(e):n in r._items?e in r._items[n]||(t&&(r._items[n][e]=!0),!1):(t&&(r._items[n]={},r._items[n][e]=!0),!1);case"boolean":if(n in r._items){var i=e?1:0;return!!r._items[n][i]||(t&&(r._items[n][i]=!0),!1)}return t&&(r._items[n]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?t?(s=r._nativeSet.size,r._nativeSet.add(e),r._nativeSet.size===s):r._nativeSet.has(e):n in r._items?!!hm(e,r._items[n])||(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1);case"undefined":return!!r._items[n]||(t&&(r._items[n]=!0),!1);case"object":if(null===e)return!!r._items.null||(t&&(r._items.null=!0),!1);default:return(n=Object.prototype.toString.call(e))in r._items?!!hm(e,r._items[n])||(t&&r._items[n].push(e),!1):(t&&(r._items[n]=[e]),!1)}}var wf=qh((function(e,t){for(var r=[],s=0,n=e.length,i=t.length,o=new bf,a=0;a<i;a+=1)o.add(t[a]);for(;s<n;)o.add(e[s])&&(r[r.length]=e[s]),s+=1;return r})),$f=function(){function e(e,t){this.xf=t,this.n=e,this.i=0}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=Kh,e.prototype["@@transducer/step"]=function(e,t){this.i+=1;var r=0===this.n?e:this.xf["@@transducer/step"](e,t);return this.n>=0&&this.i>=this.n?Gh(r):r},e}();var Sf=qh(Wh(["take"],(function(e){return function(t){return new $f(e,t)}}),(function(e,t){return pf(0,e<0?1/0:e,t)})));var Ef=function(){function e(e,t){this.f=e,this.retained=[],this.xf=t}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=function(e){return this.retained=null,this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.retain(e,t):this.flush(e,t)},e.prototype.flush=function(e,t){return e=Dm(this.xf,e,this.retained),this.retained=[],this.xf["@@transducer/step"](e,t)},e.prototype.retain=function(e,t){return this.retained.push(t),e},e}();var kf=qh(Wh([],(function(e){return function(t){return new Ef(e,t)}}),(function(e,t){for(var r=t.length-1;r>=0&&e(t[r]);)r-=1;return pf(0,r+1,t)}))),Af=Bh((function(e){return Cm(-1,e)})),Of=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=Kh,e.prototype["@@transducer/step"]=function(e,t){if(this.f){if(this.f(t))return e;this.f=null}return this.xf["@@transducer/step"](e,t)},e}();var jf=qh(Wh(["dropWhile"],(function(e){return function(t){return new Of(e,t)}}),(function(e,t){for(var r=0,s=t.length;r<s&&e(t[r]);)r+=1;return pf(r,1/0,t)}))),Tf=qh((function(e,t){return e||t})),Pf=qh((function(e,t){return Zm(e)?function(){return e.apply(this,arguments)||t.apply(this,arguments)}:ef(Tf)(e,t)})),Cf=Bh((function(e){return null!=e&&"function"==typeof e["fantasy-land/empty"]?e["fantasy-land/empty"]():null!=e&&null!=e.constructor&&"function"==typeof e.constructor["fantasy-land/empty"]?e.constructor["fantasy-land/empty"]():null!=e&&"function"==typeof e.empty?e.empty():null!=e&&null!=e.constructor&&"function"==typeof e.constructor.empty?e.constructor.empty():Vh(e)?[]:Pm(e)?"":xm(e)?{}:sm(e)?function(){return arguments}():function(e){var t=Object.prototype.toString.call(e);return"[object Uint8ClampedArray]"===t||"[object Int8Array]"===t||"[object Uint8Array]"===t||"[object Int16Array]"===t||"[object Uint16Array]"===t||"[object Int32Array]"===t||"[object Uint32Array]"===t||"[object Float32Array]"===t||"[object Float64Array]"===t||"[object BigInt64Array]"===t||"[object BigUint64Array]"===t}(e)?e.constructor.from(""):void 0})),If=Bh((function(e){return zh(e.length,(function(t,r){var s=Array.prototype.slice.call(arguments,0);return s[0]=r,s[1]=t,e.apply(this,s)}))})),_f=qh(cf("groupBy",yf((function(e,t){return e.push(t),e}),[]))),Rf=qh((function(e,t){if(0===e.length||Ym(t))return!1;for(var r=t,s=0;s<e.length;){if(Ym(r)||!em(e[s],r))return!1;r=r[e[s]],s+=1}return!0})),Ff=qh((function(e,t){return Rf([e],t)})),Mf=function(e,t){switch(arguments.length){case 0:return Mf;case 1:return function t(r){return 0===arguments.length?t:tm(e,r)};default:return tm(e,t)}},Lf=Hh((function(e,t,r){return zh(Math.max(e.length,t.length,r.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):r.apply(this,arguments)}))})),Df=qh(hm),Bf=pf(0,-1),qf=qh((function(e,t){return zh(e+1,(function(){var r=arguments[e];if(null!=r&&Zm(r[t]))return r[t].apply(r,Array.prototype.slice.call(arguments,0,e));throw new TypeError(km(r)+' does not have a method named "'+t+'"')}))})),Nf=Bh((function(e){return null!=e&&dm(e,Cf(e))})),Uf=Bh((function(e){return!Nf(e)})),zf=qf(1,"join");function Hf(e){return"[object Number]"===Object.prototype.toString.call(e)}var Vf=qh((function(e,t){return function(r){return function(s){return jm((function(e){return t(e,s)}),r(e(s)))}}}));function Wf(e,t){for(var r=t,s=0;s<e.length;s+=1){if(null==r)return;var n=e[s];r=Tm(n)?Cm(n,r):r[n]}return r}var Gf=qh((function(e,t){return bm((function(r,s){return r[s]=e(t[s],s,t),r}),{},lm(t))})),Jf=Hh((function(e,t,r){var s,n={};for(s in r=r||{},t=t||{})em(s,t)&&(n[s]=em(s,r)?e(s,t[s],r[s]):t[s]);for(s in r)em(s,r)&&!em(s,n)&&(n[s]=r[s]);return n})),Kf=Hh((function e(t,r,s){return Jf((function(r,s,n){return xm(s)&&xm(n)?e(t,s,n):t(r,s,n)}),r,s)})),Yf=qh((function(e,t){return Kf((function(e,t,r){return r}),e,t)})),Xf=qh((function(e,t){return Xh(vm(e),t)})),Zf=function(e){return{value:e,map:function(t){return Zf(t(e))}}},Qf=Hh((function(e,t,r){return e((function(e){return Zf(t(e))}))(r).value})),eg=qh(Wf),tg=Hh((function(e,t,r){return vf(e,Wf(t,r))})),rg=Hh((function(e,t,r){return e(Wf(t,r))})),sg=qh((function(e,t){for(var r={},s=0;s<e.length;)e[s]in t&&(r[e[s]]=t[e[s]]),s+=1;return r})),ng=Hh((function(e,t,r){return dm(e,Im(t,r))})),ig=Hh((function(e,t,r){return vf(e,Im(t,r))})),og=Hh((function(e,t,r){return e(Im(t,r))})),ag=qh((function(e,t){if(!Hf(e)||!Hf(t))throw new TypeError("Both arguments to range must be numbers");for(var r=Array(e<t?t-e:0),s=e<0?t+Math.abs(e):t-e,n=0;n<s;)r[n]=n+e,n+=1;return r})),lg=Bh(Gh),cg=Hh((function(e,t,r){return r.replace(e,t)})),pg=qh((function(e,t){return Array.prototype.slice.call(t,0).sort(e)})),ug=qf(1,"split"),dg=qh((function(e,t){return dm(Sf(e.length,t),e)})),hg=qh((function(e,t){if(r=e,"[object RegExp]"!==Object.prototype.toString.call(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+km(e));var r;return rf(e).test(t)})),mg=function(){function e(e,t){this.xf=t,this.pred=e,this.items=[]}return e.prototype["@@transducer/init"]=Jh,e.prototype["@@transducer/result"]=Kh,e.prototype["@@transducer/step"]=function(e,t){return Qh(this.pred,t,this.items)?e:(this.items.push(t),this.xf["@@transducer/step"](e,t))},e}();var fg=qh(Wh([],(function(e){return function(t){return new mg(e,t)}}),(function(e,t){for(var r,s=0,n=t.length,i=[];s<n;)Qh(e,r=t[s],i)||(i[i.length]=r),s+=1;return i}))),gg=Hh((function(e,t,r){return e(r)?t(r):r})),yg=zm(void 0),vg=dm(yg()),bg=af(vg),xg=dm(null),wg=af(xg),$g=af(Ym),Sg=zh(1,df(cm,Mf("GeneratorFunction"))),Eg=zh(1,df(cm,Mf("AsyncFunction"))),kg=Vm([df(cm,Mf("Function")),Sg,Eg]),Ag=zh(1,kg(Array.isArray)?Array.isArray:df(cm,Mf("Array"))),Og=tf(Ag,Nf),jg=tf(Ag,Uf),Tg=zh(1,df(cm,Mf("String"))),Pg=dm("");function Cg(e){return Cg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cg(e)}var Ig=function(e){return"object"===Cg(e)},_g=af(zh(1,tf(wg,Pf(Ig,kg)))),Rg=Um([Tg,_g,Uf]),Fg=af(kg),Mg=zh(1,tf(wg,Ig)),Lg=df(cm,Mf("Object")),Dg=df(km,dm(km(Object))),Bg=rg(tf(kg,Dg),["constructor"]),qg=zh(1,(function(e){if(!Mg(e)||!Lg(e))return!1;var t=Object.getPrototypeOf(e);return!!xg(t)||Bg(t)})),Ng=tf(zh(1,df(cm,Mf("Number"))),isFinite),Ug=zh(1,Ng),zg=tf(kg(Number.isFinite)?zh(1,Lm(Number.isFinite,Number)):Ug,ff(dm,[Math.floor,mf])),Hg=zh(1,zg),Vg=kg(Number.isInteger)?zh(1,Lm(Number.isInteger,Number)):Hg,Wg=zh(1,df(cm,Mf("RegExp")));function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=Array(t);r<t;r++)s[r]=e[r];return s}var Jg,Kg,Yg=df(pg(of((function(e,t){return e.length>t.length}))),hf,Im("length")),Xg=Km((function(e,t,r){var s=r.apply(void 0,function(e){return function(e){if(Array.isArray(e))return Gg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Gg(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gg(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e));return $g(s)?lg(s):t})),Zg=Lf(jg,(function(e){var t=Yg(e);return zh(t,(function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return Nm(Xg(r),void 0,e)}))}),yg),Qg=If(Df),ey=zh(3,(function(e,t,r){var s=eg(e,r),n=eg(Bf(e),r);if(!Fg(s)&&!Og(e)){var i=Lm(s,n);return Jm(i,t)}})),ty=gg(Tg,cg(/[.*+?^${}()|[\]\\-]/g,"\\$&")),ry=function(e,t){if("string"!=typeof e&&!(e instanceof String))throw TypeError("`".concat(t,"` must be a string"))},sy=zh(3,(function(e,t,r){!function(e,t,r){if(null==r||null==e||null==t)throw TypeError("Input values must not be `null` or `undefined`")}(e,t,r),ry(r,"str"),ry(t,"replaceValue"),function(e){if(!("string"==typeof e||e instanceof String||e instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")}(e);var s=new RegExp(Wg(e)?e:ty(e),"g");return cg(s,t,r)})),ny=qf(2,"replaceAll"),iy=kg(String.prototype.replaceAll)?ny:sy,oy=Km((function(e,t){return df(ug(""),kf(Qg(e)),zf(""))(t)})),ay=Km((function(e,t){return df(ug(""),jf(Qg(e)),zf(""))(t)})),ly={exports:{}},cy=ly.exports={};function py(){throw new Error("setTimeout has not been defined")}function uy(){throw new Error("clearTimeout has not been defined")}function dy(e){if(Jg===setTimeout)return setTimeout(e,0);if((Jg===py||!Jg)&&setTimeout)return Jg=setTimeout,setTimeout(e,0);try{return Jg(e,0)}catch(t){try{return Jg.call(null,e,0)}catch(t){return Jg.call(this,e,0)}}}!function(){try{Jg="function"==typeof setTimeout?setTimeout:py}catch(e){Jg=py}try{Kg="function"==typeof clearTimeout?clearTimeout:uy}catch(e){Kg=uy}}();var hy,my=[],fy=!1,gy=-1;function yy(){fy&&hy&&(fy=!1,hy.length?my=hy.concat(my):gy=-1,my.length&&vy())}function vy(){if(!fy){var e=dy(yy);fy=!0;for(var t=my.length;t;){for(hy=my,my=[];++gy<t;)hy&&hy[gy].run();gy=-1,t=my.length}hy=null,fy=!1,function(e){if(Kg===clearTimeout)return clearTimeout(e);if((Kg===uy||!Kg)&&clearTimeout)return Kg=clearTimeout,clearTimeout(e);try{Kg(e)}catch(t){try{return Kg.call(null,e)}catch(t){return Kg.call(this,e)}}}(e)}}function by(e,t){this.fun=e,this.array=t}function xy(){}cy.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];my.push(new by(e,t)),1!==my.length||fy||dy(vy)},by.prototype.run=function(){this.fun.apply(null,this.array)},cy.title="browser",cy.browser=!0,cy.env={},cy.argv=[],cy.version="",cy.versions={},cy.on=xy,cy.addListener=xy,cy.once=xy,cy.off=xy,cy.removeListener=xy,cy.removeAllListeners=xy,cy.emit=xy,cy.prependListener=xy,cy.prependOnceListener=xy,cy.listeners=function(e){return[]},cy.binding=function(e){throw new Error("process.binding is not supported")},cy.cwd=function(){return"/"},cy.chdir=function(e){throw new Error("process.chdir is not supported")},cy.umask=function(){return 0};const wy=Cn(ly.exports),$y=()=>rg(hg(/^win/),["platform"],wy),Sy=e=>{try{const t=new URL(e);return oy(":",t.protocol)}catch{return}},Ey=df(Sy,bg),ky=e=>{const t=e.lastIndexOf(".");return t>=0?e.substring(t).toLowerCase():""},Ay=e=>{if(wy.browser)return!1;const t=Sy(e);return vg(t)||"file"===t||/^[a-zA-Z]$/.test(t)},Oy=e=>{const t=Sy(e);return"http"===t||"https"===t},jy=(e,t)=>{const r=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],s=ig(!1,"keepFileProtocol",t),n=ig($y,"isWindows",t);let i=decodeURI(e);for(let e=0;e<r.length;e+=2)i=i.replace(r[e],r[e+1]);let o="file://"===i.substring(0,7).toLowerCase();return o&&(i="/"===i[7]?i.substring(8):i.substring(7),n()&&"/"===i[1]&&(i=`${i[0]}:${i.substring(1)}`),s?i=`file:///${i}`:(o=!1,i=n()?i:`/${i}`)),n()&&!o&&(i=iy("/","\\",i),":\\"===i.substring(1,3)&&(i=i[0].toUpperCase()+i.substring(1))),i},Ty=e=>{const t=[/\?/g,"%3F",/#/g,"%23"];let r=e;$y()&&(r=r.replace(/\\/g,"/")),r=encodeURI(r);for(let e=0;e<t.length;e+=2)r=r.replace(t[e],t[e+1]);return r},Py=e=>{const t=e.indexOf("#");return-1!==t?e.substring(t):"#"},Cy=e=>{const t=e.indexOf("#");let r=e;return t>=0&&(r=e.substring(0,t)),r},Iy=()=>{if(wy.browser)return Cy(globalThis.location.href);const e=wy.cwd(),t=Af(e);return["/","\\"].includes(t)?e:e+($y()?"\\":"/")},_y=(e,t)=>{const r=new URL(t,new URL(e,"resolve://"));if("resolve:"===r.protocol){const{pathname:e,search:t,hash:s}=r;return e+t+s}return r.toString()},Ry=e=>{if(Ay(e))return Ty(jy(e));try{return new URL(e).toString()}catch{return encodeURI(decodeURI(e)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},Fy=e=>Ay(e)?jy(e):decodeURI(e),My=Object.freeze(Object.defineProperty({__proto__:null,cwd:Iy,fromFileSystemPath:Ty,getExtension:ky,getHash:Py,getProtocol:Sy,hasProtocol:Ey,isFileSystemPath:Ay,isHttpUrl:Oy,isURI:e=>{try{return new URL(e)&&!0}catch{return!1}},resolve:_y,sanitize:Ry,stripHash:Cy,toFileSystemPath:jy,unsanitize:Fy},Symbol.toStringTag,{value:"Module"}));let Ly=class{uri;mediaType;data;parseResult;constructor({uri:e,mediaType:t="text/plain",data:r,parseResult:s}){this.uri=e,this.mediaType=t,this.data=r,this.parseResult=s}get extension(){return Tg(this.uri)?ky(this.uri):""}toString(){return"string"==typeof this.data?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(cm(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}};class Dy{rootRef;refs;circular;constructor({refs:e=[],circular:t=!1}={}){this.refs=[],this.circular=t,e.forEach(this.add.bind(this))}get size(){return this.refs.length}add(e){return this.has(e)||(this.refs.push(e),this.rootRef=void 0===this.rootRef?e:this.rootRef,e.refSet=this),this}merge(e){for(const t of e.values())this.add(t);return this}has(e){const t=Tg(e)?e:e.uri;return bg(this.find((e=>e.uri===t)))}find(e){return this.refs.find(e)}*values(){yield*this.refs}clean(){this.refs.forEach((e=>{e.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}}const By={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:mf,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}},qy=Vf(eg(["resolve","baseURI"]),Xm(["resolve","baseURI"])),Ny=e=>Pg(e)?Iy():e,Uy=(e,t)=>{const r=Yf(e,t);return Qf(qy,Ny,r)};class zy extends Ih{plugin;constructor(e,t){super(e,{cause:t.cause}),this.plugin=t.plugin}}const Hy=async(e,t,r)=>{const s=await Promise.all(r.map(ey([e],t)));return r.filter(((e,t)=>s[t]))},Vy=async(e,t,r)=>{let s;for(const n of r)try{const r=await n[e].call(n,...t);return{plugin:n,result:r}}catch(e){s=new zy("Error while running plugin",{cause:e,plugin:n})}return Promise.reject(s)};class Wy extends Ih{}class Gy extends Ih{}class Jy extends Gy{}class Ky extends Jy{}var Yy="object"==typeof global&&global&&global.Object===Object&&global,Xy=Yy,Zy="object"==typeof self&&self&&self.Object===Object&&self,Qy=Xy||Zy||Function("return this")(),ev=Qy.Symbol,tv=ev,rv=Object.prototype,sv=rv.hasOwnProperty,nv=rv.toString,iv=tv?tv.toStringTag:void 0,ov=Object.prototype.toString,av=function(e){var t=sv.call(e,iv),r=e[iv];try{e[iv]=void 0;var s=!0}catch(e){}var n=nv.call(e);return s&&(t?e[iv]=r:delete e[iv]),n},lv=ev?ev.toStringTag:void 0,cv=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":lv&&lv in Object(e)?av(e):function(e){return ov.call(e)}(e)},pv=Array.isArray,uv=function(e){return null!=e&&"object"==typeof e},dv=cv,hv=pv,mv=uv,fv=cv,gv=uv,yv=cv,vv=uv,bv=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},xv=function(e,t){return e===t||e!=e&&t!=t},wv=xv,$v=function(e,t){for(var r=e.length;r--;)if(wv(e[r][0],t))return r;return-1},Sv=$v,Ev=Array.prototype.splice,kv=$v,Av=$v,Ov=$v,jv=function(){this.u=[],this.size=0},Tv=function(e){var t=this.u,r=Sv(t,e);return!(r<0||(r==t.length-1?t.pop():Ev.call(t,r,1),--this.size,0))},Pv=function(e){var t=this.u,r=kv(t,e);return r<0?void 0:t[r][1]},Cv=function(e,t){var r=this.u,s=Ov(r,e);return s<0?(++this.size,r.push([e,t])):r[s][1]=t,this};function Iv(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}Iv.prototype.clear=jv,Iv.prototype.delete=Tv,Iv.prototype.get=Pv,Iv.prototype.has=function(e){return Av(this.u,e)>-1},Iv.prototype.set=Cv;var _v=Iv,Rv=_v,Fv=cv,Mv=bv,Lv=function(e){if(!Mv(e))return!1;var t=Fv(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Dv=Qy.o,Bv=function(){var e=/[^.]+$/.exec(Dv&&Dv.keys&&Dv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),qv=Function.prototype.toString,Nv=function(e){if(null!=e){try{return qv.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Uv=Lv,zv=function(e){return!!Bv&&Bv in e},Hv=bv,Vv=Nv,Wv=/^\[object .+?Constructor\]$/,Gv=Function.prototype,Jv=Object.prototype,Kv=Gv.toString,Yv=Jv.hasOwnProperty,Xv=RegExp("^"+Kv.call(Yv).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zv=function(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Hv(e)||zv(e))&&(Uv(e)?Xv:Wv).test(Vv(e))}(r)?r:void 0},Qv=Zv(Qy,"Map"),eb=Zv(Object,"create"),tb=eb,rb=eb,sb=Object.prototype.hasOwnProperty,nb=eb,ib=Object.prototype.hasOwnProperty,ob=eb,ab=function(){this.u=tb?tb(null):{},this.size=0},lb=function(e){var t=this.has(e)&&delete this.u[e];return this.size-=t?1:0,t},cb=function(e){var t=this.u;if(rb){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return sb.call(t,e)?t[e]:void 0},pb=function(e){var t=this.u;return nb?void 0!==t[e]:ib.call(t,e)},ub=function(e,t){var r=this.u;return this.size+=this.has(e)?0:1,r[e]=ob&&void 0===t?"__lodash_hash_undefined__":t,this};function db(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}db.prototype.clear=ab,db.prototype.delete=lb,db.prototype.get=cb,db.prototype.has=pb,db.prototype.set=ub;var hb=db,mb=_v,fb=Qv,gb=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yb=function(e,t){var r=e.u;return gb(t)?r["string"==typeof t?"string":"hash"]:r.map},vb=yb,bb=yb,xb=yb,wb=yb,$b=function(e,t){var r=wb(this,e),s=r.size;return r.set(e,t),this.size+=r.size==s?0:1,this};function Sb(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}Sb.prototype.clear=function(){this.size=0,this.u={hash:new hb,map:new(fb||mb),string:new hb}},Sb.prototype.delete=function(e){var t=vb(this,e).delete(e);return this.size-=t?1:0,t},Sb.prototype.get=function(e){return bb(this,e).get(e)},Sb.prototype.has=function(e){return xb(this,e).has(e)},Sb.prototype.set=$b;var Eb=Sb,kb=_v,Ab=Qv,Ob=Eb,jb=_v,Tb=function(){this.u=new Rv,this.size=0},Pb=function(e){var t=this.u,r=t.delete(e);return this.size=t.size,r},Cb=function(e){return this.u.get(e)},Ib=function(e){return this.u.has(e)},_b=function(e,t){var r=this.u;if(r instanceof kb){var s=r.u;if(!Ab||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.u=new Ob(s)}return r.set(e,t),this.size=r.size,this};function Rb(e){var t=this.u=new jb(e);this.size=t.size}Rb.prototype.clear=Tb,Rb.prototype.delete=Pb,Rb.prototype.get=Cb,Rb.prototype.has=Ib,Rb.prototype.set=_b;var Fb=Rb,Mb=Eb;function Lb(e){var t=-1,r=null==e?0:e.length;for(this.u=new Mb;++t<r;)this.add(e[t])}Lb.prototype.add=Lb.prototype.push=function(e){return this.u.set(e,"__lodash_hash_undefined__"),this},Lb.prototype.has=function(e){return this.u.has(e)};var Db=Lb,Bb=function(e,t){for(var r=-1,s=null==e?0:e.length;++r<s;)if(t(e[r],r,e))return!0;return!1},qb=function(e,t){return e.has(t)},Nb=function(e,t,r,s,n,i){var o=1&r,a=e.length,l=t.length;if(a!=l&&!(o&&l>a))return!1;var c=i.get(e),p=i.get(t);if(c&&p)return c==t&&p==e;var u=-1,d=!0,h=2&r?new Db:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var m=e[u],f=t[u];if(s)var g=o?s(f,m,u,t,e,i):s(m,f,u,e,t,i);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!Bb(t,(function(e,t){if(!qb(h,t)&&(m===e||n(m,e,r,s,i)))return h.push(t)}))){d=!1;break}}else if(m!==f&&!n(m,f,r,s,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Ub=Qy.Uint8Array,zb=xv,Hb=Nb,Vb=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,s){r[++t]=[s,e]})),r},Wb=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},Gb=ev?ev.prototype:void 0,Jb=Gb?Gb.valueOf:void 0,Kb=function(e,t){for(var r=-1,s=t.length,n=e.length;++r<s;)e[n+r]=t[r];return e},Yb=pv,Xb=function(e,t){for(var r=-1,s=null==e?0:e.length,n=0,i=[];++r<s;){var o=e[r];t(o,r,e)&&(i[n++]=o)}return i},Zb=Object.prototype.propertyIsEnumerable,Qb=Object.getOwnPropertySymbols,ex=Qb?function(e){return null==e?[]:(e=Object(e),Xb(Qb(e),(function(t){return Zb.call(e,t)})))}:function(){return[]},tx=cv,rx=uv,sx=function(e){return rx(e)&&"[object Arguments]"==tx(e)},nx=uv,ix=Object.prototype,ox=ix.hasOwnProperty,ax=ix.propertyIsEnumerable,lx=sx(function(){return arguments}())?sx:function(e){return nx(e)&&ox.call(e,"callee")&&!ax.call(e,"callee")},cx={exports:{}},px=function(){return!1};!function(e,t){var r=Qy,s=px,n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n?r.Buffer:void 0,a=(o?o.isBuffer:void 0)||s;e.exports=a}(cx,cx.exports);var ux=cx.exports,dx=/^(?:0|[1-9]\d*)$/,hx=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},mx=cv,fx=hx,gx=uv,yx={};yx["[object Float32Array]"]=yx["[object Float64Array]"]=yx["[object Int8Array]"]=yx["[object Int16Array]"]=yx["[object Int32Array]"]=yx["[object Uint8Array]"]=yx["[object Uint8ClampedArray]"]=yx["[object Uint16Array]"]=yx["[object Uint32Array]"]=!0,yx["[object Arguments]"]=yx["[object Array]"]=yx["[object ArrayBuffer]"]=yx["[object Boolean]"]=yx["[object DataView]"]=yx["[object Date]"]=yx["[object Error]"]=yx["[object Function]"]=yx["[object Map]"]=yx["[object Number]"]=yx["[object Object]"]=yx["[object RegExp]"]=yx["[object Set]"]=yx["[object String]"]=yx["[object WeakMap]"]=!1;var vx={exports:{}};!function(e,t){var r=Yy,s=t&&!t.nodeType&&t,n=s&&e&&!e.nodeType&&e,i=n&&n.exports===s&&r.process,o=function(){try{return n&&n.require&&n.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(vx,vx.exports);var bx=vx.exports,xx=function(e){return gx(e)&&fx(e.length)&&!!yx[mx(e)]},wx=function(e){return function(t){return e(t)}},$x=bx&&bx.isTypedArray,Sx=$x?wx($x):xx,Ex=function(e,t){for(var r=-1,s=Array(e);++r<e;)s[r]=t(r);return s},kx=lx,Ax=pv,Ox=ux,jx=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&dx.test(e))&&e>-1&&e%1==0&&e<t},Tx=Sx,Px=Object.prototype.hasOwnProperty,Cx=Object.prototype,Ix=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),_x=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Cx)},Rx=Ix,Fx=Object.prototype.hasOwnProperty,Mx=Lv,Lx=hx,Dx=function(e,t){var r=Ax(e),s=!r&&kx(e),n=!r&&!s&&Ox(e),i=!r&&!s&&!n&&Tx(e),o=r||s||n||i,a=o?Ex(e.length,String):[],l=a.length;for(var c in e)!t&&!Px.call(e,c)||o&&("length"==c||n&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||jx(c,l))||a.push(c);return a},Bx=function(e,t,r){var s=t(e);return Yb(e)?s:Kb(s,r(e))},qx=ex,Nx=function(e){return function(e){return null!=e&&Lx(e.length)&&!Mx(e)}(e)?Dx(e):function(e){if(!_x(e))return Rx(e);var t=[];for(var r in Object(e))Fx.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)},Ux=function(e){return Bx(e,Nx,qx)},zx=Object.prototype.hasOwnProperty,Hx=Zv(Qy,"DataView"),Vx=Qv,Wx=Zv(Qy,"Promise"),Gx=Zv(Qy,"Set"),Jx=Zv(Qy,"WeakMap"),Kx=cv,Yx=Nv,Xx=Yx(Hx),Zx=Yx(Vx),Qx=Yx(Wx),ew=Yx(Gx),tw=Yx(Jx),rw=Kx;(Hx&&"[object DataView]"!=rw(new Hx(new ArrayBuffer(1)))||Vx&&"[object Map]"!=rw(new Vx)||Wx&&"[object Promise]"!=rw(Wx.resolve())||Gx&&"[object Set]"!=rw(new Gx)||Jx&&"[object WeakMap]"!=rw(new Jx))&&(rw=function(e){var t=Kx(e),r="[object Object]"==t?e.constructor:void 0,s=r?Yx(r):"";if(s)switch(s){case Xx:return"[object DataView]";case Zx:return"[object Map]";case Qx:return"[object Promise]";case ew:return"[object Set]";case tw:return"[object WeakMap]"}return t});var sw=Fb,nw=Nb,iw=function(e,t,r,s,n,i,o){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ub(e),new Ub(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zb(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Vb;case"[object Set]":var l=1&s;if(a||(a=Wb),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;s|=2,o.set(e,t);var p=Hb(a(e),a(t),s,n,i,o);return o.delete(e),p;case"[object Symbol]":if(Jb)return Jb.call(e)==Jb.call(t)}return!1},ow=function(e,t,r,s,n,i){var o=1&r,a=Ux(e),l=a.length;if(l!=Ux(t).length&&!o)return!1;for(var c=l;c--;){var p=a[c];if(!(o?p in t:zx.call(t,p)))return!1}var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var m=o;++c<l;){var f=e[p=a[c]],g=t[p];if(s)var y=o?s(g,f,p,t,e,i):s(f,g,p,e,t,i);if(!(void 0===y?f===g||n(f,g,r,s,i):y)){h=!1;break}m||(m="constructor"==p)}if(h&&!m){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h},aw=rw,lw=pv,cw=ux,pw=Sx,uw="[object Object]",dw=Object.prototype.hasOwnProperty,hw=uv,mw=function e(t,r,s,n,i){return t===r||(null==t||null==r||!hw(t)&&!hw(r)?t!=t&&r!=r:function(e,t,r,s,n,i){var o=lw(e),a=lw(t),l=o?"[object Array]":aw(e),c=a?"[object Array]":aw(t),p=(l="[object Arguments]"==l?uw:l)==uw,u=(c="[object Arguments]"==c?uw:c)==uw,d=l==c;if(d&&cw(e)){if(!cw(t))return!1;o=!0,p=!1}if(d&&!p)return i||(i=new sw),o||pw(e)?nw(e,t,r,s,n,i):iw(e,t,l,r,s,n,i);if(!(1&r)){var h=p&&dw.call(e,"__wrapped__"),m=u&&dw.call(t,"__wrapped__");if(h||m){var f=h?e.value():e,g=m?t.value():t;return i||(i=new sw),n(f,g,r,s,i)}}return!!d&&(i||(i=new sw),ow(e,t,r,s,n,i))}(t,r,s,n,e,i))},fw=class e{constructor(e,t){this.key=e,this.value=t}clone(){const t=new e;return this.key&&(t.key=this.key.clone()),this.value&&(t.value=this.value.clone()),t}},gw=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};const yw=gw;function vw(e){return"string"==typeof e?t=>t.element===e:e.constructor&&e.extend?t=>t instanceof e:e}let bw=class e{constructor(e){this.elements=e||[]}toValue(){return this.elements.map((e=>e.toValue()))}map(e,t){return this.elements.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((s=>{const n=e.bind(t)(s);n&&r.push(n)})),r}filter(t,r){return t=vw(t),new e(this.elements.filter(t,r))}reject(t,r){return t=vw(t),new e(this.elements.filter(yw(t),r))}find(e,t){return e=vw(e),this.elements.find(e,t)}forEach(e,t){this.elements.forEach(e,t)}reduce(e,t){return this.elements.reduce(e,t)}includes(e){return this.elements.some((t=>t.equals(e)))}shift(){return this.elements.shift()}unshift(e){this.elements.unshift(this.refract(e))}push(e){return this.elements.push(this.refract(e)),this}add(e){this.push(e)}get(e){return this.elements[e]}getValue(e){const t=this.elements[e];if(t)return t.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}};"undefined"!=typeof Symbol&&(bw.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()});var xw=bw;const ww=function(e,t){return mw(e,t)},$w=fw,Sw=xw;var Ew=class e{constructor(e,t,r){t&&(this.meta=t),r&&(this.attributes=r),this.content=e}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((e=>{e.parent=this,e.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const e=new this.constructor;return e.element=this.element,this.meta.length&&(e._meta=this.meta.clone()),this.attributes.length&&(e._attributes=this.attributes.clone()),this.content?this.content.clone?e.content=this.content.clone():Array.isArray(this.content)?e.content=this.content.map((e=>e.clone())):e.content=this.content:e.content=this.content,e}toValue(){return this.content instanceof e?this.content.toValue():this.content instanceof $w?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((e=>e.toValue()),this):this.content}toRef(e){if(""===this.id.toValue())throw Error("Cannot create reference to an element that does not contain an ID");const t=new this.RefElement(this.id.toValue());return e&&(t.path=e),t}findRecursive(...e){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const t=e.pop();let r=new Sw;const s=(e,t)=>(e.push(t),e),n=(e,r)=>{r.element===t&&e.push(r);const i=r.findRecursive(t);return i&&i.reduce(s,e),r.content instanceof $w&&(r.content.key&&n(e,r.content.key),r.content.value&&n(e,r.content.value)),e};return this.content&&(this.content.element&&n(r,this.content),Array.isArray(this.content)&&this.content.reduce(n,r)),e.isEmpty||(r=r.filter((t=>{let r=t.parents.map((e=>e.element));for(const t in e){const s=e[t],n=r.indexOf(s);if(-1===n)return!1;r=r.splice(0,n)}return!0}))),r}set(e){return this.content=e,this}equals(e){return ww(this.toValue(),e)}getMetaProperty(e,t){if(!this.meta.hasKey(e)){if(this.isFrozen){const e=this.refract(t);return e.freeze(),e}this.meta.set(e,t)}return this.meta.get(e)}setMetaProperty(e,t){this.meta.set(e,t)}get element(){return this._storedElement||"element"}set element(e){this._storedElement=e}get content(){return this._content}set content(t){if(t instanceof e)this._content=t;else if(t instanceof Sw)this.content=t.elements;else if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"null"===t||null==t)this._content=t;else if(t instanceof $w)this._content=t;else if(Array.isArray(t))this._content=t.map(this.refract);else{if("object"!=typeof t)throw new Error("Cannot set content to given value");this._content=Object.keys(t).map((e=>new this.MemberElement(e,t[e])))}}get meta(){if(!this._meta){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._meta=new this.ObjectElement}return this._meta}set meta(e){e instanceof this.ObjectElement?this._meta=e:this.meta.set(e||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const e=new this.ObjectElement;return e.freeze(),e}this._attributes=new this.ObjectElement}return this._attributes}set attributes(e){e instanceof this.ObjectElement?this._attributes=e:this.attributes.set(e||{})}get id(){return this.getMetaProperty("id","")}set id(e){this.setMetaProperty("id",e)}get classes(){return this.getMetaProperty("classes",[])}set classes(e){this.setMetaProperty("classes",e)}get title(){return this.getMetaProperty("title","")}set title(e){this.setMetaProperty("title",e)}get description(){return this.getMetaProperty("description","")}set description(e){this.setMetaProperty("description",e)}get links(){return this.getMetaProperty("links",[])}set links(e){this.setMetaProperty("links",e)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:e}=this;const t=new Sw;for(;e;)t.push(e),e=e.parent;return t}get children(){if(Array.isArray(this.content))return new Sw(this.content);if(this.content instanceof $w){const e=new Sw([this.content.key]);return this.content.value&&e.push(this.content.value),e}return this.content instanceof e?new Sw([this.content]):new Sw}get recursiveChildren(){const e=new Sw;return this.children.forEach((t=>{e.push(t),t.recursiveChildren.forEach((t=>{e.push(t)}))})),e}};const kw=Ew;const Aw=Ew,Ow=Ew,jw=Ew,Tw=gw,Pw=Ew,Cw=xw;let Iw=class extends Pw{constructor(e,t,r){super(e||[],t,r),this.element="array"}primitive(){return"array"}get(e){return this.content[e]}getValue(e){const t=this.get(e);if(t)return t.toValue()}getIndex(e){return this.content[e]}set(e,t){return this.content[e]=this.refract(t),this}remove(e){const t=this.content.splice(e,1);return t.length?t[0]:null}map(e,t){return this.content.map(e,t)}flatMap(e,t){return this.map(e,t).reduce(((e,t)=>e.concat(t)),[])}compactMap(e,t){const r=[];return this.forEach((s=>{const n=e.bind(t)(s);n&&r.push(n)})),r}filter(e,t){return new Cw(this.content.filter(e,t))}reject(e,t){return this.filter(Tw(e),t)}reduce(e,t){let r,s;void 0!==t?(r=0,s=this.refract(t)):(r=1,s="object"===this.primitive()?this.first.value:this.first);for(let t=r;t<this.length;t+=1){const r=this.content[t];s="object"===this.primitive()?this.refract(e(s,r.value,r.key,r,this)):this.refract(e(s,r,t,this))}return s}forEach(e,t){this.content.forEach(((r,s)=>{e.bind(t)(r,this.refract(s))}))}shift(){return this.content.shift()}unshift(e){this.content.unshift(this.refract(e))}push(e){return this.content.push(this.refract(e)),this}add(e){this.push(e)}findElements(e,t){const r=t||{},s=!!r.recursive,n=void 0===r.results?[]:r.results;return this.forEach(((t,r,i)=>{s&&void 0!==t.findElements&&t.findElements(e,{results:n,recursive:s}),e(t,r,i)&&n.push(t)})),n}find(e){return new Cw(this.findElements(e,{recursive:!0}))}findByElement(e){return this.find((t=>t.element===e))}findByClass(e){return this.find((t=>t.classes.includes(e)))}getById(e){return this.find((t=>t.id.toValue()===e)).first}includes(e){return this.content.some((t=>t.equals(e)))}contains(e){return this.includes(e)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(e){return new this.constructor(this.content.concat(e.content))}"fantasy-land/concat"(e){return this.concat(e)}"fantasy-land/map"(e){return new this.constructor(this.map(e))}"fantasy-land/chain"(e){return this.map((t=>e(t)),this).reduce(((e,t)=>e.concat(t)),this.empty())}"fantasy-land/filter"(e){return new this.constructor(this.content.filter(e))}"fantasy-land/reduce"(e,t){return this.content.reduce(e,t)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}};Iw.empty=function(){return new this},Iw["fantasy-land/empty"]=Iw.empty,"undefined"!=typeof Symbol&&(Iw.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()});var _w=Iw;const Rw=fw,Fw=Ew;var Mw=class extends Fw{constructor(e,t,r,s){super(new Rw,r,s),this.element="member",this.key=e,this.value=t}get key(){return this.content.key}set key(e){this.content.key=this.refract(e)}get value(){return this.content.value}set value(e){this.content.value=this.refract(e)}};const Lw=gw,Dw=xw;var Bw=class e extends Dw{map(e,t){return this.elements.map((r=>e.bind(t)(r.value,r.key,r)))}filter(t,r){return new e(this.elements.filter((e=>t.bind(r)(e.value,e.key,e))))}reject(e,t){return this.filter(Lw(e.bind(t)))}forEach(e,t){return this.elements.forEach(((r,s)=>{e.bind(t)(r.value,r.key,r,s)}))}keys(){return this.map(((e,t)=>t.toValue()))}values(){return this.map((e=>e.toValue()))}};const qw=gw,Nw=bv,Uw=_w,zw=Mw,Hw=Bw;const Vw=Ew,Ww=Ew,Gw=Ew,Jw=class extends kw{constructor(e,t,r){super(e||null,t,r),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}},Kw=class extends Aw{constructor(e,t,r){super(e,t,r),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},Yw=class extends Ow{constructor(e,t,r){super(e,t,r),this.element="number"}primitive(){return"number"}},Xw=class extends jw{constructor(e,t,r){super(e,t,r),this.element="boolean"}primitive(){return"boolean"}},Zw=_w,Qw=Mw,e$=class extends Uw{constructor(e,t,r){super(e||[],t,r),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((e,t)=>(e[t.key.toValue()]=t.value?t.value.toValue():void 0,e)),{})}get(e){const t=this.getMember(e);if(t)return t.value}getMember(e){if(void 0!==e)return this.content.find((t=>t.key.toValue()===e))}remove(e){let t=null;return this.content=this.content.filter((r=>r.key.toValue()!==e||(t=r,!1))),t}getKey(e){const t=this.getMember(e);if(t)return t.key}set(e,t){if(Nw(e))return Object.keys(e).forEach((t=>{this.set(t,e[t])})),this;const r=e,s=this.getMember(r);return s?s.value=t:this.content.push(new zw(r,t)),this}keys(){return this.content.map((e=>e.key.toValue()))}values(){return this.content.map((e=>e.value.toValue()))}hasKey(e){return this.content.some((t=>t.key.equals(e)))}items(){return this.content.map((e=>[e.key.toValue(),e.value.toValue()]))}map(e,t){return this.content.map((r=>e.bind(t)(r.value,r.key,r)))}compactMap(e,t){const r=[];return this.forEach(((s,n,i)=>{const o=e.bind(t)(s,n,i);o&&r.push(o)})),r}filter(e,t){return new Hw(this.content).filter(e,t)}reject(e,t){return this.filter(qw(e),t)}forEach(e,t){return this.content.forEach((r=>e.bind(t)(r.value,r.key,r)))}},t$=class extends Ww{constructor(e,t,r){super(e||[],t,r),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(e){this.attributes.set("path",e)}},r$=xw,s$=Bw,n$=fw;function i$(e){return e instanceof Gw?e:"string"==typeof e?new Kw(e):"number"==typeof e?new Yw(e):"boolean"==typeof e?new Xw(e):null===e?new Jw:Array.isArray(e)?new Zw(e.map(i$)):"object"==typeof e?new e$(e):e}Gw.prototype.ObjectElement=e$,Gw.prototype.RefElement=t$,Gw.prototype.MemberElement=Qw,Gw.prototype.refract=i$,r$.prototype.refract=i$;var o$={Element:Gw,NullElement:Jw,StringElement:Kw,NumberElement:Yw,BooleanElement:Xw,ArrayElement:Zw,MemberElement:Qw,ObjectElement:e$,LinkElement:class extends Vw{constructor(e,t,r){super(e||[],t,r),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(e){this.attributes.set("relation",e)}get href(){return this.attributes.get("href")}set href(e){this.attributes.set("href",e)}},RefElement:t$,refract:i$,ArraySlice:r$,ObjectSlice:s$,KeyValuePair:n$};const a$=function(e){return null===e},l$=function(e){return"string"==typeof e||!hv(e)&&mv(e)&&"[object String]"==dv(e)},c$=function(e){return"number"==typeof e||gv(e)&&"[object Number]"==fv(e)},p$=function(e){return!0===e||!1===e||vv(e)&&"[object Boolean]"==yv(e)},u$=bv,d$=class{constructor(e){this.namespace=e||new this.Namespace}serialise(e){if(!(e instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${e}\` is not an Element instance`);const t={element:e.element};e._meta&&e._meta.length>0&&(t.meta=this.serialiseObject(e.meta)),e._attributes&&e._attributes.length>0&&(t.attributes=this.serialiseObject(e.attributes));const r=this.serialiseContent(e.content);return void 0!==r&&(t.content=r),t}deserialise(e){if(!e.element)throw new Error("Given value is not an object containing an element name");const t=new(this.namespace.getElementClass(e.element));t.element!==e.element&&(t.element=e.element),e.meta&&this.deserialiseObject(e.meta,t.meta),e.attributes&&this.deserialiseObject(e.attributes,t.attributes);const r=this.deserialiseContent(e.content);return void 0===r&&null!==t.content||(t.content=r),t}serialiseContent(e){if(e instanceof this.namespace.elements.Element)return this.serialise(e);if(e instanceof this.namespace.KeyValuePair){const t={key:this.serialise(e.key)};return e.value&&(t.value=this.serialise(e.value)),t}if(e&&e.map){if(0===e.length)return;return e.map(this.serialise,this)}return e}deserialiseContent(e){if(e){if(e.element)return this.deserialise(e);if(e.key){const t=new this.namespace.KeyValuePair(this.deserialise(e.key));return e.value&&(t.value=this.deserialise(e.value)),t}if(e.map)return e.map(this.deserialise,this)}return e}serialiseObject(e){const t={};if(e.forEach(((e,r)=>{e&&(t[r.toValue()]=this.serialise(e))})),0!==Object.keys(t).length)return t}deserialiseObject(e,t){Object.keys(e).forEach((r=>{t.set(r,this.deserialise(e[r]))}))}},h$=o$;let m$=class{constructor(e){this.elementMap={},this.elementDetection=[],this.Element=h$.Element,this.KeyValuePair=h$.KeyValuePair,e&&e.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(e){return e.namespace&&e.namespace({base:this}),e.load&&e.load({base:this}),this}useDefault(){return this.register("null",h$.NullElement).register("string",h$.StringElement).register("number",h$.NumberElement).register("boolean",h$.BooleanElement).register("array",h$.ArrayElement).register("object",h$.ObjectElement).register("member",h$.MemberElement).register("ref",h$.RefElement).register("link",h$.LinkElement),this.detect(a$,h$.NullElement,!1).detect(l$,h$.StringElement,!1).detect(c$,h$.NumberElement,!1).detect(p$,h$.BooleanElement,!1).detect(Array.isArray,h$.ArrayElement,!1).detect(u$,h$.ObjectElement,!1),this}register(e,t){return this._elements=void 0,this.elementMap[e]=t,this}unregister(e){return this._elements=void 0,delete this.elementMap[e],this}detect(e,t,r){return void 0===r||r?this.elementDetection.unshift([e,t]):this.elementDetection.push([e,t]),this}toElement(e){if(e instanceof this.Element)return e;let t;for(let r=0;r<this.elementDetection.length;r+=1){const s=this.elementDetection[r][0],n=this.elementDetection[r][1];if(s(e)){t=new n(e);break}}return t}getElementClass(e){const t=this.elementMap[e];return void 0===t?this.Element:t}fromRefract(e){return this.serialiser.deserialise(e)}toRefract(e){return this.serialiser.serialise(e)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((e=>{const t=e[0].toUpperCase()+e.substr(1);this._elements[t]=this.elementMap[e]}))),this._elements}get serialiser(){return new d$(this)}};d$.prototype.Namespace=m$;var f$=m$,g$=fw,y$=o$.ArraySlice,v$=o$.ObjectSlice,b$=o$.Element,x$=o$.StringElement,w$=o$.NumberElement,$$=o$.BooleanElement,S$=o$.NullElement,E$=o$.ArrayElement,k$=o$.ObjectElement,A$=o$.MemberElement,O$=o$.RefElement,j$=o$.LinkElement,T$=o$.refract;class P$ extends x${constructor(e,t,r){super(e,t,r),this.element="annotation"}get code(){return this.attributes.get("code")}set code(e){this.attributes.set("code",e)}}class C$ extends x${constructor(e,t,r){super(e,t,r),this.element="comment"}}class I$ extends E${constructor(e,t,r){super(e,t,r),this.element="parseResult"}get api(){return this.children.filter((e=>e.classes.contains("api"))).first}get results(){return this.children.filter((e=>e.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((e=>"annotation"===e.element))}get warnings(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("warning")))}get errors(){return this.children.filter((e=>"annotation"===e.element&&e.classes.contains("error")))}get isEmpty(){return this.children.reject((e=>"annotation"===e.element)).isEmpty}replaceResult(e){const{result:t}=this;if(vg(t))return!1;const r=this.content.findIndex((e=>e===t));return-1!==r&&(this.content[r]=e,!0)}}class _$ extends E${constructor(e,t,r){super(e,t,r),this.element="sourceMap"}get positionStart(){return this.children.filter((e=>e.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((e=>e.classes.contains("position"))).get(1)}set position(e){if(void 0===e)return;const t=new E$([e.start.row,e.start.column,e.start.char]),r=new E$([e.end.row,e.end.column,e.end.char]);t.classes.push("position"),r.classes.push("position"),this.push(t).push(r)}}const R$=(e,t)=>"object"==typeof t&&null!==t&&e in t&&"function"==typeof t[e],F$=e=>"object"==typeof e&&null!=e&&"_storedElement"in e&&"string"==typeof e._storedElement&&"_content"in e,M$=(e,t)=>"object"==typeof t&&null!==t&&"primitive"in t&&"function"==typeof t.primitive&&t.primitive()===e,L$=(e,t)=>"object"==typeof t&&null!==t&&"classes"in t&&(Array.isArray(t.classes)||t.classes instanceof E$)&&t.classes.includes(e),D$=(e,t)=>"object"==typeof t&&null!==t&&"element"in t&&t.element===e,B$=e=>e({hasMethod:R$,hasBasicElementProps:F$,primitiveEq:M$,isElementType:D$,hasClass:L$}),q$=B$((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof b$||e(r)&&t(void 0,r))),N$=B$((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof x$||e(r)&&t("string",r))),U$=B$((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof w$||e(r)&&t("number",r))),z$=B$((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof S$||e(r)&&t("null",r))),H$=B$((({hasBasicElementProps:e,primitiveEq:t})=>r=>r instanceof $$||e(r)&&t("boolean",r))),V$=B$((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>s=>s instanceof k$||e(s)&&t("object",s)&&r("keys",s)&&r("values",s)&&r("items",s))),W$=B$((({hasBasicElementProps:e,primitiveEq:t,hasMethod:r})=>s=>s instanceof E$&&!(s instanceof k$)||e(s)&&t("array",s)&&r("push",s)&&r("unshift",s)&&r("map",s)&&r("reduce",s))),G$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof A$||e(s)&&t("member",s)&&r(void 0,s))),J$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof j$||e(s)&&t("link",s)&&r(void 0,s))),K$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof O$||e(s)&&t("ref",s)&&r(void 0,s))),Y$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof P$||e(s)&&t("annotation",s)&&r("array",s))),X$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof C$||e(s)&&t("comment",s)&&r("string",s))),Z$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof I$||e(s)&&t("parseResult",s)&&r("array",s))),Q$=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof _$||e(s)&&t("sourceMap",s)&&r("array",s))),eS=e=>D$("object",e)||D$("array",e)||D$("boolean",e)||D$("number",e)||D$("string",e)||D$("null",e)||D$("member",e),tS=e=>Q$(e.meta.get("sourceMap")),rS=(e,t)=>0===e.length||Xh(Qg(t.classes.toValue()),e),sS=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:tS,includesClasses:rS,includesSymbols:(e,t)=>{if(0===e.length)return!0;const r=t.attributes.get("symbols");return!!W$(r)&&Xh(Qg(r.toValue()),e)},isAnnotationElement:Y$,isArrayElement:W$,isBooleanElement:H$,isCommentElement:X$,isElement:q$,isLinkElement:J$,isMemberElement:G$,isNullElement:z$,isNumberElement:U$,isObjectElement:V$,isParseResultElement:Z$,isPrimitiveElement:eS,isRefElement:K$,isSourceMapElement:Q$,isStringElement:N$},Symbol.toStringTag,{value:"Module"}));class nS extends f${constructor(){super(),this.register("annotation",P$),this.register("comment",C$),this.register("parseResult",I$),this.register("sourceMap",_$)}}const iS=new nS,oS=e=>{const t=new nS;return qg(e)&&t.use(e),t},aS=()=>({predicates:{...sS},namespace:iS}),lS=(e,t,r)=>{const s=e[t];if(null!=s){if(!r&&"function"==typeof s)return s;const e=r?s.leave:s.enter;if("function"==typeof e)return e}else{const s=r?e.leave:e.enter;if(null!=s){if("function"==typeof s)return s;const e=s[t];if("function"==typeof e)return e}}return null},cS={},pS=e=>null==e?void 0:e.type,uS=e=>"string"==typeof pS(e),dS=e=>Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)),hS=(e,{visitFnGetter:t=lS,nodeTypeGetter:r=pS,breakSymbol:s=cS,deleteNodeSymbol:n=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),l=new Array(e.length).fill(a);return{enter(c,p,u,d,h,m){let f=c,g=!1;const y={...m,replaceWith(e,t){m.replaceWith(e,t),f=e}};for(let c=0;c<e.length;c+=1)if(l[c]===a){const a=t(e[c],r(f),!1);if("function"==typeof a){const t=a.call(e[c],f,p,u,d,h,y);if("function"==typeof(null==t?void 0:t.then))throw new _h("Async visitor not supported in sync mode",{visitor:e[c],visitFn:a});if(t===i)l[c]=f;else if(t===s)l[c]=s;else{if(t===n)return t;if(void 0!==t){if(!o)return t;f=t,g=!0}}}}return g?f:void 0},leave(n,o,c,p,u,d){let h=n;const m={...d,replaceWith(e,t){d.replaceWith(e,t),h=e}};for(let n=0;n<e.length;n+=1)if(l[n]===a){const a=t(e[n],r(h),!0);if("function"==typeof a){const t=a.call(e[n],h,o,c,p,u,m);if("function"==typeof(null==t?void 0:t.then))throw new _h("Async visitor not supported in sync mode",{visitor:e[n],visitFn:a});if(t===s)l[n]=s;else if(void 0!==t&&t!==i)return t}}else l[n]===h&&(l[n]=a)}}};hS[Symbol.for("nodejs.util.promisify.custom")]=(e,{visitFnGetter:t=lS,nodeTypeGetter:r=pS,breakSymbol:s=cS,deleteNodeSymbol:n=null,skipVisitingNodeSymbol:i=!1,exposeEdits:o=!1}={})=>{const a=Symbol("skip"),l=new Array(e.length).fill(a);return{async enter(c,p,u,d,h,m){let f=c,g=!1;const y={...m,replaceWith(e,t){m.replaceWith(e,t),f=e}};for(let c=0;c<e.length;c+=1)if(l[c]===a){const a=t(e[c],r(f),!1);if("function"==typeof a){const t=await a.call(e[c],f,p,u,d,h,y);if(t===i)l[c]=f;else if(t===s)l[c]=s;else{if(t===n)return t;if(void 0!==t){if(!o)return t;f=t,g=!0}}}}return g?f:void 0},async leave(n,o,c,p,u,d){let h=n;const m={...d,replaceWith(e,t){d.replaceWith(e,t),h=e}};for(let n=0;n<e.length;n+=1)if(l[n]===a){const a=t(e[n],r(h),!0);if("function"==typeof a){const t=await a.call(e[n],h,o,c,p,u,m);if(t===s)l[n]=s;else if(void 0!==t&&t!==i)return t}}else l[n]===h&&(l[n]=a)}}};const mS=(e,t,{keyMap:r=null,state:s={},breakSymbol:n=cS,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=lS,nodeTypeGetter:l=pS,nodePredicate:c=uS,nodeCloneFn:p=dS,detectCycles:u=!0}={})=>{const d=r||{};let h,m,f=Array.isArray(e),g=[e],y=-1,v=[],b=e;const x=[],w=[];do{y+=1;const e=y===g.length;let r;const E=e&&0!==v.length;if(e){if(r=0===w.length?void 0:x.pop(),b=m,m=w.pop(),E)if(f){b=b.slice();let e=0;for(const[t,r]of v){const s=t-e;r===i?(b.splice(s,1),e+=1):b[s]=r}}else{b=p(b);for(const[e,t]of v)b[e]=t}y=h.index,g=h.keys,v=h.edits,f=h.inArray,h=h.prev}else if(m!==i&&void 0!==m){if(r=f?y:g[y],b=m[r],b===i||void 0===b)continue;x.push(r)}let k;if(!Array.isArray(b)){var $;if(!c(b))throw new _h(`Invalid AST Node: ${String(b)}`,{node:b});if(u&&w.includes(b)){x.pop();continue}const i=a(t,l(b),e);if(i){for(const[e,r]of Object.entries(s))t[e]=r;const n={replaceWith(t,s){"function"==typeof s?s(t,b,r,m,x,w):m&&(m[r]=t),e||(b=t)}};k=i.call(t,b,r,m,x,w,n)}if("function"==typeof(null===($=k)||void 0===$?void 0:$.then))throw new _h("Async visitor not supported in sync mode",{visitor:t,visitFn:i});if(k===n)break;if(k===o){if(!e){x.pop();continue}}else if(void 0!==k&&(v.push([r,k]),!e)){if(!c(k)){x.pop();continue}b=k}}var S;void 0===k&&E&&v.push([r,b]),e||(h={inArray:f,index:y,keys:g,edits:v,prev:h},f=Array.isArray(b),g=f?b:null!==(S=d[l(b)])&&void 0!==S?S:[],y=-1,v=[],m!==i&&void 0!==m&&w.push(m),m=b)}while(void 0!==h);return 0!==v.length?v[v.length-1][1]:e};mS[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=null,state:s={},breakSymbol:n=cS,deleteNodeSymbol:i=null,skipVisitingNodeSymbol:o=!1,visitFnGetter:a=lS,nodeTypeGetter:l=pS,nodePredicate:c=uS,nodeCloneFn:p=dS,detectCycles:u=!0}={})=>{const d=r||{};let h,m,f=Array.isArray(e),g=[e],y=-1,v=[],b=e;const x=[],w=[];do{y+=1;const e=y===g.length;let r;const S=e&&0!==v.length;if(e){if(r=0===w.length?void 0:x.pop(),b=m,m=w.pop(),S)if(f){b=b.slice();let e=0;for(const[t,r]of v){const s=t-e;r===i?(b.splice(s,1),e+=1):b[s]=r}}else{b=p(b);for(const[e,t]of v)b[e]=t}y=h.index,g=h.keys,v=h.edits,f=h.inArray,h=h.prev}else if(m!==i&&void 0!==m){if(r=f?y:g[y],b=m[r],b===i||void 0===b)continue;x.push(r)}let E;if(!Array.isArray(b)){if(!c(b))throw new _h(`Invalid AST Node: ${String(b)}`,{node:b});if(u&&w.includes(b)){x.pop();continue}const i=a(t,l(b),e);if(i){for(const[e,r]of Object.entries(s))t[e]=r;const n={replaceWith(t,s){"function"==typeof s?s(t,b,r,m,x,w):m&&(m[r]=t),e||(b=t)}};E=await i.call(t,b,r,m,x,w,n)}if(E===n)break;if(E===o){if(!e){x.pop();continue}}else if(void 0!==E&&(v.push([r,E]),!e)){if(!c(E)){x.pop();continue}b=E}}var $;void 0===E&&S&&v.push([r,b]),e||(h={inArray:f,index:y,keys:g,edits:v,prev:h},f=Array.isArray(b),g=f?b:null!==($=d[l(b)])&&void 0!==$?$:[],y=-1,v=[],m!==i&&void 0!==m&&w.push(m),m=b)}while(void 0!==h);return 0!==v.length?v[v.length-1][1]:e};class fS extends _h{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class gS extends fS{}class yS extends fS{}const vS=(e,t={})=>{const{visited:r=new WeakMap}=t,s={...t,visited:r};if(r.has(e))return r.get(e);if(e instanceof g$){const{key:t,value:n}=e,i=q$(t)?vS(t,s):t,o=q$(n)?vS(n,s):n,a=new g$(i,o);return r.set(e,a),a}if(e instanceof v$){const t=e=>vS(e,s),n=[...e].map(t),i=new v$(n);return r.set(e,i),i}if(e instanceof y$){const t=e=>vS(e,s),n=[...e].map(t),i=new y$(n);return r.set(e,i),i}if(q$(e)){const t=wS(e);if(r.set(e,t),e.content)if(q$(e.content))t.content=vS(e.content,s);else if(e.content instanceof g$)t.content=vS(e.content,s);else if(Array.isArray(e.content)){const r=e=>vS(e,s);t.content=e.content.map(r)}else t.content=e.content;else t.content=e.content;return t}throw new gS("Value provided to cloneDeep function couldn't be cloned",{value:e})};vS.safe=e=>{try{return vS(e)}catch{return e}};const bS=e=>{const{key:t,value:r}=e;return new g$(t,r)},xS=e=>{const t=new e.constructor;if(t.element=e.element,e.meta.length>0&&(t._meta=vS(e.meta)),e.attributes.length>0&&(t._attributes=vS(e.attributes)),q$(e.content)){const r=e.content;t.content=xS(r)}else Array.isArray(e.content)?t.content=[...e.content]:e.content instanceof g$?t.content=bS(e.content):t.content=e.content;return t},wS=e=>{if(e instanceof g$)return bS(e);if(e instanceof v$)return(e=>{const t=[...e];return new v$(t)})(e);if(e instanceof y$)return(e=>{const t=[...e];return new y$(t)})(e);if(q$(e))return xS(e);throw new yS("Value provided to cloneShallow function couldn't be cloned",{value:e})};wS.safe=e=>{try{return wS(e)}catch{return e}};const $S=e=>V$(e)?"ObjectElement":W$(e)?"ArrayElement":G$(e)?"MemberElement":N$(e)?"StringElement":H$(e)?"BooleanElement":U$(e)?"NumberElement":z$(e)?"NullElement":J$(e)?"LinkElement":K$(e)?"RefElement":void 0,SS=e=>q$(e)?wS(e):dS(e),ES=df($S,Tg),kS={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class AS{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:e=Mh,returnOnTrue:t,returnOnFalse:r}={}){this.result=[],this.predicate=e,this.returnOnTrue=t,this.returnOnFalse=r}enter(e){return this.predicate(e)?(this.result.push(e),this.returnOnTrue):this.returnOnFalse}}const OS=(e,t,{keyMap:r=kS,...s}={})=>mS(e,t,{keyMap:r,nodeTypeGetter:$S,nodePredicate:ES,nodeCloneFn:SS,...s});OS[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,{keyMap:r=kS,...s}={})=>mS[Symbol.for("nodejs.util.promisify.custom")](e,t,{keyMap:r,nodeTypeGetter:$S,nodePredicate:ES,nodeCloneFn:SS,...s});const jS={toolboxCreator:aS,visitorOptions:{nodeTypeGetter:$S,exposeEdits:!0}},TS=(e,t,r={})=>{if(0===t.length)return e;const s=Yf(jS,r),{toolboxCreator:n,visitorOptions:i}=s,o=n(),a=t.map((e=>e(o))),l=hS(a.map(ig({},"visitor")),{...i});a.forEach(ey(["pre"],[]));const c=OS(e,l,i);return a.forEach(ey(["post"],[])),c};TS[Symbol.for("nodejs.util.promisify.custom")]=async(e,t,r={})=>{if(0===t.length)return e;const s=Yf(jS,r),{toolboxCreator:n,visitorOptions:i}=s,o=n(),a=t.map((e=>e(o))),l=hS[Symbol.for("nodejs.util.promisify.custom")],c=OS[Symbol.for("nodejs.util.promisify.custom")],p=l(a.map(ig({},"visitor")),{...i});await Promise.allSettled(a.map(ey(["pre"],[])));const u=await c(e,p,i);return await Promise.allSettled(a.map(ey(["post"],[]))),u};var PS={exports:{}};!function(e){var t=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,r,s)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[r]=s,a=(e,t)=>{for(var r in t||(t={}))n.call(t,r)&&o(e,r,t[r]);if(s)for(var r of s(t))i.call(t,r)&&o(e,r,t[r]);return e},l=(e,t,r)=>(o(e,"symbol"!=typeof t?t+"":t,r),r),c={};((t,r)=>{for(var s in r)e(t,s,{get:r[s],enumerable:!0})})(c,{DEFAULT_OPTIONS:()=>u,DEFAULT_UUID_LENGTH:()=>p,default:()=>h});var p=6,u={dictionary:"alphanum",shuffle:!0,debug:!1,length:p,counter:0},d=class{constructor(e={}){l(this,"counter"),l(this,"debug"),l(this,"dict"),l(this,"version"),l(this,"dictIndex",0),l(this,"dictRange",[]),l(this,"lowerBound",0),l(this,"upperBound",0),l(this,"dictLength",0),l(this,"uuidLength"),l(this,"_digit_first_ascii",48),l(this,"_digit_last_ascii",58),l(this,"_alpha_lower_first_ascii",97),l(this,"_alpha_lower_last_ascii",123),l(this,"_hex_last_ascii",103),l(this,"_alpha_upper_first_ascii",65),l(this,"_alpha_upper_last_ascii",91),l(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),l(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),l(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),l(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),l(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),l(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),l(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),l(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),l(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),l(this,"log",((...e)=>{const t=[...e];if(t[0]=`[short-unique-id] ${e[0]}`,!0===this.debug&&"undefined"!=typeof console&&null!==console)return console.log(...t)})),l(this,"_normalizeDictionary",((e,t)=>{let r;if(e&&Array.isArray(e)&&e.length>1)r=e;else{let t;r=[],this.dictIndex=t=0;const s=`_${e}_dict_ranges`,n=this._dict_ranges[s];Object.keys(n).forEach((e=>{const s=e;for(this.dictRange=n[s],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=t=this.lowerBound;this.lowerBound<=this.upperBound?t<this.upperBound:t>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?t+=1:t-=1)r.push(String.fromCharCode(this.dictIndex))}))}if(t){const e=.5;r=r.sort((()=>Math.random()-e))}return r})),l(this,"setDictionary",((e,t)=>{this.dict=this._normalizeDictionary(e,t),this.dictLength=this.dict.length,this.setCounter(0)})),l(this,"seq",(()=>this.sequentialUUID())),l(this,"sequentialUUID",(()=>{let e,t,r="";e=this.counter;do{t=e%this.dictLength,e=Math.trunc(e/this.dictLength),r+=this.dict[t]}while(0!==e);return this.counter+=1,r})),l(this,"rnd",((e=this.uuidLength||p)=>this.randomUUID(e))),l(this,"randomUUID",((e=this.uuidLength||p)=>{let t,r,s;if(null==e||e<1)throw new Error("Invalid UUID Length Provided");for(t="",s=0;s<e;s+=1)r=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,t+=this.dict[r];return t})),l(this,"fmt",((e,t)=>this.formattedUUID(e,t))),l(this,"formattedUUID",((e,t)=>{const r={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return e.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(e=>{const s=e.slice(0,2),n=parseInt(e.slice(2),10);return"$s"===s?r[s]().padStart(n,"0"):"$t"===s&&t?r[s](n,t):r[s](n)}))})),l(this,"availableUUIDs",((e=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,e).toFixed(0)))),l(this,"approxMaxBeforeCollision",((e=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*e).toFixed(20)))),l(this,"collisionProbability",((e=this.availableUUIDs(this.uuidLength),t=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(e)/this.availableUUIDs(t)).toFixed(20)))),l(this,"uniqueness",((e=this.availableUUIDs(this.uuidLength))=>{const t=parseFloat((1-this.approxMaxBeforeCollision(e)/e).toFixed(20));return t>1?1:t<0?0:t})),l(this,"getVersion",(()=>this.version)),l(this,"stamp",((e,t)=>{const r=Math.floor(+(t||new Date)/1e3).toString(16);if("number"==typeof e&&0===e)return r;if("number"!=typeof e||e<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join("\n"));const s=e-9,n=Math.round(Math.random()*(s>15?15:s)),i=this.randomUUID(s);return`${i.substring(0,n)}${r}${i.substring(n)}${n.toString(16)}`})),l(this,"parseStamp",((e,t)=>{if(t&&!/t0|t[1-9]\d{1,}/.test(t))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const r=t?t.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(e=>{const t={$r:e=>[...Array(e)].map((()=>"r")).join(""),$s:e=>[...Array(e)].map((()=>"s")).join(""),$t:e=>[...Array(e)].map((()=>"t")).join("")},r=e.slice(0,2),s=parseInt(e.slice(2),10);return t[r](s)})).replace(/^(.*?)(t{8,})(.*)$/g,((t,r,s)=>e.substring(r.length,r.length+s.length))):e;if(8===r.length)return new Date(1e3*parseInt(r,16));if(r.length<10)throw new Error("Stamp length invalid");const s=parseInt(r.substring(r.length-1),16);return new Date(1e3*parseInt(r.substring(s,s+8),16))})),l(this,"setCounter",(e=>{this.counter=e})),l(this,"validate",((e,t)=>{const r=t?this._normalizeDictionary(t):this.dict;return e.split("").every((e=>r.includes(e)))}));const t=a(a({},u),e);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:r,shuffle:s,length:n,counter:i}=t;return this.uuidLength=n,this.setDictionary(r,s),this.setCounter(i),this.debug=t.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};l(d,"default",d);var h=d;return(s=>((s,i,o,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let o of r(i))n.call(s,o)||undefined===o||e(s,o,{get:()=>i[o],enumerable:!(a=t(i,o))||a.enumerable});return s})(e({},"__esModule",{value:!0}),s))(c)})();e.exports=t.default,"undefined"!=typeof window&&(t=t.default)}(PS);const CS=Cn(PS.exports);class IS extends _h{value;constructor(e,t){super(e,t),void 0!==t&&(this.value=t.value)}}class _S{uuid;identityMap;constructor({length:e=6}={}){this.uuid=new CS({length:e}),this.identityMap=new WeakMap}identify(e){if(!q$(e))throw new IS("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:e});if(e.meta.hasKey("id")&&N$(e.meta.get("id"))&&!e.meta.get("id").equals(""))return e.id;if(this.identityMap.has(e))return this.identityMap.get(e);const t=new x$(this.generateId());return this.identityMap.set(e,t),t}forget(e){return!!this.identityMap.has(e)&&(this.identityMap.delete(e),!0)}generateId(){return this.uuid.randomUUID()}}new _S;class RS extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new Fh("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new Fh("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new Fh("latest method in MediaTypes class is not yet implemented.")}}const FS=e=>(t,r={})=>((e,{Type:t,plugins:r=[]})=>{const s=new t(e);return q$(e)&&(e.meta.length>0&&(s.meta=vS(e.meta)),e.attributes.length>0&&(s.attributes=vS(e.attributes))),TS(s,r,{toolboxCreator:aS,visitorOptions:{nodeTypeGetter:$S}})})(t,{...r,Type:e});k$.refract=FS(k$),E$.refract=FS(E$),x$.refract=FS(x$),$$.refract=FS($$),S$.refract=FS(S$),w$.refract=FS(w$),j$.refract=FS(j$),O$.refract=FS(O$),P$.refract=FS(P$),C$.refract=FS(C$),I$.refract=FS(I$),_$.refract=FS(_$);const MS=(e,t)=>{const r=new AS({predicate:e,returnOnTrue:cS});return OS(t,r),tg(void 0,[0],r.result)},LS=e=>"string"==typeof(null==e?void 0:e.type)?e.type:$S(e),DS={EphemeralObject:["content"],EphemeralArray:["content"],...kS},BS=(e,t,{keyMap:r=DS,...s}={})=>OS(e,t,{keyMap:r,nodeTypeGetter:LS,nodePredicate:Lh,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...s});BS[Symbol.for("nodejs.util.promisify.custom")]=async(e,{keyMap:t=DS,...r}={})=>OS[Symbol.for("nodejs.util.promisify.custom")](e,visitor,{keyMap:t,nodeTypeGetter:LS,nodePredicate:Lh,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...r});class qS{type="EphemeralArray";content=[];reference=void 0;constructor(e){this.content=e,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class NS{type="EphemeralObject";content=[];reference=void 0;constructor(e){this.content=e,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const US=e=>q$(e)?N$(e)||U$(e)||H$(e)||z$(e)?e.toValue():BS(e,new class{ObjectElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new NS(e.content);return this.references.set(e,t),t}};EphemeralObject={leave:e=>e.toObject()};MemberElement={enter:e=>[e.key,e.value]};ArrayElement={enter:e=>{if(this.references.has(e))return this.references.get(e).toReference();const t=new qS(e.content);return this.references.set(e,t),t}};EphemeralArray={leave:e=>e.toArray()};references=new WeakMap;BooleanElement(e){return e.toValue()}NumberElement(e){return e.toValue()}StringElement(e){return e.toValue()}NullElement(){return null}RefElement(e,...t){var r;const s=t[3];return"EphemeralObject"===(null===(r=s[s.length-1])||void 0===r?void 0:r.type)?Symbol.for("delete-node"):String(e.toValue())}LinkElement(e){return N$(e.href)?e.href.toValue():""}}):e,zS=(e,t=new WeakMap)=>(G$(e)?(t.set(e.key,e),zS(e.key,t),t.set(e.value,e),zS(e.value,t)):e.children.forEach((r=>{t.set(r,e),zS(r,t)})),t);class HS{element;edges;constructor({element:e}){this.element=e}transclude(e,t){var r;if(e===this.element)return t;if(e===t)return this.element;this.edges=null!==(r=this.edges)&&void 0!==r?r:zS(this.element);const s=this.edges.get(e);return vg(s)?void 0:(V$(s)?((e,t,r)=>{const s=r.get(e);V$(s)&&(s.content=s.map(((n,i,o)=>o===e?(r.delete(e),r.set(t,s),t):o)))})(e,t,this.edges):W$(s)?((e,t,r)=>{const s=r.get(e);W$(s)&&(s.content=s.map((n=>n===e?(r.delete(e),r.set(t,s),t):n)))})(e,t,this.edges):G$(s)&&((e,t,r)=>{const s=r.get(e);G$(s)&&(s.key===e&&(s.key=t,r.delete(e),r.set(t,s)),s.value===e&&(s.value=t,r.delete(e),r.set(t,s)))})(e,t,this.edges),this.element)}}const VS=(e,t)=>{const r=vf(e,t);return Gf((e=>{if(qg(e)&&Ff("$ref",e)&&og(Tg,"$ref",e)){const t=eg(["$ref"],e),s=ay("#/",t);return eg(s.split("/"),r)}return qg(e)?VS(e,r):e}),e)},WS=(e,t=iS)=>{if(Tg(e))try{return t.fromRefract(JSON.parse(e))}catch{}return qg(e)&&Ff("element",e)?t.fromRefract(e):t.toElement(e)},GS=e=>{const t=e.meta.length>0?vS(e.meta):void 0,r=e.attributes.length>0?vS(e.attributes):void 0;return new e.constructor(void 0,t,r)},JS=(e,t)=>t.clone&&t.isMergeableElement(e)?YS(GS(e),e,t):e,KS={clone:!0,isMergeableElement:e=>V$(e)||W$(e),arrayElementMerge:(e,t,r)=>e.concat(t)["fantasy-land/map"]((e=>JS(e,r))),objectElementMerge:(e,t,r)=>{const s=V$(e)?GS(e):GS(t);return V$(e)&&e.forEach(((e,t,n)=>{const i=wS(n);i.value=JS(e,r),s.content.push(i)})),t.forEach(((t,n,i)=>{const o=US(n);let a;if(V$(e)&&e.hasKey(o)&&r.isMergeableElement(t)){const s=e.get(o);a=wS(i),a.value=((e,t)=>{if("function"!=typeof t.customMerge)return YS;const r=t.customMerge(e,t);return"function"==typeof r?r:YS})(n,r)(s,t)}else a=wS(i),a.value=JS(t,r);s.remove(o),s.content.push(a)})),s},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function YS(e,t,r){var s,n,i;const o={...KS,...r};o.isMergeableElement=null!==(s=o.isMergeableElement)&&void 0!==s?s:KS.isMergeableElement,o.arrayElementMerge=null!==(n=o.arrayElementMerge)&&void 0!==n?n:KS.arrayElementMerge,o.objectElementMerge=null!==(i=o.objectElementMerge)&&void 0!==i?i:KS.objectElementMerge;const a=W$(t);if(a!==W$(e))return JS(t,o);const l=a&&"function"==typeof o.arrayElementMerge?o.arrayElementMerge(e,t,o):o.objectElementMerge(e,t,o);return l.meta=(e=>"function"!=typeof e.customMetaMerge?e=>vS(e):e.customMetaMerge)(o)(e.meta,t.meta),l.attributes=(e=>"function"!=typeof e.customAttributesMerge?e=>vS(e):e.customAttributesMerge)(o)(e.attributes,t.attributes),l}YS.all=(e,t)=>{if(!Array.isArray(e))throw new TypeError("First argument of deepmerge should be an array.");return 0===e.length?new k$:e.reduce(((e,r)=>YS(e,r,t)),GS(e[0]))};class XS extends Ih{}class ZS extends XS{}let QS=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:e,allowEmpty:t=!0,sourceMap:r=!1,fileExtensions:s=[],mediaTypes:n=[]}){this.name=e,this.allowEmpty=t,this.sourceMap=r,this.fileExtensions=s,this.mediaTypes=n}};class eE extends Array{includesCycle(e){return this.filter((t=>t.has(e))).length>1}includes(e,t){return e instanceof Set?super.includes(e,t):this.some((t=>t.has(e)))}findItem(e){for(const t of this)for(const r of t)if(q$(r)&&e(r))return r}}let tE=class{uri;depth;value;refSet;errors;constructor({uri:e,depth:t=0,refSet:r,value:s}){this.uri=e,this.value=s,this.depth=t,this.refSet=r,this.errors=[]}};class rE extends Ih{}class sE extends rE{}class nE extends Ih{}class iE extends nE{}class oE extends rE{constructor(e){super(`Invalid JSON Schema $anchor "${e}".`)}}class aE extends XS{}class lE extends Gy{}class cE extends Wy{}function pE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,s=new Array(t);r<t;r++)s[r]=e[r];return s}function uE(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function dE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var s,n,i=[],o=!0,a=!1;try{for(r=r.call(e);!(o=(s=r.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){a=!0,n=e}finally{try{o||null==r.return||r.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pE(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hE(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var mE=function(e){throw TypeError(e)},fE=function(e,t,r){return t.has(e)||mE("Cannot "+r)},gE=function(e,t,r){return fE(e,t,"read from private field"),t.get(e)},yE=function(e,t,r){return t.has(e)?mE("Cannot add the same private member more than once"):uE(t,WeakSet)?t.add(e):t.set(e,r)},vE=function(e,t,r,s){return fE(e,t,"write to private field"),t.set(e,r),r},bE=function(e){return Object.prototype.toString.call(e)},xE=function(e){return ArrayBuffer.isView(e)&&!uE(e,DataView)},wE=Array.isArray,$E=Object.getOwnPropertyDescriptor,SE=Object.prototype.propertyIsEnumerable,EE=Object.getOwnPropertySymbols,kE=Object.prototype.hasOwnProperty;function AE(e){for(var t=Object.keys(e),r=EE(e),s=0;s<r.length;s++)SE.call(e,r[s])&&t.push(r[s]);return t}function OE(e,t){var r;return!(null===(r=$E(e,t))||void 0===r?void 0:r.writable)}function jE(e,t){if("object"===(void 0===e?"undefined":hE(e))&&null!==e){var r;if(wE(e))r=[];else if("[object Date]"===bE(e))r=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===bE(e)}(e))r=new RegExp(e);else if(function(e){return"[object Error]"===bE(e)}(e))r={message:e.message};else if(function(e){return"[object Boolean]"===bE(e)}(e)||function(e){return"[object Number]"===bE(e)}(e)||function(e){return"[object String]"===bE(e)}(e))r=Object(e);else{if(xE(e))return e.slice();r=Object.create(Object.getPrototypeOf(e))}var s=t.includeSymbols?AE:Object.keys,n=!0,i=!1,o=void 0;try{for(var a,l=s(e)[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var c=a.value;r[c]=e[c]}}catch(e){i=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(i)throw o}}return r}return e}var TE,PE,CE={includeSymbols:!1,immutable:!1};function IE(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:CE,s=[],n=[],i=!0,o=r.includeSymbols?AE:Object.keys,a=!!r.immutable;return function e(l){var c=a?jE(l,r):l,p={},u=!0,d={node:c,node_:l,path:[].concat(s),parent:n[n.length-1],parents:n,key:s[s.length-1],isRoot:0===s.length,level:s.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];d.isRoot||(d.parent.node[d.key]=e),d.node=e,t&&(u=!1)},delete:function(e){delete d.parent.node[d.key],e&&(u=!1)},remove:function(e){wE(d.parent.node)?d.parent.node.splice(d.key,1):delete d.parent.node[d.key],e&&(u=!1)},keys:null,before:function(e){p.before=e},after:function(e){p.after=e},pre:function(e){p.pre=e},post:function(e){p.post=e},stop:function(){i=!1},block:function(){u=!1}};if(!i)return d;function h(){if("object"===hE(d.node)&&null!==d.node){d.keys&&d.node_===d.node||(d.keys=o(d.node)),d.isLeaf=0===d.keys.length;for(var e=0;e<n.length;e++)if(n[e].node_===l){d.circular=n[e];break}}else d.isLeaf=!0,d.keys=null;d.notLeaf=!d.isLeaf,d.notRoot=!d.isRoot}h();var m=t.call(d,d.node);if(void 0!==m&&d.update&&d.update(m),p.before&&p.before.call(d,d.node),!u)return d;if("object"===hE(d.node)&&null!==d.node&&!d.circular){var f;n.push(d),h();var g=!0,y=!1,v=void 0;try{for(var b,x=Object.entries(null!==(f=d.keys)&&void 0!==f?f:[])[Symbol.iterator]();!(g=(b=x.next()).done);g=!0){var w,$=dE(b.value,2),S=$[0],E=$[1];s.push(E),p.pre&&p.pre.call(d,d.node[E],E);var k=e(d.node[E]);a&&kE.call(d.node,E)&&!OE(d.node,E)&&(d.node[E]=k.node),k.isLast=!!(null===(w=d.keys)||void 0===w?void 0:w.length)&&+S==d.keys.length-1,k.isFirst=0==+S,p.post&&p.post.call(d,k),s.pop()}}catch(e){y=!0,v=e}finally{try{g||null==x.return||x.return()}finally{if(y)throw v}}n.pop()}return p.after&&p.after.call(d,d.node),d}(e).node}var _E=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:CE;(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),yE(this,TE),yE(this,PE),vE(this,TE,t),vE(this,PE,r)}return function(e,t){t&&function(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(e.prototype,t)}(e,[{key:"get",value:function(e){for(var t=gE(this,TE),r=0;t&&r<e.length;r++){var s=e[r];if(!kE.call(t,s)||!gE(this,PE).includeSymbols&&"symbol"===(void 0===s?"undefined":hE(s)))return;t=t[s]}return t}},{key:"has",value:function(e){for(var t=gE(this,TE),r=0;t&&r<e.length;r++){var s=e[r];if(!kE.call(t,s)||!gE(this,PE).includeSymbols&&"symbol"===(void 0===s?"undefined":hE(s)))return!1;t=t[s]}return!0}},{key:"set",value:function(e,t){var r=gE(this,TE),s=0;for(s=0;s<e.length-1;s++){var n=e[s];kE.call(r,n)||(r[n]={}),r=r[n]}return r[e[s]]=t,t}},{key:"map",value:function(e){return IE(gE(this,TE),e,{immutable:!0,includeSymbols:!!gE(this,PE).includeSymbols})}},{key:"forEach",value:function(e){return vE(this,TE,IE(gE(this,TE),e,gE(this,PE))),gE(this,TE)}},{key:"reduce",value:function(e,t){var r=1===arguments.length,s=r?gE(this,TE):t;return this.forEach((function(t){this.isRoot&&r||(s=e.call(this,s,t))})),s}},{key:"paths",value:function(){var e=[];return this.forEach((function(){e.push(this.path)})),e}},{key:"nodes",value:function(){var e=[];return this.forEach((function(){e.push(this.node)})),e}},{key:"clone",value:function(){var e=[],t=[],r=gE(this,PE);return xE(gE(this,TE))?gE(this,TE).slice():function s(n){for(var i=0;i<e.length;i++)if(e[i]===n)return t[i];if("object"===(void 0===n?"undefined":hE(n))&&null!==n){var o=jE(n,r);e.push(n),t.push(o);var a=r.includeSymbols?AE:Object.keys,l=!0,c=!1,p=void 0;try{for(var u,d=a(n)[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var h=u.value;o[h]=s(n[h])}}catch(e){c=!0,p=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw p}}return e.pop(),t.pop(),o}return n}(gE(this,TE))}}]),e}();TE=new WeakMap,PE=new WeakMap;var RE=function(e,t){return new _E(e,t)};RE.get=function(e,t,r){return new _E(e,r).get(t)},RE.set=function(e,t,r,s){return new _E(e,s).set(t,r)},RE.has=function(e,t,r){return new _E(e,r).has(t)},RE.map=function(e,t,r){return new _E(e,r).map(t)},RE.forEach=function(e,t,r){return new _E(e,r).forEach(t)},RE.reduce=function(e,t,r,s){return new _E(e,s).reduce(t,r)},RE.paths=function(e,t){return new _E(e,t).paths()},RE.nodes=function(e,t){return new _E(e,t).nodes()},RE.clone=function(e,t){return new _E(e,t).clone()};var FE=RE;const ME=["properties"],LE=["properties"],DE=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],BE=["schema/example","items/example"];function qE(e){const t=e[e.length-1],r=e[e.length-2],s=e.join("/");return ME.indexOf(t)>-1&&-1===LE.indexOf(r)||DE.indexOf(s)>-1||BE.some((e=>s.indexOf(e)>-1))}function NE(e,t){const[r,s]=e.split("#"),n=null!=t?t:"",i=null!=r?r:"";let o;if(Oy(n))o=_y(n,i);else{const e=_y("https://swagger.io",n),t=_y(e,i).replace("https://swagger.io","");o=i.startsWith("/")?t:t.substring(1)}return s?`${o}#${s}`:o}const UE=/^([a-z]+:\/\/|\/\/)/i;class zE extends _h{}const HE={},VE=new WeakMap,WE=[e=>"paths"===e[0]&&"responses"===e[3]&&"examples"===e[5],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[2]&&"example"===e[4],e=>"paths"===e[0]&&"parameters"===e[3]&&"example"===e[5],e=>"paths"===e[0]&&"parameters"===e[2]&&"examples"===e[4]&&"value"===e[6],e=>"paths"===e[0]&&"parameters"===e[3]&&"examples"===e[5]&&"value"===e[7],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[4]&&"example"===e[7],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9]],GE={key:"$ref",plugin:(e,t,r,s)=>{const n=s.getInstance(),i=r.slice(0,-1);if(qE(i)||(e=>WE.some((t=>t(e))))(i))return;const{baseDoc:o}=s.getContext(r);if("string"!=typeof e)return new zE("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:o,fullPath:r});const a=XE(e),l=a[0],c=a[1]||"";let p,u,d;try{p=o||l?KE(l,o):null}catch(t){return YE(t,{pointer:c,$ref:e,basePath:p,fullPath:r})}if(function(e,t,r,s){let n=VE.get(s);n||(n={},VE.set(s,n));const i=function(e){return 0===e.length?"":`/${e.map(sk).join("/")}`}(r),o=`${t||"<specmap-base>"}#${e}`,a=i.replace(/allOf\/\d+\/?/g,"");if(t===s.contextTree.get([]).baseDoc&&nk(a,e))return!0;let l="";const c=r.some((e=>(l=`${l}/${sk(e)}`,n[l]&&n[l].some((e=>nk(e,o)||nk(o,e))))));if(c)return!0;n[a]=(n[a]||[]).concat(o)}(c,p,i,s)&&!n.useCircularStructures){const t=NE(e,p);return e===t?null:qn.replace(r,t)}if(null==p?(d=tk(c),u=s.get(d),void 0===u&&(u=new zE(`Could not resolve reference: ${e}`,{pointer:c,$ref:e,baseDoc:o,fullPath:r}))):(u=ZE(p,c),u=null!=u.l?u.l:u.catch((t=>{throw YE(t,{pointer:c,$ref:e,baseDoc:o,fullPath:r})}))),u instanceof Error)return[qn.remove(r),u];const h=NE(e,p),m=qn.replace(i,u,{$$ref:h});if(p&&p!==o)return[m,qn.context(i,{baseDoc:p})];try{if(!function(e,t){const r=[e];return t.path.reduce(((e,t)=>(r.push(e[t]),e[t])),e),function e(t){return qn.isObject(t)&&(r.indexOf(t)>=0||Object.keys(t).some((r=>e(t[r]))))}(t.value)}(s.state,m)||n.useCircularStructures)return m}catch(e){return null}}},JE=Object.assign(GE,{docCache:HE,absoluteify:KE,clearCache:function(e){void 0!==e?delete HE[e]:Object.keys(HE).forEach((e=>{delete HE[e]}))},JSONRefError:zE,wrapError:YE,getDoc:QE,split:XE,extractFromDoc:ZE,fetchJSON:function(e){return fetch(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((e=>e.text())).then((e=>Js.load(e)))},extract:ek,jsonPointerToArray:tk,unescapeJsonPointerToken:rk});function KE(e,t){if(!UE.test(e)){if(!t)throw new zE(`Tried to resolve a relative URL, without having a basePath. path: '${e}' basePath: '${t}'`);return _y(t,e)}return e}function YE(e,t){let r;return r=e&&e.response&&e.response.body?`${e.response.body.code} ${e.response.body.message}`:e.message,new zE(`Could not resolve reference: ${r}`,{...t,cause:e})}function XE(e){return(e+"").split("#")}function ZE(e,t){const r=HE[e];if(r&&!qn.isPromise(r))try{const e=ek(t,r);return Object.assign(Promise.resolve(e),{l:e})}catch(e){return Promise.reject(e)}return QE(e).then((e=>ek(t,e)))}function QE(e){const t=HE[e];return t?qn.isPromise(t)?t:Promise.resolve(t):(HE[e]=JE.fetchJSON(e).then((t=>(HE[e]=t,t))),HE[e])}function ek(e,t){const r=tk(e);if(r.length<1)return t;const s=qn.getIn(t,r);if(void 0===s)throw new zE(`Could not resolve pointer: ${e} does not exist in document`,{pointer:e});return s}function tk(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+typeof e);return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(rk)}function rk(e){return"string"!=typeof e?e:new URLSearchParams(`=${e.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function sk(e){return new URLSearchParams([["",e.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function nk(e,t){if(!(r=t)||"/"===r||"#"===r)return!0;var r;const s=e.charAt(t.length),n=t.slice(-1);return 0===e.indexOf(t)&&(!s||"/"===s||"#"===s)&&"#"!==n}const ik={key:"allOf",plugin:(e,t,r,s,n)=>{if(n.meta&&n.meta.$$ref)return;const i=r.slice(0,-1);if(qE(i))return;if(!Array.isArray(e)){const e=new TypeError("allOf must be an array");return e.fullPath=r,e}let o=!1,a=n.value;if(i.forEach((e=>{a&&(a=a[e])})),a={...a},0===Object.keys(a).length)return;delete a.allOf;const l=[];return l.push(s.replace(i,{})),e.forEach(((e,t)=>{if(!s.isObject(e)){if(o)return null;o=!0;const e=new TypeError("Elements in allOf must be objects");return e.fullPath=r,l.push(e)}l.push(s.mergeDeep(i,e));const n=function(e,t,{specmap:r,getBaseUrlForNodePath:s=e=>r.getContext([...t,...e]).baseDoc,targetKeys:n=["$ref","$$ref"]}={}){const i=[];return FE(e).forEach((function(){if(n.includes(this.key)&&"string"==typeof this.node){const e=this.path,n=t.concat(this.path),o=NE(this.node,s(e));i.push(r.replace(n,o))}})),i}(e,r.slice(0,-1),{getBaseUrlForNodePath:e=>s.getContext([...r,t,...e]).baseDoc,specmap:s});l.push(...n)})),a.example&&l.push(s.remove([].concat(i,"example"))),l.push(s.mergeDeep(i,a)),a.$$ref||l.push(s.remove([].concat(i,"$$ref"))),l}},ok={key:"parameters",plugin:(e,t,r,s)=>{if(Array.isArray(e)&&e.length){const t=Object.assign([],e),n=r.slice(0,-1),i={...qn.getIn(s.spec,n)};for(let n=0;n<e.length;n+=1){const o=e[n];try{t[n].default=s.parameterMacro(i,o)}catch(e){const t=new Error(e);return t.fullPath=r,t}}return qn.replace(r,t)}return qn.replace(r,e)}},ak={key:"properties",plugin:(e,t,r,s)=>{const n={...e};for(const t in e)try{n[t].default=s.modelPropertyMacro(n[t])}catch(e){const t=new Error(e);return t.fullPath=r,t}return qn.replace(r,n)}};class lk{constructor(e){this.root=ck(e||{})}set(e,t){const r=this.getParent(e,!0);if(!r)return void pk(this.root,t,null);const s=e[e.length-1],{children:n}=r;n[s]?pk(n[s],t,r):n[s]=ck(t,r)}get(e){if((e=e||[]).length<1)return this.root.value;let t,r,s=this.root;for(let n=0;n<e.length&&(r=e[n],t=s.children,t[r]);n+=1)s=t[r];return s&&s.protoValue}getParent(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(((e,r)=>{if(!e)return e;const{children:s}=e;return!s[r]&&t&&(s[r]=ck(null,e)),s[r]}),this.root)}}function ck(e,t){return pk({children:{}},e,t)}function pk(e,t,r){return e.value=t||{},e.protoValue=r?{...r.protoValue,...e.value}:e.value,Object.keys(e.children).forEach((t=>{const r=e.children[t];e.children[t]=pk(r,r.value,e)})),e}const uk=()=>{};class dk{static getPluginName(e){return e.pluginName}static getPatchesOfType(e,t){return e.filter(t)}constructor(e){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new lk,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),qn,{getInstance:()=>this}),allowMetaPatches:!1},e),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(qn.isFunction),this.patches.push(qn.add([],this.spec)),this.patches.push(qn.context([],this.context)),this.updatePatches(this.patches)}debug(e,...t){this.debugLevel===e&&console.log(...t)}verbose(e,...t){"verbose"===this.debugLevel&&console.log(`[${e}] `,...t)}wrapPlugin(e,t){const{pathDiscriminator:r}=this;let s,n=null;return e[this.pluginProp]?(n=e,s=e[this.pluginProp]):qn.isFunction(e)?s=e:qn.isObject(e)&&(s=function(e){const t=(e,t)=>!Array.isArray(e)||e.every(((e,r)=>e===t[r]));return function*(s,n){const i={};for(const[e,t]of s.filter(qn.isAdditiveMutation).entries()){if(!(e<3e3))return;yield*o(t.value,t.path,t)}function*o(s,a,l){if(qn.isObject(s)){const c=a.length-1,p=a[c],u=a.indexOf("properties"),d="properties"===p&&c===u,h=n.allowMetaPatches&&i[s.$$ref];for(const c of Object.keys(s)){const p=s[c],u=a.concat(c),m=qn.isObject(p),f=s.$$ref;if(h||m&&(n.allowMetaPatches&&f&&(i[f]=!0),yield*o(p,u,l)),!d&&c===e.key){const s=t(r,a);r&&!s||(yield e.plugin(p,c,u,n,l))}}}else e.key===a[a.length-1]&&(yield e.plugin(s,e.key,a,n))}}}(e)),Object.assign(s.bind(n),{pluginName:e.name||t,isGenerator:qn.isGenerator(s)})}nextPlugin(){return this.wrappedPlugins.find((e=>this.getMutationsForPlugin(e).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((e=>e.value)))}getPluginHistory(e){const t=this.constructor.getPluginName(e);return this.pluginHistory[t]||[]}getPluginRunCount(e){return this.getPluginHistory(e).length}getPluginHistoryTip(e){const t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}getPluginMutationIndex(e){const t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}updatePluginHistory(e,t){const r=this.constructor.getPluginName(e);this.pluginHistory[r]=this.pluginHistory[r]||[],this.pluginHistory[r].push(t)}updatePatches(e){qn.normalizeArray(e).forEach((e=>{if(e instanceof Error)this.errors.push(e);else try{if(!qn.isObject(e))return void this.debug("updatePatches","Got a non-object patch",e);if(this.showDebug&&this.allPatches.push(e),qn.isPromise(e.value))return this.promisedPatches.push(e),void this.promisedPatchThen(e);if(qn.isContextPatch(e))return void this.setContext(e.path,e.value);qn.isMutation(e)&&this.updateMutations(e)}catch(e){console.error(e),this.errors.push(e)}}))}updateMutations(e){"object"==typeof e.value&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value={...e.value});const t=qn.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}removePromisedPatch(e){const t=this.promisedPatches.indexOf(e);t<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(t,1)}promisedPatchThen(e){return e.value=e.value.then((t=>{const r={...e,value:t};this.removePromisedPatch(e),this.updatePatches(r)})).catch((t=>{this.removePromisedPatch(e),this.updatePatches(t)})),e.value}getMutations(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(e){const t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(e){return qn.getIn(this.state,e)}_getContext(e){return this.contextTree.get(e)}setContext(e,t){return this.contextTree.set(e,t)}_hasRun(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}dispatch(){const e=this,t=this.nextPlugin();if(!t){const e=this.nextPromisedPatch();if(e)return e.then((()=>this.dispatch())).catch((()=>this.dispatch()));const t={spec:this.state,errors:this.errors};return this.showDebug&&(t.patches=this.allPatches),Promise.resolve(t)}if(e.pluginCount=e.pluginCount||new WeakMap,e.pluginCount.set(t,(e.pluginCount.get(t)||0)+1),e.pluginCount[t]>100)return Promise.resolve({spec:e.state,errors:e.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(t!==this.currentPlugin&&this.promisedPatches.length){const e=this.promisedPatches.map((e=>e.value));return Promise.all(e.map((e=>e.then(uk,uk)))).then((()=>this.dispatch()))}return function(){e.currentPlugin=t;const s=e.getCurrentMutations(),n=e.mutations.length-1;try{if(t.isGenerator)for(const n of t(s,e.getLib()))r(n);else r(t(s,e.getLib()))}catch(e){console.error(e),r([Object.assign(Object.create(e),{plugin:t})])}finally{e.updatePluginHistory(t,{mutationIndex:n})}return e.dispatch()}();function r(r){r&&(r=qn.fullyNormalizeArray(r),e.updatePatches(r,t))}}}const hk={refs:JE,allOf:ik,parameters:ok,properties:ak};async function mk(e){const{spec:t,mode:r,allowMetaPatches:s=!0,pathDiscriminator:n,modelPropertyMacro:i,parameterMacro:o,requestInterceptor:a,responseInterceptor:l,skipNormalization:c=!1,useCircularStructures:p,strategies:u}=e,d=Qs(e),h=en(e),m=u.find((e=>e.match(t)));return async function(e){d&&(hk.refs.docCache[d]=e),hk.refs.fetchJSON=Zs(h,{requestInterceptor:a,responseInterceptor:l});const t=[hk.refs];"function"==typeof o&&t.push(hk.parameters),"function"==typeof i&&t.push(hk.properties),"strict"!==r&&t.push(hk.allOf);const u=await(f={spec:e,context:{baseDoc:d},plugins:t,allowMetaPatches:s,pathDiscriminator:n,parameterMacro:o,modelPropertyMacro:i,useCircularStructures:p},new dk(f).dispatch());var f;return c||(u.spec=m.normalize(u.spec)),u}(t)}const fk=e=>e.replace(/\W/gi,"_");function gk(e,t,r="",{v2OperationIdCompatibilityMode:s}={}){return e&&"object"==typeof e?(e.operationId||"").replace(/\s/g,"").length?fk(e.operationId):function(e,t,{v2OperationIdCompatibilityMode:r}={}){if(r){let r=`${t.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return r=r||`${e.substring(1)}_${t}`,r.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${t.toLowerCase()}${fk(e)}`}(t,r,{v2OperationIdCompatibilityMode:s}):null}function yk(e){const{spec:t}=e,{paths:r}=t,s={};if(!r||t.$$normalized)return e;for(const e in r){const n=r[e];if(null==n||!["object","function"].includes(typeof n))continue;const i=n.parameters;for(const r in n){const o=n[r];if(null==o||!["object","function"].includes(typeof o))continue;const a=gk(o,e,r);if(a){s[a]?s[a].push(o):s[a]=[o];const e=s[a];if(e.length>1)e.forEach(((e,t)=>{e.h=e.h||e.operationId,e.operationId=`${a}${t+1}`}));else if(void 0!==o.operationId){const t=e[0];t.h=t.h||o.operationId,t.operationId=a}}if("parameters"!==r){const e=[],r={};for(const s in t)"produces"!==s&&"consumes"!==s&&"security"!==s||(r[s]=t[s],e.push(r));if(i&&(r.parameters=i,e.push(r)),e.length)for(const t of e)for(const e in t)if(o[e]){if("parameters"===e)for(const r of t[e])o[e].some((e=>e.name&&e.name===r.name||e.$ref&&e.$ref===r.$ref||e.$$ref&&e.$$ref===r.$$ref||e===r))||o[e].push(r)}else o[e]=t[e]}}}return t.$$normalized=!0,e}const vk={name:"generic",match:()=>!0,normalize(e){const{spec:t}=yk({spec:e});return t},resolve:async e=>mk(e)},bk=e=>{try{const{swagger:t}=e;return"2.0"===t}catch{return!1}},xk=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.0\.([0123])(?:-rc[012])?$/.test(t)}catch{return!1}},wk=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.1\.(?:[1-9]\d*|0)$/.test(t)}catch{return!1}},$k=e=>xk(e)||wk(e),Sk={name:"openapi-2",match:e=>bk(e),normalize(e){const{spec:t}=yk({spec:e});return t},resolve:async e=>async function(e){return mk(e)}(e)},Ek={name:"openapi-3-0",match:e=>xk(e),normalize(e){const{spec:t}=yk({spec:e});return t},resolve:async e=>async function(e){return mk(e)}(e)},kk=e=>async t=>(async e=>{const{spec:t,requestInterceptor:r,responseInterceptor:s}=e,n=Qs(e),i=en(e),o=t||await Zs(i,{requestInterceptor:r,responseInterceptor:s})(n),a={...e,spec:o};return e.strategies.find((e=>e.match(o))).resolve(a)})({...e,...t}),Ak=kk({strategies:[Ek,Sk,vk]});class Ok extends _h{}class jk extends Ok{pointer;constructor(e,t){super(e,t),void 0!==t&&(this.pointer=t.pointer)}}class Tk extends Ok{tokens;constructor(e,t){super(e,t),void 0!==t&&(this.tokens=[...t.tokens])}}class Pk extends Ok{pointer;tokens;failedToken;failedTokenPosition;element;constructor(e,t){super(e,t),void 0!==t&&(this.pointer=t.pointer,Array.isArray(t.tokens)&&(this.tokens=[...t.tokens]),this.failedToken=t.failedToken,this.failedTokenPosition=t.failedTokenPosition,this.element=t.element)}}const Ck=df(cg(/~/g,"~0"),cg(/\//g,"~1"),encodeURIComponent),Ik=df(cg(/~1/g,"/"),cg(/~0/g,"~"),(e=>{try{return decodeURIComponent(e)}catch{return e}})),_k=e=>{const t=(e=>{const t=e.indexOf("#");return-1!==t?e.substring(t):"#"})(e);return ay("#",t)},Rk=e=>{try{return 0===e.length?"":`/${e.map(Ck).join("/")}`}catch(t){throw new Tk("JSON Pointer compilation of tokens encountered an error.",{tokens:e,cause:t})}},Fk=(e,t)=>{let r;try{r=(e=>{if(Pg(e))return[];if(!dg("/",e))throw new jk(`Invalid JSON Pointer "${e}". JSON Pointers must begin with "/"`,{pointer:e});try{const t=df(ug("/"),jm(Ik))(e);return uf(t)}catch(t){throw new jk(`JSON Pointer parsing of "${e}" encountered an error.`,{pointer:e,cause:t})}})(e)}catch(r){throw new Pk(`JSON Pointer evaluation failed while parsing the pointer "${e}".`,{pointer:e,element:vS(t),cause:r})}return r.reduce(((t,s,n)=>{if(V$(t)){if(!t.hasKey(s))throw new Pk(`JSON Pointer evaluation failed while evaluating token "${s}" against an ObjectElement`,{pointer:e,tokens:r,failedToken:s,failedTokenPosition:n,element:vS(t)});return t.get(s)}if(W$(t)){if(!(s in t.content)||!Vg(Number(s)))throw new Pk(`JSON Pointer evaluation failed while evaluating token "${s}" against an ArrayElement`,{pointer:e,tokens:r,failedToken:s,failedTokenPosition:n,element:vS(t)});return t.get(Number(s))}throw new Pk(`JSON Pointer evaluation failed while evaluating token "${s}" against an unexpected Element`,{pointer:e,tokens:r,failedToken:s,failedTokenPosition:n,element:vS(t)})}),t)};class Mk extends RS{filterByFormat(e="generic"){const t="generic"===e?"openapi;version":e;return this.filter((e=>e.includes(t)))}findBy(e="3.1.0",t="generic"){const r="generic"===t?`vnd.oai.openapi;version=${e}`:`vnd.oai.openapi+${t};version=${e}`;return this.find((e=>e.includes(r)))||this.unknownMediaType}latest(e="generic"){return Af(this.filterByFormat(e))}}const Lk=new Mk("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let Dk=class extends k${constructor(e,t,r){super(e,t,r),this.element="callback"}},Bk=class extends k${constructor(e,t,r){super(e,t,r),this.element="components"}get schemas(){return this.get("schemas")}set schemas(e){this.set("schemas",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get requestBodies(){return this.get("requestBodies")}set requestBodies(e){this.set("requestBodies",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(e){this.set("securitySchemes",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}},qk=class extends k${constructor(e,t,r){super(e,t,r),this.element="contact"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}get email(){return this.get("email")}set email(e){this.set("email",e)}},Nk=class extends k${constructor(e,t,r){super(e,t,r),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(e){this.set("propertyName",e)}get mapping(){return this.get("mapping")}set mapping(e){this.set("mapping",e)}},Uk=class extends k${constructor(e,t,r){super(e,t,r),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(e){this.set("contentType",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(e){this.set("allowedReserved",e)}},zk=class extends k${constructor(e,t,r){super(e,t,r),this.element="example"}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get value(){return this.get("value")}set value(e){this.set("value",e)}get externalValue(){return this.get("externalValue")}set externalValue(e){this.set("externalValue",e)}},Hk=class extends k${constructor(e,t,r){super(e,t,r),this.element="externalDocumentation"}get description(){return this.get("description")}set description(e){this.set("description",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},Vk=class extends k${constructor(e,t,r){super(e,t,r),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new $$(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new $$(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(Vk.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});let Wk=class extends k${constructor(e,t,r){super(e,t,r),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get termsOfService(){return this.get("termsOfService")}set termsOfService(e){this.set("termsOfService",e)}get contact(){return this.get("contact")}set contact(e){this.set("contact",e)}get license(){return this.get("license")}set license(e){this.set("license",e)}get version(){return this.get("version")}set version(e){this.set("version",e)}},Gk=class extends k${constructor(e,t,r){super(e,t,r),this.element="license"}get name(){return this.get("name")}set name(e){this.set("name",e)}get url(){return this.get("url")}set url(e){this.set("url",e)}},Jk=class extends k${constructor(e,t,r){super(e,t,r),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(e){this.set("operationRef",e)}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get operation(){var e,t;return N$(this.operationRef)?null===(e=this.operationRef)||void 0===e?void 0:e.meta.get("operation"):N$(this.operationId)?null===(t=this.operationId)||void 0===t?void 0:t.meta.get("operation"):void 0}set operation(e){this.set("operation",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get server(){return this.get("server")}set server(e){this.set("server",e)}},Kk=class extends k${constructor(e,t,r){super(e,t,r),this.element="mediaType"}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get encoding(){return this.get("encoding")}set encoding(e){this.set("encoding",e)}},Yk=class extends k${constructor(e,t,r){super(e,t,r),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(e){this.set("authorizationUrl",e)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(e){this.set("tokenUrl",e)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(e){this.set("refreshUrl",e)}get scopes(){return this.get("scopes")}set scopes(e){this.set("scopes",e)}},Xk=class extends k${constructor(e,t,r){super(e,t,r),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(e){this.set("implicit",e)}get password(){return this.get("password")}set password(e){this.set("password",e)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(e){this.set("clientCredentials",e)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(e){this.set("authorizationCode",e)}},Zk=class extends x${constructor(e,t,r){super(e,t,r),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class Qk extends k${constructor(e,t,r){super(e,t,r),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}}let eA=class extends k${constructor(e,t,r){super(e,t,r),this.element="operation"}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}set externalDocs(e){this.set("externalDocs",e)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(e){this.set("operationId",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}get responses(){return this.get("responses")}set responses(e){this.set("responses",e)}get callbacks(){return this.get("callbacks")}set callbacks(e){this.set("callbacks",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new $$(!1)}set deprecated(e){this.set("deprecated",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get servers(){return this.get("severs")}set servers(e){this.set("servers",e)}},tA=class extends k${constructor(e,t,r){super(e,t,r),this.element="parameter"}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get required(){return this.hasKey("required")?this.get("required"):new $$(!1)}set required(e){this.set("required",e)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new $$(!1)}set deprecated(e){this.set("deprecated",e)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(e){this.set("allowEmptyValue",e)}get style(){return this.get("style")}set style(e){this.set("style",e)}get explode(){return this.get("explode")}set explode(e){this.set("explode",e)}get allowReserved(){return this.get("allowReserved")}set allowReserved(e){this.set("allowReserved",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}};Object.defineProperty(tA.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0});let rA=class extends k${constructor(e,t,r){super(e,t,r),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get parameters(){return this.get("parameters")}set parameters(e){this.set("parameters",e)}},sA=class extends k${constructor(e,t,r){super(e,t,r),this.element="paths"}},nA=class extends k${constructor(e,t,r){super(e,t,r),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}},iA=class extends k${constructor(e,t,r){super(e,t,r),this.element="requestBody"}get description(){return this.get("description")}set description(e){this.set("description",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get required(){return this.hasKey("required")?this.get("required"):new $$(!1)}set required(e){this.set("required",e)}},oA=class extends k${constructor(e,t,r){super(e,t,r),this.element="response"}get description(){return this.get("description")}set description(e){this.set("description",e)}get headers(){return this.get("headers")}set headers(e){this.set("headers",e)}get contentProp(){return this.get("content")}set contentProp(e){this.set("content",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}},aA=class extends k${constructor(e,t,r){super(e,t,r),this.element="responses"}get default(){return this.get("default")}set default(e){this.set("default",e)}};class lA extends k${constructor(e,t,r){super(e,t,r),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(e){this.set("id",e)}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get dependencies(){return this.get("dependencies")}set dependencies(e){this.set("dependencies",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){return this.get("definitions")}set definitions(e){this.set("definitions",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get base(){return this.get("base")}set base(e){this.set("base",e)}get links(){return this.get("links")}set links(e){this.set("links",e)}get media(){return this.get("media")}set media(e){this.set("media",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}}class cA extends k${constructor(e,t,r){super(e,t,r),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}}class pA extends k${constructor(e,t,r){super(e,t,r),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(e){this.set("binaryEncoding",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}}class uA extends k${constructor(e,t,r){super(e,t,r),this.element="linkDescription"}get href(){return this.get("href")}set href(e){this.set("href",e)}get rel(){return this.get("rel")}set rel(e){this.set("rel",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get targetSchema(){return this.get("targetSchema")}set targetSchema(e){this.set("targetSchema",e)}get mediaType(){return this.get("mediaType")}set mediaType(e){this.set("mediaType",e)}get method(){return this.get("method")}set method(e){this.set("method",e)}get encType(){return this.get("encType")}set encType(e){this.set("encType",e)}get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}const dA={namespace:e=>{const{base:t}=e;return t.register("jSONSchemaDraft4",lA),t.register("jSONReference",cA),t.register("media",pA),t.register("linkDescription",uA),t}},hA=e=>{if(q$(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},mA={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...kS};let fA=class{element;constructor(e){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=YS(t.meta,e.meta),tS(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=YS(t.attributes,e.attributes))}},gA=class extends fA{enter(e){return this.element=vS(e),cS}};const yA=(e,t,r=[])=>{const s=Object.getOwnPropertyDescriptors(t);for(let e of r)delete s[e];Object.defineProperties(e,s)},vA=(e,t=[e])=>{const r=Object.getPrototypeOf(e);return null===r?t:vA(r,[...t,r])},bA=(e,t,r=[])=>{var s;const n=null!==(s=((...e)=>{if(0===e.length)return;let t;const r=e.map((e=>vA(e)));for(;r.every((e=>e.length>0));){const e=r.map((e=>e.pop())),s=e[0];if(!e.every((e=>e===s)))break;t=s}return t})(...e))&&void 0!==s?s:Object.prototype,i=Object.create(n),o=vA(n);for(let t of e){let e=vA(t);for(let t=e.length-1;t>=0;t--){let s=e[t];-1===o.indexOf(s)&&(yA(i,s,["constructor",...r]),o.push(s))}}return i.constructor=t,i},xA=e=>e.filter(((t,r)=>e.indexOf(t)==r)),wA=new WeakMap,$A=e=>wA.get(e),SA=(e,t)=>{var r,s;const n=xA([...Object.getOwnPropertyNames(e),...Object.getOwnPropertyNames(t)]),i={};for(let o of n)i[o]=xA([...null!==(r=null==e?void 0:e[o])&&void 0!==r?r:[],...null!==(s=null==t?void 0:t[o])&&void 0!==s?s:[]]);return i},EA=(e,t)=>{var r,s,n,i;return{property:SA(null!==(r=null==e?void 0:e.property)&&void 0!==r?r:{},null!==(s=null==t?void 0:t.property)&&void 0!==s?s:{}),method:SA(null!==(n=null==e?void 0:e.method)&&void 0!==n?n:{},null!==(i=null==t?void 0:t.method)&&void 0!==i?i:{})}},kA=new Map;function AA(...e){var t,r,s;const n=e.map((e=>e.prototype));function i(...t){for(const r of e)yA(this,new r(...t))}i.prototype=bA(n,i),Object.setPrototypeOf(i,bA(e,null,["prototype"]));let o=i;{const n=((...e)=>{const t=((...e)=>{var t;const r=new Set,s=new Set([...e]);for(;s.size>0;)for(let e of s){const n=[...vA(e.prototype).map((e=>e.constructor)),...null!==(t=$A(e))&&void 0!==t?t:[]].filter((e=>!r.has(e)));for(let e of n)s.add(e);r.add(e),s.delete(e)}return[...r]})(...e).map((e=>kA.get(e))).filter((e=>!!e));return 0==t.length?{}:1==t.length?t[0]:t.reduce(((e,t)=>((e,t)=>{var r,s,n,i,o,a;return{class:xA([...null!==(r=null==e?void 0:e.class)&&void 0!==r?r:[],...null!==(s=null==t?void 0:t.class)&&void 0!==s?s:[]]),static:EA(null!==(n=null==e?void 0:e.static)&&void 0!==n?n:{},null!==(i=null==t?void 0:t.static)&&void 0!==i?i:{}),instance:EA(null!==(o=null==e?void 0:e.instance)&&void 0!==o?o:{},null!==(a=null==t?void 0:t.instance)&&void 0!==a?a:{})}})(e,t)))})(...e);for(let e of null!==(t=null==n?void 0:n.class)&&void 0!==t?t:[]){const t=e(o);t&&(o=t)}OA(null!==(r=null==n?void 0:n.static)&&void 0!==r?r:{},o),OA(null!==(s=null==n?void 0:n.instance)&&void 0!==s?s:{},o.prototype)}var a,l;return a=o,l=e,wA.set(a,l),o}const OA=(e,t)=>{const r=e.property,s=e.method;if(r)for(let e in r)for(let s of r[e])s(t,e);if(s)for(let e in s)for(let r of s[e])r(t,e,Object.getOwnPropertyDescriptor(t,e))};let jA=class extends fA{specObj;passingOptionsNames=["specObj"];constructor({specObj:e,...t}){super({...t}),this.specObj=e}retrievePassingOptions(){return sg(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=eg(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return rg(kg,["visitors",...e],this.specObj)?eg(["visitors",...e],this.specObj):eg(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const s=this.retrieveVisitorInstance(e,r);return s instanceof gA&&(null==s?void 0:s.constructor)===gA?vS(t):(OS(t,s,r),s.element)}},TA=class extends jA{specPath;ignoredFields;constructor({specPath:e,ignoredFields:t,...r}){super({...r}),this.specPath=e,this.ignoredFields=t||[]}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,s,n)=>{if(N$(s)&&r.includes(US(s))&&!this.ignoredFields.includes(US(s))){const r=this.toRefractedElement([...t,"fixedFields",US(s)],e),i=new A$(vS(s),r);this.copyMetaAndAttributes(n,i),i.classes.push("fixed-field"),this.element.content.push(i)}else this.ignoredFields.includes(US(s))||this.element.content.push(vS(n))})),this.copyMetaAndAttributes(e,this.element),cS}};class PA extends(AA(TA,gA)){constructor(e){super(e),this.element=new lA,this.specPath=zm(["document","objects","JSONSchema"])}}let CA=class{parent;constructor({parent:e}){this.parent=e}};const IA=e=>V$(e)&&e.hasKey("$ref");let _A=class extends(AA(jA,CA,gA)){ObjectElement(e){const t=IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(t,e),cS}ArrayElement(e){return this.element=new E$,this.element.classes.push("json-schema-items"),e.forEach((e=>{const t=IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}},RA=class extends jA{specPath;ignoredFields;fieldPatternPredicate=Mh;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,...s}){super({...s}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(!this.ignoredFields.includes(US(t))&&this.fieldPatternPredicate(US(t))){const s=this.specPath(e),n=this.toRefractedElement(s,e),i=new A$(vS(t),n);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(US(t))||this.element.content.push(vS(r))})),this.copyMetaAndAttributes(e,this.element),cS}},FA=class extends RA{constructor(e){super(e),this.fieldPatternPredicate=Rg}},MA=class extends(AA(FA,CA,gA)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-properties"),this.specPath=e=>IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},LA=class extends(AA(FA,CA,gA)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-patternProperties"),this.specPath=e=>IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class DA extends(AA(FA,CA,gA)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-dependencies"),this.specPath=e=>IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let BA=class extends(AA(jA,CA,gA)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-allOf")}ArrayElement(e){return e.forEach((e=>{const t=IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}},qA=class extends(AA(jA,CA,gA)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-anyOf")}ArrayElement(e){return e.forEach((e=>{const t=IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}},NA=class extends(AA(jA,CA,gA)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-oneOf")}ArrayElement(e){return e.forEach((e=>{const t=IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}};class UA extends(AA(FA,CA,gA)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-definitions"),this.specPath=e=>IA(e)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let zA=class extends(AA(jA,CA,gA)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-links")}ArrayElement(e){return e.forEach((e=>{const t=this.toRefractedElement(["document","objects","LinkDescription"],e);this.element.push(t)})),this.copyMetaAndAttributes(e,this.element),cS}};class HA extends(AA(TA,gA)){constructor(e){super(e),this.element=new cA,this.specPath=zm(["document","objects","JSONReference"])}ObjectElement(e){const t=TA.prototype.ObjectElement.call(this,e);return N$(this.element.$ref)&&this.element.classes.push("reference-element"),t}}let VA=class extends jA{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>Lf(e,zm(t),yg))),r=Zg(t)(e);return this.element=this.toRefractedElement(r,e),cS}},WA=class extends VA{constructor(e){super(e),this.alternator=[{predicate:IA,specPath:["document","objects","JSONReference"]},{predicate:Lh,specPath:["document","objects","JSONSchema"]}]}};class GA extends(AA(TA,gA)){constructor(e){super(e),this.element=new pA,this.specPath=zm(["document","objects","Media"])}}class JA extends(AA(TA,gA)){constructor(e){super(e),this.element=new uA,this.specPath=zm(["document","objects","LinkDescription"])}}const KA={visitors:{value:gA,JSONSchemaOrJSONReferenceVisitor:WA,document:{objects:{JSONSchema:{$visitor:PA,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:WA,items:_A,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:class extends gA{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-required"),t}},properties:MA,additionalProperties:WA,patternProperties:LA,dependencies:DA,enum:class extends gA{ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-enum"),t}},type:class extends gA{StringElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=this.enter(e);return this.element.classes.push("json-schema-type"),t}},allOf:BA,anyOf:qA,oneOf:NA,not:WA,definitions:UA,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:zA,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:HA,fixedFields:{$ref:class extends gA{StringElement(e){const t=this.enter(e);return this.element.classes.push("reference-value"),t}}}},Media:{$visitor:GA,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:JA,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:WA,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:WA}}}}}},YA=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof lA||e(s)&&t("JSONSchemaDraft4",s)&&r("object",s))),XA=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof cA||e(s)&&t("JSONReference",s)&&r("object",s))),ZA=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof pA||e(s)&&t("media",s)&&r("object",s))),QA=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof uA||e(s)&&t("linkDescription",s)&&r("object",s))),eO=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:XA,isJSONSchemaElement:YA,isLinkDescriptionElement:QA,isMediaElement:ZA},Symbol.toStringTag,{value:"Module"})),tO=()=>{const e=oS(dA);return{predicates:{...eO,isStringElement:N$},namespace:e}},rO=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","JSONSchema","$visitor"],plugins:r=[],specificationObj:s=KA}={})=>{const n=T$(e),i=VS(s),o=new(eg(t,i))({specObj:i});return OS(n,o),TS(o.element,r,{toolboxCreator:tO,visitorOptions:{keyMap:mA,nodeTypeGetter:hA}})})(t,{specPath:e,...r});lA.refract=rO(["visitors","document","objects","JSONSchema","$visitor"]),cA.refract=rO(["visitors","document","objects","JSONReference","$visitor"]),pA.refract=rO(["visitors","document","objects","Media","$visitor"]),uA.refract=rO(["visitors","document","objects","LinkDescription","$visitor"]);let sO=class extends lA{constructor(e,t,r){super(e,t,r),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new Rh("idProp getter in Schema class is not not supported.")}set idProp(e){throw new Rh("idProp setter in Schema class is not not supported.")}get $schema(){throw new Rh("$schema getter in Schema class is not not supported.")}set $schema(e){throw new Rh("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(e){this.set("additionalItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get patternProperties(){throw new Rh("patternProperties getter in Schema class is not not supported.")}set patternProperties(e){throw new Rh("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Rh("dependencies getter in Schema class is not not supported.")}set dependencies(e){throw new Rh("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(e){this.set("type",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get definitions(){throw new Rh("definitions getter in Schema class is not not supported.")}set definitions(e){throw new Rh("definitions setter in Schema class is not not supported.")}get base(){throw new Rh("base getter in Schema class is not not supported.")}set base(e){throw new Rh("base setter in Schema class is not not supported.")}get links(){throw new Rh("links getter in Schema class is not not supported.")}set links(e){throw new Rh("links setter in Schema class is not not supported.")}get media(){throw new Rh("media getter in Schema class is not not supported.")}set media(e){throw new Rh("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(e){this.set("nullable",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}},nO=class extends k${constructor(e,t,r){super(e,t,r),this.element="securityRequirement"}},iO=class extends k${constructor(e,t,r){super(e,t,r),this.element="securityScheme"}get type(){return this.get("type")}set type(e){this.set("type",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get name(){return this.get("name")}set name(e){this.set("name",e)}get in(){return this.get("in")}set in(e){this.set("in",e)}get scheme(){return this.get("scheme")}set scheme(e){this.set("scheme",e)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(e){this.set("bearerFormat",e)}get flows(){return this.get("flows")}set flows(e){this.set("flows",e)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(e){this.set("openIdConnectUrl",e)}},oO=class extends k${constructor(e,t,r){super(e,t,r),this.element="server"}get url(){return this.get("url")}set url(e){this.set("url",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get variables(){return this.get("variables")}set variables(e){this.set("variables",e)}},aO=class extends k${constructor(e,t,r){super(e,t,r),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}},lO=class extends k${constructor(e,t,r){super(e,t,r),this.element="tag"}get name(){return this.get("name")}set name(e){this.set("name",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}},cO=class extends k${constructor(e,t,r){super(e,t,r),this.element="xml"}get name(){return this.get("name")}set name(e){this.set("name",e)}get namespace(){return this.get("namespace")}set namespace(e){this.set("namespace",e)}get prefix(){return this.get("prefix")}set prefix(e){this.set("prefix",e)}get attribute(){return this.get("attribute")}set attribute(e){this.set("attribute",e)}get wrapped(){return this.get("wrapped")}set wrapped(e){this.set("wrapped",e)}};const pO={namespace:e=>{const{base:t}=e;return t.register("callback",Dk),t.register("components",Bk),t.register("contact",qk),t.register("discriminator",Nk),t.register("encoding",Uk),t.register("example",zk),t.register("externalDocumentation",Hk),t.register("header",Vk),t.register("info",Wk),t.register("license",Gk),t.register("link",Jk),t.register("mediaType",Kk),t.register("oAuthFlow",Yk),t.register("oAuthFlows",Xk),t.register("openapi",Zk),t.register("openApi3_0",Qk),t.register("operation",eA),t.register("parameter",tA),t.register("pathItem",rA),t.register("paths",sA),t.register("reference",nA),t.register("requestBody",iA),t.register("response",oA),t.register("responses",aA),t.register("schema",sO),t.register("securityRequirement",nO),t.register("securityScheme",iO),t.register("server",oO),t.register("serverVariable",aO),t.register("tag",lO),t.register("xml",cO),t}};class uO extends E${static primaryClass="servers";constructor(e,t,r){super(e,t,r),this.classes.push(uO.primaryClass)}}class dO extends E${static primaryClass="security";constructor(e,t,r){super(e,t,r),this.classes.push(dO.primaryClass)}}class hO extends E${static primaryClass="tags";constructor(e,t,r){super(e,t,r),this.classes.push(hO.primaryClass)}}class mO extends k${static primaryClass="server-variables";constructor(e,t,r){super(e,t,r),this.classes.push(mO.primaryClass)}}class fO extends k${static primaryClass="components-schemas";constructor(e,t,r){super(e,t,r),this.classes.push(fO.primaryClass)}}class gO extends k${static primaryClass="components-responses";constructor(e,t,r){super(e,t,r),this.classes.push(gO.primaryClass)}}class yO extends k${static primaryClass="components-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(yO.primaryClass),this.classes.push("parameters")}}class vO extends k${static primaryClass="components-examples";constructor(e,t,r){super(e,t,r),this.classes.push(vO.primaryClass),this.classes.push("examples")}}class bO extends k${static primaryClass="components-request-bodies";constructor(e,t,r){super(e,t,r),this.classes.push(bO.primaryClass)}}class xO extends k${static primaryClass="components-headers";constructor(e,t,r){super(e,t,r),this.classes.push(xO.primaryClass)}}class wO extends k${static primaryClass="components-security-schemes";constructor(e,t,r){super(e,t,r),this.classes.push(wO.primaryClass)}}class $O extends k${static primaryClass="components-links";constructor(e,t,r){super(e,t,r),this.classes.push($O.primaryClass)}}class SO extends k${static primaryClass="components-callbacks";constructor(e,t,r){super(e,t,r),this.classes.push(SO.primaryClass)}}class EO extends E${static primaryClass="path-item-servers";constructor(e,t,r){super(e,t,r),this.classes.push(EO.primaryClass),this.classes.push("servers")}}class kO extends E${static primaryClass="path-item-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(kO.primaryClass),this.classes.push("parameters")}}class AO extends E${static primaryClass="operation-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(AO.primaryClass),this.classes.push("parameters")}}class OO extends k${static primaryClass="parameter-examples";constructor(e,t,r){super(e,t,r),this.classes.push(OO.primaryClass),this.classes.push("examples")}}class jO extends k${static primaryClass="parameter-content";constructor(e,t,r){super(e,t,r),this.classes.push(jO.primaryClass),this.classes.push("content")}}class TO extends E${static primaryClass="operation-tags";constructor(e,t,r){super(e,t,r),this.classes.push(TO.primaryClass)}}class PO extends k${static primaryClass="operation-callbacks";constructor(e,t,r){super(e,t,r),this.classes.push(PO.primaryClass)}}class CO extends E${static primaryClass="operation-security";constructor(e,t,r){super(e,t,r),this.classes.push(CO.primaryClass),this.classes.push("security")}}class IO extends E${static primaryClass="operation-servers";constructor(e,t,r){super(e,t,r),this.classes.push(IO.primaryClass),this.classes.push("servers")}}class _O extends k${static primaryClass="request-body-content";constructor(e,t,r){super(e,t,r),this.classes.push(_O.primaryClass),this.classes.push("content")}}class RO extends k${static primaryClass="media-type-examples";constructor(e,t,r){super(e,t,r),this.classes.push(RO.primaryClass),this.classes.push("examples")}}class FO extends k${static primaryClass="media-type-encoding";constructor(e,t,r){super(e,t,r),this.classes.push(FO.primaryClass)}}class MO extends k${static primaryClass="encoding-headers";constructor(e,t,r){super(e,t,r),this.classes.push(MO.primaryClass)}}class LO extends k${static primaryClass="response-headers";constructor(e,t,r){super(e,t,r),this.classes.push(LO.primaryClass)}}class DO extends k${static primaryClass="response-content";constructor(e,t,r){super(e,t,r),this.classes.push(DO.primaryClass),this.classes.push("content")}}class BO extends k${static primaryClass="response-links";constructor(e,t,r){super(e,t,r),this.classes.push(BO.primaryClass)}}class qO extends k${static primaryClass="discriminator-mapping";constructor(e,t,r){super(e,t,r),this.classes.push(qO.primaryClass)}}class NO extends k${static primaryClass="oauth-flow-scopes";constructor(e,t,r){super(e,t,r),this.classes.push(NO.primaryClass)}}class UO extends k${static primaryClass="link-parameters";constructor(e,t,r){super(e,t,r),this.classes.push(UO.primaryClass)}}class zO extends k${static primaryClass="header-examples";constructor(e,t,r){super(e,t,r),this.classes.push(zO.primaryClass),this.classes.push("examples")}}class HO extends k${static primaryClass="header-content";constructor(e,t,r){super(e,t,r),this.classes.push(HO.primaryClass),this.classes.push("content")}}const VO=e=>{if(q$(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},WO={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...kS};class GO{element;constructor(e={}){Object.assign(this,e)}copyMetaAndAttributes(e,t){(e.meta.length>0||t.meta.length>0)&&(t.meta=YS(t.meta,e.meta),tS(e)&&t.meta.set("sourceMap",e.meta.get("sourceMap"))),(e.attributes.length>0||e.meta.length>0)&&(t.attributes=YS(t.attributes,e.attributes))}}class JO extends GO{enter(e){return this.element=vS(e),cS}}class KO extends GO{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:e,passingOptionsNames:t,openApiGenericElement:r,openApiSemanticElement:s,...n}){super({...n}),this.specObj=e,this.openApiGenericElement=r,this.openApiSemanticElement=s,Array.isArray(t)&&(this.passingOptionsNames=t)}retrievePassingOptions(){return sg(this.passingOptionsNames,this)}retrieveFixedFields(e){const t=eg(["visitors",...e,"fixedFields"],this.specObj);return"object"==typeof t&&null!==t?Object.keys(t):[]}retrieveVisitor(e){return rg(kg,["visitors",...e],this.specObj)?eg(["visitors",...e],this.specObj):eg(["visitors",...e,"$visitor"],this.specObj)}retrieveVisitorInstance(e,t={}){const r=this.retrievePassingOptions();return new(this.retrieveVisitor(e))({...r,...t})}toRefractedElement(e,t,r={}){const s=this.retrieveVisitorInstance(e,r);return s instanceof JO&&(null==s?void 0:s.constructor)===JO?vS(t):(OS(t,s,r),s.element)}}const YO=e=>V$(e)&&e.hasKey("$ref"),XO=V$,ZO=V$,QO=e=>N$(e.key)&&dg("x-",US(e.key));class ej extends KO{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=QO;constructor({specPath:e,ignoredFields:t,canSupportSpecificationExtensions:r,specificationExtensionPredicate:s,...n}){super({...n}),this.specPath=e,this.ignoredFields=t||[],"boolean"==typeof r&&(this.canSupportSpecificationExtensions=r),"function"==typeof s&&(this.specificationExtensionPredicate=s)}ObjectElement(e){const t=this.specPath(e),r=this.retrieveFixedFields(t);return e.forEach(((e,s,n)=>{if(N$(s)&&r.includes(US(s))&&!this.ignoredFields.includes(US(s))){const r=this.toRefractedElement([...t,"fixedFields",US(s)],e),i=new A$(vS(s),r);this.copyMetaAndAttributes(n,i),i.classes.push("fixed-field"),this.element.content.push(i)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(n)){const e=this.toRefractedElement(["document","extension"],n);this.element.content.push(e)}else this.ignoredFields.includes(US(s))||this.element.content.push(vS(n))})),this.copyMetaAndAttributes(e,this.element),cS}}class tj extends(AA(ej,JO)){constructor(e){super(e),this.element=new Qk,this.specPath=zm(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){return ej.prototype.ObjectElement.call(this,e)}}class rj extends(AA(KO,JO)){StringElement(e){const t=new Zk(US(e));return this.copyMetaAndAttributes(e,t),this.element=t,cS}}let sj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Wk,this.specPath=zm(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}},nj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new qk,this.specPath=zm(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},ij=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Gk,this.specPath=zm(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},oj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Jk,this.specPath=zm(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return(N$(this.element.operationId)||N$(this.element.operationRef))&&this.element.classes.push("reference-element"),t}};class aj extends KO{specPath;ignoredFields;fieldPatternPredicate=Mh;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=QO;constructor({specPath:e,ignoredFields:t,fieldPatternPredicate:r,canSupportSpecificationExtensions:s,specificationExtensionPredicate:n,...i}){super({...i}),this.specPath=e,this.ignoredFields=t||[],"function"==typeof r&&(this.fieldPatternPredicate=r),"boolean"==typeof s&&(this.canSupportSpecificationExtensions=s),"function"==typeof n&&(this.specificationExtensionPredicate=n)}ObjectElement(e){return e.forEach(((e,t,r)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(r)){const e=this.toRefractedElement(["document","extension"],r);this.element.content.push(e)}else if(!this.ignoredFields.includes(US(t))&&this.fieldPatternPredicate(US(t))){const s=this.specPath(e),n=this.toRefractedElement(s,e),i=new A$(vS(t),n);this.copyMetaAndAttributes(r,i),i.classes.push("patterned-field"),this.element.content.push(i)}else this.ignoredFields.includes(US(t))||this.element.content.push(vS(r))})),this.copyMetaAndAttributes(e,this.element),cS}}class lj extends aj{constructor(e){super(e),this.fieldPatternPredicate=Rg}}let cj=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new UO,this.specPath=zm(["value"])}},pj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new oO,this.specPath=zm(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}},uj=class extends(AA(KO,JO)){constructor(e){super(e),this.element=new uO}ArrayElement(e){return e.forEach((e=>{const t=XO(e)?["document","objects","Server"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}},dj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new aO,this.specPath=zm(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class hj extends(AA(lj,JO)){constructor(e){super(e),this.element=new mO,this.specPath=zm(["document","objects","ServerVariable"])}}let mj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Kk,this.specPath=zm(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class fj extends KO{alternator;constructor({alternator:e,...t}){super({...t}),this.alternator=e||[]}enter(e){const t=this.alternator.map((({predicate:e,specPath:t})=>Lf(e,zm(t),yg))),r=Zg(t)(e);return this.element=this.toRefractedElement(r,e),cS}}const gj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Dk||e(s)&&t("callback",s)&&r("object",s))),yj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Bk||e(s)&&t("components",s)&&r("object",s))),vj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof qk||e(s)&&t("contact",s)&&r("object",s))),bj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof zk||e(s)&&t("example",s)&&r("object",s))),xj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Hk||e(s)&&t("externalDocumentation",s)&&r("object",s))),wj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Vk||e(s)&&t("header",s)&&r("object",s))),$j=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Wk||e(s)&&t("info",s)&&r("object",s))),Sj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Gk||e(s)&&t("license",s)&&r("object",s))),Ej=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Jk||e(s)&&t("link",s)&&r("object",s))),kj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Zk||e(s)&&t("openapi",s)&&r("string",s))),Aj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:s})=>n=>n instanceof Qk||e(n)&&t("openApi3_0",n)&&r("object",n)&&s("api",n))),Oj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof eA||e(s)&&t("operation",s)&&r("object",s))),jj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof tA||e(s)&&t("parameter",s)&&r("object",s))),Tj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof rA||e(s)&&t("pathItem",s)&&r("object",s))),Pj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof sA||e(s)&&t("paths",s)&&r("object",s))),Cj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof nA||e(s)&&t("reference",s)&&r("object",s))),Ij=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof iA||e(s)&&t("requestBody",s)&&r("object",s))),_j=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof oA||e(s)&&t("response",s)&&r("object",s))),Rj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof aA||e(s)&&t("responses",s)&&r("object",s))),Fj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof sO||e(s)&&t("schema",s)&&r("object",s))),Mj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof nO||e(s)&&t("securityRequirement",s)&&r("object",s))),Lj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof iO||e(s)&&t("securityScheme",s)&&r("object",s))),Dj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof oO||e(s)&&t("server",s)&&r("object",s))),Bj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof aO||e(s)&&t("serverVariable",s)&&r("object",s))),qj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof Kk||e(s)&&t("mediaType",s)&&r("object",s))),Nj=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:s})=>n=>n instanceof uO||e(n)&&t("array",n)&&r("array",n)&&s("servers",n))),Uj=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:e=>H$(e)&&e.classes.includes("boolean-json-schema"),isCallbackElement:gj,isComponentsElement:yj,isContactElement:vj,isExampleElement:bj,isExternalDocumentationElement:xj,isHeaderElement:wj,isInfoElement:$j,isLicenseElement:Sj,isLinkElement:Ej,isMediaTypeElement:qj,isOpenApi3_0Element:Aj,isOpenapiElement:kj,isOperationElement:Oj,isParameterElement:jj,isPathItemElement:Tj,isPathsElement:Pj,isReferenceElement:Cj,isRequestBodyElement:Ij,isResponseElement:_j,isResponsesElement:Rj,isSchemaElement:Fj,isSecurityRequirementElement:Mj,isSecuritySchemeElement:Lj,isServerElement:Dj,isServerVariableElement:Bj,isServersElement:Nj},Symbol.toStringTag,{value:"Module"}));let zj=class extends(AA(fj,JO)){constructor(e){super(e),this.alternator=[{predicate:YO,specPath:["document","objects","Reference"]},{predicate:Lh,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=fj.prototype.enter.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},Hj=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("examples"),this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","example")})),t}},Vj=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new FO,this.specPath=zm(["document","objects","Encoding"])}},Wj=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new nO,this.specPath=zm(["value"])}},Gj=class extends(AA(KO,JO)){constructor(e){super(e),this.element=new dO}ArrayElement(e){return e.forEach((e=>{if(V$(e)){const t=this.toRefractedElement(["document","objects","SecurityRequirement"],e);this.element.push(t)}else this.element.push(vS(e))})),this.copyMetaAndAttributes(e,this.element),cS}},Jj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Bk,this.specPath=zm(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},Kj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new lO,this.specPath=zm(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},Yj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new nA,this.specPath=zm(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return N$(this.element.$ref)&&this.element.classes.push("reference-element"),t}},Xj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new tA,this.specPath=zm(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return V$(this.element.contentProp)&&this.element.contentProp.filter(qj).forEach(((e,t)=>{e.setMetaProperty("media-type",US(t))})),t}},Zj=class extends(AA(fj,JO)){constructor(e){super(e),this.alternator=[{predicate:YO,specPath:["document","objects","Reference"]},{predicate:Lh,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=fj.prototype.enter.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},Qj=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Vk,this.specPath=zm(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},eT=class extends(AA(fj,JO)){constructor(e){super(e),this.alternator=[{predicate:YO,specPath:["document","objects","Reference"]},{predicate:Lh,specPath:["document","objects","Schema"]}]}ObjectElement(e){const t=fj.prototype.enter.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}},tT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("content"),this.specPath=zm(["document","objects","MediaType"])}},rT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new sO,this.specPath=zm(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const{allOf:sT}=KA.visitors.document.objects.JSONSchema.fixedFields,{anyOf:nT}=KA.visitors.document.objects.JSONSchema.fixedFields,{oneOf:iT}=KA.visitors.document.objects.JSONSchema.fixedFields,{items:oT}=KA.visitors.document.objects.JSONSchema.fixedFields,{properties:aT}=KA.visitors.document.objects.JSONSchema.fixedFields,{type:lT}=KA.visitors.document.objects.JSONSchema.fixedFields,{JSONSchemaOrJSONReferenceVisitor:cT}=KA.visitors;class pT extends cT{ObjectElement(e){const t=cT.prototype.enter.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}}let uT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Nk,this.specPath=zm(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class dT extends(AA(lj,JO)){constructor(e){super(e),this.element=new qO,this.specPath=zm(["value"])}}let hT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new cO,this.specPath=zm(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},mT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new fO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},fT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new gO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","response")})),this.element.filter(_j).forEach(((e,t)=>{e.setMetaProperty("http-status-code",US(t))})),t}},gT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new yO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","parameter")})),t}},yT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new vO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","example")})),t}};class vT extends(AA(lj,JO)){constructor(e){super(e),this.element=new bO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","requestBody")})),t}}let bT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new xO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.filter(wj).forEach(((e,t)=>{e.setMetaProperty("header-name",US(t))})),t}};class xT extends(AA(lj,JO)){constructor(e){super(e),this.element=new wO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","securityScheme")})),t}}let wT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new $O,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","link")})),t}},$T=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new SO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","callback")})),t}},ST=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new zk,this.specPath=zm(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return N$(this.element.externalValue)&&this.element.classes.push("reference-element"),t}},ET=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Hk,this.specPath=zm(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},kT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Uk,this.specPath=zm(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return V$(this.element.headers)&&this.element.headers.filter(wj).forEach(((e,t)=>{e.setMetaProperty("header-name",US(t))})),t}},AT=class extends(AA(lj,JO)){constructor(e){super(e),this.element=new MO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.forEach(((e,t)=>{if(!wj(e))return;const r=US(t);e.setMetaProperty("headerName",r)})),t}},OT=class extends(AA(aj,JO)){constructor(e){super(e),this.element=new sA,this.specPath=zm(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=Lh}ObjectElement(e){const t=aj.prototype.ObjectElement.call(this,e);return this.element.filter(Tj).forEach(((e,t)=>{t.classes.push("openapi-path-template"),t.classes.push("path-template"),e.setMetaProperty("path",vS(t))})),t}},jT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new iA,this.specPath=zm(["document","objects","RequestBody"])}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return V$(this.element.contentProp)&&this.element.contentProp.filter(qj).forEach(((e,t)=>{e.setMetaProperty("media-type",US(t))})),t}},TT=class extends(AA(aj,JO)){constructor(e){super(e),this.element=new Dk,this.specPath=zm(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=e=>/{(?<expression>[^}]{1,2083})}/.test(String(e))}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Tj).forEach(((e,t)=>{e.setMetaProperty("runtime-expression",US(t))})),t}},PT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new oA,this.specPath=zm(["document","objects","Response"])}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return V$(this.element.contentProp)&&this.element.contentProp.filter(qj).forEach(((e,t)=>{e.setMetaProperty("media-type",US(t))})),V$(this.element.headers)&&this.element.headers.filter(wj).forEach(((e,t)=>{e.setMetaProperty("header-name",US(t))})),t}};class CT extends(AA(lj,JO)){constructor(e){super(e),this.element=new LO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","header")})),this.element.forEach(((e,t)=>{if(!wj(e))return;const r=US(t);e.setMetaProperty("header-name",r)})),t}}class IT extends(AA(lj,JO)){constructor(e){super(e),this.element=new BO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","link")})),t}}class _T extends(AA(ej,aj)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:e,specPathPatternedFields:t,...r}){super({...r}),this.specPathFixedFields=e,this.specPathPatternedFields=t}ObjectElement(e){const{specPath:t,ignoredFields:r}=this;try{this.specPath=this.specPathFixedFields;const t=this.retrieveFixedFields(this.specPath(e));this.ignoredFields=[...r,...wf(e.keys(),t)],ej.prototype.ObjectElement.call(this,e),this.specPath=this.specPathPatternedFields,this.ignoredFields=t,aj.prototype.ObjectElement.call(this,e)}catch(e){throw this.specPath=t,e}return cS}}let RT=class extends(AA(_T,JO)){constructor(e){super(e),this.element=new aA,this.specPathFixedFields=zm(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=e=>YO(e)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=e=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${ag(100,600).join("|")})$`).test(String(e))}ObjectElement(e){const t=_T.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","response")})),this.element.filter(_j).forEach(((e,t)=>{const r=vS(t);this.fieldPatternPredicate(US(r))&&e.setMetaProperty("http-status-code",r)})),t}};class FT extends(AA(fj,JO)){constructor(e){super(e),this.alternator=[{predicate:YO,specPath:["document","objects","Reference"]},{predicate:Lh,specPath:["document","objects","Response"]}]}ObjectElement(e){const t=fj.prototype.enter.call(this,e);return Cj(this.element)?this.element.setMetaProperty("referenced-element","response"):_j(this.element)&&this.element.setMetaProperty("http-status-code","default"),t}}let MT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new eA,this.specPath=zm(["document","objects","Operation"])}},LT=class extends(AA(KO,JO)){constructor(e){super(e),this.element=new E$,this.element.classes.push("parameters")}ArrayElement(e){return e.forEach((e=>{const t=YO(e)?["document","objects","Reference"]:["document","objects","Parameter"],r=this.toRefractedElement(t,e);Cj(r)&&r.setMetaProperty("referenced-element","parameter"),this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}};class DT extends(AA(lj,JO)){specPath;constructor(e){super(e),this.element=new PO,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","callback")})),t}}class BT extends(AA(KO,JO)){constructor(e){super(e),this.element=new CO}ArrayElement(e){return e.forEach((e=>{const t=V$(e)?["document","objects","SecurityRequirement"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}}let qT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new rA,this.specPath=zm(["document","objects","PathItem"])}ObjectElement(e){const t=ej.prototype.ObjectElement.call(this,e);return this.element.filter(Oj).forEach(((e,t)=>{const r=vS(t);r.content=US(r).toUpperCase(),e.setMetaProperty("http-method",r)})),N$(this.element.$ref)&&this.element.classes.push("reference-element"),t}},NT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new iO,this.specPath=zm(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},UT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Xk,this.specPath=zm(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},zT=class extends(AA(ej,JO)){constructor(e){super(e),this.element=new Yk,this.specPath=zm(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class HT extends(AA(lj,JO)){constructor(e){super(e),this.element=new NO,this.specPath=zm(["value"])}}class VT extends(AA(KO,JO)){constructor(e){super(e),this.element=new hO}ArrayElement(e){return e.forEach((e=>{const t=ZO(e)?["document","objects","Tag"]:["value"],r=this.toRefractedElement(t,e);this.element.push(r)})),this.copyMetaAndAttributes(e,this.element),cS}}const{fixedFields:WT}=KA.visitors.document.objects.JSONSchema,GT={visitors:{value:JO,document:{objects:{OpenApi:{$visitor:tj,fixedFields:{openapi:rj,info:{$ref:"#/visitors/document/objects/Info"},servers:uj,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:Gj,tags:VT,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:sj,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("api-version"),this.element.classes.push("version"),t}}}},Contact:{$visitor:nj,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:ij,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:pj,fixedFields:{url:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("server-url"),t}},description:{$ref:"#/visitors/value"},variables:hj}},ServerVariable:{$visitor:dj,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:Jj,fixedFields:{schemas:mT,responses:fT,parameters:gT,examples:yT,requestBodies:vT,headers:bT,securitySchemes:xT,links:wT,callbacks:$T}},Paths:{$visitor:OT},PathItem:{$visitor:qT,fixedFields:{$ref:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:class extends uj{constructor(e){super(e),this.element=new EO}},parameters:class extends LT{constructor(e){super(e),this.element=new kO}}}},Operation:{$visitor:MT,fixedFields:{tags:class extends JO{constructor(e){super(e),this.element=new TO}ArrayElement(e){return this.element=this.element.concat(vS(e)),cS}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:class extends LT{constructor(e){super(e),this.element=new AO}},requestBody:class extends fj{constructor(e){super(e),this.alternator=[{predicate:YO,specPath:["document","objects","Reference"]},{predicate:Lh,specPath:["document","objects","RequestBody"]}]}ObjectElement(e){const t=fj.prototype.enter.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),t}},responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:DT,deprecated:{$ref:"#/visitors/value"},security:BT,servers:class extends uj{constructor(e){super(e),this.element=new IO}}}},ExternalDocumentation:{$visitor:ET,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:Xj,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:Zj,example:{$ref:"#/visitors/value"},examples:class extends Hj{constructor(e){super(e),this.element=new OO}},content:class extends tT{constructor(e){super(e),this.element=new jO}}}},RequestBody:{$visitor:jT,fixedFields:{description:{$ref:"#/visitors/value"},content:class extends tT{constructor(e){super(e),this.element=new _O}},required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:mj,fixedFields:{schema:zj,example:{$ref:"#/visitors/value"},examples:class extends Hj{constructor(e){super(e),this.element=new RO}},encoding:Vj}},Encoding:{$visitor:kT,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:AT,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:RT,fixedFields:{default:FT}},Response:{$visitor:PT,fixedFields:{description:{$ref:"#/visitors/value"},headers:CT,content:class extends tT{constructor(e){super(e),this.element=new DO}},links:IT}},Callback:{$visitor:TT},Example:{$visitor:ST,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}}}},Link:{$visitor:oj,fixedFields:{operationRef:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},operationId:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},parameters:cj,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:Qj,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:eT,example:{$ref:"#/visitors/value"},examples:class extends Hj{constructor(e){super(e),this.element=new zO}},content:class extends tT{constructor(e){super(e),this.element=new HO}}}},Tag:{$visitor:Kj,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:Yj,fixedFields:{$ref:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:rT,fixedFields:{title:WT.title,multipleOf:WT.multipleOf,maximum:WT.maximum,exclusiveMaximum:WT.exclusiveMaximum,minimum:WT.minimum,exclusiveMinimum:WT.exclusiveMinimum,maxLength:WT.maxLength,minLength:WT.minLength,pattern:WT.pattern,maxItems:WT.maxItems,minItems:WT.minItems,uniqueItems:WT.uniqueItems,maxProperties:WT.maxProperties,minProperties:WT.minProperties,required:WT.required,enum:WT.enum,type:class extends lT{ArrayElement(e){return this.enter(e)}},allOf:class extends sT{ArrayElement(e){const t=sT.prototype.ArrayElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},anyOf:class extends nT{ArrayElement(e){const t=nT.prototype.ArrayElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},oneOf:class extends iT{ArrayElement(e){const t=iT.prototype.ArrayElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},not:pT,items:class extends oT{ObjectElement(e){const t=oT.prototype.ObjectElement.call(this,e);return Cj(this.element)&&this.element.setMetaProperty("referenced-element","schema"),t}ArrayElement(e){return this.enter(e)}},properties:class extends aT{ObjectElement(e){const t=aT.prototype.ObjectElement.call(this,e);return this.element.filter(Cj).forEach((e=>{e.setMetaProperty("referenced-element","schema")})),t}},additionalProperties:pT,description:WT.description,format:WT.format,default:WT.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:uT,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:dT}},XML:{$visitor:hT,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:NT,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:UT,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:zT,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:HT}},SecurityRequirement:{$visitor:Wj}},extension:{$visitor:class extends KO{MemberElement(e){return this.element=vS(e),this.element.classes.push("specification-extension"),cS}}}}}},JT=()=>{const e=oS(pO);return{predicates:{...Uj,isElement:q$,isStringElement:N$,isArrayElement:W$,isObjectElement:V$,isMemberElement:G$,includesClasses:rS,hasElementSourceMap:tS},namespace:e}},KT=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const s=T$(e),n=VS(GT),i=new(eg(t,n))({specObj:n});return OS(s,i),TS(i.element,r,{toolboxCreator:JT,visitorOptions:{keyMap:WO,nodeTypeGetter:VO}})})(t,{specPath:e,...r});Dk.refract=KT(["visitors","document","objects","Callback","$visitor"]),Bk.refract=KT(["visitors","document","objects","Components","$visitor"]),qk.refract=KT(["visitors","document","objects","Contact","$visitor"]),zk.refract=KT(["visitors","document","objects","Example","$visitor"]),Nk.refract=KT(["visitors","document","objects","Discriminator","$visitor"]),Uk.refract=KT(["visitors","document","objects","Encoding","$visitor"]),Hk.refract=KT(["visitors","document","objects","ExternalDocumentation","$visitor"]),Vk.refract=KT(["visitors","document","objects","Header","$visitor"]),Wk.refract=KT(["visitors","document","objects","Info","$visitor"]),Gk.refract=KT(["visitors","document","objects","License","$visitor"]),Jk.refract=KT(["visitors","document","objects","Link","$visitor"]),Kk.refract=KT(["visitors","document","objects","MediaType","$visitor"]),Yk.refract=KT(["visitors","document","objects","OAuthFlow","$visitor"]),Xk.refract=KT(["visitors","document","objects","OAuthFlows","$visitor"]),Zk.refract=KT(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Qk.refract=KT(["visitors","document","objects","OpenApi","$visitor"]),eA.refract=KT(["visitors","document","objects","Operation","$visitor"]),tA.refract=KT(["visitors","document","objects","Parameter","$visitor"]),rA.refract=KT(["visitors","document","objects","PathItem","$visitor"]),sA.refract=KT(["visitors","document","objects","Paths","$visitor"]),nA.refract=KT(["visitors","document","objects","Reference","$visitor"]),iA.refract=KT(["visitors","document","objects","RequestBody","$visitor"]),oA.refract=KT(["visitors","document","objects","Response","$visitor"]),aA.refract=KT(["visitors","document","objects","Responses","$visitor"]),sO.refract=KT(["visitors","document","objects","Schema","$visitor"]),nO.refract=KT(["visitors","document","objects","SecurityRequirement","$visitor"]),iO.refract=KT(["visitors","document","objects","SecurityScheme","$visitor"]),oO.refract=KT(["visitors","document","objects","Server","$visitor"]),aO.refract=KT(["visitors","document","objects","ServerVariable","$visitor"]),lO.refract=KT(["visitors","document","objects","Tag","$visitor"]),cO.refract=KT(["visitors","document","objects","XML","$visitor"]);class YT extends Dk{}class XT extends Bk{get pathItems(){return this.get("pathItems")}set pathItems(e){this.set("pathItems",e)}}class ZT extends qk{}class QT extends Nk{}class eP extends Uk{}class tP extends zk{}class rP extends Hk{}class sP extends Vk{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class nP extends Wk{get license(){return this.get("license")}set license(e){this.set("license",e)}get summary(){return this.get("summary")}set summary(e){this.set("summary",e)}}class iP extends x${static default=new iP("https://spec.openapis.org/oas/3.1/dialect/base");constructor(e,t,r){super(e,t,r),this.element="jsonSchemaDialect"}}class oP extends Gk{get identifier(){return this.get("identifier")}set identifier(e){this.set("identifier",e)}}class aP extends Jk{}class lP extends Kk{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class cP extends Yk{}class pP extends Xk{}class uP extends Zk{}class dP extends k${constructor(e,t,r){super(e,t,r),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(e){this.set("openapi",e)}get info(){return this.get("info")}set info(e){this.set("info",e)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(e){this.set("jsonSchemaDialect",e)}get servers(){return this.get("servers")}set servers(e){this.set("servers",e)}get paths(){return this.get("paths")}set paths(e){this.set("paths",e)}get components(){return this.get("components")}set components(e){this.set("components",e)}get security(){return this.get("security")}set security(e){this.set("security",e)}get tags(){return this.get("tags")}set tags(e){this.set("tags",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get webhooks(){return this.get("webhooks")}set webhooks(e){this.set("webhooks",e)}}class hP extends eA{get requestBody(){return this.get("requestBody")}set requestBody(e){this.set("requestBody",e)}}class mP extends tA{get schema(){return this.get("schema")}set schema(e){this.set("schema",e)}}class fP extends rA{get GET(){return this.get("get")}set GET(e){this.set("GET",e)}get PUT(){return this.get("put")}set PUT(e){this.set("PUT",e)}get POST(){return this.get("post")}set POST(e){this.set("POST",e)}get DELETE(){return this.get("delete")}set DELETE(e){this.set("DELETE",e)}get OPTIONS(){return this.get("options")}set OPTIONS(e){this.set("OPTIONS",e)}get HEAD(){return this.get("head")}set HEAD(e){this.set("HEAD",e)}get PATCH(){return this.get("patch")}set PATCH(e){this.set("PATCH",e)}get TRACE(){return this.get("trace")}set TRACE(e){this.set("TRACE",e)}}class gP extends sA{}class yP extends nA{}Object.defineProperty(yP.prototype,"description",{get(){return this.get("description")},set(e){this.set("description",e)},enumerable:!0}),Object.defineProperty(yP.prototype,"summary",{get(){return this.get("summary")},set(e){this.set("summary",e)},enumerable:!0});class vP extends iA{}let bP=class extends oA{};class xP extends aA{}class wP extends k${constructor(e,t,r){super(e,t,r),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(e){this.set("$schema",e)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(e){this.set("$vocabulary",e)}get $id(){return this.get("$id")}set $id(e){this.set("$id",e)}get $anchor(){return this.get("$anchor")}set $anchor(e){this.set("$anchor",e)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(e){this.set("$dynamicAnchor",e)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(e){this.set("$dynamicRef",e)}get $ref(){return this.get("$ref")}set $ref(e){this.set("$ref",e)}get $defs(){return this.get("$defs")}set $defs(e){this.set("$defs",e)}get $comment(){return this.get("$comment")}set $comment(e){this.set("$comment",e)}get allOf(){return this.get("allOf")}set allOf(e){this.set("allOf",e)}get anyOf(){return this.get("anyOf")}set anyOf(e){this.set("anyOf",e)}get oneOf(){return this.get("oneOf")}set oneOf(e){this.set("oneOf",e)}get not(){return this.get("not")}set not(e){this.set("not",e)}get if(){return this.get("if")}set if(e){this.set("if",e)}get then(){return this.get("then")}set then(e){this.set("then",e)}get else(){return this.get("else")}set else(e){this.set("else",e)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(e){this.set("dependentSchemas",e)}get prefixItems(){return this.get("prefixItems")}set prefixItems(e){this.set("prefixItems",e)}get items(){return this.get("items")}set items(e){this.set("items",e)}get containsProp(){return this.get("contains")}set containsProp(e){this.set("contains",e)}get properties(){return this.get("properties")}set properties(e){this.set("properties",e)}get patternProperties(){return this.get("patternProperties")}set patternProperties(e){this.set("patternProperties",e)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(e){this.set("additionalProperties",e)}get propertyNames(){return this.get("propertyNames")}set propertyNames(e){this.set("propertyNames",e)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(e){this.set("unevaluatedItems",e)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(e){this.set("unevaluatedProperties",e)}get type(){return this.get("type")}set type(e){this.set("type",e)}get enum(){return this.get("enum")}set enum(e){this.set("enum",e)}get const(){return this.get("const")}set const(e){this.set("const",e)}get multipleOf(){return this.get("multipleOf")}set multipleOf(e){this.set("multipleOf",e)}get maximum(){return this.get("maximum")}set maximum(e){this.set("maximum",e)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(e){this.set("exclusiveMaximum",e)}get minimum(){return this.get("minimum")}set minimum(e){this.set("minimum",e)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(e){this.set("exclusiveMinimum",e)}get maxLength(){return this.get("maxLength")}set maxLength(e){this.set("maxLength",e)}get minLength(){return this.get("minLength")}set minLength(e){this.set("minLength",e)}get pattern(){return this.get("pattern")}set pattern(e){this.set("pattern",e)}get maxItems(){return this.get("maxItems")}set maxItems(e){this.set("maxItems",e)}get minItems(){return this.get("minItems")}set minItems(e){this.set("minItems",e)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(e){this.set("uniqueItems",e)}get maxContains(){return this.get("maxContains")}set maxContains(e){this.set("maxContains",e)}get minContains(){return this.get("minContains")}set minContains(e){this.set("minContains",e)}get maxProperties(){return this.get("maxProperties")}set maxProperties(e){this.set("maxProperties",e)}get minProperties(){return this.get("minProperties")}set minProperties(e){this.set("minProperties",e)}get required(){return this.get("required")}set required(e){this.set("required",e)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(e){this.set("dependentRequired",e)}get title(){return this.get("title")}set title(e){this.set("title",e)}get description(){return this.get("description")}set description(e){this.set("description",e)}get default(){return this.get("default")}set default(e){this.set("default",e)}get deprecated(){return this.get("deprecated")}set deprecated(e){this.set("deprecated",e)}get readOnly(){return this.get("readOnly")}set readOnly(e){this.set("readOnly",e)}get writeOnly(){return this.get("writeOnly")}set writeOnly(e){this.set("writeOnly",e)}get examples(){return this.get("examples")}set examples(e){this.set("examples",e)}get format(){return this.get("format")}set format(e){this.set("format",e)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(e){this.set("contentEncoding",e)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(e){this.set("contentMediaType",e)}get contentSchema(){return this.get("contentSchema")}set contentSchema(e){this.set("contentSchema",e)}get discriminator(){return this.get("discriminator")}set discriminator(e){this.set("discriminator",e)}get xml(){return this.get("xml")}set xml(e){this.set("xml",e)}get externalDocs(){return this.get("externalDocs")}set externalDocs(e){this.set("externalDocs",e)}get example(){return this.get("example")}set example(e){this.set("example",e)}}class $P extends nO{}class SP extends iO{}class EP extends oO{}class kP extends aO{}class AP extends lO{}class OP extends cO{}const jP={namespace:e=>{const{base:t}=e;return t.register("callback",YT),t.register("components",XT),t.register("contact",ZT),t.register("discriminator",QT),t.register("encoding",eP),t.register("example",tP),t.register("externalDocumentation",rP),t.register("header",sP),t.register("info",nP),t.register("jsonSchemaDialect",iP),t.register("license",oP),t.register("link",aP),t.register("mediaType",lP),t.register("oAuthFlow",cP),t.register("oAuthFlows",pP),t.register("openapi",uP),t.register("openApi3_1",dP),t.register("operation",hP),t.register("parameter",mP),t.register("pathItem",fP),t.register("paths",gP),t.register("reference",yP),t.register("requestBody",vP),t.register("response",bP),t.register("responses",xP),t.register("schema",wP),t.register("securityRequirement",$P),t.register("securityScheme",SP),t.register("server",EP),t.register("serverVariable",kP),t.register("tag",AP),t.register("xml",OP),t}};class TP extends k${static primaryClass="components-path-items";constructor(e,t,r){super(e,t,r),this.classes.push(TP.primaryClass)}}class PP extends k${static primaryClass="webhooks";constructor(e,t,r){super(e,t,r),this.classes.push(PP.primaryClass)}}const CP=e=>{if(q$(e))return`${e.element.charAt(0).toUpperCase()+e.element.slice(1)}Element`},IP={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...kS};class _P{internalStore;constructor(e,t,r){this.storageElement=e,this.storageField=t,this.storageSubField=r}get store(){if(!this.internalStore){let e=this.storageElement.get(this.storageField);V$(e)||(e=new k$,this.storageElement.set(this.storageField,e));let t=e.get(this.storageSubField);W$(t)||(t=new E$,e.set(this.storageSubField,t)),this.internalStore=t}return this.internalStore}append(e){this.includes(e)||this.store.push(e)}includes(e){return this.store.includes(e)}}const RP=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:s}=t,n=(e,t)=>!!(r.isParameterElement(e)&&r.isParameterElement(t)&&r.isStringElement(e.name)&&r.isStringElement(e.in)&&r.isStringElement(t.name)&&r.isStringElement(t.in)&&US(e.name)===US(t.name)&&US(e.in)===US(t.in)),i=[];let o;return{visitor:{OpenApi3_1Element:{enter(t){o=new _P(t,e,"parameters")},leave(){o=void 0}},PathItemElement:{enter(e,t,s,n,o){if(o.some(r.isComponentsElement))return;const{parameters:a}=e;r.isArrayElement(a)?i.push([...a.content]):i.push([])},leave(){i.pop()}},OperationElement:{leave(e,t,r,a,l){const c=Af(i);if(!Array.isArray(c)||0===c.length)return;const p=s([...l,r,e]);if(o.includes(p))return;const u=tg([],["parameters","content"],e),d=fg(n,[...u,...c]);e.parameters=new AO(d),o.append(p)}}}}},FP=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:s}=t;let n,i;return{visitor:{OpenApi3_1Element:{enter(t){i=new _P(t,e,"security-requirements"),r.isArrayElement(t.security)&&(n=t.security)},leave(){i=void 0,n=void 0}},OperationElement:{leave(e,t,o,a,l){if(l.some(r.isComponentsElement))return;const c=s([...l,o,e]);var p;i.includes(c)||void 0===e.security&&void 0!==n&&(e.security=new CO(null===(p=n)||void 0===p?void 0:p.content),i.append(c))}}}}},MP=e=>e.replace(/\s/g,""),LP=e=>e.replace(/\W/gi,"_"),DP=(e,t,r)=>{const s=MP(e);return s.length>0?LP(s):((e,t)=>`${LP(MP(t.toLowerCase()))}${LP(MP(e))}`)(t,r)},BP=({storageField:e="x-normalized",operationIdNormalizer:t=DP}={})=>r=>{const{predicates:s,ancestorLineageToJSONPointer:n,namespace:i}=r,o=[],a=[],l=[];let c;return{visitor:{OpenApi3_1Element:{enter(t){c=new _P(t,e,"operation-ids")},leave(){const e=_f((e=>US(e.operationId)),a);Object.entries(e).forEach((([e,t])=>{Array.isArray(t)&&(t.length<=1||t.forEach(((t,r)=>{const s=`${e}${r+1}`;t.operationId=new i.elements.String(s)})))})),l.forEach((e=>{if(void 0===e.operationId)return;const t=String(US(e.operationId)),r=a.find((e=>US(e.meta.get("originalOperationId"))===t));void 0!==r&&(e.operationId=vS.safe(r.operationId),e.meta.set("originalOperationId",t),e.set("__originalOperationId",t))})),a.length=0,l.length=0,c=void 0}},PathItemElement:{enter(e){const t=vf("path",US(e.meta.get("path")));o.push(t)},leave(){o.pop()}},OperationElement:{enter(e,r,s,l,p){if(void 0===e.operationId)return;const u=n([...p,s,e]);if(c.includes(u))return;const d=String(US(e.operationId)),h=Af(o),m=vf("method",US(e.meta.get("http-method"))),f=t(d,h,m);d!==f&&(e.operationId=new i.elements.String(f),e.set("__originalOperationId",d),e.meta.set("originalOperationId",d),a.push(e),c.append(u))}},LinkElement:{leave(e){s.isLinkElement(e)&&void 0!==e.operationId&&l.push(e)}}}}},qP=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:s}=t;let n;return{visitor:{OpenApi3_1Element:{enter(t){n=new _P(t,e,"parameter-examples")},leave(){n=void 0}},ParameterElement:{leave(e,t,i,o,a){var l,c;if(a.some(r.isComponentsElement))return;if(void 0===e.schema||!r.isSchemaElement(e.schema))return;if(void 0===(null===(l=e.schema)||void 0===l?void 0:l.example)&&void 0===(null===(c=e.schema)||void 0===c?void 0:c.examples))return;const p=s([...a,i,e]);if(!n.includes(p)){if(void 0!==e.examples&&r.isObjectElement(e.examples)){const t=e.examples.map((e=>vS.safe(e.value)));return void 0!==e.schema.examples&&(e.schema.set("examples",t),n.append(p)),void(void 0!==e.schema.example&&(e.schema.set("example",t[0]),n.append(p)))}void 0!==e.example&&(void 0!==e.schema.examples&&(e.schema.set("examples",[vS(e.example)]),n.append(p)),void 0!==e.schema.example&&(e.schema.set("example",vS(e.example)),n.append(p)))}}}}}},NP=({storageField:e="x-normalized"}={})=>t=>{const{predicates:r,ancestorLineageToJSONPointer:s}=t;let n;return{visitor:{OpenApi3_1Element:{enter(t){n=new _P(t,e,"header-examples")},leave(){n=void 0}},HeaderElement:{leave(e,t,i,o,a){var l,c;if(a.some(r.isComponentsElement))return;if(void 0===e.schema||!r.isSchemaElement(e.schema))return;if(void 0===(null===(l=e.schema)||void 0===l?void 0:l.example)&&void 0===(null===(c=e.schema)||void 0===c?void 0:c.examples))return;const p=s([...a,i,e]);if(!n.includes(p)){if(void 0!==e.examples&&r.isObjectElement(e.examples)){const t=e.examples.map((e=>vS.safe(e.value)));return void 0!==e.schema.examples&&(e.schema.set("examples",t),n.append(p)),void(void 0!==e.schema.example&&(e.schema.set("example",t[0]),n.append(p)))}void 0!==e.example&&(void 0!==e.schema.examples&&(e.schema.set("examples",[vS(e.example)]),n.append(p)),void 0!==e.schema.example&&(e.schema.set("example",vS(e.example)),n.append(p)))}}}}}},UP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof YT||e(s)&&t("callback",s)&&r("object",s))),zP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof XT||e(s)&&t("components",s)&&r("object",s))),HP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof ZT||e(s)&&t("contact",s)&&r("object",s))),VP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof tP||e(s)&&t("example",s)&&r("object",s))),WP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof rP||e(s)&&t("externalDocumentation",s)&&r("object",s))),GP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof sP||e(s)&&t("header",s)&&r("object",s))),JP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof nP||e(s)&&t("info",s)&&r("object",s))),KP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof iP||e(s)&&t("jsonSchemaDialect",s)&&r("string",s))),YP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof oP||e(s)&&t("license",s)&&r("object",s))),XP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof aP||e(s)&&t("link",s)&&r("object",s))),ZP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof uP||e(s)&&t("openapi",s)&&r("string",s))),QP=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r,hasClass:s})=>n=>n instanceof dP||e(n)&&t("openApi3_1",n)&&r("object",n)&&s("api",n))),eC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof hP||e(s)&&t("operation",s)&&r("object",s))),tC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof mP||e(s)&&t("parameter",s)&&r("object",s))),rC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof fP||e(s)&&t("pathItem",s)&&r("object",s))),sC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof gP||e(s)&&t("paths",s)&&r("object",s))),nC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof yP||e(s)&&t("reference",s)&&r("object",s))),iC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof vP||e(s)&&t("requestBody",s)&&r("object",s))),oC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof bP||e(s)&&t("response",s)&&r("object",s))),aC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof xP||e(s)&&t("responses",s)&&r("object",s))),lC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof wP||e(s)&&t("schema",s)&&r("object",s))),cC=e=>H$(e)&&e.classes.includes("boolean-json-schema"),pC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof $P||e(s)&&t("securityRequirement",s)&&r("object",s))),uC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof SP||e(s)&&t("securityScheme",s)&&r("object",s))),dC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof EP||e(s)&&t("server",s)&&r("object",s))),hC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof kP||e(s)&&t("serverVariable",s)&&r("object",s))),mC=B$((({hasBasicElementProps:e,isElementType:t,primitiveEq:r})=>s=>s instanceof lP||e(s)&&t("mediaType",s)&&r("object",s))),fC=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:cC,isCallbackElement:UP,isComponentsElement:zP,isContactElement:HP,isExampleElement:VP,isExternalDocumentationElement:WP,isHeaderElement:GP,isInfoElement:JP,isJsonSchemaDialectElement:KP,isLicenseElement:YP,isLinkElement:XP,isMediaTypeElement:mC,isOpenApi3_1Element:QP,isOpenapiElement:ZP,isOperationElement:eC,isParameterElement:tC,isPathItemElement:rC,isPathItemElementExternal:e=>{if(!rC(e))return!1;if(!N$(e.$ref))return!1;const t=US(e.$ref);return"string"==typeof t&&t.length>0&&!t.startsWith("#")},isPathsElement:sC,isReferenceElement:nC,isReferenceElementExternal:e=>{if(!nC(e))return!1;if(!N$(e.$ref))return!1;const t=US(e.$ref);return"string"==typeof t&&t.length>0&&!t.startsWith("#")},isRequestBodyElement:iC,isResponseElement:oC,isResponsesElement:aC,isSchemaElement:lC,isSecurityRequirementElement:pC,isSecuritySchemeElement:uC,isServerElement:dC,isServerVariableElement:hC},Symbol.toStringTag,{value:"Module"})),gC=e=>{const t=e.reduce(((t,r,s)=>{if(G$(r)){const e=String(US(r.key));t.push(e)}else if(W$(e[s-2])){const n=String(e[s-2].content.indexOf(r));t.push(n)}return t}),[]);return Rk(t)},yC=()=>{const e=oS(jP);return{predicates:{...fC,isElement:q$,isStringElement:N$,isArrayElement:W$,isObjectElement:V$,isMemberElement:G$,isServersElement:Nj,includesClasses:rS,hasElementSourceMap:tS},ancestorLineageToJSONPointer:gC,namespace:e}};class vC extends(AA(ej,JO)){constructor(e){super(e),this.element=new dP,this.specPath=zm(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(e){return this.openApiGenericElement=e,ej.prototype.ObjectElement.call(this,e)}}const{visitors:{document:{objects:{Info:{$visitor:bC}}}}}=GT,{visitors:{document:{objects:{Contact:{$visitor:xC}}}}}=GT,{visitors:{document:{objects:{License:{$visitor:wC}}}}}=GT,{visitors:{document:{objects:{Link:{$visitor:$C}}}}}=GT;class SC extends(AA(KO,JO)){StringElement(e){const t=new iP(US(e));return this.copyMetaAndAttributes(e,t),this.element=t,cS}}const{visitors:{document:{objects:{Server:{$visitor:EC}}}}}=GT,{visitors:{document:{objects:{ServerVariable:{$visitor:kC}}}}}=GT,{visitors:{document:{objects:{MediaType:{$visitor:AC}}}}}=GT,{visitors:{document:{objects:{SecurityRequirement:{$visitor:OC}}}}}=GT,{visitors:{document:{objects:{Components:{$visitor:jC}}}}}=GT,{visitors:{document:{objects:{Tag:{$visitor:TC}}}}}=GT,{visitors:{document:{objects:{Reference:{$visitor:PC}}}}}=GT,{visitors:{document:{objects:{Parameter:{$visitor:CC}}}}}=GT,{visitors:{document:{objects:{Header:{$visitor:IC}}}}}=GT;class _C{parent;constructor({parent:e}){this.parent=e}}class RC extends(AA(ej,_C,JO)){constructor(e){super(e),this.element=new wP,this.specPath=zm(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=iP.default,this.passingOptionsNames.push("parent")}ObjectElement(e){this.handle$schema(e),this.handle$id(e),this.parent=this.element;const t=ej.prototype.ObjectElement.call(this,e);return N$(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),t}BooleanElement(e){const t=super.enter(e);return this.element.classes.push("boolean-json-schema"),t}getJsonSchemaDialect(){let e;return e=void 0!==this.openApiSemanticElement&&KP(this.openApiSemanticElement.jsonSchemaDialect)?US(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&N$(this.openApiGenericElement.get("jsonSchemaDialect"))?US(this.openApiGenericElement.get("jsonSchemaDialect")):US(this.jsonSchemaDefaultDialect),e}handle$schema(e){if(vg(this.parent)&&!N$(e.get("$schema")))this.element.setMetaProperty("inherited$schema",this.getJsonSchemaDialect());else if(lC(this.parent)&&!N$(e.get("$schema"))){const e=vf(US(this.parent.meta.get("inherited$schema")),US(this.parent.$schema));this.element.setMetaProperty("inherited$schema",e)}}handle$id(e){const t=void 0!==this.parent?vS(this.parent.getMetaProperty("inherited$id",[])):new E$,r=US(e.get("$id"));Rg(r)&&t.push(r),this.element.setMetaProperty("inherited$id",t)}}class FC extends(AA(lj,_C,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-$defs"),this.specPath=zm(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}let MC=class extends(AA(KO,_C,JO)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-allOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(V$(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=vS(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),cS}};class LC extends(AA(KO,_C,JO)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-anyOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(V$(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=vS(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),cS}}class DC extends(AA(KO,_C,JO)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-oneOf"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(V$(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=vS(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),cS}}class BC extends(AA(lj,_C,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=zm(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class qC extends(AA(KO,_C,JO)){constructor(e){super(e),this.element=new E$,this.element.classes.push("json-schema-prefixItems"),this.passingOptionsNames.push("parent")}ArrayElement(e){return e.forEach((e=>{if(V$(e)){const t=this.toRefractedElement(["document","objects","Schema"],e);this.element.push(t)}else{const t=vS(e);this.element.push(t)}})),this.copyMetaAndAttributes(e,this.element),cS}}class NC extends(AA(lj,_C,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-properties"),this.specPath=zm(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class UC extends(AA(lj,_C,JO)){constructor(e){super(e),this.element=new k$,this.element.classes.push("json-schema-patternProperties"),this.specPath=zm(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}const{visitors:{document:{objects:{Discriminator:{$visitor:zC}}}}}=GT,{visitors:{document:{objects:{XML:{$visitor:HC}}}}}=GT;class VC extends(AA(lj,JO)){constructor(e){super(e),this.element=new fO,this.specPath=zm(["document","objects","Schema"])}}class WC extends(AA(lj,JO)){constructor(e){super(e),this.element=new TP,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(nC).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),t}}const{visitors:{document:{objects:{Example:{$visitor:GC}}}}}=GT,{visitors:{document:{objects:{ExternalDocumentation:{$visitor:JC}}}}}=GT,{visitors:{document:{objects:{Encoding:{$visitor:KC}}}}}=GT,{visitors:{document:{objects:{Paths:{$visitor:YC}}}}}=GT,{visitors:{document:{objects:{RequestBody:{$visitor:XC}}}}}=GT,{visitors:{document:{objects:{Callback:{$visitor:ZC}}}}}=GT,{visitors:{document:{objects:{Response:{$visitor:QC}}}}}=GT,{visitors:{document:{objects:{Responses:{$visitor:eI}}}}}=GT,{visitors:{document:{objects:{Operation:{$visitor:tI}}}}}=GT,{visitors:{document:{objects:{PathItem:{$visitor:rI}}}}}=GT,{visitors:{document:{objects:{SecurityScheme:{$visitor:sI}}}}}=GT,{visitors:{document:{objects:{OAuthFlows:{$visitor:nI}}}}}=GT,{visitors:{document:{objects:{OAuthFlow:{$visitor:iI}}}}}=GT;class oI extends(AA(lj,JO)){constructor(e){super(e),this.element=new PP,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=lj.prototype.ObjectElement.call(this,e);return this.element.filter(nC).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),this.element.filter(rC).forEach(((e,t)=>{e.setMetaProperty("webhook-name",US(t))})),t}}const aI={visitors:{value:GT.visitors.value,document:{objects:{OpenApi:{$visitor:vC,fixedFields:{openapi:GT.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:SC,servers:GT.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:oI,components:{$ref:"#/visitors/document/objects/Components"},security:GT.visitors.document.objects.OpenApi.fixedFields.security,tags:GT.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:class extends bC{constructor(e){super(e),this.element=new nP}},fixedFields:{title:GT.visitors.document.objects.Info.fixedFields.title,description:GT.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:GT.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:GT.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:class extends xC{constructor(e){super(e),this.element=new ZT}},fixedFields:{name:GT.visitors.document.objects.Contact.fixedFields.name,url:GT.visitors.document.objects.Contact.fixedFields.url,email:GT.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:class extends wC{constructor(e){super(e),this.element=new oP}},fixedFields:{name:GT.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:GT.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:class extends EC{constructor(e){super(e),this.element=new EP}},fixedFields:{url:GT.visitors.document.objects.Server.fixedFields.url,description:GT.visitors.document.objects.Server.fixedFields.description,variables:GT.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:class extends kC{constructor(e){super(e),this.element=new kP}},fixedFields:{enum:GT.visitors.document.objects.ServerVariable.fixedFields.enum,default:GT.visitors.document.objects.ServerVariable.fixedFields.default,description:GT.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:class extends jC{constructor(e){super(e),this.element=new XT}},fixedFields:{schemas:VC,responses:GT.visitors.document.objects.Components.fixedFields.responses,parameters:GT.visitors.document.objects.Components.fixedFields.parameters,examples:GT.visitors.document.objects.Components.fixedFields.examples,requestBodies:GT.visitors.document.objects.Components.fixedFields.requestBodies,headers:GT.visitors.document.objects.Components.fixedFields.headers,securitySchemes:GT.visitors.document.objects.Components.fixedFields.securitySchemes,links:GT.visitors.document.objects.Components.fixedFields.links,callbacks:GT.visitors.document.objects.Components.fixedFields.callbacks,pathItems:WC}},Paths:{$visitor:class extends YC{constructor(e){super(e),this.element=new gP}}},PathItem:{$visitor:class extends rI{constructor(e){super(e),this.element=new fP}},fixedFields:{$ref:GT.visitors.document.objects.PathItem.fixedFields.$ref,summary:GT.visitors.document.objects.PathItem.fixedFields.summary,description:GT.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:GT.visitors.document.objects.PathItem.fixedFields.servers,parameters:GT.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:class extends tI{constructor(e){super(e),this.element=new hP}},fixedFields:{tags:GT.visitors.document.objects.Operation.fixedFields.tags,summary:GT.visitors.document.objects.Operation.fixedFields.summary,description:GT.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:GT.visitors.document.objects.Operation.fixedFields.operationId,parameters:GT.visitors.document.objects.Operation.fixedFields.parameters,requestBody:GT.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:GT.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:GT.visitors.document.objects.Operation.fixedFields.deprecated,security:GT.visitors.document.objects.Operation.fixedFields.security,servers:GT.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:class extends JC{constructor(e){super(e),this.element=new rP}},fixedFields:{description:GT.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:GT.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:class extends CC{constructor(e){super(e),this.element=new mP}},fixedFields:{name:GT.visitors.document.objects.Parameter.fixedFields.name,in:GT.visitors.document.objects.Parameter.fixedFields.in,description:GT.visitors.document.objects.Parameter.fixedFields.description,required:GT.visitors.document.objects.Parameter.fixedFields.required,deprecated:GT.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:GT.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:GT.visitors.document.objects.Parameter.fixedFields.style,explode:GT.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:GT.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:GT.visitors.document.objects.Parameter.fixedFields.example,examples:GT.visitors.document.objects.Parameter.fixedFields.examples,content:GT.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:class extends XC{constructor(e){super(e),this.element=new vP}},fixedFields:{description:GT.visitors.document.objects.RequestBody.fixedFields.description,content:GT.visitors.document.objects.RequestBody.fixedFields.content,required:GT.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:class extends AC{constructor(e){super(e),this.element=new lP}},fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:GT.visitors.document.objects.MediaType.fixedFields.example,examples:GT.visitors.document.objects.MediaType.fixedFields.examples,encoding:GT.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:class extends KC{constructor(e){super(e),this.element=new eP}},fixedFields:{contentType:GT.visitors.document.objects.Encoding.fixedFields.contentType,headers:GT.visitors.document.objects.Encoding.fixedFields.headers,style:GT.visitors.document.objects.Encoding.fixedFields.style,explode:GT.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:GT.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:class extends eI{constructor(e){super(e),this.element=new xP}},fixedFields:{default:GT.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:class extends QC{constructor(e){super(e),this.element=new bP}},fixedFields:{description:GT.visitors.document.objects.Response.fixedFields.description,headers:GT.visitors.document.objects.Response.fixedFields.headers,content:GT.visitors.document.objects.Response.fixedFields.content,links:GT.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:class extends ZC{constructor(e){super(e),this.element=new YT,this.specPath=e=>YO(e)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(e){const t=ZC.prototype.ObjectElement.call(this,e);return this.element.filter(nC).forEach((e=>{e.setMetaProperty("referenced-element","pathItem")})),t}}},Example:{$visitor:class extends GC{constructor(e){super(e),this.element=new tP}},fixedFields:{summary:GT.visitors.document.objects.Example.fixedFields.summary,description:GT.visitors.document.objects.Example.fixedFields.description,value:GT.visitors.document.objects.Example.fixedFields.value,externalValue:GT.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:class extends $C{constructor(e){super(e),this.element=new aP}},fixedFields:{operationRef:GT.visitors.document.objects.Link.fixedFields.operationRef,operationId:GT.visitors.document.objects.Link.fixedFields.operationId,parameters:GT.visitors.document.objects.Link.fixedFields.parameters,requestBody:GT.visitors.document.objects.Link.fixedFields.requestBody,description:GT.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:class extends IC{constructor(e){super(e),this.element=new sP}},fixedFields:{description:GT.visitors.document.objects.Header.fixedFields.description,required:GT.visitors.document.objects.Header.fixedFields.required,deprecated:GT.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:GT.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:GT.visitors.document.objects.Header.fixedFields.style,explode:GT.visitors.document.objects.Header.fixedFields.explode,allowReserved:GT.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:GT.visitors.document.objects.Header.fixedFields.example,examples:GT.visitors.document.objects.Header.fixedFields.examples,content:GT.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:class extends TC{constructor(e){super(e),this.element=new AP}},fixedFields:{name:GT.visitors.document.objects.Tag.fixedFields.name,description:GT.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:class extends PC{constructor(e){super(e),this.element=new yP}},fixedFields:{$ref:GT.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Schema:{$visitor:RC,fixedFields:{$schema:{$ref:"#/visitors/value"},$vocabulary:class extends JO{ObjectElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-$vocabulary"),t}},$id:{$ref:"#/visitors/value"},$anchor:{$ref:"#/visitors/value"},$dynamicAnchor:{$ref:"#/visitors/value"},$dynamicRef:{$ref:"#/visitors/value"},$ref:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("reference-value"),t}},$defs:FC,$comment:{$ref:"#/visitors/value"},allOf:MC,anyOf:LC,oneOf:DC,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:BC,prefixItems:qC,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:NC,patternProperties:UC,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:class extends JO{StringElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-type"),t}ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-type"),t}},enum:class extends JO{ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-enum"),t}},const:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxContains:{$ref:"#/visitors/value"},minContains:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},dependentRequired:class extends JO{ObjectElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-dependentRequired"),t}},title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},readOnly:{$ref:"#/visitors/value"},writeOnly:{$ref:"#/visitors/value"},examples:class extends JO{ArrayElement(e){const t=super.enter(e);return this.element.classes.push("json-schema-examples"),t}},format:{$ref:"#/visitors/value"},contentEncoding:{$ref:"#/visitors/value"},contentMediaType:{$ref:"#/visitors/value"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:class extends zC{constructor(e){super(e),this.element=new QT,this.canSupportSpecificationExtensions=!0}},fixedFields:{propertyName:GT.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:GT.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:class extends HC{constructor(e){super(e),this.element=new OP}},fixedFields:{name:GT.visitors.document.objects.XML.fixedFields.name,namespace:GT.visitors.document.objects.XML.fixedFields.namespace,prefix:GT.visitors.document.objects.XML.fixedFields.prefix,attribute:GT.visitors.document.objects.XML.fixedFields.attribute,wrapped:GT.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:class extends sI{constructor(e){super(e),this.element=new SP}},fixedFields:{type:GT.visitors.document.objects.SecurityScheme.fixedFields.type,description:GT.visitors.document.objects.SecurityScheme.fixedFields.description,name:GT.visitors.document.objects.SecurityScheme.fixedFields.name,in:GT.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:GT.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:GT.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:GT.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:class extends nI{constructor(e){super(e),this.element=new pP}},fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:class extends iI{constructor(e){super(e),this.element=new cP}},fixedFields:{authorizationUrl:GT.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:GT.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:GT.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:GT.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:class extends OC{constructor(e){super(e),this.element=new $P}}}},extension:{$visitor:GT.visitors.document.extension.$visitor}}}},lI=e=>(t,r={})=>((e,{specPath:t=["visitors","document","objects","OpenApi","$visitor"],plugins:r=[]}={})=>{const s=T$(e),n=VS(aI),i=new(eg(t,n))({specObj:n});return OS(s,i),TS(i.element,r,{toolboxCreator:yC,visitorOptions:{keyMap:IP,nodeTypeGetter:CP}})})(t,{specPath:e,...r});YT.refract=lI(["visitors","document","objects","Callback","$visitor"]),XT.refract=lI(["visitors","document","objects","Components","$visitor"]),ZT.refract=lI(["visitors","document","objects","Contact","$visitor"]),tP.refract=lI(["visitors","document","objects","Example","$visitor"]),QT.refract=lI(["visitors","document","objects","Discriminator","$visitor"]),eP.refract=lI(["visitors","document","objects","Encoding","$visitor"]),rP.refract=lI(["visitors","document","objects","ExternalDocumentation","$visitor"]),sP.refract=lI(["visitors","document","objects","Header","$visitor"]),nP.refract=lI(["visitors","document","objects","Info","$visitor"]),iP.refract=lI(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),oP.refract=lI(["visitors","document","objects","License","$visitor"]),aP.refract=lI(["visitors","document","objects","Link","$visitor"]),lP.refract=lI(["visitors","document","objects","MediaType","$visitor"]),cP.refract=lI(["visitors","document","objects","OAuthFlow","$visitor"]),pP.refract=lI(["visitors","document","objects","OAuthFlows","$visitor"]),uP.refract=lI(["visitors","document","objects","OpenApi","fixedFields","openapi"]),dP.refract=lI(["visitors","document","objects","OpenApi","$visitor"]),hP.refract=lI(["visitors","document","objects","Operation","$visitor"]),mP.refract=lI(["visitors","document","objects","Parameter","$visitor"]),fP.refract=lI(["visitors","document","objects","PathItem","$visitor"]),gP.refract=lI(["visitors","document","objects","Paths","$visitor"]),yP.refract=lI(["visitors","document","objects","Reference","$visitor"]),vP.refract=lI(["visitors","document","objects","RequestBody","$visitor"]),bP.refract=lI(["visitors","document","objects","Response","$visitor"]),xP.refract=lI(["visitors","document","objects","Responses","$visitor"]),wP.refract=lI(["visitors","document","objects","Schema","$visitor"]),$P.refract=lI(["visitors","document","objects","SecurityRequirement","$visitor"]),SP.refract=lI(["visitors","document","objects","SecurityScheme","$visitor"]),EP.refract=lI(["visitors","document","objects","Server","$visitor"]),kP.refract=lI(["visitors","document","objects","ServerVariable","$visitor"]),AP.refract=lI(["visitors","document","objects","Tag","$visitor"]),OP.refract=lI(["visitors","document","objects","XML","$visitor"]);class cI extends QS{constructor(e){super({...null!=e?e:{},name:"binary"})}canParse(e){return 0===this.fileExtensions.length||this.fileExtensions.includes(e.extension)}parse(e){try{const t=unescape(encodeURIComponent(e.toString())),r=btoa(t),s=new I$;if(0!==r.length){const e=new x$(r);e.classes.push("result"),s.push(e)}return s}catch(t){throw new cE(`Error parsing "${e.uri}"`,{cause:t})}}}class pI extends class{name;constructor({name:e}){this.name=e}}{constructor(e){super({...null!=e?e:{},name:"openapi-3-1"})}canResolve(e,t){const r=t.dereference.strategies.find((e=>"openapi-3-1"===e.name));return void 0!==r&&r.canDereference(e,t)}async resolve(e,t){const r=t.dereference.strategies.find((e=>"openapi-3-1"===e.name));if(void 0===r)throw new ZS('"openapi-3-1" dereference strategy is not available.');const s=new Dy,n=Uy(t,{resolve:{internal:!1},dereference:{refSet:s}});return await r.dereference(e,n),s}}const{AbortController:uI,AbortSignal:dI}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=uI),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=dI);class hI extends class extends class{name;constructor({name:e}){this.name=e}}{timeout;redirects;withCredentials;constructor(e){const{name:t="http-resolver",timeout:r=5e3,redirects:s=5,withCredentials:n=!1}=null!=e?e:{};super({name:t}),this.timeout=r,this.redirects=s,this.withCredentials=n}canRead(e){return Oy(e.uri)}}{swaggerHTTPClient=Xs;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:e=Xs,swaggerHTTPClientConfig:t={},...r}={}){super({...r,name:"http-swagger-client"}),this.swaggerHTTPClient=e,this.swaggerHTTPClientConfig=t}getHttpClient(){return this.swaggerHTTPClient}async read(e){const t=this.getHttpClient(),r=new AbortController,{signal:s}=r,n=setTimeout((()=>{r.abort()}),this.timeout),i=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",o=0===this.redirects?"error":"follow",a=this.redirects>0?this.redirects:void 0;try{return(await t({url:e.uri,signal:s,userFetch:async(e,t)=>{let r=await fetch(e,t);try{r.headers.delete("Content-Type")}catch{r=new Response(r.body,{...r,headers:new Headers(r.headers)}),r.headers.delete("Content-Type")}return r},credentials:i,redirect:o,follow:a,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(t){throw new Jy(`Error downloading "${e.uri}"`,{cause:t})}finally{clearTimeout(n)}}}class mI extends QS{constructor(e={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return JSON.parse(e.toString()),!0}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new cE("json-swagger-client parser plugin doesn't support sourceMaps option");const t=new I$,r=e.toString();if(this.allowEmpty&&""===r.trim())return t;try{const e=WS(JSON.parse(r));return e.classes.push("result"),t.push(e),t}catch(t){throw new cE(`Error parsing "${e.uri}"`,{cause:t})}}}class fI extends QS{constructor(e={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{return Js.load(e.toString(),{schema:Ls}),!0}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new cE("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const t=new I$,r=e.toString();try{const e=Js.load(r,{schema:Ls});if(this.allowEmpty&&void 0===e)return t;const s=WS(e);return s.classes.push("result"),t.push(s),t}catch(t){throw new cE(`Error parsing "${e.uri}"`,{cause:t})}}}class gI extends QS{detectionRegExp=/"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))"/;constructor(e={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new Mk(...Lk.filterByFormat("generic"),...Lk.filterByFormat("json")),...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const t=e.toString();return JSON.parse(t),this.detectionRegExp.test(t)}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new cE("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new I$,r=e.toString();if(this.allowEmpty&&""===r.trim())return t;try{const e=JSON.parse(r),s=dP.refract(e,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(t){throw new cE(`Error parsing "${e.uri}"`,{cause:t})}}}class yI extends QS{detectionRegExp=/(?<YAML>^(["']?)openapi\2\s*:\s*(["']?)(?<version_yaml>3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(?<JSON>"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))")/m;constructor(e={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new Mk(...Lk.filterByFormat("generic"),...Lk.filterByFormat("yaml")),...e})}async canParse(e){const t=0===this.fileExtensions.length||this.fileExtensions.includes(e.extension),r=this.mediaTypes.includes(e.mediaType);if(!t)return!1;if(r)return!0;if(!r)try{const t=e.toString();return Js.load(t),this.detectionRegExp.test(t)}catch(e){return!1}return!1}async parse(e){if(this.sourceMap)throw new cE("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const t=new I$,r=e.toString();try{const e=Js.load(r,{schema:Ls});if(this.allowEmpty&&void 0===e)return t;const s=dP.refract(e,this.refractorOpts);return s.classes.push("result"),t.push(s),t}catch(t){throw new cE(`Error parsing "${e.uri}"`,{cause:t})}}}const vI=e=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(e),bI=e=>{const t=Py(e);return ay("#",t)},xI=(e,t)=>{const r=(e=>{if(!vI(e))throw new oE(e);return e})(e),s=MS((e=>lC(e)&&US(e.$anchor)===r),t);if(vg(s))throw new sE(`Evaluation failed on token: "${r}"`);return s},wI=(e,t)=>{if(void 0===t.$ref)return;const r=Py(US(t.$ref)),s=US(t.meta.get("inherited$id"));return`${Nm(((e,t)=>_y(e,Ry(Cy(t)))),e,[...s,US(t.$ref)])}${"#"===r?"":r}`},$I=e=>{if($I.cache.has(e))return $I.cache.get(e);const t=wP.refract(e);return $I.cache.set(e,t),t};$I.cache=new WeakMap;const SI=e=>eS(e)?$I(e):e,EI=(e,t)=>{const{cache:r}=EI,s=Cy(e),n=e=>lC(e)&&void 0!==e.$id;if(!r.has(t)){const e=((e,t)=>{const r=new AS({predicate:e});return OS(t,r),new y$(r.result)})(n,t);r.set(t,Array.from(e))}const i=r.get(t).find((e=>{const t=((e,t)=>{if(void 0===t.$id)return;const r=US(t.meta.get("inherited$id"));return Nm(((e,t)=>_y(e,Ry(Cy(t)))),e,[...r,US(t.$id)])})(s,e);return t===s}));if(vg(i))throw new iE(`Evaluation failed on URI: "${e}"`);let o,a;return vI(bI(e))?(o=xI,a=bI(e)):(o=Fk,a=_k(e)),o(a,i)};EI.cache=new WeakMap;const kI=OS[Symbol.for("nodejs.util.promisify.custom")],AI=new _S,OI=(e,t,r,s)=>{G$(s)?s.value=e:Array.isArray(s)&&(s[r]=e)};class jI{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:e,namespace:t,options:r,indirections:s=[],ancestors:n=new eE,refractCache:i=new Map}){this.indirections=s,this.namespace=t,this.reference=e,this.options=r,this.ancestors=new eE(...n),this.refractCache=i}toBaseURI(e){return _y(this.reference.uri,Ry(Cy(e)))}async toReference(e){if(this.reference.depth>=this.options.resolve.maxDepth)throw new lE(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const t=this.toBaseURI(e),{refSet:r}=this.reference;if(r.has(t))return r.find(ng(t,"uri"));const s=await(async(e,t)=>{const r=new Ly({uri:Ry(Cy(e)),mediaType:t.parse.mediaType}),s=await(async(e,t)=>{const r=t.resolve.resolvers.map((e=>{const r=Object.create(e);return Object.assign(r,t.resolve.resolverOpts)})),s=await Hy("canRead",[e,t],r);if(Nf(s))throw new Ky(e.uri);try{const{result:t}=await Vy("read",[e],s);return t}catch(t){throw new Gy(`Error while reading file "${e.uri}"`,{cause:t})}})(r,t);return(async(e,t)=>{const r=t.parse.parsers.map((e=>{const r=Object.create(e);return Object.assign(r,t.parse.parserOpts)})),s=await Hy("canParse",[e,t],r);if(Nf(s))throw new Ky(e.uri);try{const{plugin:r,result:n}=await Vy("parse",[e,t],s);return!r.allowEmpty&&n.isEmpty?Promise.reject(new Wy(`Error while parsing file "${e.uri}". File is empty.`)):n}catch(t){throw new Wy(`Error while parsing file "${e.uri}"`,{cause:t})}})(new Ly({...r,data:s}),t)})(Fy(t),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),n=new tE({uri:t,value:vS(s),depth:this.reference.depth+1});if(r.add(n),this.options.dereference.immutable){const e=new tE({uri:`immutable://${t}`,value:s,depth:this.reference.depth+1});r.add(e)}return n}toAncestorLineage(e){const t=new Set(e.filter(q$));return[new eE(...this.ancestors,t),t]}async ReferenceElement(e,t,r,s,n,i){if(this.indirections.includes(e))return!1;const[o,a]=this.toAncestorLineage([...n,r]),l=this.toBaseURI(US(e.$ref)),c=Cy(this.reference.uri)===l,p=!c;if(!this.options.resolve.internal&&c)return!1;if(!this.options.resolve.external&&p)return!1;const u=await this.toReference(US(e.$ref)),d=_y(l,US(e.$ref));this.indirections.push(e);const h=_k(d);let m=Fk(h,u.value.result);if(m.id=AI.identify(m),eS(m)){const t=US(e.meta.get("referenced-element")),r=`${t}-${US(AI.identify(m))}`;this.refractCache.has(r)?m=this.refractCache.get(r):YO(m)?(m=yP.refract(m),m.setMetaProperty("referenced-element",t),this.refractCache.set(r,m)):(m=this.namespace.getElementClass(t).refract(m),this.refractCache.set(r,m))}if(e===m)throw new Ih("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(m)){if(u.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var f,g;const t=new O$(m.id,{type:"reference",uri:u.uri,$ref:US(e.$ref)}),s=(null!==(f=null===(g=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===g?void 0:g.circularReplacer)&&void 0!==f?f:this.options.dereference.circularReplacer)(t);return i.replaceWith(s,OI),!r&&s}}const y=Cy(u.refSet.rootRef.uri)!==u.uri,v=["error","replace"].includes(this.options.dereference.circular);if((p||y||nC(m)||v)&&!o.includesCycle(m)){a.add(e);const t=new jI({reference:u,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});m=await kI(m,t,{keyMap:IP,nodeTypeGetter:CP}),a.delete(e)}this.indirections.pop();const b=wS(m);return b.setMetaProperty("id",AI.generateId()),b.setMetaProperty("ref-fields",{$ref:US(e.$ref),description:US(e.description),summary:US(e.summary)}),b.setMetaProperty("ref-origin",u.uri),b.setMetaProperty("ref-referencing-element-id",vS(AI.identify(e))),V$(m)&&V$(b)&&(e.hasKey("description")&&"description"in m&&(b.remove("description"),b.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in m&&(b.remove("summary"),b.set("summary",e.get("summary")))),i.replaceWith(b,OI),!r&&b}async PathItemElement(e,t,r,s,n,i){if(!N$(e.$ref))return;if(this.indirections.includes(e))return!1;const[o,a]=this.toAncestorLineage([...n,r]),l=this.toBaseURI(US(e.$ref)),c=Cy(this.reference.uri)===l,p=!c;if(!this.options.resolve.internal&&c)return;if(!this.options.resolve.external&&p)return;const u=await this.toReference(US(e.$ref)),d=_y(l,US(e.$ref));this.indirections.push(e);const h=_k(d);let m=Fk(h,u.value.result);if(m.id=AI.identify(m),eS(m)){const e=`path-item-${US(AI.identify(m))}`;this.refractCache.has(e)?m=this.refractCache.get(e):(m=fP.refract(m),this.refractCache.set(e,m))}if(e===m)throw new Ih("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(m)){if(u.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var f,g;const t=new O$(m.id,{type:"path-item",uri:u.uri,$ref:US(e.$ref)}),s=(null!==(f=null===(g=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===g?void 0:g.circularReplacer)&&void 0!==f?f:this.options.dereference.circularReplacer)(t);return i.replaceWith(s,OI),!r&&s}}const y=Cy(u.refSet.rootRef.uri)!==u.uri,v=["error","replace"].includes(this.options.dereference.circular);if((p||y||rC(m)&&N$(m.$ref)||v)&&!o.includesCycle(m)){a.add(e);const t=new jI({reference:u,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});m=await kI(m,t,{keyMap:IP,nodeTypeGetter:CP}),a.delete(e)}if(this.indirections.pop(),rC(m)){const t=new fP([...m.content],vS(m.meta),vS(m.attributes));t.setMetaProperty("id",AI.generateId()),e.forEach(((e,r,s)=>{t.remove(US(r)),t.content.push(s)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",u.uri),t.setMetaProperty("ref-referencing-element-id",vS(AI.identify(e))),m=t}return i.replaceWith(m,OI),r?void 0:m}async LinkElement(e,t,r,s,n,i){if(!N$(e.operationRef)&&!N$(e.operationId))return;if(N$(e.operationRef)&&N$(e.operationId))throw new Ih("LinkElement operationRef and operationId fields are mutually exclusive.");let o;if(N$(e.operationRef)){var a;const t=_k(US(e.operationRef)),s=this.toBaseURI(US(e.operationRef)),n=Cy(this.reference.uri)===s,l=!n;if(!this.options.resolve.internal&&n)return;if(!this.options.resolve.external&&l)return;const c=await this.toReference(US(e.operationRef));if(o=Fk(t,c.value.result),eS(o)){const e=`operation-${US(AI.identify(o))}`;this.refractCache.has(e)?o=this.refractCache.get(e):(o=hP.refract(o),this.refractCache.set(e,o))}o=wS(o),o.setMetaProperty("ref-origin",c.uri);const p=wS(e);return null===(a=p.operationRef)||void 0===a||a.meta.set("operation",o),i.replaceWith(p,OI),r?void 0:p}if(N$(e.operationId)){var l;const t=US(e.operationId),s=await this.toReference(Fy(this.reference.uri));if(o=MS((e=>eC(e)&&q$(e.operationId)&&e.operationId.equals(t)),s.value.result),vg(o))throw new Ih(`OperationElement(operationId=${t}) not found.`);const n=wS(e);return null===(l=n.operationId)||void 0===l||l.meta.set("operation",o),i.replaceWith(n,OI),r?void 0:n}}async ExampleElement(e,t,r,s,n,i){if(!N$(e.externalValue))return;if(e.hasKey("value")&&N$(e.externalValue))throw new Ih("ExampleElement value and externalValue fields are mutually exclusive.");const o=this.toBaseURI(US(e.externalValue)),a=Cy(this.reference.uri)===o,l=!a;if(!this.options.resolve.internal&&a)return;if(!this.options.resolve.external&&l)return;const c=await this.toReference(US(e.externalValue)),p=wS(c.value.result);p.setMetaProperty("ref-origin",c.uri);const u=wS(e);return u.value=p,i.replaceWith(u,OI),r?void 0:u}async SchemaElement(e,t,r,s,n,i){if(!N$(e.$ref))return;if(this.indirections.includes(e))return!1;const[o,a]=this.toAncestorLineage([...n,r]);let l=await this.toReference(Fy(this.reference.uri)),{uri:c}=l;const p=wI(c,e),u=Cy(p),d=new Ly({uri:u}),h=Xf((e=>e.canRead(d)),this.options.resolve.resolvers),m=!h;let f,g=Cy(this.reference.uri)===p,y=!g;this.indirections.push(e);try{if(h||m){c=this.toBaseURI(p);const e=p,t=SI(l.value.result);if(f=EI(e,t),f=SI(f),f.id=AI.identify(f),!this.options.resolve.internal&&g)return;if(!this.options.resolve.external&&y)return}else{if(c=this.toBaseURI(p),g=Cy(this.reference.uri)===c,y=!g,!this.options.resolve.internal&&g)return;if(!this.options.resolve.external&&y)return;l=await this.toReference(Fy(p));const e=_k(p),t=SI(l.value.result);f=Fk(e,t),f=SI(f),f.id=AI.identify(f)}}catch(e){if(!(m&&e instanceof iE))throw e;if(vI(bI(p))){if(g=Cy(this.reference.uri)===c,y=!g,!this.options.resolve.internal&&g)return;if(!this.options.resolve.external&&y)return;l=await this.toReference(Fy(p));const e=bI(p),t=SI(l.value.result);f=xI(e,t),f=SI(f),f.id=AI.identify(f)}else{if(c=this.toBaseURI(p),g=Cy(this.reference.uri)===c,y=!g,!this.options.resolve.internal&&g)return;if(!this.options.resolve.external&&y)return;l=await this.toReference(Fy(p));const e=_k(p),t=SI(l.value.result);f=Fk(e,t),f=SI(f),f.id=AI.identify(f)}}if(e===f)throw new Ih("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(o.includes(f)){if(l.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var v,b;const t=new O$(f.id,{type:"json-schema",uri:l.uri,$ref:US(e.$ref)}),s=(null!==(v=null===(b=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===b?void 0:b.circularReplacer)&&void 0!==v?v:this.options.dereference.circularReplacer)(t);return i.replaceWith(s,OI),!r&&s}}const x=Cy(l.refSet.rootRef.uri)!==l.uri,w=["error","replace"].includes(this.options.dereference.circular);if((y||x||lC(f)&&N$(f.$ref)||w)&&!o.includesCycle(f)){a.add(e);const t=new jI({reference:l,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o});f=await kI(f,t,{keyMap:IP,nodeTypeGetter:CP}),a.delete(e)}if(this.indirections.pop(),cC(f)){const t=vS(f);return t.setMetaProperty("id",AI.generateId()),t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",l.uri),t.setMetaProperty("ref-referencing-element-id",vS(AI.identify(e))),i.replaceWith(t,OI),!r&&t}if(lC(f)){const t=new wP([...f.content],vS(f.meta),vS(f.attributes));t.setMetaProperty("id",AI.generateId()),e.forEach(((e,r,s)=>{t.remove(US(r)),t.content.push(s)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",l.uri),t.setMetaProperty("ref-referencing-element-id",vS(AI.identify(e))),f=t}return i.replaceWith(f,OI),r?void 0:f}}const TI=OS[Symbol.for("nodejs.util.promisify.custom")],PI=e=>{const t=(e=>e.slice(2))(e);return t.reduce(((e,r,s)=>{if(G$(r)){const t=String(US(r.key));e.push(t)}else if(W$(t[s-2])){const n=t[s-2].content.indexOf(r);e.push(n)}return e}),[])};class CI{modelPropertyMacro;options;SchemaElement={leave:(e,t,r,s,n)=>{void 0!==e.properties&&V$(e.properties)&&e.properties.forEach((t=>{if(V$(t))try{const e=this.modelPropertyMacro(US(t));t.set("default",e)}catch(t){var s,i;const o=new Error(t,{cause:t});o.fullPath=[...PI([...n,r,e]),"properties"],null===(s=this.options.dereference.dereferenceOpts)||void 0===s||null===(s=s.errors)||void 0===s||null===(i=s.push)||void 0===i||i.call(s,o)}}))}};constructor({modelPropertyMacro:e,options:t}){this.modelPropertyMacro=e,this.options=t}}class II{options;SchemaElement={leave(e,t,r,s,n){if(void 0!==e.allOf){if(!W$(e.allOf)){var i,o;const t=new TypeError("allOf must be an array");return t.fullPath=[...PI([...n,r,e]),"allOf"],void(null===(i=this.options.dereference.dereferenceOpts)||void 0===i||null===(i=i.errors)||void 0===i||null===(o=i.push)||void 0===o||o.call(i,t))}if(e.allOf.isEmpty)e.remove("allOf");else{if(!e.allOf.content.every(lC)){var a,l;const t=new TypeError("Elements in allOf must be objects");return t.fullPath=[...PI([...n,r,e]),"allOf"],void(null===(a=this.options.dereference.dereferenceOpts)||void 0===a||null===(a=a.errors)||void 0===a||null===(l=a.push)||void 0===l||l.call(a,t))}for(;e.hasKey("allOf");){const{allOf:t}=e;e.remove("allOf");const r=YS.all([...t.content,e]);if(e.hasKey("$$ref")||r.remove("$$ref"),e.hasKey("example")){const t=r.getMember("example");t&&(t.value=e.get("example"))}if(e.hasKey("examples")){const t=r.getMember("examples");t&&(t.value=e.get("examples"))}e.content=r.content}}}}};constructor({options:e}){this.options=e}}class _I{parameterMacro;options;#e;OperationElement={enter:e=>{this.#e=e},leave:()=>{this.#e=void 0}};ParameterElement={leave:(e,t,r,s,n)=>{const i=this.#e?US(this.#e):null,o=US(e);try{const t=this.parameterMacro(i,o);e.set("default",t)}catch(e){var a,l;const t=new Error(e,{cause:e});t.fullPath=PI([...n,r]),null===(a=this.options.dereference.dereferenceOpts)||void 0===a||null===(a=a.errors)||void 0===a||null===(l=a.push)||void 0===l||l.call(a,t)}}};constructor({parameterMacro:e,options:t}){this.parameterMacro=e,this.options=t}}const RI=e=>{if(null==e.cause)return e;let{cause:t}=e;for(;null!=t.cause;)t=t.cause;return t};class FI extends _h{}const{wrapError:MI}=JE,LI=OS[Symbol.for("nodejs.util.promisify.custom")],DI=new _S,BI=(e,t,r,s)=>{G$(s)?s.value=e:Array.isArray(s)&&(s[r]=e)};class qI extends jI{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:e=!0,useCircularStructures:t=!1,basePath:r=null,...s}){super(s),this.allowMetaPatches=e,this.useCircularStructures=t,this.basePath=r}async ReferenceElement(e,t,r,s,n,i){try{if(this.indirections.includes(e))return!1;const[t,s]=this.toAncestorLineage([...n,r]),c=this.toBaseURI(US(e.$ref)),p=Cy(this.reference.uri)===c,u=!p;if(!this.options.resolve.internal&&p)return!1;if(!this.options.resolve.external&&u)return!1;const d=await this.toReference(US(e.$ref)),h=_y(c,US(e.$ref));this.indirections.push(e);const m=_k(h);let f=Fk(m,d.value.result);if(f.id=DI.identify(f),eS(f)){const t=US(e.meta.get("referenced-element")),r=`${t}-${US(DI.identify(f))}`;this.refractCache.has(r)?f=this.refractCache.get(r):YO(f)?(f=yP.refract(f),f.setMetaProperty("referenced-element",t),this.refractCache.set(r,f)):(f=this.namespace.getElementClass(t).refract(f),this.refractCache.set(r,f))}if(e===f)throw new Ih("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(f)){if(d.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var o,a;const t=new O$(f.id,{type:"reference",uri:d.uri,$ref:US(e.$ref),baseURI:h,referencingElement:e}),s=(null!==(o=null===(a=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===a?void 0:a.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(t,BI),!r&&s}}const g=Cy(d.refSet.rootRef.uri)!==d.uri,y=["error","replace"].includes(this.options.dereference.circular);if((u||g||nC(f)||y)&&!t.includesCycle(f)){var l;s.add(e);const i=new qI({reference:d,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:t,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(l=this.basePath)&&void 0!==l?l:[...PI([...n,r,e]),"$ref"]});f=await LI(f,i,{keyMap:IP,nodeTypeGetter:CP}),s.delete(e)}this.indirections.pop();const v=wS(f);if(v.setMetaProperty("ref-fields",{$ref:US(e.$ref),description:US(e.description),summary:US(e.summary)}),v.setMetaProperty("ref-origin",d.uri),v.setMetaProperty("ref-referencing-element-id",vS(DI.identify(e))),V$(f)&&(e.hasKey("description")&&"description"in f&&(v.remove("description"),v.set("description",e.get("description"))),e.hasKey("summary")&&"summary"in f&&(v.remove("summary"),v.set("summary",e.get("summary")))),this.allowMetaPatches&&V$(v)&&!v.hasKey("$$ref")){const e=_y(c,h);v.set("$$ref",e)}return i.replaceWith(v,BI),!r&&v}catch(t){var c,p,u;const s=RI(t),i=MI(s,{baseDoc:this.reference.uri,$ref:US(e.$ref),pointer:_k(US(e.$ref)),fullPath:null!==(c=this.basePath)&&void 0!==c?c:[...PI([...n,r,e]),"$ref"]});return void(null===(p=this.options.dereference.dereferenceOpts)||void 0===p||null===(p=p.errors)||void 0===p||null===(u=p.push)||void 0===u||u.call(p,i))}}async PathItemElement(e,t,r,s,n,i){try{if(!N$(e.$ref))return;if(this.indirections.includes(e))return!1;if(rS(["cycle"],e.$ref))return!1;const[t,s]=this.toAncestorLineage([...n,r]),c=this.toBaseURI(US(e.$ref)),p=Cy(this.reference.uri)===c,u=!p;if(!this.options.resolve.internal&&p)return;if(!this.options.resolve.external&&u)return;const d=await this.toReference(US(e.$ref)),h=_y(c,US(e.$ref));this.indirections.push(e);const m=_k(h);let f=Fk(m,d.value.result);if(f.id=DI.identify(f),eS(f)){const e=`path-item-${US(DI.identify(f))}`;this.refractCache.has(e)?f=this.refractCache.get(e):(f=fP.refract(f),this.refractCache.set(e,f))}if(e===f)throw new Ih("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(f)){if(d.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var o,a;const t=new O$(f.id,{type:"path-item",uri:d.uri,$ref:US(e.$ref),baseURI:h,referencingElement:e}),s=(null!==(o=null===(a=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===a?void 0:a.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(t,BI),!r&&s}}const g=Cy(d.refSet.rootRef.uri)!==d.uri,y=["error","replace"].includes(this.options.dereference.circular);if((u||g||rC(f)&&N$(f.$ref)||y)&&!t.includesCycle(f)){var l;s.add(e);const i=new qI({reference:d,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:t,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(l=this.basePath)&&void 0!==l?l:[...PI([...n,r,e]),"$ref"]});f=await LI(f,i,{keyMap:IP,nodeTypeGetter:CP}),s.delete(e)}if(this.indirections.pop(),rC(f)){const t=new fP([...f.content],vS(f.meta),vS(f.attributes));if(e.forEach(((e,r,s)=>{t.remove(US(r)),t.content.push(s)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",d.uri),t.setMetaProperty("ref-referencing-element-id",vS(DI.identify(e))),this.allowMetaPatches&&void 0===t.get("$$ref")){const e=_y(c,h);t.set("$$ref",e)}f=t}return i.replaceWith(f,BI),r?void 0:f}catch(t){var c,p,u;const s=RI(t),i=MI(s,{baseDoc:this.reference.uri,$ref:US(e.$ref),pointer:_k(US(e.$ref)),fullPath:null!==(c=this.basePath)&&void 0!==c?c:[...PI([...n,r,e]),"$ref"]});return void(null===(p=this.options.dereference.dereferenceOpts)||void 0===p||null===(p=p.errors)||void 0===p||null===(u=p.push)||void 0===u||u.call(p,i))}}async SchemaElement(e,t,r,s,n,i){try{if(!N$(e.$ref))return;if(this.indirections.includes(e))return!1;const[t,s]=this.toAncestorLineage([...n,r]);let c=await this.toReference(Fy(this.reference.uri)),{uri:p}=c;const u=wI(p,e),d=Cy(u),h=new Ly({uri:d}),m=!this.options.resolve.resolvers.some((e=>e.canRead(h))),f=!m;let g,y=Cy(this.reference.uri)===u,v=!y;this.indirections.push(e);try{if(m||f){p=this.toBaseURI(u);const e=u,t=SI(c.value.result);if(g=EI(e,t),g=SI(g),g.id=DI.identify(g),!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&v)return}else{if(p=this.toBaseURI(u),y=Cy(this.reference.uri)===p,v=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&v)return;c=await this.toReference(Fy(u));const e=_k(u),t=SI(c.value.result);g=Fk(e,t),g=SI(g),g.id=DI.identify(g)}}catch(e){if(!(f&&e instanceof iE))throw e;if(vI(bI(u))){if(y=Cy(this.reference.uri)===p,v=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&v)return;c=await this.toReference(Fy(u));const e=bI(u),t=SI(c.value.result);g=xI(e,t),g=SI(g),g.id=DI.identify(g)}else{if(p=this.toBaseURI(US(u)),y=Cy(this.reference.uri)===p,v=!y,!this.options.resolve.internal&&y)return;if(!this.options.resolve.external&&v)return;c=await this.toReference(Fy(u));const e=_k(u),t=SI(c.value.result);g=Fk(e,t),g=SI(g),g.id=DI.identify(g)}}if(e===g)throw new Ih("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new aE(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(t.includes(g)){if(c.refSet.circular=!0,"error"===this.options.dereference.circular)throw new Ih("Circular reference detected");if("replace"===this.options.dereference.circular){var o,a;const t=new O$(g.id,{type:"json-schema",uri:c.uri,$ref:US(e.$ref),baseURI:_y(p,u),referencingElement:e}),s=(null!==(o=null===(a=this.options.dereference.strategyOpts["openapi-3-1"])||void 0===a?void 0:a.circularReplacer)&&void 0!==o?o:this.options.dereference.circularReplacer)(t);return i.replaceWith(s,BI),!r&&s}}const b=Cy(c.refSet.rootRef.uri)!==c.uri,x=["error","replace"].includes(this.options.dereference.circular);if((v||b||lC(g)&&N$(g.$ref)||x)&&!t.includesCycle(g)){var l;s.add(e);const i=new qI({reference:c,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:t,basePath:null!==(l=this.basePath)&&void 0!==l?l:[...PI([...n,r,e]),"$ref"]});g=await LI(g,i,{keyMap:IP,nodeTypeGetter:CP}),s.delete(e)}if(this.indirections.pop(),cC(g)){const t=vS(g);return t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",c.uri),t.setMetaProperty("ref-referencing-element-id",vS(DI.identify(e))),i.replaceWith(t,BI),!r&&t}if(lC(g)){const t=new wP([...g.content],vS(g.meta),vS(g.attributes));if(e.forEach(((e,r,s)=>{t.remove(US(r)),t.content.push(s)})),t.remove("$ref"),t.setMetaProperty("ref-fields",{$ref:US(e.$ref)}),t.setMetaProperty("ref-origin",c.uri),t.setMetaProperty("ref-referencing-element-id",vS(DI.identify(e))),this.allowMetaPatches&&void 0===t.get("$$ref")){const e=_y(p,u);t.set("$$ref",e)}g=t}return i.replaceWith(g,BI),r?void 0:g}catch(t){var c,p,u;const s=RI(t),i=new FI(`Could not resolve reference: ${s.message}`,{baseDoc:this.reference.uri,$ref:US(e.$ref),fullPath:null!==(c=this.basePath)&&void 0!==c?c:[...PI([...n,r,e]),"$ref"],cause:s});return void(null===(p=this.options.dereference.dereferenceOpts)||void 0===p||null===(p=p.errors)||void 0===p||null===(u=p.push)||void 0===u||u.call(p,i))}}async LinkElement(){}async ExampleElement(e,t,r,s,n,i){try{return await super.ExampleElement(e,t,r,s,n,i)}catch(t){var o,a,l;const s=RI(t),i=MI(s,{baseDoc:this.reference.uri,externalValue:US(e.externalValue),fullPath:null!==(o=this.basePath)&&void 0!==o?o:[...PI([...n,r,e]),"externalValue"]});return void(null===(a=this.options.dereference.dereferenceOpts)||void 0===a||null===(a=a.errors)||void 0===a||null===(l=a.push)||void 0===l||l.call(a,i))}}}const NI=hS[Symbol.for("nodejs.util.promisify.custom")];class UI{constructor({parameterMacro:e,modelPropertyMacro:t,mode:r,options:s,...n}){const i=[];i.push(new qI({...n,options:s})),"function"==typeof t&&i.push(new CI({modelPropertyMacro:t,options:s})),"strict"!==r&&i.push(new II({options:s})),"function"==typeof e&&i.push(new _I({parameterMacro:e,options:s}));const o=NI(i,{nodeTypeGetter:CP});Object.assign(this,o)}}const zI=OS[Symbol.for("nodejs.util.promisify.custom")];class HI extends class extends class{name;constructor({name:e}){this.name=e}}{constructor(e){super({...null!=e?e:{},name:"openapi-3-1"})}canDereference(e){var t;return"text/plain"!==e.mediaType?Lk.includes(e.mediaType):QP(null===(t=e.parseResult)||void 0===t?void 0:t.result)}async dereference(e,t){var r;const s=oS(jP),n=null!==(r=t.dereference.refSet)&&void 0!==r?r:new Dy,i=new Dy;let o,a=n;n.has(e.uri)?o=n.find(ng(e.uri,"uri")):(o=new tE({uri:e.uri,value:e.parseResult}),n.add(o)),t.dereference.immutable&&(n.refs.map((e=>new tE({...e,value:vS(e.value)}))).forEach((e=>i.add(e))),o=i.find((t=>t.uri===e.uri)),a=i);const l=new jI({reference:o,namespace:s,options:t}),c=await TI(a.rootRef.value,l,{keyMap:IP,nodeTypeGetter:CP});return t.dereference.immutable&&i.refs.filter((e=>e.uri.startsWith("immutable://"))).map((e=>new tE({...e,uri:e.uri.replace(/^immutable:\/\//,"")}))).forEach((e=>n.add(e))),null===t.dereference.refSet&&n.clean(),i.clean(),c}}{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:e=!1,parameterMacro:t=null,modelPropertyMacro:r=null,mode:s="non-strict",ancestors:n=[],...i}={}){super({...i}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=e,this.parameterMacro=t,this.modelPropertyMacro=r,this.mode=s,this.ancestors=[...n]}async dereference(e,t){var r;const s=oS(jP),n=null!==(r=t.dereference.refSet)&&void 0!==r?r:new Dy,i=new Dy;let o,a=n;n.has(e.uri)?o=n.find((t=>t.uri===e.uri)):(o=new tE({uri:e.uri,value:e.parseResult}),n.add(o)),t.dereference.immutable&&(n.refs.map((e=>new tE({...e,value:vS(e.value)}))).forEach((e=>i.add(e))),o=i.find((t=>t.uri===e.uri)),a=i);const l=new UI({reference:o,namespace:s,options:t,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),c=await zI(a.rootRef.value,l,{keyMap:IP,nodeTypeGetter:CP});return t.dereference.immutable&&i.refs.filter((e=>e.uri.startsWith("immutable://"))).map((e=>new tE({...e,uri:e.uri.replace(/^immutable:\/\//,"")}))).forEach((e=>n.add(e))),null===t.dereference.refSet&&n.clean(),i.clean(),c}}const VI=e=>{const t=US(e.meta.get("baseURI")),r=e.meta.get("referencingElement");return new k$({$ref:t},vS(r.meta),vS(r.attributes))},WI=async e=>{const{spec:t,timeout:r,redirects:s,requestInterceptor:n,responseInterceptor:i,pathDiscriminator:o=[],allowMetaPatches:a=!1,useCircularStructures:l=!1,skipNormalization:c=!1,parameterMacro:p=null,modelPropertyMacro:u=null,mode:d="non-strict",strategies:h}=e;try{const{cache:m}=WI,f=h.find((e=>e.match(t))),g=Oy(Iy())?Iy():"https://swagger.io",y=Qs(e),v=_y(g,y);let b;m.has(t)?b=m.get(t):(b=dP.refract(t),b.classes.push("result"),m.set(t,b));const x=new I$([b]),w=Rk(o),$=""===w?"":`#${w}`,S=Fk(w,b),E=new tE({uri:v,value:x}),k=new Dy({refs:[E]});""!==w&&(k.rootRef=void 0);const A=[new Set([S])],O=[],j=((e,t,r)=>new HS({element:r}).transclude(e,t))(S,await(async(e,t={})=>(async(e,t)=>{let r=e,s=!1;if(!Z$(e)){const t=wS(e);t.classes.push("result"),r=new I$([t]),s=!0}const n=new Ly({uri:t.resolve.baseURI,parseResult:r,mediaType:t.parse.mediaType}),i=await Hy("canDereference",[n,t],t.dereference.strategies);if(Nf(i))throw new ZS(n.uri);try{const{result:e}=await Vy("dereference",[n,t],i);return s?e.get(0):e}catch(e){throw new XS(`Error while dereferencing file "${n.uri}"`,{cause:e})}})(e,Uy(By,t)))(S,{resolve:{baseURI:`${v}${$}`,resolvers:[new hI({timeout:r||1e4,redirects:s||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:n,responseInterceptor:i}},strategies:[new pI]},parse:{mediaType:Lk.latest(),parsers:[new gI({allowEmpty:!1,sourceMap:!1}),new yI({allowEmpty:!1,sourceMap:!1}),new mI({allowEmpty:!1,sourceMap:!1}),new fI({allowEmpty:!1,sourceMap:!1}),new cI({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new HI({allowMetaPatches:a,useCircularStructures:l,parameterMacro:p,modelPropertyMacro:u,mode:d,ancestors:A})],refSet:k,dereferenceOpts:{errors:O},immutable:!1,circular:l?"ignore":"replace",circularReplacer:l?By.dereference.circularReplacer:VI}}),b),T=c?j:f.normalize(j);return{spec:US(T),errors:O}}catch(e){if(e instanceof jk||e instanceof Pk)return{spec:null,errors:[]};throw e}};WI.cache=new WeakMap;const GI=e=>{if(!V$(e))return e;const t=[BP({operationIdNormalizer:(e,t,r)=>gk({operationId:e},t,r,{v2OperationIdCompatibilityMode:!1})}),RP(),FP(),qP(),NP()];return TS(e,t,{toolboxCreator:yC,visitorOptions:{keyMap:IP,nodeTypeGetter:CP}})},JI={name:"openapi-3-1-apidom",match:e=>wk(e),normalize(e){if(!q$(e)&&qg(e)&&!e.$$normalized){const r=(t=GI,e=>{const r=dP.refract(e);r.classes.push("result");const s=t(r),n=US(s);return WI.cache.set(n,s),US(s)})(e);return r.$$normalized=!0,r}var t;return q$(e)?GI(e):e},resolve:async e=>WI(e)};function KI(e,t,r){if(!e||"object"!=typeof e||!e.paths||"object"!=typeof e.paths)return null;const{paths:s}=e;for(const n in s)for(const i in s[n]){if("PARAMETERS"===i.toUpperCase())continue;const o=s[n][i];if(!o||"object"!=typeof o)continue;const a={spec:e,pathName:n,method:i.toUpperCase(),operation:o},l=t(a);if(r&&l)return a}}function YI(e,t){return`${t.toLowerCase()}-${e}`}const{isHttpUrl:XI}=My,ZI=()=>null,QI=function({spec:e,cb:t=ZI,defaultTag:r="default",v2OperationIdCompatibilityMode:s}){const n={},i={};return KI(e,(({pathName:o,method:a,operation:l})=>{var c;(l.tags?(c=l.tags,Array.isArray(c)?c:[c]):[r]).forEach((r=>{if("string"!=typeof r)return;i[r]=i[r]||{};const c=i[r],p=gk(l,o,a,{v2OperationIdCompatibilityMode:s}),u=t({spec:e,pathName:o,method:a,operation:l,operationId:p});if(n[p])n[p]+=1,c[`${p}${n[p]}`]=u;else if(void 0!==c[p]){const e=n[p]||1;n[p]=e+1,c[`${p}${n[p]}`]=u;const t=c[p];delete c[p],c[`${p}${e}`]=t}else c[p]=u}))})),i},e_=function(e={}){return({pathName:t,method:r,operationId:s})=>(n,i={})=>{const{requestInterceptor:o,responseInterceptor:a,userFetch:l}=e;return e.execute({spec:e.spec,requestInterceptor:o,responseInterceptor:a,userFetch:l,pathName:t,method:r,parameters:n,operationId:s,...i})}};var t_=function(e,t,r){var s=r||{},n=s.encode||n_;if("function"!=typeof n)throw new TypeError("option encode is invalid");if(!s_.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(i&&!s_.test(i))throw new TypeError("argument val is invalid");var o=e+"="+i;if(null!=s.maxAge){var a=s.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(s.domain){if(!s_.test(s.domain))throw new TypeError("option domain is invalid");o+="; Domain="+s.domain}if(s.path){if(!s_.test(s.path))throw new TypeError("option path is invalid");o+="; Path="+s.path}if(s.expires){var l=s.expires;if(!function(e){return"[object Date]"===r_.call(e)||e instanceof Date}(l)||isNaN(l.valueOf()))throw new TypeError("option expires is invalid");o+="; Expires="+l.toUTCString()}if(s.httpOnly&&(o+="; HttpOnly"),s.secure&&(o+="; Secure"),s.partitioned&&(o+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():s.priority){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},r_=Object.prototype.toString,s_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function n_(e){return encodeURIComponent(e)}const i_=function(){const e=l_,t=a_,r=this,s="parser.js: Parser(): ";r.ast=void 0,r.stats=void 0,r.trace=void 0,r.callbacks=[];let n,i,o,a,l,c,p,u=0,d=0,h=0,m=0,f=0,g=new function(){this.state=e.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=e.ACTIVE,this.phraseLength=0}};r.parse=(y,v,x,w)=>{const $=`${s}parse(): `;u=0,d=0,h=0,m=0,f=0,n=void 0,i=void 0,o=void 0,a=void 0,g.refresh(),l=void 0,c=void 0,p=void 0,a=t.stringToChars(x),n=y.rules,i=y.udts;const S=v.toLowerCase();let E;for(const e in n)if(n.hasOwnProperty(e)&&S===n[e].lower){E=n[e].index;break}if(void 0===E)throw new Error(`${$}start rule name '${startRule}' not recognized`);(()=>{const e=`${s}initializeCallbacks(): `;let t,o;for(l=[],c=[],t=0;t<n.length;t+=1)l[t]=void 0;for(t=0;t<i.length;t+=1)c[t]=void 0;const a=[];for(t=0;t<n.length;t+=1)a.push(n[t].lower);for(t=0;t<i.length;t+=1)a.push(i[t].lower);for(const s in r.callbacks)if(r.callbacks.hasOwnProperty(s)){if(t=a.indexOf(s.toLowerCase()),t<0)throw new Error(`${e}syntax callback '${s}' not a rule or udt name`);if(o=r.callbacks[s]?r.callbacks[s]:void 0,"function"!=typeof o&&void 0!==o)throw new Error(`${e}syntax callback[${s}] must be function reference or falsy)`);t<n.length?l[t]=o:c[t-n.length]=o}})(),r.trace&&r.trace.init(n,i,a),r.stats&&r.stats.init(n,i),r.ast&&r.ast.init(n,i,a),p=w,o=[{type:e.RNM,index:E}],b(0,0),o=void 0;let k=!1;switch(g.state){case e.ACTIVE:throw new Error(`${$}final state should never be 'ACTIVE'`);case e.NOMATCH:k=!1;break;case e.EMPTY:case e.MATCH:k=g.phraseLength===a.length;break;default:throw new Error("unrecognized state")}return{success:k,state:g.state,stateName:e.idName(g.state),length:a.length,matched:g.phraseLength,maxMatched:f,maxTreeDepth:h,nodeHits:m}};const y=(t,r,n,i)=>{if(r.phraseLength>n){let e=`${s}opRNM(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:if(!i)throw new Error(`${s}opRNM(${t.name}): callback function return error. ACTIVE state not allowed.`);break;case e.EMPTY:r.phraseLength=0;break;case e.MATCH:0===r.phraseLength&&(r.state=e.EMPTY);break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opRNM(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}},v=(t,l)=>{let d,h,m;const f=o[t],y=i[f.index];g.UdtIndex=y.index,u||(m=r.ast&&r.ast.udtDefined(f.index),m&&(h=n.length+f.index,d=r.ast.getLength(),r.ast.down(h,y.name)));const v=a.length-l;c[f.index](g,a,l,p),((t,r,n)=>{if(r.phraseLength>n){let e=`${s}opUDT(${t.name}): callback function error: `;throw e+=`sysData.phraseLength: ${r.phraseLength}`,e+=` must be <= remaining chars: ${n}`,new Error(e)}switch(r.state){case e.ACTIVE:throw new Error(`${s}opUDT(${t.name}) ACTIVE state return not allowed.`);case e.EMPTY:if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.phraseLength=0;break;case e.MATCH:if(0===r.phraseLength){if(!t.empty)throw new Error(`${s}opUDT(${t.name}) may not return EMPTY.`);r.state=e.EMPTY}break;case e.NOMATCH:r.phraseLength=0;break;default:throw new Error(`${s}opUDT(${t.name}): callback function return error. Unrecognized return state: ${r.state}`)}})(y,g,v),u||m&&(g.state===e.NOMATCH?r.ast.setLength(d):r.ast.up(h,y.name,l,g.phraseLength))},b=(t,i)=>{const c=`${s}opExecute(): `,x=o[t];switch(m+=1,d>h&&(h=d),d+=1,g.refresh(),r.trace&&r.trace.down(x,i),x.type){case e.ALT:((t,r)=>{const s=o[t];for(let t=0;t<s.children.length&&(b(s.children[t],r),g.state===e.NOMATCH);t+=1);})(t,i);break;case e.CAT:((t,s)=>{let n,i,a,l;const c=o[t];r.ast&&(i=r.ast.getLength()),n=!0,a=s,l=0;for(let t=0;t<c.children.length;t+=1){if(b(c.children[t],a),g.state===e.NOMATCH){n=!1;break}a+=g.phraseLength,l+=g.phraseLength}n?(g.state=0===l?e.EMPTY:e.MATCH,g.phraseLength=l):(g.state=e.NOMATCH,g.phraseLength=0,r.ast&&r.ast.setLength(i))})(t,i);break;case e.REP:((t,s)=>{let n,i,l,c;const p=o[t];if(0===p.max)return g.state=e.EMPTY,void(g.phraseLength=0);for(i=s,l=0,c=0,r.ast&&(n=r.ast.getLength());!(i>=a.length)&&(b(t+1,i),g.state!==e.NOMATCH)&&g.state!==e.EMPTY&&(c+=1,l+=g.phraseLength,i+=g.phraseLength,c!==p.max););g.state===e.EMPTY||c>=p.min?(g.state=0===l?e.EMPTY:e.MATCH,g.phraseLength=l):(g.state=e.NOMATCH,g.phraseLength=0,r.ast&&r.ast.setLength(n))})(t,i);break;case e.RNM:((t,s)=>{let i,c,d;const h=o[t],m=n[h.index],f=l[m.index];if(u||(c=r.ast&&r.ast.ruleDefined(h.index),c&&(i=r.ast.getLength(),r.ast.down(h.index,n[h.index].name))),f){const t=a.length-s;f(g,a,s,p),y(m,g,t,!0),g.state===e.ACTIVE&&(d=o,o=m.opcodes,b(0,s),o=d,f(g,a,s,p),y(m,g,t,!1))}else d=o,o=m.opcodes,b(0,s),o=d;u||c&&(g.state===e.NOMATCH?r.ast.setLength(i):r.ast.up(h.index,m.name,s,g.phraseLength))})(t,i);break;case e.TRG:((t,r)=>{const s=o[t];g.state=e.NOMATCH,r<a.length&&s.min<=a[r]&&a[r]<=s.max&&(g.state=e.MATCH,g.phraseLength=1)})(t,i);break;case e.TBS:((t,r)=>{const s=o[t],n=s.string.length;if(g.state=e.NOMATCH,r+n<=a.length){for(let e=0;e<n;e+=1)if(a[r+e]!==s.string[e])return;g.state=e.MATCH,g.phraseLength=n}})(t,i);break;case e.TLS:((t,r)=>{let s;const n=o[t];g.state=e.NOMATCH;const i=n.string.length;if(0!==i){if(r+i<=a.length){for(let e=0;e<i;e+=1)if(s=a[r+e],s>=65&&s<=90&&(s+=32),s!==n.string[e])return;g.state=e.MATCH,g.phraseLength=i}}else g.state=e.EMPTY})(t,i);break;case e.UDT:v(t,i);break;case e.AND:((t,r)=>{switch(u+=1,b(t+1,r),u-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.EMPTY;break;case e.NOMATCH:g.state=e.NOMATCH;break;default:throw new Error(`opAND: invalid state ${g.state}`)}})(t,i);break;case e.NOT:((t,r)=>{switch(u+=1,b(t+1,r),u-=1,g.phraseLength=0,g.state){case e.EMPTY:case e.MATCH:g.state=e.NOMATCH;break;case e.NOMATCH:g.state=e.EMPTY;break;default:throw new Error(`opNOT: invalid state ${g.state}`)}})(t,i);break;default:throw new Error(`${c}unrecognized operator`)}u||i+g.phraseLength>f&&(f=i+g.phraseLength),r.stats&&r.stats.collect(x,g),r.trace&&r.trace.up(x,g.state,i,g.phraseLength),d-=1}},o_=function(){const e=l_,t=a_,r=this;let s,n,i,o=0;const a=[],l=[],c=[];function p(e){let t="";for(;e-- >0;)t+=" ";return t}r.callbacks=[],r.init=(e,t,p)=>{let u;l.length=0,c.length=0,o=0,s=e,n=t,i=p;const d=[];for(u=0;u<s.length;u+=1)d.push(s[u].lower);for(u=0;u<n.length;u+=1)d.push(n[u].lower);for(o=s.length+n.length,u=0;u<o;u+=1)a[u]=void 0;for(const e in r.callbacks)if(r.callbacks.hasOwnProperty(e)){const t=e.toLowerCase();if(u=d.indexOf(t),u<0)throw new Error(`parser.js: Ast()): init: node '${e}' not a rule or udt name`);a[u]=r.callbacks[e]}},r.ruleDefined=e=>!!a[e],r.udtDefined=e=>!!a[s.length+e],r.down=(t,r)=>{const s=c.length;return l.push(s),c.push({name:r,thisIndex:s,thatIndex:void 0,state:e.SEM_PRE,callbackIndex:t,phraseIndex:void 0,phraseLength:void 0,stack:l.length}),s},r.up=(t,r,s,n)=>{const i=c.length,o=l.pop();return c.push({name:r,thisIndex:i,thatIndex:o,state:e.SEM_POST,callbackIndex:t,phraseIndex:s,phraseLength:n,stack:l.length}),c[o].thatIndex=i,c[o].phraseIndex=s,c[o].phraseLength=n,i},r.translate=t=>{let r,s;for(let n=0;n<c.length;n+=1)s=c[n],r=a[s.callbackIndex],r&&(s.state===e.SEM_PRE?r(e.SEM_PRE,i,s.phraseIndex,s.phraseLength,t):r&&r(e.SEM_POST,i,s.phraseIndex,s.phraseLength,t))},r.setLength=e=>{c.length=e,l.length=e>0?c[e-1].stack:0},r.getLength=()=>c.length,r.toXml=()=>{let r="",s=0;return r+='<?xml version="1.0" encoding="utf-8"?>\n',r+=`<root nodes="${c.length/2}" characters="${i.length}">\n`,r+="\x3c!-- input string --\x3e\n",r+=p(s+2),r+=t.charsToString(i),r+="\n",c.forEach((n=>{n.state===e.SEM_PRE?(s+=1,r+=p(s),r+=`<node name="${n.name}" index="${n.phraseIndex}" length="${n.phraseLength}">\n`,r+=p(s+2),r+=t.charsToString(i,n.phraseIndex,n.phraseLength),r+="\n"):(r+=p(s),r+=`</node>\x3c!-- name="${n.name}" --\x3e\n`,s-=1)})),r+="</root>\n",r}},a_={stringToChars:e=>[...e].map((e=>e.codePointAt(0))),charsToString:(e,t,r)=>{let s=e;for(;!(void 0===t||t<0);){if(void 0===r){s=e.slice(t);break}if(r<=0)return"";s=e.slice(t,t+r);break}return String.fromCodePoint(...s)}},l_={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case l_.ALT:return"ALT";case l_.CAT:return"CAT";case l_.REP:return"REP";case l_.RNM:return"RNM";case l_.TRG:return"TRG";case l_.TBS:return"TBS";case l_.TLS:return"TLS";case l_.UDT:return"UDT";case l_.AND:return"AND";case l_.NOT:return"NOT";case l_.ACTIVE:return"ACTIVE";case l_.EMPTY:return"EMPTY";case l_.MATCH:return"MATCH";case l_.NOMATCH:return"NOMATCH";case l_.SEM_PRE:return"SEM_PRE";case l_.SEM_POST:return"SEM_POST";case l_.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}},c_=(e,t,r,s,n)=>{if(e===l_.SEM_PRE){if(!1===Array.isArray(n))throw new Error("parser's user data must be an array");n.push(["server-url-template",a_.charsToString(t,r,s)])}return l_.SEM_OK},p_=(e,t,r,s,n)=>{if(e===l_.SEM_PRE){if(!1===Array.isArray(n))throw new Error("parser's user data must be an array");n.push(["server-variable",a_.charsToString(t,r,s)])}return l_.SEM_OK},u_=(e,t,r,s,n)=>{if(e===l_.SEM_PRE){if(!1===Array.isArray(n))throw new Error("parser's user data must be an array");n.push(["server-variable-name",a_.charsToString(t,r,s)])}return l_.SEM_OK},d_=(e,t,r,s,n)=>{if(e===l_.SEM_PRE){if(!1===Array.isArray(n))throw new Error("parser's user data must be an array");n.push(["literals",a_.charsToString(t,r,s)])}return l_.SEM_OK},h_=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"ALPHA",lower:"alpha",index:4,isBkr:!1},this.rules[5]={name:"DIGIT",lower:"digit",index:5,isBkr:!1},this.rules[6]={name:"HEXDIG",lower:"hexdig",index:6,isBkr:!1},this.rules[7]={name:"pct-encoded",lower:"pct-encoded",index:7,isBkr:!1},this.rules[8]={name:"unreserved",lower:"unreserved",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ucschar",lower:"ucschar",index:10,isBkr:!1},this.rules[11]={name:"iprivate",lower:"iprivate",index:11,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[2].opcodes[2]={type:4,index:8},this.rules[2].opcodes[3]={type:4,index:7},this.rules[2].opcodes[4]={type:4,index:9},this.rules[2].opcodes[5]={type:7,string:[58]},this.rules[2].opcodes[6]={type:7,string:[64]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13,14]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:6,string:[38]},this.rules[3].opcodes[5]={type:5,min:40,max:59},this.rules[3].opcodes[6]={type:6,string:[61]},this.rules[3].opcodes[7]={type:5,min:63,max:91},this.rules[3].opcodes[8]={type:6,string:[93]},this.rules[3].opcodes[9]={type:6,string:[95]},this.rules[3].opcodes[10]={type:5,min:97,max:122},this.rules[3].opcodes[11]={type:6,string:[126]},this.rules[3].opcodes[12]={type:4,index:10},this.rules[3].opcodes[13]={type:4,index:11},this.rules[3].opcodes[14]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:65,max:90},this.rules[4].opcodes[2]={type:5,min:97,max:122},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[6].opcodes[1]={type:4,index:5},this.rules[6].opcodes[2]={type:7,string:[97]},this.rules[6].opcodes[3]={type:7,string:[98]},this.rules[6].opcodes[4]={type:7,string:[99]},this.rules[6].opcodes[5]={type:7,string:[100]},this.rules[6].opcodes[6]={type:7,string:[101]},this.rules[6].opcodes[7]={type:7,string:[102]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:2,children:[1,2,3]},this.rules[7].opcodes[1]={type:7,string:[37]},this.rules[7].opcodes[2]={type:4,index:6},this.rules[7].opcodes[3]={type:4,index:6},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[8].opcodes[1]={type:4,index:4},this.rules[8].opcodes[2]={type:4,index:5},this.rules[8].opcodes[3]={type:7,string:[45]},this.rules[8].opcodes[4]={type:7,string:[46]},this.rules[8].opcodes[5]={type:7,string:[95]},this.rules[8].opcodes[6]={type:7,string:[126]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[10].opcodes[1]={type:5,min:160,max:55295},this.rules[10].opcodes[2]={type:5,min:63744,max:64975},this.rules[10].opcodes[3]={type:5,min:65008,max:65519},this.rules[10].opcodes[4]={type:5,min:65536,max:131069},this.rules[10].opcodes[5]={type:5,min:131072,max:196605},this.rules[10].opcodes[6]={type:5,min:196608,max:262141},this.rules[10].opcodes[7]={type:5,min:262144,max:327677},this.rules[10].opcodes[8]={type:5,min:327680,max:393213},this.rules[10].opcodes[9]={type:5,min:393216,max:458749},this.rules[10].opcodes[10]={type:5,min:458752,max:524285},this.rules[10].opcodes[11]={type:5,min:524288,max:589821},this.rules[10].opcodes[12]={type:5,min:589824,max:655357},this.rules[10].opcodes[13]={type:5,min:655360,max:720893},this.rules[10].opcodes[14]={type:5,min:720896,max:786429},this.rules[10].opcodes[15]={type:5,min:786432,max:851965},this.rules[10].opcodes[16]={type:5,min:851968,max:917501},this.rules[10].opcodes[17]={type:5,min:921600,max:983037},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3]},this.rules[11].opcodes[1]={type:5,min:57344,max:63743},this.rules[11].opcodes[2]={type:5,min:983040,max:1048573},this.rules[11].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){let e="";return e+="; OpenAPI Server URL templating ABNF syntax\n",e+="server-url-template = 1*( literals / server-variable )\n",e+='server-variable = "{" server-variable-name "}"\n',e+='server-variable-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\n',e+="literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B\n",e+=" / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n",e+=" / pct-encoded)\n",e+=" ; any Unicode character except: CTL, SP,\n",e+=' ; DQUOTE, "\'", "%" (aside from pct-encoded),\n',e+=' ; "<", ">", "\\", "^", "`", "{", "|", "}"\n',e+="\n",e+="; Characters definitions (from RFC 6570)\n",e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="DIGIT = %x30-39 ; 0-9\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n',e+=" ; case-insensitive\n",e+="\n",e+='pct-encoded = "%" HEXDIG HEXDIG\n',e+='unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\n',e+='sub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n',e+=' / "*" / "+" / "," / ";" / "="\n',e+="\n",e+="ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n",e+=" / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n",e+=" / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n",e+=" / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n",e+=" / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n",e+=" / %xD0000-DFFFD / %xE1000-EFFFD\n",e+="\n",e+="iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\n",'; OpenAPI Server URL templating ABNF syntax\nserver-url-template = 1*( literals / server-variable )\nserver-variable = "{" server-variable-name "}"\nserver-variable-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\nliterals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B\n / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n / pct-encoded)\n ; any Unicode character except: CTL, SP,\n ; DQUOTE, "\'", "%" (aside from pct-encoded),\n ; "<", ">", "\\", "^", "`", "{", "|", "}"\n\n; Characters definitions (from RFC 6570)\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nDIGIT = %x30-39 ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n ; case-insensitive\n\npct-encoded = "%" HEXDIG HEXDIG\nunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\nsub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n / "*" / "+" / "," / ";" / "="\n\nucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n / %xD0000-DFFFD / %xE1000-EFFFD\n\niprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\n'}},m_=e=>{const t=new i_;return t.ast=new o_,t.ast.callbacks["server-url-template"]=c_,t.ast.callbacks["server-variable"]=p_,t.ast.callbacks["server-variable-name"]=u_,t.ast.callbacks.literals=d_,{result:t.parse(h_,"server-url-template",e),ast:t.ast}},f_=e=>(e=>{try{return"string"==typeof e&&decodeURIComponent(e)!==e}catch{return!1}})(e)?e:encodeURIComponent(e).replace(/%5B/g,"[").replace(/%5D/g,"]"),g_=["literals","server-variable-name"],y_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["slash",a_.charsToString(t,r,s)]),l_.SEM_OK),v_=(e,t,r,s,n)=>{if(e===l_.SEM_PRE){if(!1===Array.isArray(n))throw new Error("parser's user data must be an array");n.push(["path-template",a_.charsToString(t,r,s)])}return l_.SEM_OK},b_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["path",a_.charsToString(t,r,s)]),l_.SEM_OK),x_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["path-literal",a_.charsToString(t,r,s)]),l_.SEM_OK),w_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["query",a_.charsToString(t,r,s)]),l_.SEM_OK),$_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["query-marker",a_.charsToString(t,r,s)]),l_.SEM_OK),S_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["fragment",a_.charsToString(t,r,s)]),l_.SEM_OK),E_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["fragment-marker",a_.charsToString(t,r,s)]),l_.SEM_OK),k_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["template-expression",a_.charsToString(t,r,s)]),l_.SEM_OK),A_=(e,t,r,s,n)=>(e===l_.SEM_PRE&&n.push(["template-expression-param-name",a_.charsToString(t,r,s)]),l_.SEM_OK),O_=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path",lower:"path",index:1,isBkr:!1},this.rules[2]={name:"path-segment",lower:"path-segment",index:2,isBkr:!1},this.rules[3]={name:"query",lower:"query",index:3,isBkr:!1},this.rules[4]={name:"query-literal",lower:"query-literal",index:4,isBkr:!1},this.rules[5]={name:"query-marker",lower:"query-marker",index:5,isBkr:!1},this.rules[6]={name:"fragment",lower:"fragment",index:6,isBkr:!1},this.rules[7]={name:"fragment-literal",lower:"fragment-literal",index:7,isBkr:!1},this.rules[8]={name:"fragment-marker",lower:"fragment-marker",index:8,isBkr:!1},this.rules[9]={name:"slash",lower:"slash",index:9,isBkr:!1},this.rules[10]={name:"path-literal",lower:"path-literal",index:10,isBkr:!1},this.rules[11]={name:"template-expression",lower:"template-expression",index:11,isBkr:!1},this.rules[12]={name:"template-expression-param-name",lower:"template-expression-param-name",index:12,isBkr:!1},this.rules[13]={name:"unreserved",lower:"unreserved",index:13,isBkr:!1},this.rules[14]={name:"pct-encoded",lower:"pct-encoded",index:14,isBkr:!1},this.rules[15]={name:"sub-delims",lower:"sub-delims",index:15,isBkr:!1},this.rules[16]={name:"ALPHA",lower:"alpha",index:16,isBkr:!1},this.rules[17]={name:"DIGIT",lower:"digit",index:17,isBkr:!1},this.rules[18]={name:"HEXDIG",lower:"hexdig",index:18,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:5},this.rules[0].opcodes[5]={type:4,index:3},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:2,children:[8,9]},this.rules[0].opcodes[8]={type:4,index:8},this.rules[0].opcodes[9]={type:4,index:6},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,6]},this.rules[1].opcodes[1]={type:4,index:9},this.rules[1].opcodes[2]={type:3,min:0,max:1/0},this.rules[1].opcodes[3]={type:2,children:[4,5]},this.rules[1].opcodes[4]={type:4,index:2},this.rules[1].opcodes[5]={type:4,index:9},this.rules[1].opcodes[6]={type:3,min:0,max:1},this.rules[1].opcodes[7]={type:4,index:2},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:10},this.rules[2].opcodes[3]={type:4,index:11},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:4},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10]},this.rules[4].opcodes[2]={type:4,index:13},this.rules[4].opcodes[3]={type:4,index:14},this.rules[4].opcodes[4]={type:4,index:15},this.rules[4].opcodes[5]={type:7,string:[58]},this.rules[4].opcodes[6]={type:7,string:[64]},this.rules[4].opcodes[7]={type:7,string:[47]},this.rules[4].opcodes[8]={type:7,string:[63]},this.rules[4].opcodes[9]={type:7,string:[38]},this.rules[4].opcodes[10]={type:7,string:[61]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:7,string:[63]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:0,max:1/0},this.rules[6].opcodes[1]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:3,min:1,max:1/0},this.rules[7].opcodes[1]={type:1,children:[2,3,4,5,6,7,8]},this.rules[7].opcodes[2]={type:4,index:13},this.rules[7].opcodes[3]={type:4,index:14},this.rules[7].opcodes[4]={type:4,index:15},this.rules[7].opcodes[5]={type:7,string:[58]},this.rules[7].opcodes[6]={type:7,string:[64]},this.rules[7].opcodes[7]={type:7,string:[47]},this.rules[7].opcodes[8]={type:7,string:[63]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:7,string:[35]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:7,string:[47]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:3,min:1,max:1/0},this.rules[10].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[10].opcodes[2]={type:4,index:13},this.rules[10].opcodes[3]={type:4,index:14},this.rules[10].opcodes[4]={type:4,index:15},this.rules[10].opcodes[5]={type:7,string:[58]},this.rules[10].opcodes[6]={type:7,string:[64]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:2,children:[1,2,3]},this.rules[11].opcodes[1]={type:7,string:[123]},this.rules[11].opcodes[2]={type:4,index:12},this.rules[11].opcodes[3]={type:7,string:[125]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:3,min:1,max:1/0},this.rules[12].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[12].opcodes[2]={type:4,index:13},this.rules[12].opcodes[3]={type:4,index:14},this.rules[12].opcodes[4]={type:4,index:15},this.rules[12].opcodes[5]={type:7,string:[58]},this.rules[12].opcodes[6]={type:7,string:[64]},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[13].opcodes[1]={type:4,index:16},this.rules[13].opcodes[2]={type:4,index:17},this.rules[13].opcodes[3]={type:7,string:[45]},this.rules[13].opcodes[4]={type:7,string:[46]},this.rules[13].opcodes[5]={type:7,string:[95]},this.rules[13].opcodes[6]={type:7,string:[126]},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2,3]},this.rules[14].opcodes[1]={type:7,string:[37]},this.rules[14].opcodes[2]={type:4,index:18},this.rules[14].opcodes[3]={type:4,index:18},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[15].opcodes[1]={type:7,string:[33]},this.rules[15].opcodes[2]={type:7,string:[36]},this.rules[15].opcodes[3]={type:7,string:[38]},this.rules[15].opcodes[4]={type:7,string:[39]},this.rules[15].opcodes[5]={type:7,string:[40]},this.rules[15].opcodes[6]={type:7,string:[41]},this.rules[15].opcodes[7]={type:7,string:[42]},this.rules[15].opcodes[8]={type:7,string:[43]},this.rules[15].opcodes[9]={type:7,string:[44]},this.rules[15].opcodes[10]={type:7,string:[59]},this.rules[15].opcodes[11]={type:7,string:[61]},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2]},this.rules[16].opcodes[1]={type:5,min:65,max:90},this.rules[16].opcodes[2]={type:5,min:97,max:122},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:48,max:57},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[18].opcodes[1]={type:4,index:17},this.rules[18].opcodes[2]={type:7,string:[97]},this.rules[18].opcodes[3]={type:7,string:[98]},this.rules[18].opcodes[4]={type:7,string:[99]},this.rules[18].opcodes[5]={type:7,string:[100]},this.rules[18].opcodes[6]={type:7,string:[101]},this.rules[18].opcodes[7]={type:7,string:[102]},this.toString=function(){let e="";return e+="; OpenAPI Path Templating ABNF syntax\n",e+="path-template = path [ query-marker query ] [ fragment-marker fragment ]\n",e+="path = slash *( path-segment slash ) [ path-segment ]\n",e+="path-segment = 1*( path-literal / template-expression )\n",e+="query = *( query-literal )\n",e+='query-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" / "&" / "=" )\n',e+='query-marker = "?"\n',e+="fragment = *( fragment-literal )\n",e+='fragment-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" )\n',e+='fragment-marker = "#"\n',e+='slash = "/"\n',e+='path-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\n',e+='template-expression = "{" template-expression-param-name "}"\n',e+='template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\n',e+="\n",e+="; Characters definitions (from RFC 3986)\n",e+='unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\n',e+='pct-encoded = "%" HEXDIG HEXDIG\n',e+='sub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n',e+=' / "*" / "+" / "," / ";" / "="\n',e+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",e+="DIGIT = %x30-39 ; 0-9\n",e+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n','; OpenAPI Path Templating ABNF syntax\npath-template = path [ query-marker query ] [ fragment-marker fragment ]\npath = slash *( path-segment slash ) [ path-segment ]\npath-segment = 1*( path-literal / template-expression )\nquery = *( query-literal )\nquery-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" / "&" / "=" )\nquery-marker = "?"\nfragment = *( fragment-literal )\nfragment-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" )\nfragment-marker = "#"\nslash = "/"\npath-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\ntemplate-expression = "{" template-expression-param-name "}"\ntemplate-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )\n\n; Characters definitions (from RFC 3986)\nunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\npct-encoded = "%" HEXDIG HEXDIG\nsub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n / "*" / "+" / "," / ";" / "="\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nDIGIT = %x30-39 ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n'}},j_=e=>(e=>{try{return"string"==typeof e&&decodeURIComponent(e)!==e}catch{return!1}})(e)?e:encodeURIComponent(e).replace(/%5B/g,"[").replace(/%5D/g,"]"),T_=["slash","path-literal","query-marker","query-literal","template-expression-param-name"],P_=(e,t,r={})=>{const s={encoder:j_,...r},n=(e=>{const t=new i_;return t.ast=new o_,t.ast.callbacks["path-template"]=v_,t.ast.callbacks.path=b_,t.ast.callbacks.query=w_,t.ast.callbacks["query-marker"]=$_,t.ast.callbacks.fragment=S_,t.ast.callbacks["fragment-marker"]=E_,t.ast.callbacks.slash=y_,t.ast.callbacks["path-literal"]=x_,t.ast.callbacks["template-expression"]=k_,t.ast.callbacks["template-expression-param-name"]=A_,{result:t.parse(O_,"path-template",e),ast:t.ast}})(e);if(!n.result.success)return e;const i=[];n.ast.translate(i);const o=i.filter((([e])=>T_.includes(e))).map((([e,r])=>"template-expression-param-name"===e?Object.hasOwn(t,r)?s.encoder(t[r],r):`{${r}}`:r));return o.join("")},C_={body:function({req:e,value:t}){void 0!==t&&(e.body=t)},header:function({req:e,parameter:t,value:r}){e.headers=e.headers||{},void 0!==r&&(e.headers[t.name]=r)},query:function({req:e,value:t,parameter:r}){if(e.query=e.query||{},!1===t&&"boolean"===r.type&&(t="false"),0===t&&["number","integer"].indexOf(r.type)>-1&&(t="0"),t)e.query[r.name]={collectionFormat:r.collectionFormat,value:t};else if(r.allowEmptyValue&&void 0!==t){const t=r.name;e.query[t]=e.query[t]||{},e.query[t].allowEmptyValue=!0}},path:function({req:e,value:t,parameter:r,baseURL:s}){if(void 0!==t){const n=e.url.replace(s,""),i=P_(n,{[r.name]:t});e.url=s+i}},formData:function({req:e,value:t,parameter:r}){if(!1===t&&"boolean"===r.type&&(t="false"),0===t&&["number","integer"].indexOf(r.type)>-1&&(t="0"),t)e.form=e.form||{},e.form[r.name]={collectionFormat:r.collectionFormat,value:t};else if(r.allowEmptyValue&&void 0!==t){e.form=e.form||{};const t=r.name;e.form[t]=e.form[t]||{},e.form[t].allowEmptyValue=!0}}};function I_(e,t){return t.includes("application/json")?"string"==typeof e?e:(Array.isArray(e)&&(e=e.map((e=>{try{return JSON.parse(e)}catch(t){return e}}))),JSON.stringify(e)):String(e)}const __=["accept","authorization","content-type"],R_=Object.freeze(Object.defineProperty({__proto__:null,cookie:function({req:e,parameter:t,value:r}){e.headers=e.headers||{};const s=typeof r;if(void 0!==r&&t.content){const s=Object.keys(t.content)[0];e.headers.Cookie=`${t.name}=${I_(r,s)}`}else if(void 0!==r&&(!Array.isArray(r)||0!==r.length)){const n="object"===s&&!Array.isArray(r)&&t.explode?"":`${t.name}=`;e.headers.Cookie=n+Pt({key:t.name,value:r,escape:!1,style:t.style||"form",explode:void 0!==t.explode&&t.explode})}},header:function({req:e,parameter:t,value:r}){if(e.headers=e.headers||{},!(__.indexOf(t.name.toLowerCase())>-1))if(void 0!==r&&t.content){const s=Object.keys(t.content)[0];e.headers[t.name]=I_(r,s)}else void 0===r||Array.isArray(r)&&0===r.length||(e.headers[t.name]=Pt({key:t.name,value:r,style:t.style||"simple",explode:void 0!==t.explode&&t.explode,escape:!1}))},path:function({req:e,value:t,parameter:r,baseURL:s}){const{name:n,style:i,explode:o,content:a}=r;if(void 0===t)return;const l=e.url.replace(s,"");let c;if(a){const e=Object.keys(a)[0];c=P_(l,{[n]:t},{encoder:t=>Tt(I_(t,e))})}else c=P_(l,{[n]:t},{encoder:e=>Pt({key:r.name,value:e,style:i||"simple",explode:o||!1,escape:"reserved"})});e.url=s+c},query:function({req:e,value:t,parameter:r}){if(e.query=e.query||{},void 0!==t&&r.content){const s=I_(t,Object.keys(r.content)[0]);if(s)e.query[r.name]=s;else if(r.allowEmptyValue){const t=r.name;e.query[t]=e.query[t]||{},e.query[t].allowEmptyValue=!0}}else if(!1===t&&(t="false"),0===t&&(t="0"),t){const{style:s,explode:n,allowReserved:i}=r;e.query[r.name]={value:t,serializationOption:{style:s,explode:n,allowReserved:i}}}else if(r.allowEmptyValue&&void 0!==t){const t=r.name;e.query[t]=e.query[t]||{},e.query[t].allowEmptyValue=!0}}},Symbol.toStringTag,{value:"Module"})),F_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:window,{btoa:M_}=F_;const L_=e=>Array.isArray(e)?e:[],D_=e=>{try{return new URL(e)}catch{const t=new URL(e,"https://swagger.io"),r=String(e).startsWith("/")?t.pathname:t.pathname.substring(1);return{hash:t.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:r,port:"",protocol:"",search:t.search,searchParams:t.searchParams}}};class B_ extends _h{}const q_={buildRequest:N_};function N_(e){const{spec:t,operationId:r,responseContentType:s,scheme:n,requestInterceptor:i,responseInterceptor:o,contextUrl:a,userFetch:l,server:c,serverVariables:p,http:u,signal:d,serverVariableEncoder:h}=e;let{parameters:m,parameterBuilders:f}=e;const g=$k(t);f||(f=g?R_:C_);let y={url:"",credentials:u&&u.withCredentials?"include":"same-origin",headers:{},cookies:{}};d&&(y.signal=d),i&&(y.requestInterceptor=i),o&&(y.responseInterceptor=o),l&&(y.userFetch=l);const v=function(e,t){return e&&e.paths?function(e,t){return KI(e,t,!0)||null}(e,(({pathName:e,method:r,operation:s})=>{if(!s||"object"!=typeof s)return!1;const n=s.operationId;return[gk(s,e,r),YI(e,r),n].some((e=>e&&e===t))})):null}(t,r);if(!v)throw new B_(`Operation ${r} not found`);const{operation:b={},method:x,pathName:w}=v,$=z_({spec:t,scheme:n,contextUrl:a,server:c,serverVariables:p,pathName:w,method:x,serverVariableEncoder:h});if(y.url+=$,!r)return delete y.cookies,y;y.url+=w,y.method=`${x}`.toUpperCase(),m=m||{};const S=t.paths[w]||{};s&&(y.headers.accept=s);const E=(e=>{const t={};e.forEach((e=>{t[e.in]||(t[e.in]={}),t[e.in][e.name]=e}));const r=[];return Object.keys(t).forEach((e=>{Object.keys(t[e]).forEach((s=>{r.push(t[e][s])}))})),r})([].concat(L_(b.parameters)).concat(L_(S.parameters)));E.forEach((e=>{const r=f[e.in];let s;if("body"===e.in&&e.schema&&e.schema.properties&&(s=m),s=e&&e.name&&m[e.name],void 0===s?s=e&&e.name&&m[`${e.in}.${e.name}`]:((e,t)=>t.filter((t=>t.name===e)))(e.name,E).length>1&&console.warn(`Parameter '${e.name}' is ambiguous because the defined spec has more than one parameter with the name: '${e.name}' and the passed-in parameter values did not define an 'in' value.`),null!==s){if(void 0!==e.default&&void 0===s&&(s=e.default),void 0===s&&e.required&&!e.allowEmptyValue)throw new Error(`Required parameter ${e.name} is not provided`);if(g&&e.schema&&"object"===e.schema.type&&"string"==typeof s)try{s=JSON.parse(s)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}r&&r({req:y,parameter:e,value:s,operation:b,spec:t,baseURL:$})}}));const k={...e,operation:b};if(y=g?function(e,t){const{operation:r,requestBody:s,securities:n,spec:i,attachContentTypeForEmptyPayload:o}=e;let{requestContentType:a}=e;t=function({request:e,securities:t={},operation:r={},spec:s}){var n;const i={...e},{authorized:o={}}=t,a=r.security||s.security||[],l=o&&!!Object.keys(o).length,c=(null==s||null===(n=s.components)||void 0===n?void 0:n.securitySchemes)||{};return i.headers=i.headers||{},i.query=i.query||{},Object.keys(t).length&&l&&a&&(!Array.isArray(r.security)||r.security.length)?(a.forEach((e=>{Object.keys(e).forEach((e=>{const t=o[e],r=c[e];if(!t)return;const s=t.value||t,{type:n}=r;if(t)if("apiKey"===n)"query"===r.in&&(i.query[r.name]=s),"header"===r.in&&(i.headers[r.name]=s),"cookie"===r.in&&(i.cookies[r.name]=s);else if("http"===n){if(/^basic$/i.test(r.scheme)){const e=s.username||"",t=s.password||"",r=M_(`${e}:${t}`);i.headers.Authorization=`Basic ${r}`}/^bearer$/i.test(r.scheme)&&(i.headers.Authorization=`Bearer ${s}`)}else if("oauth2"===n||"openIdConnect"===n){const e=t.token||{},s=e[r["x-tokenName"]||"access_token"];let n=e.token_type;n&&"bearer"!==n.toLowerCase()||(n="Bearer"),i.headers.Authorization=`${n} ${s}`}}))})),i):e}({request:t,securities:n,operation:r,spec:i});const l=r.requestBody||{},c=Object.keys(l.content||{}),p=a&&c.indexOf(a)>-1;if(s||o){if(a&&p)t.headers["Content-Type"]=a;else if(!a){const e=c[0];e&&(t.headers["Content-Type"]=e,a=e)}}else a&&p&&(t.headers["Content-Type"]=a);if(!e.responseContentType&&r.responses){const e=Object.entries(r.responses).filter((([e,t])=>{const r=parseInt(e,10);return r>=200&&r<300&&qg(t.content)})).reduce(((e,[,t])=>e.concat(Object.keys(t.content))),[]);e.length>0&&(t.headers.accept=e.join(", "))}if(s)if(a){if(c.indexOf(a)>-1)if("application/x-www-form-urlencoded"===a||"multipart/form-data"===a)if("object"==typeof s){var u,d;const e=null!==(u=null===(d=l.content[a])||void 0===d?void 0:d.encoding)&&void 0!==u?u:{};t.form={},Object.keys(s).forEach((r=>{let n;try{n=JSON.parse(s[r])}catch{n=s[r]}t.form[r]={value:n,encoding:e[r]||{}}}))}else if("string"==typeof s){var h,m;const e=null!==(h=null===(m=l.content[a])||void 0===m?void 0:m.encoding)&&void 0!==h?h:{};try{t.form={};const r=JSON.parse(s);Object.entries(r).forEach((([r,s])=>{t.form[r]={value:s,encoding:e[r]||{}}}))}catch{t.form=s}}else t.form=s;else t.body=s}else t.body=s;return t}(k,y):function(e,t){const{spec:r,operation:s,securities:n,requestContentType:i,responseContentType:o,attachContentTypeForEmptyPayload:a}=e;if(t=function({request:e,securities:t={},operation:r={},spec:s}){const n={...e},{authorized:i={},specSecurity:o=[]}=t,a=r.security||o,l=i&&!!Object.keys(i).length,c=s.securityDefinitions;return n.headers=n.headers||{},n.query=n.query||{},Object.keys(t).length&&l&&a&&(!Array.isArray(r.security)||r.security.length)?(a.forEach((e=>{Object.keys(e).forEach((e=>{const t=i[e];if(!t)return;const{token:r}=t,s=t.value||t,o=c[e],{type:a}=o,l=o["x-tokenName"]||"access_token",p=r&&r[l];let u=r&&r.token_type;if(t)if("apiKey"===a){const e="query"===o.in?"query":"headers";n[e]=n[e]||{},n[e][o.name]=s}else if("basic"===a)if(s.header)n.headers.authorization=s.header;else{const e=s.username||"",t=s.password||"";s.base64=M_(`${e}:${t}`),n.headers.authorization=`Basic ${s.base64}`}else"oauth2"===a&&p&&(u=u&&"bearer"!==u.toLowerCase()?u:"Bearer",n.headers.authorization=`${u} ${p}`)}))})),n):e}({request:t,securities:n,operation:s,spec:r}),t.body||t.form||a)i?t.headers["Content-Type"]=i:Array.isArray(s.consumes)?[t.headers["Content-Type"]]=s.consumes:Array.isArray(r.consumes)?[t.headers["Content-Type"]]=r.consumes:s.parameters&&s.parameters.filter((e=>"file"===e.type)).length?t.headers["Content-Type"]="multipart/form-data":s.parameters&&s.parameters.filter((e=>"formData"===e.in)).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(i){const e=s.parameters&&s.parameters.filter((e=>"body"===e.in)).length>0,r=s.parameters&&s.parameters.filter((e=>"formData"===e.in)).length>0;(e||r)&&(t.headers["Content-Type"]=i)}return!o&&Array.isArray(s.produces)&&s.produces.length>0&&(t.headers.accept=s.produces.join(", ")),t}(k,y),y.cookies&&Object.keys(y.cookies).length){const e=Object.keys(y.cookies).reduce(((e,t)=>{const r=y.cookies[t];return e+(e?"&":"")+t_(t,r)}),"");y.headers.Cookie=e}return y.cookies&&delete y.cookies,Lt(y)}const U_=e=>e?e.replace(/\W/g,""):null;function z_(e){return $k(e.spec)?function({spec:e,pathName:t,method:r,server:s,contextUrl:n,serverVariables:i={},serverVariableEncoder:o}){var a,l;let c,p=[],u="";const d=null==e||null===(a=e.paths)||void 0===a||null===(a=a[t])||void 0===a||null===(a=a[(r||"").toLowerCase()])||void 0===a?void 0:a.servers,h=null==e||null===(l=e.paths)||void 0===l||null===(l=l[t])||void 0===l?void 0:l.servers,m=null==e?void 0:e.servers;if(p=H_(d)?d:H_(h)?h:H_(m)?m:[vt],s&&(c=p.find((e=>e.url===s)),c&&(u=s)),u||([c]=p,u=c.url),((e,{strict:t=!1}={})=>{try{const r=m_(e);if(!r.result.success)return!1;const s=[];r.ast.translate(s);const n=s.some((([e])=>"server-variable"===e));if(!t&&!n)try{return new URL(e,"https://vladimirgorej.com"),!0}catch{return!1}return!t||n}catch{return!1}})(u,{strict:!0})){const e=Object.entries({...c.variables}).reduce(((e,[t,r])=>(e[t]=r.default,e)),{});u=((e,t,r={})=>{const s={encoder:f_,...r},n=m_(e);if(!n.result.success)return e;const i=[];n.ast.translate(i);const o=i.filter((([e])=>g_.includes(e))).map((([e,r])=>"server-variable-name"===e?Object.hasOwn(t,r)?s.encoder(t[r],r):`{${r}}`:r));return o.join("")})(u,{...e,...i},{encoder:"function"==typeof o?o:mf})}return function(e="",t=""){const r=D_(e&&t?_y(t,e):e),s=D_(t),n=U_(r.protocol)||U_(s.protocol),i=r.host||s.host,o=r.pathname;let a;return a=n&&i?`${n}://${i+o}`:o,"/"===a[a.length-1]?a.slice(0,-1):a}(u,n)}(e):function({spec:e,scheme:t,contextUrl:r=""}){const s=D_(r),n=Array.isArray(e.schemes)?e.schemes[0]:null,i=t||n||U_(s.protocol)||"http",o=e.host||s.host||"",a=e.basePath||"";let l;return l=i&&o?`${i}://${o+a}`:a,"/"===l[l.length-1]?l.slice(0,-1):l}(e)}const H_=e=>Array.isArray(e)&&e.length>0;function V_(e,t={}){if("string"==typeof e?t.url=e:t=e,!(this instanceof V_))return new V_(t);Object.assign(this,t);const r=this.resolve().then((()=>(this.disableInterfaces||Object.assign(this,V_.makeApisTagOperation(this)),this)));return r.client=this,r}function W_(e){const t=(e=e.replace("[]","Array")).split("/");return t[0]=t[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),t.join("/")}V_.http=Xs,V_.makeHttp=function(e,t,r){return r=r||(e=>e),t=t||(e=>e),s=>("string"==typeof s&&(s={url:s}),s=Lt(s),s=t(s),r(e(s)))}.bind(null,V_.http),V_.resolveStrategies={"openapi-3-1-apidom":JI,"openapi-3-0":Ek,"openapi-2-0":Sk,generic:vk},V_.resolve=kk({strategies:[V_.resolveStrategies["openapi-3-1-apidom"],V_.resolveStrategies["openapi-3-0"],V_.resolveStrategies["openapi-2-0"],V_.resolveStrategies.generic]}),V_.resolveSubtree=(e=>async(t,r,s={})=>(async(e,t,r={})=>{const{returnEntireTree:s,baseDoc:n,requestInterceptor:i,responseInterceptor:o,parameterMacro:a,modelPropertyMacro:l,useCircularStructures:c,strategies:p}=r,u={spec:e,pathDiscriminator:t,baseDoc:n,requestInterceptor:i,responseInterceptor:o,parameterMacro:a,modelPropertyMacro:l,useCircularStructures:c,strategies:p},d=p.find((t=>t.match(e))).normalize(e),h=await Ak({spec:d,...u,allowMetaPatches:!0,skipNormalization:!wk(e)});return!s&&Array.isArray(t)&&t.length&&(h.spec=t.reduce(((e,t)=>null==e?void 0:e[t]),h.spec)||null),h})(t,r,{...e,...s}))({strategies:[V_.resolveStrategies["openapi-3-1-apidom"],V_.resolveStrategies["openapi-3-0"],V_.resolveStrategies["openapi-2-0"],V_.resolveStrategies.generic]}),V_.execute=function({http:e,fetch:t,spec:r,operationId:s,pathName:n,method:i,parameters:o,securities:a,...l}){const c=e||t||Xs;n&&i&&!s&&(s=YI(n,i));const p=q_.buildRequest({spec:r,operationId:s,parameters:o,securities:a,http:c,...l});return p.body&&(qg(p.body)||Array.isArray(p.body))&&(p.body=JSON.stringify(p.body)),c(p)},V_.serializeRes=Ys,V_.serializeHeaders=Ks,V_.clearCache=function(){hk.refs.clearCache()},V_.makeApisTagOperation=function(e={}){const t=e_(e);return{apis:QI({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},V_.buildRequest=N_,V_.helpers={opId:gk},V_.getBaseUrl=z_,V_.apidom={resolve:{resolvers:{HTTPResolverSwaggerClient:hI}},parse:{parsers:{JsonParser:mI,YamlParser:fI,OpenApiJson3_1Parser:gI,OpenApiYaml3_1Parser:yI}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:HI}}},V_.prototype={http:Xs,execute(e){return this.applyDefaults(),V_.execute({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:"string"==typeof this.url?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,...e})},resolve(e={}){return V_.resolve({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1,...e}).then((e=>(this.originalSpec=this.spec,this.spec=e.spec,this.errors=e.errors,this)))}},V_.prototype.applyDefaults=function(){const{spec:e}=this,t=this.url;if(bk(e)&&XI(t)){const r=new URL(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}else if($k(e)){const t=Array.isArray(e.servers)&&0===e.servers.length;e.servers&&!t||(e.servers=[vt])}};const G_={parameterTypeProperties:["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],arrayProperties:["items","minItems","maxItems","uniqueItems"],httpMethods:["get","post","put","delete","patch","head","options","trace"],uniqueOnly:function(e,t,r){return r.indexOf(e)===t},createHash:function(e){let t,r=0;if(0===e.length)return r;for(let s=0;s<e.length;s++)t=e.charCodeAt(s),r=(r<<5)-r+t,r|=0;return r},sanitise:W_,sanitiseAll:function(e){return W_(e.split("/").join("_"))},camelize:function(e){return e.toLowerCase().replace(/[-_ \/\.](.)/g,((e,t)=>t.toUpperCase()))},clone:function(e){return JSON.parse(JSON.stringify(e))},circularClone:function e(t,r=null){if(r||(r=new WeakMap),Object(t)!==t||t instanceof Function)return t;if(r.has(t))return r.get(t);let s;try{s=new t.constructor}catch(e){s=Object.create(Object.getPrototypeOf(t))}return r.set(t,s),Object.assign(s,...Object.keys(t).map((s=>({[s]:e(t[s],r)}))))}};function J_(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}const K_={getDefaultState:J_,walkSchema:function e(t,r,s,n){if(void 0===s.depth&&(s=J_()),null==t)return t;if(s.combine&&(t.allOf&&Array.isArray(t.allOf)&&1===t.allOf.length&&delete(t={...t.allOf[0],...t})?.allOf,t?.anyOf&&Array.isArray(t.anyOf)&&1===t.anyOf.length&&delete(t={...t.anyOf[0],...t})?.anyOf,t?.oneOf&&Array.isArray(t.oneOf)&&1===t.oneOf.length&&delete(t={...t.oneOf[0],...t})?.oneOf),n(t,r,s),s.seen.has(t))return t;if("object"==typeof t&&null!==t&&s.seen.set(t,!0),s.top=!1,s.depth++,void 0!==t?.items&&(s.property="items",e(t.items,t,s,n)),t?.additionalItems&&"object"==typeof t.additionalItems&&(s.property="additionalItems",e(t.additionalItems,t,s,n)),t?.additionalProperties&&"object"==typeof t.additionalProperties&&(s.property="additionalProperties",e(t.additionalProperties,t,s,n)),t?.properties)for(const r in t.properties){const i=t.properties[r];s.property=`properties/${r}`,e(i,t,s,n)}if(t?.patternProperties)for(const r in t.patternProperties){const i=t.patternProperties[r];s.property=`patternProperties/${r}`,e(i,t,s,n)}if(t?.allOf)for(const r in t.allOf){const i=t.allOf[r];s.property=`allOf/${r}`,e(i,t,s,n)}if(t?.anyOf)for(const r in t.anyOf){const i=t.anyOf[r];s.property=`anyOf/${r}`,e(i,t,s,n)}if(t?.oneOf)for(const r in t.oneOf){const i=t.oneOf[r];s.property=`oneOf/${r}`,e(i,t,s,n)}return t?.not&&(s.property="not",e(t.not,t,s,n)),s.depth--,t}};function Y_(e,t,r){if(t||(t={depth:0}),t.depth||(t={path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1,...t}),"object"!=typeof e)return;const s=t.path;for(const n in e){if(t.key=n,t.path=`${t.path}/${encodeURIComponent(n)}`,t.identityPath=t.seen.get(e[n]),t.identity=void 0!==t.identityPath,e.hasOwnProperty(n)&&r(e,n,t),"object"==typeof e[n]&&!t.identity){t.identityDetection&&!Array.isArray(e[n])&&null!==e[n]&&t.seen.set(e[n],t.path);const s={};s.parent=e,s.path=t.path,s.depth=t.depth?t.depth+1:1,s.pkey=n,s.payload=t.payload,s.seen=t.seen,s.identity=!1,s.identityDetection=t.identityDetection,Y_(e[n],s,r)}t.path=s}}let X_;function Z_(e,t){for(const r in e)r.startsWith("x-")&&!r.startsWith("x-s2o")&&(t[r]=e[r])}function Q_(e,t){K_.walkSchema(e,{},{},((e,r)=>{!function(e){if(e["x-required"]&&Array.isArray(e["x-required"])&&(e.required||(e.required=[]),e.required=e.required.concat(e["x-required"]),delete e["x-required"]),e["x-anyOf"]&&(e.anyOf=e["x-anyOf"],delete e["x-anyOf"]),e["x-oneOf"]&&(e.oneOf=e["x-oneOf"],delete e["x-oneOf"]),e["x-not"]&&(e.not=e["x-not"],delete e["x-not"]),"boolean"==typeof e["x-nullable"]&&(e.nullable=e["x-nullable"],delete e["x-nullable"]),"object"==typeof e["x-discriminator"]&&"string"==typeof e["x-discriminator"].propertyName){e.discriminator=e["x-discriminator"],delete e["x-discriminator"];for(const t in e.discriminator.mapping){const r=e.discriminator.mapping[t];r.startsWith("#/definitions/")&&(e.discriminator.mapping[t]=r.replace("#/definitions/","#/components/schemas/"))}}}(e),function(e,t,r){if(e.nullable&&r.patches++,e.discriminator&&"string"==typeof e.discriminator&&(e.discriminator={propertyName:e.discriminator}),e.items&&Array.isArray(e.items)&&(0===e.items.length?e.items={}:1===e.items.length?e.items=e.items[0]:e.items={anyOf:e.items}),e.type&&Array.isArray(e.type)){if(r.patches++,r.warnings.push("(Patchable) schema type must not be an array"),0===e.type.length)delete e.type;else{e.oneOf||(e.oneOf=[]);for(const t of e.type){const r={};if("null"===t)e.nullable=!0;else{r.type=t;for(const t of G_.arrayProperties)void 0!==e.prop&&(r[t]=e[t],delete e[t])}r.type&&e.oneOf.push(r)}delete e.type,0===e.oneOf.length?delete e.oneOf:e.oneOf.length<2&&(e.type=e.oneOf[0].type,Object.keys(e.oneOf[0]).length>1&&(r.patches++,r.warnings.push("Lost properties from oneOf")),delete e.oneOf)}e.type&&Array.isArray(e.type)&&1===e.type.length&&(e.type=e.type[0])}e.type&&"null"===e.type&&(delete e.type,e.nullable=!0),"array"!==e.type||e.items||(e.items={}),"file"===e.type&&(e.type="string",e.format="binary"),"boolean"==typeof e.required&&(e.required&&e.name&&(void 0===t.required&&(t.required=[]),Array.isArray(t.required)&&t.required.push(e.name)),delete e.required),e.xml&&"string"==typeof e.xml.namespace&&(e.xml.namespace||delete e.xml.namespace),e.allowEmptyValue&&(delete e.allowEmptyValue,r.patches++,r.warnings.push("(Patchable): deleted schema.allowEmptyValue"))}(e,r,t)}))}function eR(e){for(const t in e)for(const r in e[t]){const s=G_.sanitise(r);r!==s&&(e[t][s]=e[t][r],delete e[t][r])}}function tR(e,t){if("basic"===e.type&&(e.type="http",e.scheme="basic"),"oauth2"===e.type){const r={};let s=e.flow;"application"===e.flow&&(s="clientCredentials"),"accessCode"===e.flow&&(s="authorizationCode"),"string"==typeof e.authorizationUrl&&(r.authorizationUrl=e.authorizationUrl.split("?")[0].trim()||"/"),"string"==typeof e.tokenUrl&&(r.tokenUrl=e.tokenUrl.split("?")[0].trim()||"/"),r.scopes=e.scopes||{},e.flows={},e.flows[s]=r,delete e.flow,delete e.authorizationUrl,delete e.tokenUrl,delete e.scopes,e.name&&(delete e.name,t.patches++,t.warnings.push("(Patchable) oauth2 securitySchemes should not have name property"))}}function rR(e){return e&&!e["x-s2o-delete"]}function sR(e,t){if(e.type&&!e.schema&&(e.schema={}),e.type&&(e.schema.type=e.type),e.items&&"array"!==e.items.type){if(e.items.collectionFormat!==e.collectionFormat)return t.errCount++,void t.errors.push({message:"Nested collectionFormats are not supported",pointer:"/.../responses/header"});delete e.items.collectionFormat}"array"===e.type?("ssv"===e.collectionFormat?(t.patches++,t.warnings.push("collectionFormat:ssv is no longer supported for headers")):"pipes"===e.collectionFormat?(t.patches++,t.warnings.push("collectionFormat:pipes is no longer supported for headers")):"multi"===e.collectionFormat?e.explode=!0:"tsv"===e.collectionFormat?(e["x-collectionFormat"]="tsv",t.patches++,t.warnings.push("collectionFormat:tsv is no longer supported")):e.style="simple",delete e.collectionFormat):e.collectionFormat&&(delete e.collectionFormat,t.patches++,t.warnings.push("(Patchable) collectionFormat is only applicable to header.type array")),delete e.type;for(const t of G_.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t]);for(const t of G_.arrayProperties)void 0!==e[t]&&(e.schema[t]=e[t],delete e[t])}function nR(e,t,r,s,n,i,o){const a={};let l,c=!0;t&&t.consumes&&"string"==typeof t.consumes&&(t.consumes=[t.consumes],o.patches++,o.warnings.push("(Patchable) operation.consumes must be an array")),Array.isArray(i.consumes)||delete i.consumes;const p=((t?t.consumes:null)||i.consumes||[]).filter(G_.uniqueOnly);if(e&&(e.name||e.in)){"boolean"==typeof e["x-deprecated"]&&(e.deprecated=e["x-deprecated"],delete e["x-deprecated"]),void 0!==e["x-example"]&&(e.example=e["x-example"],delete e["x-example"]),"body"===e.in||e.type||(e.type="string",o.patches++,o.warnings.push("(Patchable) parameter.type is mandatory for non-body parameters")),"file"===e.type&&(e["x-s2o-originalType"]=e.type,l=e.type),null===e.description&&delete e.description;let t=e.collectionFormat;if("array"!==e.type||t||(t="csv"),t&&("array"!==e.type&&(delete e.collectionFormat,o.patches++,o.warnings.push("(Patchable) collectionFormat is only applicable to param.type array")),"csv"!==t||"query"!==e.in&&"cookie"!==e.in||(e.style="form",e.explode=!1),"csv"!==t||"path"!==e.in&&"header"!==e.in||(e.style="simple"),"ssv"===t&&("query"===e.in?e.style="spaceDelimited":o.warnings.push(`${e.name} collectionFormat:ssv is no longer supported except for in:query parameters`)),"pipes"===t&&("query"===e.in?e.style="pipeDelimited":o.warnings.push(`${e.name} collectionFormat:pipes is no longer supported except for in:query parameters`)),"multi"===t&&(e.explode=!0),"tsv"===t&&(o.warnings.push("collectionFormat:tsv is no longer supported"),e["x-collectionFormat"]="tsv"),delete e.collectionFormat),e.type&&"body"!==e.type&&"formData"!==e.in)if(e.items&&e.schema)o.warnings.push(`${e.name} parameter has array,items and schema`);else{e.schema&&o.patches++,e.schema&&"object"==typeof e.schema||(e.schema={}),e.schema.type=e.type,e.items&&(e.schema.items=e.items,delete e.items,Y_(e.schema.items,null,((r,s)=>{"collectionFormat"===s&&"string"==typeof r[s]&&(t&&r[s]!==t&&o.warnings.push(`${e.name} Nested collectionFormats are not supported`),delete r[s])})));for(const t of G_.parameterTypeProperties)void 0!==e[t]&&(e.schema[t]=e[t]),delete e[t]}e.schema&&Q_(e.schema,o),e["x-ms-skip-url-encoding"]&&"query"===e.in&&(e.allowReserved=!0,delete e["x-ms-skip-url-encoding"])}if(e&&"formData"===e.in){c=!1,a.content={};let t="application/x-www-form-urlencoded";if(p.length&&p.indexOf("multipart/form-data")>=0&&(t="multipart/form-data"),a.content[t]={},e.schema)a.content[t].schema=e.schema;else{a.content[t].schema={},a.content[t].schema.type="object",a.content[t].schema.properties={},a.content[t].schema.properties[e.name]={};const r=a.content[t].schema,s=a.content[t].schema.properties[e.name];e.description&&(s.description=e.description),e.example&&(s.example=e.example),e.type&&(s.type=e.type);for(const t of G_.parameterTypeProperties)void 0!==e[t]&&(s[t]=e[t]);!0===e.required&&(r.required||(r.required=[]),r.required.push(e.name),a.required=!0),void 0!==e.default&&(s.default=e.default),s.properties&&(s.properties=e.properties),e.allOf&&(s.allOf=e.allOf),"array"===e.type&&e.items&&(s.items=e.items,s.items.collectionFormat&&delete s.items.collectionFormat),"file"!==l&&"file"!==e["x-s2o-originalType"]||(s.type="string",s.format="binary"),Z_(e,s)}}else e&&"file"===e.type&&(e.required&&(a.required=e.required),a.content={},a.content["application/octet-stream"]={},a.content["application/octet-stream"].schema={},a.content["application/octet-stream"].schema.type="string",a.content["application/octet-stream"].schema.format="binary",Z_(e,a));if(e&&"body"===e.in){a.content={},e.name&&(a["x-s2o-name"]=(t&&t.operationId?G_.sanitiseAll(t.operationId):"")+G_.camelize(`_${e.name}`)),e.description&&(a.description=e.description),e.required&&(a.required=e.required),p.length||p.push("application/json");for(const t of p)a.content[t]={},a.content[t].schema=G_.clone(e.schema||{}),Q_(a.content[t].schema,o);Z_(e,a)}if(Object.keys(a).length>0&&(e["x-s2o-delete"]=!0,t))if(t.requestBody&&c){t.requestBody["x-s2o-overloaded"]=!0;const e=t.operationId||n;o.warnings.push(`Operation ${e} has multiple requestBodies`)}else t.requestBody||(t=function(e,t){const r={};for(const s of Object.keys(e))r[s]=e[s],"parameters"===s&&(r.requestBody={},t.rbname&&(r[t.rbname]=""));return r.requestBody={},r}(t,o),r[s]=t),t.requestBody.content&&t.requestBody.content["multipart/form-data"]&&t.requestBody.content["multipart/form-data"].schema&&t.requestBody.content["multipart/form-data"].schema.properties&&a.content["multipart/form-data"]&&a.content["multipart/form-data"].schema&&a.content["multipart/form-data"].schema.properties?(t.requestBody.content["multipart/form-data"].schema.properties=Object.assign(t.requestBody.content["multipart/form-data"].schema.properties,a.content["multipart/form-data"].schema.properties),t.requestBody.content["multipart/form-data"].schema.required=(t.requestBody.content["multipart/form-data"].schema.required||[]).concat(a.content["multipart/form-data"].schema.required||[]),t.requestBody.content["multipart/form-data"].schema.required.length||delete t.requestBody.content["multipart/form-data"].schema.required):t.requestBody.content&&t.requestBody.content["application/x-www-form-urlencoded"]&&t.requestBody.content["application/x-www-form-urlencoded"].schema&&t.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&a.content["application/x-www-form-urlencoded"]&&a.content["application/x-www-form-urlencoded"].schema&&a.content["application/x-www-form-urlencoded"].schema.properties?(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(t.requestBody.content["application/x-www-form-urlencoded"].schema.properties,a.content["application/x-www-form-urlencoded"].schema.properties),t.requestBody.content["application/x-www-form-urlencoded"].schema.required=(t.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(a.content["application/x-www-form-urlencoded"].schema.required||[]),t.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete t.requestBody.content["application/x-www-form-urlencoded"].schema.required):(t.requestBody=Object.assign(t.requestBody,a),t.requestBody["x-s2o-name"]||t.operationId&&(t.requestBody["x-s2o-name"]=G_.sanitiseAll(t.operationId)));if(e&&!e["x-s2o-delete"]){delete e.type;for(const t of G_.parameterTypeProperties)delete e[t];"path"!==e.in||void 0!==e.required&&!0===e.required||(e.required=!0,o.patches++,o.warnings.push(`(Patchable) path parameters must be required:true [${e.name} in ${n}]`))}return t}function iR(e,t,r,s){if(!e)return!1;if(e.description||"object"!=typeof e||Array.isArray(e)||(s.patches++,s.warnings.push("(Patchable) response.description is mandatory")),void 0!==e.schema){Q_(e.schema,s),t&&t.produces&&"string"==typeof t.produces&&(t.produces=[t.produces],s.patches++,s.warnings.push("(Patchable) operation.produces must be an array")),r.produces&&!Array.isArray(r.produces)&&delete r.produces;const n=((t?t.produces:null)||r.produces||[]).filter(G_.uniqueOnly);n.length||n.push("*/*"),e.content={};for(const t of n){if(e.content[t]={},e.content[t].schema=G_.clone(e.schema),e.examples&&e.examples[t]){const r={};r.value=e.examples[t],e.content[t].examples={},e.content[t].examples.response=r,delete e.examples[t]}"file"===e.content[t].schema.type&&(e.content[t].schema={type:"string",format:"binary"})}delete e.schema}for(const t in e.examples)e.content||(e.content={}),e.content[t]||(e.content[t]={}),e.content[t].examples={},e.content[t].examples.response={},e.content[t].examples.response.value=e.examples[t];if(delete e.examples,e.headers)for(const t in e.headers)"status code"===t.toLowerCase()?(delete e.headers[t],s.patches++,s.warnings.push('(Patchable) "Status Code" is not a valid header')):sR(e.headers[t],s)}function oR(e,t,r,s,n){for(const i in e){const o=e[i];o&&o["x-trace"]&&"object"==typeof o["x-trace"]&&(o.trace=o["x-trace"],delete o["x-trace"]),o&&o["x-summary"]&&"string"==typeof o["x-summary"]&&(o.summary=o["x-summary"],delete o["x-summary"]),o&&o["x-description"]&&"string"==typeof o["x-description"]&&(o.description=o["x-description"],delete o["x-description"]),o&&o["x-servers"]&&Array.isArray(o["x-servers"])&&(o.servers=o["x-servers"],delete o["x-servers"]);for(const e in o)if(G_.httpMethods.indexOf(e)>=0||"x-amazon-apigateway-any-method"===e){let a=o[e];if(a&&a.parameters&&Array.isArray(a.parameters)){if(o.parameters)for(const t of o.parameters)a.parameters.find((e=>e.name===t.name&&e.in===t.in))||"formData"!==t.in&&"body"!==t.in&&"file"!==t.type||(a=nR(t,a,o,e,i,n,r));for(const t of a.parameters)a=nR(t,a,o,e,`${e}: ${i}`,n,r);a.parameters&&(a.parameters=a.parameters.filter(rR))}if(a&&a.security&&eR(a.security),"object"==typeof a){if(!a.responses){const e={description:"Default response"};a.responses={default:e}}for(const e in a.responses)iR(a.responses[e],a,n,r)}if(a&&a["x-servers"]&&Array.isArray(a["x-servers"]))a.servers=a["x-servers"],delete a["x-servers"];else if(a&&a.schemes&&a.schemes.length)for(const e of a.schemes)if((!n.schemes||n.schemes.indexOf(e)<0)&&(a.servers||(a.servers=[]),Array.isArray(n.servers)))for(const e of n.servers){const t=G_.clone(e);a.servers.push(t)}if(a){if(delete a.consumes,delete a.produces,delete a.schemes,a["x-ms-examples"]){for(const e in a["x-ms-examples"]){const t=a["x-ms-examples"][e],r=G_.sanitiseAll(e);if(t.parameters)for(const r in t.parameters){const s=t.parameters[r];for(const t of(a.parameters||[]).concat(o.parameters||[]))t.name!==r||t.example||(t.examples||(t.examples={}),t.examples[e]={value:s})}if(t.responses)for(const s in t.responses){if(t.responses[s].headers)for(const e in t.responses[s].headers){const r=t.responses[s].headers[e];for(const t in a.responses[s].headers)t===e&&(a.responses[s].headers[t].example=r)}if(t.responses[s].body&&(n.components.examples[r]={value:G_.clone(t.responses[s].body)},a.responses[s]&&a.responses[s].content))for(const t in a.responses[s].content){const n=a.responses[s].content[t];n.examples||(n.examples={}),n.examples[e]={$ref:`#/components/examples/${r}`}}}}delete a["x-ms-examples"]}if(a.parameters&&0===a.parameters.length&&delete a.parameters,a.requestBody){const r=a.operationId?G_.sanitiseAll(a.operationId):G_.camelize(G_.sanitiseAll(e+i)),n=G_.sanitise(a.requestBody["x-s2o-name"]||r||"");delete a.requestBody["x-s2o-name"];const o=JSON.stringify(a.requestBody),l=G_.createHash(o);if(!s[l]){const e={};e.name=n,e.body=a.requestBody,e.refs=[],s[l]=e}const c=`#/${t}/${encodeURIComponent(i)}/${e}/requestBody`;s[l].refs.push(c)}}}if(o&&o.parameters){for(const e in o.parameters)nR(o.parameters[e],null,o,null,i,n,r);Array.isArray(o.parameters)&&(o.parameters=o.parameters.filter(rR))}}}function aR(e){return e&&e.url&&"string"==typeof e.url?(e.url=e.url.split("{{").join("{"),e.url=e.url.split("}}").join("}"),e.url.replace(/\{(.+?)\}/g,((t,r)=>{e.variables||(e.variables={}),e.variables[r]={default:"unknown"}})),e):e}function lR(e,t){void 0!==e.info&&null!==e.info||(e.info={version:"",title:""},t.patches++,t.warnings.push("(Patchable) info object is mandatory")),("object"!=typeof e.info||Array.isArray(e.info))&&(t.errCount++,t.errors.push({message:"info must be an object",pointer:"/info"})),e.info&&(void 0===e.info.title&&(t.patches++,e.info.title="",t.warnings.push({message:"(Patchable) info.title cannot be null",pointer:"/info/title",patchable:!0})),void 0===e.info.version?(t.patches++,e.info.version="",t.warnings.push("(Patchable) info.version cannot be null")):"string"!=typeof e.info.version&&(t.patches++,e.info.version=e.info.version.toString(),t.warnings.push("(Patchable) info.version must be a string")))}function cR(e,t){e.paths||(t.patches++,e.paths={},t.warnings.push("(Patchable) paths object is mandatory"))}function pR(e={}){const t={original:e,openapi:{},patches:0,warnings:[],errCount:0,errors:[]};if(e.openapi&&"string"==typeof e.openapi&&e.openapi.startsWith("3."))return t.openapi=G_.circularClone(e),lR(t.openapi,t),cR(t.openapi,t),t;if("2.0"!==e.swagger)return t.errCount++,t.errors.push({message:`Unsupported swagger/OpenAPI version: ${e.openapi?e.openapi:e.swagger}`,pointer:"/swagger"}),t;if(t.openapi=G_.circularClone(e),t.openapi.openapi="3.0.0",delete t.openapi.swagger,Y_(t.openapi,{},((e,t,r)=>{null===e[t]&&!t.startsWith("x-")&&"default"!==t&&r.path.indexOf("/example")<0&&delete e[t]})),e.host)(e.schemes||[]).forEach((r=>{const s={},n=(e.basePath||"").replace(/\/$/,"");s.url=`${r?`${r}:`:""}//${e.host}${n}`,aR(s),t.openapi.servers||(t.openapi.servers=[]),t.openapi.servers.push(s)}));else if(e.basePath){const r={};r.url=e.basePath,aR(r),t.openapi.servers||(t.openapi.servers=[]),t.openapi.servers.push(r)}if(delete t.openapi.host,delete t.openapi.basePath,e["x-ms-parameterized-host"]){const r=e["x-ms-parameterized-host"],s={};s.url=r.hostTemplate+(e.basePath?e.basePath:""),s.variables={};const n=s.url.match(/\{\w+\}/g);for(const e in r.parameters){const t=r.parameters[e];e.startsWith("x-")||(delete t.required,delete t.type,delete t.in,void 0===t.default&&(t.enum?t.default=t.enum[0]:t.default="none"),t.name||(t.name=n[e].replace("{","").replace("}","")),s.variables[t.name]=t,delete t.name)}t.openapi.servers||(t.openapi.servers=[]),!1===r.useSchemePrefix?t.openapi.servers.push(s):e.schemes.forEach((e=>{t.openapi.servers.push({...s,url:`${e}://${s.url}`})})),delete t.openapi["x-ms-parameterized-host"]}return lR(t.openapi,t),cR(t.openapi,t),"string"==typeof t.openapi.consumes&&(t.openapi.consumes=[t.openapi.consumes]),"string"==typeof t.openapi.produces&&(t.openapi.produces=[t.openapi.produces]),t.openapi.components={},t.openapi["x-callbacks"]&&(t.openapi.components.callbacks=t.openapi["x-callbacks"],delete t.openapi["x-callbacks"]),t.openapi.components.examples={},t.openapi.components.headers={},t.openapi["x-links"]&&(t.openapi.components.links=t.openapi["x-links"],delete t.openapi["x-links"]),t.openapi.components.parameters=t.openapi.parameters||{},t.openapi.components.responses=t.openapi.responses||{},t.openapi.components.requestBodies={},t.openapi.components.securitySchemes=t.openapi.securityDefinitions||{},t.openapi.components.schemas=t.openapi.definitions||{},delete t.openapi.definitions,delete t.openapi.responses,delete t.openapi.parameters,delete t.openapi.securityDefinitions,function(e){const t=e.openapi,r={};X_={schemas:{}},t.security&&eR(t.security);for(const r in t.components.securitySchemes){const s=G_.sanitise(r);if(r!==s){if(t.components.securitySchemes[s])return e.errCount++,e.errors.push({message:`Duplicate sanitised securityScheme name ${s}`,pointer:`/components/securitySchemes/${s}`}),e;t.components.securitySchemes[s]=t.components.securitySchemes[r],delete t.components.securitySchemes[r]}tR(t.components.securitySchemes[s],e)}for(const r in t.components.schemas){const s=G_.sanitiseAll(r);let n=0;if(r!==s){for(;t.components.schemas[s+n];)n=n?++n:2;t.components.schemas[s+n]=t.components.schemas[r],delete t.components.schemas[r]}X_.schemas[r]=s+n,Q_(t.components.schemas[`${s}${n}`],e)}for(const r in t.components.parameters){const s=G_.sanitise(r);if(r!==s){if(t.components.parameters[s])return e.errCount++,e.errors.push({message:`Duplicate sanitised parameter name ${s}`,pointer:`/components/parameters/${s}`}),e;t.components.parameters[s]=t.components.parameters[r],delete t.components.parameters[r]}nR(t.components.parameters[s],null,null,null,s,t,e)}for(const r in t.components.responses){const s=G_.sanitise(r);if(r!==s){if(t.components.responses[s])return e.errCount++,e.errors.push({message:`Duplicate sanitised response name ${s}`,pointer:`/components/responses/${s}`}),e;t.components.responses[s]=t.components.responses[r],delete t.components.responses[r]}const n=t.components.responses[s];if(iR(n,null,t,e),n.headers)for(const t in n.headers)"status code"===t.toLowerCase()?(delete n.headers[t],e.patches++,e.warnings.push('(Patchable) "Status Code" is not a valid header')):sR(n.headers[t],e)}for(const e in t.components.requestBodies){const s=t.components.requestBodies[e],n=JSON.stringify(s),i=G_.createHash(n),o={};o.name=e,o.body=s,o.refs=[],r[i]=o}oR(t.paths,"paths",e,r,t),t["x-ms-paths"]&&oR(t["x-ms-paths"],"x-ms-paths",e,r,t);for(const e in t.components.parameters)t.components.parameters[e]["x-s2o-delete"]&&delete t.components.parameters[e];return delete t.consumes,delete t.produces,delete t.schemes,t.components.requestBodies={},t.components.responses&&0===Object.keys(t.components.responses).length&&delete t.components.responses,t.components.parameters&&0===Object.keys(t.components.parameters).length&&delete t.components.parameters,t.components.examples&&0===Object.keys(t.components.examples).length&&delete t.components.examples,t.components.requestBodies&&0===Object.keys(t.components.requestBodies).length&&delete t.components.requestBodies,t.components.securitySchemes&&0===Object.keys(t.components.securitySchemes).length&&delete t.components.securitySchemes,t.components.headers&&0===Object.keys(t.components.headers).length&&delete t.components.headers,t.components.schemas&&0===Object.keys(t.components.schemas).length&&delete t.components.schemas,t.components&&0===Object.keys(t.components).length&&delete t.components,e}(t)}function uR(e){return e.ok&&e.text&&e.parseError&&"YAMLException"===e.parseError.name&&(!e.headers["content-type"]||e.headers["content-type"].match("text/plain"))&&(e.body=e.text),e}const dR=function(e){return new Promise((async t=>{try{const r=await V_.resolve(e,uR);if(r.errors&&r.errors.length>0)t(r);else{r.spec.openapi&&(r.resolvedSpec=r.spec,t(r));const e=pR(r.spec);e.errors&&e.errors.length>0&&(Array.isArray(r.errors)?r.errors.concat(r.errors):r.errors=e.errors),e.warnings&&e.warnings.length>0&&(r.warnings=e.warnings),r.resolvedSpec=r.spec,r.spec=e.openapi,t(r)}}catch(e){t(e)}}))};async function hR(e,t=!1,r=!1,s=!1,n="",i="",o="",a="",l="",c="",p="",u=""){var d,h;let m;try{var f,g;let t;if(this.requestUpdate(),t="string"==typeof e?await dR({url:e,allowMetaPatches:!1}):await dR({spec:e,allowMetaPatches:!1}),await dt(0),null!==(f=t.resolvedSpec)&&void 0!==f&&f.jsonSchemaViewer&&null!==(g=t.resolvedSpec)&&void 0!==g&&g.schemaAndExamples){this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:t.resolvedSpec}}));const e=Object.entries(t.resolvedSpec.schemaAndExamples).map((e=>({show:!0,expanded:!0,selectedExample:null,name:e[0],elementId:e[0].replace(pt,"-"),...e[1]})));return{specLoadError:!1,isSpecLoading:!1,info:t.resolvedSpec.info,schemaAndExamples:e}}var y,v,b,x;if(!t.spec||!(t.spec.components||t.spec.info||t.spec.servers||t.spec.tags||t.spec.paths))return console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",t),{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:null!==(y=t.response)&&void 0!==y&&y.url?`${null===(v=t.response)||void 0===v?void 0:v.url} ┃ ${null===(b=t.response)||void 0===b?void 0:b.status} ${null===(x=t.response)||void 0===x?void 0:x.statusText}`:"Unable to load the Spec",version:" "},tags:[]};m=function(e,t="",r="",s=""){const n={},i=s.split(",").map((e=>e.trim().toLowerCase())).filter(Boolean);function o(e,s){if(!t)return!0;const n=`${s} ${e}`.toLowerCase();if("regex"===r){return new RegExp(t,"i").test(t.toLowerCase())}return n.includes(t.toLowerCase())}function a(e){return e.some((e=>i.includes(null==e?void 0:e.label.toLowerCase())))}return Object.entries(e.paths).forEach((([e,t])=>{const r={};Object.entries(t).forEach((([t,s])=>{const n=s["x-badges"];o(e,t)&&(n&&Array.isArray(n)&&a(n)||(r[t]=s))})),Object.keys(r).length>0&&(n[e]=r)})),e.paths=n,e}(t.spec,c,p,u),this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:m}}))}catch(e){console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",e)}const w=function(e,t,r=!1,s=!1){const n=["get","put","post","delete","patch","head","options"],i=e.tags&&Array.isArray(e.tags)&&e.tags.length>0?e.tags.map((e=>({show:!0,elementId:`tag--${e.name.replace(pt,"-")}`,name:e.name,displayName:e["x-displayName"]||e.name,description:e.description||"",headers:e.description?mR(e.description):[],paths:[],expanded:!1!==e["x-tag-expanded"]}))):[],o=e.paths||{};if(e.webhooks)for(const[t,r]of Object.entries(e.webhooks))r._type="webhook",o[t]=r;for(const t in o){const s=o[t].parameters,a={servers:o[t].servers||[],parameters:o[t].parameters||[]},l="webhook"===o[t]._type;n.forEach((n=>{if(o[t][n]){const o=e.paths[t][n],c=o.tags||[];if(0===c.length)if(r){const e=t.replace(/^\/+|\/+$/g,""),r=e.indexOf("/");-1===r?c.push(e):c.push(e.substring(0,r))}else c.push("General ⦂");c.forEach((r=>{let c,p;var u,d;(e.tags&&(p=e.tags.find((e=>e.name.toLowerCase()===r.toLowerCase()))),c=i.find((e=>e.name===r)),c)||(c={show:!0,elementId:`tag--${r.replace(pt,"-")}`,name:r,description:(null===(u=p)||void 0===u?void 0:u.description)||"",headers:null!==(d=p)&&void 0!==d&&d.description?mR(p.description):[],paths:[],expanded:!p||!1!==p["x-tag-expanded"]},i.push(c));let h=(o.summary||o.description||`${n.toUpperCase()} ${t}`).trim();h.length>100&&([h]=h.split(/[.|!|?]\s|[\r?\n]/));let m=[];if(m=s?o.parameters?s.filter((e=>{if(!o.parameters.some((t=>e.name===t.name&&e.in===t.in)))return e})).concat(o.parameters):s.slice(0):o.parameters?o.parameters.slice(0):[],o.callbacks)for(const[e,t]of Object.entries(o.callbacks)){const r=Object.entries(t).filter((e=>"object"==typeof e[1]))||[];o.callbacks[e]=Object.fromEntries(r)}c.paths.push({show:!0,expanded:!1,isWebhook:l,expandedAtLeastOnce:!1,summary:o.summary||"",description:o.description||"",externalDocs:o.externalDocs,shortSummary:h,method:n,path:t,operationId:o.operationId,elementId:`${n}-${t.replace(pt,"-")}`,servers:o.servers?a.servers.concat(o.servers):a.servers,parameters:m,requestBody:o.requestBody,responses:o.responses,callbacks:o.callbacks,deprecated:o.deprecated,security:o.security,xBadges:o["x-badges"]||void 0,xCodeSamples:o["x-codeSamples"]||o["x-code-samples"]||""})}))}}))}const a=i.filter((e=>e.paths&&e.paths.length>0));return a.forEach((e=>{"method"===t?e.paths.sort(((e,t)=>n.indexOf(e.method).toString().localeCompare(n.indexOf(t.method)))):"summary"===t?e.paths.sort(((e,t)=>e.shortSummary.localeCompare(t.shortSummary))):"path"===t&&e.paths.sort(((e,t)=>e.path.localeCompare(t.path))),e.firstPathId=e.paths[0].elementId})),s?a.sort(((e,t)=>e.name.localeCompare(t.name))):a}(m,n,t,r),$=function(e,t=!1){if(!e.components)return[];const r=[];for(const s in e.components){const n=[];for(const t in e.components[s]){const r={show:!0,id:`${s.toLowerCase()}-${t.toLowerCase()}`.replace(pt,"-"),name:t,component:e.components[s][t]};n.push(r)}let i=s,o=s;switch(s){case"schemas":t&&n.sort(((e,t)=>e.name.localeCompare(t.name))),o="Schemas",i="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":o="Responses",i="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":o="Parameters",i="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":o="Examples",i="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":o="Request Bodies",i="Describes common request bodies that are used across the API operations.";break;case"headers":o="Headers",i='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":o="Security Schemes",i="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":o="Links",i="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":o="Callbacks",i="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:o=s,i=s}const a={show:!0,name:o,description:i,subComponents:n};r.push(a)}return r||[]}(m,s),S=null!==(d=m.info)&&void 0!==d&&d.description?mR(m.info.description):[],E=[];if(null!==(h=m.components)&&void 0!==h&&h.securitySchemes){const e=new Set;Object.entries(m.components.securitySchemes).forEach((t=>{if(!e.has(t[0])){e.add(t[0]);const r={securitySchemeId:t[0],...t[1]};r.value="",r.finalKeyValue="","apiKey"===t[1].type||"http"===t[1].type?(r.in=t[1].in||"header",r.name=t[1].name||"Authorization",r.user="",r.password=""):"oauth2"===t[1].type&&(r.in="header",r.name="Authorization",r.clientId="",r.clientSecret=""),E.push(r)}}))}i&&o&&a&&E.push({securitySchemeId:ut,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:i,in:o,value:a,finalKeyValue:a}),E.forEach((e=>{"http"===e.type?e.typeDisplay="basic"===e.scheme?"HTTP Basic":"HTTP Bearer":"apiKey"===e.type?e.typeDisplay=`API Key (${e.name})`:"oauth2"===e.type?e.typeDisplay=`OAuth (${e.securitySchemeId})`:e.typeDisplay=e.type||"None"}));let k=[];m.servers&&Array.isArray(m.servers)&&m.servers.length>0?(m.servers.forEach((e=>{let t=e.url.trim();t.startsWith("http")||t.startsWith("//")||t.startsWith("{")||window.location.origin.startsWith("http")&&(e.url=window.location.origin+e.url,t=e.url),e.variables&&Object.entries(e.variables).forEach((e=>{const r=new RegExp(`{${e[0]}}`,"g");t=t.replace(r,e[1].default||""),e[1].value=e[1].default||""})),e.computedUrl=t})),l&&m.servers.push({url:l,computedUrl:l})):l?m.servers=[{url:l,computedUrl:l}]:window.location.origin.startsWith("http")?m.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:m.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],k=m.servers;return{specLoadError:!1,isSpecLoading:!1,info:m.info,infoDescriptionHeaders:S,tags:w,components:$,externalDocs:m.externalDocs,securitySchemes:E,servers:k}}function mR(e){const t=Xe.lexer(e).filter((e=>"heading"===e.type&&e.depth<=2));return t||[]}const fR=1,gR=2,yR=3,vR=4,bR=e=>(...t)=>({_$litDirective$:e,values:t});class xR{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this.t=e,this._$AM=t,this.i=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}class wR extends xR{constructor(e){if(super(e),this.it=Y,e.type!==gR)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===Y||null==e)return this._t=void 0,this.it=e;if(e===K)return e;if("string"!=typeof e)throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}}wR.directiveName="unsafeHTML",wR.resultType=1;const $R=bR(wR);var SR=r(287).hp;const ER="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",kR="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",AR="rapidoc";function OR(e,t="",r="",s=""){var n,i;const o=null===(n=this.resolvedSpec.securitySchemes)||void 0===n?void 0:n.find((t=>t.securitySchemeId===e));if(!o)return!1;let a="";if("basic"===(null===(i=o.scheme)||void 0===i?void 0:i.toLowerCase()))t&&(a=`Basic ${SR.from(`${t}:${r}`,"utf8").toString("base64")}`);else if(s){var l;o.value=s,a=`${"bearer"===(null===(l=o.scheme)||void 0===l?void 0:l.toLowerCase())?"Bearer ":""}${s}`}return!!a&&(o.finalKeyValue=a,this.requestUpdate(),!0)}function jR(){var e;null===(e=this.resolvedSpec.securitySchemes)||void 0===e||e.forEach((e=>{e.user="",e.password="",e.value="",e.finalKeyValue=""})),this.requestUpdate()}function TR(){return JSON.parse(localStorage.getItem(AR))||{}}function PR(e){localStorage.setItem(AR,JSON.stringify(e))}function CR(){const e=TR.call(this);Object.values(e).forEach((e=>{OR.call(this,e.securitySchemeId,e.username,e.password,e.value)}))}function IR(e){let t="";const r=this.resolvedSpec.securitySchemes.find((t=>t.securitySchemeId===e));if(r){const s=this.shadowRoot.getElementById(`security-scheme-${e}`);if(s){if(r.type&&r.scheme&&"http"===r.type&&"basic"===r.scheme.toLowerCase()){const t=s.querySelector(".api-key-user").value.trim(),r=s.querySelector(".api-key-password").value.trim();OR.call(this,e,t,r)}else t=s.querySelector(".api-key-input").value.trim(),OR.call(this,e,"","",t);if("true"===this.persistAuth){const t=TR.call(this);t[e]=r,PR.call(this,t)}}}}function _R(e,t,r="Bearer"){const s=this.resolvedSpec.securitySchemes.find((t=>t.securitySchemeId===e));s.finalKeyValue=`${"bearer"===r.toLowerCase()?"Bearer":"mac"===r.toLowerCase()?"MAC":r} ${t}`,this.requestUpdate()}async function RR(e,t,r,s,n,i,o,a,l="header",c=null,p=null,u=null){const d=a?a.querySelector(".oauth-resp-display"):void 0,h=new URLSearchParams,m=new Headers;h.append("grant_type",n),"authorization_code"===n&&(h.append("client_id",t),h.append("client_secret",r)),"client_credentials"!==n&&"password"!==n&&h.append("redirect_uri",s),i&&(h.append("code",i),h.append("code_verifier",ER)),"header"===l?m.set("Authorization",`Basic ${SR.from(`${t}:${r}`,"utf8").toString("base64")}`):"authorization_code"!==n&&(h.append("client_id",t),h.append("client_secret",r)),"password"===n&&(h.append("username",p),h.append("password",u)),c&&h.append("scope",c);try{const t=await fetch(e,{method:"POST",headers:m,body:h}),r=await t.json();if(!t.ok)return d&&(d.innerHTML=`<span style="color:var(--red)">${r.error_description||r.error_description||"Unable to get access token"}</span>`),!1;if(r.token_type&&r.access_token)return _R.call(this,o,r.access_token,r.token_type),d&&(d.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}catch{return d&&(d.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function FR(e,t,r,s,n,i,o,a,l,c){sessionStorage.removeItem("winMessageEventActive"),t.close(),e.data.fake||(e.data||console.warn("RapiDoc: Received no data with authorization message"),e.data.error&&console.warn("RapiDoc: Error while receiving data"),e.data&&("code"===e.data.responseType?RR.call(this,r,s,n,i,o,e.data.code,l,c,a):"token"===e.data.responseType&&_R.call(this,l,e.data.access_token,e.data.token_type)))}async function MR(e,t,r,s,n){const i=n.target.closest(".oauth-flow"),o=i.querySelector(".oauth-client-id")?i.querySelector(".oauth-client-id").value.trim():"",a=i.querySelector(".oauth-client-secret")?i.querySelector(".oauth-client-secret").value.trim():"",l=i.querySelector(".api-key-user")?i.querySelector(".api-key-user").value.trim():"",c=i.querySelector(".api-key-password")?i.querySelector(".api-key-password").value.trim():"",p=i.querySelector(".oauth-send-client-secret-in")?i.querySelector(".oauth-send-client-secret-in").value.trim():"header",u=[...i.querySelectorAll(".scope-checkbox:checked")],d=i.querySelector(`#${e}-pkce`),h=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,m=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,f=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`);let g,y="",v="";if([...i.parentNode.querySelectorAll(".oauth-resp-display")].forEach((e=>{e.innerHTML=""})),"authorizationCode"===t||"implicit"===t){const n=new URL(r);"authorizationCode"===t?(y="authorization_code",v="code"):"implicit"===t&&(v="token");const l=new URLSearchParams(n.search),c=u.map((e=>e.value)).join(" ");c&&l.set("scope",c),l.set("client_id",o),l.set("redirect_uri",f.toString()),l.set("response_type",v),l.set("state",h),l.set("nonce",m),d&&d.checked&&(l.set("code_challenge",kR),l.set("code_challenge_method","S256")),l.set("show_dialog",!0),n.search=l.toString(),"true"===sessionStorage.getItem("winMessageEventActive")&&window.postMessage({fake:!0},this),setTimeout((()=>{g=window.open(n.toString()),g?(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",(t=>FR.call(this,t,g,s,o,a,f.toString(),y,p,e,i)),{once:!0})):console.error(`RapiDoc: Unable to open ${n.toString()} in a new window`)}),10)}else if("clientCredentials"===t){y="client_credentials";const t=u.map((e=>e.value)).join(" ");RR.call(this,s,o,a,f.toString(),y,"",e,i,p,t)}else if("password"===t){y="password";const t=u.map((e=>e.value)).join(" ");RR.call(this,s,o,a,f.toString(),y,"",e,i,p,t,l,c)}}function LR(e,t,r,s,n,i=[],o="header",a=void 0){var l;let{authorizationUrl:c,tokenUrl:p,refreshUrl:u}=n;const d=n["x-pkce-only"]||!1,h=e=>e.indexOf("://")>0||0===e.indexOf("//"),m=new URL(null===(l=this.selectedServer)||void 0===l?void 0:l.computedUrl).origin;let f;return u&&!h(u)&&(u=`${m}/${u.replace(/^\//,"")}`),p&&!h(p)&&(p=`${m}/${p.replace(/^\//,"")}`),c&&!h(c)&&(c=`${m}/${c.replace(/^\//,"")}`),f="authorizationCode"===e?"Authorization Code Flow":"clientCredentials"===e?"Client Credentials Flow":"implicit"===e?"Implicit Flow":"password"===e?"Password Flow":e,J`
  1004. <div class="oauth-flow ${e}" style="padding: 12px 0; margin-bottom:12px;">
  1005. <div class="tiny-title upper" style="margin-bottom:8px;">${f}</div>
  1006. ${c?J`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Auth URL</span> <span class="mono-font"> ${c} </span></div>`:""}
  1007. ${p?J`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Token URL</span> <span class="mono-font">${p}</span></div>`:""}
  1008. ${u?J`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Refresh URL</span> <span class="mono-font">${u}</span></div>`:""}
  1009. ${"authorizationCode"===e||"clientCredentials"===e||"implicit"===e||"password"===e?J`
  1010. ${n.scopes?J`
  1011. <span> Scopes </span>
  1012. <div class= "oauth-scopes" part="section-auth-scopes" style = "width:100%; display:flex; flex-direction:column; flex-wrap:wrap; margin:0 0 10px 24px">
  1013. ${Object.entries(n.scopes).map(((t,r)=>J`
  1014. <div class="m-checkbox" style="display:inline-flex; align-items:center">
  1015. <input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${s}${e}${r}" ?checked="${i.includes(t[0])}" value="${t[0]}">
  1016. <label for="${s}${e}${r}" style="margin-left:5px; cursor:pointer">
  1017. <span class="mono-font">${t[0]}</span>
  1018. ${t[0]!==t[1]?` - ${t[1]||""}`:""}
  1019. </label>
  1020. </div>
  1021. `))}
  1022. </div>
  1023. `:""}
  1024. ${"password"===e?J`
  1025. <div style="margin:5px 0">
  1026. <input type="text" value = "" placeholder="username" spellcheck="false" class="oauth2 ${e} ${s} api-key-user" part="textbox textbox-username" id="input-${s}-${e}-api-key-user">
  1027. <input type="password" value = "" placeholder="password" spellcheck="false" class="oauth2 ${e} ${s} api-key-password" style = "margin:0 5px;" part="textbox textbox-password" id="input-${s}-${e}-api-key-password">
  1028. </div>`:""}
  1029. <div>
  1030. ${"authorizationCode"===e?J`
  1031. <div style="margin: 16px 0 4px">
  1032. <input type="checkbox" part="checkbox checkbox-auth-scope" id="${s}-pkce" checked ?disabled=${d}>
  1033. <label for="${s}-pkce" style="margin:0 16px 0 4px; line-height:24px; cursor:pointer">
  1034. Send Proof Key for Code Exchange (PKCE)
  1035. </label>
  1036. </div>
  1037. `:""}
  1038. <input type="text" part="textbox textbox-auth-client-id" value = "${t||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${e} ${s} oauth-client-id">
  1039. ${"authorizationCode"===e||"clientCredentials"===e||"password"===e?J`
  1040. <input
  1041. id="${s}-${e}-oauth-client-secret"
  1042. type="password" part="textbox textbox-auth-client-secret"
  1043. value = "${r||""}" placeholder="client-secret" spellcheck="false"
  1044. class="oauth2 ${e} ${s}
  1045. oauth-client-secret"
  1046. style = "margin:0 5px;${d?"display:none;":""}"
  1047. >
  1048. <select style="margin-right:5px;${d?"display:none;":""}" class="${e} ${s} oauth-send-client-secret-in">
  1049. ${!a||a.includes("header")?J`<option value = 'header' .selected = ${"header"===o} > Authorization Header </option>`:""}
  1050. ${!a||a.includes("request-body")?J` <option value = 'request-body' .selected = ${"request-body"===o}> Request Body </option>`:""}
  1051. </select>`:""}
  1052. ${"authorizationCode"===e||"clientCredentials"===e||"implicit"===e||"password"===e?J`
  1053. <button class="m-btn thin-border" part="btn btn-outline"
  1054. @click="${t=>{MR.call(this,s,e,c,p,t)}}"
  1055. > GET TOKEN </button>`:""}
  1056. </div>
  1057. <div class="oauth-resp-display red-text small-font-size"></div>
  1058. `:""}
  1059. </div>
  1060. `}function DR(e){var t;const r=null===(t=this.resolvedSpec.securitySchemes)||void 0===t?void 0:t.find((t=>t.securitySchemeId===e));if(r.user="",r.password="",r.value="",r.finalKeyValue="","true"===this.persistAuth){const e=TR.call(this);delete e[r.securitySchemeId],PR.call(this,e)}this.requestUpdate()}function BR(){var e;if(!this.resolvedSpec)return"";const t=null===(e=this.resolvedSpec.securitySchemes)||void 0===e?void 0:e.filter((e=>e.finalKeyValue));return t?J`
  1061. <section id='auth' part="section-auth" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class = 'observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}'>
  1062. <div class='sub-title regular-font'> AUTHENTICATION </div>
  1063. <div class="small-font-size" style="display:flex; align-items: center; min-height:30px">
  1064. ${t.length>0?J`
  1065. <div class="blue-text"> ${t.length} API key applied </div>
  1066. <div style="flex:1"></div>
  1067. <button class="m-btn thin-border" part="btn btn-outline" @click=${()=>{jR.call(this)}}>CLEAR ALL API KEYS</button>`:J`<div class="red-text">No API key applied</div>`}
  1068. </div>
  1069. ${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?J`
  1070. <table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
  1071. ${this.resolvedSpec.securitySchemes.filter((e=>e.type)).map((e=>{var t,r;return J`
  1072. <tr id="security-scheme-${e.securitySchemeId}" class="${e.type.toLowerCase()}">
  1073. <td style="max-width:500px; overflow-wrap: break-word;">
  1074. <div style="line-height:28px; margin-bottom:5px;">
  1075. <span style="font-weight:bold; font-size:var(--font-size-regular)">${e.typeDisplay}</span>
  1076. ${e.finalKeyValue?J`
  1077. <span class='blue-text'> ${e.finalKeyValue?"Key Applied":""} </span>
  1078. <button class="m-btn thin-border small" part="btn btn-outline" @click=${()=>{DR.call(this,e.securitySchemeId)}}>REMOVE</button>
  1079. `:""}
  1080. </div>
  1081. ${e.description?J`
  1082. <div class="m-markdown">
  1083. ${$R(Xe(e.description||""))}
  1084. </div>`:""}
  1085. ${"apikey"===e.type.toLowerCase()||"http"===e.type.toLowerCase()&&"bearer"===(null===(t=e.scheme)||void 0===t?void 0:t.toLowerCase())?J`
  1086. <div style="margin-bottom:5px">
  1087. ${"apikey"===e.type.toLowerCase()?J`Send <code>${e.name}</code> in <code>${e.in}</code>`:J`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and a Token String.`}
  1088. </div>
  1089. <div style="max-height:28px;">
  1090. ${"cookie"!==e.in?J`
  1091. <input type = "text" value = "${e.value}" class="${e.type} ${e.securitySchemeId} api-key-input" placeholder = "api-token" spellcheck = "false" id = "${e.type}-${e.securitySchemeId}-api-key-input">
  1092. <button class="m-btn thin-border" style = "margin-left:5px;"
  1093. part = "btn btn-outline"
  1094. @click="${t=>{IR.call(this,e.securitySchemeId,t)}}">
  1095. ${e.finalKeyValue?"UPDATE":"SET"}
  1096. </button>`:J`<span class="gray-text" style="font-size::var(--font-size-small)"> cookies cannot be set from here</span>`}
  1097. </div>`:""}
  1098. ${"http"===e.type.toLowerCase()&&"basic"===(null===(r=e.scheme)||void 0===r?void 0:r.toLowerCase())?J`
  1099. <div style="margin-bottom:5px">
  1100. Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.
  1101. </div>
  1102. <div>
  1103. <input type="text" value = "${e.user}" placeholder="username" spellcheck="false" class="${e.type} ${e.securitySchemeId} api-key-user" style="width:100px" id = "input-${e.type}-${e.securitySchemeId}-api-key-user">
  1104. <input type="password" value = "${e.password}" placeholder="password" spellcheck="false" class="${e.type} ${e.securitySchemeId} api-key-password" style = "width:100px; margin:0 5px;" id = "input-${e.type}-${e.securitySchemeId}-api-key-password">
  1105. <button class="m-btn thin-border"
  1106. @click="${t=>{IR.call(this,e.securitySchemeId,t)}}"
  1107. part = "btn btn-outline"
  1108. >
  1109. ${e.finalKeyValue?"UPDATE":"SET"}
  1110. </button>
  1111. </div>`:""}
  1112. </td>
  1113. </tr>
  1114. ${"oauth2"===e.type.toLowerCase()?J`
  1115. <tr>
  1116. <td style="border:none; padding-left:48px">
  1117. ${Object.keys(e.flows).map((t=>LR.call(this,t,e.flows[t]["x-client-id"]||e["x-client-id"]||"",e.flows[t]["x-client-secret"]||e["x-client-secret"]||"",e.securitySchemeId,e.flows[t],e.flows[t]["x-default-scopes"]||e["x-default-scopes"],e.flows[t]["x-receive-token-in"]||e["x-receive-token-in"],e.flows[t]["x-receive-token-in-options"]||e["x-receive-token-in-options"])))}
  1118. </td>
  1119. </tr>
  1120. `:""}
  1121. `}))}
  1122. </table>`:""}
  1123. <slot name="auth"></slot>
  1124. </section>
  1125. `:void 0}function qR(e){if(this.resolvedSpec.securitySchemes&&e){const t=[];return Array.isArray(e)?0===e.length?"":(e.forEach((e=>{const r=[],s=[];0===Object.keys(e).length?t.push({securityTypes:"None",securityDefs:[]}):(Object.keys(e).forEach((t=>{let n="";const i=this.resolvedSpec.securitySchemes.find((e=>e.securitySchemeId===t));e[t]&&Array.isArray(e[t])&&(n=e[t].join(", ")),i&&(s.push(i.typeDisplay),r.push({...i,scopes:n}))})),t.push({securityTypes:s.length>1?`${s[0]} + ${s.length-1} more`:s[0],securityDefs:r}))})),J`<div style="position:absolute; top:3px; right:2px; font-size:var(--font-size-small); line-height: 1.5;">
  1126. <div style="position:relative; display:flex; min-width:350px; max-width:700px; justify-content: flex-end;">
  1127. <svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--fg3)"> <rect x="5" y="11" width="14" height="10" rx="2" /> <circle cx="12" cy="16" r="1" /> <path d="M8 11v-4a4 4 0 0 1 8 0v4" /></svg>
  1128. ${t.map(((e,t)=>J`
  1129. ${e.securityTypes?J`
  1130. ${0!==t?J`<div style="padding:3px 4px;"> OR </div>`:""}
  1131. <div class="tooltip">
  1132. <div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;">
  1133. ${"true"===this.updateRoute&&"true"===this.allowAuthentication?J`<a part="anchor anchor-operation-security" href="#auth"> ${e.securityTypes} </a>`:J`${e.securityTypes}`}
  1134. </div>
  1135. <div class="tooltip-text" style="position:absolute; color: var(--fg); top:26px; right:0; border:1px solid var(--border-color);padding:2px 4px; display:block;">
  1136. ${e.securityDefs.length>1?J`<div>Requires <b>all</b> of the following </div>`:""}
  1137. <div style="padding-left: 8px">
  1138. ${e.securityDefs.map(((t,r)=>{const s=J`${""!==t.scopes?J`
  1139. <div>
  1140. <b>Required scopes:</b>
  1141. <br/>
  1142. <div style="margin-left:8px">
  1143. ${t.scopes.split(",").map(((e,t)=>J`${0===t?"":"┃"}<span>${e}</span>`))}
  1144. </div>
  1145. </div>`:""}`;return J`
  1146. ${"oauth2"===t.type?J`
  1147. <div>
  1148. ${e.securityDefs.length>1?J`<b>${r+1}.</b> &nbsp;`:"Needs"}
  1149. OAuth Token <span style="font-family:var(--font-mono); color:var(--primary-color);">${t.securitySchemeId}</span> in <b>Authorization header</b>
  1150. ${s}
  1151. </div>`:"http"===t.type?J`
  1152. <div>
  1153. ${e.securityDefs.length>1?J`<b>${r+1}.</b> &nbsp;`:J`Requires`}
  1154. ${"basic"===t.scheme?"Base 64 encoded username:password":"Bearer Token"} in <b>Authorization header</b>
  1155. ${s}
  1156. </div>`:J`
  1157. <div>
  1158. ${e.securityDefs.length>1?J`<b>${r+1}.</b> &nbsp;`:J`Requires`}
  1159. Token in <b>${t.name} ${t.in}</b>
  1160. ${s}
  1161. </div>`}`}))}
  1162. </div>
  1163. </div>
  1164. </div>
  1165. `:""}
  1166. `))}
  1167. </div>
  1168. </div>
  1169. `):""}return""}function NR(e){return J`
  1170. <section class="table-title" style="margin-top:24px;">CODE SAMPLES</div>
  1171. <div part="tab-panel" class="tab-panel col"
  1172. @click="${e=>{if(!e.target.classList.contains("tab-btn"))return;const t=e.target.dataset.tab,r=[...e.currentTarget.querySelectorAll(".tab-btn")],s=[...e.currentTarget.querySelectorAll(".tab-content")];r.forEach((e=>e.classList[e.dataset.tab===t?"add":"remove"]("active"))),s.forEach((e=>{e.style.display=e.dataset.tab===t?"block":"none"}))}}">
  1173. <div part="tab-btn-row" class="tab-buttons row" style="width:100; overflow">
  1174. ${e.map(((e,t)=>J`<button part="tab-btn" class="tab-btn ${0===t?"active":""}" data-tab = '${e.lang}${t}'> ${e.label||e.lang} </button>`))}
  1175. </div>
  1176. ${e.map(((e,t)=>{var r,s,n;return J`
  1177. <div class="tab-content m-markdown" style= "display:${0===t?"block":"none"}" data-tab = '${e.lang}${t}'>
  1178. <button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${t=>{ht(e.source,t)}}'> Copy </button>
  1179. <pre><code class="language">${Qe().languages[null===(r=e.lang)||void 0===r?void 0:r.toLowerCase()]?$R(Qe().highlight(e.source,Qe().languages[null===(s=e.lang)||void 0===s?void 0:s.toLowerCase()],null===(n=e.lang)||void 0===n?void 0:n.toLowerCase())):e.source}</code></pre>
  1180. </div>`}))}
  1181. </div>
  1182. </section>`}function UR(e){return J`
  1183. <div class="req-res-title" style="margin-top:12px">CALLBACKS</div>
  1184. ${Object.entries(e).map((e=>J`
  1185. <div class="tiny-title" style="padding: 12px; border:1px solid var(--light-border-color)">
  1186. ${e[0]}
  1187. ${Object.entries(e[1]).map((e=>J`
  1188. <div class="mono-font small-font-size" style="display:flex; margin-left:16px;">
  1189. <div style="width:100%">
  1190. ${Object.entries(e[1]).map((t=>{var r,s,n;return J`
  1191. <div>
  1192. <div style="margin-top:12px;">
  1193. <div class="method method-fg ${t[0]}" style="width:70px; border:none; margin:0; padding:0; line-height:20px; vertical-align: baseline;text-align:left">
  1194. <span style="font-size:20px;"> &#x2944; </span>
  1195. ${t[0]}
  1196. </div>
  1197. <span style="line-height:20px; vertical-align: baseline;">${e[0]} </span>
  1198. </div>
  1199. <div class='expanded-req-resp-container'>
  1200. <api-request
  1201. class = "${this.renderStyle}-mode callback"
  1202. style = "width:100%;"
  1203. callback = "true"
  1204. method = "${t[0]||""}",
  1205. path = "${e[0]||""}"
  1206. .parameters = "${(null===(r=t[1])||void 0===r?void 0:r.parameters)||""}"
  1207. .request_body = "${(null===(s=t[1])||void 0===s?void 0:s.requestBody)||""}"
  1208. fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
  1209. allow-try = "false"
  1210. render-style="${this.renderStyle}"
  1211. schema-style = "${this.schemaStyle}"
  1212. active-schema-tab = "${this.defaultSchemaTab}"
  1213. schema-expand-level = "${this.schemaExpandLevel}"
  1214. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1215. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  1216. schema-hide-read-only = "false"
  1217. schema-hide-write-only = "${"never"===this.schemaHideWriteOnly?"false":"true"}"
  1218. fetch-credentials = "${this.fetchCredentials}"
  1219. exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
  1220. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  1221. file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
  1222. anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  1223. > </api-request>
  1224. <api-response
  1225. style = "width:100%;"
  1226. class = "${this.renderStyle}-mode"
  1227. callback = "true"
  1228. .responses="${null===(n=t[1])||void 0===n?void 0:n.responses}"
  1229. render-style="${this.renderStyle}"
  1230. schema-style="${this.schemaStyle}"
  1231. active-schema-tab = "${this.defaultSchemaTab}"
  1232. schema-expand-level = "${this.schemaExpandLevel}"
  1233. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1234. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  1235. schema-hide-read-only = "${"never"===this.schemaHideReadOnly?"false":"true"}"
  1236. schema-hide-write-only = "false"
  1237. exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
  1238. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  1239. schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  1240. > </api-response>
  1241. </div>
  1242. </div>
  1243. `}))}
  1244. </div>
  1245. </div>
  1246. `))}
  1247. </div>
  1248. `))}
  1249. `}const zR={},HR=bR(class extends xR{constructor(){super(...arguments),this.ot=zR}render(e,t){return t()}update(e,[t,r]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every(((e,t)=>e===this.ot[t])))return K}else if(this.ot===t)return K;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,r)}}),{I:VR}=pe,WR={},GR=bR(class extends xR{constructor(e){if(super(e),e.type!==yR&&e.type!==fR&&e.type!==vR)throw Error("The `live` directive is not allowed on child or event bindings");if(!(e=>void 0===e.strings)(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===K||t===Y)return t;const r=e.element,s=e.name;if(e.type===yR){if(t===r[s])return K}else if(e.type===vR){if(!!t===r.hasAttribute(s))return K}else if(e.type===fR&&r.getAttribute(s)===t+"")return K;return((e,t=WR)=>{e._$AH=t})(e),t}});var JR=r(657),KR=r.n(JR);const YR=c`
  1250. .border-top {
  1251. border-top:1px solid var(--border-color);
  1252. }
  1253. .border{
  1254. border:1px solid var(--border-color);
  1255. border-radius: var(--border-radius);
  1256. }
  1257. .light-border{
  1258. border:1px solid var(--light-border-color);
  1259. border-radius: var(--border-radius);
  1260. }
  1261. .pad-8-16{
  1262. padding: 8px 16px;
  1263. }
  1264. .pad-top-8 {
  1265. padding-top: 8px;
  1266. }
  1267. .mar-top-8 {
  1268. margin-top: 8px;
  1269. }
  1270. `;var XR=r(859),ZR=r.n(XR);function QR(e){if(void 0===e)return"";if(null===e)return"null";if(""===e)return"∅";if("boolean"==typeof e||"number"==typeof e)return`${e}`;if(Array.isArray(e))return e.map((e=>null===e?"null":""===e?"∅":e.toString().replace(/^ +| +$/g,(e=>"●".repeat(e.length)))||"")).join(", ");if("object"==typeof e){const t=Object.keys(e);return`{ ${t[0]}:${e[t[0]]}${t.length>1?",":""} ... }`}return e.toString().replace(/^ +| +$/g,(e=>"●".repeat(e.length)))||""}function eF(e){if(!e)return;let t="",r="";if(e.$ref){const r=e.$ref.lastIndexOf("/");t=`{recursive: ${e.$ref.substring(r+1)}} `}else e.type?(t=Array.isArray(e.type)?e.type.join(2===e.length?" or ":"┃"):e.type,(e.format||e.enum||e.const)&&(t=t.replace("string",e.enum?"enum":e.const?"const":e.format)),e.nullable&&(t+="┃null")):t=e.const?"const":0===Object.keys(e).length?"any":"{missing-type-info}";const s={type:t,format:e.format||"",pattern:e.pattern&&!e.enum?e.pattern:"",readOrWriteOnly:e.readOnly?"🆁":e.writeOnly?"🆆":"",deprecated:e.deprecated?"❌":"",examples:e.examples||e.example,default:QR(e.default),description:e.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if("{recursive}"===s.type?s.description=e.$ref.substring(e.$ref.lastIndexOf("/")+1):"{missing-type-info}"!==s.type&&"any"!==s.type||(s.description=s.description||""),s.allowedValues=e.const?e.const:Array.isArray(e.enum)?e.enum.map((e=>QR(e))).join("┃"):"","array"===t&&e.items){var n,i;const t=null===(n=e.items)||void 0===n?void 0:n.type,r=QR(e.items.default);s.arrayType=`${e.type} of ${Array.isArray(t)?t.join(""):t}`,s.default=r,s.allowedValues=e.items.const?e.const:Array.isArray(null===(i=e.items)||void 0===i?void 0:i.enum)?e.items.enum.map((e=>QR(e))).join("┃"):""}return t.match(/integer|number/g)&&(void 0===e.minimum&&void 0===e.exclusiveMinimum||(r+=void 0!==e.minimum?`Min ${e.minimum}`:`More than ${e.exclusiveMinimum}`),void 0===e.maximum&&void 0===e.exclusiveMaximum||(r+=void 0!==e.maximum?`${r?"┃":""}Max ${e.maximum}`:`${r?"┃":""}Less than ${e.exclusiveMaximum}`),void 0!==e.multipleOf&&(r+=`${r?"┃":""} multiple of ${e.multipleOf}`)),t.match(/string/g)&&(void 0!==e.minLength&&void 0!==e.maxLength?r+=`${r?"┃":""}${e.minLength} to ${e.maxLength} chars`:void 0!==e.minLength?r+=`${r?"┃":""}Min ${e.minLength} chars`:void 0!==e.maxLength&&(r+=`Max ${r?"┃":""}${e.maxLength} chars`)),s.constrain=r,s.html=`${s.type}~|~${s.readOrWriteOnly}~|~${s.constrain}~|~${s.default}~|~${s.allowedValues}~|~${s.pattern}~|~${s.description}~|~${e.title||""}~|~${s.deprecated?"deprecated":""}`,s}function tF(e){if("object"==typeof e&&!Array.isArray(e)){if(void 0!==e.value)return{Example:{...e}};const t=Object.entries(e).filter((([e,t])=>void 0!==t.value));if(0===t.length)return;return Object.fromEntries(t)}return Array.isArray(e)?e.reduce(((e,t,r)=>(e[`Example${r+1}`]={value:t},e)),{}):e?{Example:{value:e}}:void 0}function rF(e,t="string"){if(!e)return{exampleVal:"",exampleList:[]};if(e.constructor===Object){const t=Object.values(e).filter((e=>!1!==e["x-example-show-value"])).map((e=>({value:"boolean"==typeof e.value||"number"==typeof e.value?`${e.value}`:e.value||"",printableValue:QR(e.value),summary:e.summary||"",description:e.description||""})));return{exampleVal:t.length>0?t[0].value:"",exampleList:t}}if(Array.isArray(e)||(e=e?[e]:[]),0===e.length)return{exampleVal:"",exampleList:[]};if("array"===t){const[t]=e,r=e.map((e=>({value:e,printableValue:QR(e)})));return{exampleVal:t,exampleList:r}}const r=e[0].toString(),s=e.map((e=>({value:e.toString(),printableValue:QR(e)})));return{exampleVal:r,exampleList:s}}function sF(e){const t=e.examples?e.examples[0]:null===e.example?null:e.example||void 0;if(""===t)return"";if(null===t)return null;if(0===t)return 0;if(!1===t)return!1;if(t instanceof Date)switch(e.format.toLowerCase()){case"date":return t.toISOString().split("T")[0];case"time":return t.toISOString().split("T")[1];default:return t.toISOString()}if(t)return t;if(0===Object.keys(e).length)return null;if(e.$ref)return{};if(!1===e.const||0===e.const||null===e.const||""===e.const)return e.const;if(e.const)return e.const;if(e.default)return e.default;const r=Array.isArray(e.type)?e.type[0]:e.type;if(!r)return null;if(r.match(/^integer|^number/g)){const t=Number.isNaN(Number(e.multipleOf))?void 0:Number(e.multipleOf),s=Number.isNaN(Number(e.maximum))?void 0:Number(e.maximum),n=Number.isNaN(Number(e.minimum))?Number.isNaN(Number(e.exclusiveMinimum))?s||0:Number(e.exclusiveMinimum)+(r.startsWith("integer")?1:.001):Number(e.minimum);return t?t>=n?t:n%t==0?n:Math.ceil(n/t)*t:n}if(r.match(/^boolean/g))return!1;if(r.match(/^null/g))return null;if(r.match(/^string/g)){if(e.enum)return e.enum[0];if(e.const)return e.const;if(e.pattern)try{return new(ZR())(e.pattern).gen()}catch{return e.pattern}if(!e.format){const t=Number.isNaN(e.minLength)?void 0:Number(e.minLength),r=Number.isNaN(e.maxLength)?void 0:Number(e.maxLength),s=t||(r>6?6:r||void 0);return s?"A".repeat(s):"string"}{const t=`${Date.now().toString(16)}${Math.random().toString(16)}0`.repeat(16);switch(e.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return[t.substring(0,8),t.substring(8,12),`4000-8${t.substring(13,16)}`,t.substring(16,28)].join("-");case"byte":return"ZXhhbXBsZQ==";default:return""}}}return null}function nF(e,t=1){const r=" ".repeat(t);let s="";if(1===t&&"object"!=typeof e)return`\n${r}${e.toString()}`;for(const n in e){const i=e[n]["::XML_TAG"]||n;let o="";o=Array.isArray(e[n])?i[0]["::XML_TAG"]||`${n}`:i,n.startsWith("::")||(s=Array.isArray(e[n])||"object"==typeof e[n]?`${s}\n${r}<${o}>${nF(e[n],t+1)}\n${r}</${o}>`:`${s}\n${r}<${o}>${e[n].toString()}</${o}>`)}return s}function iF(e,t){var r,s;if("object"==typeof t&&null!==t){var n,i;if(e.title&&(t["::TITLE"]=e.title),e.description&&(t["::DESCRIPTION"]=e.description),null!==(r=e.xml)&&void 0!==r&&r.name)t["::XML_TAG"]=null===(n=e.xml)||void 0===n?void 0:n.name;if(null!==(s=e.xml)&&void 0!==s&&s.wrapped)t["::XML_WRAP"]=null===(i=e.xml)||void 0===i?void 0:i.wrapped.toString()}}function oF(e){if("object"==typeof e&&null!==e){delete e["::TITLE"],delete e["::DESCRIPTION"],delete e["::XML_TAG"],delete e["::XML_WRAP"];for(const t in e)oF(e[t])}}function aF(e,t,r){for(const s in t)t[s][r]=e}function lF(e,t,r){let s=0;const n={};for(const i in e){for(const o in r)if(n[`example-${s}`]={...e[i]},n[`example-${s}`][t]=r[o],s++,s>=10)break;if(s>=10)break}return n}function cF(e,t={}){let r={};if(e){if(e.allOf){var s,n;const i={};if(!(1!==e.allOf.length||null!==(s=e.allOf[0])&&void 0!==s&&s.properties||null!==(n=e.allOf[0])&&void 0!==n&&n.items)){if(e.allOf[0].$ref)return"{ }";if(e.allOf[0].readOnly&&t.includeReadOnly){return sF(e.allOf[0])}return}e.allOf.forEach((e=>{if("object"===e.type||e.properties||e.allOf||e.anyOf||e.oneOf){const r=cF(e,t);Object.assign(i,r)}else if("array"===e.type||e.items){const r=[cF(e,t)];Object.assign(i,r)}else{if(!e.type)return"";{const t=`prop${Object.keys(i).length}`;i[t]=sF(e)}}})),r=i}else if(e.oneOf){const s={};if(e.properties)for(const r in e.properties){var i;e.properties[r].properties||null!==(i=e.properties[r].properties)&&void 0!==i&&i.items?s[r]=cF(e.properties[r],t):s[r]=sF(e.properties[r])}if(e.oneOf.length>0){let n=0;for(const i in e.oneOf){const o=cF(e.oneOf[i],t);for(const t in o){let a;if(Object.keys(s).length>0){if(null===o[t]||"object"!=typeof o[t])continue;a=Object.assign(o[t],s)}else a=o[t];r[`example-${n}`]=a,iF(e.oneOf[i],r[`example-${n}`]),n++}}}}else if(e.anyOf){let s;if("object"===e.type||e.properties){s={"example-0":{}};for(const r in e.properties){if(e.example){s=e;break}e.properties[r].deprecated&&!t.includeDeprecated||(e.properties[r].readOnly&&!t.includeReadOnly||e.properties[r].writeOnly&&!t.includeWriteOnly||(s=lF(s,r,cF(e.properties[r],t))))}}let n=0;for(const i in e.anyOf){const o=cF(e.anyOf[i],t);for(const t in o){if(void 0!==s)for(const e in s)r[`example-${n}`]={...s[e],...o[t]};else r[`example-${n}`]=o[t];iF(e.anyOf[i],r[`example-${n}`]),n++}}}else if("object"===e.type||e.properties)if(r["example-0"]={},iF(e,r["example-0"]),e.example)r["example-0"]=e.example;else{for(const s in e.properties){var o,a,l,c,p,u;if(null===(o=e.properties[s])||void 0===o||!o.deprecated||t.includeDeprecated)if(null===(a=e.properties[s])||void 0===a||!a.readOnly||t.includeReadOnly)if(null===(l=e.properties[s])||void 0===l||!l.writeOnly||t.includeWriteOnly)if("array"===(null===(c=e.properties[s])||void 0===c?void 0:c.type)||null!==(p=e.properties[s])&&void 0!==p&&p.items)if(e.properties[s].example)aF(e.properties[s].example,r,s);else if(null!==(u=e.properties[s])&&void 0!==u&&null!==(u=u.items)&&void 0!==u&&u.example)aF([e.properties[s].items.example],r,s);else{const n=cF(e.properties[s].items,t);if(t.useXmlTagForProp){var d,h;const t=(null===(d=e.properties[s].xml)||void 0===d?void 0:d.name)||s;if(null!==(h=e.properties[s].xml)&&void 0!==h&&h.wrapped){r=lF(r,t,JSON.parse(`{ "${t}" : { "${t}" : ${JSON.stringify(n["example-0"])} } }`))}else r=lF(r,t,n)}else{const e=[];for(const t in n)e[t]=[n[t]];r=lF(r,s,e)}}else r=lF(r,s,cF(e.properties[s],t))}if("object"==typeof e.additionalProperties){const s=e.additionalProperties["x-additionalPropertiesName"]||"property";r=lF(r,`${s}1`,cF(e.additionalProperties,t)),r=lF(r,`${s}2`,cF(e.additionalProperties,t))}}else{if("array"!==e.type&&!e.items)return{"example-0":sF(e)};var m;if(e.items||e.example)if(e.example)r["example-0"]=e.example;else if(null!==(m=e.items)&&void 0!==m&&m.example)r["example-0"]=[e.items.example];else{const s=cF(e.items,t);let n=0;for(const t in s)r[`example-${n}`]=[s[t]],iF(e.items,r[`example-${n}`]),n++}else r["example-0"]=[]}return r}}function pF(e,t=0){var r;let s=(e.description||e.title)&&(e.minItems||e.maxItems)?'<span class="descr-expand-toggle">➔</span>':"";if(e.title?s=e.description?`${s} <b>${e.title}:</b> ${e.description}<br/>`:`${s} ${e.title}<br/>`:e.description&&(s=`${s} ${e.description}<br/>`),e.minItems&&(s=`${s} <b>Min Items:</b> ${e.minItems}`),e.maxItems&&(s=`${s} <b>Max Items:</b> ${e.maxItems}`),t>0&&null!==(r=e.items)&&void 0!==r&&r.description){let t="";e.items.minProperties&&(t=`<b>Min Properties:</b> ${e.items.minProperties}`),e.items.maxProperties&&(t=`${t} <b>Max Properties:</b> ${e.items.maxProperties}`),s=`${s} ⮕ ${t} [ ${e.items.description} ] `}return s}function uF(e,t,r=0,s=""){if(e){if(e.allOf){const s={};if(1===e.allOf.length&&!e.allOf[0].properties&&!e.allOf[0].items){return`${eF(e.allOf[0]).html}`}e.allOf.map(((e,t)=>{if("object"===e.type||e.properties||e.allOf||e.anyOf||e.oneOf){const n=(e.anyOf||e.oneOf)&&t>0?t:"",i=uF(e,{},r+1,n);Object.assign(s,i)}else if("array"===e.type||e.items){const t=uF(e,{},r+1);Object.assign(s,t)}else{if(!e.type)return"";{const t=`prop${Object.keys(s).length}`,r=eF(e);s[t]=`${r.html}`}}})),t=s}else if(e.anyOf||e.oneOf){if(t["::description"]=e.description||"","object"===e.type||e.properties){t["::description"]=e.description||"",t["::type"]="object";for(const s in e.properties)e.required&&e.required.includes(s)?t[`${s}*`]=uF(e.properties[s],{},r+1):t[s]=uF(e.properties[s],{},r+1)}const n={},i=e.anyOf?"anyOf":"oneOf";e[i].forEach(((e,t)=>{if("object"===e.type||e.properties||e.allOf||e.anyOf||e.oneOf){const r=uF(e,{});n[`::OPTION~${t+1}${e.title?`~${e.title}`:""}`]=r,n[`::OPTION~${t+1}${e.title?`~${e.title}`:""}`]["::readwrite"]="",n["::type"]="xxx-of-option"}else if("array"===e.type||e.items){const r=uF(e,{});n[`::OPTION~${t+1}${e.title?`~${e.title}`:""}`]=r,n[`::OPTION~${t+1}${e.title?`~${e.title}`:""}`]["::readwrite"]="",n["::type"]="xxx-of-array"}else{const r=`::OPTION~${t+1}${e.title?`~${e.title}`:""}`;n[r]=`${eF(e).html}`,n["::type"]="xxx-of-option"}})),t[e.anyOf?`::ANY~OF ${s}`:`::ONE~OF ${s}`]=n,t["::type"]="object"}else if(Array.isArray(e.type)){const s=JSON.parse(JSON.stringify(e)),o=[],a=[];let l;var n;if(s.type.forEach((e=>{var t,r;e.match(/integer|number|string|null|boolean/g)?o.push(e):"array"===e&&"string"==typeof(null===(t=s.items)||void 0===t?void 0:t.type)&&null!==(r=s.items)&&void 0!==r&&r.type.match(/integer|number|string|null|boolean/g)?"string"===s.items.type&&s.items.format?o.push(`[${s.items.format}]`):o.push(`[${s.items.type}]`):a.push(e)})),o.length>0)if(s.type=o.join(2===o.length?" or ":"┃"),l=eF(s),0===a.length)return`${(null===(n=l)||void 0===n?void 0:n.html)||""}`;if(a.length>0){var i;t["::type"]="object";const n={"::type":"xxx-of-option"};a.forEach(((t,i)=>{if("null"===t)n[`::OPTION~${i+1}`]="NULL~|~~|~~|~~|~~|~~|~~|~~|~";else if("integer, number, string, boolean,".includes(`${t},`)){s.type=Array.isArray(t)?t.join("┃"):t;const e=eF(s);n[`::OPTION~${i+1}`]=e.html}else if("object"===t){const t={"::title":e.title||"","::description":e.description||"","::type":"object","::deprecated":e.deprecated||!1};for(const s in e.properties)e.required&&e.required.includes(s)?t[`${s}*`]=uF(e.properties[s],{},r+1):t[s]=uF(e.properties[s],{},r+1);n[`::OPTION~${i+1}`]=t}else"array"===t&&(n[`::OPTION~${i+1}`]={"::title":e.title||"","::description":e.description||"","::type":"array","::props":uF(e.items,{},r+1)})})),n[`::OPTION~${a.length+1}`]=(null===(i=l)||void 0===i?void 0:i.html)||"",t["::ONE~OF"]=n}}else if("object"===e.type||e.properties){t["::title"]=e.title||"",t["::description"]=pF(e,r),t["::type"]="object",(Array.isArray(e.type)&&e.type.includes("null")||e.nullable)&&(t["::dataTypeLabel"]="object or null",t["::nullable"]=!0),t["::deprecated"]=e.deprecated||!1,t["::readwrite"]=e.readOnly?"readonly":e.writeOnly?"writeonly":"";for(const s in e.properties)e.required&&e.required.includes(s)?t[`${s}*`]=uF(e.properties[s],{},r+1):t[s]=uF(e.properties[s],{},r+1);for(const s in e.patternProperties)t[`[pattern: ${s}]`]=uF(e.patternProperties[s],t,r+1);e.additionalProperties&&(t["[any-key]"]=uF(e.additionalProperties,{}))}else{if("array"!==e.type&&!e.items){const t=eF(e);return null!=t&&t.html?`${t.html}`:""}var o;t["::title"]=e.title||"",t["::description"]=pF(e,r),t["::type"]="array",(Array.isArray(e.type)&&e.type.includes("null")||e.nullable)&&(t["::dataTypeLabel"]="array or null",t["::nullable"]=!0),t["::deprecated"]=e.deprecated||!1,t["::readwrite"]=e.readOnly?"readonly":e.writeOnly?"writeonly":"",null!==(o=e.items)&&void 0!==o&&o.items&&(t["::array-type"]=e.items.items.type),t["::props"]=uF(e.items,{},r+1)}return t}}function dF(e,t,r={},s={},n=!0,i=!0,o="json",a=!1){const l=[];if(r)for(const e in r){let s="",n="json";if(null!=t&&t.toLowerCase().includes("json")){if("text"===o)s="string"==typeof r[e].value?r[e].value:JSON.stringify(r[e].value,void 0,2),n="text";else if(s=r[e].value,"string"==typeof r[e].value)try{const t=r[e].value;s=JSON.parse(t),n="json"}catch{n="text",s=r[e].value}}else s=r[e].value,n="text";l.push({exampleId:e,exampleSummary:r[e].summary||e,exampleDescription:r[e].description||"",exampleType:t,exampleValue:s,exampleFormat:n})}else if(s){let e="",r="json";if(null!=t&&t.toLowerCase().includes("json")){if("text"===o)e="string"==typeof s?s:JSON.stringify(s,void 0,2),r="text";else if("object"==typeof s)e=s,r="json";else if("string"==typeof s)try{e=JSON.parse(s),r="json"}catch{r="text",e=s}}else e=s,r="text";l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:e,exampleFormat:r})}if(0===l.length||!0===a)if(e)if(e.example)l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:e.example,exampleFormat:null!=t&&t.toLowerCase().includes("json")&&"object"==typeof e.example?"json":"text"});else if(null!=t&&t.toLowerCase().includes("json")||null!=t&&t.toLowerCase().includes("text")||null!=t&&t.toLowerCase().includes("*/*")||null!=t&&t.toLowerCase().includes("xml")){let r="",s="",a="",u="";var c,p;if(null!=t&&t.toLowerCase().includes("xml"))r=null!==(c=e.xml)&&void 0!==c&&c.name?`<${e.xml.name} ${e.xml.namespace?`xmlns="${e.xml.namespace}"`:""}>`:"<root>",s=null!==(p=e.xml)&&void 0!==p&&p.name?`</${e.xml.name}>`:"</root>",a="text";else a=o;const d=cF(e,{includeReadOnly:n,includeWriteOnly:i,deprecated:!0,useXmlTagForProp:null==t?void 0:t.toLowerCase().includes("xml")});let h=0;for(const e in d){if(!d[e])continue;const n=d[e]["::TITLE"]||"Example "+ ++h,i=d[e]["::DESCRIPTION"]||"";null!=t&&t.toLowerCase().includes("xml")?u=`<?xml version="1.0" encoding="UTF-8"?>\n${r}${nF(d[e],1)}\n${s}`:(oF(d[e]),u="text"===o?JSON.stringify(d[e],null,2):d[e]),l.push({exampleId:e,exampleSummary:n,exampleDescription:i,exampleType:t,exampleFormat:a,exampleValue:u})}}else null!=t&&t.toLowerCase().includes("jose")?l.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:t,exampleValue:e.pattern||"bXJpbg==",exampleFormat:"text"}):l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"});else l.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:t,exampleValue:"",exampleFormat:"text"});return l}function hF(e){return"application/json"===e?"json":"application/xml"===e?"xml":null}function mF(e){if(e.schema)return[e.schema,null,null];if(e.content)for(const t of Object.keys(e.content))if(e.content[t].schema)return[e.content[t].schema,hF(t),e.content[t]];return[null,null,null]}ZR().prototype.randInt=e=>e;customElements.define("json-tree",class extends de{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[et,YR,tt,c`
  1271. :host{
  1272. display:flex;
  1273. }
  1274. :where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
  1275. :where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
  1276. .json-tree {
  1277. position: relative;
  1278. font-family: var(--font-mono);
  1279. font-size: var(--font-size-small);
  1280. display:inline-block;
  1281. overflow:hidden;
  1282. word-break: break-all;
  1283. flex:1;
  1284. line-height: calc(var(--font-size-small) + 6px);
  1285. min-height: 40px;
  1286. direction: ltr;
  1287. text-align: left;
  1288. }
  1289. .open-bracket {
  1290. display:inline-block;
  1291. padding: 0 20px 0 0;
  1292. cursor:pointer;
  1293. border: 1px solid transparent;
  1294. border-radius:3px;
  1295. }
  1296. .close-bracket {
  1297. border: 1px solid transparent;
  1298. border-radius:3px;
  1299. display:inline-block;
  1300. }
  1301. .open-bracket:hover {
  1302. color:var(--primary-color);
  1303. background-color:var(--hover-color);
  1304. border: 1px solid var(--border-color);
  1305. }
  1306. .open-bracket.expanded:hover ~ .inside-bracket {
  1307. border-left: 1px solid var(--fg3);
  1308. }
  1309. .open-bracket.expanded:hover ~ .close-bracket {
  1310. color:var(--primary-color);
  1311. }
  1312. .inside-bracket {
  1313. padding-left:12px;
  1314. overflow: hidden;
  1315. border-left:1px dotted var(--border-color);
  1316. }
  1317. .open-bracket.collapsed + .inside-bracket,
  1318. .open-bracket.collapsed + .inside-bracket + .close-bracket {
  1319. display:none;
  1320. }
  1321. .string{color:var(--green);}
  1322. .number{color:var(--blue);}
  1323. .null{color:var(--red);}
  1324. .boolean{color:var(--purple);}
  1325. .object{color:var(--fg)}
  1326. .toolbar {
  1327. position: absolute;
  1328. top:5px;
  1329. right:6px;
  1330. display:flex;
  1331. padding:2px;
  1332. align-items: center;
  1333. }`,ct]}render(){return J`
  1334. <div class = "json-tree" @click='${e=>{e.target.classList.contains("btn-copy")?ht(JSON.stringify(this.data,null,2),e):this.toggleExpand(e)}}'>
  1335. <div class='toolbar'>
  1336. <button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy"> Copy </button>
  1337. </div>
  1338. ${this.generateTree(this.data,!0)}
  1339. </div>
  1340. `}generateTree(e,t=!1){if(null===e)return J`<span class="null">null</span>${t?"":","}`;if("object"==typeof e&&e instanceof Date==!1){const r=Array.isArray(e)?"array":"pure_object";return 0===Object.keys(e).length?J`${Array.isArray(e)?"[ ],":"{ },"}`:J`
  1341. <div class="open-bracket expanded ${"array"===r?"array":"object"}" > ${"array"===r?"[":"{"}</div>
  1342. <div class="inside-bracket">
  1343. ${Object.keys(e).map(((t,s,n)=>J`
  1344. <div class="item">
  1345. ${"pure_object"===r?J`"${t}":`:""}
  1346. ${this.generateTree(e[t],s===n.length-1)}
  1347. </div>`))}
  1348. </div>
  1349. <div class="close-bracket">${"array"===r?"]":"}"}${t?"":","}</div>
  1350. `}return"string"==typeof e||e instanceof Date?J`<span class="${typeof e}">"${e}"</span>${t?"":","}`:J`<span class="${typeof e}">${e}</span>${t?"":","}`}toggleExpand(e){const t=e.target;e.target.classList.contains("open-bracket")&&(t.classList.contains("expanded")?(t.classList.replace("expanded","collapsed"),e.target.innerHTML=e.target.classList.contains("array")?"[...]":"{...}"):(t.classList.replace("collapsed","expanded"),e.target.innerHTML=e.target.classList.contains("array")?"[":"{"))}});const fF=c`
  1351. *, *:before, *:after { box-sizing: border-box; }
  1352. :host {
  1353. container-type: inline-size;
  1354. }
  1355. .tr {
  1356. display: flex;
  1357. flex: none;
  1358. width: 100%;
  1359. box-sizing: content-box;
  1360. border-bottom: 1px dotted transparent;
  1361. transition: max-height 0.3s ease-out;
  1362. }
  1363. .td {
  1364. display: block;
  1365. flex: 0 0 auto;
  1366. }
  1367. .key {
  1368. font-family: var(--font-mono);
  1369. white-space: normal;
  1370. word-break: break-all;
  1371. }
  1372. .collapsed-all-descr .key {
  1373. overflow:hidden;
  1374. }
  1375. .expanded-all-descr .key-descr .descr-expand-toggle {
  1376. display:none;
  1377. }
  1378. .key-descr .descr-expand-toggle {
  1379. display:inline-block;
  1380. user-select:none;
  1381. color: var(--fg);
  1382. cursor: pointer;
  1383. transform: rotate(45deg);
  1384. transition: transform .2s ease;
  1385. }
  1386. .expanded-descr .key-descr .descr-expand-toggle {
  1387. transform: rotate(270deg)
  1388. }
  1389. .key-descr .descr-expand-toggle:hover {
  1390. color: var(--primary-color);
  1391. }
  1392. .expanded-descr .more-content { display:none; }
  1393. .key-descr {
  1394. font-family:var(--font-regular);
  1395. color:var(--light-fg);
  1396. flex-shrink: 1;
  1397. text-overflow: ellipsis;
  1398. overflow: hidden;
  1399. display: none;
  1400. }
  1401. .expanded-descr .key-descr{
  1402. max-height:auto;
  1403. overflow:hidden;
  1404. display: none;
  1405. }
  1406. .xxx-of-key {
  1407. font-size: calc(var(--font-size-small) - 2px);
  1408. font-weight:bold;
  1409. background-color:var(--primary-color);
  1410. color:var(--primary-color-invert);
  1411. border-radius:2px;
  1412. line-height:calc(var(--font-size-small) + 6px);
  1413. padding:0px 5px;
  1414. margin-bottom:1px;
  1415. display:inline-block;
  1416. }
  1417. .xxx-of-descr {
  1418. font-family: var(--font-regular);
  1419. color: var(--primary-color);
  1420. font-size: calc(var(--font-size-small) - 1px);
  1421. margin-left: 2px;
  1422. }
  1423. .stri, .string, .uri, .url, .byte, .bina, .date, .pass, .ipv4, .ipv4, .uuid, .emai, .host { color:var(--green); }
  1424. .inte, .numb, .number, .int6, .int3, .floa, .doub, .deci .blue { color:var(--blue); }
  1425. .null { color:var(--red); }
  1426. .bool, .boolean { color:var(--orange) }
  1427. .enum { color:var(--purple) }
  1428. .cons { color:var(--purple) }
  1429. .recu { color:var(--brown) }
  1430. .toolbar {
  1431. display:flex;
  1432. width:100%;
  1433. padding: 2px 0;
  1434. color:var(--primary-color);
  1435. }
  1436. .toolbar-item {
  1437. cursor:pointer;
  1438. padding:5px 0;
  1439. margin:0 2px;
  1440. }
  1441. .schema-root-type {
  1442. cursor:auto;
  1443. color:var(--fg2);
  1444. font-weight: bold;
  1445. text-transform: uppercase;
  1446. }
  1447. .toolbar-item:first-of-type { margin:0 2px 0 0;}
  1448. @container (min-width: 500px) {
  1449. .key-descr {
  1450. display: block;
  1451. }
  1452. .expanded-descr .key-descr {
  1453. display: block;
  1454. }
  1455. }
  1456. `;customElements.define("schema-tree",class extends de{static get properties(){return{data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[et,fF,YR,c`
  1457. .tree {
  1458. font-size:var(--font-size-small);
  1459. text-align: left;
  1460. direction: ltr;
  1461. line-height:calc(var(--font-size-small) + 6px);
  1462. }
  1463. .tree .tr:hover{
  1464. background-color:var(--hover-color);
  1465. }
  1466. .collapsed-all-descr .tr:not(.expanded-descr) {
  1467. overflow: hidden;
  1468. max-height:calc(var(--font-size-small) + 8px);
  1469. }
  1470. .tree .key {
  1471. max-width: 300px;
  1472. }
  1473. .tr.expanded:hover > .td.key > .open-bracket {
  1474. color: var(--primary-color);
  1475. }
  1476. .tr.expanded:hover + .inside-bracket {
  1477. border-left: 1px solid var(--fg3);
  1478. }
  1479. .tr.expanded:hover + .inside-bracket + .close-bracket {
  1480. color: var(--primary-color);
  1481. }
  1482. .inside-bracket.xxx-of-option {
  1483. border-left: 1px solid transparent;
  1484. }
  1485. .open-bracket{
  1486. display:inline-block;
  1487. padding: 0 20px 0 0;
  1488. cursor:pointer;
  1489. border: 1px solid transparent;
  1490. border-radius:3px;
  1491. }
  1492. .open-bracket:hover {
  1493. color:var(--primary-color);
  1494. background-color:var(--hover-color);
  1495. border: 1px solid var(--border-color);
  1496. }
  1497. .close-bracket{
  1498. display:inline-block;
  1499. font-family: var(--font-mono);
  1500. }
  1501. .tr.collapsed + .inside-bracket,
  1502. .tr.collapsed + .inside-bracket + .close-bracket{
  1503. overflow: hidden;
  1504. display:none;
  1505. }
  1506. .inside-bracket.object,
  1507. .inside-bracket.array {
  1508. border-left: 1px dotted var(--border-color);
  1509. }`,ct]}render(){var e,t,r;return J`
  1510. <div class="tree ${"true"===this.schemaDescriptionExpanded?"expanded-all-descr":"collapsed-all-descr"}" @click="${e=>this.handleAllEvents(e)}">
  1511. <div class="toolbar">
  1512. <div class="toolbar-item schema-root-type ${(null===(e=this.data)||void 0===e?void 0:e["::type"])||""} "> ${(null===(t=this.data)||void 0===t?void 0:t["::type"])||""} </div>
  1513. ${"true"===this.allowSchemaDescriptionExpandToggle?J`
  1514. <div style="flex:1"></div>
  1515. <div part="schema-toolbar-item schema-multiline-toggle" class='toolbar-item schema-multiline-toggle'>
  1516. ${"true"===this.schemaDescriptionExpanded?"Single line description":"Multiline description"}
  1517. </div>`:""}
  1518. </div>
  1519. <span part="schema-description" class='m-markdown'> ${$R(Xe((null===(r=this.data)||void 0===r?void 0:r["::description"])||""))}</span>
  1520. ${this.data?J`
  1521. ${this.generateTree("array"===this.data["::type"]?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"]||"")}`:J`<span class='mono-font' style='color:var(--red)'> Schema not found </span>`}
  1522. </div>
  1523. `}generateTree(e,t="object",r="",s="",n="",i=0,o=0,a="",l=!1){var c;if("true"===this.schemaHideReadOnly){if("array"===t&&"readonly"===a)return;if("readonly"===(null==e?void 0:e["::readwrite"]))return}if("true"===this.schemaHideWriteOnly){if("array"===t&&"writeonly"===a)return;if("writeonly"===(null==e?void 0:e["::readwrite"]))return}if(!e)return J`<div class="null" style="display:inline;">
  1524. <span class="key-label xxx-of-key"> ${s.replace("::OPTION~","")}</span>
  1525. ${"array"===t?J`<span class='mono-font'> [ ] </span>`:"object"===t?J`<span class='mono-font'> { } </span>`:J`<span class='mono-font'> schema undefined </span>`}
  1526. </div>`;if(0===Object.keys(e).length)return J`<span class="key object">${s}:{ }</span>`;let p="",u="";if(s.startsWith("::ONE~OF")||s.startsWith("::ANY~OF"))p=s.replace("::","").replace("~"," ");else if(s.startsWith("::OPTION")){const e=s.split("~");[,p,u]=e}else p=s;const d=400-12*o;let h="",m="";const f=null!==(c=e["::type"])&&void 0!==c&&c.startsWith("xxx-of")?i:i+1,g="xxx-of-option"===t||"xxx-of-option"===e["::type"]||s.startsWith("::OPTION")?o:o+1;if("object"===e["::type"])"array"===t?(h=i<this.schemaExpandLevel?J`<span class="open-bracket array-of-object" >[{</span>`:J`<span class="open-bracket array-of-object">[{...}]</span>`,m="}]"):(h=i<this.schemaExpandLevel?J`<span class="open-bracket object">${e["::nullable"]?"null┃":""}{</span>`:J`<span class="open-bracket object">${e["::nullable"]?"null┃":""}{...}</span>`,m="}");else if("array"===e["::type"])if("array"===t){const e="object"!==r?r:"";h=i<this.schemaExpandLevel?J`<span class="open-bracket array-of-array" data-array-type="${e}">[[ ${e} </span>`:J`<span class="open-bracket array-of-array" data-array-type="${e}">[[...]]</span>`,m="]]"}else h=i<this.schemaExpandLevel?J`<span class="open-bracket array">[</span>`:J`<span class="open-bracket array">[...]</span>`,m="]";var y;if("object"==typeof e)return J`
  1527. <div class="tr ${i<this.schemaExpandLevel||null!==(y=e["::type"])&&void 0!==y&&y.startsWith("xxx-of")?"expanded":"collapsed"} ${e["::type"]||"no-type-info"}${e["::nullable"]?" nullable":""}" title="${l||e["::deprecated"]?"Deprecated":""}">
  1528. <div class="td key ${l||e["::deprecated"]?"deprecated":""}" style='min-width:${d}px'>
  1529. ${"xxx-of-option"===e["::type"]||"xxx-of-array"===e["::type"]||s.startsWith("::OPTION")?J`<span class='key-label xxx-of-key'> ${p}</span><span class="xxx-of-descr">${u}</span>`:"::props"===p||"::ARRAY~OF"===p?"":i>0?J`<span class="key-label" title="${"readonly"===a?"Read-Only":"writeonly"===a?"Write-Only":""}">
  1530. ${l||e["::deprecated"]?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
  1531. ${p.replace(/\*$/,"")}${p.endsWith("*")?J`<span style="color:var(--red)">*</span>`:""}${"readonly"===a?J` 🆁`:"writeonly"===a?J` 🆆`:a}:
  1532. </span>`:""}
  1533. ${h}
  1534. </div>
  1535. <div class='td key-descr m-markdown-small'>${$R(Xe(n||""))}</div>
  1536. </div>
  1537. <div class='inside-bracket ${e["::type"]||"no-type-info"}' style='padding-left:${"xxx-of-option"===e["::type"]||"xxx-of-array"===e["::type"]?0:12}px;'>
  1538. ${Array.isArray(e)&&e[0]?J`${this.generateTree(e[0],"xxx-of-option","","::ARRAY~OF","",f,g,e[0]["::readwrite"],l||e[0]["::deprecated"])}`:J`
  1539. ${Object.keys(e).map((t=>{var r;return J`
  1540. ${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(t)?"array"===e[t]["::type"]||"object"===e[t]["::type"]?J`${this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],e[t]["::array-type"]||"",t,e[t]["::description"],f,g,e[t]["::readwrite"]?e[t]["::readwrite"]:"",l||e[t]["::deprecated"])}`:"":J`${this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],e[t]["::array-type"]||"",t,(null===(r=e[t])||void 0===r?void 0:r["::description"])||"",f,g,e[t]["::readwrite"]?e[t]["::readwrite"]:"",l||e[t]["::deprecated"])}`}
  1541. `}))}
  1542. `}
  1543. </div>
  1544. ${e["::type"]&&e["::type"].includes("xxx-of")?"":J`<div class='close-bracket'> ${m} </div>`}
  1545. `;const[v,b,x,w,$,S,E,k,A]=e.split("~|~");if("🆁"===b&&"true"===this.schemaHideReadOnly)return;if("🆆"===b&&"true"===this.schemaHideWriteOnly)return;const O=v.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),j=""+(x||w||$||S?`<span class="descr-expand-toggle ${"true"===this.schemaDescriptionExpanded?"expanded-descr":""}">➔</span>`:"");let T="",P="";return"array"===t?"readonly"===a?(T="🆁",P="Read-Only"):"writeonly"===a&&(T="🆆",P="Write-Only"):"🆁"===b?(T="🆁",P="Read-Only"):"🆆"===b&&(T="🆆",P="Write-Only"),J`
  1546. <div class = "tr primitive" title="${A?"Deprecated":""}">
  1547. <div class="td key ${l||A}" style='min-width:${d}px'>
  1548. ${l||A?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
  1549. ${p.endsWith("*")?J`<span class="key-label">${p.substring(0,p.length-1)}</span><span style='color:var(--red);'>*</span>:`:s.startsWith("::OPTION")?J`<span class='key-label xxx-of-key'>${p}</span><span class="xxx-of-descr">${u}</span>`:J`<span class="key-label">${p}:</span>`}
  1550. <span class="${O}" title="${P}">
  1551. ${"array"===t?`[${v}]`:`${v}`}
  1552. ${T}
  1553. </span>
  1554. </div>
  1555. <div class='td key-descr'>
  1556. ${n||k||E?J`${J`<span class="m-markdown-small">
  1557. ${$R(Xe("array"===t?`${j} ${n}`:k?`${j} <b>${k}:</b> ${E}`:`${j} ${E}`))}
  1558. </span>`}`:""}
  1559. ${x?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Constraints: </span>${x}</div>`:""}
  1560. ${w?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${w}</div>`:""}
  1561. ${$?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>${"const"===v?"Value":"Allowed"}: </span>${$}</div>`:""}
  1562. ${S?J`<div style='display:inline-block; line-break: anywhere; margin-right:8px'><span class='bold-text'>Pattern: </span>${S}</div>`:""}
  1563. </div>
  1564. </div>
  1565. `}handleAllEvents(e){if(e.target.classList.contains("open-bracket"))this.toggleObjectExpand(e);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded="true"===this.schemaDescriptionExpanded?"false":"true";else if(e.target.classList.contains("descr-expand-toggle")){const t=e.target.closest(".tr");t&&(t.classList.toggle("expanded-descr"),t.style.maxHeight=t.scrollHeight)}}toggleObjectExpand(e){const t=e.target.closest(".tr"),r=t.classList.contains("nullable");t.classList.contains("expanded")?(t.classList.replace("expanded","collapsed"),e.target.innerHTML=e.target.classList.contains("array-of-object")?"[{...}]":e.target.classList.contains("array-of-array")?"[[...]]":e.target.classList.contains("array")?"[...]":(r?"null┃":"")+"{...}"):(t.classList.replace("collapsed","expanded"),e.target.innerHTML=e.target.classList.contains("array-of-object")?"[{":e.target.classList.contains("array-of-array")?`[[ ${e.target.dataset.arrayType}`:e.target.classList.contains("object")?(r?"null┃":"")+"{":"[")}});customElements.define("tag-input",class extends de{render(){let e="";return Array.isArray(this.value)&&(e=J`${this.value.filter((e=>"string"==typeof e&&""!==e.trim())).map((e=>J`<span class='tag'>${e}</span>`))}`),J`
  1566. <div class='tags'>
  1567. ${e}
  1568. <input type="text" class='editor' @paste="${e=>this.afterPaste(e)}" @keydown="${this.afterKeyDown}" @blur="${this.onBlur}" placeholder="${this.placeholder||""}">
  1569. </div>
  1570. `}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value"}}}attributeChangedCallback(e,t,r){"value"===e&&r&&t!==r&&(this.value=r.split(",").filter((e=>""!==e.trim()))),super.attributeChangedCallback(e,t,r)}afterPaste(e){const t=(e.clipboardData||window.clipboardData).getData("Text"),r=t?t.split(",").filter((e=>""!==e.trim())):"";r&&(Array.isArray(this.value)?this.value=[...this.value,...r]:this.value=r),e.preventDefault()}afterKeyDown(e){13===e.keyCode?(e.stopPropagation(),e.preventDefault(),e.target.value&&(Array.isArray(this.value)?this.value=[...this.value,e.target.value]:this.value=[e.target.value],e.target.value="")):8===e.keyCode&&0===e.target.value.length&&Array.isArray(this.value)&&this.value.length>0&&(this.value.splice(-1),this.value=[...this.value])}onBlur(e){e.target.value&&(Array.isArray(this.value)?this.value=[...this.value,e.target.value]:this.value=[e.target.value],e.target.value="")}static get styles(){return[c`
  1571. .tags {
  1572. display:flex;
  1573. flex-wrap: wrap;
  1574. outline: none;
  1575. padding:0;
  1576. border-radius:var(--border-radius);
  1577. border:1px solid var(--border-color);
  1578. cursor:text;
  1579. overflow:hidden;
  1580. background:var(--input-bg);
  1581. }
  1582. .tag, .editor {
  1583. padding:3px;
  1584. margin:2px;
  1585. }
  1586. .tag{
  1587. border:1px solid var(--border-color);
  1588. background-color:var(--bg3);
  1589. color:var(--fg3);
  1590. border-radius:var(--border-radius);
  1591. word-break: break-all;
  1592. font-size: var(--font-size-small);
  1593. }
  1594. .tag:hover ~ #cursor {
  1595. display: block;
  1596. }
  1597. .editor {
  1598. flex:1;
  1599. border:1px solid transparent;
  1600. color:var(--fg);
  1601. min-width:60px;
  1602. outline: none;
  1603. line-height: inherit;
  1604. font-family:inherit;
  1605. background:transparent;
  1606. font-size: calc(var(--font-size-small) + 1px);
  1607. }
  1608. .editor:focus-visible {
  1609. outline: 1px solid;
  1610. }
  1611. .editor::placeholder {
  1612. color: var(--placeholder-color);
  1613. opacity:1;
  1614. }
  1615. `]}});customElements.define("api-request",class extends de{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={}}static get properties(){return{serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},responseMessage:{type:String,attribute:!1},responseText:{type:String,attribute:!1},responseHeaders:{type:String,attribute:!1},responseStatus:{type:String,attribute:!1},responseUrl:{type:String,attribute:!1},curlSyntax:{type:String,attribute:!1},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:e=>JSON.parse(e),toAttribute:e=>JSON.stringify(e)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},activeResponseTab:{type:String},selectedRequestBodyType:{type:String,attribute:"selected-request-body-type"},selectedRequestBodyExample:{type:String,attribute:"selected-request-body-example"}}}static get styles(){return[st,tt,et,rt,YR,ot,it,c`
  1616. :host {
  1617. container-type: inline-size;
  1618. }
  1619. *, *:before, *:after { box-sizing: border-box; }
  1620. :where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
  1621. :where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
  1622. tag-input:focus-within { outline: 1px solid;}
  1623. .read-mode {
  1624. margin-top: 24px;
  1625. }
  1626. .param-name,
  1627. .param-type {
  1628. margin: 1px 0;
  1629. text-align: right;
  1630. line-height: var(--font-size-small);
  1631. }
  1632. .param-name {
  1633. color: var(--fg);
  1634. font-family: var(--font-mono);
  1635. }
  1636. .param-name.deprecated {
  1637. color: var(--red);
  1638. }
  1639. .param-type{
  1640. color: var(--light-fg);
  1641. font-family: var(--font-regular);
  1642. }
  1643. .param-constraint{
  1644. min-width:100px;
  1645. }
  1646. .param-constraint:empty{
  1647. display:none;
  1648. }
  1649. .top-gap{margin-top:24px;}
  1650. .textarea {
  1651. min-height:220px;
  1652. padding:5px;
  1653. resize:vertical;
  1654. direction: ltr;
  1655. }
  1656. .example:first-child {
  1657. margin-top: -9px;
  1658. }
  1659. .response-message{
  1660. font-weight:bold;
  1661. text-overflow: ellipsis;
  1662. }
  1663. .response-message.error {
  1664. color:var(--red);
  1665. }
  1666. .response-message.success {
  1667. color:var(--blue);
  1668. }
  1669. .file-input-container {
  1670. align-items:flex-end;
  1671. }
  1672. .file-input-container .input-set:first-child .file-input-remove-btn{
  1673. visibility:hidden;
  1674. }
  1675. .file-input-remove-btn{
  1676. font-size:16px;
  1677. color:var(--red);
  1678. outline: none;
  1679. border: none;
  1680. background:none;
  1681. cursor:pointer;
  1682. }
  1683. .v-tab-btn {
  1684. font-size: var(--smal-font-size);
  1685. height:24px;
  1686. border:none;
  1687. background:none;
  1688. opacity: 0.3;
  1689. cursor: pointer;
  1690. padding: 4px 8px;
  1691. }
  1692. .v-tab-btn.active {
  1693. font-weight: bold;
  1694. background: var(--bg);
  1695. opacity: 1;
  1696. }
  1697. @container (min-width: 768px) {
  1698. .textarea {
  1699. padding:8px;
  1700. }
  1701. }
  1702. @container (max-width: 470px) {
  1703. .hide-in-small-screen {
  1704. display:none;
  1705. }
  1706. }
  1707. `,ct]}render(){return J`
  1708. <div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||"true"===this.callback?"read-mode":"view-mode"}">
  1709. <div class=" ${"true"===this.callback?"tiny-title":"req-res-title"} ">
  1710. ${"true"===this.callback?"CALLBACK REQUEST":"REQUEST"}
  1711. </div>
  1712. <div>
  1713. ${HR([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("path")))}
  1714. ${HR([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("query")))}
  1715. ${this.requestBodyTemplate()}
  1716. ${HR([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("header")))}
  1717. ${HR([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("cookie")))}
  1718. ${"false"===this.allowTry?"":J`${this.apiCallTemplate()}`}
  1719. </div>
  1720. </div>
  1721. `}async updated(){"true"===this.showCurlBeforeTry&&this.applyCURLSyntax(this.shadowRoot),"true"===this.webhook&&(this.allowTry="false")}async saveExampleState(){if("focused"===this.renderStyle){[...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((e=>{e.dataset.user_example=e.value}));[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((e=>{e.dataset.user_example=e.value})),this.requestUpdate()}}async updateExamplesFromDataAttr(){if("focused"===this.renderStyle){[...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((e=>{e.value=e.dataset.user_example||e.dataset.example}));[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((e=>{e.value=e.dataset.user_example||e.dataset.example})),this.requestUpdate()}}renderExample(e,t,r){var s,n;return J`
  1722. ${"array"===t?"[":""}
  1723. <a
  1724. part="anchor anchor-param-example"
  1725. style="display:inline-block; min-width:24px; text-align:center"
  1726. class="${"true"===this.allowTry?"":"inactive-link"}"
  1727. data-example-type="${"array"===t?t:"string"}"
  1728. data-example="${e.value&&Array.isArray(e.value)?null===(s=e.value)||void 0===s?void 0:s.join("~|~"):("object"==typeof e.value?JSON.stringify(e.value,null,2):e.value)||""}"
  1729. title="${e.value&&Array.isArray(e.value)?null===(n=e.value)||void 0===n?void 0:n.join("~|~"):("object"==typeof e.value?JSON.stringify(e.value,null,2):e.value)||""}"
  1730. @click="${e=>{const t=e.target.closest("table").querySelector(`[data-pname="${r}"]`);t&&(t.value="array"===e.target.dataset.exampleType?e.target.dataset.example.split("~|~"):e.target.dataset.example)}}"
  1731. > ${e.printableValue||e.value} </a>
  1732. ${"array"===t?"] ":""}
  1733. `}renderShortFormatExamples(e,t,r){return J`${e.map(((e,s)=>J`
  1734. ${0===s?"":"┃"}
  1735. ${this.renderExample(e,t,r)}`))}`}renderLongFormatExamples(e,t,r){return J` <ul style="list-style-type: disclosure-closed;">
  1736. ${e.map((e=>{var s,n;return J`
  1737. <li>
  1738. ${this.renderExample(e,t,r)}
  1739. ${(null===(s=e.summary)||void 0===s?void 0:s.length)>0?J`<span>&lpar;${e.summary}&rpar;</span>`:""}
  1740. ${(null===(n=e.description)||void 0===n?void 0:n.length)>0?J`<p>${$R(Xe(e.description))}</p>`:""}
  1741. </li>
  1742. `}))}
  1743. </ul>`}exampleListTemplate(e,t,r=[]){return J` ${r.length>0?J`<span style="font-weight:bold">Examples: </span>
  1744. ${s=r,s.some((e=>{var t,r;return(null===(t=e.summary)||void 0===t?void 0:t.length)>0||(null===(r=e.description)||void 0===r?void 0:r.length)>0}))?this.renderLongFormatExamples(r,t,e):this.renderShortFormatExamples(r,t,e)}`:""}`;var s}inputParametersTemplate(e){const t=this.parameters?this.parameters.filter((t=>t.in===e)):[];if(0===t.length)return"";let r="";"path"===e?r="PATH PARAMETERS":"query"===e?r="QUERY-STRING PARAMETERS":"header"===e?r="REQUEST HEADERS":"cookie"===e&&(r="COOKIES");const s=[];for(const r of t){const[t,n,i]=mF(r);if(!t)continue;const o=eF(t);if(!o)continue;const a=uF(t,{});let l="form",c=!0,p=!1;"query"!==e&&"header"!==e&&"path"!==e||(r.style&&"form spaceDelimited pipeDelimited".includes(r.style)?l=r.style:n&&(l=n),"boolean"==typeof r.explode&&(c=r.explode),"boolean"==typeof r.allowReserved&&(p=r.allowReserved));const u=rF(tF(r.examples)||tF(r.example)||tF(null==i?void 0:i.example)||tF(null==i?void 0:i.examples)||tF(o.examples)||tF(o.example),o.type);u.exampleVal||"object"!==o.type||(u.exampleVal=dF(t,n||"json",{},{},"true"===this.callback||"true"===this.webhook,"true"!==this.callback&&"true"!==this.webhook,!0,"text")[0].exampleValue);const d="read focused".includes(this.renderStyle)?"200px":"160px";s.push(J`
  1745. <tr title="${r.deprecated?"Deprecated":""}">
  1746. <td rowspan="${"true"===this.allowTry?"1":"2"}" style="width:${d}; min-width:100px;">
  1747. <div class="param-name ${r.deprecated?"deprecated":""}" >
  1748. ${r.deprecated?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
  1749. ${r.required?J`<span style='color:var(--red)'>*</span>`:""}
  1750. ${r.name}
  1751. </div>
  1752. <div class="param-type">
  1753. ${"array"===o.type?`${o.arrayType}`:`${o.format?o.format:o.type}`}
  1754. </div>
  1755. </td>
  1756. ${"true"===this.allowTry?J`
  1757. <td style="min-width:100px;" colspan="${o.default||o.constrain||o.allowedValues||o.pattern?"1":"2"}">
  1758. ${"array"===o.type?J`
  1759. <tag-input class="request-param"
  1760. id = "tag-input-request-param-${r.name}"
  1761. style = "width:100%"
  1762. data-ptype = "${e}"
  1763. data-pname = "${r.name}"
  1764. data-example = "${Array.isArray(u.exampleVal)?u.exampleVal.join("~|~"):u.exampleVal}"
  1765. data-param-serialize-style = "${l}"
  1766. data-param-serialize-explode = "${c}"
  1767. data-param-allow-reserved = "${p}"
  1768. data-x-fill-example = "${r["x-fill-example"]||"yes"}"
  1769. data-array = "true"
  1770. placeholder = "add-multiple &#x21a9;"
  1771. .value="${"no"===r["x-fill-example"]?[]:GR("true"===this.fillRequestFieldsWithExample?Array.isArray(u.exampleVal)?u.exampleVal:[u.exampleVal]:[])}"
  1772. >
  1773. </tag-input>`:"object"===o.type?J`
  1774. <div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
  1775. <div part="tab-btn-row" class="tab-buttons row" @click="${e=>{if("button"===e.target.tagName.toLowerCase()){const t={...this.activeParameterSchemaTabs};t[r.name]=e.target.dataset.tab,this.activeParameterSchemaTabs=t}}}">
  1776. <button part="tab-btn" class="tab-btn ${"example"===this.activeParameterSchemaTabs[r.name]?"active":""}" data-tab = 'example'>EXAMPLE </button>
  1777. <button part="tab-btn" class="tab-btn ${"example"!==this.activeParameterSchemaTabs[r.name]?"active":""}" data-tab = 'schema'>SCHEMA</button>
  1778. </div>
  1779. ${J`<div part="tab-content" class="tab-content col" data-tab = 'example' style="display:${"example"===this.activeParameterSchemaTabs[r.name]?"block":"none"}; padding-left:5px; width:100%">
  1780. <textarea
  1781. id = "textarea-request-param-${r.name}"
  1782. class = "textarea request-param"
  1783. part = "textarea textarea-param"
  1784. data-ptype = "${e}-object"
  1785. data-pname = "${r.name}"
  1786. data-example = "${u.exampleVal}"
  1787. data-param-serialize-style = "${l}"
  1788. data-param-serialize-explode = "${c}"
  1789. data-param-allow-reserved = "${p}"
  1790. data-x-fill-example = "${r["x-fill-example"]||"yes"}"
  1791. spellcheck = "false"
  1792. .textContent="${"no"===r["x-fill-example"]?"":GR("true"===this.fillRequestFieldsWithExample?"object"==typeof u.exampleVal?JSON.stringify(u.exampleVal,null,2):u.exampleVal:"")}"
  1793. style = "resize:vertical; width:100%; height: ${"read focused".includes(this.renderStyle)?"180px":"120px"};"
  1794. @input=${e=>{const t=this.getRequestPanel(e);this.liveCURLSyntaxUpdate(t)}}
  1795. ></textarea>
  1796. </div>`}
  1797. ${J`<div part="tab-content" class="tab-content col" data-tab = 'schema' style="display:${"example"!==this.activeParameterSchemaTabs[r.name]?"block":"none"}; padding-left:5px; width:100%;">
  1798. <schema-tree
  1799. class = 'json'
  1800. style = 'display: block'
  1801. .data = '${a}'
  1802. schema-expand-level = "${this.schemaExpandLevel}"
  1803. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1804. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  1805. schema-hide-read-only = "${this.schemaHideReadOnly.includes(this.method)}"
  1806. schema-hide-write-only = "${this.schemaHideWriteOnly.includes(this.method)}"
  1807. exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
  1808. file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
  1809. anchor:anchor, anchor-param-example:anchor-param-example"
  1810. > </schema-tree>
  1811. </div>`}
  1812. </div>`:J`
  1813. <input type="${"password"===o.format?"password":"text"}" spellcheck="false" style="width:100%"
  1814. id="input-request-param-${r.name}"
  1815. class="request-param"
  1816. part="textbox textbox-param"
  1817. data-ptype="${e}"
  1818. data-pname="${r.name}"
  1819. data-example="${Array.isArray(u.exampleVal)?u.exampleVal.join("~|~"):u.exampleVal}"
  1820. data-param-allow-reserved = "${p}"
  1821. data-x-fill-example = "${r["x-fill-example"]||"yes"}"
  1822. data-array="false"
  1823. .value="${"no"===r["x-fill-example"]?"":GR("true"===this.fillRequestFieldsWithExample?u.exampleVal:"")}"
  1824. @input=${e=>{const t=this.getRequestPanel(e);this.liveCURLSyntaxUpdate(t)}}
  1825. />`}
  1826. </td>`:""}
  1827. ${o.default||o.constrain||o.allowedValues||o.pattern?J`
  1828. <td colspan="${"true"===this.allowTry?"1":"2"}">
  1829. <div class="param-constraint">
  1830. ${o.default?J`<span style="font-weight:bold">Default: </span>${o.default}<br/>`:""}
  1831. ${o.pattern?J`<span style="font-weight:bold">Pattern: </span>${o.pattern}<br/>`:""}
  1832. ${o.constrain?J`${o.constrain}<br/>`:""}
  1833. ${o.allowedValues&&o.allowedValues.split("┃").map(((e,t)=>J`
  1834. ${t>0?"┃":J`<span style="font-weight:bold">Allowed: </span>`}
  1835. ${J`
  1836. <a part="anchor anchor-param-constraint" class = "${"true"===this.allowTry?"":"inactive-link"}"
  1837. data-type="${"array"===o.type?o.type:"string"}"
  1838. data-enum="${e.trim()}"
  1839. @click="${e=>{const t=e.target.closest("table").querySelector(`[data-pname="${r.name}"]`);t&&("array"===e.target.dataset.type?t.value=[e.target.dataset.enum]:t.value=e.target.dataset.enum)}}"
  1840. >${e}</a>`}`))}
  1841. </div>
  1842. </td>`:J`<td></td>`}
  1843. </tr>
  1844. <tr>
  1845. ${"true"===this.allowTry?J`<td style="border:none"> </td>`:""}
  1846. <td colspan="2" style="border:none">
  1847. <span class="m-markdown-small">${$R(Xe(r.description||""))}</span>
  1848. ${this.exampleListTemplate.call(this,r.name,o.type,u.exampleList)}
  1849. </td>
  1850. </tr>
  1851. `)}return J`
  1852. <div class="table-title top-gap">${r}</div>
  1853. <div style="display:block; overflow-x:auto; max-width:100%;">
  1854. <table role="presentation" class="m-table" style="width:100%; word-break:break-word;">
  1855. ${s}
  1856. </table>
  1857. </div>`}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.updateExamplesFromDataAttr(),this.clearResponseData()}onSelectExample(e){this.selectedRequestBodyExample=e.target.value;const t=e.target;window.setTimeout((e=>{const t=e.closest(".example-panel").querySelector(".request-body-param");e.closest(".example-panel").querySelector(".request-body-param-user-input").value=t.innerText;const r=this.getRequestPanel({target:e});this.liveCURLSyntaxUpdate(r)}),0,t)}onMimeTypeChange(e){this.selectedRequestBodyType=e.target.value;const t=e.target;this.selectedRequestBodyExample="",window.setTimeout((e=>{const t=e.closest(".request-body-container").querySelector(".request-body-param");if(t){e.closest(".request-body-container").querySelector(".request-body-param-user-input").value=t.innerText}}),0,t)}requestBodyTemplate(){if(!this.request_body)return"";if(0===Object.keys(this.request_body).length)return"";let e="",t="",r="",s="",n="";const i=[],{content:o}=this.request_body;for(const e in o)i.push({mimeType:e,schema:o[e].schema,example:o[e].example,examples:o[e].examples}),this.selectedRequestBodyType||(this.selectedRequestBodyType=e);return e=1===i.length?"":J`
  1858. <select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change = '${e=>this.onMimeTypeChange(e)}'>
  1859. ${i.map((e=>J`
  1860. <option value = '${e.mimeType}' ?selected = '${e.mimeType===this.selectedRequestBodyType}'>
  1861. ${e.mimeType}
  1862. </option> `))}
  1863. </select>
  1864. `,i.forEach((e=>{let i,o=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))e.mimeType===this.selectedRequestBodyType&&(o=dF(e.schema,e.mimeType,tF(e.examples),tF(e.example),"true"===this.callback||"true"===this.webhook,"true"!==this.callback&&"true"!==this.webhook,"text",!1),this.selectedRequestBodyExample||(this.selectedRequestBodyExample=o.length>0?o[0].exampleId:""),n=J`
  1865. ${n}
  1866. <div class = 'example-panel border-top pad-top-8'>
  1867. ${1===o.length?"":J`
  1868. <select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change='${e=>this.onSelectExample(e)}'>
  1869. ${o.map((e=>J`<option value="${e.exampleId}" ?selected=${e.exampleId===this.selectedRequestBodyExample} >
  1870. ${e.exampleSummary.length>80?e.exampleId:e.exampleSummary?e.exampleSummary:e.exampleId}
  1871. </option>`))}
  1872. </select>
  1873. `}
  1874. ${o.filter((e=>e.exampleId===this.selectedRequestBodyExample)).map((t=>J`
  1875. <div class="example ${t.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example = '${t.exampleId}'>
  1876. ${t.exampleSummary&&t.exampleSummary.length>80?J`<div style="padding: 4px 0"> ${t.exampleSummary} </div>`:""}
  1877. ${t.exampleDescription?J`<div class="m-markdown-small" style="padding: 4px 0"> ${$R(Xe(t.exampleDescription||""))} </div>`:""}
  1878. <!-- This pre(hidden) is to store the original example value, this will remain unchanged when users switches from one example to another, its is used to populate the editable textarea -->
  1879. <pre
  1880. class = "textarea is-hidden request-body-param ${e.mimeType.substring(e.mimeType.indexOf("/")+1)}"
  1881. spellcheck = "false"
  1882. data-ptype = "${e.mimeType}"
  1883. style="width:100%; resize:vertical; display:none"
  1884. >${"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2)}</pre>
  1885. <!-- this textarea is for user to edit the example -->
  1886. <textarea
  1887. class = "textarea request-body-param-user-input"
  1888. part = "textarea textarea-param"
  1889. spellcheck = "false"
  1890. data-ptype = "${e.mimeType}"
  1891. data-example = "${"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2)}"
  1892. data-example-format = "${t.exampleFormat}"
  1893. style="width:100%; resize:vertical;"
  1894. .textContent = "${"true"===this.fillRequestFieldsWithExample?"text"===t.exampleFormat?t.exampleValue:JSON.stringify(t.exampleValue,null,2):""}"
  1895. @input=${e=>{const t=this.getRequestPanel(e);this.liveCURLSyntaxUpdate(t)}}
  1896. @keydown=${e=>{if((10===e.keyCode||13===e.keyCode)&&e.ctrlKey)return this.onTryClick(e)}}
  1897. ></textarea>
  1898. </div>
  1899. `))}
  1900. </div>
  1901. `);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(e.mimeType===this.selectedRequestBodyType){const t=dF(e.schema,e.mimeType,e.examples,e.example,"true"===this.callback||"true"===this.webhook,"true"!==this.callback&&"true"!==this.webhook,"text",!1);e.schema&&(r=this.formDataTemplate(e.schema,e.mimeType,t[0]?t[0].exampleValue:""))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&e.mimeType===this.selectedRequestBodyType&&(t=J`
  1902. <div class = "small-font-size bold-text row">
  1903. <input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file" data-ptype="${e.mimeType}" spellcheck="false" />
  1904. </div>
  1905. `);(e.mimeType.includes("json")||e.mimeType.includes("xml")||e.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(i=uF(e.schema,{}),"table"===this.schemaStyle?s=J`
  1906. ${s}
  1907. <schema-table
  1908. class = '${e.mimeType.substring(e.mimeType.indexOf("/")+1)}'
  1909. style = 'display: ${this.selectedRequestBodyType===e.mimeType?"block":"none"};'
  1910. .data = '${i}'
  1911. schema-expand-level = "${this.schemaExpandLevel}"
  1912. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1913. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  1914. schema-hide-read-only = "${this.schemaHideReadOnly}"
  1915. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  1916. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  1917. > </schema-table>
  1918. `:"tree"===this.schemaStyle&&(s=J`
  1919. ${s}
  1920. <schema-tree
  1921. class = "${e.mimeType.substring(e.mimeType.indexOf("/")+1)}"
  1922. style = "display: ${this.selectedRequestBodyType===e.mimeType?"block":"none"};"
  1923. .data = "${i}"
  1924. schema-expand-level = "${this.schemaExpandLevel}"
  1925. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1926. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  1927. schema-hide-read-only = "${this.schemaHideReadOnly}"
  1928. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  1929. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  1930. > </schema-tree>
  1931. `))})),J`
  1932. <div class='request-body-container' data-selected-request-body-type="${this.selectedRequestBodyType}">
  1933. <div class="table-title top-gap row">
  1934. REQUEST BODY ${this.request_body.required?J`<span class="mono-font" style='color:var(--red)'>*</span>`:""}
  1935. <span style = "font-weight:normal; margin-left:5px"> ${this.selectedRequestBodyType}</span>
  1936. <span style="flex:1"></span>
  1937. ${e}
  1938. </div>
  1939. ${this.request_body.description?J`<div class="m-markdown" style="margin-bottom:12px">${$R(Xe(this.request_body.description))}</div>`:""}
  1940. ${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?J`
  1941. <div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
  1942. <div part="tab-btn-row" class="tab-buttons row" @click="${e=>{"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)}}">
  1943. <button part="tab-btn" class="tab-btn ${"example"===this.activeSchemaTab?"active":""}" data-tab = 'example'>EXAMPLE</button>
  1944. <button part="tab-btn" class="tab-btn ${"example"!==this.activeSchemaTab?"active":""}" data-tab = 'schema'>SCHEMA</button>
  1945. </div>
  1946. ${J`<div part="tab-content" class="tab-content col" style="display:${"example"===this.activeSchemaTab?"block":"none"};"> ${n}</div>`}
  1947. ${J`<div part="tab-content" class="tab-content col" style="display:${"example"===this.activeSchemaTab?"none":"block"};"> ${s}</div>`}
  1948. </div>`:J`
  1949. ${t}
  1950. ${r}`}
  1951. </div>
  1952. `}formDataParamAsObjectTemplate(e,t,r){var s;const n=uF(t,{}),i=dF(t,"json",tF(t.examples),tF(t.example),"true"===this.callback||"true"===this.webhook,"true"!==this.callback&&"true"!==this.webhook,"text",!1);return J`
  1953. <div part="tab-panel" class="tab-panel row" style="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch;">
  1954. <div style="width:24px; background-color:var(--light-border-color)">
  1955. <div class="row" style="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block;" @click="${e=>{if(e.target.classList.contains("v-tab-btn")){const{tab:t}=e.target.dataset;if(t){const r=e.target.closest(".tab-panel"),s=r.querySelector(`.v-tab-btn[data-tab="${t}"]`),n=[...r.querySelectorAll(`.v-tab-btn:not([data-tab="${t}"])`)],i=r.querySelector(`.tab-content[data-tab="${t}"]`),o=[...r.querySelectorAll(`.tab-content:not([data-tab="${t}"])`)];s.classList.add("active"),i.style.display="block",n.forEach((e=>{e.classList.remove("active")})),o.forEach((e=>{e.style.display="none"}))}}"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)}}">
  1956. <button class="v-tab-btn ${"example"===this.activeSchemaTab?"active":""}" data-tab = 'example'>EXAMPLE</button>
  1957. <button class="v-tab-btn ${"example"!==this.activeSchemaTab?"active":""}" data-tab = 'schema'>SCHEMA</button>
  1958. </div>
  1959. </div>
  1960. ${J`
  1961. <div class="tab-content col" data-tab = 'example' style="display:${"example"===this.activeSchemaTab?"block":"none"}; padding-left:5px; width:100%">
  1962. <textarea
  1963. class = "textarea"
  1964. part = "textarea textarea-param"
  1965. style = "width:100%; border:none; resize:vertical;"
  1966. data-array = "false"
  1967. data-ptype = "${r.includes("form-urlencode")?"form-urlencode":"form-data"}"
  1968. data-pname = "${e}"
  1969. data-example = "${(null===(s=i[0])||void 0===s?void 0:s.exampleValue)||""}"
  1970. .textContent = "${"true"===this.fillRequestFieldsWithExample?i[0].exampleValue:""}"
  1971. spellcheck = "false"
  1972. ></textarea>
  1973. </div>`}
  1974. ${J`
  1975. <div class="tab-content col" data-tab = 'schema' style="display:${"example"!==this.activeSchemaTab?"block":"none"}; padding-left:5px; width:100%;">
  1976. <schema-tree
  1977. .data = "${n}"
  1978. schema-expand-level = "${this.schemaExpandLevel}"
  1979. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  1980. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}",
  1981. > </schema-tree>
  1982. </div>`}
  1983. </div>
  1984. `}formDataTemplate(e,t,r=""){const s=[];if(e.properties){for(const r in e.properties){var n,i;const o=e.properties[r];if(o.readOnly)continue;const a=o.examples||o.example||"",l=o.type,c=eF(o),p="read focused".includes(this.renderStyle)?"200px":"160px",u=rF(c.examples||c.example,c.type);s.push(J`
  1985. <tr title="${o.deprecated?"Deprecated":""}">
  1986. <td style="width:${p}; min-width:100px;">
  1987. <div class="param-name ${o.deprecated?"deprecated":""}">
  1988. ${r}${null!==(n=e.required)&&void 0!==n&&n.includes(r)||o.required?J`<span style='color:var(--red);'>*</span>`:""}
  1989. </div>
  1990. <div class="param-type">${c.type}</div>
  1991. </td>
  1992. <td
  1993. style="${"object"===l?"width:100%; padding:0;":"true"===this.allowTry?"":"display:none;"} min-width:100px;"
  1994. colspan="${"object"===l?2:1}">
  1995. ${"array"===l?"binary"===(null===(i=o.items)||void 0===i?void 0:i.format)?J`
  1996. <div class="file-input-container col" style='align-items:flex-end;' @click="${e=>this.onAddRemoveFileInput(e,r,t)}">
  1997. <div class='input-set row'>
  1998. <input
  1999. type = "file"
  2000. part = "file-input"
  2001. style = "width:100%"
  2002. data-pname = "${r}"
  2003. data-ptype = "${t.includes("form-urlencode")?"form-urlencode":"form-data"}"
  2004. data-array = "false"
  2005. data-file-array = "true"
  2006. />
  2007. <button class="file-input-remove-btn"> &#x2715; </button>
  2008. </div>
  2009. <button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:2px 25px 0 0; padding:2px 6px;">ADD</button>
  2010. </div>
  2011. `:J`
  2012. <tag-input
  2013. style = "width:100%"
  2014. data-ptype = "${t.includes("form-urlencode")?"form-urlencode":"form-data"}"
  2015. data-pname = "${r}"
  2016. data-example = "${Array.isArray(a)?a.join("~|~"):a}"
  2017. data-array = "true"
  2018. placeholder = "add-multiple &#x21a9;"
  2019. .value = "${Array.isArray(a)?Array.isArray(a[0])?a[0]:a:[]}"
  2020. >
  2021. </tag-input>
  2022. `:J`
  2023. ${"object"===l?this.formDataParamAsObjectTemplate.call(this,r,o,t):J`
  2024. ${"true"===this.allowTry?J`<input
  2025. .value = "${"true"===this.fillRequestFieldsWithExample?u.exampleVal:""}"
  2026. spellcheck = "false"
  2027. type = "${"binary"===o.format?"file":"password"===o.format?"password":"text"}"
  2028. part = "textbox textbox-param"
  2029. style = "width:100%"
  2030. data-ptype = "${t.includes("form-urlencode")?"form-urlencode":"form-data"}"
  2031. data-pname = "${r}"
  2032. data-example = "${Array.isArray(a)?a[0]:a}"
  2033. data-array = "false"
  2034. />`:""}
  2035. `}`}
  2036. </td>
  2037. ${"object"===l?"":J`
  2038. <td>
  2039. ${c.default||c.constrain||c.allowedValues||c.pattern?J`
  2040. <div class="param-constraint">
  2041. ${c.default?J`<span style="font-weight:bold">Default: </span>${c.default}<br/>`:""}
  2042. ${c.pattern?J`<span style="font-weight:bold">Pattern: </span>${c.pattern}<br/>`:""}
  2043. ${c.constrain?J`${c.constrain}<br/>`:""}
  2044. ${c.allowedValues&&c.allowedValues.split("┃").map(((e,t)=>J`
  2045. ${t>0?"┃":J`<span style="font-weight:bold">Allowed: </span>`}
  2046. ${J`
  2047. <a part="anchor anchor-param-constraint" class = "${"true"===this.allowTry?"":"inactive-link"}"
  2048. data-type="${"array"===c.type?c.type:"string"}"
  2049. data-enum="${e.trim()}"
  2050. @click="${e=>{const t=e.target.closest("table").querySelector(`[data-pname="${r}"]`);t&&("array"===e.target.dataset.type?t.value=[e.target.dataset.enum]:t.value=e.target.dataset.enum)}}"
  2051. >
  2052. ${e}
  2053. </a>`}`))}
  2054. </div>`:""}
  2055. </td>`}
  2056. </tr>
  2057. ${"object"===l?"":J`
  2058. <tr>
  2059. <td style="border:none"> </td>
  2060. <td colspan="2" style="border:none; margin-top:0; padding:0 5px 8px 5px;">
  2061. <span class="m-markdown-small">${$R(Xe(o.description||""))}</span>
  2062. ${this.exampleListTemplate.call(this,r,c.type,u.exampleList)}
  2063. </td>
  2064. </tr>
  2065. `}`)}return J`
  2066. <table role="presentation" style="width:100%;" class="m-table">
  2067. ${s}
  2068. </table>
  2069. `}return J`
  2070. <textarea
  2071. class = "textarea dynamic-form-param ${t}"
  2072. part = "textarea textarea-param"
  2073. spellcheck = "false"
  2074. data-pname="dynamic-form"
  2075. data-ptype="${t}"
  2076. .textContent = "${r}"
  2077. style="width:100%"
  2078. ></textarea>
  2079. ${e.description?J`<span class="m-markdown-small">${$R(Xe(e.description))}</span>`:""}
  2080. `}curlSyntaxTemplate(e="flex"){return J`
  2081. <div class="col m-markdown" style="flex:1; display:${e}; position:relative; max-width: 100%;">
  2082. <button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${e=>{ht(this.curlSyntax.trim().replace(/\\$/,""),e)}}' part="btn btn-fill"> Copy </button>
  2083. <pre style="white-space:pre"><code>${$R(Qe().highlight(this.curlSyntax.trim().replace(/\\$/,""),Qe().languages.shell,"shell"))}</code></pre>
  2084. </div>
  2085. `}apiResponseTabTemplate(){let e="",t="";if(!this.responseIsBlob)if(this.responseHeaders.includes("application/x-ndjson")){e="json";const r=this.responseText.split("\n").map((t=>Qe().highlight(t,Qe().languages[e],e))).join("\n");t=J`<code>${$R(r)}</code>`}else this.responseHeaders.includes("json")?(e="json",t=J`<code>${$R(Qe().highlight(this.responseText,Qe().languages[e],e))}</code>`):this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?(e="html",t=J`<code>${$R(Qe().highlight(this.responseText,Qe().languages[e],e))}</code>`):(e="text",t=J`<code>${this.responseText}</code>`);return J`
  2086. <div class="row" style="font-size:var(--font-size-small); margin:5px 0">
  2087. <div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div>
  2088. <div style="flex:1"></div>
  2089. <button class="m-btn" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button>
  2090. </div>
  2091. <div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
  2092. <div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${e=>{!1!==e.target.classList.contains("tab-btn")&&(this.activeResponseTab=e.target.dataset.tab)}}">
  2093. <button part="tab-btn" class="tab-btn ${"response"===this.activeResponseTab?"active":""}" data-tab = 'response' > RESPONSE</button>
  2094. <button part="tab-btn" class="tab-btn ${"headers"===this.activeResponseTab?"active":""}" data-tab = 'headers' > RESPONSE HEADERS</button>
  2095. ${"true"===this.showCurlBeforeTry?"":J`<button part="tab-btn" class="tab-btn ${"curl"===this.activeResponseTab?"active":""}" data-tab = 'curl'>CURL</button>`}
  2096. </div>
  2097. ${this.responseIsBlob?J`
  2098. <div part="tab-content" class="tab-content col" style="flex:1; display:${"response"===this.activeResponseTab?"flex":"none"};">
  2099. ${"image"===this.responseBlobType?J`<img style="max-height:var(--resp-area-height, 400px); object-fit:contain;" class="mar-top-8" src="${(e=>e??Y)(this.responseBlobUrl)}"></img>`:""}
  2100. <button class="m-btn thin-border mar-top-8" style="width:135px" @click='${e=>{gt(this.responseBlobUrl,this.respContentDisposition)}}' part="btn btn-outline">
  2101. DOWNLOAD
  2102. </button>
  2103. ${"view"===this.responseBlobType||"image"===this.responseBlobType?J`<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${e=>{yt(this.responseBlobUrl)}}' part="btn btn-outline">VIEW (NEW TAB)</button>`:""}
  2104. </div>`:J`
  2105. <div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${"response"===this.activeResponseTab?"flex":"none"};" >
  2106. <button class="toolbar-btn" style="position:absolute; top:12px; right:8px" @click='${e=>{ht(this.responseText,e)}}' part="btn btn-fill"> Copy </button>
  2107. <pre style="white-space:pre; min-height:50px; height:var(--resp-area-height, 400px); resize:vertical; overflow:auto">${t}</pre>
  2108. </div>`}
  2109. <div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${"headers"===this.activeResponseTab?"flex":"none"};" >
  2110. <button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${e=>{ht(this.responseHeaders,e)}}' part="btn btn-fill"> Copy </button>
  2111. <pre style="white-space:pre"><code>${$R(Qe().highlight(this.responseHeaders,Qe().languages.css,"css"))}</code></pre>
  2112. </div>
  2113. ${"true"===this.showCurlBeforeTry?"":this.curlSyntaxTemplate("curl"===this.activeResponseTab?"flex":"none")}
  2114. </div>`}apiCallTemplate(){var e,t;const r=J`
  2115. <div style="display:flex; flex-direction:column;">
  2116. ${this.serverUrl?J`
  2117. <div style="display:flex; align-items:baseline;">
  2118. <div style="font-weight:bold; padding-right:5px;">API Server</div>
  2119. <span class = "gray-text"> ${this.serverUrl} </span>
  2120. </div>
  2121. `:""}
  2122. </div>
  2123. `;return J`
  2124. <div style="display:flex; align-items:flex-end; margin:16px 0; font-size:var(--font-size-small);" part="wrap-request-btn">
  2125. <div class="hide-in-small-screen" style="flex-direction:column; margin:0; width:calc(100% - 60px);">
  2126. <div style="display:flex; flex-direction:row; align-items:center; overflow:hidden;">
  2127. ${r}
  2128. </div>
  2129. <div style="display:flex;">
  2130. <div style="font-weight:bold; padding-right:5px;">Authentication</div>
  2131. ${(null===(e=this.security)||void 0===e?void 0:e.length)>0?J`
  2132. ${this.api_keys.length>0?J`<div style="color:var(--blue); overflow:hidden;">
  2133. ${1===this.api_keys.length?`${null===(t=this.api_keys[0])||void 0===t?void 0:t.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}
  2134. </div>`:J`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span> </div>`}`:J`<span class="gray-text"> Not Required </span>`}
  2135. </div>
  2136. </div>
  2137. ${this.parameters.length>0||this.request_body?J`
  2138. <button class="m-btn thin-border" part="btn btn-outline btn-fill" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">
  2139. FILL EXAMPLE
  2140. </button>
  2141. <button class="m-btn thin-border" part="btn btn-outline btn-clear" style="margin-right:5px;" @click="${this.onClearRequestData}">
  2142. CLEAR
  2143. </button>`:""}
  2144. <button class="m-btn primary thin-border" part="btn btn-try" @click="${this.onTryClick}">TRY</button>
  2145. </div>
  2146. <div class="row" style="font-size:var(--font-size-small); margin:5px 0">
  2147. ${"true"===this.showCurlBeforeTry?this.curlSyntaxTemplate():""}
  2148. </div>
  2149. ${""===this.responseMessage?"":this.apiResponseTabTemplate()}
  2150. `}async onFillRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((e=>{e.dataset.example&&("TAG-INPUT"===e.tagName.toUpperCase()?e.value=e.dataset.example.split("~|~"):e.value=e.dataset.example)}))}async onClearRequestData(e){[...e.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((e=>{e.value=""}))}buildFetchURL(e){let t;const r=[...e.querySelectorAll("[data-ptype='path']")],s=[...e.querySelectorAll("[data-ptype='query']")],n=[...e.querySelectorAll("[data-ptype='query-object']")];t=this.path,r.map((e=>{t=t.replace(`{${e.dataset.pname}}`,encodeURIComponent(e.value))}));const i=new Map,o=[];s.length>0&&s.forEach((e=>{const t=new URLSearchParams;if("true"===e.dataset.paramAllowReserved&&o.push(e.dataset.pname),"false"===e.dataset.array)""!==e.value&&t.append(e.dataset.pname,e.value);else{const{paramSerializeStyle:r,paramSerializeExplode:s}=e.dataset;let n=e.value&&Array.isArray(e.value)?e.value:[];n=Array.isArray(n)?n.filter((e=>""!==e)):[],n.length>0&&("spaceDelimited"===r?t.append(e.dataset.pname,n.join(" ").replace(/^\s|\s$/g,"")):"pipeDelimited"===r?t.append(e.dataset.pname,n.join("|").replace(/^\||\|$/g,"")):"true"===s?n.forEach((r=>{t.append(e.dataset.pname,r)})):t.append(e.dataset.pname,n.join(",").replace(/^,|,$/g,"")))}t.toString()&&i.set(e.dataset.pname,t)})),n.length>0&&n.map((e=>{const t=new URLSearchParams;try{let r={};const{paramSerializeStyle:s,paramSerializeExplode:n,pname:i}=e.dataset;if(r=Object.assign(r,JSON.parse(e.value.replace(/\s+/g," "))),"true"===e.dataset.paramAllowReserved&&o.push(e.dataset.pname),"json xml".includes(s))"json"===s?t.append(e.dataset.pname,JSON.stringify(r)):"xml"===s&&t.append(e.dataset.pname,nF(r));else for(const e in r){const o=`${i}[${e}]`;"object"==typeof r[e]?Array.isArray(r[e])&&("spaceDelimited"===s?t.append(o,r[e].join(" ")):"pipeDelimited"===s?t.append(o,r[e].join("|")):"true"===n?r[e].forEach((e=>{t.append(o,e)})):t.append(o,r[e])):t.append(o,r[e])}}catch{console.error("RapiDoc: unable to parse %s into object",e.value)}t.toString()&&i.set(e.dataset.pname,t)}));let a="";return i.size&&(i.forEach(((e,t)=>{o.includes(t)?(a+=`${t}=`,a+=e.getAll(t).join(`&${t}=`),a+="&"):a+=`${e.toString()}&`})),a=a.slice(0,-1)),0!==a.length&&(t=`${t}${t.includes("?")?"&":"?"}${a}`),this.api_keys.filter((e=>"query"===e.in)).forEach((e=>{t=`${t}${t.includes("?")?"&":"?"}${e.name}=${encodeURIComponent(e.finalKeyValue)}`})),t=`${this.serverUrl.replace(/\/$/,"")}${t}`,t}buildFetchHeaders(e){var t;const r=null===(t=this.closest(".expanded-req-resp-container, .req-resp-container"))||void 0===t?void 0:t.getElementsByTagName("api-response")[0],s=[...e.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],n=e.querySelector(".request-body-container"),i=null==r?void 0:r.selectedMimeType,o=new Headers;if(i?o.append("Accept",i):this.accept&&o.append("Accept",this.accept),this.api_keys.filter((e=>"header"===e.in)).forEach((e=>{o.append(e.name,e.finalKeyValue)})),s.map((e=>{if(e.value)if("header-object"===e.dataset.ptype){const t=JSON.parse(e.value.replace(/\n/g,"").trim()),r="true"===e.dataset.paramSerializeExplode?"=":",",s=Object.keys(t).map((e=>{const s=t[e];return"object"==typeof s?`${e}${r}${JSON.stringify(s)}`:`${e}${r}${s}`})).join(",");o.append(e.dataset.pname,s)}else o.append(e.dataset.pname,e.value)})),n){const e=n.dataset.selectedRequestBodyType;e.includes("form-data")||o.append("Content-Type",e)}return o}buildFetchBodyOptions(e){const t=e.querySelector(".request-body-container"),r={method:this.method.toUpperCase()};if(t){const s=t.dataset.selectedRequestBodyType;if(s.includes("form-urlencoded")){const t=e.querySelector("[data-ptype='dynamic-form']");if(t){const e=t.value,s=new URLSearchParams;let n,i=!0;if(e)try{n=JSON.parse(e)}catch(e){i=!1,console.warn("RapiDoc: Invalid JSON provided",e)}else i=!1;if(i){for(const e in n)s.append(e,JSON.stringify(n[e]));r.body=s}}else{const t=[...e.querySelectorAll("[data-ptype='form-urlencode']")],s=new URLSearchParams;t.filter((e=>"file"!==e.type)).forEach((e=>{if("false"===e.dataset.array)e.value&&s.append(e.dataset.pname,e.value);else{const t=e.value&&Array.isArray(e.value)?e.value.join(","):"";s.append(e.dataset.pname,t)}})),r.body=s}}else if(s.includes("form-data")){const t=new FormData;[...e.querySelectorAll("[data-ptype='form-data']")].forEach((e=>{"false"===e.dataset.array?"file"===e.type&&e.files[0]?t.append(e.dataset.pname,e.files[0],e.files[0].name):e.value&&t.append(e.dataset.pname,e.value):e.value&&Array.isArray(e.value)&&t.append(e.dataset.pname,e.value.join(","))})),r.body=t}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(s)){const t=e.querySelector(".request-body-param-file");null!=t&&t.files[0]&&(r.body=t.files[0])}else if(s.includes("json")||s.includes("xml")||s.includes("text")){const t=e.querySelector(".request-body-param-user-input");null!=t&&t.value&&(r.body=t.value)}}return r}async onTryClick(e){const t=e.target,r=t.closest(".request-panel"),s=this.buildFetchURL(r),n=this.buildFetchBodyOptions(r),i=this.buildFetchHeaders(r);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(s,i,n,r),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),this.fetchCredentials&&(n.credentials=this.fetchCredentials);const o=new AbortController,{signal:a}=o;n.headers=i;const l={url:s,...n};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:l,controller:o}}));const c={method:l.method,headers:l.headers,credentials:l.credentials,body:l.body},p=new Request(l.url,c);let u,d;try{let e,r,s;t.disabled=!0,this.responseText="⌛",this.responseMessage="",this.requestUpdate();const n=performance.now();u=await fetch(p,{signal:a});const i=performance.now();d=u.clone(),t.disabled=!1,this.responseMessage=J`${u.statusText?`${u.statusText}:${u.status}`:u.status} <div style="color:var(--light-fg)"> Took ${Math.round(i-n)} milliseconds </div>`,this.responseUrl=u.url;const o={};u.headers.forEach(((e,t)=>{o[t]=e,this.responseHeaders=`${this.responseHeaders}${t}: ${e}\n`}));let l=u.headers.get("content-type");if(0===(await u.clone().text()).length)this.responseText="";else if(l){if(l=l.split(";")[0].trim(),"application/x-ndjson"===l)this.responseText=await u.text();else if(l.includes("json"))if(/charset=[^"']+/.test(l)){const e=l.split("charset=")[1],t=await u.arrayBuffer();try{s=new TextDecoder(e).decode(t)}catch{s=new TextDecoder("utf-8").decode(t)}try{r=JSON.parse(s),this.responseText=JSON.stringify(r,null,2)}catch{this.responseText=s}}else r=await u.json(),this.responseText=JSON.stringify(r,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(l)?(this.responseIsBlob=!0,this.responseBlobType="download"):/^image/.test(l)?(this.responseIsBlob=!0,this.responseBlobType="image"):/^audio|^image|^video/.test(l)?(this.responseIsBlob=!0,this.responseBlobType="view"):(s=await u.text(),l.includes("xml")?this.responseText=KR()(s,{textNodesOnSameLine:!0,indentor:" "}):this.responseText=s);if(this.responseIsBlob){const t=u.headers.get("content-disposition")||"";let r="filename";if(t){const e=t.match(/filename\*=\s*UTF-8''([^;]+)/);if(e)r=decodeURIComponent(e[1]);else{const e=t.match(/filename="?([^"]+)"?/);e&&(r=e[1])}}this.respContentDisposition=r,e=await u.blob(),this.responseBlobUrl=URL.createObjectURL(e)}}else s=await u.text(),this.responseText=s;this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:p,response:d,responseHeaders:o,responseBody:r||s||e,responseStatus:d.ok}}))}catch(e){t.disabled=!1,"AbortError"===e.name?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:e,request:p}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:e,request:p}})),this.responseMessage=`${e.message} (CORS or Network Issue)`)}this.requestUpdate()}liveCURLSyntaxUpdate(e){this.applyCURLSyntax(e),this.requestUpdate()}onGenerateCURLClick(e){const t=this.getRequestPanel(e);this.applyCURLSyntax(t)}getRequestPanel(e){return e.target.closest(".request-panel")}applyCURLSyntax(e){const t=this.buildFetchURL(e),r=this.buildFetchBodyOptions(e),s=this.buildFetchHeaders(e);this.curlSyntax=this.generateCURLSyntax(t,s,r,e)}generateCURLSyntax(e,t,r,s){let n,i="",o="",a="",l="";const c=s.querySelector(".request-body-container");if(!1===e.startsWith("http")){n=new URL(e,window.location.href).href}else n=e;if(i=`curl -X ${this.method.toUpperCase()} "${n}" \\\n`,t.forEach(((e,r)=>{let s=e.split(",");s=s.map((e=>e.trim())).filter(((e,t)=>s.indexOf(e)===t)),t.set(r,s.join(", "))})),o=Array.from(t).map((([e,t])=>` -H '${e}: ${t}'`)).join("\\\n"),o&&(o=`${o} \\\n`),r.body instanceof URLSearchParams)a=` -d ${r.body.toString()} \\\n`;else if(r.body instanceof File)a=` --data-binary @${r.body.name} \\\n`;else if(r.body instanceof FormData)l=Array.from(r.body).reduce(((e,[t,r])=>{if(r instanceof File)return[...e,` -F "${t}=@${r.name}"`];const s=r.match(/([^,],)/gm);if(s){const r=s.map((e=>`-F "${t}[]=${e}"`));return[...e,...r]}return[...e,` -F "${t}=${r}"`]}),[]).join("\\\n");else if(c&&c.dataset.selectedRequestBodyType){const e=c.dataset.selectedRequestBodyType,t=s.querySelector(".request-body-param-user-input");if(null!=t&&t.value){if(r.body=t.value,e.includes("json"))try{a=` -d '${JSON.stringify(JSON.parse(t.value))}' \\\n`}catch{}a||(a=` -d '${t.value.replace(/'/g,"'\"'\"'")}' \\\n`)}}return`${i}${o}${a}${l}`}onAddRemoveFileInput(e,t,r){if("button"!==e.target.tagName.toLowerCase())return;if(e.target.classList.contains("file-input-remove-btn")){return void e.target.closest(".input-set").remove()}const s=e.target.closest(".file-input-container"),n=document.createElement("div");n.setAttribute("class","input-set row");const i=document.createElement("input");i.type="file",i.style="width:200px; margin-top:2px;",i.setAttribute("data-pname",t),i.setAttribute("data-ptype",r.includes("form-urlencode")?"form-urlencode":"form-data"),i.setAttribute("data-array","false"),i.setAttribute("data-file-array","true");const o=document.createElement("button");o.setAttribute("class","file-input-remove-btn"),o.innerHTML="&#x2715;",n.appendChild(i),n.appendChild(o),s.insertBefore(n,e.target)}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl="")}disconnectedCallback(){this.curlSyntax="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),super.disconnectedCallback()}});customElements.define("schema-table",class extends de{static get properties(){return{schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[et,fF,c`
  2151. .table {
  2152. font-size: var(--font-size-small);
  2153. text-align: left;
  2154. line-height: calc(var(--font-size-small) + 6px);
  2155. }
  2156. .table .tr {
  2157. width: calc(100% - 5px);
  2158. padding: 0 0 0 5px;
  2159. border-bottom: 1px dotted var(--light-border-color);
  2160. }
  2161. .table .td {
  2162. padding: 4px 0;
  2163. }
  2164. .table .key {
  2165. width: 240px;
  2166. }
  2167. .key .key-label {
  2168. font-size: var(--font-size-mono);
  2169. }
  2170. .key.deprecated .key-label {
  2171. color: var(--red);
  2172. }
  2173. .table .key-type {
  2174. white-space: normal;
  2175. width: 150px;
  2176. }
  2177. .collapsed-all-descr .tr:not(.expanded-descr) {
  2178. max-height: calc(var(--font-size-small) + var(--font-size-small));
  2179. }
  2180. .obj-toggle {
  2181. padding: 0 2px;
  2182. border-radius:2px;
  2183. border: 1px solid transparent;
  2184. display: inline-block;
  2185. margin-left: -16px;
  2186. color:var(--primary-color);
  2187. cursor:pointer;
  2188. font-size: calc(var(--font-size-small) + 4px);
  2189. font-family: var(--font-mono);
  2190. background-clip: border-box;
  2191. }
  2192. .obj-toggle:hover {
  2193. border-color: var(--primary-color);
  2194. }
  2195. .tr.expanded + .object-body {
  2196. display:block;
  2197. }
  2198. .tr.collapsed + .object-body {
  2199. display:none;
  2200. }`,ct]}render(){var e,t,r;return J`
  2201. <div class="table ${"true"===this.schemaDescriptionExpanded?"expanded-all-descr":"collapsed-all-descr"}" @click="${e=>this.handleAllEvents(e)}">
  2202. <div class='toolbar'>
  2203. <div class="toolbar-item schema-root-type ${(null===(e=this.data)||void 0===e?void 0:e["::type"])||""} "> ${(null===(t=this.data)||void 0===t?void 0:t["::type"])||""} </div>
  2204. ${"true"===this.allowSchemaDescriptionExpandToggle?J`
  2205. <div style="flex:1"></div>
  2206. <div part="schema-multiline-toggle" class='toolbar-item schema-multiline-toggle' >
  2207. ${"true"===this.schemaDescriptionExpanded?"Single line description":"Multiline description"}
  2208. </div>
  2209. `:""}
  2210. </div>
  2211. <span part="schema-description" class='m-markdown'> ${$R(Xe((null===(r=this.data)||void 0===r?void 0:r["::description"])||""))} </span>
  2212. <div style = 'border:1px solid var(--light-border-color)'>
  2213. <div style='display:flex; background-color: var(--bg2); padding:8px 4px; border-bottom:1px solid var(--light-border-color);'>
  2214. <div class='key' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Field </div>
  2215. <div class='key-type' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Type </div>
  2216. <div class='key-descr' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Description </div>
  2217. </div>
  2218. ${this.data?J`
  2219. ${this.generateTree("array"===this.data["::type"]?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"])}`:""}
  2220. </div>
  2221. </div>
  2222. `}generateTree(e,t="object",r="",s="",n="",i=0,o=0,a="",l=!1){var c,p;if("true"===this.schemaHideReadOnly){if("array"===t&&"readonly"===a)return;if(e&&"readonly"===e["::readwrite"])return}if("true"===this.schemaHideWriteOnly){if("array"===t&&"writeonly"===a)return;if(e&&"writeonly"===e["::readwrite"])return}if(!e)return J`<div class="null" style="display:inline;">
  2223. <span style='margin-left:${16*(i+1)}px'> &nbsp; </span>
  2224. <span class="key-label xxx-of-key"> ${s.replace("::OPTION~","")}</span>
  2225. ${"array"===t?J`<span class='mono-font'> [ ] </span>`:"object"===t?J`<span class='mono-font'> { } </span>`:J`<span class='mono-font'> schema undefined </span>`}
  2226. </div>`;const u=null!==(c=e["::type"])&&void 0!==c&&c.startsWith("xxx-of")?i:i+1,d="xxx-of-option"===t||"xxx-of-option"===e["::type"]||s.startsWith("::OPTION")?o:o+1,h=16*d;if(0===Object.keys(e).length)return J`<span class="td key object" style='padding-left:${h}px'>${s}</span>`;let m="",f="",g=!1;if(s.startsWith("::ONE~OF")||s.startsWith("::ANY~OF"))m=s.replace("::","").replace("~"," "),g=!0;else if(s.startsWith("::OPTION")){const e=s.split("~");m=e[1],f=e[2]}else m=s;let y="";if("object"===e["::type"]?y="array"===t?"array of object":e["::dataTypeLabel"]||e["::type"]:"array"===e["::type"]&&(y="array"===t?"array of array "+("object"!==r?`of ${r}`:""):e["::dataTypeLabel"]||e["::type"]),"object"==typeof e)return J`
  2227. ${u>=0&&s?J`
  2228. <div class='tr ${u<=this.schemaExpandLevel?"expanded":"collapsed"} ${e["::type"]}' data-obj='${m}' title="${l||e["::deprecated"]?"Deprecated":""}">
  2229. <div class="td key ${l||e["::deprecated"]?"deprecated":""}" style='padding-left:${h}px'>
  2230. ${m||f?J`
  2231. <span class='obj-toggle ${u<this.schemaExpandLevel?"expanded":"collapsed"}' data-obj='${m}'>
  2232. ${i<this.schemaExpandLevel?"-":"+"}
  2233. </span>`:""}
  2234. ${"xxx-of-option"===e["::type"]||"xxx-of-array"===e["::type"]||s.startsWith("::OPTION")?J`<span class="xxx-of-key" style="margin-left:-6px">${m}</span><span class="${g?"xxx-of-key":"xxx-of-descr"}">${f}</span>`:m.endsWith("*")?J`<span class="key-label" style="display:inline-block; margin-left:-6px;">${l||e["::deprecated"]?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${m.substring(0,m.length-1)}</span><span style='color:var(--red);'>*</span>`:J`<span class="key-label" style="display:inline-block; margin-left:-6px;">${l||e["::deprecated"]?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${"::props"===m?"":m}</span>`}
  2235. ${"xxx-of"===e["::type"]&&"array"===t?J`<span style="color:var(--primary-color)">ARRAY</span>`:""}
  2236. </div>
  2237. <div class='td key-type' title="${"readonly"===e["::readwrite"]?"Read-Only":"writeonly"===e["::readwrite"]?"Write-Only":""}">
  2238. ${(e["::type"]||"").includes("xxx-of")?"":y}
  2239. ${"readonly"===e["::readwrite"]?" 🆁":"writeonly"===e["::readwrite"]?" 🆆":""}
  2240. </div>
  2241. <div class='td key-descr m-markdown-small' style='line-height:1.7'>${$R(Xe(n||""))}</div>
  2242. </div>`:J`
  2243. ${"array"===e["::type"]&&"array"===t?J`
  2244. <div class='tr'>
  2245. <div class='td key'></div>
  2246. <div class='td key-type'>
  2247. ${r&&"object"!==r?`${t} of ${r}`:t}
  2248. </div>
  2249. <div class='td key-descr'></div>
  2250. </div>`:""}`}
  2251. <div class='object-body'>
  2252. ${Array.isArray(e)&&e[0]?J`${this.generateTree(e[0],"xxx-of-option","","::ARRAY~OF","",u,d,"")}`:J`
  2253. ${Object.keys(e).map((t=>{var r;return J`
  2254. ${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(t)?"array"===e[t]["::type"]||"object"===e[t]["::type"]?J`${this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],e[t]["::array-type"]||"",t,e[t]["::description"],u,d,e[t]["::readwrite"]?e[t]["::readwrite"]:"",l||e[t]["::deprecated"])}`:"":J`${this.generateTree("array"===e[t]["::type"]?e[t]["::props"]:e[t],e[t]["::type"],e[t]["::array-type"]||"",t,(null===(r=e[t])||void 0===r?void 0:r["::description"])||"",u,d,e[t]["::readwrite"]?e[t]["::readwrite"]:"",l||e[t]["::deprecated"])}`}
  2255. `}))}
  2256. `}
  2257. </div>
  2258. `;const[v,b,x,w,$,S,E,k,A]=e.split("~|~");if("🆁"===b&&"true"===this.schemaHideReadOnly)return;if("🆆"===b&&"true"===this.schemaHideWriteOnly)return;const O=v.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),j=""+(x||w||$||S?'<span class="descr-expand-toggle">➔</span>':"");let T="";return T="array"===t?J`
  2259. <div class='td key-type ${O}' title="${"readonly"===a?"Read-Only":"writeonly"===b?"Write-Only":""}">
  2260. [${v}] ${"readonly"===a?"🆁":"writeonly"===a?"🆆":""}
  2261. </div>`:J`
  2262. <div class='td key-type ${O}' title="${"🆁"===b?"Read-Only":"🆆"===b?"Write-Only":""}">
  2263. ${v} ${b}
  2264. </div>`,J`
  2265. <div class = "tr primitive" title="${l||A?"Deprecated":""}">
  2266. <div class="td key ${l||A?"deprecated":""}" style='padding-left:${h}px'>
  2267. ${l||A?J`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
  2268. ${null!==(p=m)&&void 0!==p&&p.endsWith("*")?J`
  2269. <span class="key-label">${m.substring(0,m.length-1)}</span>
  2270. <span style='color:var(--red);'>*</span>`:s.startsWith("::OPTION")?J`<span class='xxx-of-key'>${m}</span><span class="xxx-of-descr">${f}</span>`:J`${m?J`<span class="key-label"> ${m}</span>`:J`<span class="xxx-of-descr">${k}</span>`}`}
  2271. </div>
  2272. ${T}
  2273. <div class='td key-descr' style='font-size: var(--font-size-small)'>
  2274. ${J`<span class="m-markdown-small">
  2275. ${$R(Xe("array"===t?`${j} ${n}`:k?`${j} <b>${k}:</b> ${E}`:`${j} ${E}`))}
  2276. </span>`}
  2277. ${x?J`<div class='' style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Constraints: </span> ${x}</div>`:""}
  2278. ${w?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${w}</div>`:""}
  2279. ${$?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>${"const"===v?"Value":"Allowed"}: </span>${$}</div>`:""}
  2280. ${S?J`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Pattern: </span>${S}</div>`:""}
  2281. </div>
  2282. </div>
  2283. `}handleAllEvents(e){if(e.target.classList.contains("obj-toggle"))this.toggleObjectExpand(e);else if(e.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded="true"===this.schemaDescriptionExpanded?"false":"true";else if(e.target.classList.contains("descr-expand-toggle")){const t=e.target.closest(".tr");t&&(t.classList.toggle("expanded-descr"),t.style.maxHeight=t.scrollHeight)}}toggleObjectExpand(e){const t=e.target.closest(".tr");t.classList.contains("expanded")?(t.classList.add("collapsed"),t.classList.remove("expanded"),e.target.innerText="+"):(t.classList.remove("collapsed"),t.classList.add("expanded"),e.target.innerText="-")}});function gF(e){const t=new Xe.Renderer;return t.heading=(t,r,s,n)=>`<h${r} class="observe-me" id="${e}--${n.slug(s)}">${t}</h${r}>`,t}function yF(e){const t=e.target.closest(".tag-container").querySelector(".tag-description"),r=e.target.closest(".tag-container").querySelector(".tag-icon");if(t&&r){t.classList.contains("expanded")?(t.style.maxHeight=0,t.classList.replace("expanded","collapsed"),r.classList.replace("expanded","collapsed")):(t.style.maxHeight=`${t.scrollHeight}px`,t.classList.replace("collapsed","expanded"),r.classList.replace("collapsed","expanded"))}}function vF(e,t="",r=""){var s,n,i,o,a,l,c,p,u;const d=new Set;for(const t in e.responses)for(const r in null===(h=e.responses[t])||void 0===h?void 0:h.content){var h;d.add(r.trim())}const m=[...d].join(", "),f=this.resolvedSpec.securitySchemes.filter((t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some((e=>t.securitySchemeId in e)))}))||[],g=this.resolvedSpec.securitySchemes.find((e=>e.securitySchemeId===ut&&"-"!==e.value));g&&f.push(g);const y=e.xCodeSamples?NR.call(this,e.xCodeSamples):"";return J`
  2284. ${"read"===this.renderStyle?J`<div class='divider' part="operation-divider"></div>`:""}
  2285. <div class='expanded-endpoint-body observe-me ${e.method} ${e.deprecated?"deprecated":""} ' part="section-operation ${e.elementId}" id='${e.elementId}'>
  2286. ${"focused"===this.renderStyle&&"General ⦂"!==t?J`
  2287. <div class="tag-container" part="section-operation-tag">
  2288. <span class="upper" style="font-weight:bold; font-size:18px;"> ${t} </span>
  2289. ${r?J`
  2290. <svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary-color); vertical-align:top; cursor:pointer"
  2291. @click="${e=>{yF.call(this,e)}}"
  2292. >
  2293. <path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path>
  2294. </svg>
  2295. <div class="tag-description collapsed" style="max-height:0px; overflow:hidden; margin-top:16px; border:1px solid var(--border-color)">
  2296. <div class="m-markdown" style="padding:8px"> ${$R(Xe(r))}</div>
  2297. </div>`:""}
  2298. </div>
  2299. `:""}
  2300. ${e.deprecated?J`<div class="bold-text red-text"> DEPRECATED </div>`:""}
  2301. ${J`
  2302. ${e.xBadges&&(null===(s=e.xBadges)||void 0===s?void 0:s.length)>0?J`
  2303. <div style="display:flex; flex-wrap:wrap; margin-bottom: -24px; font-size: var(--font-size-small);">
  2304. ${e.xBadges.map((e=>"none"===e.color?"":J`<span style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${e.color}, var(--input-bg)); color:var(--${e.color}); border:1px solid var(--${e.color})">${e.label}</span>`))}
  2305. </div>
  2306. `:""}
  2307. <h2 part="section-operation-summary"> ${e.shortSummary||`${e.method.toUpperCase()} ${e.path}`}</h2>
  2308. ${e.isWebhook?J`<span part="section-operation-webhook" style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`:J`
  2309. <div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)">
  2310. <span part="label-operation-method" class="regular-font upper method-fg bold-text ${e.method}">${e.method}</span>
  2311. <span part="label-operation-path">${e.path}</span>
  2312. </div>
  2313. `}
  2314. <slot name="${e.elementId}"></slot>`}
  2315. ${e.description?J`<div class="m-markdown"> ${$R(Xe(e.description))}</div>`:""}
  2316. ${qR.call(this,e.security)}
  2317. ${null!==(n=e.externalDocs)&&void 0!==n&&n.url||null!==(i=e.externalDocs)&&void 0!==i&&i.description?J`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
  2318. <div class="m-markdown"> ${$R(Xe((null===(o=e.externalDocs)||void 0===o?void 0:o.description)||""))} </div>
  2319. ${null!==(a=e.externalDocs)&&void 0!==a&&a.url?J`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${null===(l=e.externalDocs)||void 0===l?void 0:l.url}" target="_blank">
  2320. ${null===(c=e.externalDocs)||void 0===c?void 0:c.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
  2321. </a>`:""}
  2322. </div>`:""}
  2323. ${y}
  2324. <div class='expanded-req-resp-container'>
  2325. <api-request
  2326. class = "${this.renderStyle}-mode"
  2327. style = "width:100%;"
  2328. webhook = "${e.isWebhook}"
  2329. method = "${e.method}"
  2330. path = "${e.path}"
  2331. .security = "${e.security}"
  2332. .parameters = "${e.parameters}"
  2333. .request_body = "${e.requestBody}"
  2334. .api_keys = "${f}"
  2335. .servers = "${e.servers}"
  2336. server-url = "${(null===(p=e.servers)||void 0===p||null===(p=p[0])||void 0===p?void 0:p.url)||(null===(u=this.selectedServer)||void 0===u?void 0:u.computedUrl)}"
  2337. fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
  2338. allow-try = "${this.allowTry}"
  2339. show-curl-before-try = "${this.showCurlBeforeTry}"
  2340. accept = "${m}"
  2341. render-style="${this.renderStyle}"
  2342. schema-style = "${this.schemaStyle}"
  2343. active-schema-tab = "${this.defaultSchemaTab}"
  2344. schema-expand-level = "${this.schemaExpandLevel}"
  2345. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2346. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2347. schema-hide-read-only = "${"never"===this.schemaHideReadOnly||e.isWebhook?"false":"true"}"
  2348. schema-hide-write-only = "${"never"===this.schemaHideWriteOnly?"false":e.isWebhook?"true":"false"}"
  2349. fetch-credentials = "${this.fetchCredentials}"
  2350. exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
  2351. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  2352. file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
  2353. anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2354. > </api-request>
  2355. ${e.callbacks?UR.call(this,e.callbacks):""}
  2356. <api-response
  2357. class = "${this.renderStyle}-mode"
  2358. style = "width:100%;"
  2359. webhook = "${e.isWebhook}"
  2360. .responses = "${e.responses}"
  2361. render-style = "${this.renderStyle}"
  2362. schema-style = "${this.schemaStyle}"
  2363. active-schema-tab = "${this.defaultSchemaTab}"
  2364. schema-expand-level = "${this.schemaExpandLevel}"
  2365. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2366. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2367. schema-hide-read-only = "${"never"===this.schemaHideReadOnly?"false":e.isWebhook?"true":"false"}"
  2368. schema-hide-write-only = "${"never"===this.schemaHideWriteOnly||e.isWebhook?"false":"true"}"
  2369. selected-status = "${Object.keys(e.responses||{})[0]||""}"
  2370. exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
  2371. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  2372. schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2373. > </api-response>
  2374. </div>
  2375. </div>
  2376. `}function bF(){return this.resolvedSpec?J`
  2377. ${this.resolvedSpec.tags.map((e=>J`
  2378. <section id="${e.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary-color);">
  2379. <div class="title tag" part="section-tag-title label-tag-title">${e.displayName||e.name}</div>
  2380. <slot name="${e.elementId}"></slot>
  2381. <div class="regular-font-size">
  2382. ${$R(`\n <div class="m-markdown regular-font">\n ${Xe(e.description||"","true"===this.infoDescriptionHeadingsInNavBar?{renderer:gF(e.elementId)}:void 0)}\n </div>`)}
  2383. </div>
  2384. </section>
  2385. <section class="regular-font section-gap--read-mode" part="section-operations-in-tag">
  2386. ${e.paths.map((e=>vF.call(this,e)))}
  2387. </section>
  2388. `))}
  2389. `:""}function xF(e){return J`
  2390. <div class='divider'></div>
  2391. <div class='expanded-endpoint-body observe-me ${e.name}' id='cmp--${e.id}' >
  2392. <div style="font-weight:bold"> ${e.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400;"> Schema </span></div>
  2393. ${"table"===this.schemaStyle?J`
  2394. <schema-table
  2395. .data = '${uF(e.component,{})}'
  2396. schema-expand-level = "${this.schemaExpandLevel}"
  2397. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2398. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2399. schema-hide-read-only = "false"
  2400. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  2401. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2402. > </schema-table>`:J`
  2403. <schema-tree
  2404. .data = '${uF(e.component,{})}'
  2405. schema-expand-level = "${this.schemaExpandLevel}"
  2406. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2407. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2408. schema-hide-read-only = "false"
  2409. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  2410. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2411. > </schema-tree>`}
  2412. </div>`}function wF(e,t){return-1!==e.id.indexOf("schemas-")?xF.call(this,e):J`
  2413. <div class='divider'></div>
  2414. <div class='expanded-endpoint-body observe-me ${e.name}' id='cmp--${e.id}' >
  2415. ${J`
  2416. <div style="font-weight:bold"> ${e.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400"> ${t} </span> </div>
  2417. ${e.component?J`
  2418. <div class='mono-font regular-font-size' style='padding: 8px 0; color:var(--fg2)'>
  2419. <json-tree class="border tree" render-style='${this.renderStyle}' .data="${e.component}"> </json-tree>
  2420. </div>`:""}
  2421. `}
  2422. </div>
  2423. `}function $F(){return this.resolvedSpec?J`
  2424. ${this.resolvedSpec.components.map((e=>J`
  2425. <div id="cmp--${e.name.toLowerCase()}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
  2426. <div class="title tag">${e.name}</div>
  2427. <div class="regular-font-size">
  2428. ${$R(`<div class='m-markdown regular-font'>${Xe(e.description?e.description:"")}</div>`)}
  2429. </div>
  2430. </div>
  2431. <div class='regular-font section-gap--read-mode'>
  2432. ${e.subComponents.filter((e=>!1!==e.expanded)).map((t=>wF.call(this,t,e.name)))}
  2433. </div>
  2434. `))}
  2435. `:""}function SF(){const e=new Xe.Renderer;return e.heading=(e,t,r,s)=>`<h${t} class="observe-me" id="overview--${s.slug(r)}">${e}</h${t}>`,e}function EF(){var e,t,r,s;return J`
  2436. <section id="overview" part="section-overview"
  2437. class="observe-me ${"view"===this.renderStyle?"section-gap":"section-gap--read-mode"}">
  2438. ${null!==(e=this.resolvedSpec)&&void 0!==e&&e.info?J`
  2439. <div id="api-title" part="section-overview-title" style="font-size:32px">
  2440. ${this.resolvedSpec.info.title}
  2441. ${this.resolvedSpec.info.version?J`
  2442. <span style = 'font-size:var(--font-size-small);font-weight:bold'>
  2443. ${this.resolvedSpec.info.version}
  2444. </span>`:""}
  2445. </div>
  2446. <div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px); margin-top:8px;">
  2447. ${null!==(t=this.resolvedSpec.info.contact)&&void 0!==t&&t.email?J`<span>${this.resolvedSpec.info.contact.name||"Email"}:
  2448. <a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a>
  2449. </span>`:""}
  2450. ${null!==(r=this.resolvedSpec.info.contact)&&void 0!==r&&r.url?J`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""}
  2451. ${this.resolvedSpec.info.license?J`<span>License:
  2452. ${this.resolvedSpec.info.license.url?J`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name} </span>`:""}
  2453. ${this.resolvedSpec.info.termsOfService?J`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}
  2454. ${this.specUrl&&"true"===this.allowSpecFileDownload?J`
  2455. <div style="display:flex; margin:12px 0; gap:8px; justify-content: start;">
  2456. <button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click='${e=>{gt(this.specUrl,"openapi-spec")}}'>Download OpenAPI spec</button>
  2457. ${null!==(s=this.specUrl)&&void 0!==s&&s.trim().toLowerCase().endsWith("json")?J`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click='${e=>{yt(this.specUrl)}}'>View OpenAPI spec (New Tab)</button>`:""}
  2458. </div>`:""}
  2459. </div>
  2460. <slot name="overview"></slot>
  2461. <div id="api-description">
  2462. ${this.resolvedSpec.info.description?J`${$R(`\n <div class="m-markdown regular-font">\n ${Xe(this.resolvedSpec.info.description,"true"===this.infoDescriptionHeadingsInNavBar?{renderer:SF()}:void 0)}\n </div>`)}`:""}
  2463. </div>
  2464. `:""}
  2465. </section>
  2466. `}function kF(e){var t;const r=null===(t=this.resolvedSpec)||void 0===t?void 0:t.servers.find((t=>t.url===e));return!!r&&(this.selectedServer=r,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:r}})),!0)}function AF(e,t){const r=[...e.currentTarget.closest("table").querySelectorAll("input, select")];let s=t.url;r.forEach((e=>{const t=new RegExp(`{${e.dataset.var}}`,"g");s=s.replace(t,e.value)})),t.computedUrl=s,this.requestUpdate()}function OF(){return this.selectedServer&&this.selectedServer.variables?J`
  2467. <div class="table-title">SERVER VARIABLES</div>
  2468. <table class='m-table' role='presentation'>
  2469. ${Object.entries(this.selectedServer.variables).map((e=>J`
  2470. <tr>
  2471. <td style="vertical-align: middle;" >${e[0]}</td>
  2472. <td>
  2473. ${e[1].enum?J`
  2474. <select
  2475. data-var = "${e[0]}"
  2476. @input = ${e=>{AF.call(this,e,this.selectedServer)}}
  2477. >
  2478. ${Object.entries(e[1].enum).map((t=>e[1].default===t[1]?J`
  2479. <option
  2480. selected
  2481. label = ${t[1]}
  2482. value = ${t[1]}
  2483. />`:J`
  2484. <option
  2485. label = ${t[1]}
  2486. value = ${t[1]}
  2487. />`))}
  2488. </select>`:J`
  2489. <input
  2490. type = "text"
  2491. part="textbox textbox-server-var"
  2492. spellcheck = "false"
  2493. data-var = "${e[0]}"
  2494. value = "${e[1].default}"
  2495. @input = ${e=>{AF.call(this,e,this.selectedServer)}}
  2496. />`}
  2497. </td>
  2498. </tr>
  2499. ${e[1].description?J`<tr><td colspan="2" style="border:none"><span class="m-markdown-small"> ${$R(Xe(e[1].description))} </span></td></tr>`:""}
  2500. `))}
  2501. </table>
  2502. `:""}function jF(){var e,t,r;return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":J`
  2503. <section id = 'servers' part="section-servers" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class='regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}'>
  2504. <div part = "section-servers-title" class = "sub-title">API SERVER</div>
  2505. <div class = 'mono-font' style='margin: 12px 0; font-size:calc(var(--font-size-small) + 1px);'>
  2506. ${this.resolvedSpec.servers&&0!==(null===(e=this.resolvedSpec.servers)||void 0===e?void 0:e.length)?J`
  2507. ${null===(t=this.resolvedSpec)||void 0===t?void 0:t.servers.map(((e,t)=>J`
  2508. <input type = 'radio'
  2509. name = 'api_server'
  2510. id = 'srvr-opt-${t}'
  2511. value = '${e.url}'
  2512. @change = ${()=>{kF.call(this,e.url)}}
  2513. .checked = '${this.selectedServer.url===e.url}'
  2514. style = 'margin:4px 0; cursor:pointer'
  2515. />
  2516. <label style='cursor:pointer' for='srvr-opt-${t}'>
  2517. ${e.url} ${e.description?J`- <span class='regular-font'>${e.description} </span>`:""}
  2518. </label>
  2519. <br/>
  2520. `))}
  2521. `:""}
  2522. <div class="table-title primary-text" part="label-selected-server"> SELECTED: ${(null===(r=this.selectedServer)||void 0===r?void 0:r.computedUrl)||"none"}</div>
  2523. </div>
  2524. <slot name="servers"></slot>
  2525. ${OF.call(this)}
  2526. </section>`}function TF(e,t="toggle"){const r=null==e?void 0:e.closest(".nav-bar-tag-and-paths"),s=null==r?void 0:r.querySelector(".nav-bar-paths-under-tag");if(r){const e=r.classList.contains("expanded");!e||"toggle"!==t&&"collapse"!==t?e||"toggle"!==t&&"expand"!==t||(r.classList.replace("collapsed","expanded"),s.style.maxHeight=`${s.scrollHeight}px`):(s.style.maxHeight=0,r.classList.replace("expanded","collapsed"))}}function PF(e){var t,r,s,n;if("click"!==e.type&&("keyup"!==e.type||13!==e.keyCode))return;const i=e.target;e.stopPropagation(),"navigate"===(null===(t=i.dataset)||void 0===t?void 0:t.action)?this.scrollToEventTarget(e,!1):"expand-all"===(null===(r=i.dataset)||void 0===r?void 0:r.action)||"collapse-all"===(null===(s=i.dataset)||void 0===s?void 0:s.action)?function(e,t="expand-all"){if("click"!==e.type&&("keyup"!==e.type||13!==e.keyCode))return;const r=[...e.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];"expand-all"===t?r.forEach((e=>{const t=e.querySelector(".nav-bar-paths-under-tag");e.classList.replace("collapsed","expanded"),t.style.maxHeight=`${null==t?void 0:t.scrollHeight}px`})):r.forEach((e=>{e.classList.replace("expanded","collapsed"),e.querySelector(".nav-bar-paths-under-tag").style.maxHeight=0}))}(e,i.dataset.action):"expand-collapse-tag"===(null===(n=i.dataset)||void 0===n?void 0:n.action)&&TF(i,"toggle")}function CF(){var e,t;return!this.resolvedSpec||this.resolvedSpec.specLoadError?J`
  2527. <nav class='nav-bar' part='section-navbar'>
  2528. <slot name='nav-logo' class='logo'></slot>
  2529. </nav>
  2530. `:J`
  2531. <nav class='nav-bar ${this.renderStyle}' part='section-navbar'>
  2532. <slot name='nav-logo' class='logo'></slot>
  2533. ${"false"===this.allowSearch&&"false"===this.allowAdvancedSearch?"":J`
  2534. <div style='display:flex; flex-direction:row; justify-content:center; align-items:stretch; padding:8px 24px 12px 24px; ${"false"===this.allowAdvancedSearch?"border-bottom: 1px solid var(--nav-hover-bg-color)":""}' part='section-navbar-search'>
  2535. ${"false"===this.allowSearch?"":J`
  2536. <div style = 'display:flex; flex:1; line-height:22px;'>
  2537. <input id = 'nav-bar-search'
  2538. part = 'textbox textbox-nav-filter'
  2539. style = 'width:100%; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)'
  2540. type = 'text'
  2541. placeholder = 'Filter'
  2542. @change = '${this.onSearchChange}'
  2543. spellcheck = 'false'
  2544. >
  2545. <div style='margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;'>&#x21a9;</div>
  2546. </div>
  2547. ${this.searchVal?J`
  2548. <button @click = '${this.onClearSearch}' class='m-btn thin-border' style='margin-left:5px; color:var(--nav-text-color); width:75px; padding:6px 8px;' part='btn btn-outline btn-clear-filter'>
  2549. CLEAR
  2550. </button>`:""}
  2551. `}
  2552. ${"false"===this.allowAdvancedSearch||this.searchVal?"":J`
  2553. <button class='m-btn primary' part='btn btn-fill btn-search' style='margin-left:5px; padding:6px 8px; width:75px' @click='${this.onShowSearchModalClicked}'>
  2554. SEARCH
  2555. </button>
  2556. `}
  2557. </div>
  2558. `}
  2559. ${J`<nav class='nav-scroll' tabindex='-1' part='section-navbar-scroll' @click='${e=>PF.call(this,e)}' @keyup='${e=>PF.call(this,e)}' >
  2560. ${"false"!==this.showInfo&&this.resolvedSpec.info?J`
  2561. ${"true"===this.infoDescriptionHeadingsInNavBar?J`
  2562. ${this.resolvedSpec.infoDescriptionHeaders.length>0?J`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-content-id='overview' data-action='navigate' tabindex='0' part='section-navbar-item section-navbar-overview'>
  2563. ${(null===(e=this.resolvedSpec.info)||void 0===e||null===(e=e.title)||void 0===e?void 0:e.trim())||"Overview"}
  2564. </div>`:""}
  2565. <div class='overview-headers'>
  2566. ${this.resolvedSpec.infoDescriptionHeaders.map((e=>J`
  2567. <div
  2568. class='nav-bar-h${e.depth} ${this.navActiveItemMarker}'
  2569. id='link-overview--${(new Xe.Slugger).slug(e.text)}'
  2570. data-action='navigate'
  2571. data-content-id='overview--${(new Xe.Slugger).slug(e.text)}'
  2572. >
  2573. ${e.text}
  2574. </div>`))}
  2575. </div>
  2576. ${this.resolvedSpec.infoDescriptionHeaders.length>0?J`<hr style='border-top: 1px solid var(--nav-hover-bg-color); border-width:1px 0 0 0; margin: 15px 0 0 0'/>`:""}
  2577. `:J`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-action='navigate' data-content-id='overview' tabindex='0'>
  2578. ${(null===(t=this.resolvedSpec.info)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.trim())||"Overview"}
  2579. </div>`}
  2580. `:""}
  2581. ${"false"===this.allowServerSelection?"":J`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-servers' data-action='navigate' data-content-id='servers' tabindex='0' part='section-navbar-item section-navbar-servers'> API Servers </div>`}
  2582. ${"false"!==this.allowAuthentication&&this.resolvedSpec.securitySchemes?J`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-auth' data-action='navigate' data-content-id='auth' tabindex='0' part='section-navbar-item section-navbar-auth'> Authentication </div>`:""}
  2583. <div id='link-operations-top' class='nav-bar-section operations' data-action='navigate' data-content-id='${"focused"===this.renderStyle?"":"operations-top"}' part='section-navbar-item section-navbar-operations-top'>
  2584. <div style='font-size:16px; display:flex; margin-left:10px;'>
  2585. ${"focused"===this.renderStyle?J`
  2586. <div class='nav-bar-expand-all'
  2587. data-action='expand-all'
  2588. tabindex='0'
  2589. title='Expand all'
  2590. >▸</div>
  2591. <div class='nav-bar-collapse-all'
  2592. data-action='collapse-all'
  2593. tabindex='0'
  2594. title='Collapse all'
  2595. >▸</div>`:""}
  2596. </div>
  2597. <div class='nav-bar-section-title'> OPERATIONS </div>
  2598. </div>
  2599. <!-- TAGS AND PATHS-->
  2600. ${this.resolvedSpec.tags.filter((e=>e.paths.filter((t=>mt(this.searchVal,t,e.name))).length)).map((e=>{var t;return J`
  2601. <div class='nav-bar-tag-and-paths ${"read"===this.renderStyle||e.expanded?"expanded":"collapsed"}' >
  2602. ${"General ⦂"===e.name?J`<hr style='border:none; border-top: 1px dotted var(--nav-text-color); opacity:0.3; margin:-1px 0 0 0;'/>`:J`
  2603. <div
  2604. class='nav-bar-tag ${this.navActiveItemMarker}'
  2605. part='section-navbar-item section-navbar-tag'
  2606. id='link-${e.elementId}'
  2607. data-action='${"read"===this.renderStyle||"show-description"===this.onNavTagClick?"navigate":"expand-collapse-tag"}'
  2608. data-content-id='${("read"===this.renderStyle?`${e.elementId}`:"show-description"===this.onNavTagClick)?`${e.elementId}`:""}'
  2609. data-first-path-id='${e.firstPathId}'
  2610. tabindex='0'
  2611. >
  2612. <div style="pointer-events:none;">${e.displayName||e.name}</div>
  2613. <div class='nav-bar-tag-icon' tabindex='0' data-action='expand-collapse-tag'></div>
  2614. </div>
  2615. `}
  2616. ${"true"===this.infoDescriptionHeadingsInNavBar?J`
  2617. ${"focused"===this.renderStyle&&"expand-collapse"===this.onNavTagClick?"":J`
  2618. <div class='tag-headers'>
  2619. ${e.headers.map((t=>J`
  2620. <div
  2621. class='nav-bar-h${t.depth} ${this.navActiveItemMarker}'
  2622. part='section-navbar-item section-navbar-h${t.depth}'
  2623. id='link-${e.elementId}--${(new Xe.Slugger).slug(t.text)}'
  2624. data-action='navigate'
  2625. data-content-id='${e.elementId}--${(new Xe.Slugger).slug(t.text)}'
  2626. tabindex='0'
  2627. > ${t.text}</div>`))}
  2628. </div>`}`:""}
  2629. <div class='nav-bar-paths-under-tag' style='max-height:${e.expanded||"read"===this.renderStyle?50*((null===(t=e.paths)||void 0===t?void 0:t.length)||1):0}px;'>
  2630. <!-- Paths in each tag (endpoints) -->
  2631. ${e.paths.filter((t=>!this.searchVal||mt(this.searchVal,t,e.name))).map((e=>J`
  2632. <div
  2633. class='nav-bar-path ${this.navActiveItemMarker} ${"true"===this.usePathInNavBar?"small-font":""}'
  2634. part='section-navbar-item section-navbar-path'
  2635. data-action='navigate'
  2636. data-content-id='${e.elementId}'
  2637. id='link-${e.elementId}'
  2638. tabindex='0'
  2639. >
  2640. <span style = 'display:flex; pointer-events: none; align-items:start; ${e.deprecated?"filter:opacity(0.5)":""}'>
  2641. ${J`<span class='nav-method ${this.showMethodInNavBar} ${e.method}' style='pointer-events: none;'>
  2642. ${"as-colored-block"===this.showMethodInNavBar?e.method.substring(0,3).toUpperCase():e.method.toUpperCase()}
  2643. </span>`}
  2644. ${e.isWebhook?J`<span style='font-weight:bold; pointer-events: none; margin-right:8px; font-size: calc(var(--font-size-small) - 2px)'>WEBHOOK</span>`:""}
  2645. ${"true"===this.usePathInNavBar?J`<span style='pointer-events: none;' class='mono-font'>${e.path}</span>`:e.summary||e.shortSummary}
  2646. </span>
  2647. </div>`))}
  2648. </div>
  2649. </div>
  2650. `}))}
  2651. <!-- COMPONENTS -->
  2652. ${this.resolvedSpec.components&&"true"===this.showComponents&&"focused"===this.renderStyle?J`
  2653. <div id='link-components' class='nav-bar-section components'>
  2654. <div></div>
  2655. <div class='nav-bar-section-title'>COMPONENTS</div>
  2656. </div>
  2657. ${this.resolvedSpec.components.map((e=>e.subComponents.length?J`
  2658. <div class='nav-bar-tag'
  2659. part='section-navbar-item section-navbar-tag'
  2660. data-action='navigate'
  2661. data-content-id='cmp--${e.name.toLowerCase()}'
  2662. id='link-cmp--${e.name.toLowerCase()}'
  2663. >
  2664. ${e.name}
  2665. </div>
  2666. ${e.subComponents.filter((e=>!1!==e.expanded)).map((e=>J`
  2667. <div class='nav-bar-path' data-action='navigate' data-content-id='cmp--${e.id}' id='link-cmp--${e.id}'>
  2668. <span style = 'pointer-events: none;'> ${e.name} </span>
  2669. </div>`))}`:""))}`:""}
  2670. </nav>`}
  2671. </nav>
  2672. `}function IF(e){const t=new Xe.Renderer;return t.heading=(t,r,s,n)=>`<h${r} class="observe-me" id="${e}--${n.slug(s)}">${t}</h${r}>`,t}function _F(e){return J`
  2673. <div class='regular-font section-gap--focused-mode' part="section-operations-in-tag">
  2674. ${e}
  2675. </div>`}function RF(){var e;if("true"===this.showInfo)return _F(EF.call(this));const t=this.resolvedSpec.tags[0],r=null===(e=this.resolvedSpec.tags[0])||void 0===e?void 0:e.paths[0];return _F(t&&r?vF.call(this,r,t.name):"")}function FF(e){return J`
  2676. <h1 id="${e.elementId}">${e.displayName||e.name}</h1>
  2677. ${"show-description"===this.onNavTagClick&&e.description?J`
  2678. <div class="m-markdown">
  2679. ${$R(`\n <div class="m-markdown regular-font">\n ${Xe(e.description||"","true"===this.infoDescriptionHeadingsInNavBar?{renderer:IF(e.elementId)}:void 0)}\n </div>`)}
  2680. </div>`:""}
  2681. `}function MF(){if(!this.focusedElementId||!this.resolvedSpec)return;const e=this.focusedElementId;let t,r=null,s=null,n=0;if(e.startsWith("overview")&&"true"===this.showInfo)t=EF.call(this);else if("auth"===e&&"true"===this.allowAuthentication)t=BR.call(this);else if("servers"===e&&"true"===this.allowServerSelection)t=jF.call(this);else if("operations-top"===e)t=J`
  2682. <div id="operations-top" class="observe-me">
  2683. <slot name="operations-top"></slot>
  2684. </div>`;else if(e.startsWith("cmp--")&&"true"===this.showComponents)t=$F.call(this);else if(e.startsWith("tag--")){const r=e.indexOf("--",4)>0?e.substring(0,e.indexOf("--",5)):e;s=this.resolvedSpec.tags.find((e=>e.elementId===r)),t=s?_F.call(this,FF.call(this,s)):RF.call(this)}else{for(n=0;n<this.resolvedSpec.tags.length&&(s=this.resolvedSpec.tags[n],r=this.resolvedSpec.tags[n].paths.find((t=>`${t.elementId}`===e)),!r);n+=1);if(r){TF(this.shadowRoot.getElementById(`link-${e}`),"expand"),t=_F.call(this,vF.call(this,r,s.name||"",s.description||""))}else t=RF.call(this)}return t}function LF(e){if(e.expanded)e.expanded=!1,"true"===this.updateRoute&&this.replaceHistoryState("");else if(e.expanded=!0,"true"===this.updateRoute){const t=`${this.routePrefix||"#"}${e.elementId}`;window.location.hash!==t&&this.replaceHistoryState(e.elementId)}this.requestUpdate()}function DF(e,t="expand-all"){const r=[...e.querySelectorAll(".section-tag")];"expand-all"===t?r.map((e=>{e.classList.replace("collapsed","expanded")})):r.map((e=>{e.classList.replace("expanded","collapsed")}))}function BF(e,t="expand-all"){DF.call(this,e.target.closest(".operations-root"),t)}function qF(e,t=!1){return J`
  2685. <summary @click="${t=>{LF.call(this,e,t)}}" part="section-endpoint-head-${e.expanded?"expanded":"collapsed"}" class='endpoint-head ${e.method} ${e.deprecated?"deprecated":""} ${t||e.expanded?"expanded":"collapsed"}'>
  2686. <div part="section-endpoint-head-method" class="method ${e.method} ${e.deprecated?"deprecated":""}"> ${e.method} </div>
  2687. <div part="section-endpoint-head-path" class="path ${e.deprecated?"deprecated":""}">
  2688. ${e.path}
  2689. ${e.isWebhook?J`<span style="font-family: var(--font-regular); font-size: var(--); font-size: var(--font-size-small); color:var(--primary-color); margin-left: 16px"> Webhook</span>`:""}
  2690. </div>
  2691. ${e.deprecated?J`
  2692. <span style="font-size:var(--font-size-small); text-transform:uppercase; font-weight:bold; color:var(--red); margin:2px 0 0 5px;">
  2693. deprecated
  2694. </span>`:""}
  2695. ${this.showSummaryWhenCollapsed?J`
  2696. <div class="only-large-screen" style="min-width:60px; flex:1"></div>
  2697. <div part="section-endpoint-head-description" class="descr">${e.summary||e.shortSummary} </div>`:""}
  2698. </summary>
  2699. `}function NF(e){var t,r,s,n,i,o,a,l;const c=new Set;for(const t in e.responses)for(const r in null===(p=e.responses[t])||void 0===p?void 0:p.content){var p;c.add(r.trim())}const u=[...c].join(", "),d=this.resolvedSpec.securitySchemes.filter((t=>{var r;return t.finalKeyValue&&(null===(r=e.security)||void 0===r?void 0:r.some((e=>t.securitySchemeId in e)))}))||[],h=this.resolvedSpec.securitySchemes.find((e=>e.securitySchemeId===ut&&"-"!==e.value));h&&d.push(h);const m=e.xCodeSamples?NR(e.xCodeSamples):"";return J`
  2700. <div part="section-endpoint-body-${e.expanded?"expanded":"collapsed"}" class='endpoint-body ${e.method} ${e.deprecated?"deprecated":""}'>
  2701. <div class="summary">
  2702. ${e.summary?J`<div class="title" part="section-endpoint-body-title">${e.summary}</div>`:e.shortSummary!==e.description?J`<div class="title" part="section-endpoint-body-title">${e.shortSummary}</div>`:""}
  2703. ${e.xBadges&&(null===(t=e.xBadges)||void 0===t?void 0:t.length)>0?J`
  2704. <div style="display:flex; flex-wrap:wrap;font-size: var(--font-size-small);">
  2705. ${e.xBadges.map((e=>"none"===e.color?"":J`<span part="endpoint-badge" style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${e.color}, var(--input-bg)); color:var(--${e.color}); border:1px solid var(--${e.color})">${e.label}</span>`))}
  2706. </div>
  2707. `:""}
  2708. ${e.description?J`<div part="section-endpoint-body-description" class="m-markdown"> ${$R(Xe(e.description))}</div>`:""}
  2709. ${null!==(r=e.externalDocs)&&void 0!==r&&r.url||null!==(s=e.externalDocs)&&void 0!==s&&s.description?J`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
  2710. <div class="m-markdown"> ${$R(Xe((null===(n=e.externalDocs)||void 0===n?void 0:n.description)||""))} </div>
  2711. ${null!==(i=e.externalDocs)&&void 0!==i&&i.url?J`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${null===(o=e.externalDocs)||void 0===o?void 0:o.url}" target="_blank">
  2712. ${null===(a=e.externalDocs)||void 0===a?void 0:a.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
  2713. </a>`:""}
  2714. </div>`:""}
  2715. <slot name="${e.elementId}"></slot>
  2716. ${qR.call(this,e.security)}
  2717. ${m}
  2718. </div>
  2719. <div class='req-resp-container'>
  2720. <div style="display:flex; flex-direction:column" class="view-mode-request ${this.layout}-layout">
  2721. <api-request
  2722. class = "${this.renderStyle}-mode ${this.layout}-layout"
  2723. style = "width:100%;"
  2724. webhook = "${e.isWebhook}"
  2725. method = "${e.method}"
  2726. path = "${e.path}"
  2727. .security = "${e.security}"
  2728. .parameters = "${e.parameters}"
  2729. .request_body = "${e.requestBody}"
  2730. .api_keys = "${d}"
  2731. .servers = "${e.servers}"
  2732. server-url = "${e.servers&&e.servers.length>0?e.servers[0].url:null===(l=this.selectedServer)||void 0===l?void 0:l.computedUrl}"
  2733. active-schema-tab = "${this.defaultSchemaTab}"
  2734. fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
  2735. allow-try = "${this.allowTry}"
  2736. show-curl-before-try = "${this.showCurlBeforeTry}"
  2737. accept = "${u}"
  2738. render-style="${this.renderStyle}"
  2739. schema-style = "${this.schemaStyle}"
  2740. schema-expand-level = "${this.schemaExpandLevel}"
  2741. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2742. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2743. schema-hide-read-only = "${"never"===this.schemaHideReadOnly||e.isWebhook?"false":"true"}"
  2744. schema-hide-write-only = "${"never"===this.schemaHideWriteOnly?"false":e.isWebhook?"true":"false"}"
  2745. fetch-credentials = "${this.fetchCredentials}"
  2746. exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
  2747. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  2748. file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
  2749. anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2750. > </api-request>
  2751. ${e.callbacks?UR.call(this,e.callbacks):""}
  2752. </div>
  2753. <api-response
  2754. class = "${this.renderStyle}-mode"
  2755. style = "width:100%;"
  2756. webhook = "${e.isWebhook}"
  2757. .responses="${e.responses}"
  2758. active-schema-tab = "${this.defaultSchemaTab}"
  2759. render-style="${this.renderStyle}"
  2760. schema-style="${this.schemaStyle}"
  2761. schema-expand-level = "${this.schemaExpandLevel}"
  2762. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  2763. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  2764. schema-hide-read-only = "${"never"===this.schemaHideReadOnly?"false":e.isWebhook?"true":"false"}"
  2765. schema-hide-write-only = "${"never"===this.schemaHideWriteOnly||e.isWebhook?"false":"true"}"
  2766. selected-status = "${Object.keys(e.responses||{})[0]||""}"
  2767. exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
  2768. textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
  2769. tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
  2770. schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  2771. > </api-response>
  2772. </div>
  2773. </div>`}function UF(e=!1,t=!1){return this.resolvedSpec?J`
  2774. ${e?"":J`
  2775. <div style="display:flex; justify-content:flex-end;">
  2776. <span @click="${e=>BF(e,"expand-all")}" style="color:var(--primary-color); cursor:pointer;">
  2777. Expand all
  2778. </span>
  2779. &nbsp;|&nbsp;
  2780. <span @click="${e=>BF(e,"collapse-all")}" style="color:var(--primary-color); cursor:pointer;" >
  2781. Collapse all
  2782. </span>
  2783. &nbsp; sections
  2784. </div>`}
  2785. ${this.resolvedSpec.tags.map((r=>J`
  2786. ${e?J`
  2787. <div class='section-tag-body'>
  2788. ${r.paths.filter((e=>!this.searchVal||mt(this.searchVal,e,r.name))).map((e=>J`
  2789. <section id='${e.elementId}' class='m-endpoint regular-font ${e.method} ${t||e.expanded?"expanded":"collapsed"}'>
  2790. ${qF.call(this,e,t)}
  2791. ${t||e.expanded?NF.call(this,e):""}
  2792. </section>`))}
  2793. </div>
  2794. `:J`
  2795. <div class='regular-font section-gap section-tag ${r.expanded?"expanded":"collapsed"}'>
  2796. <div class='section-tag-header' @click="${()=>{r.expanded=!r.expanded,this.requestUpdate()}}">
  2797. <div id='${r.elementId}' class="sub-title tag" style="color:var(--primary-color)">${r.displayName||r.name}</div>
  2798. </div>
  2799. <div class='section-tag-body'>
  2800. <slot name="${r.elementId}"></slot>
  2801. <div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">
  2802. ${$R(Xe(r.description||""))}
  2803. </div>
  2804. ${r.paths.filter((e=>!this.searchVal||mt(this.searchVal,e,r.name))).map((e=>J`
  2805. <section part="section-endpoint" id='${e.elementId}' class='m-endpoint regular-font ${e.method} ${t||e.expanded?"expanded":"collapsed"}'>
  2806. ${qF.call(this,e,t)}
  2807. ${t||e.expanded?NF.call(this,e):""}
  2808. </section>`))}
  2809. </div>
  2810. </div>
  2811. `}
  2812. `))}`:""}function zF(){return J`
  2813. <header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px;">
  2814. <div class="only-large-screen-flex" style="align-items: center;">
  2815. <slot name="logo" class="logo" part="section-logo">
  2816. ${e="height:36px;width:36px;margin-left:5px",J`
  2817. <div style=${e}>
  2818. <svg viewBox="1 0 511 512">
  2819. <path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/>
  2820. <path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/>
  2821. <path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/>
  2822. <path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/>
  2823. <path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/>
  2824. <path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/>
  2825. </svg>
  2826. </div>
  2827. `}
  2828. <!-- m-logo style="height:36px;width:36px;margin-left:5px"></m-logo -->
  2829. </slot>
  2830. <div class="header-title" part="label-header-title">${this.headingText}</div>
  2831. </div>
  2832. <div style="margin: 0px 8px;display:flex;flex:1">
  2833. ${"false"===this.allowSpecUrlLoad?"":J`
  2834. <input id="spec-url"
  2835. type="text"
  2836. style="font-size:var(--font-size-small)"
  2837. class="header-input mono-font"
  2838. part="textbox textbox-spec-url"
  2839. placeholder="Spec URL"
  2840. value="${this.specUrl||""}"
  2841. @change="${this.onSpecUrlChange}"
  2842. spellcheck="false"
  2843. >
  2844. <div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">&#x21a9;</div>
  2845. `}
  2846. ${"false"===this.allowSpecFileLoad?"":J`
  2847. <input id="spec-file"
  2848. part = "file-input"
  2849. type="file"
  2850. style="display:none"
  2851. value="${this.specFile||""}"
  2852. @change="${this.onSpecFileChange}"
  2853. spellcheck="false"
  2854. >
  2855. <button class="m-btn primary only-large-screen" style="margin-left:10px;" part="btn btn-fill" @click="${this.onFileLoadClick}"> LOCAL JSON FILE </button>
  2856. `}
  2857. <slot name="header"></slot>
  2858. ${"false"===this.allowSearch||"read focused".includes(this.renderStyle)?"":J`
  2859. <input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px;" spellcheck="false" >
  2860. <div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">&#x21a9;</div>
  2861. `}
  2862. ${"false"===this.allowAdvancedSearch||"read focused".includes(this.renderStyle)?"":J`
  2863. <button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px;" @click="${this.onShowSearchModalClicked}">
  2864. Search
  2865. </button>
  2866. `}
  2867. </div>
  2868. </header>`;var e}customElements.define("api-response",class extends de{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[et,rt,ot,st,tt,YR,c`
  2869. :where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
  2870. :where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
  2871. .resp-head{
  2872. vertical-align: middle;
  2873. padding:16px 0 8px;
  2874. }
  2875. .resp-head.divider{
  2876. border-top: 1px solid var(--border-color);
  2877. margin-top:10px;
  2878. }
  2879. .resp-status{
  2880. font-weight:bold;
  2881. font-size:calc(var(--font-size-small) + 1px);
  2882. }
  2883. .resp-descr{
  2884. font-size:calc(var(--font-size-small) + 1px);
  2885. color:var(--light-fg);
  2886. text-align:left;
  2887. }
  2888. .top-gap{margin-top:16px;}
  2889. .example-panel{
  2890. font-size:var(--font-size-small);
  2891. margin:0;
  2892. }
  2893. .focused-mode,
  2894. .read-mode {
  2895. padding-top:24px;
  2896. margin-top:12px;
  2897. border-top: 1px dashed var(--border-color);
  2898. }`,ct]}render(){return J`
  2899. <div class="col regular-font response-panel ${this.renderStyle}-mode">
  2900. <div class=" ${"true"===this.callback?"tiny-title":"req-res-title"} ">
  2901. ${"true"===this.callback?"CALLBACK RESPONSE":"RESPONSE"}
  2902. </div>
  2903. <div>
  2904. ${this.responseTemplate()}
  2905. </div>
  2906. </div>
  2907. `}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const s in this.responses){this.selectedStatus||(this.selectedStatus=s);const n={};for(const r in null===(e=this.responses[s])||void 0===e?void 0:e.content){var e,t;const i=this.responses[s].content[r];this.selectedMimeType||(this.selectedMimeType=r);const o=uF(i.schema,{}),a=dF(i.schema,r,tF(i.examples),tF(i.example),"true"!==this.callback&&"true"!==this.webhook,"true"===this.callback||"true"===this.webhook,r.includes("json")?"json":"text");n[r]={description:this.responses[s].description,examples:a,selectedExample:(null===(t=a[0])||void 0===t?void 0:t.exampleId)||"",schemaTree:o}}const i=[];for(const e in null===(r=this.responses[s])||void 0===r?void 0:r.headers){var r;i.push({name:e,...this.responses[s].headers[e]})}this.headersForEachRespStatus[s]=i,this.mimeResponsesForEachStatus[s]=n}return J`
  2908. ${Object.keys(this.responses).length>1?J`<div class='row' style='flex-wrap:wrap'>
  2909. ${Object.keys(this.responses).map((e=>J`
  2910. ${"$$ref"===e?"":J`
  2911. <button
  2912. @click="${()=>{this.selectedStatus=e,this.responses[e].content&&Object.keys(this.responses[e].content)[0]?this.selectedMimeType=Object.keys(this.responses[e].content)[0]:this.selectedMimeType=void 0}}"
  2913. class='m-btn small ${this.selectedStatus===e?"primary":""}'
  2914. part="btn ${this.selectedStatus===e?"btn-response-status btn-selected-response-status":" btn-response-status"}"
  2915. style='margin: 8px 4px 0 0'
  2916. >
  2917. ${e}
  2918. </button>`}`))}</div>`:J`<span>${Object.keys(this.responses)[0]}</span>`}
  2919. ${Object.keys(this.responses).map((e=>{var t,r;return J`
  2920. <div style = 'display: ${e===this.selectedStatus?"block":"none"}' >
  2921. <div class="top-gap">
  2922. <span class="resp-descr m-markdown ">${$R(Xe((null===(t=this.responses[e])||void 0===t?void 0:t.description)||""))}</span>
  2923. ${this.headersForEachRespStatus[e]&&(null===(r=this.headersForEachRespStatus[e])||void 0===r?void 0:r.length)>0?J`${this.responseHeaderListTemplate(this.headersForEachRespStatus[e])}`:""}
  2924. </div>
  2925. ${0===Object.keys(this.mimeResponsesForEachStatus[e]).length?"":J`
  2926. <div part="tab-panel" class="tab-panel col">
  2927. <div part="tab-btn-row" class="tab-buttons row" @click="${e=>{"button"===e.target.tagName.toLowerCase()&&(this.activeSchemaTab=e.target.dataset.tab)}}" >
  2928. <button part="tab-btn" class="tab-btn ${"example"===this.activeSchemaTab?"active":""}" data-tab = 'example'>EXAMPLE </button>
  2929. <button part="tab-btn" class="tab-btn ${"example"!==this.activeSchemaTab?"active":""}" data-tab = 'schema' >SCHEMA</button>
  2930. <div style="flex:1"></div>
  2931. ${1===Object.keys(this.mimeResponsesForEachStatus[e]).length?J`<span class='small-font-size gray-text' style='align-self:center; margin-top:8px;'> ${Object.keys(this.mimeResponsesForEachStatus[e])[0]} </span>`:J`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[e]))}`}
  2932. </div>
  2933. ${"example"===this.activeSchemaTab?J`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
  2934. ${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}
  2935. </div>`:J`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
  2936. ${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[e][this.selectedMimeType])}
  2937. </div>`}
  2938. </div>
  2939. `}</div>`}))}
  2940. `}responseHeaderListTemplate(e){return J`
  2941. <div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div>
  2942. <table role="presentation" style="border-collapse: collapse; margin-bottom:16px; border:1px solid var(--border-color); border-radius: var(--border-radius)" class="small-font-size mono-font">
  2943. ${e.map((e=>{var t,r;return J`
  2944. <tr>
  2945. <td style="padding:8px; vertical-align: baseline; min-width:120px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
  2946. ${e.name||""}
  2947. </td>
  2948. <td style="padding:4px; vertical-align: baseline; padding:0 5px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
  2949. ${(null===(t=e.schema)||void 0===t?void 0:t.type)||""}
  2950. </td>
  2951. <td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color);text-overflow: ellipsis;">
  2952. <div class="m-markdown-small regular-font" >${$R(Xe(e.description||""))}</div>
  2953. </td>
  2954. <td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
  2955. ${(null===(r=e.schema)||void 0===r?void 0:r.example)||""}
  2956. </td>
  2957. </tr>
  2958. `}))}
  2959. </table>`}mimeTypeDropdownTemplate(e){return J`
  2960. <select aria-label='mime types' @change="${e=>{this.selectedMimeType=e.target.value}}" style='margin-bottom: -1px; z-index:1'>
  2961. ${e.map((e=>J`<option value='${e}' ?selected = '${e===this.selectedMimeType}'> ${e} </option>`))}
  2962. </select>`}onSelectExample(e){[...e.target.closest(".example-panel").querySelectorAll(".example")].forEach((t=>{t.style.display=t.dataset.example===e.target.value?"block":"none"}))}mimeExampleTemplate(e){return e?J`
  2963. ${1===e.examples.length?J`
  2964. ${"json"===e.examples[0].exampleFormat?J`
  2965. ${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?J`<div style="padding: 4px 0"> ${e.examples[0].exampleSummary} </div>`:""}
  2966. ${e.examples[0].exampleDescription?J`<div class="m-markdown-small" style="padding: 4px 0"> ${$R(Xe(e.examples[0].exampleDescription||""))} </div>`:""}
  2967. <json-tree
  2968. render-style = '${this.renderStyle}'
  2969. .data="${e.examples[0].exampleValue}"
  2970. class = 'example-panel ${"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8"}'
  2971. exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
  2972. ></json-tree>`:J`
  2973. ${e.examples[0].exampleSummary&&e.examples[0].exampleSummary.length>80?J`<div style="padding: 4px 0"> ${e.examples[0].exampleSummary} </div>`:""}
  2974. ${e.examples[0].exampleDescription?J`<div class="m-markdown-small" style="padding: 4px 0"> ${$R(Xe(e.examples[0].exampleDescription||""))} </div>`:""}
  2975. <pre class = 'example-panel ${"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8"}'>${e.examples[0].exampleValue}</pre>
  2976. `}`:J`
  2977. <span class = 'example-panel ${"read"===this.renderStyle?"border pad-8-16":"border-top pad-top-8"}'>
  2978. <select aria-label='response examples' style="min-width:100px; max-width:100%" @change='${e=>this.onSelectExample(e)}'>
  2979. ${e.examples.map((t=>J`<option value="${t.exampleId}" ?selected=${t.exampleId===e.selectedExample} >
  2980. ${t.exampleSummary.length>80?t.exampleId:t.exampleSummary}
  2981. </option>`))}
  2982. </select>
  2983. ${e.examples.map((t=>J`
  2984. <div class="example" data-example = '${t.exampleId}' style = "display: ${t.exampleId===e.selectedExample?"block":"none"}">
  2985. ${t.exampleSummary&&t.exampleSummary.length>80?J`<div style="padding: 4px 0"> ${t.exampleSummary} </div>`:""}
  2986. ${t.exampleDescription?J`<div class="m-markdown-small" style="padding: 4px 0"> ${$R(Xe(t.exampleDescription||""))} </div>`:""}
  2987. ${"json"===t.exampleFormat?J`
  2988. <json-tree
  2989. render-style = '${this.renderStyle}'
  2990. .data = '${t.exampleValue}'
  2991. exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
  2992. ></json-tree>`:J`<pre>${t.exampleValue}</pre>`}
  2993. </div>
  2994. `))}
  2995. </span>
  2996. `}
  2997. `:J`
  2998. <pre style='color:var(--red)' class = '${"read"===this.renderStyle?"read example-panel border pad-8-16":"example-panel border-top"}'> No example provided </pre>
  2999. `}mimeSchemaTemplate(e){return e?J`
  3000. ${"table"===this.schemaStyle?J`
  3001. <schema-table
  3002. .data = "${e.schemaTree}"
  3003. schema-expand-level = "${this.schemaExpandLevel}"
  3004. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  3005. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  3006. schema-hide-read-only = "${this.schemaHideReadOnly}"
  3007. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  3008. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  3009. > </schema-table> `:J`
  3010. <schema-tree
  3011. .data = '${e.schemaTree}'
  3012. schema-expand-level = "${this.schemaExpandLevel}"
  3013. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  3014. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  3015. schema-hide-read-only = "${this.schemaHideReadOnly}"
  3016. schema-hide-write-only = "${this.schemaHideWriteOnly}"
  3017. exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
  3018. > </schema-tree>`}`:J`
  3019. <pre style='color:var(--red)' class = '${"read"===this.renderStyle?"border pad-8-16":"border-top"}'> Schema not found</pre>
  3020. `}});const HF=c`
  3021. *, *:before, *:after { box-sizing: border-box; }
  3022. .dialog-box-overlay {
  3023. background-color: var(--overlay-bg);
  3024. position: fixed;
  3025. left: 0;
  3026. top: 0;
  3027. width: 100vw;
  3028. height: 100vh;
  3029. overflow: hidden;
  3030. z-index: var(--dialog-z-index);
  3031. }
  3032. .dialog-box {
  3033. position: fixed;
  3034. top: 100px;
  3035. left: 50%;
  3036. transform: translate(-50%, 0%);
  3037. display: flex;
  3038. flex-direction: column;
  3039. width: 70vw;
  3040. background-color: var(--bg2);
  3041. color: var(--fg2);
  3042. border-radius: 4px;
  3043. max-height: 500px;
  3044. overflow: hidden;
  3045. border: 1px solid var(--border-color);
  3046. box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  3047. }
  3048. .dialog-box-header {
  3049. position: sticky;
  3050. top: 0;
  3051. align-self: stretch;
  3052. display: flex;
  3053. align-items: center;
  3054. padding: 0px 16px;
  3055. min-height: 60px;
  3056. max-height: 60px;
  3057. border-bottom: 1px solid var(--light-border-color);
  3058. overflow: hidden;
  3059. }
  3060. .dialog-box-header button {
  3061. font-size: 1.5rem;
  3062. font-weight: 700;
  3063. line-height: 1;
  3064. color: var(--fg);
  3065. border: none;
  3066. outline: none;
  3067. background-color: transparent;
  3068. cursor:pointer;
  3069. border: 1px solid transparent;
  3070. border-radius: 50%;
  3071. margin-right: -8px;
  3072. }
  3073. .dialog-box-header button:hover {
  3074. border-color: var(--primary-color);
  3075. }
  3076. .dialog-box-content {
  3077. padding: 16px;
  3078. display:block;
  3079. overflow: auto;
  3080. height: 100%;
  3081. }
  3082. .dialog-box-title {
  3083. flex-grow: 1;
  3084. font-size:24px;
  3085. }
  3086. `;function VF(){var e;return document.addEventListener("close",(()=>{this.showAdvancedSearchDialog=!1})),document.addEventListener("open",this.onOpenSearchDialog),J`
  3087. <dialog-box
  3088. heading="Search"
  3089. show="${!!this.showAdvancedSearchDialog}"
  3090. >
  3091. <span class="advanced-search-options">
  3092. <input
  3093. id="input-advanced-search-dialog"
  3094. style="width:100%; padding-right:20px;"
  3095. type="text"
  3096. part="textbox textbox-search-dialog"
  3097. placeholder="search text..."
  3098. spellcheck="false"
  3099. @keyup = "${e=>this.onAdvancedSearch(e,400)}"
  3100. >
  3101. <div style="display:flex; margin:8px 0 24px;">
  3102. <div>
  3103. <input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked @change = "${e=>this.onAdvancedSearch(e,0)}">
  3104. <label for="search-api-path" style="cursor:pointer;"> API Path </label>
  3105. </div>
  3106. <div style="margin-left: 16px;">
  3107. <input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked @change = "${e=>this.onAdvancedSearch(e,0)}">
  3108. <label style="cursor:pointer;" for="search-api-descr"> API Description </label>
  3109. </div>
  3110. <div style="margin-left: 16px;">
  3111. <input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change = "${e=>this.onAdvancedSearch(e,0)}">
  3112. <label style="cursor:pointer;" for="search-api-params"> API Parameters </label>
  3113. </div>
  3114. <div style="margin-left: 16px;">
  3115. <input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change = "${e=>this.onAdvancedSearch(e,0)}">
  3116. <label style="cursor:pointer;" for="search-api-request-body"> Request Body Parameters </label>
  3117. </div>
  3118. <div style="margin-left: 16px;">
  3119. <input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change = "${e=>this.onAdvancedSearch(e,0)}">
  3120. <label style="cursor:pointer;" for="search-api-resp-descr"> Response Description </label>
  3121. </div>
  3122. </div>
  3123. </span>
  3124. ${null===(e=this.advancedSearchMatches)||void 0===e?void 0:e.map((e=>J`
  3125. <div
  3126. class="mono-font small-font-size hover-bg"
  3127. style='padding: 5px; cursor: pointer; border-bottom: 1px solid var(--light-border-color); ${e.deprecated?"filter:opacity(0.5);":""}'
  3128. data-content-id='${e.elementId}'
  3129. tabindex = '0'
  3130. @click="${e=>{this.searchVal="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(e,!0)}}"
  3131. >
  3132. <span style="pointer-events: none" class="upper bold-text method-fg ${e.method}">${e.method}</span>
  3133. <span style="pointer-events: none">${e.path}</span>
  3134. <span style="pointer-events: none" class="regular-font gray-text">${e.summary}</span>
  3135. </div>
  3136. `))}
  3137. </dialog-box>
  3138. `}customElements.define("dialog-box",class extends de{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[HF]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",(e=>{"Escape"===e.code&&this.onClose()}))}attributeChangedCallback(e,t,r){t!==r&&("heading"===e&&(this.heading=r),"show"===e&&(this.show=r,"true"===r&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(e,t,r)}render(){return J`
  3139. ${"true"===this.show?J`
  3140. <div class="dialog-box-overlay">
  3141. <div class="dialog-box">
  3142. <header class="dialog-box-header">
  3143. <span class="dialog-box-title">${this.heading}</span>
  3144. <button type="button" @click="${this.onClose}">&times;</button>
  3145. </header>
  3146. <div class="dialog-box-content">
  3147. <slot></slot>
  3148. </div>
  3149. </div>
  3150. </div>`:""}`}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});const WF={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(e){if(0===e.indexOf("#")&&(e=e.slice(1,7)),3!==e.length&&4!==e.length||(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),6!==e.length)throw new Error("Invalid HEX color.");return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}},luminanace(e){const t=this.getRgb(e);return.299*t.r+.587*t.g+.114*t.b},invert(e){return this.luminanace(e)>135?"#000":"#fff"},opacity(e,t){const r=this.getRgb(e);return`rgba(${r.r}, ${r.g}, ${r.b}, ${t})`},brightness(e,t){const r=this.getRgb(e);return r.r+=t,r.g+=t,r.b+=t,r.r>255?r.r=255:r.r<0&&(r.r=0),r.g>255?r.g=255:r.g<0&&(r.g=0),r.b>255?r.b=255:r.b<0&&(r.b=0),`#${r.r.toString(16).padStart(2,"0")}${r.g.toString(16).padStart(2,"0")}${r.b.toString(16).padStart(2,"0")}`},hasGoodContrast(e,t){return this.luminanace(e)-this.luminanace(t)}}};function GF(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(e)}function JF(e,t={}){let r={};const s=t.primaryColor?t.primaryColor:"dark"===e?"#f76b39":"#ff591e",n=WF.color.invert(s),i=WF.color.opacity(s,"0.4");if("dark"===e){const e=t.bg1?t.bg1:"#2a2b2c",o=t.fg1?t.fg1:"#bbb",a=t.bg2?t.bg2:WF.color.brightness(e,5),l=t.bg3?t.bg3:WF.color.brightness(e,17),c=t.bg3?t.bg3:WF.color.brightness(e,35),p=t.fg2?t.fg2:WF.color.brightness(o,-15),u=t.fg3?t.fg3:WF.color.brightness(o,-20),d=t.fg3?t.fg3:WF.color.brightness(o,-65),h=t.inlineCodeFg?t.inlineCodeFg:"#aaa",m=p,f=a,g=t.headerColor?t.headerColor:WF.color.brightness(e,10),y=t.navBgColor?t.navBgColor:WF.color.brightness(e,10),v=t.navTextColor?t.navTextColor:WF.color.opacity(WF.color.invert(y),"0.50"),b=t.navHoverBgColor?t.navHoverBgColor:WF.color.brightness(y,-15),x=t.navHoverTextColor?t.navHoverTextColor:WF.color.invert(y),w=t.navAccentColor?t.navAccentColor:WF.color.brightness(s,25);r={bg1:e,bg2:a,bg3:l,lightBg:c,fg1:o,fg2:p,fg3:u,lightFg:d,inlineCodeFg:h,primaryColor:s,primaryColorTrans:i,primaryColorInvert:n,selectionBg:m,selectionFg:f,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:y,navTextColor:v,navHoverBgColor:b,navHoverTextColor:x,navAccentColor:w,navAccentTextColor:t.navAccentTextColor?t.navAccenttextColor:WF.color.invert(w),headerColor:g,headerColorInvert:WF.color.invert(g),headerColorDarker:WF.color.brightness(g,-20),headerColorBorder:WF.color.brightness(g,10),borderColor:t.borderColor||WF.color.brightness(e,20),lightBorderColor:t.lightBorderColor||WF.color.brightness(e,15),codeBorderColor:t.codeBorderColor||WF.color.brightness(e,30),inputBg:t.inputBg||WF.color.brightness(e,-5),placeHolder:t.placeHolder||WF.color.opacity(o,"0.3"),hoverColor:t.hoverColor||WF.color.brightness(e,-10),red:t.red?t.red:"#F06560",lightRed:t.lightRed?t.lightRed:WF.color.brightness(e,-10),pink:t.pink?t.pink:"#ffb2b2",lightPink:t.lightPink||WF.color.brightness(e,-10),green:t.green||"#7ec699",lightGreen:t.lightGreen||WF.color.brightness(e,-10),blue:t.blue||"#71b7ff",lightBlue:t.lightBlue||WF.color.brightness(e,-10),orange:t.orange?t.orange:"#f08d49",lightOrange:t.lightOrange||WF.color.brightness(e,-10),yellow:t.yellow||"#827717",lightYellow:t.lightYellow||WF.color.brightness(e,-10),purple:t.purple||"#786FF1",brown:t.brown||"#D4AC0D",codeBg:t.codeBg||WF.color.opacity(WF.color.brightness(e,-15),.7),codeFg:t.codeFg||"#aaa",codePropertyColor:t.codePropertyColor||"#f8c555",codeKeywordColor:t.codeKeywordColor||"#cc99cd",codeOperatorColor:t.codeOperatorColor||"#67cdcc"}}else{const e=t.bg1?t.bg1:"#fafbfc",o=t.fg1?t.fg1:"#444444",a=t.bg2?t.bg2:WF.color.brightness(e,-5),l=t.bg3?t.bg3:WF.color.brightness(e,-15),c=t.bg3?t.bg3:WF.color.brightness(e,-45),p=t.fg2?t.fg2:WF.color.brightness(o,17),u=t.fg3?t.fg3:WF.color.brightness(o,30),d=t.fg3?t.fg3:WF.color.brightness(o,70),h=t.inlineCodeFg?t.inlineCodeFg:"brown",m=p,f=a,g=t.headerColor?t.headerColor:WF.color.brightness(e,-180),y=t.navBgColor?t.navBgColor:WF.color.brightness(e,-200),v=t.navTextColor?t.navTextColor:WF.color.opacity(WF.color.invert(y),"0.65"),b=t.navHoverBgColor?t.navHoverBgColor:WF.color.brightness(y,-15),x=t.navHoverTextColor?t.navHoverTextColor:WF.color.invert(y),w=t.navAccentColor?t.navAccentColor:WF.color.brightness(s,25);r={bg1:e,bg2:a,bg3:l,lightBg:c,fg1:o,fg2:p,fg3:u,lightFg:d,inlineCodeFg:h,primaryColor:s,primaryColorTrans:i,primaryColorInvert:n,selectionBg:m,selectionFg:f,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:y,navTextColor:v,navHoverBgColor:b,navHoverTextColor:x,navAccentColor:w,navAccentTextColor:t.navAccentTextColor?t.navAccenttextColor:WF.color.invert(w),headerColor:g,headerColorInvert:WF.color.invert(g),headerColorDarker:WF.color.brightness(g,-20),headerColorBorder:WF.color.brightness(g,10),borderColor:t.borderColor||WF.color.brightness(e,-38),lightBorderColor:t.lightBorderColor||WF.color.brightness(e,-23),codeBorderColor:t.codeBorderColor||"transparent",inputBg:t.inputBg||WF.color.brightness(e,10),placeHolder:t.placeHolder||WF.color.brightness(d,20),hoverColor:t.hoverColor||WF.color.brightness(e,-5),red:t.red||"#F06560",lightRed:t.lightRed||"#fff0f0",pink:t.pink?t.pink:"#990055",lightPink:t.lightPink?t.lightPink:"#ffb2b2",green:t.green||"#690",lightGreen:t.lightGreen||"#fbfff0",blue:t.blue||"#47AFE8",lightBlue:t.lightBlue||"#eff8fd",orange:t.orange||"#FF9900",lightOrange:t.lightOrange||"#fff5e6",yellow:t.yellow||"#827717",lightYellow:t.lightYellow||"#fff5cc",purple:t.purple||"#786FF1",brown:t.brown||"#D4AC0D",codeBg:t.codeBg||WF.color.opacity(WF.color.brightness(e,-15),.7),codeFg:t.codeFg||"#666",codePropertyColor:t.codePropertyColor||"#905",codeKeywordColor:t.codeKeywordColor||"#07a",codeOperatorColor:t.codeOperatorColor||"#9a6e3a"}}return J`
  3151. <style>
  3152. *, *:before, *:after { box-sizing: border-box; }
  3153. :host {
  3154. /* Common Styles - irrespective of themes */
  3155. --border-radius: 2px;
  3156. --layout: ${this.layout||"row"};
  3157. --font-mono: ${this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace'};
  3158. --font-regular: ${this.regularFont||'"Open Sans", Avenir, "Segoe UI", Arial, sans-serif'};
  3159. --scroll-bar-width: 8px;
  3160. --nav-item-padding: ${"relaxed"===this.navItemSpacing?"10px 16px 10px 10px":"compact"===this.navItemSpacing?"5px 16px 5px 10px":"7px 16px 7px 10px"};
  3161. --resp-area-height: ${this.responseAreaHeight};
  3162. --font-size-small: ${"default"===this.fontSize?"12px":"large"===this.fontSize?"13px":"14px"};
  3163. --font-size-mono: ${"default"===this.fontSize?"13px":"large"===this.fontSize?"14px":"15px"};
  3164. --font-size-regular: ${"default"===this.fontSize?"14px":"large"===this.fontSize?"15px":"16px"};
  3165. --dialog-z-index: 1000;
  3166. --focus-shadow: 0 0 0 1px transparent, 0 0 0 3px ${r.primaryColorTrans};
  3167. /* Theme specific styles */
  3168. --bg:${r.bg1};
  3169. --bg2:${r.bg2};
  3170. --bg3:${r.bg3};
  3171. --light-bg:${r.lightBg};
  3172. --fg:${r.fg1};
  3173. --fg2:${r.fg2};
  3174. --fg3:${r.fg3};
  3175. --light-fg:${r.lightFg};
  3176. --selection-bg:${r.selectionBg};
  3177. --selection-fg:${r.selectionFg};
  3178. --overlay-bg:${r.overlayBg};
  3179. /* Border Colors */
  3180. --border-color:${r.borderColor};
  3181. --light-border-color:${r.lightBorderColor};
  3182. --code-border-color:${r.codeBorderColor};
  3183. --input-bg:${r.inputBg};
  3184. --placeholder-color:${r.placeHolder};
  3185. --hover-color:${r.hoverColor};
  3186. --red:${r.red};
  3187. --light-red:${r.lightRed};
  3188. --pink:${r.pink};
  3189. --light-pink:${r.lightPink};
  3190. --green:${r.green};
  3191. --light-green:${r.lightGreen};
  3192. --blue:${r.blue};
  3193. --light-blue:${r.lightBlue};
  3194. --orange:${r.orange};
  3195. --light-orange:${r.lightOrange};
  3196. --yellow:${r.yellow};
  3197. --light-yellow:${r.lightYellow};
  3198. --purple:${r.purple};
  3199. --brown:${r.brown};
  3200. /* Header Color */
  3201. --header-bg:${r.headerColor};
  3202. --header-fg:${r.headerColorInvert};
  3203. --header-color-darker:${r.headerColorDarker};
  3204. --header-color-border:${r.headerColorBorder};
  3205. /* Nav Colors */
  3206. --nav-bg-color:${r.navBgColor};
  3207. --nav-text-color:${r.navTextColor};
  3208. --nav-hover-bg-color:${r.navHoverBgColor};
  3209. --nav-hover-text-color:${r.navHoverTextColor};
  3210. --nav-accent-color:${r.navAccentColor};
  3211. --nav-accent-text-color:${r.navAccentTextColor};
  3212. /* Nav API Method Colors*/
  3213. --nav-get-color:${r.blue};
  3214. --nav-put-color:${r.orange};
  3215. --nav-post-color:${r.green};
  3216. --nav-delete-color:${r.red};
  3217. --nav-head-color:${r.yellow};
  3218. /* Primary Colors */
  3219. --primary-color:${r.primaryColor};
  3220. --primary-color-invert:${r.primaryColorInvert};
  3221. --primary-color-trans:${r.primaryColorTrans};
  3222. /*Code Syntax Color*/
  3223. --code-bg:${r.codeBg};
  3224. --code-fg:${r.codeFg};
  3225. --inline-code-fg:${r.inlineCodeFg};
  3226. --code-property-color:${r.codePropertyColor};
  3227. --code-keyword-color:${r.codeKeywordColor};
  3228. --code-operator-color:${r.codeOperatorColor};
  3229. }
  3230. </style>`}function KF(e=!1,t=!1){if(!this.resolvedSpec)return"";"true"===this.persistAuth&&CR.call(this);const r={bg1:GF(this.bgColor)?this.bgColor:"",fg1:GF(this.textColor)?this.textColor:"",headerColor:GF(this.headerColor)?this.headerColor:"",primaryColor:GF(this.primaryColor)?this.primaryColor:"",navBgColor:GF(this.navBgColor)?this.navBgColor:"",navTextColor:GF(this.navTextColor)?this.navTextColor:"",navHoverBgColor:GF(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:GF(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:GF(this.navAccentColor)?this.navAccentColor:"",navAccentTextColor:GF(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?J`
  3231. ${"dark"===this.theme?JF.call(this,"dark",r):JF.call(this,"light",r)}
  3232. <div id="spec-not-found" style='display:flex; align-items:center; justify-content: center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'>
  3233. ${this.resolvedSpec.info.description}
  3234. </div>
  3235. `:this.resolvedSpec.isSpecLoading?J`
  3236. ${"dark"===this.theme?JF.call(this,"dark",r):JF.call(this,"light",r)}
  3237. <main class='main-content regular-font' part='section-main-content'>
  3238. <slot></slot>
  3239. <div class='main-content-inner--${this.renderStyle}-mode'>
  3240. <div class='loader'></div>
  3241. </div>
  3242. </main>
  3243. `:J`
  3244. ${"dark"===this.theme?JF.call(this,"dark",r):JF.call(this,"light",r)}
  3245. <!-- Header -->
  3246. ${"false"===this.showHeader?"":zF.call(this)}
  3247. <!-- Advanced Search -->
  3248. ${"false"===this.allowAdvancedSearch?"":VF.call(this)}
  3249. <div id='the-main-body' class='body ${this.cssClasses}' dir='${this.pageDirection}' >
  3250. <!-- Side Nav -->
  3251. ${"read"!==this.renderStyle&&"focused"!==this.renderStyle||"true"!==this.showSideNav||!this.resolvedSpec?"":CF.call(this)}
  3252. <!-- Main Content -->
  3253. <main class='main-content regular-font' tabindex='-1' part='section-main-content'>
  3254. <slot></slot>
  3255. <div class='main-content-inner--${this.renderStyle}-mode'>
  3256. ${!0===this.loading?J`<div class='loader'></div>`:J`
  3257. ${!0===this.loadFailed?J`<div style='text-align: center;margin: 16px;'> Unable to load the Spec</div>`:J`
  3258. <div class='operations-root' @click='${e=>{this.handleHref(e)}}'>
  3259. ${"focused"===this.renderStyle?J`${MF.call(this)}`:J`
  3260. ${"true"===this.showInfo?EF.call(this):""}
  3261. ${"true"===this.allowServerSelection?jF.call(this):""}
  3262. ${"true"===this.allowAuthentication?BR.call(this):""}
  3263. <div id='operations-top' class='observe-me'>
  3264. <slot name='operations-top'></slot>
  3265. </div>
  3266. ${"read"===this.renderStyle?bF.call(this):UF.call(this,e,t)}
  3267. `}
  3268. </div>
  3269. `}`}
  3270. </div>
  3271. <slot name='footer'></slot>
  3272. </main>
  3273. </div>
  3274. `}class YF extends de{constructor(){super();const e={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver((e=>{this.onIntersect(e)}),e)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navBgColor:{type:String,attribute:"nav-bg-color"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navAccentTextColor:{type:String,attribute:"nav-accent-text-color"},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[et,tt,rt,st,nt,it,ot,at,lt,c`
  3275. :host {
  3276. all: initial;
  3277. display:flex;
  3278. flex-direction: column;
  3279. min-width:360px;
  3280. width:100%;
  3281. height:100%;
  3282. margin:0;
  3283. padding:0;
  3284. overflow: hidden;
  3285. letter-spacing:normal;
  3286. color:var(--fg);
  3287. background-color:var(--bg);
  3288. font-family:var(--font-regular);
  3289. container-type: inline-size;
  3290. }
  3291. :where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
  3292. :where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
  3293. .body {
  3294. display:flex;
  3295. height:100%;
  3296. width:100%;
  3297. overflow:hidden;
  3298. }
  3299. .main-content {
  3300. margin:0;
  3301. padding: 0;
  3302. display:block;
  3303. flex:1;
  3304. height:100%;
  3305. overflow-y: auto;
  3306. overflow-x: hidden;
  3307. scrollbar-width: thin;
  3308. scrollbar-color: var(--border-color) transparent;
  3309. }
  3310. .main-content-inner--view-mode {
  3311. padding: 0 8px;
  3312. }
  3313. .main-content::-webkit-scrollbar {
  3314. width: 8px;
  3315. height: 8px;
  3316. }
  3317. .main-content::-webkit-scrollbar-track {
  3318. background:transparent;
  3319. }
  3320. .main-content::-webkit-scrollbar-thumb {
  3321. background-color: var(--border-color);
  3322. }
  3323. .section-gap.section-tag {
  3324. border-bottom:1px solid var(--border-color);
  3325. }
  3326. .section-gap,
  3327. .section-gap--focused-mode,
  3328. .section-gap--read-mode {
  3329. padding: 0px 4px;
  3330. }
  3331. .section-tag-header {
  3332. position:relative;
  3333. cursor: n-resize;
  3334. padding: 12px 0;
  3335. }
  3336. .collapsed .section-tag-header:hover {
  3337. cursor: s-resize;
  3338. }
  3339. .section-tag-header:hover {
  3340. background-image: linear-gradient(to right, rgba(0,0,0,0), var(--border-color), rgba(0,0,0,0));
  3341. }
  3342. .section-tag-header:hover::after {
  3343. position:absolute;
  3344. margin-left:-24px;
  3345. font-size:20px;
  3346. top: calc(50% - 14px);
  3347. color:var(--primary-color);
  3348. content: '⬆';
  3349. }
  3350. .collapsed .section-tag-header::after {
  3351. position:absolute;
  3352. margin-left:-24px;
  3353. font-size:20px;
  3354. top: calc(50% - 14px);
  3355. color: var(--border-color);
  3356. content: '⬇';
  3357. }
  3358. .collapsed .section-tag-header:hover::after {
  3359. color:var(--primary-color);
  3360. }
  3361. .collapsed .section-tag-body {
  3362. display:none;
  3363. }
  3364. .logo {
  3365. height:36px;
  3366. width:36px;
  3367. margin-left:5px;
  3368. }
  3369. .only-large-screen-flex,
  3370. .only-large-screen {
  3371. display:none;
  3372. }
  3373. .tag.title {
  3374. text-transform: uppercase;
  3375. }
  3376. .main-header {
  3377. background-color:var(--header-bg);
  3378. color:var(--header-fg);
  3379. width:100%;
  3380. }
  3381. .header-title {
  3382. font-size:calc(var(--font-size-regular) + 8px);
  3383. padding:0 8px;
  3384. }
  3385. input.header-input{
  3386. background:var(--header-color-darker);
  3387. color:var(--header-fg);
  3388. border:1px solid var(--header-color-border);
  3389. flex:1;
  3390. padding-right:24px;
  3391. border-radius:3px;
  3392. }
  3393. input.header-input::placeholder {
  3394. opacity:0.4;
  3395. }
  3396. .loader {
  3397. margin: 16px auto 16px auto;
  3398. border: 4px solid var(--bg3);
  3399. border-radius: 50%;
  3400. border-top: 4px solid var(--primary-color);
  3401. width: 36px;
  3402. height: 36px;
  3403. animation: spin 2s linear infinite;
  3404. }
  3405. .expanded-endpoint-body {
  3406. position: relative;
  3407. padding: 6px 0px;
  3408. }
  3409. .expanded-endpoint-body .tag-description {
  3410. background: var(--code-bg);
  3411. border-radius: var(--border-radius);
  3412. transition: max-height .2s ease-out;
  3413. }
  3414. .expanded-endpoint-body .tag-icon {
  3415. transition: transform .2s ease-out;
  3416. }
  3417. .expanded-endpoint-body .tag-icon.expanded {
  3418. transform: rotate(180deg);
  3419. }
  3420. .divider {
  3421. border-top: 2px solid var(--border-color);
  3422. margin: 24px 0;
  3423. width:100%;
  3424. }
  3425. .tooltip {
  3426. cursor:pointer;
  3427. border: 1px solid var(--border-color);
  3428. border-left-width: 4px;
  3429. margin-left:2px;
  3430. }
  3431. .tooltip a {
  3432. color: var(--fg2);
  3433. text-decoration: none;
  3434. }
  3435. .tooltip-text {
  3436. color: var(--fg2);
  3437. max-width: 400px;
  3438. position: absolute;
  3439. z-index:1;
  3440. background-color: var(--bg2);
  3441. visibility: hidden;
  3442. overflow-wrap: break-word;
  3443. }
  3444. .tooltip:hover {
  3445. color: var(--primary-color);
  3446. border-color: var(--primary-color);
  3447. }
  3448. .tooltip:hover a:hover {
  3449. color: var(--primary-color);
  3450. }
  3451. .tooltip:hover .tooltip-text {
  3452. visibility: visible;
  3453. }
  3454. @keyframes spin {
  3455. 0% { transform: rotate(0deg); }
  3456. 100% { transform: rotate(360deg); }
  3457. }
  3458. .nav-method { font-weight: bold; margin-right: 4px; font-size: calc(var(--font-size-small) - 2px); white-space: nowrap; }
  3459. .nav-method.false { display: none; }
  3460. .nav-method.as-colored-text.get { color:var(--nav-get-color); }
  3461. .nav-method.as-colored-text.put { color:var(--nav-put-color); }
  3462. .nav-method.as-colored-text.post { color:var(--nav-post-color); }
  3463. .nav-method.as-colored-text.delete { color:var(--nav-delete-color); }
  3464. .nav-method.as-colored-text.head, .nav-method.as-colored-text.patch, .nav-method.as-colored-text.options { color:var(--nav-head-color); }
  3465. .nav-method.as-colored-block {
  3466. padding: 1px 4px;
  3467. min-width: 30px;
  3468. border-radius: 4px 0 0 4px;
  3469. color: #000;
  3470. }
  3471. .colored-block .nav-method.as-colored-block {
  3472. outline: 1px solid;
  3473. }
  3474. .nav-method.as-colored-block.get { background-color: var(--blue); }
  3475. .nav-method.as-colored-block.put { background-color: var(--orange); }
  3476. .nav-method.as-colored-block.post { background-color: var(--green); }
  3477. .nav-method.as-colored-block.delete { background-color: var(--red); }
  3478. .nav-method.as-colored-block.head, .nav-method.as-colored-block.patch , .nav-method.as-colored-block.options {
  3479. background-color: var(--yellow);
  3480. }
  3481. @container (min-width: 768px) {
  3482. .nav-bar {
  3483. width: 260px;
  3484. display:flex;
  3485. }
  3486. .only-large-screen {
  3487. display:block;
  3488. }
  3489. .only-large-screen-flex {
  3490. display:flex;
  3491. }
  3492. .section-gap {
  3493. padding: 0 0 0 24px;
  3494. }
  3495. .section-gap--focused-mode {
  3496. padding: 24px 8px;
  3497. }
  3498. .section-gap--read-mode {
  3499. padding: 24px 8px;
  3500. }
  3501. .endpoint-body {
  3502. position: relative;
  3503. padding:36px 0 48px 0;
  3504. }
  3505. }
  3506. @container (min-width: 1024px) {
  3507. .nav-bar {
  3508. width: ${l("default"===this.fontSize?"300px":"large"===this.fontSize?"315px":"330px")};
  3509. display:flex;
  3510. }
  3511. .section-gap--focused-mode {
  3512. padding: 12px 80px 12px 80px;
  3513. }
  3514. .section-gap--read-mode {
  3515. padding: 24px 80px 12px 80px;
  3516. }
  3517. }`,ct]}connectedCallback(){super.connectedCallback();const e=this.parentElement;if(e&&(0===e.offsetWidth&&""===e.style.width&&(e.style.width="100vw"),0===e.offsetHeight&&""===e.style.height&&(e.style.height="100vh"),"BODY"===e.tagName&&(e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0"))),"false"!==this.loadFonts){const e={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},t=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",e);e.weight="600";const r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",e);t.load().then((e=>{document.fonts.add(e)})),r.load().then((e=>{document.fonts.add(e)}))}this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?"model"===this.defaultSchemaTab&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="400px"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.routePrefix||(this.routePrefix="#"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.onNavTagClick&&"expand-collapse, show-description,".includes(`${this.onNavTagClick},`)||(this.onNavTagClick="expand-collapse"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navActiveItemMarker&&"left-bar, colored-block".includes(`${this.navActiveItemMarker},`)||(this.navActiveItemMarker="left-bar"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),this.cssFile||(this.cssFile=null),this.cssClasses||(this.cssClasses=""),Xe.setOptions({highlight:(e,t)=>Qe().languages[t]?Qe().highlight(e,Qe().languages[t],t):e}),window.addEventListener("hashchange",(()=>{this.scrollToPath(this.getElementIDFromURL())}),!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const e=new Xe.Renderer;return e.heading=(e,t,r,s)=>`<h${t} class="observe-me" id="${s.slug(r)}">${e}</h${t}>`,e}render(){const e=document.querySelector(`link[href*="${this.cssFile}"]`);return e&&this.shadowRoot.appendChild(e.cloneNode()),KF.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach((e=>{this.intersectionObserver.observe(e)}))}attributeChangedCallback(e,t,r){if("spec-url"===e&&t!==r&&window.setTimeout((async()=>{await this.loadSpec(r),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)}),0),"match-paths"!==e&&"match-type"!==e&&"remove-endpoints-with-badge-label-as"!==e||t!==r&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),"render-style"===e&&("read"===r?window.setTimeout((()=>{this.observeExpandedContent()}),100):this.intersectionObserver.disconnect()),"api-key-name"===e||"api-key-location"===e||"api-key-value"===e){let t=!1,s="",n="",i="";if("api-key-name"===e?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),t=!0):"api-key-location"===e?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),t=!0):"api-key-value"===e&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),t=!0),t&&this.resolvedSpec){const e=this.resolvedSpec.securitySchemes.find((e=>e.securitySchemeId===ut));e?(e.name=s,e.in=n,e.value=i,e.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({securitySchemeId:ut,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(e){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const t=e.target.files[0],r=new FileReader;r.onload=()=>{try{const e=JSON.parse(r.result);this.loadSpec(e),this.shadowRoot.getElementById("spec-url").value=""}catch{console.error("RapiDoc: Unable to read or parse json")}},r.readAsText(t)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(e){this.searchVal=e.target.value,this.resolvedSpec.tags.forEach((e=>e.paths.filter((t=>{this.searchVal&&mt(this.searchVal,t,e.name)&&(e.expanded=!0)})))),this.resolvedSpec.components.forEach((e=>e.subComponents.filter((e=>{e.expanded=!1,function(e,t){return t.name.toLowerCase().includes(e.toLowerCase())}(this.searchVal,e)&&(e.expanded=!0)})))),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.searchVal="",this.resolvedSpec.components.forEach((e=>e.subComponents.filter((e=>{e.expanded=!0}))))}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(e){const t=e.detail.querySelector("input");await dt(0),t&&t.focus()}async loadSpec(e){if(e){this.searchVal="";try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;const t=await hR.call(this,e,"true"===this.generateMissingTags,"true"===this.sortTags,"true"===this.sortSchemas,this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch(e){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${e.message}`)}}}async afterSpecParsedAndValidated(e){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((e=>e.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t),this.intersectionObserver.disconnect(),"read"===this.renderStyle&&(await dt(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;const r=this.getElementIDFromURL();if(r)"view"===this.renderStyle?this.expandAndGotoOperation(r,!0,!0):this.scrollToPath(r);else if("focused"===this.renderStyle&&!this.gotoPath){var s;const e=this.showInfo?"overview":null===(s=this.resolvedSpec.tags[0])||void 0===s?void 0:s.paths[0];this.scrollToPath(e)}}getComponentBaseURL(){const{href:e}=window.location,t=this.routePrefix.replace(/(#|\/)$/,"");if(!t)return e.split("#")[0];const r=e.lastIndexOf(t);return-1===r?e:e.slice(0,r)}getElementIDFromURL(){const e=this.getComponentBaseURL();return window.location.href.replace(e+this.routePrefix,"")}replaceHistoryState(e){const t=this.getComponentBaseURL();window.history.replaceState(null,null,`${t}${this.routePrefix||"#"}${e}`)}expandAndGotoOperation(e,t=!0){if(!this.resolvedSpec)return;let r=!0;const s=-1===e.indexOf("#")?e:e.substring(1);if(s.startsWith("overview")||"servers"===s||"auth"===s)r=!1;else for(let t=0;t<(null===(n=this.resolvedSpec.tags)||void 0===n?void 0:n.length);t++){var n,i;const s=this.resolvedSpec.tags[t],o=null===(i=s.paths)||void 0===i?void 0:i.find((t=>t.elementId===e));o&&(o.expanded&&s.expanded?r=!1:(o.expanded=!0,s.expanded=!0))}t&&(r&&this.requestUpdate(),window.setTimeout((()=>{const e=this.shadowRoot.getElementById(s);e&&(e.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),"true"===this.updateRoute&&this.replaceHistoryState(s))}),r?150:0))}isValidTopId(e){return e.startsWith("overview")||"servers"===e||"auth"===e}isValidPathId(e){var t,r;return!("overview"!==e||!this.showInfo)||(!("servers"!==e||!this.allowServerSelection)||(!("auth"!==e||!this.allowAuthentication)||(e.startsWith("tag--")?null===(r=this.resolvedSpec)||void 0===r||null===(r=r.tags)||void 0===r?void 0:r.find((t=>t.elementId===e)):null===(t=this.resolvedSpec)||void 0===t||null===(t=t.tags)||void 0===t?void 0:t.find((t=>t.paths.find((t=>t.elementId===e)))))))}onIntersect(e){!1!==this.isIntersectionObserverActive&&e.forEach((e=>{if(e.isIntersecting&&e.intersectionRatio>0){const t=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active"),r=this.shadowRoot.getElementById(`link-${e.target.id}`);r&&("true"===this.updateRoute&&this.replaceHistoryState(e.target.id),r.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),r.classList.add("active"),r.part.add("section-navbar-active-item")),t&&t!==r&&(t.classList.remove("active"),t.part.remove("section-navbar-active-item"))}}))}handleHref(e){if("a"===e.target.tagName.toLowerCase()&&e.target.getAttribute("href").startsWith("#")){const t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(e,t=!0){if("click"!==e.type&&("keyup"!==e.type||13!==e.keyCode))return;const r=e.target;if(r.dataset.contentId){if(this.isIntersectionObserverActive=!1,"focused"===this.renderStyle){const e=this.shadowRoot.querySelector("api-request");e&&e.beforeNavigationFocusedMode()}this.scrollToPath(r.dataset.contentId,!0,t),setTimeout((()=>{this.isIntersectionObserverActive=!0}),300)}}async scrollToPath(e,t=!0,r=!0){if("focused"===this.renderStyle&&(this.focusedElementId=e,await dt(0)),"view"===this.renderStyle)this.expandAndGotoOperation(e,t,!0);else{let t=!1;const s=this.shadowRoot.getElementById(e);if(s?(t=!0,s.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):t=!1,t){if("focused"===this.renderStyle){const e=this.shadowRoot.querySelector("api-request");e&&e.afterNavigationFocusedMode();const t=this.shadowRoot.querySelector("api-response");t&&t.resetSelection()}"true"===this.updateRoute&&this.replaceHistoryState(e);const t=this.shadowRoot.getElementById(`link-${e}`);if(t){r&&t.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await dt(0);const e=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");e&&(e.classList.remove("active"),e.part.remove("active"),e.part.remove("section-navbar-active-item")),t.classList.add("active"),t.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(e,t,r){return OR.call(this,e,t,r)}setApiKey(e,t){return OR.call(this,e,"","",t)}removeAllSecurityKeys(){return jR.call(this)}setApiServer(e){return kF.call(this,e)}onAdvancedSearch(e,t){const r=e.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{let e;e="text"===r.type?r:r.closest(".advanced-search-options").querySelector("input[type=text]");const t=[...r.closest(".advanced-search-options").querySelectorAll("input:checked")].map((e=>e.id));this.advancedSearchMatches=function(e,t,r=[]){if(!e.trim()||0===r.length)return;const s=[];return t.forEach((t=>{t.paths.forEach((t=>{let n="";var i;if(r.includes("search-api-path")&&(n=t.path),r.includes("search-api-descr")&&(n=`${n} ${(t.summary||"")+(t.description||"")}`),r.includes("search-api-params")&&(n=`${n} ${(null===(i=t.parameters)||void 0===i?void 0:i.map((e=>e.name)).join(" "))||""}`),r.includes("search-api-request-body")&&t.requestBody){let e=new Set;for(const r in null===(o=t.requestBody)||void 0===o?void 0:o.content){var o,a,l;null!==(a=t.requestBody.content[r].schema)&&void 0!==a&&a.properties&&(e=ft(null===(l=t.requestBody.content[r].schema)||void 0===l?void 0:l.properties)),n=`${n} ${[...e].join(" ")}`}}r.includes("search-api-resp-descr")&&(n=`${n} ${Object.values(t.responses).map((e=>e.description||"")).join(" ")}`),n.toLowerCase().includes(e.trim().toLowerCase())&&s.push({elementId:t.elementId,method:t.method,path:t.path,summary:t.summary||t.description||"",deprecated:t.deprecated})}))})),s}(e.value,this.resolvedSpec.tags,t)}),t)}}customElements.define("rapi-doc",YF);customElements.define("rapi-doc-mini",class extends de{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[et,tt,rt,st,nt,it,ot,at,lt,c`
  3518. :host {
  3519. all: initial;
  3520. display:flex;
  3521. flex-direction: column;
  3522. min-width:360px;
  3523. width:100%;
  3524. height:100%;
  3525. margin:0;
  3526. padding:0;
  3527. overflow: hidden;
  3528. letter-spacing:normal;
  3529. color:var(--fg);
  3530. background-color:var(--bg);
  3531. font-family:var(--font-regular);
  3532. container-type: inline-size;
  3533. }
  3534. @container (min-width: 768px) {
  3535. .only-large-screen {
  3536. display:block;
  3537. }
  3538. .only-large-screen-flex {
  3539. display:flex;
  3540. }
  3541. }`]}connectedCallback(){if(super.connectedCallback(),"false"!==this.loadFonts){const e={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},t=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",e);e.weight="600";const r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",e);t.load().then((e=>{document.fonts.add(e)})),r.load().then((e=>{document.fonts.add(e)}))}this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?"model"===this.defaultSchemaTab&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",this.pathsExpanded="true"===this.pathsExpanded,(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),Xe.setOptions({highlight:(e,t)=>Qe().languages[t]?Qe().highlight(e,Qe().languages[t],t):e})}render(){return KF.call(this,!0,this.pathsExpanded)}attributeChangedCallback(e,t,r){if("spec-url"===e&&t!==r&&window.setTimeout((async()=>{await this.loadSpec(r)}),0),"match-paths"!==e&&"match-type"!==e&&"remove-endpoints-with-badge-label-as"!==e||t!==r&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),"api-key-name"===e||"api-key-location"===e||"api-key-value"===e){let t=!1,s="",n="",i="";if("api-key-name"===e?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(s=r,n=this.getAttribute("api-key-location"),i=this.getAttribute("api-key-value"),t=!0):"api-key-location"===e?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(n=r,s=this.getAttribute("api-key-name"),i=this.getAttribute("api-key-value"),t=!0):"api-key-value"===e&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(i=r,n=this.getAttribute("api-key-location"),s=this.getAttribute("api-key-name"),t=!0),t&&this.resolvedSpec){const e=this.resolvedSpec.securitySchemes.find((e=>e.securitySchemeId===ut));e?(e.name=s,e.in=n,e.value=i,e.finalKeyValue=i):this.resolvedSpec.securitySchemes.push({apiKeyId:ut,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:s,in:n,value:i,finalKeyValue:i}),this.requestUpdate()}}super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(e){if(e)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const t=await hR.call(this,e,"true"===this.generateMissingTags,"true"===this.sortTags,"true"===this.sortSchemas,this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(t)}catch(e){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${e.message}`)}}setHttpUserNameAndPassword(e,t,r){return OR.call(this,e,t,r)}setApiKey(e,t){return OR.call(this,e,"","",t)}removeAllSecurityKeys(){return jR.call(this)}setApiServer(e){return kF.call(this,e)}async afterSpecParsedAndValidated(e){for(this.resolvedSpec=e,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((e=>e.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t)}handleHref(e){if("a"===e.target.tagName.toLowerCase()&&e.target.getAttribute("href").startsWith("#")){const t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}});class XF extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",(e=>this.receiveStorage(e)),!0)}receiveAuthParms(){let e={};if(document.location.search){const t=new URLSearchParams(document.location.search);e={code:t.get("code"),error:t.get("error"),state:t.get("state"),responseType:"code"}}else if(window.location.hash){e={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"}}window.opener?window.opener.postMessage(e,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(e))}relayAuthParams(e){if(window.parent&&"rapidoc-oauth-data"===e.key){const t=JSON.parse(e.newValue);window.parent.postMessage(t,this.target)}}parseQueryString(e,t){const r=e.split("&");for(let e=0;e<r.length;e++){const s=r[e].split("=");if(decodeURIComponent(s[0])===t)return decodeURIComponent(s[1])}}}function ZF(){return J`
  3542. <nav class='nav-bar' part="section-navbar">
  3543. <slot name="nav-logo" class="logo"></slot>
  3544. <div style="display:flex;line-height:22px; padding:8px">
  3545. <input id="nav-bar-search"
  3546. part = "textbox textbox-nav-filter"
  3547. style = "width:100%; height: 26px; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)"
  3548. type = "text"
  3549. placeholder = "Filter"
  3550. @change = "${this.onSearchChange}"
  3551. spellcheck = "false"
  3552. >
  3553. <div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">&#x21a9;</div>
  3554. </div>
  3555. <nav style="flex:1" class='nav-scroll' part="section-navbar-scroll">
  3556. ${this.resolvedSpec.schemaAndExamples.map((e=>J`
  3557. <div class='nav-bar-path' data-content-id='${e.elementId}' id='link-${e.elementId}'
  3558. @click = '${e=>{this.scrollToEventTarget(e,!1)}}'
  3559. >
  3560. ${e.name}
  3561. </div>`))}
  3562. </nav>
  3563. </nav>
  3564. `}function QF(){return J`
  3565. ${"true"===this.showInfo?EF.call(this):""}
  3566. <div style="font-size:var(--font-size-regular);">
  3567. ${this.resolvedSpec.schemaAndExamples.map((e=>{var t;const r=dF(e.schema,"json",tF(e.examples),tF(e.example),!0,!1,"json",!0);return e.selectedExample=null===(t=r[0])||void 0===t?void 0:t.exampleId,J`
  3568. <section id='${e.elementId}' class='json-schema-and-example regular-font' style="display:flex; flex-direction: column; border:1px solid var(--border-color); margin-bottom:32px; border-top: 5px solid var(--border-color)">
  3569. <div style="padding:16px; border-bottom: 1px solid var(--border-color)">
  3570. <div style="font-size:var(--font-size-small); font-weight:bold">${e.name}</div>
  3571. <span class="json-schema-description m-markdown ">${$R(Xe(e.description||""))}</span>
  3572. </div>
  3573. <div style="display:flex; flex-direction: row; gap:16px;">
  3574. <div class="json-schema-def" style="flex:1; padding:16px 0 16px 16px; ">
  3575. <schema-tree
  3576. .data = "${uF(e.schema,{})}"
  3577. schema-expand-level = "${this.schemaExpandLevel}"
  3578. schema-description-expanded = "${this.schemaDescriptionExpanded}"
  3579. allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
  3580. schema-hide-read-only = "false"
  3581. schema-hide-write-only = "false"
  3582. > </schema-tree>
  3583. </div>
  3584. <div class="json-schema-example-panel" style="width:400px; background-color: var(--input-bg); padding:16px 0 16px 16px; border-left: 1px dashed var(--border-color);">
  3585. ${r.length>1?J`<select style="min-width:100px; max-width:100%" @change='${t=>this.onSelectExample(t,e)}'>
  3586. ${r.map((t=>J`
  3587. <option value="${t.exampleId}" ?selected=${t.exampleId===e.selectedExample}>
  3588. ${t.exampleSummary.length>80?t.exampleId:t.exampleSummary}
  3589. </option>`))}
  3590. </select>`:J`<div style="font-size: var(--font-size-small);font-weight:700; margin:5px 0"> ${r[0].exampleSummary}</div>`}
  3591. ${r.map((t=>J`
  3592. <json-tree
  3593. .data = "${t.exampleValue}"
  3594. data-example = "${t.exampleId}"
  3595. class = "example"
  3596. style = "margin-top:16px; display: ${t.exampleId===e.selectedExample?"flex":"none"}"
  3597. ></json-tree>`))}
  3598. </div>
  3599. </div>
  3600. </section>`}))}
  3601. </div>
  3602. `}function eM(e=!1){if(!this.resolvedSpec)return"";const t={bg1:GF(this.bgColor)?this.bgColor:"",fg1:GF(this.textColor)?this.textColor:"",headerColor:GF(this.headerColor)?this.headerColor:"",primaryColor:GF(this.primaryColor)?this.primaryColor:"",navBgColor:GF(this.navBgColor)?this.navBgColor:"",navTextColor:GF(this.navTextColor)?this.navTextColor:"",navHoverBgColor:GF(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:GF(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:GF(this.navAccentColor)?this.navAccentColor:"",navAccenttextColor:GF(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?e?J`
  3603. ${"dark"===this.theme?JF.call(this,"dark",t):JF.call(this,"light",t)}
  3604. <div style="display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
  3605. `:J`
  3606. ${"dark"===this.theme?JF.call(this,"dark",t):JF.call(this,"light",t)}
  3607. <!-- Header -->
  3608. ${zF.call(this)}
  3609. <h1> Header </h1>
  3610. <main class="main-content regular-font" part="section-main-content">
  3611. <slot></slot>
  3612. <div style="margin:24px; text-align: center;">
  3613. <h1 style="color: var(--red)"> ${this.resolvedSpec.info.title} </h1>
  3614. <div style="font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
  3615. </div>
  3616. </main>
  3617. `:this.resolvedSpec.isSpecLoading?J`
  3618. ${"dark"===this.theme?JF.call(this,"dark",t):JF.call(this,"light",t)}
  3619. <main class="main-content regular-font" part="section-main-content">
  3620. <slot></slot>
  3621. <div class="main-content-inner--${this.renderStyle}-mode">
  3622. <div class="loader"></div>
  3623. </div>
  3624. </main>
  3625. `:J`
  3626. ${"dark"===this.theme?JF.call(this,"dark",t):JF.call(this,"light",t)}
  3627. <!-- Header -->
  3628. ${"false"===this.showHeader?"":zF.call(this)}
  3629. <div id='the-main-body' class="body ${this.cssClasses}" dir= ${this.pageDirection}>
  3630. <!-- Side Nav -->
  3631. ${ZF.call(this)}
  3632. <!-- Main Content -->
  3633. <main class="main-content regular-font" part="section-main-content">
  3634. <slot></slot>
  3635. <div class="main-content-inner--${this.renderStyle}-mode">
  3636. ${!0===this.loading?J`<div class="loader"></div>`:J`
  3637. ${!0===this.loadFailed?J`<div style="text-align: center;margin: 16px;"> Unable to load the Spec</div>`:J`
  3638. <div class="operations-root" @click="${e=>{this.handleHref(e)}}">
  3639. ${QF.call(this)}
  3640. </div>
  3641. `}`}
  3642. </div>
  3643. <slot name="footer"></slot>
  3644. </main>
  3645. </div>
  3646. `}customElements.define("oauth-receiver",XF);customElements.define("json-schema-viewer",class extends de{constructor(){super(),this.isMini=!1,this.updateRoute="false",this.renderStyle="focused",this.showHeader="true",this.allowAdvancedSearch="false",this.selectedExampleForEachSchema={}}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},loading:{type:Boolean}}}static get styles(){return[et,tt,rt,st,nt,it,ot,at,lt,c`
  3647. :host {
  3648. all: initial;
  3649. display:flex;
  3650. flex-direction: column;
  3651. min-width:360px;
  3652. width:100%;
  3653. height:100%;
  3654. margin:0;
  3655. padding:0;
  3656. overflow: hidden;
  3657. letter-spacing:normal;
  3658. color:var(--fg);
  3659. background-color:var(--bg);
  3660. font-family:var(--font-regular);
  3661. container-type: inline-size;
  3662. }
  3663. .body {
  3664. display:flex;
  3665. height:100%;
  3666. width:100%;
  3667. overflow:hidden;
  3668. }
  3669. .nav-bar {
  3670. width: 230px;
  3671. display:flex;
  3672. }
  3673. .main-content {
  3674. margin:0;
  3675. padding: 16px;
  3676. display:block;
  3677. flex:1;
  3678. height:100%;
  3679. overflow-y: auto;
  3680. overflow-x: hidden;
  3681. scrollbar-width: thin;
  3682. scrollbar-color: var(--border-color) transparent;
  3683. }
  3684. .main-content-inner--view-mode {
  3685. padding: 0 8px;
  3686. }
  3687. .main-content::-webkit-scrollbar {
  3688. width: 8px;
  3689. height: 8px;
  3690. }
  3691. .main-content::-webkit-scrollbar-track {
  3692. background:transparent;
  3693. }
  3694. .main-content::-webkit-scrollbar-thumb {
  3695. background-color: var(--border-color);
  3696. }
  3697. .main-header {
  3698. background-color:var(--header-bg);
  3699. color:var(--header-fg);
  3700. width:100%;
  3701. }
  3702. .header-title {
  3703. font-size:calc(var(--font-size-regular) + 8px);
  3704. padding:0 8px;
  3705. }
  3706. input.header-input{
  3707. background:var(--header-color-darker);
  3708. color:var(--header-fg);
  3709. border:1px solid var(--header-color-border);
  3710. flex:1;
  3711. padding-right:24px;
  3712. border-radius:3px;
  3713. }
  3714. input.header-input::placeholder {
  3715. opacity:0.4;
  3716. }
  3717. .loader {
  3718. margin: 16px auto 16px auto;
  3719. border: 4px solid var(--bg3);
  3720. border-radius: 50%;
  3721. border-top: 4px solid var(--primary-color);
  3722. width: 36px;
  3723. height: 36px;
  3724. animation: spin 2s linear infinite;
  3725. }
  3726. @container (min-width: 768px) {
  3727. .only-large-screen{
  3728. display:block;
  3729. }
  3730. .only-large-screen-flex {
  3731. display:flex;
  3732. }
  3733. }`]}connectedCallback(){super.connectedCallback();const e=this.parentElement;if(e&&(0===e.offsetWidth&&""===e.style.width&&(e.style.width="100vw"),0===e.offsetHeight&&""===e.style.height&&(e.style.height="100vh"),"BODY"===e.tagName&&(e.style.marginTop||(e.style.marginTop="0"),e.style.marginRight||(e.style.marginRight="0"),e.style.marginBottom||(e.style.marginBottom="0"),e.style.marginLeft||(e.style.marginLeft="0"))),"false"!==this.loadFonts){const e={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},t=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",e);e.weight="600";const r=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",e);t.load().then((e=>{document.fonts.add(e)})),r.load().then((e=>{document.fonts.add(e)}))}this.renderStyle="focused",this.pathsExpanded="true"===this.pathsExpanded,this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showHeader&&"true, false,".includes(`${this.showHeader},`)||(this.showHeader="true"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),Xe.setOptions({highlight:(e,t)=>Qe().languages[t]?Qe().highlight(e,Qe().languages[t],t):e})}render(){return eM.call(this,!0,!1,!1,this.pathsExpanded)}attributeChangedCallback(e,t,r){"spec-url"===e&&t!==r&&window.setTimeout((async()=>{await this.loadSpec(r)}),0),super.attributeChangedCallback(e,t,r)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSearchChange(e){this.matchPaths=e.target.value}async loadSpec(e){if(e)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const t=await hR.call(this,e,"true"===this.generateMissingTags,"true"===this.sortTags,"true"===this.sortSchemas,this.getAttribute("sort-endpoints-by"),this.getAttribute("match-paths"),this.getAttribute("match-type"),this.getAttribute("remove-endpoints-with-badge-label-as"));this.loading=!1,this.afterSpecParsedAndValidated(t)}catch(e){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${e.message}`)}}async afterSpecParsedAndValidated(e){this.resolvedSpec=e;const t=new CustomEvent("spec-loaded",{detail:e});this.dispatchEvent(t)}handleHref(e){if("a"===e.target.tagName.toLowerCase()&&e.target.getAttribute("href").startsWith("#")){const t=this.shadowRoot.getElementById(e.target.getAttribute("href").replace("#",""));t&&t.scrollIntoView({behavior:"auto",block:"start"})}}onSelectExample(e){[...e.target.closest(".json-schema-example-panel").querySelectorAll(".example")].forEach((t=>{t.style.display=t.dataset.example===e.target.value?"flex":"none"}))}async scrollToEventTarget(e){const t=e.currentTarget;if(!t.dataset.contentId)return;const r=this.shadowRoot.getElementById(t.dataset.contentId);r&&r.scrollIntoView({behavior:"auto",block:"start"})}})},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],s=t[1];return 3*(r+s)/4-s},t.toByteArray=function(e){var t,r,i=a(e),o=i[0],l=i[1],c=new n(function(e,t,r){return 3*(t+r)/4-r}(0,o,l)),p=0,u=l>0?o-4:o;for(r=0;r<u;r+=4)t=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],c[p++]=t>>16&255,c[p++]=t>>8&255,c[p++]=255&t;2===l&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,c[p++]=255&t);1===l&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,c[p++]=t>>8&255,c[p++]=255&t);return c},t.fromByteArray=function(e){for(var t,s=e.length,n=s%3,i=[],o=16383,a=0,c=s-n;a<c;a+=o)i.push(l(e,a,a+o>c?c:a+o));1===n?(t=e[s-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[s-2]<<8)+e[s-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],s=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=i[o],s[i.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,s){for(var n,i,o=[],a=t;a<s;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(i=n)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63},287:(e,t,r)=>{"use strict";const s=r(526),n=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=l,t.IS=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|f(e,t);let s=a(r);const n=s.write(e,t);n!==r&&(s=s.slice(0,n));return s}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const s=e.valueOf&&e.valueOf();if(null!=s&&s!==e)return l.from(s,t,r);const n=function(e){if(l.isBuffer(e)){const t=0|m(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||Y(e.length)?a(0):d(e);if("Buffer"===e.type&&Array.isArray(e.data))return d(e.data)}(e);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return p(e),a(e<0?0:0|m(e))}function d(e){const t=e.length<0?0:0|m(e.length),r=a(t);for(let s=0;s<t;s+=1)r[s]=255&e[s];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let s;return s=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(s,l.prototype),s}function m(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return s?-1:W(e).length;t=(""+t).toLowerCase(),n=!0}}function g(e,t,r){let s=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),s=!0}}function y(e,t,r){const s=e[t];e[t]=e[r],e[r]=s}function v(e,t,r,s,n){if(0===e.length)return-1;if("string"==typeof r?(s=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=l.from(t,s)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,s,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,s,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,s,n){let i,o=1,a=e.length,l=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){let s=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===s?0:i-s)){if(-1===s&&(s=i),i-s+1===l)return s*o}else-1!==s&&(i-=i-s),s=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){let r=!0;for(let s=0;s<l;s++)if(c(e,i+s)!==c(t,s)){r=!1;break}if(r)return i}return-1}function x(e,t,r,s){r=Number(r)||0;const n=e.length-r;s?(s=Number(s))>n&&(s=n):s=n;const i=t.length;let o;for(s>i/2&&(s=i/2),o=0;o<s;++o){const s=parseInt(t.substr(2*o,2),16);if(Y(s))return o;e[r+o]=s}return o}function w(e,t,r,s){return J(W(t,e.length-r),e,r,s)}function $(e,t,r,s){return J(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,s)}function S(e,t,r,s){return J(G(t),e,r,s)}function E(e,t,r,s){return J(function(e,t){let r,s,n;const i=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),s=r>>8,n=r%256,i.push(n),i.push(s);return i}(t,e.length-r),e,r,s)}function k(e,t,r){return 0===t&&r===e.length?s.fromByteArray(e):s.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);const s=[];let n=t;for(;n<r;){const t=e[n];let i=null,o=t>239?4:t>223?3:t>191?2:1;if(n+o<=r){let r,s,a,l;switch(o){case 1:t<128&&(i=t);break;case 2:r=e[n+1],128==(192&r)&&(l=(31&t)<<6|63&r,l>127&&(i=l));break;case 3:r=e[n+1],s=e[n+2],128==(192&r)&&128==(192&s)&&(l=(15&t)<<12|(63&r)<<6|63&s,l>2047&&(l<55296||l>57343)&&(i=l));break;case 4:r=e[n+1],s=e[n+2],a=e[n+3],128==(192&r)&&128==(192&s)&&128==(192&a)&&(l=(15&t)<<18|(63&r)<<12|(63&s)<<6|63&a,l>65535&&l<1114112&&(i=l))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,s.push(i>>>10&1023|55296),i=56320|1023&i),s.push(i),n+=o}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",s=0;for(;s<t;)r+=String.fromCharCode.apply(String,e.slice(s,s+=O));return r}(s)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return p(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return u(e)},l.allocUnsafeSlow=function(e){return u(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(K(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,s=t.length;for(let n=0,i=Math.min(r,s);n<i;++n)if(e[n]!==t[n]){r=e[n],s=t[n];break}return r<s?-1:s<r?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const s=l.allocUnsafe(t);let n=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))n+t.length>s.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(s,n)):Uint8Array.prototype.set.call(s,t,n);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(s,n)}n+=t.length}return s},l.byteLength=f,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,s,n){if(K(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),t<0||r>e.length||s<0||n>this.length)throw new RangeError("out of range index");if(s>=n&&t>=r)return 0;if(s>=n)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(n>>>=0)-(s>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(i,o),c=this.slice(s,n),p=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==p[e]){i=c[e],o=p[e];break}return i<o?-1:o<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},l.prototype.write=function(e,t,r,s){if(void 0===t)s="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)s=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0)}const n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let i=!1;for(;;)switch(s){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return $(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function j(e,t,r){let s="";r=Math.min(e.length,r);for(let n=t;n<r;++n)s+=String.fromCharCode(127&e[n]);return s}function T(e,t,r){let s="";r=Math.min(e.length,r);for(let n=t;n<r;++n)s+=String.fromCharCode(e[n]);return s}function P(e,t,r){const s=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>s)&&(r=s);let n="";for(let s=t;s<r;++s)n+=X[e[s]];return n}function C(e,t,r){const s=e.slice(t,r);let n="";for(let e=0;e<s.length-1;e+=2)n+=String.fromCharCode(s[e]+256*s[e+1]);return n}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,r,s,n,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+s>e.length)throw new RangeError("Index out of range")}function R(e,t,r,s,n){U(t,s,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function F(e,t,r,s,n){U(t,s,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function M(e,t,r,s,n,i){if(r+s>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,s,i){return t=+t,r>>>=0,i||M(e,0,r,4),n.write(e,t,r,s,23,4),r+4}function D(e,t,r,s,i){return t=+t,r>>>=0,i||M(e,0,r,8),n.write(e,t,r,s,52,8),r+8}l.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const s=this.subarray(e,t);return Object.setPrototypeOf(s,l.prototype),s},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let s=this[e],n=1,i=0;for(;++i<t&&(n*=256);)s+=this[e+i]*n;return s},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let s=this[e+--t],n=1;for(;t>0&&(n*=256);)s+=this[e+--t]*n;return s},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,n=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(s)+(BigInt(n)<<BigInt(32))})),l.prototype.readBigUInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=t*2**24+65536*this[++e]+256*this[++e]+this[++e],n=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(s)<<BigInt(32))+BigInt(n)})),l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let s=this[e],n=1,i=0;for(;++i<t&&(n*=256);)s+=this[e+i]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let s=t,n=1,i=this[e+--s];for(;s>0&&(n*=256);)i+=this[e+--s]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(s)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Z((function(e){z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const s=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(s)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),n.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),n.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),n.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),n.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,s){if(e=+e,t>>>=0,r>>>=0,!s){_(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=1,i=0;for(this[t]=255&e;++i<r&&(n*=256);)this[t+i]=e/n&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,s){if(e=+e,t>>>=0,r>>>=0,!s){_(this,e,t,r,Math.pow(2,8*r)-1,0)}let n=r-1,i=1;for(this[t+n]=255&e;--n>=0&&(i*=256);)this[t+n]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,r,s){if(e=+e,t>>>=0,!s){const s=Math.pow(2,8*r-1);_(this,e,t,r,s-1,-s)}let n=0,i=1,o=0;for(this[t]=255&e;++n<r&&(i*=256);)e<0&&0===o&&0!==this[t+n-1]&&(o=1),this[t+n]=(e/i|0)-o&255;return t+r},l.prototype.writeIntBE=function(e,t,r,s){if(e=+e,t>>>=0,!s){const s=Math.pow(2,8*r-1);_(this,e,t,r,s-1,-s)}let n=r-1,i=1,o=0;for(this[t+n]=255&e;--n>=0&&(i*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/i|0)-o&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,s){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<r&&(s=r),s===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-r&&(s=e.length-t+r);const n=s-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,s):Uint8Array.prototype.set.call(e,this.subarray(r,s),t),n},l.prototype.fill=function(e,t,r,s){if("string"==typeof e){if("string"==typeof t?(s=t,t=0,r=this.length):"string"==typeof r&&(s=r,r=this.length),void 0!==s&&"string"!=typeof s)throw new TypeError("encoding must be a string");if("string"==typeof s&&!l.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(1===e.length){const t=e.charCodeAt(0);("utf8"===s&&t<128||"latin1"===s)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let n;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{const i=l.isBuffer(e)?e:l.from(e,s),o=i.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=i[n%o]}return this};const B={};function q(e,t,r){B[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function N(e){let t="",r=e.length;const s="-"===e[0]?1:0;for(;r>=s+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U(e,t,r,s,n,i){if(e>r||e<t){const s="bigint"==typeof t?"n":"";let n;throw n=i>3?0===t||t===BigInt(0)?`>= 0${s} and < 2${s} ** ${8*(i+1)}${s}`:`>= -(2${s} ** ${8*(i+1)-1}${s}) and < 2 ** ${8*(i+1)-1}${s}`:`>= ${t}${s} and <= ${r}${s}`,new B.ERR_OUT_OF_RANGE("value",n,e)}!function(e,t,r){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(s,n,i)}function z(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw z(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}q("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),q("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),q("ERR_OUT_OF_RANGE",(function(e,t,r){let s=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=N(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=N(n)),n+="n"),s+=` It must be ${t}. Received ${n}`,s}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function W(e,t){let r;t=t||1/0;const s=e.length;let n=null;const i=[];for(let o=0;o<s;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===s){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function G(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,r,s){let n;for(n=0;n<s&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const s=16*r;for(let n=0;n<16;++n)t[s+n]=e[r]+e[n]}return t}();function Z(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},4:e=>{"use strict";class t{constructor(e,t){this.low=e,this.high=t,this.length=1+t-e}overlaps(e){return!(this.high<e.low||this.low>e.high)}touches(e){return!(this.high+1<e.low||this.low-1>e.high)}add(e){return new t(Math.min(this.low,e.low),Math.max(this.high,e.high))}subtract(e){return e.low<=this.low&&e.high>=this.high?[]:e.low>this.low&&e.high<this.high?[new t(this.low,e.low-1),new t(e.high+1,this.high)]:e.low<=this.low?[new t(e.high+1,this.high)]:[new t(this.low,e.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class r{constructor(e,t){this.ranges=[],this.length=0,null!=e&&this.add(e,t)}_update_length(){this.length=this.ranges.reduce(((e,t)=>e+t.length),0)}add(e,s){var n=e=>{for(var t=0;t<this.ranges.length&&!e.touches(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.touches(this.ranges[t]);)e=e.add(this.ranges[t]),t++;r.push(e),this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(n):(null==s&&(s=e),n(new t(e,s))),this}subtract(e,s){var n=e=>{for(var t=0;t<this.ranges.length&&!e.overlaps(this.ranges[t]);)t++;for(var r=this.ranges.slice(0,t);t<this.ranges.length&&e.overlaps(this.ranges[t]);)r=r.concat(this.ranges[t].subtract(e)),t++;this.ranges=r.concat(this.ranges.slice(t)),this._update_length()};return e instanceof r?e.ranges.forEach(n):(null==s&&(s=e),n(new t(e,s))),this}intersect(e,s){var n=[],i=e=>{for(var r=0;r<this.ranges.length&&!e.overlaps(this.ranges[r]);)r++;for(;r<this.ranges.length&&e.overlaps(this.ranges[r]);){var s=Math.max(this.ranges[r].low,e.low),i=Math.min(this.ranges[r].high,e.high);n.push(new t(s,i)),r++}};return e instanceof r?e.ranges.forEach(i):(null==s&&(s=e),i(new t(e,s))),this.ranges=n,this._update_length(),this}index(e){for(var t=0;t<this.ranges.length&&this.ranges[t].length<=e;)e-=this.ranges[t].length,t++;return this.ranges[t].low+e}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new r(this)}numbers(){return this.ranges.reduce(((e,t)=>{for(var r=t.low;r<=t.high;)e.push(r),r++;return e}),[])}subranges(){return this.ranges.map((e=>({low:e.low,high:e.high,length:1+e.high-e.low})))}}e.exports=r},251:(e,t)=>{t.read=function(e,t,r,s,n){var i,o,a=8*n-s-1,l=(1<<a)-1,c=l>>1,p=-7,u=r?n-1:0,d=r?-1:1,h=e[t+u];for(u+=d,i=h&(1<<-p)-1,h>>=-p,p+=a;p>0;i=256*i+e[t+u],u+=d,p-=8);for(o=i&(1<<-p)-1,i>>=-p,p+=s;p>0;o=256*o+e[t+u],u+=d,p-=8);if(0===i)i=1-c;else{if(i===l)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,s),i-=c}return(h?-1:1)*o*Math.pow(2,i-s)},t.write=function(e,t,r,s,n,i){var o,a,l,c=8*i-n-1,p=(1<<c)-1,u=p>>1,d=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,h=s?0:i-1,m=s?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=o+u>=1?d/l:d*Math.pow(2,1-u))*l>=2&&(o++,l/=2),o+u>=p?(a=0,o=p):o+u>=1?(a=(t*l-1)*Math.pow(2,n),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;e[r+h]=255&a,h+=m,a/=256,n-=8);for(o=o<<n|a,c+=n;c>0;e[r+h]=255&o,h+=m,o/=256,c-=8);e[r+h-m]|=128*f}},22:()=>{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",r={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},s={bash:r,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:s},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:r}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:s},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:s.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:s.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},r.inside=e.languages.bash;for(var n=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=s.variable[1].inside,o=0;o<n.length;o++)i[n[o]]=e.languages.bash[n[o]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism)},651:()=>{!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,r){return"(?:"+t[+r]+")"}))}function r(e,r,s){return RegExp(t(e,r),s||"")}function s(e,t){for(var r=0;r<t;r++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),p=RegExp(l(n+" "+i+" "+o+" "+a)),u=l(i+" "+o+" "+a),d=l(n+" "+i+" "+a),h=s(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),m=s(/\((?:[^()]|<<self>>)*\)/.source,2),f=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[f,h]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[u,g]),v=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,v]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[h,m,v]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),$=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,y,v]),S={keyword:p,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,k=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[k]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:S},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[f,$]),lookbehind:!0,inside:S},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[f]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:S},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:S},{pattern:r(/(\bwhere\s+)<<0>>/.source,[f]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:S},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[$,d,f]),inside:S}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:r(/([(,]\s*)<<0>>(?=\s*:)/.source,[f]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[f]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:S},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[$,y]),inside:S,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[$]),lookbehind:!0,inside:S,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[f,h]),inside:{function:r(/^<<0>>/.source,[f]),generic:{pattern:RegExp(h),alias:"class-name",inside:S}}},"type-list":{pattern:r(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,f,$,p.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,m]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:p,"class-name":{pattern:RegExp($),greedy:!0,inside:S},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=k+"|"+E,j=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),T=s(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[j]),2),P=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,C=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,T]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[P,C]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[P]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[T]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var I=/:[^}\r\n]+/.source,_=s(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[j]),2),R=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[_,I]),F=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),M=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,I]);function L(t,s){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[s,I]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:r(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:L(R,_)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[M]),lookbehind:!0,greedy:!0,inside:L(M,F)}],char:{pattern:RegExp(E),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},113:()=>{!function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))}(Prism)},378:()=>{Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},784:()=>{!function(e){function t(e){return RegExp("(^(?:"+e+"):[ \t]*(?![ \t]))[^]+","i")}e.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:e.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:t(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:e.languages.csp},{pattern:t(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:e.languages.hpkp},{pattern:t(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:e.languages.hsts},{pattern:t(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var r,s=e.languages,n={"application/javascript":s.javascript,"application/json":s.json||s.javascript,"application/xml":s.xml,"text/xml":s.xml,"text/html":s.html,"text/css":s.css,"text/plain":s.plain},i={"application/json":!0,"application/xml":!0};function o(e){var t=e.replace(/^[a-z]+\//,"");return"(?:"+e+"|"+("\\w+/(?:[\\w.-]+\\+)+"+t+"(?![+\\w.-])")+")"}for(var a in n)if(n[a]){r=r||{};var l=i[a]?o(a):a;r[a.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+l+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:n[a]}}r&&e.languages.insertBefore("http","header",r)}(Prism)},976:()=>{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,r=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,s={pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[s,{pattern:RegExp(/(^|[^\w.])/.source+r+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:s.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+r+/[A-Z]\w*\b/.source),lookbehind:!0,inside:s.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":s,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+r+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:s.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+r+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:s.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},342:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},83:()=>{!function(e){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+r.source+")?)",n=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),i=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(e,t){t=(t||"").replace(/m/g,"")+"m";var r=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return s})).replace(/<<value>>/g,(function(){return e}));return RegExp(r,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return s}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return s})).replace(/<<key>>/g,(function(){return"(?:"+n+"|"+i+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(i),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:r,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism)},848:(e,t,r)=>{var s=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,r=0,s={},n={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++r}),e.__id},clone:function e(t,r){var s,i;switch(r=r||{},n.util.type(t)){case"Object":if(i=n.util.objId(t),r[i])return r[i];for(var o in s={},r[i]=s,t)t.hasOwnProperty(o)&&(s[o]=e(t[o],r));return s;case"Array":return i=n.util.objId(t),r[i]?r[i]:(s=[],r[i]=s,t.forEach((function(t,n){s[n]=e(t,r)})),s);default:return t}},getLanguage:function(e){for(;e;){var r=t.exec(e.className);if(r)return r[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,r){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+r)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(s){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var r in t)if(t[r].src==e)return t[r]}return null}},isActive:function(e,t,r){for(var s="no-"+t;e;){var n=e.classList;if(n.contains(t))return!0;if(n.contains(s))return!1;e=e.parentElement}return!!r}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(e,t){var r=n.util.clone(n.languages[e]);for(var s in t)r[s]=t[s];return r},insertBefore:function(e,t,r,s){var i=(s=s||n.languages)[e],o={};for(var a in i)if(i.hasOwnProperty(a)){if(a==t)for(var l in r)r.hasOwnProperty(l)&&(o[l]=r[l]);r.hasOwnProperty(a)||(o[a]=i[a])}var c=s[e];return s[e]=o,n.languages.DFS(n.languages,(function(t,r){r===c&&t!=e&&(this[t]=o)})),o},DFS:function e(t,r,s,i){i=i||{};var o=n.util.objId;for(var a in t)if(t.hasOwnProperty(a)){r.call(t,a,t[a],s||a);var l=t[a],c=n.util.type(l);"Object"!==c||i[o(l)]?"Array"!==c||i[o(l)]||(i[o(l)]=!0,e(l,r,a,i)):(i[o(l)]=!0,e(l,r,null,i))}}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,r){var s={callback:r,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",s),s.elements=Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)),n.hooks.run("before-all-elements-highlight",s);for(var i,o=0;i=s.elements[o++];)n.highlightElement(i,!0===t,s.callback)},highlightElement:function(t,r,s){var i=n.util.getLanguage(t),o=n.languages[i];n.util.setLanguage(t,i);var a=t.parentElement;a&&"pre"===a.nodeName.toLowerCase()&&n.util.setLanguage(a,i);var l={element:t,language:i,grammar:o,code:t.textContent};function c(e){l.highlightedCode=e,n.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,n.hooks.run("after-highlight",l),n.hooks.run("complete",l),s&&s.call(l.element)}if(n.hooks.run("before-sanity-check",l),(a=l.element.parentElement)&&"pre"===a.nodeName.toLowerCase()&&!a.hasAttribute("tabindex")&&a.setAttribute("tabindex","0"),!l.code)return n.hooks.run("complete",l),void(s&&s.call(l.element));if(n.hooks.run("before-highlight",l),l.grammar)if(r&&e.Worker){var p=new Worker(n.filename);p.onmessage=function(e){c(e.data)},p.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(n.highlight(l.code,l.grammar,l.language));else c(n.util.encode(l.code))},highlight:function(e,t,r){var s={code:e,grammar:t,language:r};if(n.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=n.tokenize(s.code,s.grammar),n.hooks.run("after-tokenize",s),i.stringify(n.util.encode(s.tokens),s.language)},tokenize:function(e,t){var r=t.rest;if(r){for(var s in r)t[s]=r[s];delete t.rest}var n=new l;return c(n,n.head,e),a(e,n,t,n.head,0),function(e){var t=[],r=e.head.next;for(;r!==e.tail;)t.push(r.value),r=r.next;return t}(n)},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var s,i=0;s=r[i++];)s(t)}},Token:i};function i(e,t,r,s){this.type=e,this.content=t,this.alias=r,this.length=0|(s||"").length}function o(e,t,r,s){e.lastIndex=t;var n=e.exec(r);if(n&&s&&n[1]){var i=n[1].length;n.index+=i,n[0]=n[0].slice(i)}return n}function a(e,t,r,s,l,u){for(var d in r)if(r.hasOwnProperty(d)&&r[d]){var h=r[d];h=Array.isArray(h)?h:[h];for(var m=0;m<h.length;++m){if(u&&u.cause==d+","+m)return;var f=h[m],g=f.inside,y=!!f.lookbehind,v=!!f.greedy,b=f.alias;if(v&&!f.pattern.global){var x=f.pattern.toString().match(/[imsuy]*$/)[0];f.pattern=RegExp(f.pattern.source,x+"g")}for(var w=f.pattern||f,$=s.next,S=l;$!==t.tail&&!(u&&S>=u.reach);S+=$.value.length,$=$.next){var E=$.value;if(t.length>e.length)return;if(!(E instanceof i)){var k,A=1;if(v){if(!(k=o(w,S,e,y))||k.index>=e.length)break;var O=k.index,j=k.index+k[0].length,T=S;for(T+=$.value.length;O>=T;)T+=($=$.next).value.length;if(S=T-=$.value.length,$.value instanceof i)continue;for(var P=$;P!==t.tail&&(T<j||"string"==typeof P.value);P=P.next)A++,T+=P.value.length;A--,E=e.slice(S,T),k.index-=S}else if(!(k=o(w,0,E,y)))continue;O=k.index;var C=k[0],I=E.slice(0,O),_=E.slice(O+C.length),R=S+E.length;u&&R>u.reach&&(u.reach=R);var F=$.prev;if(I&&(F=c(t,F,I),S+=I.length),p(t,F,A),$=c(t,F,new i(d,g?n.tokenize(C,g):C,b,C)),_&&c(t,$,_),A>1){var M={cause:d+","+m,reach:R};a(e,t,r,$.prev,S,M),u&&M.reach>u.reach&&(u.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,r){var s=t.next,n={value:r,prev:t,next:s};return t.next=n,s.prev=n,e.length++,n}function p(e,t,r){for(var s=t.next,n=0;n<r&&s!==e.tail;n++)s=s.next;t.next=s,s.prev=t,e.length-=n}if(e.Prism=n,i.stringify=function e(t,r){if("string"==typeof t)return t;if(Array.isArray(t)){var s="";return t.forEach((function(t){s+=e(t,r)})),s}var i={type:t.type,content:e(t.content,r),tag:"span",classes:["token",t.type],attributes:{},language:r},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(i.classes,o):i.classes.push(o)),n.hooks.run("wrap",i);var a="";for(var l in i.attributes)a+=" "+l+'="'+(i.attributes[l]||"").replace(/"/g,"&quot;")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+a+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(n.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var r=JSON.parse(t.data),s=r.language,i=r.code,o=r.immediateClose;e.postMessage(n.highlight(i,n.languages[s],s)),o&&e.close()}),!1),n):n;var u=n.util.currentScript();function d(){n.manual||n.highlightAll()}if(u&&(n.filename=u.src,u.hasAttribute("data-manual")&&(n.manual=!0)),!n.manual){var h=document.readyState;"loading"===h||"interactive"===h&&u&&u.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return n}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=s),void 0!==r.g&&(r.g.Prism=s),s.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},s.languages.markup.tag.inside["attr-value"].inside.entity=s.languages.markup.entity,s.languages.markup.doctype.inside["internal-subset"].inside=s.languages.markup,s.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(s.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:s.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var n={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};n["language-"+t]={pattern:/[\s\S]+/,inside:s.languages[t]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},s.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(s.languages.markup.tag,"addAttribute",{value:function(e,t){s.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:s.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),s.languages.html=s.languages.markup,s.languages.mathml=s.languages.markup,s.languages.svg=s.languages.markup,s.languages.xml=s.languages.extend("markup",{}),s.languages.ssml=s.languages.xml,s.languages.atom=s.languages.xml,s.languages.rss=s.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var r=e.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))}(s),s.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},s.languages.javascript=s.languages.extend("clike",{"class-name":[s.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),s.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,s.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:s.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:s.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:s.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:s.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:s.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),s.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:s.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),s.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),s.languages.markup&&(s.languages.markup.tag.addInlined("script","javascript"),s.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),s.languages.js=s.languages.javascript,function(){if(void 0!==s&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},t="data-src-status",r="loading",n="loaded",i="pre[data-src]:not(["+t+'="'+n+'"]):not(['+t+'="'+r+'"])';s.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),s.hooks.add("before-sanity-check",(function(o){var a=o.element;if(a.matches(i)){o.code="",a.setAttribute(t,r);var l=a.appendChild(document.createElement("CODE"));l.textContent="Loading…";var c=a.getAttribute("data-src"),p=o.language;if("none"===p){var u=(/\.(\w+)$/.exec(c)||[,"none"])[1];p=e[u]||u}s.util.setLanguage(l,p),s.util.setLanguage(a,p);var d=s.plugins.autoloader;d&&d.loadLanguages(p),function(e,t,r){var s=new XMLHttpRequest;s.open("GET",e,!0),s.onreadystatechange=function(){4==s.readyState&&(s.status<400&&s.responseText?t(s.responseText):s.status>=400?r("✖ Error "+s.status+" while fetching file: "+s.statusText):r("✖ Error: File does not exist or is empty"))},s.send(null)}(c,(function(e){a.setAttribute(t,n);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var r=Number(t[1]),s=t[2],n=t[3];return s?n?[r,Number(n)]:[r,void 0]:[r,r]}}(a.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),o=r[0],c=null==r[1]?i.length:r[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join("\n"),a.hasAttribute("data-start")||a.setAttribute("data-start",String(o+1))}l.textContent=e,s.highlightElement(l)}),(function(e){a.setAttribute(t,"failed"),l.textContent=e}))}})),s.plugins.fileHighlight={highlight:function(e){for(var t,r=(e||document).querySelectorAll(i),n=0;t=r[n++];)s.highlightElement(t)}};var o=!1;s.fileHighlight=function(){o||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),o=!0),s.plugins.fileHighlight.highlight.apply(this,arguments)}}}()},859:(e,t,r)=>{const s=r(96),n=r(4),i=s.types;e.exports=class e{constructor(e,t){if(this._setDefaults(e),e instanceof RegExp)this.ignoreCase=e.ignoreCase,this.multiline=e.multiline,e=e.source;else{if("string"!=typeof e)throw new Error("Expected a regexp or string");this.ignoreCase=t&&-1!==t.indexOf("i"),this.multiline=t&&-1!==t.indexOf("m")}this.tokens=s(e)}_setDefaults(t){this.max=null!=t.max?t.max:null!=e.prototype.max?e.prototype.max:100,this.defaultRange=t.defaultRange?t.defaultRange:this.defaultRange.clone(),t.randInt&&(this.randInt=t.randInt)}gen(){return this._gen(this.tokens,[])}_gen(e,t){var r,s,n,o,a;switch(e.type){case i.ROOT:case i.GROUP:if(e.followedBy||e.notFollowedBy)return"";for(e.remember&&void 0===e.groupNumber&&(e.groupNumber=t.push(null)-1),s="",o=0,a=(r=e.options?this._randSelect(e.options):e.stack).length;o<a;o++)s+=this._gen(r[o],t);return e.remember&&(t[e.groupNumber]=s),s;case i.POSITION:return"";case i.SET:var l=this._expand(e);return l.length?String.fromCharCode(this._randSelect(l)):"";case i.REPETITION:for(n=this.randInt(e.min,e.max===1/0?e.min+this.max:e.max),s="",o=0;o<n;o++)s+=this._gen(e.value,t);return s;case i.REFERENCE:return t[e.value-1]||"";case i.CHAR:var c=this.ignoreCase&&this._randBool()?this._toOtherCase(e.value):e.value;return String.fromCharCode(c)}}_toOtherCase(e){return e+(97<=e&&e<=122?-32:65<=e&&e<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(e){return e instanceof n?e.index(this.randInt(0,e.length-1)):e[this.randInt(0,e.length-1)]}_expand(e){if(e.type===s.types.CHAR)return new n(e.value);if(e.type===s.types.RANGE)return new n(e.from,e.to);{let t=new n;for(let r=0;r<e.set.length;r++){let s=this._expand(e.set[r]);if(t.add(s),this.ignoreCase)for(let e=0;e<s.length;e++){let r=s.index(e),n=this._toOtherCase(r);r!==n&&t.add(n)}}return e.not?this.defaultRange.clone().subtract(t):this.defaultRange.clone().intersect(t)}}randInt(e,t){return e+Math.floor(Math.random()*(1+t-e))}get defaultRange(){return this._range=this._range||new n(32,126)}set defaultRange(e){this._range=e}static randexp(t,r){var s;return"string"==typeof t&&(t=new RegExp(t,r)),void 0===t._randexp?(s=new e(t,r),t._randexp=s):(s=t._randexp)._setDefaults(t),s.gen()}static sugar(){RegExp.prototype.gen=function(){return e.randexp(this)}}}},208:e=>{"use strict";var t,r="";e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("expected a string");if(1===s)return e;if(2===s)return e+e;var n=e.length*s;if(t!==e||void 0===t)t=e,r="";else if(r.length>=n)return r.substr(0,n);for(;n>r.length&&s>1;)1&s&&(r+=e),s>>=1,e+=e;return r=(r+=e).substr(0,n)}},96:(e,t,r)=>{const s=r(586),n=r(205),i=r(23),o=r(48);e.exports=e=>{var t,r,a=0,l={type:n.ROOT,stack:[]},c=l,p=l.stack,u=[],d=t=>{s.error(e,"Nothing to repeat at column "+(t-1))},h=s.strToChars(e);for(t=h.length;a<t;)switch(r=h[a++]){case"\\":switch(r=h[a++]){case"b":p.push(o.wordBoundary());break;case"B":p.push(o.nonWordBoundary());break;case"w":p.push(i.words());break;case"W":p.push(i.notWords());break;case"d":p.push(i.ints());break;case"D":p.push(i.notInts());break;case"s":p.push(i.whitespace());break;case"S":p.push(i.notWhitespace());break;default:/\d/.test(r)?p.push({type:n.REFERENCE,value:parseInt(r,10)}):p.push({type:n.CHAR,value:r.charCodeAt(0)})}break;case"^":p.push(o.begin());break;case"$":p.push(o.end());break;case"[":var m;"^"===h[a]?(m=!0,a++):m=!1;var f=s.tokenizeClass(h.slice(a),e);a+=f[1],p.push({type:n.SET,set:f[0],not:m});break;case".":p.push(i.anyChar());break;case"(":var g={type:n.GROUP,stack:[],remember:!0};"?"===(r=h[a])&&(r=h[a+1],a+=2,"="===r?g.followedBy=!0:"!"===r?g.notFollowedBy=!0:":"!==r&&s.error(e,`Invalid group, character '${r}' after '?' at column `+(a-1)),g.remember=!1),p.push(g),u.push(c),c=g,p=g.stack;break;case")":0===u.length&&s.error(e,"Unmatched ) at column "+(a-1)),p=(c=u.pop()).options?c.options[c.options.length-1]:c.stack;break;case"|":c.options||(c.options=[c.stack],delete c.stack);var y=[];c.options.push(y),p=y;break;case"{":var v,b,x=/^(\d+)(,(\d+)?)?\}/.exec(h.slice(a));null!==x?(0===p.length&&d(a),v=parseInt(x[1],10),b=x[2]?x[3]?parseInt(x[3],10):1/0:v,a+=x[0].length,p.push({type:n.REPETITION,min:v,max:b,value:p.pop()})):p.push({type:n.CHAR,value:123});break;case"?":0===p.length&&d(a),p.push({type:n.REPETITION,min:0,max:1,value:p.pop()});break;case"+":0===p.length&&d(a),p.push({type:n.REPETITION,min:1,max:1/0,value:p.pop()});break;case"*":0===p.length&&d(a),p.push({type:n.REPETITION,min:0,max:1/0,value:p.pop()});break;default:p.push({type:n.CHAR,value:r.charCodeAt(0)})}return 0!==u.length&&s.error(e,"Unterminated group"),l},e.exports.types=n},48:(e,t,r)=>{const s=r(205);t.wordBoundary=()=>({type:s.POSITION,value:"b"}),t.nonWordBoundary=()=>({type:s.POSITION,value:"B"}),t.begin=()=>({type:s.POSITION,value:"^"}),t.end=()=>({type:s.POSITION,value:"$"})},23:(e,t,r)=>{const s=r(205),n=()=>[{type:s.RANGE,from:48,to:57}],i=()=>[{type:s.CHAR,value:95},{type:s.RANGE,from:97,to:122},{type:s.RANGE,from:65,to:90}].concat(n()),o=()=>[{type:s.CHAR,value:9},{type:s.CHAR,value:10},{type:s.CHAR,value:11},{type:s.CHAR,value:12},{type:s.CHAR,value:13},{type:s.CHAR,value:32},{type:s.CHAR,value:160},{type:s.CHAR,value:5760},{type:s.RANGE,from:8192,to:8202},{type:s.CHAR,value:8232},{type:s.CHAR,value:8233},{type:s.CHAR,value:8239},{type:s.CHAR,value:8287},{type:s.CHAR,value:12288},{type:s.CHAR,value:65279}];t.words=()=>({type:s.SET,set:i(),not:!1}),t.notWords=()=>({type:s.SET,set:i(),not:!0}),t.ints=()=>({type:s.SET,set:n(),not:!1}),t.notInts=()=>({type:s.SET,set:n(),not:!0}),t.whitespace=()=>({type:s.SET,set:o(),not:!1}),t.notWhitespace=()=>({type:s.SET,set:o(),not:!0}),t.anyChar=()=>({type:s.SET,set:[{type:s.CHAR,value:10},{type:s.CHAR,value:13},{type:s.CHAR,value:8232},{type:s.CHAR,value:8233}],not:!0})},205:e=>{e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},586:(e,t,r)=>{const s=r(205),n=r(23),i={0:0,t:9,n:10,v:11,f:12,r:13};t.strToChars=function(e){return e=e.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(e,t,r,s,n,o,a,l){if(r)return e;var c=t?8:s?parseInt(s,16):n?parseInt(n,16):o?parseInt(o,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):i[l],p=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(p)&&(p="\\"+p),p}))},t.tokenizeClass=(e,r)=>{for(var i,o,a=[],l=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(i=l.exec(e));)if(i[1])a.push(n.words());else if(i[2])a.push(n.ints());else if(i[3])a.push(n.whitespace());else if(i[4])a.push(n.notWords());else if(i[5])a.push(n.notInts());else if(i[6])a.push(n.notWhitespace());else if(i[7])a.push({type:s.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else{if(!(o=i[12]))return[a,l.lastIndex];a.push({type:s.CHAR,value:o.charCodeAt(0)})}t.error(r,"Unterminated character class")},t.error=(e,t)=>{throw new SyntaxError("Invalid regular expression: /"+e+"/: "+t)}},657:(e,t,r)=>{"use strict";var s=r(208),n=function(e){return/<\/+[^>]+>/.test(e)},i=function(e){return/<[^>]+\/>/.test(e)},o=function(e){return function(e){return/<[^>!]+>/.test(e)}(e)&&!n(e)&&!i(e)};function a(e){return n(e)?"ClosingTag":o(e)?"OpeningTag":i(e)?"SelfClosingTag":"Text"}e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.indentor,n=t.textNodesOnSameLine,i=0,o=[];r=r||" ";var l,c,p=(l=e,(c=l,c.split(/(<\/?[^>]+>)/g).filter((function(e){return""!==e.trim()}))).map((function(e){return{value:e,type:a(e)}}))).map((function(e,t,a){var l=e.value,c=e.type;"ClosingTag"===c&&i--;var p=s(r,i),u=p+l;if("OpeningTag"===c&&i++,n){var d=a[t-1],h=a[t-2];"ClosingTag"===c&&"Text"===d.type&&"OpeningTag"===h.type&&(u=""+p+h.value+d.value+l,o.push(t-2,t-1))}return u}));return o.forEach((function(e){return p[e]=null})),p.filter((function(e){return!!e})).join("\n")}}},s={};function n(e){var t=s[e];if(void 0!==t){if(void 0!==t.error)throw t.error;return t.exports}var i=s[e]={exports:{}};try{var o={id:e,module:i,factory:r[e],require:n};n.i.forEach((function(e){e(o)})),i=o.module,o.factory.call(i.exports,i,i.exports,o.require)}catch(e){throw i.error=e,e}return i.exports}n.m=r,n.c=s,n.i=[],n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hu=e=>e+"."+n.h()+".hot-update.js",n.hmrF=()=>"main."+n.h()+".hot-update.json",n.h=()=>"2337278d415d81467132",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="rapidoc:",n.l=(r,s,i,o)=>{if(e[r])e[r].push(s);else{var a,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),p=0;p<c.length;p++){var u=c[p];if(u.getAttribute("src")==r||u.getAttribute("data-webpack")==t+i){a=u;break}}a||(l=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+i),a.src=r),e[r]=[s];var d=(t,s)=>{a.onerror=a.onload=null,clearTimeout(h);var n=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(s))),t)return t(s)},h=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),l&&document.head.appendChild(a)}},(()=>{var e,t,r,s={},i=n.c,o=[],a=[],l="idle",c=0,p=[];function u(e){l=e;for(var t=[],r=0;r<a.length;r++)t[r]=a[r].call(null,e);return Promise.all(t).then((function(){}))}function d(){0==--c&&u("ready").then((function(){if(0===c){var e=p;p=[];for(var t=0;t<e.length;t++)e[t]()}}))}function h(e){if("idle"!==l)throw new Error("check() is only allowed in idle status");return u("check").then(n.hmrM).then((function(r){return r?u("prepare").then((function(){var s=[];return t=[],Promise.all(Object.keys(n.hmrC).reduce((function(e,i){return n.hmrC[i](r.c,r.r,r.m,e,t,s),e}),[])).then((function(){return t=function(){return e?f(e):u("ready").then((function(){return s}))},0===c?t():new Promise((function(e){p.push((function(){e(t())}))}));var t}))})):u(g()?"ready":"idle").then((function(){return null}))}))}function m(e){return"ready"!==l?Promise.resolve().then((function(){throw new Error("apply() is only allowed in ready status (state: "+l+")")})):f(e)}function f(e){e=e||{},g();var s=t.map((function(t){return t(e)}));t=void 0;var n=s.map((function(e){return e.error})).filter(Boolean);if(n.length>0)return u("abort").then((function(){throw n[0]}));var i=u("dispose");s.forEach((function(e){e.dispose&&e.dispose()}));var o,a=u("apply"),l=function(e){o||(o=e)},c=[];return s.forEach((function(e){if(e.apply){var t=e.apply(l);if(t)for(var r=0;r<t.length;r++)c.push(t[r])}})),Promise.all([i,a]).then((function(){return o?u("fail").then((function(){throw o})):r?f(e).then((function(e){return c.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e})):u("idle").then((function(){return c}))}))}function g(){if(r)return t||(t=[]),Object.keys(n.hmrI).forEach((function(e){r.forEach((function(r){n.hmrI[e](r,t)}))})),r=void 0,!0}n.hmrD=s,n.i.push((function(p){var f,g,y,v,b=p.module,x=function(t,r){var s=i[r];if(!s)return t;var n=function(n){if(s.hot.active){if(i[n]){var a=i[n].parents;-1===a.indexOf(r)&&a.push(r)}else o=[r],e=n;-1===s.children.indexOf(n)&&s.children.push(n)}else console.warn("[HMR] unexpected require("+n+") from disposed module "+r),o=[];return t(n)},a=function(e){return{configurable:!0,enumerable:!0,get:function(){return t[e]},set:function(r){t[e]=r}}};for(var p in t)Object.prototype.hasOwnProperty.call(t,p)&&"e"!==p&&Object.defineProperty(n,p,a(p));return n.e=function(e,r){return function(e){switch(l){case"ready":u("prepare");case"prepare":return c++,e.then(d,d),e;default:return e}}(t.e(e,r))},n}(p.require,p.id);b.hot=(f=p.id,g=b,v={_acceptedDependencies:{},_acceptedErrorHandlers:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:y=e!==f,_requireSelf:function(){o=g.parents.slice(),e=y?void 0:f,n(f)},active:!0,accept:function(e,t,r){if(void 0===e)v._selfAccepted=!0;else if("function"==typeof e)v._selfAccepted=e;else if("object"==typeof e&&null!==e)for(var s=0;s<e.length;s++)v._acceptedDependencies[e[s]]=t||function(){},v._acceptedErrorHandlers[e[s]]=r;else v._acceptedDependencies[e]=t||function(){},v._acceptedErrorHandlers[e]=r},decline:function(e){if(void 0===e)v._selfDeclined=!0;else if("object"==typeof e&&null!==e)for(var t=0;t<e.length;t++)v._declinedDependencies[e[t]]=!0;else v._declinedDependencies[e]=!0},dispose:function(e){v._disposeHandlers.push(e)},addDisposeHandler:function(e){v._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=v._disposeHandlers.indexOf(e);t>=0&&v._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,l){case"idle":t=[],Object.keys(n.hmrI).forEach((function(e){n.hmrI[e](f,t)})),u("ready");break;case"ready":Object.keys(n.hmrI).forEach((function(e){n.hmrI[e](f,t)}));break;case"prepare":case"check":case"dispose":case"apply":(r=r||[]).push(f)}},check:h,apply:m,status:function(e){if(!e)return l;a.push(e)},addStatusHandler:function(e){a.push(e)},removeStatusHandler:function(e){var t=a.indexOf(e);t>=0&&a.splice(t,1)},data:s[f]},e=void 0,v),b.parents=o,b.children=[],o=[],p.require=x})),n.hmrC={},n.hmrI={}})(),n.p="",(()=>{var e,t,r,s,i,o=n.hmrS_jsonp=n.hmrS_jsonp||{792:0},a={};function l(t,r){return e=r,new Promise(((e,r)=>{a[t]=e;var s=n.p+n.hu(t),i=new Error;n.l(s,(e=>{if(a[t]){a[t]=void 0;var s=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src;i.message="Loading hot update chunk "+t+" failed.\n("+s+": "+n+")",i.name="ChunkLoadError",i.type=s,i.request=n,r(i)}}))}))}function c(e){function a(e){for(var t=[e],r={},s=t.map((function(e){return{chain:[e],id:e}}));s.length>0;){var i=s.pop(),o=i.id,a=i.chain,c=n.c[o];if(c&&(!c.hot._selfAccepted||c.hot._selfInvalidated)){if(c.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(c.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var p=0;p<c.parents.length;p++){var u=c.parents[p],d=n.c[u];if(d){if(d.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([u]),moduleId:o,parentId:u};-1===t.indexOf(u)&&(d.hot._acceptedDependencies[o]?(r[u]||(r[u]=[]),l(r[u],[o])):(delete r[u],t.push(u),s.push({chain:a.concat([u]),id:u})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:r}}function l(e,t){for(var r=0;r<t.length;r++){var s=t[r];-1===e.indexOf(s)&&e.push(s)}}n.f&&delete n.f.jsonpHmr,t=void 0;var c={},p=[],u={},d=function(e){console.warn("[HMR] unexpected require("+e.id+") to disposed module")};for(var h in r)if(n.o(r,h)){var m=r[h],f=m?a(h):{type:"disposed",moduleId:h},g=!1,y=!1,v=!1,b="";switch(f.chain&&(b="\nUpdate propagation: "+f.chain.join(" -> ")),f.type){case"self-declined":e.onDeclined&&e.onDeclined(f),e.ignoreDeclined||(g=new Error("Aborted because of self decline: "+f.moduleId+b));break;case"declined":e.onDeclined&&e.onDeclined(f),e.ignoreDeclined||(g=new Error("Aborted because of declined dependency: "+f.moduleId+" in "+f.parentId+b));break;case"unaccepted":e.onUnaccepted&&e.onUnaccepted(f),e.ignoreUnaccepted||(g=new Error("Aborted because "+h+" is not accepted"+b));break;case"accepted":e.onAccepted&&e.onAccepted(f),y=!0;break;case"disposed":e.onDisposed&&e.onDisposed(f),v=!0;break;default:throw new Error("Unexception type "+f.type)}if(g)return{error:g};if(y)for(h in u[h]=m,l(p,f.outdatedModules),f.outdatedDependencies)n.o(f.outdatedDependencies,h)&&(c[h]||(c[h]=[]),l(c[h],f.outdatedDependencies[h]));v&&(l(p,[f.moduleId]),u[h]=d)}r=void 0;for(var x,w=[],$=0;$<p.length;$++){var S=p[$],E=n.c[S];E&&(E.hot._selfAccepted||E.hot._main)&&u[S]!==d&&!E.hot._selfInvalidated&&w.push({module:S,require:E.hot._requireSelf,errorHandler:E.hot._selfAccepted})}return{dispose:function(){var e;s.forEach((function(e){delete o[e]})),s=void 0;for(var t,r=p.slice();r.length>0;){var i=r.pop(),a=n.c[i];if(a){var l={},u=a.hot._disposeHandlers;for($=0;$<u.length;$++)u[$].call(null,l);for(n.hmrD[i]=l,a.hot.active=!1,delete n.c[i],delete c[i],$=0;$<a.children.length;$++){var d=n.c[a.children[$]];d&&((e=d.parents.indexOf(i))>=0&&d.parents.splice(e,1))}}}for(var h in c)if(n.o(c,h)&&(a=n.c[h]))for(x=c[h],$=0;$<x.length;$++)t=x[$],(e=a.children.indexOf(t))>=0&&a.children.splice(e,1)},apply:function(t){for(var r in u)n.o(u,r)&&(n.m[r]=u[r]);for(var s=0;s<i.length;s++)i[s](n);for(var o in c)if(n.o(c,o)){var a=n.c[o];if(a){x=c[o];for(var l=[],d=[],h=[],m=0;m<x.length;m++){var f=x[m],g=a.hot._acceptedDependencies[f],y=a.hot._acceptedErrorHandlers[f];if(g){if(-1!==l.indexOf(g))continue;l.push(g),d.push(y),h.push(f)}}for(var v=0;v<l.length;v++)try{l[v].call(null,x)}catch(r){if("function"==typeof d[v])try{d[v](r,{moduleId:o,dependencyId:h[v]})}catch(s){e.onErrored&&e.onErrored({type:"accept-error-handler-errored",moduleId:o,dependencyId:h[v],error:s,originalError:r}),e.ignoreErrored||(t(s),t(r))}else e.onErrored&&e.onErrored({type:"accept-errored",moduleId:o,dependencyId:h[v],error:r}),e.ignoreErrored||t(r)}}}for(var b=0;b<w.length;b++){var $=w[b],S=$.module;try{$.require(S)}catch(r){if("function"==typeof $.errorHandler)try{$.errorHandler(r,{moduleId:S,module:n.c[S]})}catch(s){e.onErrored&&e.onErrored({type:"self-accept-error-handler-errored",moduleId:S,error:s,originalError:r}),e.ignoreErrored||(t(s),t(r))}else e.onErrored&&e.onErrored({type:"self-accept-errored",moduleId:S,error:r}),e.ignoreErrored||t(r)}}return p}}}self.webpackHotUpdaterapidoc=(t,s,o)=>{for(var l in s)n.o(s,l)&&(r[l]=s[l],e&&e.push(l));o&&i.push(o),a[t]&&(a[t](),a[t]=void 0)},n.hmrI.jsonp=function(e,t){r||(r={},i=[],s=[],t.push(c)),n.o(r,e)||(r[e]=n.m[e])},n.hmrC.jsonp=function(e,a,p,u,d,h){d.push(c),t={},s=a,r=p.reduce((function(e,t){return e[t]=!1,e}),{}),i=[],e.forEach((function(e){n.o(o,e)&&void 0!==o[e]?(u.push(l(e,h)),t[e]=!0):t[e]=!1})),n.f&&(n.f.jsonpHmr=function(e,r){t&&n.o(t,e)&&!t[e]&&(r.push(l(e)),t[e]=!0)})},n.hmrM=()=>{if("undefined"==typeof fetch)throw new Error("No browser support: need fetch API");return fetch(n.p+n.hmrF()).then((e=>{if(404!==e.status){if(!e.ok)throw new Error("Failed to fetch update manifest "+e.statusText);return e.json()}}))}})();n(557)})();
  3734. //# sourceMappingURL=rapidoc-min.js.map