docusaurus/assets/js/70e09343.3c88df9a.js
2025-04-04 11:26:00 +00:00

1 line
No EOL
21 KiB
JavaScript

(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["7143"],{91062:function(e,t,n){"use strict";n.r(t),n.d(t,{frontMatter:()=>g,default:()=>v,contentTitle:()=>m,assets:()=>w,toc:()=>f,metadata:()=>o});var o=JSON.parse('{"id":"playground","title":"Playground","description":"Playgrounds allow you to run Docusaurus in your browser, without installing anything!","source":"@site/docs/playground.mdx","sourceDirName":".","slug":"/playground","permalink":"/docs/playground","draft":false,"unlisted":false,"editUrl":"https://github.com/facebook/docusaurus/edit/main/website/docs/playground.mdx","tags":[],"version":"current","lastUpdatedBy":"S\xe9bastien Lorber","lastUpdatedAt":1743765771000,"frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/docs/configuration"},"next":{"title":"TypeScript Support","permalink":"/docs/typescript-support"}}'),i=n(85893),s=n(80980);n(67294);var r=n(90496),a=n(77827),l=n(35363),c=n(11037),d=n(57922);let h=[{name:"\uD83D\uDCE6 CodeSandbox",image:n(43867),url:"https://docusaurus.new/codesandbox",urlTS:"https://docusaurus.new/codesandbox-ts",description:(0,i.jsx)(a.Z,{id:"playground.codesandbox.description",children:"CodeSandbox is an online code editor and development environment that allows developers to create, share and collaborate on web development projects in a browser-based environment"})},{name:"\u26A1 StackBlitz \uD83C\uDD95",image:n(6951),url:"https://docusaurus.new/stackblitz",urlTS:"https://docusaurus.new/stackblitz-ts",description:(0,i.jsx)(a.Z,{id:"playground.stackblitz.description",values:{webContainersLink:(0,i.jsx)(l.Z,{href:"https://blog.stackblitz.com/posts/introducing-webcontainers/",children:"WebContainers"})},children:"StackBlitz uses a novel {webContainersLink} technology to run Docusaurus directly in your browser."})}];function u(e){let{name:t,image:n,url:o,urlTS:s,description:h}=e;return(0,i.jsx)("div",{className:"col col--6 margin-bottom--lg",children:(0,i.jsxs)("div",{className:(0,r.Z)("card"),children:[(0,i.jsx)("div",{className:(0,r.Z)("card__image"),children:(0,i.jsx)(l.Z,{to:o,children:(0,i.jsx)(c.Z,{img:n,alt:`${t}'s image`})})}),(0,i.jsxs)("div",{className:"card__body",children:[(0,i.jsx)(d.Z,{as:"h3",children:t}),(0,i.jsx)("p",{children:h})]}),(0,i.jsxs)("div",{className:"card__footer",children:[(0,i.jsx)("div",{style:{textAlign:"center"},children:(0,i.jsx)("b",{children:(0,i.jsx)(a.Z,{id:"playground.tryItButton",children:"Try it now!"})})}),(0,i.jsxs)("div",{className:"button-group button-group--block",children:[(0,i.jsx)(l.Z,{className:"button button--secondary",to:o,children:"JavaScript"}),(0,i.jsx)(l.Z,{className:"button button--secondary",to:s,children:"TypeScript"})]})]})]})})}function p(){return(0,i.jsx)("div",{className:"row",children:h.map(e=>(0,i.jsx)(u,{...e},e.name))})}let g={},m="Playground",w={},f=[];function b(e){let t={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"playground",children:"Playground"})}),"\n",(0,i.jsxs)(t.p,{children:["Playgrounds allow you to run Docusaurus ",(0,i.jsx)(t.strong,{children:"in your browser, without installing anything"}),"!"]}),"\n",(0,i.jsx)(t.p,{children:"They are mostly useful for:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Testing Docusaurus"}),"\n",(0,i.jsx)(t.li,{children:"Reporting bugs"}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["Use ",(0,i.jsx)(t.a,{href:"https://docusaurus.new",children:"docusaurus.new"})," as an easy-to-remember shortcut."]}),"\n",(0,i.jsx)(t.p,{children:"Choose one of the available options below."}),"\n","\n",(0,i.jsx)(p,{}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["For convenience, we'll remember your choice next time you visit ",(0,i.jsx)(t.a,{href:"https://docusaurus.new",children:"docusaurus.new"}),"."]})})]})}function v(e={}){let{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(b,{...e})}):b(e)}},43867:function(e,t,n){e.exports={src:{srcSet:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png 640w,"+n.p+"assets/ideal-img/codesandbox.36984ff.1030.png 1030w",images:[{path:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png",width:640,height:355},{path:n.p+"assets/ideal-img/codesandbox.36984ff.1030.png",width:1030,height:571}],src:n.p+"assets/ideal-img/codesandbox.7906bc4.640.png",toString:function(){return n.p+"assets/ideal-img/codesandbox.7906bc4.640.png"},placeholder:void 0,width:640,height:355},preSrc:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA7ElEQVR4nB3Ov0rDQACA8ZszxVrvLpfYu0goUWtQwT+IOtRasrg6WQdbhL5BHZwEoaVIaXHpC6irxc3JxUVfw01wcHD7pB1+07d8orKasb1zQLmcUrIxcZwQmEUK85IFrVGBQQcRwtolppIkIQxDlFJsrm+QHx1Tq1bJa3UO9/YRWqtZTNMVXOwozhXI26dcTYbcPo+5ntzTGnQQURQhpaRkLYExSL+IPMnY6p9zNu5QH7WRzV2Ec47QGNJ0mcpahlYBN4MuP/zx9vnB1+83L++vCN/3mVJKzxY8z+Oy2eLp4ZFG44Lh3Yh+t8c/jL9rZrM0xfsAAAAASUVORK5CYII="}},6951:function(e,t,n){e.exports={src:{srcSet:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png 640w,"+n.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png 1030w",images:[{path:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",width:640,height:356},{path:n.p+"assets/ideal-img/stackblitz.8ebfdbb.1030.png",width:1030,height:572}],src:n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png",toString:function(){return n.p+"assets/ideal-img/stackblitz.4ee9b70.640.png"},placeholder:void 0,width:640,height:356},preSrc:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAGCAYAAAD68A/GAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA2UlEQVR4nB3LvUrDUABA4fsAovbPNs29yb25adKEWlJB8C0rqFOx+BD+ILjbvTiYDiWpUx2zWAIeMcPHmY5I05SLyysm0wxjR+ggbLiej/INvrZ42iKkjvBsgiMDXC+k5/hE4ykvb6+8r1as1x88Pj0jBjJABhP6KmbgWlpdySjJ2G4Ldl876rqmLArEUIV44TnSjFE6pusYonRGvtlQliU/hwOfeY5QJsbYFOlHOCqk3ZNEScZ+/01VVfxCM4jTdp9/J62zpkfHHYZSc3N7x2Jxz3L5wHx+zR8O9nujOJsFvAAAAABJRU5ErkJggg=="}},11037:function(e,t,n){"use strict";n.d(t,{Z:()=>ee});var o=n(85893),i=n(67294),s=n(77827);function r(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function a(e){return"undefined"!=typeof window?(0,o.jsx)(l,{...e,children:e.children}):e.children}class l extends i.Component{static defaultProps={topOffset:0,bottomOffset:0,onEnter(){},onLeave(){}};scrollableAncestor;previousPosition=null;unsubscribe;innerRef=(0,i.createRef)();componentDidMount(){var e;let t;this.scrollableAncestor=function(e){let t=e;for(;t.parentNode&&(t=t.parentNode)!==document.body;){let e=window.getComputedStyle(t),n=e.getPropertyValue("overflow-y")||e.getPropertyValue("overflow");if("auto"===n||"scroll"===n||"overlay"===n)return t}return window}(this.innerRef.current);let n=r(this.scrollableAncestor,"scroll",this._handleScroll,{passive:!0}),o=r(window,"resize",this._handleScroll,{passive:!0}),i=(e=()=>{this._handleScroll()},t=!0,queueMicrotask(()=>{t&&e()}),()=>t=!1);this.unsubscribe=()=>{n(),o(),i()}}componentDidUpdate(){this._handleScroll()}componentWillUnmount(){this.unsubscribe?.()}_handleScroll=()=>{var e;let t=this.innerRef.current,{topOffset:n,bottomOffset:o,onEnter:i,onLeave:s}=this.props,r=(e=function(e){let t,n,{node:o,scrollableAncestor:i,topOffset:s,bottomOffset:r}=e,{top:a,bottom:l}=o.getBoundingClientRect();i===window?(t=window.innerHeight,n=0):(t=i.offsetHeight,n=i.getBoundingClientRect().top);let c=n+t;return{top:a,bottom:l,viewportTop:n+s,viewportBottom:c-r}}({node:t,scrollableAncestor:this.scrollableAncestor,topOffset:n,bottomOffset:o})).viewportBottom-e.viewportTop==0?"invisible":e.viewportTop<=e.top&&e.top<=e.viewportBottom||e.viewportTop<=e.bottom&&e.bottom<=e.viewportBottom||e.top<=e.viewportTop&&e.viewportBottom<=e.bottom?"inside":e.viewportBottom<e.top?"below":e.top<e.viewportTop?"above":"invisible",a=this.previousPosition;this.previousPosition=r,a!==r&&("inside"===r?i():"inside"===a&&s(),("below"===a&&"above"===r||"above"===a&&"below"===r)&&(i(),s()))};render(){return i.cloneElement(this.props.children,{innerRef:this.innerRef})}}function c(){let e;for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];let i=[];for(let t of n)if(t instanceof Object)Object.assign(e||(e={}),t);else if(void 0===t||!1===t);else if("string"==typeof t)i.push(t);else throw Error(`Unexpected value ${t}`);return{className:i.length>1?i.join(" "):i[0],style:e}}let d="loading",h="loaded",u="error",p={load:"load",loading:d,loaded:h,error:u,noicon:"noicon",offline:"offline"},{load:g,loading:m,loaded:w,error:f,noicon:b,offline:v}=p;class x extends i.PureComponent{static defaultProps={iconColor:"#fff",iconSize:64};constructor(e){super(e),this.state={isMounted:!1}}componentDidMount(){this.setState({isMounted:!0}),this.props.onDimensions&&this.dimensionElement&&this.props.onDimensions({width:this.dimensionElement.clientWidth||this.dimensionElement.parentNode.clientWidth,height:this.dimensionElement.clientHeight||this.dimensionElement.parentNode.clientHeight})}renderIcon(e){let{icon:t,icons:n,iconColor:o,iconSize:s,theme:r}=e,a=n[t];if(!a)return null;let l=c({width:s+100,height:s,color:o},r.icon);return i.createElement("div",l,[i.createElement(a,{fill:o,size:s,key:"icon"}),i.createElement("br",{key:"br"}),this.props.message])}renderImage(e){return e.icon===w?(0,o.jsx)("img",{...c(e.theme.img),src:e.src,alt:e.alt,width:e.width,height:e.height}):(0,o.jsx)("svg",{...c(e.theme.img),width:e.width,height:e.height,ref:e=>this.dimensionElement=e})}renderNoscript(e){return this.state.isMounted?null:(0,o.jsx)("noscript",{children:(0,o.jsx)("img",{...c(e.theme.img,e.theme.noscript),src:e.nsSrc,srcSet:e.nsSrcSet,alt:e.alt,width:e.width,height:e.height})})}render(){let e,t=this.props,{placeholder:n,theme:i}=t;return e=t.icon===w?{}:n.lqip?{backgroundImage:`url("${n.lqip}")`}:{backgroundColor:n.color},(0,o.jsxs)("div",{...c(i.placeholder,e,t.style,t.className),onClick:this.props.onClick,onKeyPress:this.props.onClick,ref:this.props.innerRef,children:[this.renderImage(t),this.renderNoscript(t),this.renderIcon(t)]})}}class A{constructor(){this.signal={onabort:()=>{}},this.abort=()=>this.signal.onabort()}}let S=(e,t)=>(t=t||{},new Promise((n,o)=>{let i=new XMLHttpRequest;for(let n in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(n,t.headers[n]);i.withCredentials="include"===t.credentials,i.onload=()=>{n(function e(){let t,n=[],o=[],s={};return i.getAllResponseHeaders().replace(/^(.*?):\s*?([\s\S]*?)$/gm,(e,i,r)=>{n.push(i=i.toLowerCase()),o.push([i,r]),t=s[i],s[i]=t?`${t},${r}`:r}),{ok:(i.status/100|0)==2,status:i.status,statusText:i.statusText,url:i.responseURL,clone:e,text:()=>Promise.resolve(i.responseText),json:()=>Promise.resolve(i.responseText).then(JSON.parse),blob:()=>Promise.resolve(new Blob([i.response])),headers:{keys:()=>n,entries:()=>o,get:e=>s[e.toLowerCase()],has:e=>e.toLowerCase()in s}}}())},i.onerror=o,t.signal&&(t.signal.onabort=()=>{i.onerror=i.onload=void 0,i.abort()}),i.send(t.body)})),y=(e,t)=>{if(!t)return e;let n=e.then(e=>e,e=>e);return n.cancel=()=>{e.cancel(),t.cancel()},n},j=e=>{let t,n=new Promise(n=>{t=setTimeout(n,e)});return n.cancel=()=>{clearTimeout(t),t=void 0},n},k=e=>{let t=new Image,n=new Promise((n,o)=>{t.onload=n,t.onabort=t.onerror=()=>o({}),t.src=e});return n.cancel=()=>{if(!t)throw Error("Already canceled");t.onload=t.onabort=t.onerror=void 0,t.src="",t=void 0},n},C=(e,t)=>{let n=new A,o=n.signal,i=new Promise((n,i)=>S(e,{...t,signal:o}).then(t=>{t.ok?t.blob().then(()=>k(e)).then(n):i({status:t.status})},i));return i.cancel=()=>{if(!n)throw Error("Already canceled");n.abort(),n=void 0},i},L="undefined"==typeof window||"ReactSnap"===window.navigator.userAgent,E=!L&&!!window.navigator.connection,M=(e,t)=>{let n;if(L)return 0;t||(t=window);let o=e.width,{screen:i}=t,s=i.width,r=i.height,{documentElement:a}=document,l=t.innerWidth||a.clientWidth,c=t.innerHeight||a.clientHeight,d=t.devicePixelRatio||1;if(s>l){let e=document.getElementsByTagName("body")[0],t=l-o;n=(e.clientHeight>c||e.clientHeight>r)&&t<=15?s-t:o/l*s}else n=o;return n*d},I=e=>{let t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";let n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return 0===n?`${e} ${t[n]}`:`${(e/1024**n).toFixed(1)} ${t[n]}`},B=(()=>{if(L)return!1;let e=document.createElement("canvas");return!!(e.getContext&&e.getContext("2d"))&&0===e.toDataURL("image/webp").indexOf("data:image/webp")})(),T=e=>"webp"===e.format||e.src&&e.src.match(/\.webp($|\?.*)/i),z=e=>{let t,n,{srcSet:o,maxImageWidth:i,supportsWebp:s}=e;if(0===o.length)throw Error("Need at least one item in srcSet");if(s)0===(t=o.filter(T)).length&&(t=o);else if(0===(t=o.filter(e=>!T(e))).length)throw Error("Need at least one supported format item in srcSet");let r=t.filter(e=>e.width>=i);return 0===r.length?(r=t,n=Math.max.apply(null,r.map(e=>e.width))):n=Math.min.apply(null,r.map(e=>e.width)),t.filter(e=>e.width===n)[0]},N=e=>{let{srcSet:t,getUrl:n}=e;if(!L)return{};let o=t.filter(e=>!T(e)),i=o[0];return{nsSrcSet:o.map(e=>`${n?n(e):e.src} ${e.width}w`).join(","),nsSrc:n?n(i):i.src,ssr:L}},{initial:V,loading:R,loaded:H,error:P}={initial:"initial",loading:d,loaded:h,error:u},U=e=>{let{connection:t,size:n,threshold:o,possiblySlowNetwork:i}=e;if(i)return!1;if(!t)return!0;let{downlink:s,rtt:r,effectiveType:a}=t;switch(a){case"slow-2g":case"2g":return!1;case"3g":if(s&&n&&o)return 8*n/(1e3*s)+r<o;return!1;default:return!0}},W=(e,t)=>{switch(e){case p.noicon:case p.loaded:return null;case p.loading:return"Loading...";case p.load:let{pickedSrc:n}=t,{size:i}=n;if(i)return["Click to load (",(0,o.jsx)("nobr",{children:I(i)},"nb"),")"];return"Click to load";case p.offline:return"Your browser is offline. Image not loaded";case p.error:let{loadInfo:s}=t;if(404===s)return"404. Image not found";return"Error. Click to reload";default:throw Error(`Wrong icon: ${e}`)}},O=e=>{let{loadState:t,onLine:n,overThreshold:o,userTriggered:i}=e;if(L)return p.noicon;switch(t){case H:return p.loaded;case R:return o?p.loading:p.noicon;case V:if(!n)return p.offline;{let{shouldAutoDownload:t}=e;if(void 0===t)return p.noicon;return i||!t?p.load:p.noicon}case P:return n?p.error:p.offline;default:throw Error(`Wrong state: ${t}`)}};class D extends i.Component{constructor(e){super(e),this.state={loadState:V,connection:E?{downlink:navigator.connection.downlink,rtt:navigator.connection.rtt,effectiveType:navigator.connection.effectiveType}:null,onLine:!0,overThreshold:!1,inViewport:!1,userTriggered:!1,possiblySlowNetwork:!1}}static defaultProps={shouldAutoDownload:U,getMessage:W,getIcon:O,loader:"xhr"};componentDidMount(){E?(this.updateConnection=()=>{navigator.onLine&&this.state.loadState===V&&this.setState({connection:{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}})},navigator.connection.addEventListener("onchange",this.updateConnection)):this.props.threshold&&(this.possiblySlowNetworkListener=e=>{if(this.state.loadState!==V)return;let{possiblySlowNetwork:t}=e.detail;!this.state.possiblySlowNetwork&&t&&this.setState({possiblySlowNetwork:t})},window.document.addEventListener("possiblySlowNetwork",this.possiblySlowNetworkListener)),this.updateOnlineStatus=()=>this.setState({onLine:navigator.onLine}),this.updateOnlineStatus(),window.addEventListener("online",this.updateOnlineStatus),window.addEventListener("offline",this.updateOnlineStatus)}componentWillUnmount(){this.clear(),E?navigator.connection.removeEventListener("onchange",this.updateConnection):this.props.threshold&&window.document.removeEventListener("possiblySlowNetwork",this.possiblySlowNetworkListener),window.removeEventListener("online",this.updateOnlineStatus),window.removeEventListener("offline",this.updateOnlineStatus)}onClick=()=>{let{loadState:e,onLine:t,overThreshold:n}=this.state;if(t)switch(e){case R:n&&this.cancel(!0);return;case H:return;case V:case P:this.load(!0);return;default:throw Error(`Wrong state: ${e}`)}};clear(){this.loader&&(this.loader.cancel(),this.loader=void 0)}cancel(e){R===this.state.loadState&&(this.clear(),this.loadStateChange(V,e))}loadStateChange(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.setState({loadState:e,overThreshold:!1,userTriggered:!!t,loadInfo:n})}load=e=>{let{loadState:t,url:n}=this.state;if(L||H===t||R===t)return;this.loadStateChange(R,e);let{threshold:o}=this.props,i="xhr"===this.props.loader?C(n):k(n);if(i.then(()=>{this.clear(),this.loadStateChange(H,!1)}).catch(e=>{this.clear(),404===e.status?this.loadStateChange(P,!1,404):this.loadStateChange(P,!1)}),o){let e=j(o);e.then(()=>{this.loader&&(window.document.dispatchEvent(new CustomEvent("possiblySlowNetwork",{detail:{possiblySlowNetwork:!0}})),this.setState({overThreshold:!0}),this.state.userTriggered||this.cancel(!0))}),this.loader=y(i,e)}else this.loader=i};onEnter=()=>{if(this.state.inViewport)return;this.setState({inViewport:!0});let e=z({srcSet:this.props.srcSet,maxImageWidth:this.props.srcSet.length>1?M(this.state.dimensions):0,supportsWebp:B}),{getUrl:t}=this.props,n=t?t(e):e.src,o=this.props.shouldAutoDownload({...this.state,size:e.size});this.setState({pickedSrc:e,shouldAutoDownload:o,url:n},()=>{o&&this.load(!1)})};onLeave=()=>{this.state.loadState!==R||this.state.userTriggered||(this.setState({inViewport:!1}),this.cancel(!1))};render(){let e=this.props.getIcon(this.state),t=this.props.getMessage(e,this.state);return(0,o.jsx)(a,{onEnter:this.onEnter,onLeave:this.onLeave,children:(0,o.jsx)(x,{...this.props,...N(this.props),onClick:this.onClick,icon:e,src:this.state.url||"",onDimensions:e=>this.setState({dimensions:e}),message:t})})}}let Z=e=>{let{size:t=24,fill:n="#000",className:i,path:s}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",className:i,children:[(0,o.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,o.jsx)("path",{fill:n,d:s})]})},{load:$,loading:Y,loaded:J,error:Q,noicon:G,offline:F}=p,K={[$]:e=>(0,o.jsx)(Z,{...e,path:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"}),[Y]:e=>(0,o.jsx)(Z,{...e,path:"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z"}),[J]:null,[Q]:e=>(0,o.jsx)(Z,{...e,path:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),[G]:null,[F]:e=>(0,o.jsx)(Z,{...e,path:"M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"})},q={placeholder:{backgroundSize:"cover",backgroundRepeat:"no-repeat",position:"relative"},img:{width:"100%",height:"auto",maxWidth:"100%",marginBottom:"-4px"},icon:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"},noscript:{position:"absolute",top:0,left:0}},_=e=>{let{icons:t=K,theme:n=q,...i}=e;return(0,o.jsx)(D,{...i,icons:t,theme:n})};function X(e,t){switch(e){case"noicon":case"loaded":return null;case"loading":return(0,s.I)({id:"theme.IdealImageMessage.loading",message:"Loading...",description:"When the full-scale image is loading"});case"load":{let{pickedSrc:e}=t,{size:n}=e,o=n?` (${function(e){let t=["B","KB","MB","GB","TB"];if(0===e)return"n/a";let n=Math.floor(Math.log(e)/Math.log(1024));return 0===n?`${e} ${t[n]}`:`${(e/1024**n).toFixed(1)} ${t[n]}`}(n)})`:"";return(0,s.I)({id:"theme.IdealImageMessage.load",message:"Click to load{sizeMessage}",description:"To prompt users to load the full image. sizeMessage is a parenthesized size figure."},{sizeMessage:o})}case"offline":return(0,s.I)({id:"theme.IdealImageMessage.offline",message:"Your browser is offline. Image not loaded",description:"When the user is viewing an offline document"});case"error":{let{loadInfo:e}=t;if(404===e)return(0,s.I)({id:"theme.IdealImageMessage.404error",message:"404. Image not found",description:"When the image is not found"});return(0,s.I)({id:"theme.IdealImageMessage.error",message:"Error. Click to reload",description:"When the image fails to load for unknown error"})}default:throw Error(`Wrong icon: ${e}`)}}function ee(e){let{img:t,...n}=e;return"string"==typeof t||"default"in t?(0,o.jsx)("img",{src:"string"==typeof t?t:t.default,...n}):(0,o.jsx)(_,{height:t.src.height??100,width:t.src.width??100,placeholder:{lqip:t.preSrc},src:t.src.src,srcSet:t.src.images.map(e=>({...e,src:e.path})),getMessage:X})}},80980:function(e,t,n){"use strict";n.d(t,{Z:()=>a,a:()=>r});var o=n(67294);let i={},s=o.createContext(i);function r(e){let t=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]);