mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-30 05:13:40 +00:00
1 line
No EOL
28 KiB
JavaScript
1 line
No EOL
28 KiB
JavaScript
(globalThis.webpackChunkdocs_split_user=globalThis.webpackChunkdocs_split_user||[]).push([[8525],{1336:(e,n,t)=>{"use strict";t.d(n,{A:()=>We});var s=t(6540),a=t(8453),r=t(5260),i=t(2303),c=t(4164),o=t(5293),l=t(6342);function d(){const{prism:e}=(0,l.p)(),{colorMode:n}=(0,o.G)(),t=e.theme,s=e.darkTheme||t;return"dark"===n?s:t}var u=t(7559),m=t(8426),h=t.n(m),f=t(9532),p=t(4848);const x=/title=(?<quote>["'])(?<title>.*?)\1/,g=/\{(?<range>[\d,-]+)\}/,j={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},v={...j,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},b=Object.keys(j);function N(e,n){const t=e.map(e=>{const{start:t,end:s}=v[e];return`(?:${t}\\s*(${n.flatMap(e=>[e.line,e.block?.start,e.block?.end].filter(Boolean)).join("|")})\\s*${s})`}).join("|");return new RegExp(`^\\s*(?:${t})\\s*$`)}function A({showLineNumbers:e,metastring:n}){return"boolean"==typeof e?e?1:void 0:"number"==typeof e?e:function(e){const n=e?.split(" ").find(e=>e.startsWith("showLineNumbers"));if(n){if(n.startsWith("showLineNumbers=")){const e=n.replace("showLineNumbers=","");return parseInt(e,10)}return 1}}(n)}function y(e,n){const{language:t,magicComments:s}=n;if(void 0===t)return{lineClassNames:{},code:e};const a=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return N(["js","jsBlock"],n);case"jsx":case"tsx":return N(["js","jsBlock","jsx"],n);case"html":return N(["js","jsBlock","html"],n);case"python":case"py":case"bash":return N(["bash"],n);case"markdown":case"md":return N(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return N(["tex"],n);case"lua":case"haskell":return N(["lua"],n);case"sql":return N(["lua","jsBlock"],n);case"wasm":return N(["wasm"],n);case"vb":case"vba":case"visual-basic":return N(["vb","rem"],n);case"vbnet":return N(["vbnet","rem"],n);case"batch":return N(["rem"],n);case"basic":return N(["rem","f90"],n);case"fsharp":return N(["js","ml"],n);case"ocaml":case"sml":return N(["ml"],n);case"fortran":return N(["f90"],n);case"cobol":return N(["cobol"],n);default:return N(b,n)}}(t,s),r=e.split(/\r?\n/),i=Object.fromEntries(s.map(e=>[e.className,{start:0,range:""}])),c=Object.fromEntries(s.filter(e=>e.line).map(({className:e,line:n})=>[n,e])),o=Object.fromEntries(s.filter(e=>e.block).map(({className:e,block:n})=>[n.start,e])),l=Object.fromEntries(s.filter(e=>e.block).map(({className:e,block:n})=>[n.end,e]));for(let u=0;u<r.length;){const e=r[u].match(a);if(!e){u+=1;continue}const n=e.slice(1).find(e=>void 0!==e);c[n]?i[c[n]].range+=`${u},`:o[n]?i[o[n]].start=u:l[n]&&(i[l[n]].range+=`${i[l[n]].start}-${u-1},`),r.splice(u,1)}const d={};return Object.entries(i).forEach(([e,{range:n}])=>{h()(n).forEach(n=>{d[n]??=[],d[n].push(e)})}),{code:r.join("\n"),lineClassNames:d}}function C(e,n){const t=e.replace(/\r?\n$/,"");return function(e,{metastring:n,magicComments:t}){if(n&&g.test(n)){const s=n.match(g).groups.range;if(0===t.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${n}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const a=t[0].className,r=h()(s).filter(e=>e>0).map(e=>[e-1,[a]]);return{lineClassNames:Object.fromEntries(r),code:e}}return null}(t,{...n})??y(t,{...n})}function w(e){const n=function(e){return n=e.language??function(e){if(!e)return;const n=e.split(" ").find(e=>e.startsWith("language-"));return n?.replace(/language-/,"")}(e.className)??e.defaultLanguage,n?.toLowerCase()??"text";var n}({language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}),{lineClassNames:t,code:s}=C(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:n}),a=function({className:e,language:n}){return(0,c.A)(e,n&&!e?.includes(`language-${n}`)&&`language-${n}`)}({className:e.className,language:n}),r=(i=e.metastring,(i?.match(x)?.groups.title??"")||e.title);var i;const o=A({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:s,className:a,language:n,title:r,lineNumbersStart:o,lineClassNames:t}}const k=(0,s.createContext)(null);function L({metadata:e,wordWrap:n,children:t}){const a=(0,s.useMemo)(()=>({metadata:e,wordWrap:n}),[e,n]);return(0,p.jsx)(k.Provider,{value:a,children:t})}function B(){const e=(0,s.useContext)(k);if(null===e)throw new f.dV("CodeBlockContextProvider");return e}const T="codeBlockContainer_Ckt0";function _({as:e,...n}){const t=function(e){const n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach(([e,s])=>{const a=n[e];a&&"string"==typeof s&&(t[a]=s)}),t}(d());return(0,p.jsx)(e,{...n,style:t,className:(0,c.A)(n.className,T,u.G.common.codeBlock)})}const E="codeBlock_bY9V",H="codeBlockStandalone_MEMb",M="codeBlockLines_e6Vv",S="codeBlockLinesWithNumbering_o6Pm";function I({children:e,className:n}){return(0,p.jsx)(_,{as:"pre",tabIndex:0,className:(0,c.A)(H,"thin-scrollbar",n),children:(0,p.jsx)("code",{className:M,children:e})})}const U={attributes:!0,characterData:!0,childList:!0,subtree:!0};function z(e,n){const[t,a]=(0,s.useState)(),r=(0,s.useCallback)(()=>{a(e.current?.closest("[role=tabpanel][hidden]"))},[e,a]);(0,s.useEffect)(()=>{r()},[r]),function(e,n,t=U){const a=(0,f._q)(n),r=(0,f.Be)(t);(0,s.useEffect)(()=>{const n=new MutationObserver(a);return e&&n.observe(e,r),()=>n.disconnect()},[e,a,r])}(t,e=>{e.forEach(e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(n(),r())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}function R({children:e}){return e}var V=t(1765);function O({line:e,token:n,...t}){return(0,p.jsx)("span",{...t})}const $="codeLine_lJS_",P="codeLineNumber_Tfdd",W="codeLineContent_feaV";function q({line:e,classNames:n,showLineNumbers:t,getLineProps:s,getTokenProps:a}){const r=function(e){const n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[{...n,content:""}]:e}(e),i=s({line:r,className:(0,c.A)(n,t&&$)}),o=r.map((e,n)=>{const t=a({token:e});return(0,p.jsx)(O,{...t,line:r,token:e,children:t.children},n)});return(0,p.jsxs)("span",{...i,children:[t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:P}),(0,p.jsx)("span",{className:W,children:o})]}):o,(0,p.jsx)("br",{})]})}const D=s.forwardRef((e,n)=>(0,p.jsx)("pre",{ref:n,tabIndex:0,...e,className:(0,c.A)(e.className,E,"thin-scrollbar")}));function F(e){const{metadata:n}=B();return(0,p.jsx)("code",{...e,className:(0,c.A)(e.className,M,void 0!==n.lineNumbersStart&&S),style:{...e.style,counterReset:void 0===n.lineNumbersStart?void 0:"line-count "+(n.lineNumbersStart-1)}})}function G({className:e}){const{metadata:n,wordWrap:t}=B(),s=d(),{code:a,language:r,lineNumbersStart:i,lineClassNames:o}=n;return(0,p.jsx)(V.f4,{theme:s,code:a,language:r,children:({className:n,style:s,tokens:a,getLineProps:r,getTokenProps:l})=>(0,p.jsx)(D,{ref:t.codeBlockRef,className:(0,c.A)(e,n),style:s,children:(0,p.jsx)(F,{children:a.map((e,n)=>(0,p.jsx)(q,{line:e,getLineProps:r,getTokenProps:l,classNames:o[n],showLineNumbers:void 0!==i},n))})})})}function J({children:e,fallback:n}){return(0,i.A)()?(0,p.jsx)(p.Fragment,{children:e?.()}):n??null}var Z=t(1312);function X({className:e,...n}){return(0,p.jsx)("button",{type:"button",...n,className:(0,c.A)("clean-btn",e)})}function Y(e){return(0,p.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,p.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function Q(e){return(0,p.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,p.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const K={copyButtonCopied:"copyButtonCopied_Vdqa",copyButtonIcons:"copyButtonIcons_IEyt",copyButtonIcon:"copyButtonIcon_TrPX",copyButtonSuccessIcon:"copyButtonSuccessIcon_cVMy"};function ee(e){return e?(0,Z.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,Z.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"})}function ne({className:e}){const{copyCode:n,isCopied:t}=function(){const{metadata:{code:e}}=B(),[n,t]=(0,s.useState)(!1),a=(0,s.useRef)(void 0),r=(0,s.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),a.current=window.setTimeout(()=>{t(!1)},1e3)})},[e]);return(0,s.useEffect)(()=>()=>window.clearTimeout(a.current),[]),{copyCode:r,isCopied:n}}();return(0,p.jsx)(X,{"aria-label":ee(t),title:(0,Z.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,c.A)(e,K.copyButton,t&&K.copyButtonCopied),onClick:n,children:(0,p.jsxs)("span",{className:K.copyButtonIcons,"aria-hidden":"true",children:[(0,p.jsx)(Y,{className:K.copyButtonIcon}),(0,p.jsx)(Q,{className:K.copyButtonSuccessIcon})]})})}function te(e){return(0,p.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,p.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const se="wordWrapButtonIcon_b1P5",ae="wordWrapButtonEnabled_uzNF";function re({className:e}){const{wordWrap:n}=B();if(!(n.isEnabled||n.isCodeScrollable))return!1;const t=(0,Z.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,p.jsx)(X,{onClick:()=>n.toggle(),className:(0,c.A)(e,n.isEnabled&&ae),"aria-label":t,title:t,children:(0,p.jsx)(te,{className:se,"aria-hidden":"true"})})}const ie="buttonGroup_M5ko";function ce({className:e}){return(0,p.jsx)(J,{children:()=>(0,p.jsxs)("div",{className:(0,c.A)(e,ie),children:[(0,p.jsx)(re,{}),(0,p.jsx)(ne,{})]})})}const oe="codeBlockContent_QJqH",le="codeBlockTitle_OeMC";function de({className:e}){const{metadata:n}=B();return(0,p.jsxs)(_,{as:"div",className:(0,c.A)(e,n.className),children:[n.title&&(0,p.jsx)("div",{className:le,children:(0,p.jsx)(R,{children:n.title})}),(0,p.jsxs)("div",{className:oe,children:[(0,p.jsx)(G,{}),(0,p.jsx)(ce,{})]})]})}function ue(e){const n=function(e){const{prism:n}=(0,l.p)();return w({code:e.children,className:e.className,metastring:e.metastring,magicComments:n.magicComments,defaultLanguage:n.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),t=function(){const[e,n]=(0,s.useState)(!1),[t,a]=(0,s.useState)(!1),r=(0,s.useRef)(null),i=(0,s.useCallback)(()=>{const t=r.current.querySelector("code");e?t.removeAttribute("style"):(t.style.whiteSpace="pre-wrap",t.style.overflowWrap="anywhere"),n(e=>!e)},[r,e]),c=(0,s.useCallback)(()=>{const{scrollWidth:e,clientWidth:n}=r.current,t=e>n||r.current.querySelector("code").hasAttribute("style");a(t)},[r]);return z(r,c),(0,s.useEffect)(()=>{c()},[e,c]),(0,s.useEffect)(()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)}),[c]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:t,toggle:i}}();return(0,p.jsx)(L,{metadata:n,wordWrap:t,children:(0,p.jsx)(de,{})})}function me({children:e,...n}){const t=(0,i.A)(),a=function(e){return s.Children.toArray(e).some(e=>(0,s.isValidElement)(e))?e:Array.isArray(e)?e.join(""):e}(e),r="string"==typeof a?ue:I;return(0,p.jsx)(r,{...n,children:a},String(t))}function he(e){return(0,p.jsx)("code",{...e})}var fe=t(8774),pe=t(3535);var xe=t(3427),ge=t(1422);const je="details_lb9f",ve="isBrowser_bmU9",be="collapsibleContent_i85q";function Ne(e){return!!e&&("SUMMARY"===e.tagName||Ne(e.parentElement))}function Ae(e,n){return!!e&&(e===n||Ae(e.parentElement,n))}function ye({summary:e,children:n,...t}){(0,xe.A)().collectAnchor(t.id);const a=(0,i.A)(),r=(0,s.useRef)(null),{collapsed:o,setCollapsed:l}=(0,ge.u)({initialState:!t.open}),[d,u]=(0,s.useState)(t.open),m=s.isValidElement(e)?e:(0,p.jsx)("summary",{children:e??"Details"});return(0,p.jsxs)("details",{...t,ref:r,open:d,"data-collapsed":o,className:(0,c.A)(je,a&&ve,t.className),onMouseDown:e=>{Ne(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const n=e.target;Ne(n)&&Ae(n,r.current)&&(e.preventDefault(),o?(l(!1),u(!0)):l(!0))},children:[m,(0,p.jsx)(ge.N,{lazy:!1,collapsed:o,onCollapseTransitionEnd:e=>{l(e),u(!e)},children:(0,p.jsx)("div",{className:be,children:n})})]})}const Ce="details_b_Ee";function we({...e}){return(0,p.jsx)(ye,{...e,className:(0,c.A)("alert alert--info",Ce,e.className)})}function ke(e){const n=s.Children.toArray(e.children),t=n.find(e=>s.isValidElement(e)&&"summary"===e.type),a=(0,p.jsx)(p.Fragment,{children:n.filter(e=>e!==t)});return(0,p.jsx)(we,{...e,summary:t,children:a})}var Le=t(1107);function Be(e){return(0,p.jsx)(Le.A,{...e})}const Te="containsTaskList_mC6p";function _e(e){if(void 0!==e)return(0,c.A)(e,e?.includes("contains-task-list")&&Te)}const Ee="img_ev3q";var He=t(7293),Me=t(7489),Se=t(2181);let Ie=null;async function Ue(){return Ie||(Ie=async function(){return(await t.e(2279).then(t.bind(t,2279))).default}()),Ie}function ze(){const{colorMode:e}=(0,o.G)(),n=(0,l.p)().mermaid,t=n.theme[e],{options:a}=n;return(0,s.useMemo)(()=>({startOnLoad:!1,...a,theme:t}),[t,a])}function Re({text:e,config:n}){const[t,a]=(0,s.useState)(null),r=(0,s.useState)(`mermaid-svg-${Math.round(1e7*Math.random())}`)[0],i=ze(),c=n??i;return(0,s.useEffect)(()=>{(async function({id:e,text:n,config:t}){const s=await Ue();s.initialize(t);try{return await s.render(e,n)}catch(a){throw document.querySelector(`#d${e}`)?.remove(),a}})({id:r,text:e,config:c}).then(a).catch(e=>{a(()=>{throw e})})},[r,e,c]),t}const Ve="container_lyt7";function Oe({renderResult:e}){const n=(0,s.useRef)(null);return(0,s.useEffect)(()=>{const t=n.current;e.bindFunctions?.(t)},[e]),(0,p.jsx)("div",{ref:n,className:`docusaurus-mermaid-container ${Ve}`,dangerouslySetInnerHTML:{__html:e.svg}})}function $e({value:e}){const n=Re({text:e});return null===n?null:(0,p.jsx)(Oe,{renderResult:n})}const Pe={Head:r.A,details:ke,Details:ke,code:function(e){return function(e){return void 0!==e.children&&s.Children.toArray(e.children).every(e=>"string"==typeof e&&!e.includes("\n"))}(e)?(0,p.jsx)(he,{...e}):(0,p.jsx)(me,{...e})},a:function(e){const n=(0,pe.v)(e.id);return(0,p.jsx)(fe.A,{...e,className:(0,c.A)(n,e.className)})},pre:function(e){return(0,p.jsx)(p.Fragment,{children:e.children})},ul:function(e){return(0,p.jsx)("ul",{...e,className:_e(e.className)})},li:function(e){(0,xe.A)().collectAnchor(e.id);const n=(0,pe.v)(e.id);return(0,p.jsx)("li",{className:(0,c.A)(n,e.className),...e})},img:function(e){return(0,p.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(n=e.className,(0,c.A)(n,Ee))});var n},h1:e=>(0,p.jsx)(Be,{as:"h1",...e}),h2:e=>(0,p.jsx)(Be,{as:"h2",...e}),h3:e=>(0,p.jsx)(Be,{as:"h3",...e}),h4:e=>(0,p.jsx)(Be,{as:"h4",...e}),h5:e=>(0,p.jsx)(Be,{as:"h5",...e}),h6:e=>(0,p.jsx)(Be,{as:"h6",...e}),admonition:He.A,mermaid:function(e){return(0,p.jsx)(Me.A,{fallback:e=>(0,p.jsx)(Se.MN,{...e}),children:(0,p.jsx)($e,{...e})})}};function We({children:e}){return(0,p.jsx)(a.x,{components:Pe,children:e})}},2153:(e,n,t)=>{"use strict";t.d(n,{A:()=>g});t(6540);var s=t(4164),a=t(1312),r=t(7559),i=t(8774);const c={iconEdit:"iconEdit_Z9Sw"};var o=t(4848);function l({className:e,...n}){return(0,o.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,s.A)(c.iconEdit,e),"aria-hidden":"true",...n,children:(0,o.jsx)("g",{children:(0,o.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function d({editUrl:e}){return(0,o.jsxs)(i.A,{to:e,className:r.G.common.editThisPage,children:[(0,o.jsx)(l,{}),(0,o.jsx)(a.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var u=t(4586);function m(e={}){const{i18n:{currentLocale:n}}=(0,u.A)(),t=function(){const{i18n:{currentLocale:e,localeConfigs:n}}=(0,u.A)();return n[e].calendar}();return new Intl.DateTimeFormat(n,{calendar:t,...e})}function h({lastUpdatedAt:e}){const n=new Date(e),t=m({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(n);return(0,o.jsx)(a.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,o.jsx)("b",{children:(0,o.jsx)("time",{dateTime:n.toISOString(),itemProp:"dateModified",children:t})})},children:" on {date}"})}function f({lastUpdatedBy:e}){return(0,o.jsx)(a.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,o.jsx)("b",{children:e})},children:" by {user}"})}function p({lastUpdatedAt:e,lastUpdatedBy:n}){return(0,o.jsxs)("span",{className:r.G.common.lastUpdated,children:[(0,o.jsx)(a.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e?(0,o.jsx)(h,{lastUpdatedAt:e}):"",byUser:n?(0,o.jsx)(f,{lastUpdatedBy:n}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const x={lastUpdated:"lastUpdated_JAkA",noPrint:"noPrint_WFHX"};function g({className:e,editUrl:n,lastUpdatedAt:t,lastUpdatedBy:a}){return(0,o.jsxs)("div",{className:(0,s.A)("row",e),children:[(0,o.jsx)("div",{className:(0,s.A)("col",x.noPrint),children:n&&(0,o.jsx)(d,{editUrl:n})}),(0,o.jsx)("div",{className:(0,s.A)("col",x.lastUpdated),children:(t||a)&&(0,o.jsx)(p,{lastUpdatedAt:t,lastUpdatedBy:a})})]})}},5195:(e,n,t)=>{"use strict";t.d(n,{A:()=>p});var s=t(6540),a=t(6342);function r(e){const n=e.map(e=>({...e,parentIndex:-1,children:[]})),t=Array(7).fill(-1);n.forEach((e,n)=>{const s=t.slice(2,e.level);e.parentIndex=Math.max(...s),t[e.level]=n});const s=[];return n.forEach(e=>{const{parentIndex:t,...a}=e;t>=0?n[t].children.push(a):s.push(a)}),s}function i({toc:e,minHeadingLevel:n,maxHeadingLevel:t}){return e.flatMap(e=>{const s=i({toc:e.children,minHeadingLevel:n,maxHeadingLevel:t});return function(e){return e.level>=n&&e.level<=t}(e)?[{...e,children:s}]:s})}function c(e){const n=e.getBoundingClientRect();return n.top===n.bottom?c(e.parentNode):n}function o(e,{anchorTopOffset:n}){const t=e.find(e=>c(e).top>=n);if(t){return function(e){return e.top>0&&e.bottom<window.innerHeight/2}(c(t))?t:e[e.indexOf(t)-1]??null}return e[e.length-1]??null}function l(){const e=(0,s.useRef)(0),{navbar:{hideOnScroll:n}}=(0,a.p)();return(0,s.useEffect)(()=>{e.current=n?0:document.querySelector(".navbar").clientHeight},[n]),e}function d(e){const n=(0,s.useRef)(void 0),t=l();(0,s.useEffect)(()=>{if(!e)return()=>{};const{linkClassName:s,linkActiveClassName:a,minHeadingLevel:r,maxHeadingLevel:i}=e;function c(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(s),c=function({minHeadingLevel:e,maxHeadingLevel:n}){const t=[];for(let s=e;s<=n;s+=1)t.push(`h${s}.anchor`);return Array.from(document.querySelectorAll(t.join()))}({minHeadingLevel:r,maxHeadingLevel:i}),l=o(c,{anchorTopOffset:t.current}),d=e.find(e=>l&&l.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e));e.forEach(e=>{!function(e,t){t?(n.current&&n.current!==e&&n.current.classList.remove(a),e.classList.add(a),n.current=e):e.classList.remove(a)}(e,e===d)})}return document.addEventListener("scroll",c),document.addEventListener("resize",c),c(),()=>{document.removeEventListener("scroll",c),document.removeEventListener("resize",c)}},[e,t])}var u=t(8774),m=t(4848);function h({toc:e,className:n,linkClassName:t,isChild:s}){return e.length?(0,m.jsx)("ul",{className:s?void 0:n,children:e.map(e=>(0,m.jsxs)("li",{children:[(0,m.jsx)(u.A,{to:`#${e.id}`,className:t??void 0,dangerouslySetInnerHTML:{__html:e.value}}),(0,m.jsx)(h,{isChild:!0,toc:e.children,className:n,linkClassName:t})]},e.id))}):null}const f=s.memo(h);function p({toc:e,className:n="table-of-contents table-of-contents__left-border",linkClassName:t="table-of-contents__link",linkActiveClassName:c,minHeadingLevel:o,maxHeadingLevel:l,...u}){const h=(0,a.p)(),p=o??h.tableOfContents.minHeadingLevel,x=l??h.tableOfContents.maxHeadingLevel,g=function({toc:e,minHeadingLevel:n,maxHeadingLevel:t}){return(0,s.useMemo)(()=>i({toc:r(e),minHeadingLevel:n,maxHeadingLevel:t}),[e,n,t])}({toc:e,minHeadingLevel:p,maxHeadingLevel:x});return d((0,s.useMemo)(()=>{if(t&&c)return{linkClassName:t,linkActiveClassName:c,minHeadingLevel:p,maxHeadingLevel:x}},[t,c,p,x])),(0,m.jsx)(f,{toc:g,className:n,linkClassName:t,...u})}},6896:(e,n,t)=>{"use strict";t.d(n,{A:()=>g});t(6540);var s=t(4164),a=t(1312),r=t(5260),i=t(4848);function c(){return(0,i.jsx)(a.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function o(){return(0,i.jsx)(a.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function l(){return(0,i.jsx)(r.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function d(){return(0,i.jsx)(a.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function u(){return(0,i.jsx)(a.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}var m=t(7559),h=t(7293);function f({className:e}){return(0,i.jsx)(h.A,{type:"caution",title:(0,i.jsx)(d,{}),className:(0,s.A)(e,m.G.common.draftBanner),children:(0,i.jsx)(u,{})})}function p({className:e}){return(0,i.jsx)(h.A,{type:"caution",title:(0,i.jsx)(c,{}),className:(0,s.A)(e,m.G.common.unlistedBanner),children:(0,i.jsx)(o,{})})}function x(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l,{}),(0,i.jsx)(p,{...e})]})}function g({metadata:e}){const{unlisted:n,frontMatter:t}=e;return(0,i.jsxs)(i.Fragment,{children:[(n||t.unlisted)&&(0,i.jsx)(x,{}),t.draft&&(0,i.jsx)(f,{})]})}},7293:(e,n,t)=>{"use strict";t.d(n,{A:()=>H});var s=t(6540),a=t(4848);function r(e){const{mdxAdmonitionTitle:n,rest:t}=function(e){const n=s.Children.toArray(e),t=n.find(e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type),r=n.filter(e=>e!==t),i=t?.props.children;return{mdxAdmonitionTitle:i,rest:r.length>0?(0,a.jsx)(a.Fragment,{children:r}):null}}(e.children),r=e.title??n;return{...e,...r&&{title:r},children:t}}var i=t(4164),c=t(1312),o=t(7559);const l="admonition_xJq3",d="admonitionHeading_Gvgb",u="admonitionIcon_Rf37",m="admonitionContent_BuS1";function h({type:e,className:n,children:t}){return(0,a.jsx)("div",{className:(0,i.A)(o.G.common.admonition,o.G.common.admonitionType(e),l,n),children:t})}function f({icon:e,title:n}){return(0,a.jsxs)("div",{className:d,children:[(0,a.jsx)("span",{className:u,children:e}),n]})}function p({children:e}){return e?(0,a.jsx)("div",{className:m,children:e}):null}function x(e){const{type:n,icon:t,title:s,children:r,className:i}=e;return(0,a.jsxs)(h,{type:n,className:i,children:[s||t?(0,a.jsx)(f,{title:s,icon:t}):null,(0,a.jsx)(p,{children:r})]})}function g(e){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const j={icon:(0,a.jsx)(g,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function v(e){return(0,a.jsx)(x,{...j,...e,className:(0,i.A)("alert alert--secondary",e.className),children:e.children})}function b(e){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const N={icon:(0,a.jsx)(b,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function A(e){return(0,a.jsx)(x,{...N,...e,className:(0,i.A)("alert alert--success",e.className),children:e.children})}function y(e){return(0,a.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const C={icon:(0,a.jsx)(y,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function w(e){return(0,a.jsx)(x,{...C,...e,className:(0,i.A)("alert alert--info",e.className),children:e.children})}function k(e){return(0,a.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const L={icon:(0,a.jsx)(k,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function B(e){return(0,a.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const T={icon:(0,a.jsx)(B,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const _={icon:(0,a.jsx)(k,{}),title:(0,a.jsx)(c.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const E={...{note:v,tip:A,info:w,warning:function(e){return(0,a.jsx)(x,{...L,...e,className:(0,i.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,a.jsx)(x,{...T,...e,className:(0,i.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,a.jsx)(v,{title:"secondary",...e}),important:e=>(0,a.jsx)(w,{title:"important",...e}),success:e=>(0,a.jsx)(A,{title:"success",...e}),caution:function(e){return(0,a.jsx)(x,{..._,...e,className:(0,i.A)("alert alert--warning",e.className),children:e.children})}}};function H(e){const n=r(e),t=(s=n.type,E[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),E.info));var s;return(0,a.jsx)(t,{...n})}},7763:(e,n,t)=>{"use strict";t.d(n,{A:()=>l});t(6540);var s=t(4164),a=t(5195);const r={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"};var i=t(4848);const c="table-of-contents__link toc-highlight",o="table-of-contents__link--active";function l({className:e,...n}){return(0,i.jsx)("div",{className:(0,s.A)(r.tableOfContents,"thin-scrollbar",e),children:(0,i.jsx)(a.A,{...n,linkClassName:c,linkActiveClassName:o})})}},8426:(e,n)=>{function t(e){let n,t=[];for(let s of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(s))t.push(parseInt(s,10));else if(n=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,r]=n;if(s&&r){s=parseInt(s),r=parseInt(r);const e=s<r?1:-1;"-"!==a&&".."!==a&&"\u2025"!==a||(r+=e);for(let n=s;n!==r;n+=e)t.push(n)}}return t}n.default=t,e.exports=t}}]); |