1"use strict";(globalThis.webpackChunkscheduleopt=globalThis.webpackChunkscheduleopt||[]).push([[5055],{6038(e,t,n){n.r(t),n.d(t,{assets:()=>se,contentTitle:()=>ne,default:()=>ae,frontMatter:()=>te,metadata:()=>s,toc:()=>re});const s=JSON.parse('{"id":"Tutorial/intro","title":"Introduction to Scheduling","description":"Welcome to the OptalCP tutorial. This guide will teach you how to model and solve scheduling problems using constraint programming. We\'ll work through a complete example step by step, building up from a simple model to one that handles real-world complexities.","source":"@site/docs/Tutorial/intro.md","sourceDirName":"Tutorial","slug":"/Tutorial/intro","permalink":"/docs/Tutorial/intro","draft":false,"unlisted":false,"tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"title":"Introduction to Scheduling","sidebar_position":1},"sidebar":"documentationSidebar","next":{"title":"Building a Basic Model","permalink":"/docs/Tutorial/basic-model"}}');var r,l,a,i,o,d,c,h,u,m,x,p,j,b,f,g,w,v,k,y,E,N,S,T,C,A,O,I,P,M,W,D,V,q,L,z,_,F,R,$,U,B,Y,Q,G=n(4848),H=n(8453),J=n(4865),X=n(9365),K=n(6540);function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Z.apply(null,arguments)}const ee=({title:e,titleId:t,...n})=>K.createElement("svg",Z({xmlns:"http://www.w3.org/2000/svg",viewBox:"20 15 822 285","aria-labelledby":t},n),e?K.createElement("title",{id:t},e):null,r||(r=K.createElement("defs",null,K.createElement("marker",{id:"arrowhead",markerHeight:5,markerWidth:7,orient:"auto",refX:6,refY:2.5},K.createElement("path",{fill:"#555",d:"m0 0 7 2.5L0 5z"})),K.createElement("style",null,".task-box{stroke-width:2}.task-duration,.task-label{font-family:system-ui,-apple-system,sans-serif}.task-label{font-size:11px;font-weight:600;fill:#333}.task-duration{font-size:10px;fill:#555}.arrow{stroke:#555;stroke-width:1.5;fill:none;marker-end:url(#arrowhead)}.legend-text{font-family:system-ui,-apple-system,sans-serif;font-size:11px;fill:#333}.saw{fill:#bfdbfe;stroke:#2563eb}.spray{fill:#e9d5ff;stroke:#9333ea}.none{fill:#e5e7eb;stroke:#6b7280}"))),l||(l=K.createElement("rect",{width:105,height:48,x:30,y:40,className:"task-box saw",rx:6})),a||(a=K.createElement("text",{x:82,y:60,className:"task-label",textAnchor:"middle"},"CutDeskWood")),i||(i=K.createElement("text",{x:82,y:74,className:"task-duration",textAnchor:"middle"},"30 min \xb7 1 worker")),o||(o=K.createElement("rect",{width:110,height:48,x:165,y:40,className:"task-box none",rx:6})),d||(d=K.createElement("text",{x:220,y:60,className:"task-label",textAnchor:"middle"},"SandDeskParts")),c||(c=K.createElement("text",{x:220,y:74,className:"task-duration",textAnchor:"middle"},"20 min \xb7 1 worker")),h||(h=K.createElement("rect",{width:110,height:48,x:305,y:40,className:"task-box none",rx:6})),u||(u=K.createElement("text",{x:360,y:60,className:"task-label",textAnchor:"middle"},"AssembleDesk")),m||(m=K.createElement("text",{x:360,y:74,className:"task-duration",textAnchor:"middle"},"45 min \xb7 2 workers")),x||(x=K.createElement("rect",{width:95,height:48,x:445,y:40,className:"task-box spray",rx:6})),p||(p=K.createElement("text",{x:492,y:60,className:"task-label",textAnchor:"middle"},"StainDesk")),j||(j=K.createElement("text",{x:492,y:74,className:"task-duration",textAnchor:"middle"},"20 min \xb7 1 worker")),b||(b=K.createElement("rect",{width:105,height:48,x:30,y:160,className:"task-box saw",rx:6})),f||(f=K.createElement("text",{x:82,y:180,className:"task-label",textAnchor:"middle"},"CutChairWood")),g||(g=K.createElement("text",{x:82,y:194,className:"task-duration",textAnchor:"middle"},"25 min \xb7 1 worker")),w||(w=K.createElement("rect",{width:110,height:48,x:165,y:160,className:"task-box none",rx:6})),v||(v=K.createElement("text",{x:220,y:180,className:"task-label",textAnchor:"middle"},"SandChairParts")),k||(k=K.createElement("text",{x:220,y:194,className:"task-duration",textAnchor:"middle"},"15 min \xb7 1 worker")),y||(y=K.createElement("rect",{width:110,height:48,x:305,y:160,className:"task-box none",rx:6})),E||(E=K.createElement("text",{x:360,y:180,className:"task-label",textAnchor:"middle"},"AssembleChair")),N||(N=K.createElement("text",{x:360,y:194,className:"task-duration",textAnchor:"middle"},"35 min \xb7 1 worker")),S||(S=K.createElement("rect",{width:95,height:48,x:445,y:160,className:"task-box spray",rx:6})),T||(T=K.createElement("text",{x:492,y:180,className:"task-label",textAnchor:"middle"},"StainChair")),C||(C=K.createElement("text",{x:492,y:194,className:"task-duration",textAnchor:"middle"},"15 min \xb7 1 worker")),A||(A=K.createElement("rect",{width:100,height:48,x:597,y:100,className:"task-box spray",rx:6})),O||(O=K.createElement("text",{x:647,y:120,className:"task-label",textAnchor:"middle"},"ApplyFinish")),I||(I=K.createElement("text",{x:647,y:134,className:"task-duration",textAnchor:"middle"},"30 min \xb7 1 worker")),P||(P=K.createElement("rect",{width:100,height:48,x:732,y:100,className:"task-box none",rx:6})),M||(M=K.createElement("text",{x:782,y:120,className:"task-label",textAnchor:"middle"},"FinalInspect")),W||(W=K.createElement("text",{x:782,y:134,className:"task-duration",textAnchor:"middle"},"10 min \xb7 1 worker")),D||(D=K.createElement("path",{d:"M135 64h28",className:"arrow"})),V||(V=K.createElement("path",{d:"M275 64h28",className:"arrow"})),q||(q=K.createElement("path",{d:"M415 64h28",className:"arrow"})),L||(L=K.createElement("path",{d:"M135 184h28",className:"arrow"})),z||(z=K.createElement("path",{d:"M275 184h28",className:"arrow"})),_||(_=K.createElement("path",{d:"M415 184h28",className:"arrow"})),F||(F=K.createElement("path",{d:"M540 64h20q15 0 15 16v35q0 9 20 9",className:"arrow"})),R||(R=K.createElement("path",{d:"M540 184h20q15 0 15-16v-35q0-9 20-9",className:"arrow"})),$||($=K.createElement("path",{d:"M697 124h33",className:"arrow"})),K.createElement("rect",{width:220,height:28,x:310,y:260,rx:3,style:{fill:"#f9fafb",stroke:"#d1d5db",strokeWidth:1}}
1),U||(U=K.createElement("rect",{width:14,height:10,x:330,y:268,className:"task-box saw",rx:4})),B||(B=K.createElement("text",{x:350,y:277,className:"legend-text"},"Saw")),Y||(Y=K.createElement("rect",{width:14,height:10,x:420,y:268,className:"task-box spray",rx:4})),Q||(Q=K.createElement("text",{x:440,y:277,className:"legend-text"},"Spray booth"))),te={title:"Introduction to Scheduling",sidebar_position:1},ne="Introduction to Scheduling",se={},re=[{value:"What is Scheduling?",id:"what-is-scheduling",level:2},{value:"The Model \u2192 Solve \u2192 Solution Workflow",id:"the-model--solve--solution-workflow",level:2},{value:"When to Use OptalCP",id:"when-to-use-optalcp",level:2},{value:"The Furniture Workshop Problem",id:"the-furniture-workshop-problem",level:2},{value:"Dependencies",id:"dependencies",level:3},{value:"Constraints We'll Model",id:"constraints-well-model",level:3},{value:"Objective",id:"objective",level:3},{value:"What You'll Learn",id:"what-youll-learn",level:2},{value:"Prerequisites",id:"prerequisites",level:2},{value:"See Also",id:"see-also",level:2},{value:"Next Steps",id:"next-steps",level:2}];function le(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,H.R)(),...e.components};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(t.header,{children:(0,G.jsx)(t.h1,{id:"introduction-to-scheduling",children:"Introduction to Scheduling"})}),"\n",(0,G.jsx)(t.p,{children:"Welcome to the OptalCP tutorial. This guide will teach you how to model and solve scheduling problems using constraint programming. We'll work through a complete example step by step, building up from a simple model to one that handles real-world complexities."}),"\n",(0,G.jsx)(t.h2,{id:"what-is-scheduling",children:"What is Scheduling?"}),"\n",(0,G.jsxs)(t.p,{children:["Scheduling is about deciding ",(0,G.jsx)(t.strong,{children:"when"})," to perform tasks and ",(0,G.jsx)(t.strong,{children:"how"})," to allocate resources. You might need to:"]}),"\n",(0,G.jsxs)(t.ul,{children:["\n",(0,G.jsx)(t.li,{children:"Schedule manufacturing operations on machines"}),"\n",(0,G.jsx)(t.li,{children:"Assign workers to jobs"}),"\n",(0,G.jsx)(t.li,{children:"Plan project activities with dependencies"}),"\n",(0,G.jsx)(t.li,{children:"Optimize delivery routes with time windows"}),"\n"]}),"\n",(0,G.jsxs)(t.p,{children:["These problems are hard because of ",(0,G.jsx)(t.strong,{children:"constraints"}),": some tasks must happen before others, resources are limited, and there are often many ways to organize the schedule. Constraint programming helps you find good solutions efficiently."]}),"\n",(0,G.jsx)(t.h2,{id:"the-model--solve--solution-workflow",children:"The Model \u2192 Solve \u2192 Solution Workflow"}),"\n",(0,G.jsx)(t.p,{children:"OptalCP follows a simple three-step pattern:"}),"\n",(0,G.jsxs)(t.ol,{children:["\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:"Model"}),": Define your tasks, constraints, and objective"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:"Solve"}),": Run the constraint programming solver"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:"Solution"}),": Extract the schedule and interpret results"]}),"\n"]}),"\n",(0,G.jsx)(t.p,{children:"Let's see a minimal example:"}),"\n","\n",(0,G.jsxs)(J.A,{groupId:"lang",children:[(0,G.jsx)(X.A,{value:"python",label:"Python",children:(0,G.jsx)(t.pre,{children:(0,G.jsx)(t.code,{className:"language-python",children:'import optalcp as cp\n\n# 1. MODEL\nmodel = cp.Model()\ntask = model.interval_var(length=10, name="task")\nmodel.minimize(task.end()) # Finish as early as possible\n\n# 2. SOLVE\nresult = model.solve()\n\n# 3. SOLUTION\nif result.solution:\n print(f"Task ends at: {result.solution.get_end(task)}")\n print(f"Optimal: {result.proof}")\n'})})}),(0,G.jsx)(X.A,{value:"csharp",label:"C#",children:(0,G.jsx)(t.pre,{children:(0,G.jsx)(t.code,{className:"language-csharp",children:'using OptalCP;\n\n// 1. MODEL\nvar model = new Model();\nvar task = model.IntervalVar(length: 10, name: "task");
1\nmodel.Minimize(task.End()); // Finish as early as possible\n\n// 2. SOLVE\nvar result = model.Solve();\n\n// 3. SOLUTION\nif (result.Solution != null)\n{\n Console.WriteLine($"Task ends at: {result.Solution.GetEnd(task)}");\n Console.WriteLine($"Optimal: {result.Proof}");\n}\n'})})}),(0,G.jsx)(X.A,{value:"typescript",label:"TypeScript",children:(0,G.jsx)(t.pre,{children:(0,G.jsx)(t.code,{className:"language-typescript",children:"import * as CP from '@scheduleopt/optalcp';\n\n// 1. MODEL\nconst model = new CP.Model();\nconst task = model.intervalVar({ length: 10, name: \"task\" });\nmodel.minimize(task.end()); // Finish as early as possible\n\n// 2. SOLVE\nconst result = await model.solve();\n\n// 3. SOLUTION\nif (result.solution) {\n console.log(`Task ends at: ${result.solution.getEnd(task)}`);\n console.log(`Optimal: ${result.proof}`);\n}\n"})})})]}),"\n",(0,G.jsx)(t.p,{children:"This simple model creates a task with duration 10 and minimizes its end time. The solver finds that the optimal schedule starts at time 0 and ends at time 10."}),"\n",(0,G.jsx)(t.h2,{id:"when-to-use-optalcp",children:"When to Use OptalCP"}),"\n",(0,G.jsxs)(t.p,{children:["OptalCP is designed for ",(0,G.jsx)(t.strong,{children:"scheduling and resource allocation"})," problems where:"]}),"\n",(0,G.jsxs)(t.ul,{children:["\n",(0,G.jsx)(t.li,{children:"Tasks have durations and dependencies"}),"\n",(0,G.jsx)(t.li,{children:"Resources are limited (machines, workers, materials)"}),"\n",(0,G.jsx)(t.li,{children:"You want to optimize objectives like makespan, cost, or tardiness"}),"\n",(0,G.jsx)(t.li,{children:"Constraints are complex (precedence, transitions, alternatives)"}),"\n"]}),"\n",(0,G.jsxs)(t.p,{children:["OptalCP is especially powerful when your problem has ",(0,G.jsx)(t.strong,{children:"many types of constraints"}),". In constraint programming, you simply list your constraints\u2014precedence, resource limits, time windows, transitions\u2014and the solver handles them all together. With custom algorithms, adding a new constraint type often means redesigning the entire algorithm from scratch."]}),"\n",(0,G.jsx)(t.h2,{id:"the-furniture-workshop-problem",children:"The Furniture Workshop Problem"}),"\n",(0,G.jsxs)(t.p,{children:["In this tutorial, we'll work with a toy example: ",(0,G.jsx)(t.strong,{children:"a small furniture workshop"})," making a custom wooden desk and matching chair. This keeps the code readable, but OptalCP can handle real-world problems with hundreds of thousands of tasks."]}),"\n",(0,G.jsx)(t.p,{children:"Here are the tasks we need to schedule:"}),"\n",(0,G.jsxs)(t.table,{children:[(0,G.jsx)(t.thead,{children:(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.th,{children:"Task"}),(0,G.jsx)(t.th,{children:"Duration"}),(0,G.jsx)(t.th,{children:"Workers"}),(0,G.jsx)(t.th,{children:"Resource"})]})}),(0,G.jsxs)(t.tbody,{children:[(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"CutDeskWood"}),(0,G.jsx)(t.td,{children:"30 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"Saw"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"CutChairWood"}),(0,G.jsx)(t.td,{children:"25 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"Saw"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"SandDeskParts"}),(0,G.jsx)(t.td,{children:"20 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"\u2014"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"SandChairParts"}),(0,G.jsx)(t.td,{children:"15 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"\u2014"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"AssembleDesk"}),(0,G.jsx)(t.td,{children:"45 min"}),(0,G.jsx)(t.td,{children:"2"}),(0,G.jsx)(t.td,{children:"\u2014"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"AssembleChair"}),(0,G.jsx)(t.td,{children:"35 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"\u2014"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"StainDesk"}),(0,G.jsx)(t.td,{children:"20 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"Spray booth"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"StainChair"}),(0,G.jsx)(t.td,{children:"15 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"Spray booth"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"ApplyFinish"}),(0,G.jsx)(t.td,{children:"30 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"Spray booth"})]}),(0,G.jsxs)(t.tr,{children:[(0,G.jsx)(t.td,{children:"FinalInspect"}),(0,G.jsx)(t.td,{children:"10 min"}),(0,G.jsx)(t.td,{children:"1"}),(0,G.jsx)(t.td,{children:"\u2014"})]})]})]}),"\n",(0,G.jsx)(t.h3,{id:"dependencies",children:"Dependencies"}),"\n",(0,G.jsx)(t.p,{children:"The tasks must follow a logical order:"}),"\n",(0,G.jsx)(ee,{width:"100%"}),"\n",(0,G.jsx)(t.p,{children:"Both the desk and chair must be stained before the final finish coat is applied, and everything must be inspected at the end."}),"\n",(0,G.jsx)(t.h3,{id:"constraints-well-model",children:"Constraints We'll Model"}),"\n",(0,G.jsx)(t.p,{children:"As we progress through the tutorial, we'll add different types of constraints:"}),"\n",(0,G.jsxs)(t.ol,{children:["\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/basic-model",children:"Precedence"})}),": Tasks must happen in order"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/no-overlap",children:"No-overlap"})}),": The saw can only cut one thing at a time"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/cumulative",children:"Cumulative"})}),": We have only 2 workers total; assembling the desk needs both"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/transition-times",children:"Transition times"})}),": The spray booth needs cleaning between different stain colors"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/alternatives",children:"Alternatives"})}),": Sanding can be done by hand (slow) or with a power sander (fast, but shared)"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.strong,{children:(0,G.jsx)(t.a,{href:"/docs/Tutorial/reservoir",children:"Reservoirs"})}),": Dust accumulates and must be cleaned before exceeding safety limits"]}),"\n"]}),"\n",(0,G.jsx)(t.h3,{id:"objective",children:"Objective"}),"\n",(0,G.jsxs)(t.p,{children:["We want to ",(0,G.jsx)(t.strong,{children:"minimize the makespan"}),": the total time from starting work until the final inspection is complete. This means finishing the entire order as quickly as possible."]}),"\n",(0,G.jsx)(t.h2,{id:"what-youll-learn",children:"What You'll Learn"}),"\n",(0,G.jsx)(t.p,{children:"By the end of this tutorial, you'll know how to:"}),"\n",(0,G.jsxs)(t.ul,{children:["\n",(0,G.jsx)(t.li,{children:"Create interval variables to represent tasks"}),"\n",(0,G.jsx)(t.li,{children:"Express precedence and timing constraints"}),"\n",(0,G.jsx)(t.li,{children:"Model limited resources (machines, workers, materials)"}),"\n",(0,G.jsx)(t.li,{children:"Handle alternatives and optional activities"}),"\n",(0,G.jsx)(t.li,{children:"Set objectives and interpret solutions"}),"\n",(0,G.jsx)(t.li,{children:"Understand solver output and solution quality"}),"\n"]}),"\n",(0,G.jsx)(t.p,{children:"Each chapter builds on the previous one, progressively adding features to our model. You'll see working code at every step, and you can run these examples yourself."}),"\n",(0,G.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,G.jsx)(t.p,{children:"This tutorial assumes basic programming knowledge in Python, C#, or TypeScript. No prior experience with constraint programming is required\u2014we'll explain concepts as we go."}),"\n",(0,G.jsxs)(t.p,{children:["Make sure you've installed OptalCP (see the ",(0,G.jsx)(t.a,{href:"/docs/Quick%20Start/python",children:"Qu
1ick Start"})," guide). The examples use the Preview edition, which is free but reports solution variables as absent (objective values are correct). This means code that accesses solution values (like ",(0,G.jsx)(t.code,{children:"get_start()"}),", ",(0,G.jsx)(t.code,{children:"get_end()"}),") will return ",(0,G.jsx)(t.code,{children:"None"}),"/",(0,G.jsx)(t.code,{children:"null"})," in Preview edition. For full solution details, use the Academic or Full edition."]}),"\n",(0,G.jsx)(t.h2,{id:"see-also",children:"See Also"}),"\n",(0,G.jsxs)(t.ul,{children:["\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.a,{href:"/docs/Quick%20Start/python",children:"Quick Start Guide"})," \u2014 Installation and first model"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.a,{href:"/docs/Modeling/intervals",children:"Modeling / Intervals"})," \u2014 Complete reference for interval variables"]}),"\n",(0,G.jsxs)(t.li,{children:[(0,G.jsx)(t.a,{href:"/docs/Solving/basics",children:"Solving / Basics"})," \u2014 Understanding solve results"]}),"\n"]}),"\n",(0,G.jsx)(t.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,G.jsx)(t.p,{children:"Ready to start modeling? In the next chapter, we'll build our first real schedule with precedence constraints and optimize the makespan."}),"\n",(0,G.jsxs)(t.p,{children:["Continue to: ",(0,G.jsx)(t.a,{href:"/docs/Tutorial/basic-model",children:"Basic Model \u2192"})]})]})}function ae(e={}){const{wrapper:t}={...(0,H.R)(),...e.components};return t?(0,G.jsx)(t,{...e,children:(0,G.jsx)(le,{...e})}):le(e)}},9365(e,t,n){n.d(t,{A:()=>o});n(6540);var s=n(4164),r=n(7751);const l="tabItem_Ymn6";var a=n(4848);function i({children:e,className:t,hidden:n}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(l,t),hidden:n,children:e})}function o({children:e,className:t,value:n}){const{selectedValue:s,lazy:l}=(0,r.uc)(),o=n===s;return!o&&l?null:(0,a.jsx)(i,{className:t,hidden:!o,children:e})}},4865(e,t,n){n.d(t,{A:()=>x});n(6540);var s=n(4164),r=n(7559),l=n(7751),a=n(3104),i=n(2303);const o="tabList__CuJ",d="tabItem_LNqP";var c=n(4848);function h({className:e}){const{selectedValue:t,selectValue:n,tabValues:r,block:i}=(0,l.uc)(),o=[],{blockElementScrollPositionUntilNextRender:h}=(0,a.a_)(),u=e=>{const s=e.currentTarget,l=o.indexOf(s),a=r[l].value;a!==t&&(h(s),n(a))},m=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const n=o.indexOf(e.currentTarget)+1;t=o[n]??o[0];break}case"ArrowLeft":{const n=o.indexOf(e.currentTarget)-1;t=o[n]??o[o.length-1];break}}t?.focus()};return(0,c.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":i},e),children:r.map((({value:e,label:n,attributes:r})=>(0,c.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{o.push(e)},onKeyDown:m,onClick:u,...r,className:(0,s.A)("tabs__item",d,r?.className,{"tabs__item--active":t===e}),children:n??e},e)))})}function u({children:e}){return(0,c.jsx)("div",{className:"margin-top--md",children:e})}function m({className:e,children:t}){return(0,c.jsxs)("div",{className:(0,s.A)(r.G.tabs.container,"tabs-container",o),children:[(0,c.jsx)(h,{className:e}),(0,c.jsx)(u,{children:t})]})}function x(e){const t=(0,i.A)(),n=(0,l.OC)(e);return(0,c.jsx)(l.O_,{value:n,children:(0,c.jsx)(m,{className:e.className,children:(0,l.vT)(e.children)})},String(t))}},7751(e,t,n){n.d(t,{OC:()=>x,O_:()=>b,uc:()=>j,vT:()=>c});var s=n(6540),r=n(6347),l=n(205),a=n(7485),i=n(679),o=n(1682),d=n(4848);function c(e){return s.Children.toArray(e).filter((e=>"\n"!==e))}function h(e){const{values:t,children:n}=e;return(0,s.useMemo)((()=>{const e=t??function(e){return s.Children.toArray(e).flatMap((e=>{if(!e)return[];if((0,s.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return[e];const t="string"==typeof e.type?e.type:e.type.name;throw new Error(`Docusaurus error: Bad <Tabs> child <${t}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.\nIf you do not want to pass on a "value" prop to the direct children of <Tabs>, you can also pass an explicit <Tabs values={...}> prop.`)})).map((({props:{value:e,label:t,attributes:n,default:s}})=>({value:e,label:t,attributes:n,default:s})))}(n);return function(e){const t=(0,o.XI)(e,((e,t)=>
1e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>`'${e.value}'`)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[t,n])}function u({value:e,tabValues:t}){return t.some((t=>t.value===e))}function m({queryString:e=!1,groupId:t}){const n=(0,r.W6)(),l=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,a.aZ)(l),(0,s.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(n.location.search);t.set(l,e),n.replace({...n.location,search:t.toString()})}),[l,n])]}function x(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,a=h(e),[o,d]=(0,s.useState)((()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!u({value:e,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:a}))),[c,x]=m({queryString:n,groupId:r}),[p,j]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,r]=(0,i.Dv)(t);return[n,(0,s.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:r}),b=(()=>{const e=c??p;return u({value:e,tabValues:a})?e:null})();(0,l.A)((()=>{b&&d(b)}),[b]);return{selectedValue:o,selectValue:(0,s.useCallback)((e=>{if(!u({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);d(e),x(e),j(e)}),[x,j,a]),tabValues:a,lazy:e.lazy??!1,block:e.block??!1}}const p=(0,s.createContext)(null);function j(){const e=s.useContext(p);if(!e)throw new Error("useTabsContext() must be used within a Tabs component");return e}function b(e){return(0,d.jsx)(p.Provider,{value:e.value,children:e.children})}},8453(e,t,n){n.d(t,{R:()=>a,x:()=>i});var s=n(6540);const r={},l=s.createContext(r);function a(e){const t=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(l.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.