Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/_preview/pr-76/.nojekyll b/_preview/pr-76/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/_preview/pr-76/404.html b/_preview/pr-76/404.html new file mode 100644 index 0000000..d9a4bf2 --- /dev/null +++ b/_preview/pr-76/404.html @@ -0,0 +1,13 @@ + + +
+ + +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
["'])(?.*?)\1/,ve=/\{(? [\d,-]+)\}/,Ne={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},Ce={...Ne,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:""}},Ae=Object.keys(Ne);function ke(e,t){const n=e.map((e=>{const{start:n,end:s}=Ce[e];return`(?:${n}\\s*(${t.flatMap((e=>[e.line,e.block?.start,e.block?.end].filter(Boolean))).join("|")})\\s*${s})`})).join("|");return new RegExp(`^\\s*(?:${n})\\s*$`)}function Le(e,t){let n=e.replace(/\n$/,"");const{language:s,magicComments:a,metastring:o}=t;if(o&&ve.test(o)){const e=o.match(ve).groups.range;if(0===a.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const t=a[0].className,s=ge()(e).filter((e=>e>0)).map((e=>[e-1,[t]]));return{lineClassNames:Object.fromEntries(s),code:n}}if(void 0===s)return{lineClassNames:{},code:n};const i=function(e,t){switch(e){case"js":case"javascript":case"ts":case"typescript":return ke(["js","jsBlock"],t);case"jsx":case"tsx":return ke(["js","jsBlock","jsx"],t);case"html":return ke(["js","jsBlock","html"],t);case"python":case"py":case"bash":return ke(["bash"],t);case"markdown":case"md":return ke(["html","jsx","bash"],t);case"tex":case"latex":case"matlab":return ke(["tex"],t);case"lua":case"haskell":case"sql":return ke(["lua"],t);case"wasm":return ke(["wasm"],t);case"vb":case"vba":case"visual-basic":return ke(["vb","rem"],t);case"vbnet":return ke(["vbnet","rem"],t);case"batch":return ke(["rem"],t);case"basic":return ke(["rem","f90"],t);case"fsharp":return ke(["js","ml"],t);case"ocaml":case"sml":return ke(["ml"],t);case"fortran":return ke(["f90"],t);case"cobol":return ke(["cobol"],t);default:return ke(Ae,t)}}(s,a),l=n.split("\n"),c=Object.fromEntries(a.map((e=>[e.className,{start:0,range:""}]))),r=Object.fromEntries(a.filter((e=>e.line)).map((e=>{let{className:t,line:n}=e;return[n,t]}))),d=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.start,t]}))),u=Object.fromEntries(a.filter((e=>e.block)).map((e=>{let{className:t,block:n}=e;return[n.end,t]})));for(let h=0;h void 0!==e));r[t]?c[r[t]].range+=`${h},`:d[t]?c[d[t]].start=h:u[t]&&(c[u[t]].range+=`${c[u[t]].start}-${h-1},`),l.splice(h,1)}n=l.join("\n");const m={};return Object.entries(c).forEach((e=>{let[t,{range:n}]=e;ge()(n).forEach((e=>{m[e]??=[],m[e].push(t)}))})),{lineClassNames:m,code:n}}const ye={codeBlockContainer:"codeBlockContainer_nK63"};function Be(e){let{as:t,...n}=e;const s=function(e){const t={color:"--prism-color",backgroundColor:"--prism-background-color"},n={};return Object.entries(e.plain).forEach((e=>{let[s,a]=e;const o=t[s];o&&"string"==typeof a&&(n[o]=a)})),n}(xe());return(0,i.jsx)(t,{...n,style:s,className:(0,u.A)(n.className,ye.codeBlockContainer,v.G.common.codeBlock)})}const _e={codeBlockContent:"codeBlockContent_BFef",codeBlockTitle:"codeBlockTitle_jJve",codeBlock:"codeBlock_BUQB",codeBlockStandalone:"codeBlockStandalone_NkYc",codeBlockLines:"codeBlockLines_dbG7",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_wQ2h",buttonGroup:"buttonGroup_z3hN"};function we(e){let{children:t,className:n}=e;return(0,i.jsx)(Be,{as:"pre",tabIndex:0,className:(0,u.A)(_e.codeBlockStandalone,"thin-scrollbar",n),children:(0,i.jsx)("code",{className:_e.codeBlockLines,children:t})})}const Te={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ee(e,t){const[n,a]=(0,s.useState)(),i=(0,s.useCallback)((()=>{a(e.current?.closest("[role=tabpanel][hidden]"))}),[e,a]);(0,s.useEffect)((()=>{i()}),[i]),function(e,t,n){void 0===n&&(n=Te);const a=(0,o._q)(t),i=(0,o.Be)(n);(0,s.useEffect)((()=>{const t=new MutationObserver(a);return e&&t.observe(e,i),()=>t.disconnect()}),[e,a,i])}(n,(e=>{e.forEach((e=>{"attributes"===e.type&&"hidden"===e.attributeName&&(t(),i())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var He=n(6257);const Me={codeLine:"codeLine__Cfo",codeLineNumber:"codeLineNumber_iIeL",codeLineContent:"codeLineContent_Uh64"};function Ie(e){let{line:t,classNames:n,showLineNumbers:s,getLineProps:a,getTokenProps:o}=e;1===t.length&&"\n"===t[0].content&&(t[0].content="");const l=a({line:t,className:(0,u.A)(n,s&&Me.codeLine)}),c=t.map(((e,t)=>(0,i.jsx)("span",{...o({token:e,key:t})},t)));return(0,i.jsxs)("span",{...l,children:[s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:Me.codeLineNumber}),(0,i.jsx)("span",{className:Me.codeLineContent,children:c})]}):c,(0,i.jsx)("br",{})]})}function Ue(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.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 Se(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Re={copyButtonCopied:"copyButtonCopied_QKp3",copyButtonIcons:"copyButtonIcons_p991",copyButtonIcon:"copyButtonIcon_DQfU",copyButtonSuccessIcon:"copyButtonSuccessIcon_Yj5J"};function ze(e){let{code:t,className:n}=e;const[a,o]=(0,s.useState)(!1),l=(0,s.useRef)(void 0),c=(0,s.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const s=document.createElement("textarea"),a=document.activeElement;s.value=e,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const o=document.getSelection(),i=o.rangeCount>0&&o.getRangeAt(0);n.append(s),s.select(),s.selectionStart=0,s.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}s.remove(),i&&(o.removeAllRanges(),o.addRange(i)),a&&a.focus()}(t),o(!0),l.current=window.setTimeout((()=>{o(!1)}),1e3)}),[t]);return(0,s.useEffect)((()=>()=>window.clearTimeout(l.current)),[]),(0,i.jsx)("button",{type:"button","aria-label":a?(0,h.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,h.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,h.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.A)("clean-btn",n,Re.copyButton,a&&Re.copyButtonCopied),onClick:c,children:(0,i.jsxs)("span",{className:Re.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(Ue,{className:Re.copyButtonIcon}),(0,i.jsx)(Se,{className:Re.copyButtonSuccessIcon})]})})}function Ve(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.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 Oe={wordWrapButtonIcon:"wordWrapButtonIcon_emgq",wordWrapButtonEnabled:"wordWrapButtonEnabled_xrEb"};function Ge(e){let{className:t,onClick:n,isEnabled:s}=e;const a=(0,h.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)("button",{type:"button",onClick:n,className:(0,u.A)("clean-btn",t,s&&Oe.wordWrapButtonEnabled),"aria-label":a,title:a,children:(0,i.jsx)(Ve,{className:Oe.wordWrapButtonIcon,"aria-hidden":"true"})})}function We(e){let{children:t,className:n="",metastring:a,title:o,showLineNumbers:l,language:c}=e;const{prism:{defaultLanguage:r,magicComments:d}}=(0,P.p)(),m=function(e){return e?.toLowerCase()}(c??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??r),h=xe(),p=function(){const[e,t]=(0,s.useState)(!1),[n,a]=(0,s.useState)(!1),o=(0,s.useRef)(null),i=(0,s.useCallback)((()=>{const n=o.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[o,e]),l=(0,s.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=o.current,n=e>t||o.current.querySelector("code").hasAttribute("style");a(n)}),[o]);return Ee(o,l),(0,s.useEffect)((()=>{l()}),[e,l]),(0,s.useEffect)((()=>(window.addEventListener("resize",l,{passive:!0}),()=>{window.removeEventListener("resize",l)})),[l]),{codeBlockRef:o,isEnabled:e,isCodeScrollable:n,toggle:i}}(),f=function(e){return e?.match(je)?.groups.title??""}(a)||o,{lineClassNames:x,code:b}=Le(t,{metastring:a,language:m,magicComments:d}),g=l??function(e){return Boolean(e?.includes("showLineNumbers"))}(a);return(0,i.jsxs)(Be,{as:"div",className:(0,u.A)(n,m&&!n.includes(`language-${m}`)&&`language-${m}`),children:[f&&(0,i.jsx)("div",{className:_e.codeBlockTitle,children:f}),(0,i.jsxs)("div",{className:_e.codeBlockContent,children:[(0,i.jsx)(He.f4,{theme:h,code:b,language:m??"text",children:e=>{let{className:t,style:n,tokens:s,getLineProps:a,getTokenProps:o}=e;return(0,i.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.A)(t,_e.codeBlock,"thin-scrollbar"),style:n,children:(0,i.jsx)("code",{className:(0,u.A)(_e.codeBlockLines,g&&_e.codeBlockLinesWithNumbering),children:s.map(((e,t)=>(0,i.jsx)(Ie,{line:e,getLineProps:a,getTokenProps:o,classNames:x[t],showLineNumbers:g},t)))})})}}),(0,i.jsxs)("div",{className:_e.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,i.jsx)(Ge,{className:_e.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,i.jsx)(ze,{className:_e.codeButton,code:b})]})]})]})}function De(e){let{children:t,...n}=e;const a=(0,pe.A)(),o=function(e){return s.Children.toArray(e).some((e=>(0,s.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),l="string"==typeof o?We:we;return(0,i.jsx)(l,{...n,children:o},String(a))}function Pe(e){return(0,i.jsx)("code",{...e})}var $e=n(3293);const Fe={details:"details_quWg",isBrowser:"isBrowser_QlBP",collapsibleContent:"collapsibleContent_SQsf"};function qe(e){return!!e&&("SUMMARY"===e.tagName||qe(e.parentElement))}function Qe(e,t){return!!e&&(e===t||Qe(e.parentElement,t))}function Ye(e){let{summary:t,children:n,...a}=e;(0,$e.A)().collectAnchor(a.id);const o=(0,pe.A)(),l=(0,s.useRef)(null),{collapsed:c,setCollapsed:r}=(0,D.u)({initialState:!a.open}),[d,m]=(0,s.useState)(a.open),h=s.isValidElement(t)?t:(0,i.jsx)("summary",{children:t??"Details"});return(0,i.jsxs)("details",{...a,ref:l,open:d,"data-collapsed":c,className:(0,u.A)(Fe.details,o&&Fe.isBrowser,a.className),onMouseDown:e=>{qe(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;qe(t)&&Qe(t,l.current)&&(e.preventDefault(),c?(r(!1),m(!0)):r(!0))},children:[h,(0,i.jsx)(D.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{r(e),m(!e)},children:(0,i.jsx)("div",{className:Fe.collapsibleContent,children:n})})]})}const Ke={details:"details_XEZw"},Je="alert alert--info";function Ze(e){let{...t}=e;return(0,i.jsx)(Ye,{...t,className:(0,u.A)(Je,Ke.details,t.className)})}function Xe(e){const t=s.Children.toArray(e.children),n=t.find((e=>s.isValidElement(e)&&"summary"===e.type)),a=(0,i.jsx)(i.Fragment,{children:t.filter((e=>e!==n))});return(0,i.jsx)(Ze,{...e,summary:n,children:a})}function et(e){return(0,i.jsx)(ue.A,{...e})}const tt={containsTaskList:"containsTaskList_am4V"};function nt(e){if(void 0!==e)return(0,u.A)(e,e?.includes("contains-task-list")&&tt.containsTaskList)}const st={img:"img_rcV0"};function at(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=s.Children.toArray(e),n=t.find((e=>s.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),a=t.filter((e=>e!==n)),o=n?.props.children;return{mdxAdmonitionTitle:o,rest:a.length>0?(0,i.jsx)(i.Fragment,{children:a}):null}}(e.children),a=e.title??t;return{...e,...a&&{title:a},children:n}}const ot={admonition:"admonition_INTT",admonitionHeading:"admonitionHeading_pW1l",admonitionIcon:"admonitionIcon_cYJk",admonitionContent:"admonitionContent_FGsv"};function it(e){let{type:t,className:n,children:s}=e;return(0,i.jsx)("div",{className:(0,u.A)(v.G.common.admonition,v.G.common.admonitionType(t),ot.admonition,n),children:s})}function lt(e){let{icon:t,title:n}=e;return(0,i.jsxs)("div",{className:ot.admonitionHeading,children:[(0,i.jsx)("span",{className:ot.admonitionIcon,children:t}),n]})}function ct(e){let{children:t}=e;return t?(0,i.jsx)("div",{className:ot.admonitionContent,children:t}):null}function rt(e){const{type:t,icon:n,title:s,children:a,className:o}=e;return(0,i.jsxs)(it,{type:t,className:o,children:[(0,i.jsx)(lt,{title:s,icon:n}),(0,i.jsx)(ct,{children:a})]})}function dt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.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 ut={icon:(0,i.jsx)(dt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function mt(e){return(0,i.jsx)(rt,{...ut,...e,className:(0,u.A)("alert alert--secondary",e.className),children:e.children})}function ht(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.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 pt={icon:(0,i.jsx)(ht,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function ft(e){return(0,i.jsx)(rt,{...pt,...e,className:(0,u.A)("alert alert--success",e.className),children:e.children})}function xt(e){return(0,i.jsx)("svg",{viewBox:"0 0 14 16",...e,children:(0,i.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 bt={icon:(0,i.jsx)(xt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function gt(e){return(0,i.jsx)(rt,{...bt,...e,className:(0,u.A)("alert alert--info",e.className),children:e.children})}function jt(e){return(0,i.jsx)("svg",{viewBox:"0 0 16 16",...e,children:(0,i.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 vt={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function Nt(e){return(0,i.jsx)("svg",{viewBox:"0 0 12 16",...e,children:(0,i.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 Ct={icon:(0,i.jsx)(Nt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const At={icon:(0,i.jsx)(jt,{}),title:(0,i.jsx)(h.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const kt={...{note:mt,tip:ft,info:gt,warning:function(e){return(0,i.jsx)(rt,{...vt,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})},danger:function(e){return(0,i.jsx)(rt,{...Ct,...e,className:(0,u.A)("alert alert--danger",e.className),children:e.children})}},...{secondary:e=>(0,i.jsx)(mt,{title:"secondary",...e}),important:e=>(0,i.jsx)(gt,{title:"important",...e}),success:e=>(0,i.jsx)(ft,{title:"success",...e}),caution:function(e){return(0,i.jsx)(rt,{...At,...e,className:(0,u.A)("alert alert--warning",e.className),children:e.children})}}};function Lt(e){const t=at(e),n=(s=t.type,kt[s]||(console.warn(`No admonition component found for admonition type "${s}". Using Info as fallback.`),kt.info));var s;return(0,i.jsx)(n,{...t})}const yt={Head:he.A,details:Xe,Details:Xe,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,i.jsx)(Pe,{...e}):(0,i.jsx)(De,{...e})},a:function(e){return(0,i.jsx)(p.A,{...e})},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",{...e,className:nt(e.className)})},li:function(e){return(0,$e.A)().collectAnchor(e.id),(0,i.jsx)("li",{...e})},img:function(e){return(0,i.jsx)("img",{decoding:"async",loading:"lazy",...e,className:(t=e.className,(0,u.A)(t,st.img))});var t},h1:e=>(0,i.jsx)(et,{as:"h1",...e}),h2:e=>(0,i.jsx)(et,{as:"h2",...e}),h3:e=>(0,i.jsx)(et,{as:"h3",...e}),h4:e=>(0,i.jsx)(et,{as:"h4",...e}),h5:e=>(0,i.jsx)(et,{as:"h5",...e}),h6:e=>(0,i.jsx)(et,{as:"h6",...e}),admonition:Lt,mermaid:()=>null};function Bt(e){let{children:t}=e;return(0,i.jsx)(me.x,{components:yt,children:t})}function _t(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=r();return t.hide_title||void 0!==n?null:e.title}();return(0,i.jsxs)("div",{className:(0,u.A)(v.G.docs.docMarkdown,"markdown"),children:[n&&(0,i.jsx)("header",{children:(0,i.jsx)(ue.A,{as:"h1",children:n})}),(0,i.jsx)(Bt,{children:t})]})}var wt=n(3926),Tt=n(8786),Et=n(3720);function Ht(e){return(0,i.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const Mt={breadcrumbHomeIcon:"breadcrumbHomeIcon_hawL"};function It(){const e=(0,Et.A)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(p.A,{"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Ht,{className:Mt.breadcrumbHomeIcon})})})}const Ut={breadcrumbsContainer:"breadcrumbsContainer_HIHm"};function St(e){let{children:t,href:n,isLast:s}=e;const a="breadcrumbs__link";return s?(0,i.jsx)("span",{className:a,itemProp:"name",children:t}):n?(0,i.jsx)(p.A,{className:a,href:n,itemProp:"item",children:(0,i.jsx)("span",{itemProp:"name",children:t})}):(0,i.jsx)("span",{className:a,children:t})}function Rt(e){let{children:t,active:n,index:s,addMicrodata:a}=e;return(0,i.jsxs)("li",{...a&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.A)("breadcrumbs__item",{"breadcrumbs__item--active":n}),children:[t,(0,i.jsx)("meta",{itemProp:"position",content:String(s+1)})]})}function zt(){const e=(0,wt.OF)(),t=(0,Tt.Dt)();return e?(0,i.jsx)("nav",{className:(0,u.A)(v.G.docs.docBreadcrumbs,Ut.breadcrumbsContainer),"aria-label":(0,h.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[t&&(0,i.jsx)(It,{}),e.map(((t,n)=>{const s=n===e.length-1,a="category"===t.type&&t.linkUnlisted?void 0:t.href;return(0,i.jsx)(Rt,{active:s,index:n,addMicrodata:!!a,children:(0,i.jsx)(St,{href:a,isLast:s,children:t.label})},n)}))]})}):null}function Vt(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Ot(){return(0,i.jsx)(h.A,{id:"theme.unlistedContent.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 Gt(){return(0,i.jsx)(he.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function Wt(e){let{className:t}=e;return(0,i.jsx)(Lt,{type:"caution",title:(0,i.jsx)(Vt,{}),className:(0,u.A)(t,v.G.common.unlistedBanner),children:(0,i.jsx)(Ot,{})})}function Dt(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gt,{}),(0,i.jsx)(Wt,{...e})]})}const Pt={docItemContainer:"docItemContainer_BjA9",docItemCol:"docItemCol_hig1"};function $t(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=r(),n=(0,m.l)(),s=e.hide_table_of_contents,a=!s&&t.length>0;return{hidden:s,mobile:a?(0,i.jsx)(oe,{}):void 0,desktop:!a||"desktop"!==n&&"ssr"!==n?void 0:(0,i.jsx)(de,{})}}(),{metadata:{unlisted:s}}=r();return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,u.A)("col",!n.hidden&&Pt.docItemCol),children:[s&&(0,i.jsx)(Dt,{}),(0,i.jsx)(B,{}),(0,i.jsxs)("div",{className:Pt.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(zt,{}),(0,i.jsx)(_,{}),n.mobile,(0,i.jsx)(_t,{children:t}),(0,i.jsx)(W,{})]}),(0,i.jsx)(b,{})]})]}),n.desktop&&(0,i.jsx)("div",{className:"col col--3",children:n.desktop})]})}function Ft(e){const t=`docs-doc-id-${e.content.metadata.id}`,n=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(a.e3,{className:t,children:[(0,i.jsx)(d,{}),(0,i.jsx)($t,{children:(0,i.jsx)(n,{})})]})})}},1269:(e,t)=>{function n(e){let t,n=[];for(let s of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(s))n.push(parseInt(s,10));else if(t=s.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,s,a,o]=t;if(s&&o){s=parseInt(s),o=parseInt(o);const e=s {"use strict";n.d(t,{R:()=>i,x:()=>l});var s=n(6166);const a={},o=s.createContext(a);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/1fca393f.f66a774a.js b/_preview/pr-76/assets/js/1fca393f.f66a774a.js new file mode 100644 index 0000000..66fa398 --- /dev/null +++ b/_preview/pr-76/assets/js/1fca393f.f66a774a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[545],{6746:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>n,metadata:()=>a,toc:()=>l});var r=t(678),i=t(4738);const n={title:"Security"},o=void 0,a={id:"pages/reference/security",title:"Security",description:"Because the Sparo tool acts as a wrapper for Git, our goal is to provide comparable security expectations as the git command.",source:"@site/docs/pages/reference/security.md",sourceDirName:"pages/reference",slug:"/pages/reference/security",permalink:"/sparo/_preview/pr-76/pages/reference/security",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/reference/security.md",tags:[],version:"current",frontMatter:{title:"Security"},sidebar:"docsSidebar",previous:{title:"Skeleton folders",permalink:"/sparo/_preview/pr-76/pages/reference/skeleton_folders"},next:{title:" .json",permalink:"/sparo/_preview/pr-76/pages/configs/profile_json"}},c={},l=[{value:"Security scenarios",id:"security-scenarios",level:2},{value:"SS1: Safely clone an untrusted repo",id:"ss1-safely-clone-an-untrusted-repo",level:3},{value:"SS2: Safely clone an untrusted repository parameter",id:"ss2-safely-clone-an-untrusted-repository-parameter",level:3},{value:"SS3: Git parameters may include special characters",id:"ss3-git-parameters-may-include-special-characters",level:3},{value:"Security assumptions",id:"security-assumptions",level:2},{value:"Assumption: Shell environment variables are trusted",id:"assumption-shell-environment-variables-are-trusted",level:2},{value:"Assumption: Command line is generally trusted",id:"assumption-command-line-is-generally-trusted",level:2},{value:"Assumption: Commands may consume excessive resources",id:"assumption-commands-may-consume-excessive-resources",level:2},{value:"Assumption: STDOUT and STDERR may contain arbitrary characters",id:"assumption-stdout-and-stderr-may-contain-arbitrary-characters",level:2}];function d(e){const s={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.p,{children:["Because the Sparo tool acts as a wrapper for Git, our goal is to provide comparable security expectations as the ",(0,r.jsx)(s.code,{children:"git"})," command."]}),"\n",(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsxs)(s.p,{children:["\u26a0\ufe0f ",(0,r.jsx)(s.strong,{children:"This is a goal not a guarantee."})," \u26a0\ufe0f"]}),"\n",(0,r.jsx)(s.p,{children:"The software is still in its early stages of development, and not all security\nrequirements have been identified or implemented yet. Efforts to improve Sparo\nsecurity should not be interpreted to contradict the terms of the MIT license:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{children:'THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'})}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"security-scenarios",children:"Security scenarios"}),"\n",(0,r.jsxs)(s.p,{children:["Git doesn't provide a formal security specification, so to facilitate analysis of Sparo contributions, we've identified usage scenarios that imply security requirements. We welcome your feedback -- please ",(0,r.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/support/contributing",children:"let us know"})," if we've overlooked an important use case or if Git does not behave as described."]}),"\n",(0,r.jsx)(s.h3,{id:"ss1-safely-clone-an-untrusted-repo",children:"SS1: Safely clone an untrusted repo"}),"\n",(0,r.jsxs)(s.p,{children:["Suppose that an unfamiliar remote Git repository contains malicious files, which includes malicious config files such as ",(0,r.jsx)(s.code,{children:".gitattributes"}),", ",(0,r.jsx)(s.code,{children:".gitignore"}),", and Git hook scripts. The following operations are expected to be safe:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:["Using ",(0,r.jsx)(s.code,{children:"git clone"})," to clone the remote repo."]}),"\n",(0,r.jsxs)(s.li,{children:["Using ",(0,r.jsx)(s.code,{children:"git checkout"})," to checkout files."]}),"\n",(0,r.jsxs)(s.li,{children:["Using ",(0,r.jsx)(s.code,{children:"git commit"})," to commit modifications of local files."]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["Git ensures safety by ignoring Git hooks and ",(0,r.jsx)(s.code,{children:".gitattributes"}),' filters by default. The user must explicitly run a command to "opt-in", signifying their trust that the repository is free from malicious code. For example, invoking ',(0,r.jsx)(s.code,{children:"rush install"})," will register predefined Git hooks, because NPM installation involves executing untrusted scripts and therefore signifies trust in the cloned repository. As another example, if ",(0,r.jsx)(s.code,{children:".gitattributes"})," references the LFS filter, the user must first opt-in by running ",(0,r.jsx)(s.code,{children:"git lfs install"}),", signifying their trust that the filter author has implemented security protections against malicious inputs for that filter."]}),"\n",(0,r.jsxs)(s.p,{children:["Sparo introduces additional config files such as ",(0,r.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/configs/profile_json",children:" .json"}),". Parsing of these config files must also treat the inputs as potentially malicious, and provide the same guarantees."]}),"\n",(0,r.jsx)(s.h3,{id:"ss2-safely-clone-an-untrusted-repository-parameter",children:"SS2: Safely clone an untrusted repository parameter"}),"\n",(0,r.jsxs)(s.p,{children:["A command such as ",(0,r.jsx)(s.code,{children:"git clone https://github.com/example/project.git"})," will write into a subfolder called ",(0,r.jsx)(s.code,{children:"project"}),". The Git documentation calls this the ",(0,r.jsx)(s.a,{href:"https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-ltdirectorygt",children:'"humanish"'})," portion of the URL."]}),"\n",(0,r.jsxs)(s.p,{children:["Consider a remote service that receives the ",(0,r.jsx)(s.code,{children:"REPOSITORY"})," parameter as a text string and then invokes ",(0,r.jsx)(s.code,{children:"git clone REPOSITORY"})," with correct shell-escaping of the parameter. In calculating the humanish folder name, Git should not incorporate special characters such as ",(0,r.jsx)(s.code,{children:".."})," or ",(0,r.jsx)(s.code,{children:"/"})," that would cause the operation to write cloned files outside of the intended folder."]}),"\n",(0,r.jsxs)(s.p,{children:["And of course, if an explicit target folder is specified using ",(0,r.jsx)(s.code,{children:"git clone https://github.com/example/project.git my-folder"}),", then no files should be cloned outside of the ",(0,r.jsx)(s.code,{children:"my-folder"})," folder."]}),"\n",(0,r.jsx)(s.h3,{id:"ss3-git-parameters-may-include-special-characters",children:"SS3: Git parameters may include special characters"}),"\n",(0,r.jsxs)(s.p,{children:["Shell interpreters commonly transform expressions involving special characters such as ",(0,r.jsx)(s.code,{children:"$"}),", ",(0,r.jsx)(s.code,{children:"%"}),", ",(0,r.jsx)(s.code,{children:"("}),", etc. For example:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:'# Problem: Bash would replace "$project" with the value of\n# the environment variable whose name is "project".\ngit clone https://github.com/example/project.git $project\n'})}),"\n",(0,r.jsx)(s.p,{children:"This requires escaping:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-shell",children:"# This backslash escape ensures that a literal dollar sign\n# is included in the created folder name:\ngit clone https://github.com/example/project.git \\$project\n"})}),"\n",(0,r.jsxs)(s.p,{children:["When the ",(0,r.jsx)(s.code,{children:"sparo"})," command-line invokes subprocesses such as ",(0,r.jsx)(s.code,{children:"git"}),", it must carefully ensure that process arguments are correctly escaped to avoid being transformed by the shell. For example, if ",(0,r.jsx)(s.code,{children:"\\$project"})," gets expanded by the shell during subprocess invocation, the escaping will be defeated, which could be exploited to circumvent the other Sparo security guarantees. If certain characters ",(0,r.jsx)(s.a,{href:"https://github.com/microsoft/rushstack/blob/e2a17c81731cadc6b39b8e75c08dfccb9bc5ce9c/libraries/node-core-library/src/Executable.ts#L689",children:"cannot be safely escaped"})," by Node.js, they should be rejected with an error message."]}),"\n",(0,r.jsx)(s.h2,{id:"security-assumptions",children:"Security assumptions"}),"\n",(0,r.jsx)(s.p,{children:"It's also useful to point out aspects that are NOT expected to be secure."}),"\n",(0,r.jsx)(s.h2,{id:"assumption-shell-environment-variables-are-trusted",children:"Assumption: Shell environment variables are trusted"}),"\n",(0,r.jsxs)(s.p,{children:["For the most part, the ",(0,r.jsx)(s.code,{children:"git"})," CLI assumes that the shell environment variables are trusted. For example, it relies on the ",(0,r.jsx)(s.code,{children:"PATH"})," variable to discover the location of the ",(0,r.jsx)(s.code,{children:"ssh"})," binary, and most of the parent process's variables are passed through to child processes."]}),"\n",(0,r.jsxs)(s.p,{children:["Because Sparo the tool is invoked by the Node.js runtime, arbitrary code execution is possible via environment variables such as ",(0,r.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#node_optionsoptions",children:"NODE_OPTIONS"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"assumption-command-line-is-generally-trusted",children:"Assumption: Command line is generally trusted"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.code,{children:"git"})," command-line accepts parameters such as ",(0,r.jsx)(s.a,{href:"https://git-scm.com/docs/git#Documentation/git.txt--cltnamegtltvaluegt",children:"-c"})," which can trigger execution of arbitrary code. Therefore in general, we assume that the command-line parameters are trusted. However, certain parameters can provide stricter guarantees, for example the ",(0,r.jsx)(s.code,{children:" "})," argument for ",(0,r.jsx)(s.code,{children:"git clone"})," mentioned in ",(0,r.jsx)(s.strong,{children:"SS3"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"assumption-commands-may-consume-excessive-resources",children:"Assumption: Commands may consume excessive resources"}),"\n",(0,r.jsxs)(s.p,{children:["Commands such as ",(0,r.jsx)(s.code,{children:"git clone"})," may consume an arbitrary amount of disk space or take arbitrarily long to complete. In general, denial-of-service attacks are not considered an important risk for this type of development tool."]}),"\n",(0,r.jsx)(s.h2,{id:"assumption-stdout-and-stderr-may-contain-arbitrary-characters",children:"Assumption: STDOUT and STDERR may contain arbitrary characters"}),"\n",(0,r.jsxs)(s.p,{children:["When invoking the ",(0,r.jsx)(s.code,{children:"git"})," CLI, the console output may include strings printed by hook scripts or other shell commands. These strings may contain special characters that are unsafe to embed in other contexts such as an HTML document or SQL string literal. It is the responsibility of the calling processes to correctly escape any STDOUT or STDERR output produced by the ",(0,r.jsx)(s.code,{children:"git"})," or ",(0,r.jsx)(s.code,{children:"sparo"})," process."]})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},4738:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var r=t(6166);const i={},n=r.createContext(i);function o(e){const s=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(n.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/206.aace8056.js b/_preview/pr-76/assets/js/206.aace8056.js new file mode 100644 index 0000000..525c231 --- /dev/null +++ b/_preview/pr-76/assets/js/206.aace8056.js @@ -0,0 +1,2 @@ +/*! For license information please see 206.aace8056.js.LICENSE.txt */ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[206],{9004:(e,t,n)=>{"use strict";e.exports=n(5661)},6385:(e,t,n)=>{"use strict";var i=n(8990),r={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",noPrefix:!1,dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};i.isMsie()&&i.mixin(r.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),i.isMsie()&&i.isMsie()<=7&&i.mixin(r.input,{marginTop:"-1px"}),e.exports=r},810:(e,t,n)=>{"use strict";var i="aaDataset",r="aaValue",s="aaDatum",o=n(8990),a=n(9635),u=n(4609),c=n(6385),l=n(3639);function h(e){var t;(e=e||{}).templates=e.templates||{},e.source||o.error("missing source"),e.name&&(t=e.name,!/^[_a-zA-Z0-9-]+$/.test(t))&&o.error("invalid dataset name: "+e.name),this.query=null,this._isEmpty=!0,this.highlight=!!e.highlight,this.name=void 0===e.name||null===e.name?o.getUniqueId():e.name,this.source=e.source,this.displayFn=function(e){return e=e||"value",o.isFunction(e)?e:t;function t(t){return t[e]}}(e.display||e.displayKey),this.debounce=e.debounce,this.cache=!1!==e.cache,this.templates=function(e,t){return{empty:e.empty&&o.templatify(e.empty),header:e.header&&o.templatify(e.header),footer:e.footer&&o.templatify(e.footer),suggestion:e.suggestion||n};function n(e){return" "+t(e)+"
"}}(e.templates,this.displayFn),this.css=o.mixin({},c,e.appendTo?c.appendTo:{}),this.cssClasses=e.cssClasses=o.mixin({},c.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||o.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var n=o.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=e.$menu&&e.$menu.find(n+"-"+this.name).length>0?a.element(e.$menu.find(n+"-"+this.name)[0]):a.element(u.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=e.$menu,this.clearCachedSuggestions()}h.extractDatasetName=function(e){return a.element(e).data(i)},h.extractValue=function(e){return a.element(e).data(r)},h.extractDatum=function(e){var t=a.element(e).data(s);return"string"==typeof t&&(t=JSON.parse(t)),t},o.mixin(h.prototype,l,{_render:function(e,t){if(this.$el){var n,c=this,l=[].slice.call(arguments,2);if(this.$el.empty(),n=t&&t.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html(function(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!0}].concat(t),c.templates.empty.apply(this,t)}.apply(this,l)).prepend(c.templates.header?h.apply(this,l):null).append(c.templates.footer?p.apply(this,l):null);else if(n)this.$el.html(function(){var e,n,l=[].slice.call(arguments,0),h=this,p=u.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return e=a.element(p).css(this.css.suggestions),n=o.map(t,d),e.append.apply(e,n),e;function d(e){var t,n=u.suggestion.replace("%PREFIX%",h.cssClasses.prefix).replace("%SUGGESTION%",h.cssClasses.suggestion);return(t=a.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(c.templates.suggestion.apply(this,[e].concat(l)))).data(i,c.name),t.data(r,c.displayFn(e)||void 0),t.data(s,JSON.stringify(e)),t.children().each((function(){a.element(this).css(h.css.suggestionChild)})),t}}.apply(this,l)).prepend(c.templates.header?h.apply(this,l):null).append(c.templates.footer?p.apply(this,l):null);else if(t&&!Array.isArray(t))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",e)}function h(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.header.apply(this,t)}function p(){var t=[].slice.call(arguments,0);return t=[{query:e,isEmpty:!n}].concat(t),c.templates.footer.apply(this,t)}},getRoot:function(){return this.$el},update:function(e){function t(t){if(!this.canceled&&e===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(e,t,n),this._render.apply(this,[e,t].concat(n))}}if(this.query=e,this.canceled=!1,this.shouldFetchFromCache(e))t.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var n=this,i=function(){n.canceled||n.source(e,t.bind(n))};if(this.debounce){clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((function(){n.debounceTimeout=null,i()}),this.debounce)}else i()}},cacheSuggestions:function(e,t,n){this.cachedQuery=e,this.cachedSuggestions=t,this.cachedRenderExtraArgs=n},shouldFetchFromCache:function(e){return this.cache&&this.cachedQuery===e&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.$el&&(this.cancel(),this.$el.empty(),this.trigger("rendered",""))},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),e.exports=h},3810:(e,t,n)=>{"use strict";var i=n(8990),r=n(9635),s=n(3639),o=n(810),a=n(6385);function u(e){var t,n,s,o=this;(e=e||{}).menu||i.error("menu is required"),i.isArray(e.datasets)||i.isObject(e.datasets)||i.error("1 or more datasets required"),e.datasets||i.error("datasets is required"),this.isOpen=!1,this.isEmpty=!0,this.minLength=e.minLength||0,this.templates={},this.appendTo=e.appendTo||!1,this.css=i.mixin({},a,e.appendTo?a.appendTo:{}),this.cssClasses=e.cssClasses=i.mixin({},a.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix||i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),t=i.bind(this._onSuggestionClick,this),n=i.bind(this._onSuggestionMouseEnter,this),s=i.bind(this._onSuggestionMouseLeave,this);var c=i.className(this.cssClasses.prefix,this.cssClasses.suggestion);this.$menu=r.element(e.menu).on("mouseenter.aa",c,n).on("mouseleave.aa",c,s).on("click.aa",c,t),this.$container=e.appendTo?e.wrapper:this.$menu,e.templates&&e.templates.header&&(this.templates.header=i.templatify(e.templates.header),this.$menu.prepend(this.templates.header())),e.templates&&e.templates.empty&&(this.templates.empty=i.templatify(e.templates.empty),this.$empty=r.element(''),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=i.map(e.datasets,(function(t){return function(e,t,n){return new u.Dataset(i.mixin({$menu:e,cssClasses:n},t))}(o.$menu,t,e.cssClasses)})),i.each(this.datasets,(function(e){var t=e.getRoot();t&&0===t.parent().length&&o.$menu.append(t),e.onSync("rendered",o._onRendered,o)})),e.templates&&e.templates.footer&&(this.templates.footer=i.templatify(e.templates.footer),this.$menu.append(this.templates.footer()));var l=this;r.element(window).resize((function(){l._redraw()}))}i.mixin(u.prototype,s,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",r.element(e.currentTarget))},_onSuggestionMouseEnter:function(e){var t=r.element(e.currentTarget);if(!t.hasClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var n=this;setTimeout((function(){n._setCursor(t,!1)}),0)}},_onSuggestionMouseLeave:function(e){if(e.relatedTarget&&r.element(e.relatedTarget).closest("."+i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return;this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(e,t){if(this.isEmpty=i.every(this.datasets,(function(e){return e.isEmpty()})),this.isEmpty)if(t.length>=this.minLength&&this.trigger("empty"),this.$empty)if(t.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(e,t){e.first().addClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",t)},_removeCursor:function(){this._getCursor().removeClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(e){var t,n,i,r;this.isOpen&&(n=this._getCursor(),t=this._getSuggestions(),this._removeCursor(),-1!==(i=((i=t.index(n)+e)+1)%(t.length+1)-1)?(i<-1&&(i=t.length-1),this._setCursor(r=t.eq(i),!0),this._ensureVisible(r)):this.trigger("cursorRemoved"))},_ensureVisible:function(e){var t,n,i,r;n=(t=e.position().top)+e.height()+parseInt(e.css("margin-top"),10)+parseInt(e.css("margin-bottom"),10),i=this.$menu.scrollTop(),r=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),t<0?this.$menu.scrollTop(i+t):r {"use strict";var i=n(8990),r=n(9635);function s(e){e&&e.el||i.error("EventBus initialized without el"),this.$el=r.element(e.el)}i.mixin(s.prototype,{trigger:function(e,t,n,r){var s=i.Event("autocomplete:"+e);return this.$el.trigger(s,[t,n,r]),s}}),e.exports=s},3639:(e,t,n)=>{"use strict";var i=n(8023),r=/\s+/;function s(e,t,n,i){var s;if(!n)return this;for(t=t.split(r),n=i?function(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}(n,i):n,this._callbacks=this._callbacks||{};s=t.shift();)this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][e].push(n);return this}function o(e,t,n){return function(){for(var i,r=0,s=e.length;!i&&r {"use strict";e.exports={wrapper:'',dropdown:'',dataset:'',suggestions:'',suggestion:''}},4906:(e,t,n)=>{"use strict";var i;i={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var r=n(8990),s=n(9635),o=n(3639);function a(e){var t,n,o,a,u,c=this;(e=e||{}).input||r.error("input is missing"),t=r.bind(this._onBlur,this),n=r.bind(this._onFocus,this),o=r.bind(this._onKeydown,this),a=r.bind(this._onInput,this),this.$hint=s.element(e.hint),this.$input=s.element(e.input).on("blur.aa",t).on("focus.aa",n).on("keydown.aa",o),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=r.noop),r.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",(function(e){i[e.which||e.keyCode]||r.defer(r.bind(c._onInput,c,e))})):this.$input.on("input.aa",a),this.query=this.$input.val(),this.$overflowHelper=(u=this.$input,s.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:u.css("font-family"),fontSize:u.css("font-size"),fontStyle:u.css("font-style"),fontVariant:u.css("font-variant"),fontWeight:u.css("font-weight"),wordSpacing:u.css("word-spacing"),letterSpacing:u.css("letter-spacing"),textIndent:u.css("text-indent"),textRendering:u.css("text-rendering"),textTransform:u.css("text-transform")}).insertAfter(u))}function u(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}a.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},r.mixin(a.prototype,o,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(e){var t=i[e.which||e.keyCode];this._managePreventDefault(t,e),t&&this._shouldTrigger(t,e)&&this.trigger(t+"Keyed",e)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(e,t){var n,i,r;switch(e){case"tab":i=this.getHint(),r=this.getInputValue(),n=i&&i!==r&&!u(t);break;case"up":case"down":n=!u(t);break;default:n=!1}n&&t.preventDefault()},_shouldTrigger:function(e,t){var n;if("tab"===e)n=!u(t);else n=!0;return n},_checkInputValue:function(){var e,t,n,i,r;e=this.getInputValue(),i=e,r=this.query,n=!(!(t=a.normalizeQuery(i)===a.normalizeQuery(r))||!this.query)&&this.query.length!==e.length,this.query=e,t?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(e){this.query=e},getInputValue:function(){return this.$input.val()},setInputValue:function(e,t){void 0===e&&(e=this.query),this.$input.val(e),t?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(e){this.$input.attr("aria-activedescendant",e)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(e){this.$hint.val(e)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var e,t,n;n=(e=this.getInputValue())!==(t=this.getHint())&&0===t.indexOf(e),""!==e&&n&&!this.hasOverflow()||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var e=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=e},isCursorAtEnd:function(){var e,t,n;return e=this.$input.val().length,t=this.$input[0].selectionStart,r.isNumber(t)?t===e:!document.selection||((n=document.selection.createRange()).moveStart("character",-e),e===n.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),e.exports=a},335:(e,t,n)=>{"use strict";var i="aaAttrs",r=n(8990),s=n(9635),o=n(9075),a=n(4906),u=n(3810),c=n(4609),l=n(6385);function h(e){var t,n;if((e=e||{}).input||r.error("missing input"),this.isActivated=!1,this.debug=!!e.debug,this.autoselect=!!e.autoselect,this.autoselectOnBlur=!!e.autoselectOnBlur,this.openOnFocus=!!e.openOnFocus,this.minLength=r.isNumber(e.minLength)?e.minLength:1,this.autoWidth=void 0===e.autoWidth||!!e.autoWidth,this.clearOnSelected=!!e.clearOnSelected,this.tabAutocomplete=void 0===e.tabAutocomplete||!!e.tabAutocomplete,e.hint=!!e.hint,e.hint&&e.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=e.css=r.mixin({},l,e.appendTo?l.appendTo:{}),this.cssClasses=e.cssClasses=r.mixin({},l.defaultClasses,e.cssClasses||{}),this.cssClasses.prefix=e.cssClasses.formattedPrefix=r.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=e.listboxId=[this.cssClasses.root,"listbox",r.getUniqueId()].join("-");var a=function(e){var t,n,o,a;t=s.element(e.input),n=s.element(c.wrapper.replace("%ROOT%",e.cssClasses.root)).css(e.css.wrapper),e.appendTo||"block"!==t.css("display")||"table"!==t.parent().css("display")||n.css("display","table-cell");var u=c.dropdown.replace("%PREFIX%",e.cssClasses.prefix).replace("%DROPDOWN_MENU%",e.cssClasses.dropdownMenu);o=s.element(u).css(e.css.dropdown).attr({role:"listbox",id:e.listboxId}),e.templates&&e.templates.dropdownMenu&&o.html(r.templatify(e.templates.dropdownMenu)());a=t.clone().css(e.css.hint).css(function(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}(t)),a.val("").addClass(r.className(e.cssClasses.prefix,e.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),a.removeData&&a.removeData();t.data(i,{"aria-autocomplete":t.attr("aria-autocomplete"),"aria-expanded":t.attr("aria-expanded"),"aria-owns":t.attr("aria-owns"),autocomplete:t.attr("autocomplete"),dir:t.attr("dir"),role:t.attr("role"),spellcheck:t.attr("spellcheck"),style:t.attr("style"),type:t.attr("type")}),t.addClass(r.className(e.cssClasses.prefix,e.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":e.datasets&&e.datasets[0]&&e.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":e.ariaLabel,"aria-owns":e.listboxId}).css(e.hint?e.css.input:e.css.inputWithNoHint);try{t.attr("dir")||t.attr("dir","auto")}catch(l){}return n=e.appendTo?n.appendTo(s.element(e.appendTo).eq(0)).eq(0):t.wrap(n).parent(),n.prepend(e.hint?a:null).append(o),{wrapper:n,input:t,hint:a,menu:o}}(e);this.$node=a.wrapper;var u=this.$input=a.input;t=a.menu,n=a.hint,e.dropdownMenuContainer&&s.element(e.dropdownMenuContainer).css("position","relative").append(t.css("top","0")),u.on("blur.aa",(function(e){var n=document.activeElement;r.isMsie()&&(t[0]===n||t[0].contains(n))&&(e.preventDefault(),e.stopImmediatePropagation(),r.defer((function(){u.focus()})))})),t.on("mousedown.aa",(function(e){e.preventDefault()})),this.eventBus=e.eventBus||new o({el:u}),this.dropdown=new h.Dropdown({appendTo:e.appendTo,wrapper:this.$node,menu:t,datasets:e.datasets,templates:e.templates,cssClasses:e.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new h.Input({input:u,hint:n}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(e),this._setLanguageDirection()}r.mixin(h.prototype,{_bindKeyboardShortcuts:function(e){if(e.keyboardShortcuts){var t=this.$input,n=[];r.each(e.keyboardShortcuts,(function(e){"string"==typeof e&&(e=e.toUpperCase().charCodeAt(0)),n.push(e)})),s.element(document).keydown((function(e){var i=e.target||e.srcElement,r=i.tagName;if(!i.isContentEditable&&"INPUT"!==r&&"SELECT"!==r&&"TEXTAREA"!==r){var s=e.which||e.keyCode;-1!==n.indexOf(s)&&(t.focus(),e.stopPropagation(),e.preventDefault())}}))}},_onSuggestionClicked:function(e,t){var n;(n=this.dropdown.getDatumForSuggestion(t))&&this._select(n,{selectionMethod:"click"})},_onCursorMoved:function(e,t){var n=this.dropdown.getDatumForCursor(),i=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(i),n&&(t&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var e=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",e.width+"px");var t=this.$node[0].getBoundingClientRect(),n=e.bottom-t.top;this.$node.css("top",n+"px");var i=e.left-t.left;this.$node.css("left",i+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var e=this.input.getQuery();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var e,t;e=this.dropdown.getDatumForCursor(),t=this.dropdown.getDatumForTopSuggestion();var n={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&e?this._select(e,n):this.autoselectOnBlur&&t?this._select(t,n):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(e,t){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion();var r={selectionMethod:"enterKey"};n?(this._select(n,r),t.preventDefault()):this.autoselect&&i&&(this._select(i,r),t.preventDefault())},_onTabKeyed:function(e,t){if(this.tabAutocomplete){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n,{selectionMethod:"tabKey"}),t.preventDefault()):this._autocomplete(!0)}else this.dropdown.close()},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var e=this.input.getQuery();this.dropdown.isEmpty&&e.length>=this.minLength?this.dropdown.update(e):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(e,t){this.input.clearHintIfInvalid(),t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var e=this.input.getLanguageDirection();this.dir!==e&&(this.dir=e,this.$node.css("direction",e),this.dropdown.setLanguageDirection(e))},_updateHint:function(){var e,t,n,i,s;(e=this.dropdown.getDatumForTopSuggestion())&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(t=this.input.getInputValue(),n=a.normalizeQuery(t),i=r.escapeRegExChars(n),(s=new RegExp("^(?:"+i+")(.+$)","i").exec(e.value))?this.input.setHint(t+s[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(e){var t,n,i,r;t=this.input.getHint(),n=this.input.getQuery(),i=e||this.input.isCursorAtEnd(),t&&n!==t&&i&&((r=this.dropdown.getDatumForTopSuggestion())&&this.input.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.raw,r.datasetName))},_select:function(e,t){void 0!==e.value&&this.input.setQuery(e.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(e.value,!0),this._setLanguageDirection(),!1===this.eventBus.trigger("selected",e.raw,e.datasetName,t).isDefaultPrevented()&&(this.dropdown.close(),r.defer(r.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var e=this.input.getInputValue();e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(e){e=r.toStr(e),this.isActivated?this.input.setInputValue(e):(this.input.setQuery(e),this.input.setInputValue(e,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),function(e,t){var n=e.find(r.className(t.prefix,t.input));r.each(n.data(i),(function(e,t){void 0===e?n.removeAttr(t):n.attr(t,e)})),n.detach().removeClass(r.className(t.prefix,t.input,!0)).insertAfter(e),n.removeData&&n.removeData(i);e.remove()}(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),h.Dropdown=u,h.Input=a,h.sources=n(5424),e.exports=h},9635:e=>{"use strict";e.exports={element:null}},2240:e=>{"use strict";e.exports=function(e){var t=e.match(/Algolia for JavaScript \((\d+\.)(\d+\.)(\d+)\)/)||e.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(t)return[t[1],t[2],t[3]]}},8990:(e,t,n)=>{"use strict";var i,r=n(9635);function s(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}e.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(e){if(void 0===e&&(e=navigator.userAgent),/(msie|trident)/i.test(e)){var t=e.match(/(msie |rv:)(\d+(.\d+)?)/i);if(t)return t[2]}return!1},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(e){return"number"==typeof e},toStr:function(e){return null==e?"":e+""},cloneDeep:function(e){var t=this.mixin({},e),n=this;return this.each(t,(function(e,i){e&&(n.isArray(e)?t[i]=[].concat(e):n.isObject(e)&&(t[i]=n.cloneDeep(e)))})),t},error:function(e){throw new Error(e)},every:function(e,t){var n=!0;return e?(this.each(e,(function(i,r){n&&(n=t.call(null,i,r,e)&&n)})),!!n):n},any:function(e,t){var n=!1;return e?(this.each(e,(function(i,r){if(t.call(null,i,r,e))return n=!0,!1})),n):n},getUniqueId:(i=0,function(){return i++}),templatify:function(e){if(this.isFunction(e))return e;var t=r.element(e);return"SCRIPT"===t.prop("tagName")?function(){return t.text()}:function(){return String(e)}},defer:function(e){setTimeout(e,0)},noop:function(){},formatPrefix:function(e,t){return t?"":e+"-"},className:function(e,t,n){return(n?"":".")+e+t},escapeHighlightedString:function(e,t,n){t=t||"";var i=document.createElement("div");i.appendChild(document.createTextNode(t)),n=n||"";var r=document.createElement("div");r.appendChild(document.createTextNode(n));var o=document.createElement("div");return o.appendChild(document.createTextNode(e)),o.innerHTML.replace(RegExp(s(i.innerHTML),"g"),t).replace(RegExp(s(r.innerHTML),"g"),n)}}},4456:(e,t,n)=>{"use strict";var i=n(8990),r=n(6832),s=n(2240);e.exports=function(e,t){var n=s(e.as._ua);return n&&n[0]>=3&&n[1]>20&&((t=t||{}).additionalUA="autocomplete.js "+r),function(n,r){e.search(n,t,(function(e,t){e?i.error(e.message):r(t.hits,t)}))}}},5424:(e,t,n)=>{"use strict";e.exports={hits:n(4456),popularIn:n(4322)}},4322:(e,t,n)=>{"use strict";var i=n(8990),r=n(6832),s=n(2240);e.exports=function(e,t,n,o){var a=s(e.as._ua);if(a&&a[0]>=3&&a[1]>20&&((t=t||{}).additionalUA="autocomplete.js "+r),!n.source)return i.error("Missing 'source' key");var u=i.isFunction(n.source)?n.source:function(e){return e[n.source]};if(!n.index)return i.error("Missing 'index' key");var c=n.index;return o=o||{},function(a,l){e.search(a,t,(function(e,a){if(e)i.error(e.message);else{if(a.hits.length>0){var h=a.hits[0],p=i.mixin({hitsPerPage:0},n);delete p.source,delete p.index;var d=s(c.as._ua);return d&&d[0]>=3&&d[1]>20&&(t.additionalUA="autocomplete.js "+r),void c.search(u(h),p,(function(e,t){if(e)i.error(e.message);else{var n=[];if(o.includeAll){var r=o.allTitle||"All departments";n.push(i.mixin({facet:{value:r,count:t.nbHits}},i.cloneDeep(h)))}i.each(t.facets,(function(e,t){i.each(e,(function(e,r){n.push(i.mixin({facet:{facet:t,value:r,count:e}},i.cloneDeep(h)))}))}));for(var s=1;s{"use strict";var i=n(7766);n(9635).element=i;var r=n(8990);r.isArray=i.isArray,r.isFunction=i.isFunction,r.isObject=i.isPlainObject,r.bind=i.proxy,r.each=function(e,t){i.each(e,(function(e,n){return t(n,e)}))},r.map=i.map,r.mixin=i.extend,r.Event=i.Event;var s="aaAutocomplete",o=n(335),a=n(9075);function u(e,t,n,u){n=r.isArray(n)?n:[].slice.call(arguments,2);var c=i(e).each((function(e,r){var c=i(r),l=new a({el:c}),h=u||new o({input:c,eventBus:l,dropdownMenuContainer:t.dropdownMenuContainer,hint:void 0===t.hint||!!t.hint,minLength:t.minLength,autoselect:t.autoselect,autoselectOnBlur:t.autoselectOnBlur,tabAutocomplete:t.tabAutocomplete,openOnFocus:t.openOnFocus,templates:t.templates,debug:t.debug,clearOnSelected:t.clearOnSelected,cssClasses:t.cssClasses,datasets:n,keyboardShortcuts:t.keyboardShortcuts,appendTo:t.appendTo,autoWidth:t.autoWidth,ariaLabel:t.ariaLabel||r.getAttribute("aria-label")});c.data(s,h)}));return c.autocomplete={},r.each(["open","close","getVal","setVal","destroy","getWrapper"],(function(e){c.autocomplete[e]=function(){var t,n=arguments;return c.each((function(r,o){var a=i(o).data(s);t=a[e].apply(a,n)})),t}})),c}u.sources=o.sources,u.escapeHighlightedString=r.escapeHighlightedString;var c="autocomplete"in window,l=window.autocomplete;u.noConflict=function(){return c?window.autocomplete=l:delete window.autocomplete,u},e.exports=u},6832:e=>{e.exports="0.37.1"},7766:e=>{var t;t=window,e.exports=function(e){var t,n,i=function(){var t,n,i,r,s,o,a=[],u=a.concat,c=a.filter,l=a.slice,h=e.document,p={},d={},f={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},g=/^\s*<(\w+|!)[^>]*>/,m=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,v=/^(?:body|html)$/i,x=/([A-Z])/g,b=["val","css","html","text","data","width","height","offset"],w=["after","prepend","before","append"],S=h.createElement("table"),C=h.createElement("tr"),E={tr:h.createElement("tbody"),tbody:S,thead:S,tfoot:S,td:C,th:C,"*":h.createElement("div")},k=/complete|loaded|interactive/,_=/^[\w-]*$/,T={},L=T.toString,O={},A=h.createElement("div"),$={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},P=Array.isArray||function(e){return e instanceof Array};function I(e){return null==e?String(e):T[L.call(e)]||"object"}function Q(e){return"function"==I(e)}function R(e){return null!=e&&e==e.window}function N(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function D(e){return"object"==I(e)}function F(e){return D(e)&&!R(e)&&Object.getPrototypeOf(e)==Object.prototype}function j(e){var t=!!e&&"length"in e&&e.length,n=i.type(e);return"function"!=n&&!R(e)&&("array"==n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function H(e){return c.call(e,(function(e){return null!=e}))}function V(e){return e.length>0?i.fn.concat.apply([],e):e}function B(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function M(e){return e in d?d[e]:d[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function q(e,t){return"number"!=typeof t||f[B(e)]?t:t+"px"}function z(e){var t,n;return p[e]||(t=h.createElement(e),h.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),p[e]=n),p[e]}function K(e){return"children"in e?l.call(e.children):i.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function W(e,t){var n,i=e?e.length:0;for(n=0;n$2>")),n===t&&(n=g.test(e)&&RegExp.$1),n in E||(n="*"),(a=E[n]).innerHTML=""+e,s=i.each(l.call(a.childNodes),(function(){a.removeChild(this)}))),F(r)&&(o=i(s),i.each(r,(function(e,t){b.indexOf(e)>-1?o[e](t):o.attr(e,t)}))),s},O.Z=function(e,t){return new W(e,t)},O.isZ=function(e){return e instanceof O.Z},O.init=function(e,n){var r;if(!e)return O.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&g.test(e))r=O.fragment(e,RegExp.$1,n),e=null;else{if(n!==t)return i(n).find(e);r=O.qsa(h,e)}else{if(Q(e))return i(h).ready(e);if(O.isZ(e))return e;if(P(e))r=H(e);else if(D(e))r=[e],e=null;else if(g.test(e))r=O.fragment(e.trim(),RegExp.$1,n),e=null;else{if(n!==t)return i(n).find(e);r=O.qsa(h,e)}}return O.Z(r,e)},(i=function(e,t){return O.init(e,t)}).extend=function(e){var t,n=l.call(arguments,1);return"boolean"==typeof e&&(t=e,e=n.shift()),n.forEach((function(n){U(e,n,t)})),e},O.qsa=function(e,t){var n,i="#"==t[0],r=!i&&"."==t[0],s=i||r?t.slice(1):t,o=_.test(s);return e.getElementById&&o&&i?(n=e.getElementById(s))?[n]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:l.call(o&&!i&&e.getElementsByClassName?r?e.getElementsByClassName(s):e.getElementsByTagName(t):e.querySelectorAll(t))},i.contains=h.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},i.type=I,i.isFunction=Q,i.isWindow=R,i.isArray=P,i.isPlainObject=F,i.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},i.isNumeric=function(e){var t=Number(e),n=typeof e;return null!=e&&"boolean"!=n&&("string"!=n||e.length)&&!isNaN(t)&&isFinite(t)||!1},i.inArray=function(e,t,n){return a.indexOf.call(t,e,n)},i.camelCase=s,i.trim=function(e){return null==e?"":String.prototype.trim.call(e)},i.uuid=0,i.support={},i.expr={},i.noop=function(){},i.map=function(e,t){var n,i,r,s=[];if(j(e))for(i=0;i =0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return a.every.call(this,(function(t,n){return!1!==e.call(t,n,t)})),this},filter:function(e){return Q(e)?this.not(this.not(e)):i(c.call(this,(function(t){return O.matches(t,e)})))},add:function(e,t){return i(o(this.concat(i(e,t))))},is:function(e){return this.length>0&&O.matches(this[0],e)},not:function(e){var n=[];if(Q(e)&&e.call!==t)this.each((function(t){e.call(this,t)||n.push(this)}));else{var r="string"==typeof e?this.filter(e):j(e)&&Q(e.item)?l.call(e):i(e);this.forEach((function(e){r.indexOf(e)<0&&n.push(e)}))}return i(n)},has:function(e){return this.filter((function(){return D(e)?i.contains(this,e):i(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!D(e)?e:i(e)},last:function(){var e=this[this.length-1];return e&&!D(e)?e:i(e)},find:function(e){var t=this;return e?"object"==typeof e?i(e).filter((function(){var e=this;return a.some.call(t,(function(t){return i.contains(t,e)}))})):1==this.length?i(O.qsa(this[0],e)):this.map((function(){return O.qsa(this,e)})):i()},closest:function(e,t){var n=[],r="object"==typeof e&&i(e);return this.each((function(i,s){for(;s&&!(r?r.indexOf(s)>=0:O.matches(s,e));)s=s!==t&&!N(s)&&s.parentNode;s&&n.indexOf(s)<0&&n.push(s)})),i(n)},parents:function(e){for(var t=[],n=this;n.length>0;)n=i.map(n,(function(e){if((e=e.parentNode)&&!N(e)&&t.indexOf(e)<0)return t.push(e),e}));return G(t,e)},parent:function(e){return G(o(this.pluck("parentNode")),e)},children:function(e){return G(this.map((function(){return K(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||l.call(this.childNodes)}))},siblings:function(e){return G(this.map((function(e,t){return c.call(K(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return i.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=z(this.nodeName))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var t=Q(e);if(this[0]&&!t)var n=i(e).get(0),r=n.parentNode||this.length>1;return this.each((function(s){i(this).wrapAll(t?e.call(this,s):r?n.cloneNode(!0):n)}))},wrapAll:function(e){if(this[0]){var t;for(i(this[0]).before(e=i(e));(t=e.children()).length;)e=t.first();i(e).append(this)}return this},wrapInner:function(e){var t=Q(e);return this.each((function(n){var r=i(this),s=r.contents(),o=t?e.call(this,n):e;s.length?s.wrapAll(o):r.append(o)}))},unwrap:function(){return this.parent().each((function(){i(this).replaceWith(i(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var n=i(this);(e===t?"none"==n.css("display"):e)?n.show():n.hide()}))},prev:function(e){return i(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return i(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(t){var n=this.innerHTML;i(this).empty().append(Z(this,e,t,n))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var n=Z(this,e,t,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(e,i){var r;return"string"!=typeof e||1 in arguments?this.each((function(t){if(1===this.nodeType)if(D(e))for(n in e)J(this,n,e[n]);else J(this,e,Z(this,i,t,this.getAttribute(e)))})):0 in this&&1==this[0].nodeType&&null!=(r=this[0].getAttribute(e))?r:t},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){J(this,e)}),this)}))},prop:function(e,t){return e=$[e]||e,1 in arguments?this.each((function(n){this[e]=Z(this,t,n,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=$[e]||e,this.each((function(){delete this[e]}))},data:function(e,n){var i="data-"+e.replace(x,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,n):this.attr(i);return null!==r?Y(r):t},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=Z(this,e,t,this.value)}))):this[0]&&(this[0].multiple?i(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each((function(e){var n=i(this),r=Z(this,t,e,n.offset()),s=n.offsetParent().offset(),o={top:r.top-s.top,left:r.left-s.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)}));if(!this.length)return null;if(h.documentElement!==this[0]&&!i.contains(h.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+e.pageXOffset,top:n.top+e.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(e,t){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[s(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(P(e)){if(!r)return;var o={},a=getComputedStyle(r,"");return i.each(e,(function(e,t){o[t]=r.style[s(t)]||a.getPropertyValue(t)})),o}}var u="";if("string"==I(e))t||0===t?u=B(e)+":"+q(e,t):this.each((function(){this.style.removeProperty(B(e))}));else for(n in e)e[n]||0===e[n]?u+=B(n)+":"+q(n,e[n])+";":this.each((function(){this.style.removeProperty(B(n))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(e){return e?this.indexOf(i(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&a.some.call(this,(function(e){return this.test(X(e))}),M(e))},addClass:function(e){return e?this.each((function(t){if("className"in this){r=[];var n=X(this);Z(this,e,t,n).split(/\s+/g).forEach((function(e){i(this).hasClass(e)||r.push(e)}),this),r.length&&X(this,n+(n?" ":"")+r.join(" "))}})):this},removeClass:function(e){return this.each((function(n){if("className"in this){if(e===t)return X(this,"");r=X(this),Z(this,e,n,r).split(/\s+/g).forEach((function(e){r=r.replace(M(e)," ")})),X(this,r.trim())}}))},toggleClass:function(e,n){return e?this.each((function(r){var s=i(this);Z(this,e,r,X(this)).split(/\s+/g).forEach((function(e){(n===t?!s.hasClass(e):n)?s.addClass(e):s.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var n="scrollTop"in this[0];return e===t?n?this[0].scrollTop:this[0].pageYOffset:this.each(n?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var n="scrollLeft"in this[0];return e===t?n?this[0].scrollLeft:this[0].pageXOffset:this.each(n?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),n=this.offset(),r=v.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(i(e).css("margin-top"))||0,n.left-=parseFloat(i(e).css("margin-left"))||0,r.top+=parseFloat(i(t[0]).css("border-top-width"))||0,r.left+=parseFloat(i(t[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||h.body;e&&!v.test(e.nodeName)&&"static"==i(e).css("position");)e=e.offsetParent;return e}))}},i.fn.detach=i.fn.remove,["width","height"].forEach((function(e){var n=e.replace(/./,(function(e){return e[0].toUpperCase()}));i.fn[e]=function(r){var s,o=this[0];return r===t?R(o)?o["inner"+n]:N(o)?o.documentElement["scroll"+n]:(s=this.offset())&&s[e]:this.each((function(t){(o=i(this)).css(e,Z(this,r,t,o[e]()))}))}})),w.forEach((function(n,r){var s=r%2;i.fn[n]=function(){var n,o,a=i.map(arguments,(function(e){var r=[];return"array"==(n=I(e))?(e.forEach((function(e){return e.nodeType!==t?r.push(e):i.zepto.isZ(e)?r=r.concat(e.get()):void(r=r.concat(O.fragment(e)))})),r):"object"==n||null==e?e:O.fragment(e)})),u=this.length>1;return a.length<1?this:this.each((function(t,n){o=s?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var c=i.contains(h.documentElement,o);a.forEach((function(t){if(u)t=t.cloneNode(!0);else if(!o)return i(t).remove();o.insertBefore(t,n),c&&ee(t,(function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var n=t.ownerDocument?t.ownerDocument.defaultView:e;n.eval.call(n,t.innerHTML)}}))}))}))},i.fn[s?n+"To":"insert"+(r?"Before":"After")]=function(e){return i(e)[n](this),this}})),O.Z.prototype=W.prototype=i.fn,O.uniq=o,O.deserializeValue=Y,i.zepto=O,i}();return function(t){var n,i=1,r=Array.prototype.slice,s=t.isFunction,o=function(e){return"string"==typeof e},a={},u={},c="onfocusin"in e,l={focus:"focusin",blur:"focusout"},h={mouseenter:"mouseover",mouseleave:"mouseout"};function p(e){return e._zid||(e._zid=i++)}function d(e,t,n,i){if((t=f(t)).ns)var r=g(t.ns);return(a[p(e)]||[]).filter((function(e){return e&&(!t.e||e.e==t.e)&&(!t.ns||r.test(e.ns))&&(!n||p(e.fn)===p(n))&&(!i||e.sel==i)}))}function f(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function g(e){return new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)")}function m(e,t){return e.del&&!c&&e.e in l||!!t}function y(e){return h[e]||c&&l[e]||e}function v(e,i,r,s,o,u,c){var l=p(e),d=a[l]||(a[l]=[]);i.split(/\s/).forEach((function(i){if("ready"==i)return t(document).ready(r);var a=f(i);a.fn=r,a.sel=o,a.e in h&&(r=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return a.fn.apply(this,arguments)}),a.del=u;var l=u||r;a.proxy=function(t){if(!(t=E(t)).isImmediatePropagationStopped()){try{var i=Object.getOwnPropertyDescriptor(t,"data");i&&!i.writable||(t.data=s)}catch(t){}var r=l.apply(e,t._args==n?[t]:[t].concat(t._args));return!1===r&&(t.preventDefault(),t.stopPropagation()),r}},a.i=d.length,d.push(a),"addEventListener"in e&&e.addEventListener(y(a.e),a.proxy,m(a,c))}))}function x(e,t,n,i,r){var s=p(e);(t||"").split(/\s/).forEach((function(t){d(e,t,n,i).forEach((function(t){delete a[s][t.i],"removeEventListener"in e&&e.removeEventListener(y(t.e),t.proxy,m(t,r))}))}))}u.click=u.mousedown=u.mouseup=u.mousemove="MouseEvents",t.event={add:v,remove:x},t.proxy=function(e,n){var i=2 in arguments&&r.call(arguments,2);if(s(e)){var a=function(){return e.apply(n,i?i.concat(r.call(arguments)):arguments)};return a._zid=p(e),a}if(o(n))return i?(i.unshift(e[n],e),t.proxy.apply(null,i)):t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(e,t,n){return this.on(e,t,n)},t.fn.unbind=function(e,t){return this.off(e,t)},t.fn.one=function(e,t,n,i){return this.on(e,t,n,i,1)};var b=function(){return!0},w=function(){return!1},S=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,C={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function E(e,i){if(i||!e.isDefaultPrevented){i||(i=e),t.each(C,(function(t,n){var r=i[t];e[t]=function(){return this[n]=b,r&&r.apply(i,arguments)},e[n]=w}));try{e.timeStamp||(e.timeStamp=Date.now())}catch(r){}(i.defaultPrevented!==n?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(e.isDefaultPrevented=b)}return e}function k(e){var t,i={originalEvent:e};for(t in e)S.test(t)||e[t]===n||(i[t]=e[t]);return E(i,e)}t.fn.delegate=function(e,t,n){return this.on(t,e,n)},t.fn.undelegate=function(e,t,n){return this.off(t,e,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,i,a,u,c){var l,h,p=this;return e&&!o(e)?(t.each(e,(function(e,t){p.on(e,i,a,t,c)})),p):(o(i)||s(u)||!1===u||(u=a,a=i,i=n),u!==n&&!1!==a||(u=a,a=n),!1===u&&(u=w),p.each((function(n,s){c&&(l=function(e){return x(s,e.type,u),u.apply(this,arguments)}),i&&(h=function(e){var n,o=t(e.target).closest(i,s).get(0);if(o&&o!==s)return n=t.extend(k(e),{currentTarget:o,liveFired:s}),(l||u).apply(o,[n].concat(r.call(arguments,1)))}),v(s,e,u,a,i,h||l)})))},t.fn.off=function(e,i,r){var a=this;return e&&!o(e)?(t.each(e,(function(e,t){a.off(e,i,t)})),a):(o(i)||s(r)||!1===r||(r=i,i=n),!1===r&&(r=w),a.each((function(){x(this,e,r,i)})))},t.fn.trigger=function(e,n){return(e=o(e)||t.isPlainObject(e)?t.Event(e):E(e))._args=n,this.each((function(){e.type in l&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)}))},t.fn.triggerHandler=function(e,n){var i,r;return this.each((function(s,a){(i=k(o(e)?t.Event(e):e))._args=n,i.target=a,t.each(d(a,e.type||e),(function(e,t){if(r=t.proxy(i),i.isImmediatePropagationStopped())return!1}))})),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}})),t.Event=function(e,t){o(e)||(e=(t=e).type);var n=document.createEvent(u[e]||"Events"),i=!0;if(t)for(var r in t)"bubbles"==r?i=!!t[r]:n[r]=t[r];return n.initEvent(e,i,!0),E(n)}}(i),n=[],i.fn.remove=function(){return this.each((function(){this.parentNode&&("IMG"===this.tagName&&(n.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",t&&clearTimeout(t),t=setTimeout((function(){n=[]}),6e4)),this.parentNode.removeChild(this))}))},function(e){var t={},n=e.fn.data,i=e.camelCase,r=e.expando="Zepto"+ +new Date,s=[];function o(s,o){var u=s[r],c=u&&t[u];if(void 0===o)return c||a(s);if(c){if(o in c)return c[o];var l=i(o);if(l in c)return c[l]}return n.call(e(s),o)}function a(n,s,o){var a=n[r]||(n[r]=++e.uuid),c=t[a]||(t[a]=u(n));return void 0!==s&&(c[i(s)]=o),c}function u(t){var n={};return e.each(t.attributes||s,(function(t,r){0==r.name.indexOf("data-")&&(n[i(r.name.replace("data-",""))]=e.zepto.deserializeValue(r.value))})),n}e.fn.data=function(t,n){return void 0===n?e.isPlainObject(t)?this.each((function(n,i){e.each(t,(function(e,t){a(i,e,t)}))})):0 in this?o(this[0],t):void 0:this.each((function(){a(this,t,n)}))},e.data=function(t,n,i){return e(t).data(n,i)},e.hasData=function(n){var i=n[r],s=i&&t[i];return!!s&&!e.isEmptyObject(s)},e.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var s=this[r],o=s&&t[s];o&&e.each(n||o,(function(e){delete o[n?i(this):e]}))}))},["remove","empty"].forEach((function(t){var n=e.fn[t];e.fn[t]=function(){var e=this.find("*");return"remove"===t&&(e=e.add(this)),e.removeData(),n.call(this)}}))}(i),i}(t)},5461:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>m});var i=n(951),r=n.n(i),s=n(2293);s.A.tokenizer.separator=/[\s\-/]+/;const o=class{constructor(e,t,n,i){void 0===n&&(n="/"),this.searchDocs=e,this.lunrIndex=s.A.Index.load(t),this.baseUrl=n,this.maxHits=i}getLunrResult(e){return this.lunrIndex.query((function(t){const n=s.A.tokenizer(e);t.term(n,{boost:10}),t.term(n,{wildcard:s.A.Query.wildcard.TRAILING})}))}getHit(e,t,n){return{hierarchy:{lvl0:e.pageTitle||e.title,lvl1:0===e.type?null:e.title},url:e.url,version:e.version,_snippetResult:n?{content:{value:n,matchLevel:"full"}}:null,_highlightResult:{hierarchy:{lvl0:{value:0===e.type?t||e.title:e.pageTitle},lvl1:0===e.type?null:{value:t||e.title}}}}}getTitleHit(e,t,n){const i=t[0],r=t[0]+n;let s=e.title.substring(0,i)+''+e.title.substring(i,r)+""+e.title.substring(r,e.title.length);return this.getHit(e,s)}getKeywordHit(e,t,n){const i=t[0],r=t[0]+n;let s=e.title+"
Keywords: "+e.keywords.substring(0,i)+''+e.keywords.substring(i,r)+""+e.keywords.substring(r,e.keywords.length)+"";return this.getHit(e,s)}getContentHit(e,t){const n=t[0],i=t[0]+t[1];let r=n,s=i,o=!0,a=!0;for(let c=0;c<3;c++){const t=e.content.lastIndexOf(" ",r-2),n=e.content.lastIndexOf(".",r-2);if(n>0&&n>t){r=n+1,o=!1;break}if(t<0){r=0,o=!1;break}r=t+1}for(let c=0;c<10;c++){const t=e.content.indexOf(" ",s+1),n=e.content.indexOf(".",s+1);if(n>0&&n'+e.content.substring(n,i)+"",u+=e.content.substring(i,s),a&&(u+=" ..."),this.getHit(e,null,u)}search(e){return new Promise(((t,n)=>{const i=this.getLunrResult(e),r=[];i.length>this.maxHits&&(i.length=this.maxHits),this.titleHitsRes=[],this.contentHitsRes=[],i.forEach((t=>{const n=this.searchDocs[t.ref],{metadata:i}=t.matchData;for(let s in i)if(i[s].title){if(!this.titleHitsRes.includes(t.ref)){const o=i[s].title.position[0];r.push(this.getTitleHit(n,o,e.length)),this.titleHitsRes.push(t.ref)}}else if(i[s].content){const e=i[s].content.position[0];r.push(this.getContentHit(n,e))}else if(i[s].keywords){const o=i[s].keywords.position[0];r.push(this.getKeywordHit(n,o,e.length)),this.titleHitsRes.push(t.ref)}})),r.length>this.maxHits&&(r.length=this.maxHits),t(r)}))}};var a=n(9004),u=n.n(a);const c="algolia-docsearch",l=`${c}-suggestion`,h={suggestion:`\n \n \n {{{category}}}\n\n\n\n \n `,suggestionSimple:`\n\n {{{subcategory}}}\n\n {{#isTextOrSubcategoryNonEmpty}}\n\n\n {{/isTextOrSubcategoryNonEmpty}}\n{{{subcategory}}}\n{{{title}}}\n {{#text}}{{{text}}}{{/text}}\n {{#version}}{{version}}{{/version}}\n\n\n `,footer:`\n \n `,empty:`\n\n {{^isLvl0}}\n {{{category}}}\n {{^isLvl1}}\n {{^isLvl1EmptyOrDuplicate}}\n \n {{{subcategory}}}\n \n {{/isLvl1EmptyOrDuplicate}}\n {{/isLvl1}}\n {{/isLvl0}}\n\n\n {{#isLvl2}}\n {{{title}}}\n {{/isLvl2}}\n {{#isLvl1}}\n {{{subcategory}}}\n {{/isLvl1}}\n {{#isLvl0}}\n {{{category}}}\n {{/isLvl0}}\n\n\n {{#text}}\n\n\n\n {{/text}}\n{{{text}}}\n\n\n `,searchBox:'\n \n\n \n '};var p=n(7766),d=n.n(p);const f={mergeKeyWithParent(e,t){if(void 0===e[t])return e;if("object"!=typeof e[t])return e;const n=d().extend({},e,e[t]);return delete n[t],n},groupBy(e,t){const n={};return d().each(e,((e,i)=>{if(void 0===i[t])throw new Error(`[groupBy]: Object has no key ${t}`);let r=i[t];"string"==typeof r&&(r=r.toLowerCase()),Object.prototype.hasOwnProperty.call(n,r)||(n[r]=[]),n[r].push(i)})),n},values:e=>Object.keys(e).map((t=>e[t])),flatten(e){const t=[];return e.forEach((e=>{Array.isArray(e)?e.forEach((e=>{t.push(e)})):t.push(e)})),t},flattenAndFlagFirst(e,t){const n=this.values(e).map((e=>e.map(((e,n)=>(e[t]=0===n,e)))));return this.flatten(n)},compact(e){const t=[];return e.forEach((e=>{e&&t.push(e)})),t},getHighlightedValue:(e,t)=>e._highlightResult&&e._highlightResult.hierarchy_camel&&e._highlightResult.hierarchy_camel[t]&&e._highlightResult.hierarchy_camel[t].matchLevel&&"none"!==e._highlightResult.hierarchy_camel[t].matchLevel&&e._highlightResult.hierarchy_camel[t].value?e._highlightResult.hierarchy_camel[t].value:e._highlightResult&&e._highlightResult&&e._highlightResult[t]&&e._highlightResult[t].value?e._highlightResult[t].value:e[t],getSnippetedValue(e,t){if(!e._snippetResult||!e._snippetResult[t]||!e._snippetResult[t].value)return e[t];let n=e._snippetResult[t].value;return n[0]!==n[0].toUpperCase()&&(n=`\u2026${n}`),-1===[".","!","?"].indexOf(n[n.length-1])&&(n=`${n}\u2026`),n},deepClone:e=>JSON.parse(JSON.stringify(e))};class g{constructor(e){let{searchDocs:t,searchIndex:n,inputSelector:i,debug:r=!1,baseUrl:s="/",queryDataCallback:a=null,autocompleteOptions:c={debug:!1,hint:!1,autoselect:!0},transformData:l=!1,queryHook:p=!1,handleSelected:f=!1,enhancedSearchInput:m=!1,layout:y="column",maxHits:v=5}=e;this.input=g.getInputFromSelector(i),this.queryDataCallback=a||null;const x=!(!c||!c.debug)&&c.debug;c.debug=r||x,this.autocompleteOptions=c,this.autocompleteOptions.cssClasses=this.autocompleteOptions.cssClasses||{},this.autocompleteOptions.cssClasses.prefix=this.autocompleteOptions.cssClasses.prefix||"ds";const b=this.input&&"function"==typeof this.input.attr&&this.input.attr("aria-label");this.autocompleteOptions.ariaLabel=this.autocompleteOptions.ariaLabel||b||"search input",this.isSimpleLayout="simple"===y,this.client=new o(t,n,s,v),m&&(this.input=g.injectSearchBox(this.input)),this.autocomplete=u()(this.input,c,[{source:this.getAutocompleteSource(l,p),templates:{suggestion:g.getSuggestionTemplate(this.isSimpleLayout),footer:h.footer,empty:g.getEmptyTemplate()}}]);const w=f;this.handleSelected=w||this.handleSelected,w&&d()(".algolia-autocomplete").on("click",".ds-suggestions a",(e=>{e.preventDefault()})),this.autocomplete.on("autocomplete:selected",this.handleSelected.bind(null,this.autocomplete.autocomplete)),this.autocomplete.on("autocomplete:shown",this.handleShown.bind(null,this.input)),m&&g.bindSearchBoxEvent(),document.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&"k"==e.key&&(this.input.focus(),e.preventDefault())}))}static injectSearchBox(e){e.before(h.searchBox);const t=e.prev().prev().find("input");return e.remove(),t}static bindSearchBoxEvent(){d()('.searchbox [type="reset"]').on("click",(function(){d()("input#docsearch").focus(),d()(this).addClass("hide"),u().autocomplete.setVal("")})),d()("input#docsearch").on("keyup",(()=>{const e=document.querySelector("input#docsearch"),t=document.querySelector('.searchbox [type="reset"]');t.className="searchbox__reset",0===e.value.length&&(t.className+=" hide")}))}static getInputFromSelector(e){const t=d()(e).filter("input");return t.length?d()(t[0]):null}getAutocompleteSource(e,t){return(n,i)=>{t&&(n=t(n)||n),this.client.search(n).then((t=>{this.queryDataCallback&&"function"==typeof this.queryDataCallback&&this.queryDataCallback(t),e&&(t=e(t)||t),i(g.formatHits(t))}))}}static formatHits(e){const t=f.deepClone(e).map((e=>(e._highlightResult&&(e._highlightResult=f.mergeKeyWithParent(e._highlightResult,"hierarchy")),f.mergeKeyWithParent(e,"hierarchy"))));let n=f.groupBy(t,"lvl0");return d().each(n,((e,t)=>{const i=f.groupBy(t,"lvl1"),r=f.flattenAndFlagFirst(i,"isSubCategoryHeader");n[e]=r})),n=f.flattenAndFlagFirst(n,"isCategoryHeader"),n.map((e=>{const t=g.formatURL(e),n=f.getHighlightedValue(e,"lvl0"),i=f.getHighlightedValue(e,"lvl1")||n,r=f.compact([f.getHighlightedValue(e,"lvl2")||i,f.getHighlightedValue(e,"lvl3"),f.getHighlightedValue(e,"lvl4"),f.getHighlightedValue(e,"lvl5"),f.getHighlightedValue(e,"lvl6")]).join(' '),s=f.getSnippetedValue(e,"content"),o=i&&""!==i||r&&""!==r,a=!i||""===i||i===n,u=r&&""!==r&&r!==i,c=!u&&i&&""!==i&&i!==n,l=!c&&!u,h=e.version;return{isLvl0:l,isLvl1:c,isLvl2:u,isLvl1EmptyOrDuplicate:a,isCategoryHeader:e.isCategoryHeader,isSubCategoryHeader:e.isSubCategoryHeader,isTextOrSubcategoryNonEmpty:o,category:n,subcategory:i,title:r,text:s,url:t,version:h}}))}static formatURL(e){const{url:t,anchor:n}=e;if(t){return-1!==t.indexOf("#")?t:n?`${e.url}#${e.anchor}`:t}return n?`#${e.anchor}`:(console.warn("no anchor nor url for : ",JSON.stringify(e)),null)}static getEmptyTemplate(){return e=>r().compile(h.empty).render(e)}static getSuggestionTemplate(e){const t=e?h.suggestionSimple:h.suggestion,n=r().compile(t);return e=>n.render(e)}handleSelected(e,t,n,i,r){void 0===r&&(r={}),"click"!==r.selectionMethod&&(e.setVal(""),window.location.assign(n.url))}handleShown(e){const t=e.offset().left+e.width()/2;let n=d()(document).width()/2;isNaN(n)&&(n=900);const i=t-n>=0?"algolia-autocomplete-right":"algolia-autocomplete-left",r=t-n<0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=d()(".algolia-autocomplete");s.hasClass(i)||s.addClass(i),s.hasClass(r)&&s.removeClass(r)}}const m=g},8077:(e,t)=>{!function(e){var t=/\S/,n=/\"/g,i=/\n/g,r=/\r/g,s=/\\/g,o=/\u2028/,a=/\u2029/;function u(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function c(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function l(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var i=1,r=e.length;i\n\n\n\n\n\n\n No results found for query "{{query}}"\n\n":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,i){var r=n.length,s=0,o=null,a=null,h="",p=[],d=!1,f=0,g=0,m="{{",y="}}";function v(){h.length>0&&(p.push({tag:"_t",text:new String(h)}),h="")}function x(n,i){if(v(),n&&function(){for(var n=!0,i=g;i "==r.tag&&(r.indent=p[s].text.toString()),p.splice(s,1));else i||p.push({tag:"\n"});d=!1,g=p.length}function b(e,t){var n="="+y,i=e.indexOf(n,t),r=c(e.substring(e.indexOf("=",t)+1,i)).split(" ");return m=r[0],y=r[r.length-1],i+n.length-1}for(i&&(i=i.split(" "),m=i[0],y=i[1]),f=0;f 0;){if(u=t.shift(),s&&"<"==s.tag&&!(u.tag in h))throw new Error("Illegal content in < super tag.");if(e.tags[u.tag]<=e.tags.$||d(u,r))i.push(u),u.nodes=p(t,u.tag,i,r);else{if("/"==u.tag){if(0===i.length)throw new Error("Closing tag without opener: /"+u.n);if(a=i.pop(),u.n!=a.n&&!f(u.n,a.n,r))throw new Error("Nesting error: "+a.n+" vs. "+u.n);return a.end=u.i,o}"\n"==u.tag&&(u.last=0==t.length||"\n"==t[0].tag)}o.push(u)}if(i.length>0)throw new Error("missing closing tag: "+i.pop().n);return o}function d(e,t){for(var n=0,i=t.length;n":x,"<":function(t,n){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,i);var r=n.partials[x(t,n)];r.subs=i.subs,r.partials=i.partials},$:function(t,n){var i={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,i),n.subs[t.n]=i.code,n.inPartial||(n.code+='t.sub("'+y(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+y(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+y(e.text)+'"')},"{":b,"&":b},e.walk=function(t,n){for(var i,r=0,s=t.length;r {var i=n(8077);i.Template=n(8390).Template,i.template=i.Template,e.exports=i},8390:(e,t)=>{!function(e){function t(e,t,n){var i;return t&&"object"==typeof t&&(void 0!==t[e]?i=t[e]:n&&t.get&&"function"==typeof t.get&&(i=t.get(e))),i}e.Template=function(e,t,n,i){e=e||{},this.r=e.code||this.r,this.c=n,this.options=i||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=u(e),a.test(e)?e.replace(n,"&").replace(i,"<").replace(r,">").replace(s,"'").replace(o,"""):e},t:u,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],i=t[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=function(e,t,n,i,r,s){function o(){}function a(){}var u;o.prototype=e,a.prototype=e.subs;var c=new o;for(u in c.subs=new a,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=s,t)i[u]||(i[u]=t[u]);for(u in i)c.subs[u]=i[u];for(u in r=r||{},c.stackPartials=r,n)r[u]||(r[u]=n[u]);for(u in r)c.partials[u]=r[u];return c}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,i){var r=this.ep(e,n);return r?r.ri(t,n,i):""},rs:function(e,t,n){var i=e[e.length-1];if(c(i))for(var r=0;r=0;u--)if(void 0!==(s=t(e,n[u],a))){o=!0;break}return o?(r||"function"!=typeof s||(s=this.mv(s,n,i)),s):!r&&""},ls:function(e,t,n,i,r){var s=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(u(e.call(t,i)),t,n)),this.options.delimiters=s,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,i,r,s,o){var a,u=t[t.length-1],c=e.call(u);return"function"==typeof c?!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,a.substring(r,s),o)):c},mv:function(e,t,n){var i=t[t.length-1],r=e.call(i);return"function"==typeof r?this.ct(u(r.call(i)),i,n):r},sub:function(e,t,n,i){var r=this.subs[e];r&&(this.activeSub=e,r(t,n,this,i),this.activeSub=!1)}};var n=/&/g,i=//g,s=/\'/g,o=/\"/g,a=/[&<>\"\']/;function u(e){return String(null==e?"":e)}var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},8023:(e,t,n)=>{"use strict";var i,r,s,o=[n(6156),n(5143),n(5976),n(8613),n(8322),n(2860)],a=-1,u=[],c=!1;function l(){i&&r&&(i=!1,r.length?u=r.concat(u):a=-1,u.length&&h())}function h(){if(!i){c=!1,i=!0;for(var e=u.length,t=setTimeout(l);e;){for(r=u,u=[];r&&++a 1)for(var n=1;n {"use strict";t.test=function(){return!n.g.setImmediate&&void 0!==n.g.MessageChannel},t.install=function(e){var t=new n.g.MessageChannel;return t.port1.onmessage=e,function(){t.port2.postMessage(0)}}},5976:(e,t,n)=>{"use strict";var i=n.g.MutationObserver||n.g.WebKitMutationObserver;t.test=function(){return i},t.install=function(e){var t=0,r=new i(e),s=n.g.document.createTextNode("");return r.observe(s,{characterData:!0}),function(){s.data=t=++t%2}}},5143:(e,t,n)=>{"use strict";t.test=function(){return"function"==typeof n.g.queueMicrotask},t.install=function(e){return function(){n.g.queueMicrotask(e)}}},8322:(e,t,n)=>{"use strict";t.test=function(){return"document"in n.g&&"onreadystatechange"in n.g.document.createElement("script")},t.install=function(e){return function(){var t=n.g.document.createElement("script");return t.onreadystatechange=function(){e(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},n.g.document.documentElement.appendChild(t),e}}},2860:(e,t)=>{"use strict";t.test=function(){return!0},t.install=function(e){return function(){setTimeout(e,0)}}},6322:(e,t,n)=>{var i,r;!function(){var s,o,a,u,c,l,h,p,d,f,g,m,y,v,x,b,w,S,C,E,k,_,T,L,O,A,$,P,I,Q,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),i=0;i 0){var u=R.utils.clone(t)||{};u.position=[o,a],u.index=r.length,r.push(new R.Token(n.slice(o,s),u))}o=s+1}}return r},R.tokenizer.separator=/[\s\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var n=R.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n 1&&(s e&&(n=r),s!=e);)i=n-t,r=t+Math.floor(i/2),s=this.elements[2*r];return s==e||s>e?2*r:s a?c+=2:o==a&&(t+=n[u+1]*i[c+1],u+=2,c+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t 0){var s,o=r.str.charAt(0);o in r.node.edges?s=r.node.edges[o]:(s=new R.TokenSet,r.node.edges[o]=s),1==r.str.length&&(s.final=!0),i.push({node:s,editsRemaining:r.editsRemaining,str:r.str.slice(1)})}if(0!=r.editsRemaining){if("*"in r.node.edges)var a=r.node.edges["*"];else{a=new R.TokenSet;r.node.edges["*"]=a}if(0==r.str.length&&(a.final=!0),i.push({node:a,editsRemaining:r.editsRemaining-1,str:r.str}),r.str.length>1&&i.push({node:r.node,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)}),1==r.str.length&&(r.node.final=!0),r.str.length>=1){if("*"in r.node.edges)var u=r.node.edges["*"];else{u=new R.TokenSet;r.node.edges["*"]=u}1==r.str.length&&(u.final=!0),i.push({node:u,editsRemaining:r.editsRemaining-1,str:r.str.slice(1)})}if(r.str.length>1){var c,l=r.str.charAt(0),h=r.str.charAt(1);h in r.node.edges?c=r.node.edges[h]:(c=new R.TokenSet,r.node.edges[h]=c),1==r.str.length&&(c.final=!0),i.push({node:c,editsRemaining:r.editsRemaining-1,str:l+r.str.slice(2)})}}}return n},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,n=t,i=0,r=e.length;i =e;t--){var n=this.uncheckedNodes[t],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),n=Object.create(null),i=Object.create(null),r=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a 1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var r=0;r =this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos 1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new R.QueryParseError(n,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(n,t.start,t.end)}var i=e.peekLexeme();if(null==i){n="expecting term or field, found nothing";throw new R.QueryParseError(n,t.start,t.end)}switch(i.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:n="expecting term or field, found '"+i.type+"'";throw new R.QueryParseError(n,i.start,i.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+n;throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var r=e.peekLexeme();if(null==r){i="expecting term, found nothing";throw new R.QueryParseError(i,t.start,t.end)}if(r.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;i="expecting term, found '"+r.type+"'";throw new R.QueryParseError(i,r.start,r.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(i,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=n;var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(i,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var i="boost must be numeric";throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.boost=n;var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(i,r.start,r.end)}else e.nextClause()}},void 0===(r="function"==typeof(i=function(){return R})?i.call(t,n,t,e):i)||(e.exports=r)}()}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/206.aace8056.js.LICENSE.txt b/_preview/pr-76/assets/js/206.aace8056.js.LICENSE.txt new file mode 100644 index 0000000..1cf473c --- /dev/null +++ b/_preview/pr-76/assets/js/206.aace8056.js.LICENSE.txt @@ -0,0 +1,61 @@ +/*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ + +/*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + */ + +/*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + */ + +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ diff --git a/_preview/pr-76/assets/js/238e4522.189d0b09.js b/_preview/pr-76/assets/js/238e4522.189d0b09.js new file mode 100644 index 0000000..922d672 --- /dev/null +++ b/_preview/pr-76/assets/js/238e4522.189d0b09.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[774],{5286:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var t=o(678),s=o(4738);const r={title:" .json"},a=void 0,i={id:"pages/configs/profile_json",title:" .json",description:"To initialize a new Sparo profile, you can copy and paste the contents of this template.",source:"@site/docs/pages/configs/profile_json.md",sourceDirName:"pages/configs",slug:"/pages/configs/profile_json",permalink:"/sparo/_preview/pr-76/pages/configs/profile_json",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/configs/profile_json.md",tags:[],version:"current",frontMatter:{title:" .json"},sidebar:"docsSidebar",previous:{title:"Security",permalink:"/sparo/_preview/pr-76/pages/reference/security"},next:{title:"Overview",permalink:"/sparo/_preview/pr-76/pages/commands/overview"}},l={},c=[{value:"See also",id:"see-also",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"To initialize a new Sparo profile, you can copy and paste the contents of this template."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"common/sparo-profiles/ .json"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-js",children:'/**\n * OWNER: \n * PURPOSE: \n */\n{\n "$schema": "https://tiktok.github.io/sparo/schemas/sparo-profile.schema.json",\n\n /**\n * A list of Rush project selectors indicating the project folders to be\n * included for sparse checkout. The selectors will be combined to make\n * the union superset of projects. See the Rush selector docs for details:\n * https://rushjs.io/pages/developer/selecting_subsets/\n */\n "selections": [\n /**\n * For example, include all Rush projects tagged with "tag:my-team"\n * as well as the dependency workspace projects needed to build them.\n * To learn about Rush project tags, see this documentation:\n * https://rushjs.io/pages/developer/project_tags/\n */\n // {\n // "selector": "--to",\n // "argument": "tag:my-team"\n // },\n /**\n * For example, include the project called "my-library", as well as all\n * projects that are impacted by changes to it, as well as the dependency\n * projects needed to build everything.\n */\n // {\n // "selector": "--from",\n // "argument": "my-library"\n // }\n ],\n\n /**\n * A list of arbitrary additional folders to be included for checkout,\n * not necessarily corresponding to any workspace project.\n * The paths should use forward slashes, without a leading slash, and should be to the \n * root folder of the monorepo. Wildcards and glob patterns are not supported for\n * performance reasons.\n */\n "includeFolders": [\n // "path/to/include"\n ],\n\n /**\n * A list of folders to be excluded from the checkout. This field takes precedence\n * over the "includeFolders" and "selections" fields, guaranteeing that the\n * specified path will definitely not be included.\n * The paths should use forward slashes, without a leading slash, and should be to the \n * root folder of the monorepo. Wildcards and glob patterns are not supported for\n * performance reasons.\n */\n "excludeFolders": [\n // "path/to/exclude"\n ]\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/sparo/_preview/pr-76/pages/guide/sparo_profiles",children:"Sparo profiles"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},4738:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>i});var t=o(6166);const s={},r=t.createContext(s);function a(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/31f9c0ea.cf5363c9.js b/_preview/pr-76/assets/js/31f9c0ea.cf5363c9.js new file mode 100644 index 0000000..ed1876a --- /dev/null +++ b/_preview/pr-76/assets/js/31f9c0ea.cf5363c9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[655],{2657:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=o(678),r=o(4738);const s={title:"sparo checkout"},a=void 0,c={id:"pages/commands/sparo_checkout",title:"sparo checkout",description:"",source:"@site/docs/pages/commands/sparo_checkout.md",sourceDirName:"pages/commands",slug:"/pages/commands/sparo_checkout",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_checkout",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/commands/sparo_checkout.md",tags:[],version:"current",frontMatter:{title:"sparo checkout"},sidebar:"docsSidebar",previous:{title:"sparo auto-config",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_auto-config"},next:{title:"sparo clone",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_clone"}},i={},p=[];function d(e){const t={code:"code",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:'sparo checkout [branch] [start-point]\n\nUpdates files in the working tree to match the version in the index or the\nspecified tree. If no pathspec was given, git checkout will also update HEAD to\nset the specified branch as the current branch.\n\nPositionals:\n branch [string]\n start-point [string]\n\nOptions:\n --help Show help [boolean]\n -b Create a new branch and start it at [boolean]\n -B Create a new branch and start it at ; if it\n already exists, reset it to [boolean]\n --profile Checkout projects by specified profile(s). The profiles\n will be recorded and reused by other sparo commands. For\n example, running "sparo checkout " sparse checkout\n based on the reused profiles after running "git checkout"\n [array] [default: []]\n --add-profile Checkout projects with recorded profile(s) and the\n specified added profile(s). Adds the specified added\n profile(s) to sparo recorded profiles [array] [default: []]\n --no-profile Checkout projects without any profiles and clear all\n recorded profiles [boolean]\n --to Checkout projects up to (and including) project , can\n be used together with option --profile/--add-profile to\n form a union selection of the two options. The projects\n selectors here will never replace what have been checked\n out by profiles [array] [default: []]\n --from Checkout projects downstream from (and including itself and\n all its dependencies) project , can be used\n together with option --profile/--add-profile to form a\n union selection of the two options. The projects selectors\n here will never replace what have been checked out by\n profiles [array] [default: []]\n'})})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},4738:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>c});var n=o(6166);const r={},s=n.createContext(r);function a(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/3549fc66.c2ba6d0b.js b/_preview/pr-76/assets/js/3549fc66.c2ba6d0b.js new file mode 100644 index 0000000..92387f0 --- /dev/null +++ b/_preview/pr-76/assets/js/3549fc66.c2ba6d0b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[827],{3365:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>m,frontMatter:()=>n,metadata:()=>p,toc:()=>c});var o=s(678),r=s(4738);const n={title:"sparo git-pull"},i=void 0,p={id:"pages/commands/sparo_git-pull",title:"sparo git-pull",description:"This is the mirrored subcommand for git pull. It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection.",source:"@site/docs/pages/commands/sparo_git-pull.md",sourceDirName:"pages/commands",slug:"/pages/commands/sparo_git-pull",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-pull",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/commands/sparo_git-pull.md",tags:[],version:"current",frontMatter:{title:"sparo git-pull"},sidebar:"docsSidebar",previous:{title:"sparo git-fetch",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-fetch"},next:{title:"sparo init-profile",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_init-profile"}},a={},c=[];function l(e){const t={a:"a",code:"code",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:["This is the ",(0,o.jsx)(t.a,{href:"/sparo/_preview/pr-76/pages/commands/overview",children:"mirrored subcommand"})," for ",(0,o.jsx)(t.code,{children:"git pull"}),". It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection."]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{children:"sparo git-pull [ ] [ [ \u2026\u200b]]\n"})}),"\n",(0,o.jsxs)(t.p,{children:["See ",(0,o.jsx)(t.a,{href:"https://git-scm.com/docs/git-pull",children:"git pull"})," in the Git documentation for details."]})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},4738:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>p});var o=s(6166);const r={},n=o.createContext(r);function i(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function p(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/357ca5b8.cc7c4a45.js b/_preview/pr-76/assets/js/357ca5b8.cc7c4a45.js new file mode 100644 index 0000000..05f4b79 --- /dev/null +++ b/_preview/pr-76/assets/js/357ca5b8.cc7c4a45.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[685],{3369:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>m,frontMatter:()=>r,metadata:()=>a,toc:()=>p});var s=o(678),n=o(4738);const r={title:"sparo git-clone"},i=void 0,a={id:"pages/commands/sparo_git-clone",title:"sparo git-clone",description:"This is the mirrored subcommand for git clone. It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection.",source:"@site/docs/pages/commands/sparo_git-clone.md",sourceDirName:"pages/commands",slug:"/pages/commands/sparo_git-clone",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-clone",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/commands/sparo_git-clone.md",tags:[],version:"current",frontMatter:{title:"sparo git-clone"},sidebar:"docsSidebar",previous:{title:"sparo git-checkout",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-checkout"},next:{title:"sparo git-fetch",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-fetch"}},c={},p=[];function l(e){const t={a:"a",code:"code",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:["This is the ",(0,s.jsx)(t.a,{href:"/sparo/_preview/pr-76/pages/commands/overview",children:"mirrored subcommand"})," for ",(0,s.jsx)(t.code,{children:"git clone"}),". It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"sparo git-clone [--template= ]\n\t [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]\n\t [-o ] [-b ] [-u ] [--reference ]\n\t [--dissociate] [--separate-git-dir ]\n\t [--depth ] [--[no-]single-branch] [--no-tags]\n\t [--recurse-submodules[= ]] [--[no-]shallow-submodules]\n\t [--[no-]remote-submodules] [--jobs ] [--sparse] [--[no-]reject-shallow]\n\t [--filter= [--also-filter-submodules]] [--] \n\t [ ]\n"})}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"https://git-scm.com/docs/git-clone",children:"git clone"})," in the Git documentation for details."]})]})}function m(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},4738:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var s=o(6166);const n={},r=s.createContext(n);function i(e){const t=s.useContext(r);return s.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(n):e.components||n:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/3e55010f.b610c89e.js b/_preview/pr-76/assets/js/3e55010f.b610c89e.js new file mode 100644 index 0000000..dfcba6d --- /dev/null +++ b/_preview/pr-76/assets/js/3e55010f.b610c89e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[818],{5428:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>n,metadata:()=>a,toc:()=>c});var r=o(678),i=o(4738);const n={title:"Git optimization"},s=void 0,a={id:"pages/reference/git_optimization",title:"Git optimization",description:"By default git clone will download every file in your Git repository, as well as the complete history of every file. For small repositories, that's no big deal. But as your monorepo accumulates projects and years of history, Git operations become slower and slower, until one day git status is taking 10 seconds or more. What to do?",source:"@site/docs/pages/reference/git_optimization.md",sourceDirName:"pages/reference",slug:"/pages/reference/git_optimization",permalink:"/sparo/_preview/pr-76/pages/reference/git_optimization",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/reference/git_optimization.md",tags:[],version:"current",frontMatter:{title:"Git optimization"},sidebar:"docsSidebar",previous:{title:"Sparo profiles",permalink:"/sparo/_preview/pr-76/pages/guide/sparo_profiles"},next:{title:"Skeleton folders",permalink:"/sparo/_preview/pr-76/pages/reference/skeleton_folders"}},l={},c=[];function d(e){const t={code:"code",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["By default ",(0,r.jsx)(t.code,{children:"git clone"})," will download every file in your Git repository, as well as the complete history of every file. For small repositories, that's no big deal. But as your monorepo accumulates projects and years of history, Git operations become slower and slower, until one day ",(0,r.jsx)(t.code,{children:"git status"})," is taking 10 seconds or more. What to do?"]}),"\n",(0,r.jsx)(t.p,{children:"Git provides these basic solutions that are easy to use in a medium sized repository:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Shallow clone"})," allows cloning only a few commits, but is generally only suitable for throwaway clones such as a CI job."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Partial clone"})," allows cloning without file contents (",(0,r.jsx)(t.strong,{children:"blobless"})," clone) or even commit details (",(0,r.jsx)(t.strong,{children:"treeless"})," clone), greatly accelerating your ",(0,r.jsx)(t.code,{children:"git clone"})," time and allowing such details to be fetched during ",(0,r.jsx)(t.code,{children:"git checkout"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Large file storage (LFS)"})," can move binary files to a separate server, downloading them on demand during checkout. Configuration of LFS is tricky however and if done incorrectly may cause worse performance."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"However, achieving good performance in a large repository requires more complex Git features such as:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Git ",(0,r.jsx)(t.strong,{children:"filesystem monitor"})," and ",(0,r.jsx)(t.strong,{children:"background maintenance"}),' are background processes that watch for changes and periodically prefetch server data. The user must manually register/unregister working directories and remember to "pause" the service when not needed.']}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Git worktrees"})," allow multiple working directories on your computer to share a single ",(0,r.jsx)(t.code,{children:".git"})," folder, avoiding the cost of multiple clones. However this feature comes with awkward limitations, for example the same branch can't be checked out in two worktrees, and Git hooks are also shared."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Sparse checkout"})," allows ",(0,r.jsx)(t.code,{children:"git checkout"}),' to extract a subset of files instead of the entire directory structure. Combined with partial clone, sparse checkout is the "battle axe" of Git optimization: although irrelevant projects and history will accumulate, your wait time will be proportional to the files you actually need.']}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},4738:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var r=o(6166);const i={},n=r.createContext(i);function s(e){const t=r.useContext(n);return r.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:s(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/448.d24ae91b.js b/_preview/pr-76/assets/js/448.d24ae91b.js new file mode 100644 index 0000000..daf4c7a --- /dev/null +++ b/_preview/pr-76/assets/js/448.d24ae91b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[448],{6448:(e,s,b)=>{b.r(s)}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/45779d82.dbe073de.js b/_preview/pr-76/assets/js/45779d82.dbe073de.js new file mode 100644 index 0000000..77c1266 --- /dev/null +++ b/_preview/pr-76/assets/js/45779d82.dbe073de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[421],{9917:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>t,metadata:()=>c,toc:()=>a});var o=r(678),n=r(4738);const t={title:"Getting started"},i=void 0,c={id:"pages/guide/getting_started",title:"Getting started",description:"In this tutorial we'll revisit the Quick Demo steps, but this time examining the Sparo workflow in more detail.",source:"@site/docs/pages/guide/getting_started.md",sourceDirName:"pages/guide",slug:"/pages/guide/getting_started",permalink:"/sparo/_preview/pr-76/pages/guide/getting_started",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/guide/getting_started.md",tags:[],version:"current",frontMatter:{title:"Getting started"},sidebar:"docsSidebar",previous:{title:"Overview",permalink:"/sparo/_preview/pr-76/"},next:{title:"Sparo profiles",permalink:"/sparo/_preview/pr-76/pages/guide/sparo_profiles"}},l={},a=[{value:"Step 1: Upgrade Git",id:"step-1-upgrade-git",level:2},{value:"Step 2: Clone your Rush monorepo",id:"step-2-clone-your-rush-monorepo",level:2},{value:"Step 3: Create a sparse profile",id:"step-3-create-a-sparse-profile",level:2},{value:"Step 4: Check out your Sparo profile",id:"step-4-check-out-your-sparo-profile",level:2},{value:"Step 5: Use the mirrored subcommands",id:"step-5-use-the-mirrored-subcommands",level:2}];function p(e){const s={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.p,{children:["In this tutorial we'll revisit the ",(0,o.jsx)(s.a,{href:"/sparo/_preview/pr-76/#quick-demo",children:"Quick Demo"})," steps, but this time examining the Sparo workflow in more detail."]}),"\n",(0,o.jsx)(s.h2,{id:"step-1-upgrade-git",children:"Step 1: Upgrade Git"}),"\n",(0,o.jsx)(s.p,{children:"Remember to upgrade to the latest Git version! Many Git optimizations are relatively new and not available in older versions of the software."}),"\n",(0,o.jsxs)(s.p,{children:["For macOS, we recommend to use ",(0,o.jsx)(s.a,{href:"https://git-scm.com/download/mac",children:"brew install git"}),". For other operating systems, see the ",(0,o.jsx)(s.a,{href:"https://git-scm.com/book/en/v2/Getting-Started-Installing-Git",children:"Git documentation"})," for instructions."]}),"\n",(0,o.jsx)(s.h2,{id:"step-2-clone-your-rush-monorepo",children:"Step 2: Clone your Rush monorepo"}),"\n",(0,o.jsxs)(s.p,{children:["Clone your ",(0,o.jsx)(s.a,{href:"https://rushjs.io/",children:"RushJS"})," monorepo:"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:"sparo clone https://github.com/my-company/my-monorepo.git\n\ncd my-monorepo\n"})}),"\n",(0,o.jsxs)(s.p,{children:["\ud83d\udc49 ",(0,o.jsx)(s.em,{children:"For a real world demo, try cloning this repo:"}),"\n",(0,o.jsx)(s.a,{href:"https://github.com/Azure/azure-sdk-for-js.git",children:"https://github.com/Azure/azure-sdk-for-js.git"})]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.strong,{children:'How "sparo clone" optimizes:'})}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["Only the default branch is fetched (typically the ",(0,o.jsx)(s.code,{children:"main"})," branch). This significantly reduces the download size."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["Git blobless ",(0,o.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/reference/git_optimization",children:"partial clone"})," is enabled to postpone downloading file contents."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["Git ",(0,o.jsx)(s.a,{href:"https://git-scm.com/docs/git-sparse-checkout",children:"sparse checkout"})," is used to clone only the ",(0,o.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/reference/skeleton_folders",children:'"skeleton" folders'}),", which includes all workspace ",(0,o.jsx)(s.strong,{children:"package.json"})," files, but excludes the source code subfolders."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["Sparse checkout is configured for the more efficient ",(0,o.jsx)(s.a,{href:"https://git-scm.com/docs/git-sparse-checkout#_internalsnon_cone_problems",children:'"cone mode"'}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(s.p,{children:[(0,o.jsx)(s.strong,{children:"Tip:"})," To inspect what actions and Git operations are being performed, invoke ",(0,o.jsx)(s.code,{children:"sparo --debug clone"})," instead of ",(0,o.jsx)(s.code,{children:"sparo clone"}),"."]}),"\n",(0,o.jsxs)(s.blockquote,{children:["\n",(0,o.jsx)(s.p,{children:"\ud83d\udca1 Support for PNPM and Yarn workspaces is planned but not implemented yet. Contributions welcome!"}),"\n"]}),"\n",(0,o.jsx)(s.h2,{id:"step-3-create-a-sparse-profile",children:"Step 3: Create a sparse profile"}),"\n",(0,o.jsxs)(s.p,{children:["Define a ",(0,o.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/configs/profile_json",children:"Sparo profile"})," describing the subset of repository folders for Git sparse checkout."]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:"# Writes a template to common/sparo-profiles/my-team.json\nsparo init-profile --profile my-team\n"})}),"\n",(0,o.jsxs)(s.p,{children:["Edit the created ",(0,o.jsx)(s.strong,{children:"my-team.json"})," file to add a selector. For example:"]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.strong,{children:"common/sparo-profiles/my-team.json"})}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-json",children:'{\n "selections": [\n {\n "selector": "--to",\n "argument": "my-rush-project"\n }\n ]\n}\n'})}),"\n",(0,o.jsxs)(s.p,{children:["\ud83d\udc49 ",(0,o.jsxs)(s.em,{children:["If you're demoing ",(0,o.jsx)(s.strong,{children:"azure-sdk-for-js"}),", replace ",(0,o.jsx)(s.code,{children:"my-rush-project"})," with ",(0,o.jsx)(s.code,{children:"@azure/arm-commerce"}),"."]})]}),"\n",(0,o.jsxs)(s.p,{children:["In the above example, the ",(0,o.jsx)(s.code,{children:"--to"})," ",(0,o.jsx)(s.a,{href:"https://rushjs.io/pages/developer/selecting_subsets/#--to",children:"project selector"})," instructs Sparo to checkout all dependencies in the workspace that are required to build ",(0,o.jsx)(s.code,{children:"my-rush-project"}),"."]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:'# Commit your profile to Git. (This step was skipped in the Quick Demo.)\n# Sparo profiles should generally be stored in Git, since this enables\n# you to move between branches without worrying about which projects\n# exist in a given branch.\nsparo add .\nsparo commit -m "Created a new Sparo profile"\n'})}),"\n",(0,o.jsx)(s.h2,{id:"step-4-check-out-your-sparo-profile",children:"Step 4: Check out your Sparo profile"}),"\n",(0,o.jsxs)(s.p,{children:["The ",(0,o.jsx)(s.code,{children:"--profile"})," parameter can be included with ",(0,o.jsx)(s.code,{children:"sparo checkout"})," (and in the future also ",(0,o.jsx)(s.code,{children:"sparo clone"})," and ",(0,o.jsx)(s.code,{children:"sparo pull"}),"). This parameter specifies the name of the JSON file to be selected. You can also combine multiple profiles (",(0,o.jsx)(s.code,{children:"sparo checkout --profile p1 --profile p2"}),"), in which case the union of their selections will be used. Combining profiles is an advanced scenario, but useful for example if your pull request will impact sets of projects belonging to multiple teams."]}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.strong,{children:"Sparse checkout based on common/sparo-profiles/my-team.json"})}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:"sparo checkout --profile my-team\n"})}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.strong,{children:'More about "sparo checkout":'})}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["Sparo automatically generates Git's ",(0,o.jsx)(s.code,{children:"$GIT_DIR/info/sparse-checkout"})," ",(0,o.jsx)(s.a,{href:"https://git-scm.com/docs/git-sparse-checkout#_internalssparse_checkout",children:"config file"})," based on your profile selections. To avoid conflicts, do not edit this file directly or rewrite it using other tools such as ",(0,o.jsx)(s.code,{children:"git sparse-checkout"}),". (Doing so won't break anything, but it may interfere with Sparo operations.)"]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["To checkout just the skeleton (returning to the initial state from Step 1 where no profile is chosen yet), specify ",(0,o.jsx)(s.code,{children:"--no-profile"})," instead of ",(0,o.jsx)(s.code,{children:"--profile NAME"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(s.li,{children:["\n",(0,o.jsxs)(s.p,{children:["To add more profiles, combining with your existing selection, use ",(0,o.jsx)(s.code,{children:"--add-profile NAME"})," instead of ",(0,o.jsx)(s.code,{children:"--profile NAME"}),". For example, these two commands produce the same result as ",(0,o.jsx)(s.code,{children:"sparo checkout --profile p1 --profile p2"}),":"]}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:"sparo checkout --profile p1\nsparo checkout --add-profile p2\n"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(s.h2,{id:"step-5-use-the-mirrored-subcommands",children:"Step 5: Use the mirrored subcommands"}),"\n",(0,o.jsxs)(s.p,{children:["For everyday work, consider choosing ",(0,o.jsx)(s.a,{href:"/sparo/_preview/pr-76/pages/commands/overview",children:"mirrored subcommands"})," such as ",(0,o.jsx)(s.code,{children:"sparo revert"})," instead of ",(0,o.jsx)(s.code,{children:"git revert"}),". The Sparo wrapper provides (1) better defaults, (2) suggestions for better performance, and (3) optional anonymized performance metrics."]}),"\n",(0,o.jsx)(s.p,{children:"Examples:"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-shell",children:'sparo pull\n\nsparo commit -m "Example command"\n'})})]})}function d(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},4738:(e,s,r)=>{r.d(s,{R:()=>i,x:()=>c});var o=r(6166);const n={},t=o.createContext(n);function i(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/464.ad495b3c.js b/_preview/pr-76/assets/js/464.ad495b3c.js new file mode 100644 index 0000000..556ae38 --- /dev/null +++ b/_preview/pr-76/assets/js/464.ad495b3c.js @@ -0,0 +1 @@ +(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[464],{2293:(e,s,t)=>{"use strict";t.d(s,{A:()=>c});var b=t(6322);const c=b},6156:()=>{}}]); \ No newline at end of file diff --git a/_preview/pr-76/assets/js/482d7390.bcbfc1c7.js b/_preview/pr-76/assets/js/482d7390.bcbfc1c7.js new file mode 100644 index 0000000..9e2cf7d --- /dev/null +++ b/_preview/pr-76/assets/js/482d7390.bcbfc1c7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[240],{86:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>a,contentTitle:()=>n,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>p});var s=o(678),c=o(4738);const r={title:"sparo git-checkout"},n=void 0,i={id:"pages/commands/sparo_git-checkout",title:"sparo git-checkout",description:"This is the mirrored subcommand for git checkout. It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection.",source:"@site/docs/pages/commands/sparo_git-checkout.md",sourceDirName:"pages/commands",slug:"/pages/commands/sparo_git-checkout",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-checkout",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/commands/sparo_git-checkout.md",tags:[],version:"current",frontMatter:{title:"sparo git-checkout"},sidebar:"docsSidebar",previous:{title:"sparo pull",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_pull"},next:{title:"sparo git-clone",permalink:"/sparo/_preview/pr-76/pages/commands/sparo_git-clone"}},a={},p=[];function m(t){const e={a:"a",code:"code",p:"p",pre:"pre",...(0,c.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(e.p,{children:["This is the ",(0,s.jsx)(e.a,{href:"/sparo/_preview/pr-76/pages/commands/overview",children:"mirrored subcommand"})," for ",(0,s.jsx)(e.code,{children:"git checkout"}),". It has the same functionality as the corresponding Git subcommand, but supports Sparo's optional anonymous timing metrics collection."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{children:"sparo git-checkout [-q] [-f] [-m] [ ]\nsparo git-checkout [-q] [-f] [-m] --detach [ ]\nsparo git-checkout [-q] [-f] [-m] [--detach] \nsparo git-checkout [-q] [-f] [-m] [[-b|-B|--orphan] ] [ ]\nsparo git-checkout [-f|--ours|--theirs|-m|--conflict=