1"use strict";(globalThis.webpackChunkdocs||=[]).push([[547],{90547(e,t,o){o.d(t,{A:()=>te});var n=o(96540),i=o(23230),s=o(74848);function r(e,t,o,n){return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)}function a(e){return"undefined"!=typeof window?(0,s.jsx)(l,{...e,children:e.children}):e.children}class l extends n.Component{static defaultProps={topOffset:0,bottomOffset:0,onEnter(){},onLeave(){}};scrollableAncestor;previousPosition=null;unsubscribe;innerRef=(0,n.createRef)();componentDidMount(){this.scrollableAncestor=function(e){let t=e;for(;t.parentNode;){if(t=t.parentNode,t===document.body)return window;const e=window.getComputedStyle(t),o=e.getPropertyValue("overflow-y")||e.getPropertyValue("overflow");if("auto"===o||"scroll"===o||"overlay"===o)return t}return window}(this.innerRef.current);const e=r(this.scrollableAncestor,"scroll",this._handleScroll,{passive:!0}),t=r(window,"resize",this._handleScroll,{passive:!0}),o=function(e){let t=!0;return queueMicrotask(()=>{t&&e()}),()=>t=!1}(()=>{this._handleScroll()});this.unsubscribe=()=>{e(),t(),o()}}componentDidUpdate(){this._handleScroll()}componentWillUnmount(){this.unsubscribe?.()}_handleScroll=()=>{const e=this.innerRef.current,{topOffset:t,bottomOffset:o,onEnter:n,onLeave:i}=this.props,s=function({node:e,scrollableAncestor:t,topOffset:o,bottomOffset:n}){const{top:i,bottom:s}=e.getBoundingClientRect();let r,a;if(t===window)r=window.innerHeight,a=0;else{const e=t;r=e.offsetHeight,a=e.getBoundingClientRect().top}return{top:i,bottom:s,viewportTop:a+o,viewportBottom:a+r-n}}({node:e,scrollableAncestor:this.scrollableAncestor,topOffset:t,bottomOffset:o}),r=function(e){if(e.viewportBottom-e.viewportTop===0)return"invisible";if(e.viewportTop<=e.top&&e.top<=e.viewportBottom)return"inside";if(e.viewportTop<=e.bottom&&e.bottom<=e.viewportBottom)return"inside";if(e.top<=e.viewportTop&&e.viewportBottom<=e.bottom)return"inside";if(e.viewportBottom<e.top)return"below";if(e.top<e.viewportTop)return"above";return"invisible"}(s),a=this.previousPosition;if(this.previousPosition=r,a===r)return;"inside"===r?n():"inside"===a&&i();("below"===a&&"above"===r||"above"===a&&"below"===r)&&(n(),i())};render(){return n.cloneElement(this.props.children,{innerRef:this.innerRef})}}const c=(...e)=>{const t=[];let o;for(const n of e)if(n instanceof Object)Object.assign(o||(o={}),n);else if(void 0===n||!1===n);else{if("string"!=typeof n)throw new Error(`Unexpected value ${n}`);t.push(n)}return{className:t.length>1?t.join(" "):t[0],style:o}};o.dn(c);const d="loading",h="loaded",u="error",p={load:"load",loading:d,loaded:h,error:u,noicon:"noicon",offline:"offline"},g={initial:"initial",loading:d,loaded:h,error:u},{load:f,loading:w,loaded:m,error:v,noicon:b,offline:S}=p;class k extends n.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){const{icon:t,icons:o,iconColor:i,iconSize:s,theme:r}=e,a=o[t];if(!a)return null;const l=c({width:s+100,height:s,color:i},r.icon);return n.createElement("div",l,[n.createElement(a,{fill:i,size:s,key:"icon"}),n.createElement("br",{key:"br"}),this.props.message])}renderImage(e){return e.icon===m?(0,s.jsx)("img",{...c(e.theme.img),src:e.src,alt:e.alt,width:e.width,height:e.height}):(0,s.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,s.jsx)("noscript",{children:(0,s.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(){const e=this.props,{placeholder:t,theme:o}=e;let n;return n=e.icon===m?{}:t.lqip?{backgroundImage:`url("${t.lqip}")`}:{backgroundColor:t.color},(0,s.jsxs)("div",{...c(o.placeholder,n,e.style,e.className),onClick:this.props.onClick,onKeyPress:this.props.onClick,ref:this.props.innerRef,children:[this.renderImage(e),this.renderNoscript(e),this.renderIcon(e)]})}}class x{constructor(){this.signal={onabort:()=>{}},this.abort=()=>this.signal.onabort()}}const y=e=>{let t=new Image;const o=new Promise((o,n)=>{t.onload=o,t.onabort=t.onerror=()=>n({}),t.src=e});return o.cancel=()=>{if(!t)throw new Error("Already canceled");t.onload=t.onabort=t.onerror=void 0,t.src="",t=void 0},o},C=(e,t)=>{let o=new x;const n=o.signal,i=new Promise((o,i)=>((e,t)=>(t=t||{},new Promise((o,n)=>{const i=new XMLHttpRequest;i.open(t.method||"get",e,!0);for(const e in t.headers)i.setRequestHeader(e,t.headers[e]);function s(){const e=[],t=[],o={};let n;return i.getAllResponseHeaders().replace(/^(.*?):\s*?([\s\S]*?)$/gm,(i,s,r)=>{e.push(s=s.toLowerCase()),t.push([s,r]),n=o[s],o[s]=n?`${n},${r}`:r}),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:()=>Promise.resolve(i.responseText),json:()=>Promise.resolve(i.responseText).then(JSON.parse),blob:()=>Promise.resolve(new Blob([i.response])),headers:{keys:()=>e,entries:()=>t,get:e=>o[e.toLowerCase()],has:e=>e.toLowerCase()in o}}}i.withCredentials="include"===t.credentials,i.onload=()=>{o(s())},i.onerror=n,t.signal&&(t.signal.onabort=()=>{i.onerror=i.onload=void 0,i.abort()}),i.send(t.body)})))(e,{...t,signal:n}).then(t=>{t.ok?t.blob().then(()=>y(e)).then(o):i({status:t.status})},i));return i.cancel=()=>{if(!o)throw new Error("Already canceled");o.abort(),o=void 0},i},E="undefined"==typeof window||"ReactSnap"===window.navigator.userAgent,L=!E&&!!window.navigator.connection,M=(e,t)=>{if(E)return 0;t||(t=window);const o=e.width,{screen:n}=t,i=n.width,s=n.height,{documentElement:r}
1=document,a=t.innerWidth||r.clientWidth,l=t.innerHeight||r.clientHeight,c=t.devicePixelRatio||1;let d;if(i>a){const e=document.getElementsByTagName("body")[0],t=a-o;d=(e.clientHeight>l||e.clientHeight>s)&&t<=15?i-t:o/a*i}else d=o;return d*c},T=e=>{const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const o=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return 0===o?`${e} ${t[o]}`:`${(e/1024**o).toFixed(1)} ${t[o]}`},I=(()=>{if(E)return!1;const e=document.createElement("canvas");return!!e.getContext?.("2d")&&0===e.toDataURL("image/webp").indexOf("data:image/webp")})(),N=e=>"webp"===e.format||e.src?.match(/\.webp($|\?.*)/i),z=({srcSet:e,getUrl:t})=>{if(!E)return{};const o=e.filter(e=>!N(e)),n=o[0];return{nsSrcSet:o.map(e=>`${t?t(e):e.src} ${e.width}w`).join(","),nsSrc:t?t(n):n.src,ssr:E}},{initial:j,loading:B,loaded:H,error:$}=g,V=({connection:e,size:t,threshold:o,possiblySlowNetwork:n})=>{if(n)return!1;if(!e)return!0;const{downlink:i,rtt:s,effectiveType:r}=e;switch(r){case"slow-2g":case"2g":return!1;case"3g":return!!(i&&t&&o)&&8*t/(1e3*i)+s<o;default:return!0}},W=(e,t)=>{switch(e){case p.noicon:case p.loaded:return null;case p.loading:return"Loading...";case p.load:const{pickedSrc:o}=t,{size:n}=o;return n?["Click to load (",(0,s.jsx)("nobr",{children:T(n)},"nb"),")"]:"Click to load";case p.offline:return"Your browser is offline. Image not loaded";case p.error:const{loadInfo:i}=t;return 404===i?"404. Image not found":"Error. Click to reload";default:throw new Error(`Wrong icon: ${e}`)}},O=e=>{const{loadState:t,onLine:o,overThreshold:n,userTriggered:i}=e;if(E)return p.noicon;switch(t){case H:return p.loaded;case B:return n?p.loading:p.noicon;case j:if(o){const{shouldAutoDownload:t}=e;return void 0===t?p.noicon:i||!t?p.load:p.noicon}return p.offline;case $:return o?p.error:p.offline;default:throw new Error(`Wrong state: ${t}`)}};class P extends n.Component{constructor(e){super(e),this.state={loadState:j,connection:L?{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:V,getMessage:W,getIcon:O,loader:"xhr"};componentDidMount(){L?(this.updateConnection=()=>{navigator.onLine&&this.state.loadState===j&&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!==j)return;const{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(),L?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=()=>{const{loadState:e,onLine:t,overThreshold:o}=this.state;if(t)switch(e){case B:return void(o&&this.cancel(!0));case H:return;case j:case $:return void this.load(!0);default:throw new Error(`Wrong state: ${e}`)}};clear(){this.loader&&(this.loader.cancel(),this.loader=void 0)}cancel(e){B===this.state.loadState&&(this.clear(),this.loadStateChange(j,e))}loadStateChange(e,t,o=null){this.setState({loadState:e,overThreshold:!1,userTriggered:!!t,loadInfo:o})}load=e=>{const{loadState:t,url:o}=this.state;if(E||H===t||B===t)return;this.loadStateChange(B,e);const{threshold:n}=this.props,i="xhr"===this.props.loader?C(o):y(o);if(i.then(()=>{this.clear(),this.loadStateChange(H,!1)}).catch(e=>{this.clear(),404===e.status?this.loadStateChange($,!1,404):this.loadStateChange($,!1)}),n){const e=(e=>{let t;const o=new Promise(o=>{t=setTimeout(o,e)});return o.cancel=()=>{clearTimeout(t),t=void 0},o})(n);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=((e,t)=>{if(!t)return e;const o=e.then(e=>e,e=>e);return o.cancel=()=>{e.cancel(),t.cancel()},o})(i,e)}else this.loader=i};onEnter=()=>{if(this.state.inViewport)return;this.setState({inViewport:!0});const e=(({srcSet:e,maxImageWidth:t,supportsWebp:o})=>{if(0===e.length)throw new Error("Need at least one item in srcSet");let n,i;if(o)n=e.filter(N),0===n.length&&(n=e);else if(n=e.filter(e=>!N(e)),0===n.length)throw new Error("Need at least one supported format item in srcSet");let s=n.filter(e=>e.width>=t);return 0===s.length?(s=n,i=Math.max.apply(null,s.map(e=>e.width))):i=Math.min.apply(null,s.map(e=>e.width)),n.filter(e=>e.width===i)[0]})({srcSet:this.props.srcSet,maxImageWidth:this.props.srcSet.length>1?M(this.state.dimensions):0,supportsWebp:I}),{getUrl:t}=this.props,o=t?t(e):e.src,n=this.props.shouldAutoDownload({...this.state,size:e.size});this.setState({pickedSrc:e,shouldAutoDownload:n,url:o},()=>{n&&this.load(!1)})};onLeave=()=>{this.state.loadState!==B||this.state.userTriggered||(this.setState({inViewport:!1}),this.cancel(!1))};render(){const e=this.props.getIcon(this.state),t=this.props.getMessage(e,this.state);return(0,s.jsx)(a,{onEnter:this.onEnter,onLeave:this.onLeave,children:(0,s.jsx)(k,{...this.props,...z(this.props),onClick:this.onClick,icon:e,src:this.state.url||"",onDimensions:e=>this.setState({dimensions:e}),message:t})})}}const R=({size:e=24,fill:t="#000",className:o,path:n})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",className:o,children:[(0,s.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,s.jsx)("path",{fill:t,d:n})]}),A=e=>
1(0,s.jsx)(R,{...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"}),D=e=>(0,s.jsx)(R,{...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"}),U=e=>(0,s.jsx)(R,{...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"}),q=e=>(0,s.jsx)(R,{...e,path:"M6,2V8H6V8L10,12L6,16V16H6V22H18V16H18V16L14,12L18,8V8H18V2H6M16,16.5V20H8V16.5L12,12.5L16,16.5M12,11.5L8,7.5V4H16V7.5L12,11.5Z"}),{load:_,loading:K,loaded:F,error:G,noicon:Y,offline:J}=p,X={[_]:A,[K]:q,[F]:null,[G]:U,[Y]:null,[J]:D},Z={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}},Q=({icons:e=X,theme:t=Z,...o})=>(0,s.jsx)(P,{...o,icons:e,theme:t});function ee(e,t){switch(e){case"noicon":case"loaded":return null;case"loading":return(0,i.T)({id:"theme.IdealImageMessage.loading",message:"Loading...",description:"When the full-scale image is loading"});case"load":{const{pickedSrc:e}=t,{size:o}=e,n=o?` (${function(e){const t=["B","KB","MB","GB","TB"];if(0===e)return"n/a";const o=Math.floor(Math.log(e)/Math.log(1024));return 0===o?`${e} ${t[o]}`:`${(e/1024**o).toFixed(1)} ${t[o]}`}(o)})`:"";return(0,i.T)({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:n})}case"offline":return(0,i.T)({id:"theme.IdealImageMessage.offline",message:"Your browser is offline. Image not loaded",description:"When the user is viewing an offline document"});case"error":{const{loadInfo:e}=t;return 404===e?(0,i.T)({id:"theme.IdealImageMessage.404error",message:"404. Image not found",description:"When the image is not found"}):(0,i.T)({id:"theme.IdealImageMessage.error",message:"Error. Click to reload",description:"When the image fails to load for unknown error"})}default:throw new Error(`Wrong icon: ${e}`)}}function te(e){const{img:t,...o}=e;return"string"==typeof t||"default"in t?(0,s.jsx)("img",{src:"string"==typeof t?t:t.default,...o}):(0,s.jsx)(Q,{...o,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:ee})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.