diff --git a/404.html b/404.html index b6face8b1..00715ceac 100644 --- a/404.html +++ b/404.html @@ -15,8 +15,8 @@ - - + +
Skip to main content

404: Page Not Found

If you navigated here from a broken link on the OpenFGA website, please open an issue on GitHub.

Otherwise, try navigating to the home page, and then find or search for the content you need from there.

diff --git a/api/service.html b/api/service.html index e01d39405..9dd377b5c 100644 --- a/api/service.html +++ b/api/service.html @@ -15,8 +15,8 @@ - - + +
Skip to main content
Loading...
diff --git a/assets/js/ed2f6563.30d52695.js b/assets/js/ed2f6563.30d52695.js deleted file mode 100644 index 8521dc061..000000000 --- a/assets/js/ed2f6563.30d52695.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenfga_dev=self.webpackChunkopenfga_dev||[]).push([[2110],{67684:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"content/interacting/transactional-writes","title":"Transactional Writes","description":"Updating multiple relationship tuples in a single transaction","source":"@site/docs/content/interacting/transactional-writes.mdx","sourceDirName":"content/interacting","slug":"/interacting/transactional-writes","permalink":"/docs/interacting/transactional-writes","draft":false,"unlisted":false,"editUrl":"https://github.com/openfga/openfga.dev/edit/main/docs/content/interacting/transactional-writes.mdx","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"slug":"/interacting/transactional-writes","description":"Updating multiple relationship tuples in a single transaction"},"sidebar":"docs","previous":{"title":"Manage Relationships Between Objects","permalink":"/docs/interacting/managing-relationships-between-objects"},"next":{"title":"Query Consistency","permalink":"/docs/interacting/consistency"}}');var n=i(74848),a=i(28453),o=i(89987);const r={sidebar_position:2,slug:"/interacting/transactional-writes",description:"Updating multiple relationship tuples in a single transaction"},l="Transactional Writes",c={},d=[{value:"Before you start",id:"before-you-start",level:2},{value:"Direct access",id:"direct-access",level:3},{value:"Modeling public access",id:"modeling-public-access",level:3},{value:" concepts",id:"-concepts",level:3},{value:"Step by step",id:"step-by-step",level:2},{value:"01. Add and remove relationship tuples in the same transaction",id:"01-add-and-remove-relationship-tuples-in-the-same-transaction",level:3},{value:"02. Add multiple related relationship tuples in the same transaction",id:"02-add-multiple-related-relationship-tuples-in-the-same-transaction",level:3},{value:"Related Sections",id:"related-sections",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components},{Details:i}=t;return i||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"transactional-writes",children:"Transactional Writes"})}),"\n",(0,n.jsx)(o.ZE,{}),"\n",(0,n.jsxs)(t.p,{children:["Using",(0,n.jsx)(o.bU,{format:o.Ed.ShortForm}),", you can update multiple ",(0,n.jsx)(o.OK,{section:"what-is-a-relationship-tuple",linkName:"relationship tuples"})," in a single transaction."]}),"\n",(0,n.jsx)(o.u6,{title:"When to use",appearance:"filled",children:(0,n.jsx)(t.p,{children:"Updating multiple relationship tuples can keep your system state consistent."})}),"\n",(0,n.jsx)(t.h2,{id:"before-you-start",children:"Before you start"}),"\n",(0,n.jsxs)(t.p,{children:["Familiarize yourself with basic ",(0,n.jsx)(o.OK,{})," before completing this guide."]}),"\n",(0,n.jsxs)(i,{children:[(0,n.jsx)("summary",{children:(0,n.jsxs)(t.p,{children:["In the following ",(0,n.jsx)(o.OK,{section:"what-is-an-authorization-model",linkName:"authorization model"}),", there is ",(0,n.jsx)(o.OK,{section:"what-is-a-type",linkName:"type"})," called ",(0,n.jsx)(t.code,{children:"tweet"})," that can have a ",(0,n.jsx)(t.code,{children:"reader"}),". There is another type called ",(0,n.jsx)(t.code,{children:"user"})," that can have a ",(0,n.jsx)(t.code,{children:"follower"})," and ",(0,n.jsx)(t.code,{children:"followed_by"})," relationship."]})}),(0,n.jsx)(o.pB,{configuration:{schema_version:"1.1",type_definitions:[{type:"tweet",relations:{viewer:{this:{}}},metadata:{relations:{viewer:{directly_related_user_types:[{type:"user"},{type:"user",wildcard:{}},{type:"user",relation:"follower"}]}}}},{type:"user",relations:{follower:{this:{}},followed_by:{this:{}}},metadata:{relations:{follower:{directly_related_user_types:[{type:"user"}]},followed_by:{directly_related_user_types:[{type:"user"}]}}}}]}}),(0,n.jsx)("hr",{}),(0,n.jsx)(t.p,{children:"In addition:"}),(0,n.jsx)(t.h3,{id:"direct-access",children:"Direct access"}),(0,n.jsxs)(t.p,{children:["Creating an authorization model and a relationship tuple grants a user access to an object. To learn more, ",(0,n.jsx)(t.a,{href:"/docs/modeling/direct-access",children:"read about Direct Access."})]}),(0,n.jsx)(t.h3,{id:"modeling-public-access",children:"Modeling public access"}),(0,n.jsxs)(t.p,{children:["The following example uses public access. To learn more, ",(0,n.jsx)(t.a,{href:"/docs/modeling/direct-access",children:"read about Public Access."})]}),(0,n.jsxs)(t.h3,{id:"-concepts",children:[(0,n.jsx)(o.bU,{format:o.Ed.ShortForm})," concepts"]}),(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(o.OK,{section:"what-is-a-type",linkName:"Type"}),": a class of objects that have similar characteristics"]}),"\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(o.OK,{section:"what-is-a-user",linkName:"User"}),": an entity in the system that can be related to an object"]}),"\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(o.OK,{section:"what-is-a-relation",linkName:"Relation"}),": is a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system"]}),"\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(o.OK,{section:"what-is-a-relation",linkName:"Relation"}),": a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system"]}),"\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(o.OK,{section:"what-is-a-relationship-tuple",linkName:"Relationship Tuple"}),": a group stored in ",(0,n.jsx)(o.bU,{format:o.Ed.ShortForm})," that consists of a user, a relation, and an object"]}),"\n"]})]}),"\n",(0,n.jsx)(t.h2,{id:"step-by-step",children:"Step by step"}),"\n",(0,n.jsx)(t.h3,{id:"01-add-and-remove-relationship-tuples-in-the-same-transaction",children:"01. Add and remove relationship tuples in the same transaction"}),"\n",(0,n.jsxs)(t.p,{children:["A call to the Write API can add or delete tuples in your store. For example, the following tuple makes ",(0,n.jsx)(t.code,{children:"tweet:1"})," public by making everyone a ",(0,n.jsx)(t.code,{children:"viewer"}),":"]}),"\n",(0,n.jsx)(o.dp,{relationshipTuples:[{user:"user:*",relation:"viewer",object:"tweet:1"}]}),"\n",(0,n.jsxs)(t.p,{children:["Deleting the previous tuple converts this ",(0,n.jsx)(t.code,{children:"tweet"})," to private:"]}),"\n",(0,n.jsx)(o.dp,{deleteRelationshipTuples:[{user:"user:*",relation:"viewer",object:"tweet:1"}]}),"\n",(0,n.jsx)(t.p,{children:"By removing the tuple, we made the tweet visible to no-one, which may not be what we want."}),"\n",(0,n.jsxs)(t.p,{children:["The Write API allows you to send up to 100 unique tuples in the request. (This limit applies to the sum of both writes and deletes in that request). This means we can submit one API call that converts the ",(0,n.jsx)(t.code,{children:"tweet"})," from public to visible to only the ",(0,n.jsx)(t.code,{children:"user"}),"'s followers."]}),"\n",(0,n.jsx)(o.dp,{relationshipTuples:[{_description:"Anne's followers can view tweet:1",user:"user:anne#follower",relation:"viewer",object:"tweet:1"}],deleteRelationshipTuples:[{_description:"tweet:1 is no longer viewable by everyone (*)",user:"user:*",relation:"viewer",object:"tweet:1"}],allowedLanguages:[o.NH.JS_SDK,o.NH.GO_SDK,o.NH.DOTNET_SDK,o.NH.PYTHON_SDK,o.NH.JAVA_SDK,o.NH.CURL,o.NH.RPC]}),"\n",(0,n.jsx)(t.h3,{id:"02-add-multiple-related-relationship-tuples-in-the-same-transaction",children:"02. Add multiple related relationship tuples in the same transaction"}),"\n",(0,n.jsxs)(t.p,{children:["Sending multiple tuples per request can also help maintain consistency. For example, if ",(0,n.jsx)(t.code,{children:"anne"})," follows ",(0,n.jsx)(t.code,{children:"becky"}),", you can save the following two tuples or neither of them:"]}),"\n",(0,n.jsx)(o.AI,{relationshipTuples:[{_description:"Anne is a follower of Becky",user:"user:anne",relation:"follower",object:"user:becky"},{_description:"Becky is followed by Anne",user:"user:becky",relation:"followed_by",object:"user:anne"}]}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["In this case, the type ",(0,n.jsx)(t.code,{children:"user"})," exists because users can be related to each other, so users now are a type in the system."]})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(o.bU,{format:o.Ed.LongForm})," service attempts to perform all the changes sent in a single Write API call in one transaction. If it cannot complete all the changes, it rejects all of them."]}),"\n",(0,n.jsx)(t.h2,{id:"related-sections",children:"Related Sections"}),"\n",(0,n.jsx)(o.XQ,{description:"Check the following sections for more on how to update tuples.",relatedLinks:[{title:"Update relationship tuples in SDK",description:"Learn about how to update relationship tuples in SDK.",link:"../getting-started/update-tuples",id:"../getting-started/update-tuples"},{title:"{ProductName} API",description:"Details on the write API in the {ProductName} reference guide.",link:"/api/service#Relationship%20Tuples/Write"}]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/ed2f6563.e908a94b.js b/assets/js/ed2f6563.e908a94b.js new file mode 100644 index 000000000..07b70da8a --- /dev/null +++ b/assets/js/ed2f6563.e908a94b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenfga_dev=self.webpackChunkopenfga_dev||[]).push([[2110],{67684:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"content/interacting/transactional-writes","title":"Transactional Writes","description":"Updating multiple relationship tuples in a single transaction","source":"@site/docs/content/interacting/transactional-writes.mdx","sourceDirName":"content/interacting","slug":"/interacting/transactional-writes","permalink":"/docs/interacting/transactional-writes","draft":false,"unlisted":false,"editUrl":"https://github.com/openfga/openfga.dev/edit/main/docs/content/interacting/transactional-writes.mdx","tags":[],"version":"current","sidebarPosition":2,"frontMatter":{"sidebar_position":2,"slug":"/interacting/transactional-writes","description":"Updating multiple relationship tuples in a single transaction"},"sidebar":"docs","previous":{"title":"Manage Relationships Between Objects","permalink":"/docs/interacting/managing-relationships-between-objects"},"next":{"title":"Query Consistency","permalink":"/docs/interacting/consistency"}}');var s=i(74848),a=i(28453),r=i(89987);const o={sidebar_position:2,slug:"/interacting/transactional-writes",description:"Updating multiple relationship tuples in a single transaction"},l="Transactional Writes",c={},d=[{value:"Before you start",id:"before-you-start",level:2},{value:"Direct access",id:"direct-access",level:3},{value:"Modeling public access",id:"modeling-public-access",level:3},{value:" concepts",id:"-concepts",level:3},{value:"Step by step",id:"step-by-step",level:2},{value:"01. Add and remove relationship tuples in the same transaction",id:"01-add-and-remove-relationship-tuples-in-the-same-transaction",level:3},{value:"02. Add multiple related relationship tuples in the same transaction",id:"02-add-multiple-related-relationship-tuples-in-the-same-transaction",level:3},{value:"Related Sections",id:"related-sections",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components},{Details:i}=t;return i||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"transactional-writes",children:"Transactional Writes"})}),"\n",(0,s.jsx)(r.ZE,{}),"\n",(0,s.jsxs)(t.p,{children:["Using",(0,s.jsx)(r.bU,{format:r.Ed.ShortForm}),", you can update multiple ",(0,s.jsx)(r.OK,{section:"what-is-a-relationship-tuple",linkName:"relationship tuples"})," in a single transaction."]}),"\n",(0,s.jsx)(r.u6,{title:"When to use",appearance:"filled",children:(0,s.jsx)(t.p,{children:"Updating multiple relationship tuples can keep your system state consistent."})}),"\n",(0,s.jsx)(t.h2,{id:"before-you-start",children:"Before you start"}),"\n",(0,s.jsxs)(t.p,{children:["Familiarize yourself with basic ",(0,s.jsx)(r.OK,{})," before completing this guide."]}),"\n",(0,s.jsxs)(i,{children:[(0,s.jsx)("summary",{children:(0,s.jsxs)(t.p,{children:["In the following ",(0,s.jsx)(r.OK,{section:"what-is-an-authorization-model",linkName:"authorization model"}),", there is ",(0,s.jsx)(r.OK,{section:"what-is-a-type",linkName:"type"})," called ",(0,s.jsx)(t.code,{children:"tweet"})," that can have a ",(0,s.jsx)(t.code,{children:"reader"}),". There is another type called ",(0,s.jsx)(t.code,{children:"user"})," that can have a ",(0,s.jsx)(t.code,{children:"follower"})," and ",(0,s.jsx)(t.code,{children:"followed_by"})," relationship."]})}),(0,s.jsx)(r.pB,{configuration:{schema_version:"1.1",type_definitions:[{type:"tweet",relations:{viewer:{this:{}}},metadata:{relations:{viewer:{directly_related_user_types:[{type:"user"},{type:"user",wildcard:{}},{type:"user",relation:"follower"}]}}}},{type:"user",relations:{follower:{this:{}},followed_by:{this:{}}},metadata:{relations:{follower:{directly_related_user_types:[{type:"user"}]},followed_by:{directly_related_user_types:[{type:"user"}]}}}}]}}),(0,s.jsx)("hr",{}),(0,s.jsx)(t.p,{children:"In addition:"}),(0,s.jsx)(t.h3,{id:"direct-access",children:"Direct access"}),(0,s.jsxs)(t.p,{children:["Creating an authorization model and a relationship tuple grants a user access to an object. To learn more, ",(0,s.jsx)(t.a,{href:"/docs/modeling/direct-access",children:"read about Direct Access."})]}),(0,s.jsx)(t.h3,{id:"modeling-public-access",children:"Modeling public access"}),(0,s.jsxs)(t.p,{children:["The following example uses public access. To learn more, ",(0,s.jsx)(t.a,{href:"/docs/modeling/direct-access",children:"read about Public Access."})]}),(0,s.jsxs)(t.h3,{id:"-concepts",children:[(0,s.jsx)(r.bU,{format:r.Ed.ShortForm})," concepts"]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(r.OK,{section:"what-is-a-type",linkName:"Type"}),": a class of objects that have similar characteristics"]}),"\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(r.OK,{section:"what-is-a-user",linkName:"User"}),": an entity in the system that can be related to an object"]}),"\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(r.OK,{section:"what-is-a-relation",linkName:"Relation"}),": is a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system"]}),"\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(r.OK,{section:"what-is-a-relation",linkName:"Relation"}),": a string defined in the type definition of an authorization model that defines the possibility of a relationship between an object of the same type as the type definition and a user in the system"]}),"\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(r.OK,{section:"what-is-a-relationship-tuple",linkName:"Relationship Tuple"}),": a group stored in ",(0,s.jsx)(r.bU,{format:r.Ed.ShortForm})," that consists of a user, a relation, and an object"]}),"\n"]})]}),"\n",(0,s.jsx)(t.h2,{id:"step-by-step",children:"Step by step"}),"\n",(0,s.jsx)(t.h3,{id:"01-add-and-remove-relationship-tuples-in-the-same-transaction",children:"01. Add and remove relationship tuples in the same transaction"}),"\n",(0,s.jsxs)(t.p,{children:["A call to the Write API can add or delete tuples in your store. For example, the following tuple makes ",(0,s.jsx)(t.code,{children:"tweet:1"})," public by making everyone a ",(0,s.jsx)(t.code,{children:"viewer"}),":"]}),"\n",(0,s.jsx)(r.dp,{relationshipTuples:[{user:"user:*",relation:"viewer",object:"tweet:1"}]}),"\n",(0,s.jsxs)(t.p,{children:["Deleting the previous tuple converts this ",(0,s.jsx)(t.code,{children:"tweet"})," to private:"]}),"\n",(0,s.jsx)(r.dp,{deleteRelationshipTuples:[{user:"user:*",relation:"viewer",object:"tweet:1"}]}),"\n",(0,s.jsx)(t.p,{children:"By removing the tuple, we made the tweet visible to no-one, which may not be what we want."}),"\n",(0,s.jsxs)(i,{children:[(0,s.jsx)("summary",{children:"Limitations on duplicate tuples in a single request"}),(0,s.jsx)("br",{}),(0,s.jsxs)(t.p,{children:["When using the Write API, you cannot include the same tuple (same user, relation, and object) in both the writes and deletes arrays within a single request. The API will return an error with code ",(0,s.jsx)(t.code,{children:"cannot_allow_duplicate_tuples_in_one_request"})," if duplicate tuples are detected."]}),(0,s.jsx)(t.p,{children:"For example, this request would fail:"}),(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'curl -X POST \'http://localhost:8080/stores/{store_id}/write\' \\\n -H \'content-type: application/json\' \\\n --data \'{\n "writes": {\n "tuple_keys": [{\n "user": "user:anne",\n "relation": "member",\n "object": "group:2"\n }]\n },\n "deletes": {\n "tuple_keys": [{\n "user": "user:anne",\n "relation": "member",\n "object": "group:2"\n }]\n }\n }\'\n'})})]}),"\n",(0,s.jsxs)(t.p,{children:["The Write API allows you to send up to 100 unique tuples in the request. (This limit applies to the sum of both writes and deletes in that request). This means we can submit one API call that converts the ",(0,s.jsx)(t.code,{children:"tweet"})," from public to visible to only the ",(0,s.jsx)(t.code,{children:"user"}),"'s followers."]}),"\n",(0,s.jsx)(r.dp,{relationshipTuples:[{_description:"Anne's followers can view tweet:1",user:"user:anne#follower",relation:"viewer",object:"tweet:1"}],deleteRelationshipTuples:[{_description:"tweet:1 is no longer viewable by everyone (*)",user:"user:*",relation:"viewer",object:"tweet:1"}],allowedLanguages:[r.NH.JS_SDK,r.NH.GO_SDK,r.NH.DOTNET_SDK,r.NH.PYTHON_SDK,r.NH.JAVA_SDK,r.NH.CURL,r.NH.RPC]}),"\n",(0,s.jsx)(t.h3,{id:"02-add-multiple-related-relationship-tuples-in-the-same-transaction",children:"02. Add multiple related relationship tuples in the same transaction"}),"\n",(0,s.jsxs)(t.p,{children:["Sending multiple tuples per request can also help maintain consistency. For example, if ",(0,s.jsx)(t.code,{children:"anne"})," follows ",(0,s.jsx)(t.code,{children:"becky"}),", you can save the following two tuples or neither of them:"]}),"\n",(0,s.jsx)(r.AI,{relationshipTuples:[{_description:"Anne is a follower of Becky",user:"user:anne",relation:"follower",object:"user:becky"},{_description:"Becky is followed by Anne",user:"user:becky",relation:"followed_by",object:"user:anne"}]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["In this case, the type ",(0,s.jsx)(t.code,{children:"user"})," exists because users can be related to each other, so users now are a type in the system."]})}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(r.bU,{format:r.Ed.LongForm})," service attempts to perform all the changes sent in a single Write API call in one transaction. If it cannot complete all the changes, it rejects all of them."]}),"\n",(0,s.jsx)(t.h2,{id:"related-sections",children:"Related Sections"}),"\n",(0,s.jsx)(r.XQ,{description:"Check the following sections for more on how to update tuples.",relatedLinks:[{title:"Update relationship tuples in SDK",description:"Learn about how to update relationship tuples in SDK.",link:"../getting-started/update-tuples",id:"../getting-started/update-tuples"},{title:"{ProductName} API",description:"Details on the write API in the {ProductName} reference guide.",link:"/api/service#Relationship%20Tuples/Write"}]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/main.fb4250d6.js b/assets/js/main.cf023dc7.js similarity index 99% rename from assets/js/main.fb4250d6.js rename to assets/js/main.cf023dc7.js index 996256859..fc5a888f7 100644 --- a/assets/js/main.fb4250d6.js +++ b/assets/js/main.cf023dc7.js @@ -1,8 +1,8 @@ -/*! For license information please see main.fb4250d6.js.LICENSE.txt */ +/*! For license information please see main.cf023dc7.js.LICENSE.txt */ (self.webpackChunkopenfga_dev=self.webpackChunkopenfga_dev||[]).push([[8792],{5391:(e,t,n)=>{"use strict";function r(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ts});const s=function(){for(var e,t,n=0,s="";n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SCHEMA_VERSION=void 0;const r=n(18397);t.DEFAULT_SCHEMA_VERSION=r.SchemaVersion.OneDotOne},78727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SCHEMA_VERSION=t.LANGUAGE_NAME=t.enums=void 0;const r=n(93964),s=n(18397),i=n(58069);Object.defineProperty(t,"LANGUAGE_NAME",{enumerable:!0,get:function(){return i.LANGUAGE_NAME}});const o=n(34285);Object.defineProperty(t,"DEFAULT_SCHEMA_VERSION",{enumerable:!0,get:function(){return o.DEFAULT_SCHEMA_VERSION}}),t.enums={Keyword:r.Keyword,SchemaVersion:s.SchemaVersion};const a={LANGUAGE_NAME:i.LANGUAGE_NAME,DEFAULT_SCHEMA_VERSION:o.DEFAULT_SCHEMA_VERSION,enums:t.enums};t.default=a},93964:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedKeywords=t.Keyword=void 0,function(e){e.TYPE="type",e.RELATIONS="relations",e.SELF="self",e.DEFINE="define",e.AS="as",e.OR="or",e.AND="and",e.FROM="from",e.WITH="with",e.BUT_NOT="but not",e.MODEL="model",e.SCHEMA="schema",e.MODULE="module",e.EXTEND="extend",e.CONDITION="condition"}(n||(t.Keyword=n={})),function(e){e.THIS="this"}(r||(t.ReservedKeywords=r={}))},58069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LANGUAGE_NAME=void 0,t.LANGUAGE_NAME="dsl.openfga"},18397:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaVersion=void 0,function(e){e.OneDotZero="1.0",e.OneDotOne="1.1",e.OneDotTwo="1.2"}(n||(t.SchemaVersion=n={}))},43457:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SINGLE_INDENTATION=void 0,t.SINGLE_INDENTATION=" "},48563:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultDocumentationMap=void 0;const s=r(n(17846));function i(e){return s.default.literalNames[e].replace(/'/g,"")}t.defaultDocumentationMap={[i(s.default.TYPE)]:{summary:"A type or grouping of objects that have similar characteristics. For example:\n- workspace\n- repository\n- organization\n- document",link:"https://openfga.dev/docs/concepts#what-is-a-type"},[i(s.default.RELATIONS)]:{summary:"A **relation** defines the possible relationship between an [object](https://openfga.dev/docs/concepts#what-is-an-object) and a [user](https://openfga.dev/docs/concepts#what-is-a-user).",link:"https://openfga.dev/docs/concepts#what-is-a-relation"},[i(s.default.AND)]:{summary:"The intersection operator used to indicate that a relationship exists if the user is in all the sets of users.",link:"https://openfga.dev/docs/configuration-language#the-intersection-operator"},[i(s.default.OR)]:{summary:"The union operator is used to indicate that a relationship exists if the user is in any of the sets of users",link:"https://openfga.dev/docs/configuration-language#the-union-operator"},[i(s.default.BUT_NOT)]:{summary:"The exclusion operator is used to indicate that a relationship exists if the user is in the base userset, but not in the excluded userset.",link:"https://openfga.dev/docs/configuration-language#the-exclusion-operator"},[i(s.default.FROM)]:{summary:"Allows referencing relations on related objects.",link:"https://openfga.dev/docs/configuration-language#referencing-relations-on-related-objects"},[i(s.default.SCHEMA)]:{summary:"Defines the schema version to be used, with currently only support for '1.1'. Note that the 1.0 schema is deprecated.",link:"https://openfga.dev/docs/modeling/migrating/migrating-schema-1-1"}}},18537:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.validator=t.constants=t.sampleAuthorizationModels=t.graphBuilder=t.tools=t.theming=void 0;const a=o(n(78727));t.constants=a.default;const l=o(n(14456));t.validator=l.default,t.theming=i(n(77903)),t.tools=i(n(46045)),t.graphBuilder=i(n(90154));const c=o(n(89089));t.sampleAuthorizationModels=c.default},79901:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNever=function(e){throw new Error(`Assertion failed. Unexpected value: '${e}'`)}},89089:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o={entitlements:Promise.resolve().then((()=>i(n(99998)))),expenses:Promise.resolve().then((()=>i(n(41907)))),gdrive:Promise.resolve().then((()=>i(n(19577)))),generic:Promise.resolve().then((()=>i(n(43163)))),github:Promise.resolve().then((()=>i(n(89885)))),iot:Promise.resolve().then((()=>i(n(36942)))),slack:Promise.resolve().then((()=>i(n(60694)))),customRoles:Promise.resolve().then((()=>i(n(32313))))};t.default=o},77903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportedThemes=t.OpenFgaDslThemeTokenType=t.OpenFgaDslThemeToken=t.SupportedTheme=void 0;const r=n(70714),s=n(89980);var i=n(89980);Object.defineProperty(t,"SupportedTheme",{enumerable:!0,get:function(){return i.SupportedTheme}}),Object.defineProperty(t,"OpenFgaDslThemeToken",{enumerable:!0,get:function(){return i.OpenFgaDslThemeToken}}),Object.defineProperty(t,"OpenFgaDslThemeTokenType",{enumerable:!0,get:function(){return i.OpenFgaDslThemeTokenType}}),t.supportedThemes={[s.SupportedTheme.OpenFgaDark]:r.openfgaDark}},70714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openfgaDark=void 0;const r=n(89980);t.openfgaDark={name:"openfga-dark",baseTheme:"vs-dark",background:{color:"#141517"},colors:{[r.OpenFgaDslThemeTokenType.DEFAULT]:"#FFFFFF",[r.OpenFgaDslThemeTokenType.COMMENT]:"#737981",[r.OpenFgaDslThemeTokenType.KEYWORD]:"#AAAAAA",[r.OpenFgaDslThemeTokenType.MODULE]:"#79ED83",[r.OpenFgaDslThemeTokenType.EXTEND]:"#79ED83",[r.OpenFgaDslThemeTokenType.TYPE]:"#79ED83",[r.OpenFgaDslThemeTokenType.RELATION]:"#20F1F5",[r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE]:"#CEEC93",[r.OpenFgaDslThemeTokenType.CONDITION]:"#79ED83",[r.OpenFgaDslThemeTokenType.CONDITION_PARAM]:"#20F1F5",[r.OpenFgaDslThemeTokenType.CONDITION_PARAM_TYPE]:"#AAAAAA"},styles:{}}},89980:(e,t)=>{"use strict";var n,r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.SupportedTheme=t.OpenFgaDslThemeToken=t.OpenFgaDslThemeTokenType=void 0,function(e){e.DEFAULT="default",e.COMMENT="comment",e.KEYWORD="keyword",e.EXTEND="extend",e.TYPE="type",e.MODULE="module",e.RELATION="relation",e.DIRECTLY_ASSIGNABLE="directly-assignable",e.CONDITION="condition",e.CONDITION_PARAM="condition-param",e.CONDITION_PARAM_TYPE="condition-param-type"}(n||(t.OpenFgaDslThemeTokenType=n={})),function(e){e.COMMENT="comment",e.DELIMITER_BRACKET_RELATION_DEFINITION="delimiter.bracket.relation-definition",e.DELIMITER_BRACKET_TYPE_RESTRICTIONS="delimiter.bracket.type-restrictions",e.DELIMITER_BRACKET_CONDITION_EXPRESSION="delimiter.bracket.condition-expression",e.DELIMITER_COLON_TYPE_RESTRICTIONS="delimiter.colon.type-restrictions",e.DELIMITER_COMMA_TYPE_RESTRICTIONS="delimiter.comma.type-restrictions",e.DELIMITER_COLON_CONDITION_PARAM="delimiter.colon.condition",e.DELIMITER_COMMA_CONDITION_PARAM="delimiter.comma.condition",e.DELIMITER_DEFINE_COLON="delimiter.colon.define",e.DELIMITER_HASHTAG_TYPE_RESTRICTIONS="delimiter.hashtag.type-restrictions",e.KEYWORD_AS="keyword.as",e.KEYWORD_DEFINE="keyword.define",e.KEYWORD_FROM="keyword.from",e.KEYWORD_MODEL="keyword.model",e.KEYWORD_RELATIONS="keyword.relations",e.KEYWORD_SCHEMA="keyword.schema",e.KEYWORD_MODULE="keyword.module",e.KEYWORD_EXTEND="keyword.extend",e.KEYWORD_SELF="keyword.self",e.KEYWORD_TYPE="keyword.type",e.KEYWORD_CONDITION="keyword.condition",e.KEYWORD_WITH="keyword.with",e.OPERATOR_AND="keyword.operator.word.intersection",e.OPERATOR_BUT_NOT="keyword.operator.word.exclusion",e.OPERATOR_OR="keyword.operator.word.union",e.VALUE_CONDITION="entity.name.function.condition",e.VALUE_RELATION_COMPUTED="computed.relation.value",e.VALUE_RELATION_NAME="entity.name.function.member.relation.name",e.VALUE_RELATION_TUPLE_TO_USERSET_COMPUTED="computed.tupletouserset.relation.value",e.VALUE_RELATION_TUPLE_TO_USERSET_TUPLESET="tupleset.tupletouserset.relation.value",e.VALUE_MODULE="module.value",e.VALUE_SCHEMA="schema.value",e.VALUE_TYPE_NAME="support.class.type.name.value",e.VALUE_TYPE_RESTRICTIONS_RELATION="variable.parameter.type-restrictions.relation.value",e.VALUE_TYPE_RESTRICTIONS_TYPE="variable.parameter.type-restrictions.type.value",e.VALUE_TYPE_RESTRICTIONS_WILDCARD="variable.parameter.type-restrictions.wildcard.value",e.CONDITION_PARAM="variable.parameter.name.condition",e.CONDITION_PARAM_TYPE="variable.parameter.type.condition",e.CONDITION_SYMBOL="identifier.symbol.condition"}(r||(t.OpenFgaDslThemeToken=r={})),function(e){e.OpenFgaDark="openfga-dark"}(s||(t.SupportedTheme=s={}))},77322:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getThemeTokenStyle=function(e,t){var n,i,o;return{foreground:(null===(n=t.rawColorOverrides)||void 0===n?void 0:n[e])||t.colors[s[e||r.OpenFgaDslThemeTokenType.DEFAULT]],fontStyle:(null===(i=t.rawStylesOverrides)||void 0===i?void 0:i[e])||(null===(o=t.styles)||void 0===o?void 0:o[s[e||r.OpenFgaDslThemeTokenType.DEFAULT]])}};const r=n(89980),s={[r.OpenFgaDslThemeToken.COMMENT]:r.OpenFgaDslThemeTokenType.COMMENT,[r.OpenFgaDslThemeToken.DELIMITER_BRACKET_RELATION_DEFINITION]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.DELIMITER_BRACKET_TYPE_RESTRICTIONS]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.DELIMITER_BRACKET_CONDITION_EXPRESSION]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.DELIMITER_COLON_TYPE_RESTRICTIONS]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.DELIMITER_COMMA_TYPE_RESTRICTIONS]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.DELIMITER_COLON_CONDITION_PARAM]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.DELIMITER_COMMA_CONDITION_PARAM]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.DELIMITER_DEFINE_COLON]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.DELIMITER_HASHTAG_TYPE_RESTRICTIONS]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.KEYWORD_AS]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_DEFINE]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_FROM]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_MODEL]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_MODULE]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_EXTEND]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_RELATIONS]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_SCHEMA]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_SELF]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.KEYWORD_TYPE]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.OPERATOR_AND]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.OPERATOR_BUT_NOT]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.OPERATOR_OR]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_CONDITION]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.KEYWORD_WITH]:r.OpenFgaDslThemeTokenType.KEYWORD,[r.OpenFgaDslThemeToken.VALUE_CONDITION]:r.OpenFgaDslThemeTokenType.CONDITION,[r.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.VALUE_RELATION_NAME]:r.OpenFgaDslThemeTokenType.RELATION,[r.OpenFgaDslThemeToken.VALUE_RELATION_TUPLE_TO_USERSET_COMPUTED]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.VALUE_RELATION_TUPLE_TO_USERSET_TUPLESET]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.VALUE_MODULE]:r.OpenFgaDslThemeTokenType.TYPE,[r.OpenFgaDslThemeToken.VALUE_SCHEMA]:r.OpenFgaDslThemeTokenType.DEFAULT,[r.OpenFgaDslThemeToken.VALUE_TYPE_NAME]:r.OpenFgaDslThemeTokenType.TYPE,[r.OpenFgaDslThemeToken.VALUE_TYPE_RESTRICTIONS_RELATION]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.VALUE_TYPE_RESTRICTIONS_TYPE]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.VALUE_TYPE_RESTRICTIONS_WILDCARD]:r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE,[r.OpenFgaDslThemeToken.CONDITION_PARAM]:r.OpenFgaDslThemeTokenType.CONDITION_PARAM,[r.OpenFgaDslThemeToken.CONDITION_PARAM_TYPE]:r.OpenFgaDslThemeTokenType.CONDITION_PARAM_TYPE,[r.OpenFgaDslThemeToken.CONDITION_SYMBOL]:r.OpenFgaDslThemeTokenType.DEFAULT}},46045:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrismExtensions=t.MonacoExtensions=void 0;var r=n(40785);Object.defineProperty(t,"MonacoExtensions",{enumerable:!0,get:function(){return r.MonacoExtensions}});var s=n(66099);Object.defineProperty(t,"PrismExtensions",{enumerable:!0,get:function(){return s.PrismExtensions}})},40785:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.MonacoExtensions=void 0;const o=n(78727),a=i(n(93653)),l=n(54950),c=n(33776),u=n(99179);t.MonacoExtensions={LANGUAGE_NAME:o.LANGUAGE_NAME,registerDSL:l.registerDSL,monacoThemes:c.monacoThemes,validateDSL:u.validateDSL,languageDefinition:a,buildMonacoTheme:c.buildMonacoTheme}},93653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.language=void 0,t.getLanguageConfiguration=function(e){return{comments:{lineComment:"#"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:type|relations|model|define).*?:\\s*$"),action:{indentAction:e.languages.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}}};const r=n(93964),s=n(78727),i=n(77903);t.language={defaultToken:"",tokenPostfix:`.${s.LANGUAGE_NAME}`,keywords:[],operators:[],identifiers:new RegExp(/(?!self)(?:\w|-[a-zA-Z])*/),brackets:[{open:"[",close:"]",token:i.OpenFgaDslThemeToken.DELIMITER_BRACKET_TYPE_RESTRICTIONS},{open:"(",close:")",token:i.OpenFgaDslThemeToken.DELIMITER_BRACKET_RELATION_DEFINITION},{open:"{",close:"}",token:i.OpenFgaDslThemeToken.DELIMITER_BRACKET_CONDITION_EXPRESSION}],tokenizer:{root:[{include:"@comment"},{include:"@whitespace"},[new RegExp(/(\[)/),"@brackets","@restrictions"],[new RegExp(/(\{)/),"@brackets","@cel_symbols"],[new RegExp(/[{}[\]()]/),"@brackets"],[new RegExp(/(schema)(\s+)(\d\.\d)/),[i.OpenFgaDslThemeToken.KEYWORD_SCHEMA,"@whitespace",i.OpenFgaDslThemeToken.VALUE_SCHEMA]],[new RegExp(/(module)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.KEYWORD_MODULE,"@whitespace",i.OpenFgaDslThemeToken.VALUE_MODULE]],[new RegExp(/(extend)(\s+)(type)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.KEYWORD_EXTEND,"@whitespace",i.OpenFgaDslThemeToken.KEYWORD_TYPE,"@whitespace",i.OpenFgaDslThemeToken.VALUE_TYPE_NAME]],[new RegExp(/(type)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.KEYWORD_TYPE,"@whitespace",i.OpenFgaDslThemeToken.VALUE_TYPE_NAME]],[new RegExp(/(define)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.KEYWORD_DEFINE,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_NAME]],[new RegExp(/(or)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.OPERATOR_OR,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]],[new RegExp(/(and)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.OPERATOR_AND,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]],[new RegExp(/(but not)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.OPERATOR_BUT_NOT,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]],[new RegExp(/(as)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.KEYWORD_AS,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]],[new RegExp(/(:)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.DELIMITER_DEFINE_COLON,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_COMPUTED]],[new RegExp(/(@identifiers)(\s+)(from)(\s+)(@identifiers)/),[i.OpenFgaDslThemeToken.VALUE_RELATION_TUPLE_TO_USERSET_COMPUTED,"@whitespace",i.OpenFgaDslThemeToken.KEYWORD_FROM,"@whitespace",i.OpenFgaDslThemeToken.VALUE_RELATION_TUPLE_TO_USERSET_TUPLESET]],[new RegExp(/(@identifiers)(\s*)(:)(\s*)(@identifiers)(<@identifiers>)(,?)(\s*)/),[i.OpenFgaDslThemeToken.CONDITION_PARAM,"@whitespace",i.OpenFgaDslThemeToken.DELIMITER_COLON_CONDITION_PARAM,"@whitespace",i.OpenFgaDslThemeToken.CONDITION_PARAM_TYPE,i.OpenFgaDslThemeToken.CONDITION_PARAM_TYPE,i.OpenFgaDslThemeToken.DELIMITER_COMMA_CONDITION_PARAM,"@whitespace"]],[new RegExp(/(@identifiers)(\s*)(:)(\s*)(@identifiers)(,?)(\s*)/),[i.OpenFgaDslThemeToken.CONDITION_PARAM,"@whitespace",i.OpenFgaDslThemeToken.DELIMITER_COLON_CONDITION_PARAM,"@whitespace",i.OpenFgaDslThemeToken.CONDITION_PARAM_TYPE,i.OpenFgaDslThemeToken.DELIMITER_COMMA_CONDITION_PARAM,"@whitespace"]],[new RegExp(/(condition)(\s*)(@identifiers)(\s*)(\()/),[i.OpenFgaDslThemeToken.KEYWORD_CONDITION,"@whitespace",i.OpenFgaDslThemeToken.VALUE_CONDITION,"@whitespace","@brackets"]],[":",i.OpenFgaDslThemeToken.DELIMITER_DEFINE_COLON],[",",i.OpenFgaDslThemeToken.DELIMITER_COMMA_TYPE_RESTRICTIONS],[r.Keyword.BUT_NOT,i.OpenFgaDslThemeToken.OPERATOR_BUT_NOT],[r.Keyword.SELF,i.OpenFgaDslThemeToken.KEYWORD_SELF],[new RegExp(/@identifiers/),{cases:{[r.Keyword.AND]:i.OpenFgaDslThemeToken.OPERATOR_AND,[r.Keyword.OR]:i.OpenFgaDslThemeToken.OPERATOR_OR,[r.Keyword.TYPE]:i.OpenFgaDslThemeToken.KEYWORD_TYPE,[r.Keyword.RELATIONS]:i.OpenFgaDslThemeToken.KEYWORD_RELATIONS,[r.Keyword.DEFINE]:i.OpenFgaDslThemeToken.KEYWORD_DEFINE,[r.Keyword.FROM]:i.OpenFgaDslThemeToken.KEYWORD_FROM,[r.Keyword.WITH]:i.OpenFgaDslThemeToken.KEYWORD_WITH,[r.Keyword.CONDITION]:i.OpenFgaDslThemeToken.KEYWORD_CONDITION,[r.Keyword.AS]:i.OpenFgaDslThemeToken.KEYWORD_AS,[r.Keyword.MODEL]:i.OpenFgaDslThemeToken.KEYWORD_MODEL,[r.Keyword.SCHEMA]:{token:i.OpenFgaDslThemeToken.KEYWORD_SCHEMA},"@default":i.OpenFgaDslThemeToken.VALUE_RELATION_TUPLE_TO_USERSET_TUPLESET}}]],cel_symbols:[[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/(\w|-[a-zA-Z])+/,i.OpenFgaDslThemeToken.CONDITION_SYMBOL],[/(<|<=|>=|>|=|!=|&&|\|\||\.|null|in)/,i.OpenFgaDslThemeToken.CONDITION_SYMBOL],[/\[|\]|\(|\)/,"@brackets"],[/\}/,"@brackets","@pop"]],string_double:[[/[^\\"]+/,"string"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],restrictions:[{include:"@whitespace"},[new RegExp(`${r.Keyword.WITH}`),i.OpenFgaDslThemeToken.KEYWORD_WITH],[/(\w|-[a-zA-Z])+/,i.OpenFgaDslThemeToken.VALUE_TYPE_RESTRICTIONS_TYPE],[/(:)(\*)/,[i.OpenFgaDslThemeToken.DELIMITER_COLON_TYPE_RESTRICTIONS,i.OpenFgaDslThemeToken.VALUE_TYPE_RESTRICTIONS_WILDCARD]],[/#/,i.OpenFgaDslThemeToken.DELIMITER_HASHTAG_TYPE_RESTRICTIONS],[/,/,i.OpenFgaDslThemeToken.DELIMITER_COMMA_TYPE_RESTRICTIONS],[/\]/,"@brackets","@pop"]],whitespace:[[new RegExp(/\s+/),"white"]],comment:[[new RegExp(/\s+(#.*)/),i.OpenFgaDslThemeToken.COMMENT],[new RegExp(/^\s*(#.*)/),i.OpenFgaDslThemeToken.COMMENT]]}}},64101:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.provideCodeActions=void 0;const r=n(41418),s=n(93964),i=n(18397),o=n(43457),a={[r.errors.ValidationError.MissingDefinition]:{[i.SchemaVersion.OneDotZero]:({model:e,marker:t,relation:n})=>{const r=e.getLineContent(t.startLineNumber);return{startColumn:0,title:`Fix: add definition for \`${n}\`.`,text:`${o.SINGLE_INDENTATION}${o.SINGLE_INDENTATION}${s.Keyword.DEFINE} ${n} ${s.Keyword.AS} ${s.Keyword.SELF}\n${r}`}},[i.SchemaVersion.OneDotOne]:({model:e,marker:t,relation:n})=>{const r=e.getLineContent(t.startLineNumber);return{startColumn:0,title:`Fix: add definition for \`${n}\`.`,text:`${o.SINGLE_INDENTATION}${o.SINGLE_INDENTATION}${s.Keyword.DEFINE} ${n}: [typeName]\n${r}`}},[i.SchemaVersion.OneDotTwo]:({model:e,marker:t,relation:n})=>{const r=e.getLineContent(t.startLineNumber);return{startColumn:0,title:`Fix: add definition for \`${n}\`.`,text:`${o.SINGLE_INDENTATION}${o.SINGLE_INDENTATION}${s.Keyword.DEFINE} ${n}: [typeName]\n${r}`}}},[r.errors.ValidationError.SelfError]:{[i.SchemaVersion.OneDotZero]:({text:e})=>({title:`Fix: replace \`${e}\` by \`self\`.`,text:s.Keyword.SELF}),[i.SchemaVersion.OneDotOne]:({text:e})=>({title:`Fix: replace \`${e}\` with type restrictions.`,text:"[typeName]"}),[i.SchemaVersion.OneDotTwo]:({text:e})=>({title:`Fix: replace \`${e}\` with type restrictions.`,text:"[typeName]"})},[r.errors.ValidationError.DuplicatedError]:{[i.SchemaVersion.OneDotZero]:({model:e,marker:t,markerRange:n,text:r})=>({startLineNumber:n.startLineNumber-1,startColumn:e.getLineContent(t.startLineNumber-1).length+1,title:`Fix: remove duplicated \`${r}\`.`,text:""}),[i.SchemaVersion.OneDotOne]:({model:e,marker:t,markerRange:n,text:r})=>({startLineNumber:n.startLineNumber-1,startColumn:e.getLineContent(t.startLineNumber-1).length+1,title:`Fix: remove duplicated \`${r}\`.`,text:""}),[i.SchemaVersion.OneDotTwo]:({model:e,marker:t,markerRange:n,text:r})=>({startLineNumber:n.startLineNumber-1,startColumn:e.getLineContent(t.startLineNumber-1).length+1,title:`Fix: remove duplicated \`${r}\`.`,text:""})}};t.provideCodeActions=(e,t)=>(n,r,s)=>{const i=[];return s.markers.map((r=>{const s=n.getOffsetAt({column:r.startColumn,lineNumber:r.startLineNumber}),o=n.getOffsetAt({column:r.endColumn,lineNumber:r.endLineNumber}),l=n.getValue().substr(s,o-s),c=function({markerRange:e,model:t,marker:n,text:r,schemaVersion:s}){var i,o;const{error:l,relation:c}=n.extraInformation||{},u=null===(o=null===(i=a[l])||void 0===i?void 0:i[s])||void 0===o?void 0:o.call(i,{model:t,marker:n,markerRange:e,text:r,relation:c});if(u)return{title:null==u?void 0:u.title,diagnostics:[n],edit:{edits:[{textEdit:{range:e,text:u.text},resource:t.uri,versionId:void 0}]},kind:"quickfix"}}({markerRange:new e.Range(r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn),model:n,marker:r,text:l,schemaVersion:t});c&&i.push(c)})).filter((e=>e)),{actions:i,dispose(){}}}},93920:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.provideCompletionItems=void 0;const r=n(41418),s=n(93964),i=n(43457),o=n(79901),a=n(18397);const l=(e,t={})=>(n,o)=>{let l=[];const c=n.getWordUntilPosition(o),u={startLineNumber:o.lineNumber,endLineNumber:o.lineNumber,startColumn:c.startColumn,endColumn:c.endColumn};return l=2===o.column?[{label:s.Keyword.TYPE,kind:e.languages.CompletionItemKind.Function,insertText:`${s.Keyword.TYPE} \${1:typeName}\n${i.SINGLE_INDENTATION}${s.Keyword.RELATIONS}\n${i.SINGLE_INDENTATION}${i.SINGLE_INDENTATION}${s.Keyword.DEFINE} \${2:relationName}: [\${3:typeName}]`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:"type_group",kind:e.languages.CompletionItemKind.Function,insertText:`${s.Keyword.TYPE} \${1:group}\n${i.SINGLE_INDENTATION}${s.Keyword.RELATIONS}\n${i.SINGLE_INDENTATION}${i.SINGLE_INDENTATION}${s.Keyword.DEFINE} \${2:member}: [\${3:user, group#member}]`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:s.Keyword.TYPE,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.TYPE,range:u},{label:s.Keyword.MODEL,kind:e.languages.CompletionItemKind.Function,insertText:`${s.Keyword.MODEL}\n${i.SINGLE_INDENTATION}${s.Keyword.SCHEMA} \${1:1.1}`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:s.Keyword.MODEL,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.TYPE,range:u},{label:s.Keyword.CONDITION,kind:e.languages.CompletionItemKind.Function,insertText:`${s.Keyword.CONDITION} \${1:conditionName}(\${2:parameterName}: \${3:string}) {\n \${4}\n}`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u}]:4===o.column?[{label:s.Keyword.RELATIONS,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.RELATIONS,range:u}]:o.column>6?[{label:s.Keyword.OR,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.OR,range:u},{label:s.Keyword.AND,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.AND,range:u},{label:s.Keyword.BUT_NOT,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.BUT_NOT,range:u},{label:s.Keyword.FROM,kind:e.languages.CompletionItemKind.Function,insertText:`\${1:relation1} ${s.Keyword.FROM} \${1:relation2}`,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:s.Keyword.FROM,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.FROM,range:u},{label:s.Keyword.CONDITION,kind:e.languages.CompletionItemKind.Keyword,insertText:s.Keyword.CONDITION,range:u}]:6===o.column?[{label:"define-assignable",kind:e.languages.CompletionItemKind.Function,insertText:"define ${1:relationName}: [${2:typeName}]",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:"define-from-other-relation",kind:e.languages.CompletionItemKind.Function,insertText:"define ${1:relationName}: ${2:otherRelationName}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:"define-from-other-relation-assignable",kind:e.languages.CompletionItemKind.Function,insertText:"define ${1:relationName}: [${2:typeName}] or ${3:otherRelationName}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:"define-from-object",kind:e.languages.CompletionItemKind.Function,insertText:"define ${1:relationName}: ${2:relationInRelatedObject} from ${3:relationInThisType}}",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u},{label:"define",kind:e.languages.CompletionItemKind.Keyword,insertText:"define",range:u}]:function(e,t,n,s={}){const i=[];return["entitlements","expenses","gdrive","generic","github","iot","slack","customRoles"].forEach((o=>{const l=null==s?void 0:s[o];l&&i.push({label:`sample-${o}`,kind:e.languages.CompletionItemKind.Struct,insertText:r.transformer.transformJSONToDSL(n===a.SchemaVersion.OneDotOne||n===a.SchemaVersion.OneDotTwo?l:{schema_version:a.SchemaVersion.OneDotZero,type_definitions:l.type_definitions.map((e=>({type:e.type,relations:e.relations})))}),range:t})})),i}(e,u,a.SchemaVersion.OneDotOne,t.samples),{suggestions:l}};t.provideCompletionItems=(e,t=a.SchemaVersion.OneDotZero,n={})=>(r,s)=>{switch(t){case a.SchemaVersion.OneDotTwo:case a.SchemaVersion.OneDotOne:return l(e,n)(r,s);case a.SchemaVersion.OneDotZero:throw new Error("unsupported schema version");default:(0,o.assertNever)(t)}}},84892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerHover=void 0;const r=n(48563);t.providerHover=(e,t=r.defaultDocumentationMap)=>(n,r)=>{const s=n.getWordAtPosition(r);if(!s)return;const{startColumn:i,endColumn:o,word:a}=s,l=function(e,t){const n=t[e];if(!n)return;const{link:r,summary:s}=n,i=[{value:"**Documentation**"},{value:s}];return r&&i.push({value:`[Learn more](${r})`}),i}(a,t);return l?{range:new e.Range(r.lineNumber,i,r.lineNumber,o),contents:l}:void 0}},54950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDSL=void 0;const r=n(78727),s=n(18397),i=n(93653),o=n(84892),a=n(93920),l=n(64101);t.registerDSL=(e,t=s.SchemaVersion.OneDotZero,n)=>{!!e.languages.getLanguages().find((e=>e.id===r.LANGUAGE_NAME))||(e.languages.register({id:r.LANGUAGE_NAME}),e.languages.setLanguageConfiguration(r.LANGUAGE_NAME,(0,i.getLanguageConfiguration)(e)),e.languages.setMonarchTokensProvider(r.LANGUAGE_NAME,i.language),e.languages.registerHoverProvider(r.LANGUAGE_NAME,{provideHover:(0,o.providerHover)(e,n.documentationMap)}),e.languages.registerCompletionItemProvider(r.LANGUAGE_NAME,{provideCompletionItems:(0,a.provideCompletionItems)(e,t)}),e.languages.registerCodeActionProvider(r.LANGUAGE_NAME,{provideCodeActions:(0,l.provideCodeActions)(e,t)}))}},33776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monacoThemes=void 0,t.buildMonacoTheme=o;const r=n(78727),s=n(77903),i=n(77322);function o(e){return{base:e.baseTheme||"vs",inherit:!0,colors:{"editor.background":e.background.color},rules:Object.values(s.OpenFgaDslThemeToken).map((t=>{const n=(0,i.getThemeTokenStyle)(t,e);return Object.assign({token:`${t}.${r.LANGUAGE_NAME}`},n)}))}}const a={};t.monacoThemes=a,Object.values(s.SupportedTheme).forEach((e=>{a[e]=o(s.supportedThemes[e])}))},99179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateDSL=function(e,t){var n,i,o,a;const l=[];try{s.validator.validateDSL(t)}catch(c){if(!c.errors)return l;for(const t of c.errors){let s;if(t instanceof r.DSLSyntaxSingleError)s="SyntaxError";else{if(!(t instanceof r.ModelValidationSingleError))throw new Error("Unhandled Exception: "+JSON.stringify(t,null,4));s="ModelValidationError"}const c={},u=t.metadata;u&&("errorType"in u&&(c.error=u.errorType),["typeName","relation"].forEach((e=>{e in u&&(c[e]=u[e])}))),l.push({message:t.msg,severity:e.MarkerSeverity.Error,startColumn:((null===(n=null==t?void 0:t.column)||void 0===n?void 0:n.start)||0)+1,endColumn:((null===(i=null==t?void 0:t.column)||void 0===i?void 0:i.end)||0)+1,startLineNumber:((null===(o=null==t?void 0:t.line)||void 0===o?void 0:o.start)||0)+1,endLineNumber:((null===(a=null==t?void 0:t.line)||void 0===a?void 0:a.end)||0)+1,source:s,extraInformation:c})}}return l};const r=n(26351),s=n(41418)},66099:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrismExtensions=void 0;const r=n(4231),s=n(78727);t.PrismExtensions={LANGUAGE_NAME:s.LANGUAGE_NAME,languageDefinition:r.languageDefinition}},4231:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.languageDefinition=void 0;const r=n(89980);t.languageDefinition={[r.OpenFgaDslThemeTokenType.MODULE]:{pattern:/(module\s+)[\w_-]+/i,lookbehind:!0},[r.OpenFgaDslThemeTokenType.TYPE]:{pattern:/(\btype\s+)[\w_-]+/i,lookbehind:!0},[r.OpenFgaDslThemeTokenType.EXTEND]:{pattern:/(\bextend type\s+)[\w_-]+/i,lookbehind:!0},[r.OpenFgaDslThemeTokenType.RELATION]:{pattern:/(\bdefine\s+)[\w_-]+/i,lookbehind:!0},[r.OpenFgaDslThemeTokenType.DIRECTLY_ASSIGNABLE]:/\[.*]|self/,[r.OpenFgaDslThemeTokenType.CONDITION]:{pattern:/(\bcondition\s+)[\w_-]+/i,lookbehind:!0},"condition-params":{pattern:/\(.*\)\s*{/,inside:{"condition-param":/\b([\w_-]+)\s*:/i,"condition-param-type":/\b(string|int|map|uint|list|timestamp|bool|duration|double|ipaddress)\b/}},[r.OpenFgaDslThemeTokenType.COMMENT]:{pattern:/(^\s*|\s+)#.*/},[r.OpenFgaDslThemeTokenType.KEYWORD]:{pattern:/\b(type|relations|define|and|or|but not|from|as|model|schema|condition|module|extend)\b/}}},95420:(e,t)=>{"use strict";var n,r,s;Object.defineProperty(t,"__esModule",{value:!0}),t.RelationType=t.GraphEdgeGroup=t.GraphNodeGroup=void 0,function(e){e.AssignableRelation="assignable-relation",e.NonassignableRelation="nonassignable-relation",e.Type="type",e.StoreName="store-name",e.Default="default",e.Check="check"}(n||(t.GraphNodeGroup=n={})),function(e){e.StoreToType="store-to-type",e.TypeToRelation="type-to-relation",e.RelationToRelation="relation-to-relation",e.AssignableSourceToRelation="assignable-sourcee-to-relation",e.Default="default"}(r||(t.GraphEdgeGroup=r={})),function(e){e.DirectUsers="Direct Users",e.ComputedUserset="Related From Same Object",e.TupleToUserset="Related From Related Objects"}(s||(t.RelationType=s={}))},90154:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthorizationModelGraphBuilder=t.TreeBuilder=t.GraphEdgeGroup=t.GraphNodeGroup=void 0;var r=n(95420);Object.defineProperty(t,"GraphNodeGroup",{enumerable:!0,get:function(){return r.GraphNodeGroup}}),Object.defineProperty(t,"GraphEdgeGroup",{enumerable:!0,get:function(){return r.GraphEdgeGroup}});var s=n(48649);Object.defineProperty(t,"TreeBuilder",{enumerable:!0,get:function(){return s.TreeBuilder}});var i=n(30382);Object.defineProperty(t,"AuthorizationModelGraphBuilder",{enumerable:!0,get:function(){return i.AuthorizationModelGraphBuilder}})},30382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthorizationModelGraphBuilder=void 0;const r=n(95420);class s{constructor(e,t){this.authorizationModel=e,this.store=t,this._graph={nodes:[],edges:[]},this.buildGraph()}static getStoreId(e){return`store|${e}`}static getTypeId(e){return`type|${e}`}static getRelationId(e,t){return`${e}.relation|${t}`}buildGraph(){var e,t,n;const i=(null===(e=this.store)||void 0===e?void 0:e.name)||(null===(t=this.store)||void 0===t?void 0:t.id)||"Store",o={nodes:[{id:s.getStoreId(i),label:i,group:r.GraphNodeGroup.StoreName}],edges:[]};null===(n=this.authorizationModel.type_definitions)||void 0===n||n.forEach((e=>{const t=this.getTypeGraph(e,o);o.nodes=o.nodes.concat(t.nodes),o.edges=o.edges.concat(t.edges)})),this._graph=o}checkIfRelationAssignable(e){var t,n,r,s;return!!(e.this||(null===(t=e.difference)||void 0===t?void 0:t.base.this)||(null===(n=e.difference)||void 0===n?void 0:n.subtract.this)||((null===(r=e.intersection)||void 0===r?void 0:r.child)||[]).some((e=>this.checkIfRelationAssignable(e)))||((null===(s=e.union)||void 0===s?void 0:s.child)||[]).some((e=>this.checkIfRelationAssignable(e))))}getAssignableSourcesForRelation(e,t){const n={types:[],relations:[],conditions:[],publicTypes:[],isAssignable:!1};if(!this.checkIfRelationAssignable(e))return n;const r=t.directly_related_user_types;return null==r||r.forEach((e=>{(e.relation||e.wildcard||e.condition)&&(e.relation?n.relations.push(s.getRelationId(e.type,e.relation)):(n.isAssignable=!0,n.types.push(s.getTypeId(e.type))))})),n}addRelationToRelationEdge(e,t,n,i){e.edges.push({from:s.getRelationId(t,n),to:s.getRelationId(t,i.relation),group:r.GraphEdgeGroup.RelationToRelation,dashes:!0})}getTypeGraph(e,t,{showAssignable:n}={}){const i=s.getTypeId(e.type),o={nodes:[{id:i,label:e.type,group:r.GraphNodeGroup.Type}],edges:[{from:t.nodes[0].id,to:i,group:r.GraphEdgeGroup.StoreToType}]},a=(null==e?void 0:e.relations)||{};return Object.keys(a).forEach((t=>{var l,c,u;const d=s.getRelationId(i,t),h=a[t]||{},p=this.getAssignableSourcesForRelation(h,(null===(c=null===(l=e.metadata)||void 0===l?void 0:l.relations)||void 0===c?void 0:c[t])||{}),f=p.isAssignable;o.nodes.push({id:d,label:t,group:f?r.GraphNodeGroup.AssignableRelation:r.GraphNodeGroup.NonassignableRelation}),n&&p.types.forEach((e=>{o.edges.push({from:s.getTypeId(e),to:d,group:r.GraphEdgeGroup.AssignableSourceToRelation})})),o.edges.push({from:i,to:d,group:r.GraphEdgeGroup.TypeToRelation}),h.computedUserset?this.addRelationToRelationEdge(o,i,t,h.computedUserset):((null===(u=h.union)||void 0===u?void 0:u.child)||[]).forEach((e=>{e.computedUserset&&this.addRelationToRelationEdge(o,i,t,e.computedUserset)}))})),o}get graph(){return this._graph}}t.AuthorizationModelGraphBuilder=s},48649:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(s,i){function o(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TreeBuilder=void 0;const s=n(95420),i=e=>{const t=e.split("#"),n="*"===t[1]||"*"===e;return{object:t[0],relation:n?void 0:t[1],isWildcard:n}};t.TreeBuilder=class{constructor(e,t,n,r,s){this.openFgaApi=e,this.capturedTuple=t,this.storeId=n,this.existingTree=r,this.authorizationModelId=s,this.expandedTuples={},r&&(this.currentTree=r)}addParent(e,t,n,r){this.currentTree&&(this.currentTree[e]||(this.currentTree[e]={parents:{}}),this.currentTree[e].parents[t]={inActivePath:r,type:n},t===`${this.capturedTuple.object}#${this.capturedTuple.relation}`&&(this.currentTree[this.capturedTuple.object]||(this.currentTree[this.capturedTuple.object]={parents:{},inActivePath:!0}),this.addParent(`${this.capturedTuple.object}#${this.capturedTuple.relation}`,this.capturedTuple.object,void 0,!0)))}expandTuple(e){return r(this,void 0,void 0,(function*(){return this.openFgaApi.expand(this.storeId,{tuple_key:{relation:e.relation,object:e.object},authorization_model_id:this.authorizationModelId})}))}walkDirectUser(e,t){return r(this,void 0,void 0,(function*(){const n=i(t);this.addParent(t,e.name,s.RelationType.DirectUsers),n.relation&&(yield this.walk(n))}))}walkDirectUsers(e){return r(this,void 0,void 0,(function*(){var t,n;const s=(null===(n=null===(t=null==e?void 0:e.leaf)||void 0===t?void 0:t.users)||void 0===n?void 0:n.users)||[];yield Promise.all(s.map((t=>r(this,void 0,void 0,(function*(){return this.walkDirectUser(e,t)})))))}))}walkComputedUserSet(e,t,n){return r(this,void 0,void 0,(function*(){if(!t||2!==t.split(":").length)return;this.addParent(t,e.name,n?s.RelationType.TupleToUserset:s.RelationType.ComputedUserset);const r=i(t);yield this.walk(r)}))}walkTupleToUserset(e){return r(this,void 0,void 0,(function*(){var t,n;const r=null===(n=null===(t=e.leaf)||void 0===t?void 0:t.tupleToUserset)||void 0===n?void 0:n.tupleset;if(!r)return;const s=i(r);yield this.walk(s)}))}getNodeType(e){var t,n,r,i,o,a;return(null===(n=null===(t=null==e?void 0:e.leaf)||void 0===t?void 0:t.computed)||void 0===n?void 0:n.userset)?s.RelationType.ComputedUserset:(null===(i=null===(r=null==e?void 0:e.leaf)||void 0===r?void 0:r.tupleToUserset)||void 0===i?void 0:i.computed)?s.RelationType.TupleToUserset:(null===(a=null===(o=null==e?void 0:e.union)||void 0===o?void 0:o.nodes)||void 0===a?void 0:a.length)?void 0:s.RelationType.DirectUsers}walkNode(e){return r(this,void 0,void 0,(function*(){var t,n,i,o,a;const l=[];switch(this.getNodeType(e)){case s.RelationType.DirectUsers:l.push(this.walkDirectUsers(e));break;case s.RelationType.ComputedUserset:const c=null===(n=null===(t=e.leaf)||void 0===t?void 0:t.computed)||void 0===n?void 0:n.userset;l.push(this.walkComputedUserSet(e,c));break;case s.RelationType.TupleToUserset:l.push(this.walkTupleToUserset(e));const u=(null===(o=null===(i=e.leaf)||void 0===i?void 0:i.tupleToUserset)||void 0===o?void 0:o.computed)||[];l.push(...u.map((t=>r(this,void 0,void 0,(function*(){return this.walkComputedUserSet(e,t.userset,!0)})))));break;default:const d=(null===(a=e.union)||void 0===a?void 0:a.nodes)||[];l.push(...d.map((e=>r(this,void 0,void 0,(function*(){return this.walkNode(e)})))))}yield Promise.all(l)}))}walk(e){return r(this,void 0,void 0,(function*(){var t;const n=`${e.object}#${e.relation}`;if(!e.relation||this.expandedTuples[n])return;this.currentTree&&!this.currentTree[n]&&(this.currentTree[n]={parents:{}}),this.expandedTuples[n]=!0;const r=null===(t=(yield this.expandTuple(e)).tree)||void 0===t?void 0:t.root;yield this.walkNode(r)}))}deleteHangingNodes(){const{tree:e={}}=this;Object.keys(e).forEach((t=>{const{parents:n}=e[t];Object.keys(n).length||t===this.capturedTuple.object||delete e[t]}))}get tree(){return this.currentTree}buildTree(){return r(this,void 0,void 0,(function*(){this.tree||(this.currentTree={},yield this.walk(this.capturedTuple))}))}fillActivePath(e){const{tree:t={}}=this,{object:n}=this.capturedTuple,r=JSON.parse(JSON.stringify(t));let s=["*",e];const i={};for(;s.length;){const e={};s.forEach((t=>{i[t]||(i[t]=!0,r[t]&&(r[t].parents[n]&&Object.keys(r[t].parents).forEach((e=>{e!==n&&delete r[t].parents[e]})),Object.keys(r[t].parents).forEach((n=>{n!==t&&(r[t].parents[n].inActivePath=!0,e[n]=!0)}))))})),s=Object.keys(e)}return r}buildGraph(e,t){const{capturedTuple:n}=this;let{tree:r={}}=this;const i=!!e,o={nodes:[],edges:[]};let a=!1;return this.deleteHangingNodes(),e&&(r=this.fillActivePath(e)),Object.keys(r).forEach((l=>{const c=r[l],[u,d]=l.split("#");let h;Object.keys(c.parents).forEach((e=>{var i;const u=c.parents[e];if(!r[e])return void(a=!0);if(t&&!u.inActivePath)return;h=!0;const p=null===(i=u.type)||void 0===i?void 0:i.replace(/\s/gu,"");p&&(o.nodes.push({id:`${e}.${p}.${l}`,label:u.type}),o.edges.push({to:`${e}.${p}.${l}`,from:e,isActive:u.inActivePath,group:s.GraphEdgeGroup.Default})),o.edges.push({to:l,from:p?`${e}.${p}.${l}`:e,label:e===n.object?`${d} from`:"",isActive:u.inActivePath,group:s.GraphEdgeGroup.Default})}));const p=l===e||"*"===l&&i,f=l===n.object;if(f||h||!t&&!a){const t=f||p;o.nodes.push({id:l,label:"*"===u&&i?`${e} via everyone (*)`:l,isActive:t})}})),o}}},14456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={ulidValidate:n(13344).ulidValidate};t.default=r},13344:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ulidValidate=t.ulidPattern=void 0,t.ulidPattern=/[0-9A-HJKMNP-TV-Z]{26}/;t.ulidValidate=e=>t.ulidPattern.test(e)},26351:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ModuleTransformationError=t.ModuleTransformationSingleError=t.FGAModFileValidationError=t.FGAModFileValidationSingleError=t.UnsupportedModularModules=t.ConditionNameDoesntMatchError=t.UnsupportedDSLNestingError=t.ConfigurationError=t.ModelValidationError=t.ModelValidationSingleError=t.DSLSyntaxError=t.DSLSyntaxSingleError=t.BaseMultiError=t.BaseError=t.ValidationError=void 0,function(e){e.SchemaVersionRequired="schema-version-required",e.SchemaVersionUnsupported="schema-version-unsupported",e.ReservedTypeKeywords="reserved-type-keywords",e.ReservedRelationKeywords="reserved-relation-keywords",e.SelfError="self-error",e.InvalidName="invalid-name",e.MissingDefinition="missing-definition",e.InvalidRelationType="invalid-relation-type",e.InvalidRelationOnTupleset="invalid-relation-on-tupleset",e.InvalidType="invalid-type",e.RelationNoEntrypoint="relation-no-entry-point",e.TuplesetNotDirect="tupleuserset-not-direct",e.DuplicatedError="duplicated-error",e.RequireSchema1_0="allowed-type-schema-10",e.AssignableRelationsMustHaveType="assignable-relation-must-have-type",e.AllowedTypesNotValidOnSchema1_0="allowed-type-not-valid-on-schema-1_0",e.InvalidSchema="invalid-schema",e.InvalidSyntax="invalid-syntax",e.TypeRestrictionCannotHaveWildcardAndRelation="type-wildcard-relation",e.ConditionNotDefined="condition-not-defined",e.ConditionNotUsed="condition-not-used",e.DifferentNestedConditionName="different-nested-condition-name",e.MultipleModulesInFile="multiple-modules-in-file"}(n||(t.ValidationError=n={}));class r extends Error{constructor(e,t){super(`${t} error${void 0!==e.line&&void 0!==e.column?` at line=${e.line.start}, column=${e.column.start}`:""}: ${e.msg}`),this.properties=e,this.type=t,this.line=e.line,this.column=e.column,this.msg=e.msg,this.file=e.file}toString(){return this.message}}t.BaseError=r;class s extends Error{constructor(e){super(`${e.length} error${e.length>1?"s":""} occurred:\n\t* ${e.join("\n\t* ")}\n\n`),this.errors=e,this.errors=e}toString(){return this.message}}t.BaseMultiError=s;t.DSLSyntaxSingleError=class extends r{constructor(e,t,n){super(e,"syntax"),this.properties=e,this.metadata=t,(null==n?void 0:n.stack)&&(this.stack=n.stack),this.metadata=t}toString(){return this.message}};t.DSLSyntaxError=class extends s{};t.ModelValidationSingleError=class extends r{constructor(e,t){super(e,(null==t?void 0:t.errorType)||"validation"),this.properties=e,this.metadata=t,this.metadata=t}toString(){return this.message}};t.ModelValidationError=class extends s{};class i extends Error{constructor(e,t){super(e),this.message=e,this.e=t,(null==t?void 0:t.stack)&&(this.stack=t.stack)}}t.ConfigurationError=i;class o extends Error{constructor(e,t){super(`the '${t}' relation definition under the '${e}' type is not supported by the OpenFGA DSL syntax yet`),this.typeName=e,this.relationName=t}}t.UnsupportedDSLNestingError=o;class a extends Error{constructor(e,t){super(`the '${e}' condition has a different nested condition name ('${t}')`),this.conditionName=e,this.conditionNestedName=t}}t.ConditionNameDoesntMatchError=a;class l extends Error{constructor(e){super(`model schema version ${e} does not support modules`),this.schemaVersion=e}}t.UnsupportedModularModules=l;t.FGAModFileValidationSingleError=class extends r{constructor(e){super(e,"validation"),this.properties=e}toString(){return this.message}};t.FGAModFileValidationError=class extends s{};t.ModuleTransformationSingleError=class extends r{constructor(e,t){super(e,"transformation-error"),this.properties=e,this.metadata=t,this.metadata=t}toString(){return this.message}};t.ModuleTransformationError=class extends s{}},83891:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(36168);class s extends r.Lexer{constructor(e){super(e),this._interp=new r.LexerATNSimulator(this,s._ATN,s.DecisionsToDFA,new r.PredictionContextCache)}get grammarFileName(){return"OpenFGALexer.g4"}get literalNames(){return s.literalNames}get symbolicNames(){return s.symbolicNames}get ruleNames(){return s.ruleNames}get serializedATN(){return s._serializedATN}get channelNames(){return s.channelNames}get modeNames(){return s.modeNames}static get _ATN(){return s.__ATN||(s.__ATN=(new r.ATNDeserializer).deserialize(s._serializedATN)),s.__ATN}}s.COLON=1,s.COMMA=2,s.LESS=3,s.GREATER=4,s.LBRACKET=5,s.RBRACKET=6,s.LPAREN=7,s.RPAREN=8,s.WHITESPACE=9,s.IDENTIFIER=10,s.HASH=11,s.AND=12,s.OR=13,s.BUT_NOT=14,s.FROM=15,s.MODULE=16,s.MODEL=17,s.SCHEMA=18,s.SCHEMA_VERSION=19,s.EXTEND=20,s.TYPE=21,s.CONDITION=22,s.RELATIONS=23,s.RELATION=24,s.DEFINE=25,s.KEYWORD_WITH=26,s.EQUALS=27,s.NOT_EQUALS=28,s.IN=29,s.LESS_EQUALS=30,s.GREATER_EQUALS=31,s.LOGICAL_AND=32,s.LOGICAL_OR=33,s.RPRACKET=34,s.LBRACE=35,s.RBRACE=36,s.DOT=37,s.MINUS=38,s.EXCLAM=39,s.QUESTIONMARK=40,s.PLUS=41,s.STAR=42,s.SLASH=43,s.PERCENT=44,s.CEL_TRUE=45,s.CEL_FALSE=46,s.NUL=47,s.CEL_COMMENT=48,s.NUM_FLOAT=49,s.NUM_INT=50,s.NUM_UINT=51,s.STRING=52,s.BYTES=53,s.NEWLINE=54,s.CONDITION_PARAM_CONTAINER=55,s.CONDITION_PARAM_TYPE=56,s.EOF=r.Token.EOF,s.CONDITION_DEF=1,s.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],s.literalNames=[null,"':'","','","'<'","'>'","'['",null,"'('","')'",null,null,"'#'","'and'","'or'","'but not'","'from'","'module'","'model'","'schema'",null,"'extend'","'type'","'condition'","'relations'","'relation'","'define'","'with'","'=='","'!='","'in'","'<='","'>='","'&&'","'||'","']'","'{'","'}'","'.'","'-'","'!'","'?'","'+'","'*'","'/'","'%'","'true'","'false'","'null'"],s.symbolicNames=[null,"COLON","COMMA","LESS","GREATER","LBRACKET","RBRACKET","LPAREN","RPAREN","WHITESPACE","IDENTIFIER","HASH","AND","OR","BUT_NOT","FROM","MODULE","MODEL","SCHEMA","SCHEMA_VERSION","EXTEND","TYPE","CONDITION","RELATIONS","RELATION","DEFINE","KEYWORD_WITH","EQUALS","NOT_EQUALS","IN","LESS_EQUALS","GREATER_EQUALS","LOGICAL_AND","LOGICAL_OR","RPRACKET","LBRACE","RBRACE","DOT","MINUS","EXCLAM","QUESTIONMARK","PLUS","STAR","SLASH","PERCENT","CEL_TRUE","CEL_FALSE","NUL","CEL_COMMENT","NUM_FLOAT","NUM_INT","NUM_UINT","STRING","BYTES","NEWLINE","CONDITION_PARAM_CONTAINER","CONDITION_PARAM_TYPE"],s.modeNames=["DEFAULT_MODE","CONDITION_DEF"],s.ruleNames=["HASH","COLON","COMMA","AND","OR","BUT_NOT","FROM","MODULE","MODEL","SCHEMA","SCHEMA_VERSION","EXTEND","TYPE","CONDITION","RELATIONS","RELATION","DEFINE","KEYWORD_WITH","EQUALS","NOT_EQUALS","IN","LESS","LESS_EQUALS","GREATER_EQUALS","GREATER","LOGICAL_AND","LOGICAL_OR","LBRACKET","RPRACKET","LBRACE","RBRACE","LPAREN","RPAREN","DOT","MINUS","EXCLAM","QUESTIONMARK","PLUS","STAR","SLASH","PERCENT","CEL_TRUE","CEL_FALSE","NUL","BACKSLASH","LETTER","DIGIT","EXPONENT","HEXDIGIT","RAW","ESC_SEQ","ESC_CHAR_SEQ","ESC_OCT_SEQ","ESC_BYTE_SEQ","ESC_UNI_SEQ","WHITESPACE","CEL_COMMENT","NUM_FLOAT","NUM_INT","NUM_UINT","STRING","BYTES","IDENTIFIER","NEWLINE","CONDITION_DEF_END","CONDITION_PARAM_CONTAINER","CONDITION_PARAM_TYPE","CONDITION_PARAM_TYPE_LESS","CONDITION_PARAM_TYPE_GREATER","CONDITION_OPEN","CONDITION_COLON","CONDITION_COMMA","CONDITION_WS","CONDITION_NAME"],s._serializedATN=[4,0,56,694,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,4,10,198,8,10,11,10,12,10,199,1,10,1,10,4,10,204,8,10,11,10,12,10,205,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,36,1,36,1,37,1,37,1,38,1,38,1,39,1,39,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,45,1,45,1,46,1,46,1,47,1,47,3,47,340,8,47,1,47,4,47,343,8,47,11,47,12,47,344,1,48,1,48,1,49,1,49,1,50,1,50,1,50,1,50,3,50,355,8,50,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,388,8,54,1,55,4,55,391,8,55,11,55,12,55,392,1,56,1,56,1,56,1,56,5,56,399,8,56,10,56,12,56,402,9,56,1,56,1,56,1,57,4,57,407,8,57,11,57,12,57,408,1,57,1,57,4,57,413,8,57,11,57,12,57,414,1,57,3,57,418,8,57,1,57,4,57,421,8,57,11,57,12,57,422,1,57,1,57,1,57,1,57,4,57,429,8,57,11,57,12,57,430,1,57,3,57,434,8,57,3,57,436,8,57,1,58,4,58,439,8,58,11,58,12,58,440,1,58,1,58,1,58,1,58,4,58,447,8,58,11,58,12,58,448,3,58,451,8,58,1,59,4,59,454,8,59,11,59,12,59,455,1,59,1,59,1,59,1,59,1,59,1,59,4,59,464,8,59,11,59,12,59,465,1,59,1,59,3,59,470,8,59,1,60,1,60,1,60,5,60,475,8,60,10,60,12,60,478,9,60,1,60,1,60,1,60,1,60,5,60,484,8,60,10,60,12,60,487,9,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,496,8,60,10,60,12,60,499,9,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,510,8,60,10,60,12,60,513,9,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,521,8,60,10,60,12,60,524,9,60,1,60,1,60,1,60,1,60,1,60,5,60,531,8,60,10,60,12,60,534,9,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,544,8,60,10,60,12,60,547,9,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,1,60,5,60,559,8,60,10,60,12,60,562,9,60,1,60,1,60,1,60,1,60,3,60,568,8,60,1,61,1,61,1,61,1,62,1,62,3,62,575,8,62,1,62,1,62,1,62,1,62,5,62,581,8,62,10,62,12,62,584,9,62,1,63,3,63,587,8,63,1,63,3,63,590,8,63,1,63,1,63,3,63,594,8,63,1,63,3,63,597,8,63,1,63,3,63,600,8,63,1,64,1,64,1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,3,65,614,8,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,665,8,66,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,73,1,73,1,73,1,73,4,497,511,545,560,0,74,2,11,4,1,6,2,8,12,10,13,12,14,14,15,16,16,18,17,20,18,22,19,24,20,26,21,28,22,30,23,32,24,34,25,36,26,38,27,40,28,42,29,44,3,46,30,48,31,50,4,52,32,54,33,56,5,58,34,60,35,62,36,64,7,66,8,68,37,70,38,72,39,74,40,76,41,78,42,80,43,82,44,84,45,86,46,88,47,90,0,92,0,94,0,96,0,98,0,100,0,102,0,104,0,106,0,108,0,110,0,112,9,114,48,116,49,118,50,120,51,122,52,124,53,126,10,128,54,130,0,132,55,134,56,136,0,138,0,140,0,142,0,144,0,146,0,148,0,2,0,1,16,2,0,65,90,97,122,2,0,69,69,101,101,2,0,43,43,45,45,3,0,48,57,65,70,97,102,2,0,82,82,114,114,10,0,34,34,39,39,63,63,92,92,96,98,102,102,110,110,114,114,116,116,118,118,2,0,88,88,120,120,3,0,9,9,12,12,32,32,1,0,10,10,2,0,85,85,117,117,4,0,10,10,13,13,34,34,92,92,4,0,10,10,13,13,39,39,92,92,1,0,92,92,3,0,10,10,13,13,34,34,3,0,10,10,13,13,39,39,2,0,66,66,98,98,742,0,2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8,1,0,0,0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0,16,1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,22,1,0,0,0,0,24,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0,0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,64,1,0,0,0,0,66,1,0,0,0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0,0,0,0,76,1,0,0,0,0,78,1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0,86,1,0,0,0,0,88,1,0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0,0,118,1,0,0,0,0,120,1,0,0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0,128,1,0,0,0,1,130,1,0,0,0,1,132,1,0,0,0,1,134,1,0,0,0,1,136,1,0,0,0,1,138,1,0,0,0,1,140,1,0,0,0,1,142,1,0,0,0,1,144,1,0,0,0,1,146,1,0,0,0,1,148,1,0,0,0,2,150,1,0,0,0,4,152,1,0,0,0,6,154,1,0,0,0,8,156,1,0,0,0,10,160,1,0,0,0,12,163,1,0,0,0,14,171,1,0,0,0,16,176,1,0,0,0,18,183,1,0,0,0,20,189,1,0,0,0,22,197,1,0,0,0,24,207,1,0,0,0,26,214,1,0,0,0,28,219,1,0,0,0,30,231,1,0,0,0,32,241,1,0,0,0,34,250,1,0,0,0,36,257,1,0,0,0,38,262,1,0,0,0,40,265,1,0,0,0,42,268,1,0,0,0,44,271,1,0,0,0,46,273,1,0,0,0,48,276,1,0,0,0,50,279,1,0,0,0,52,281,1,0,0,0,54,284,1,0,0,0,56,287,1,0,0,0,58,289,1,0,0,0,60,291,1,0,0,0,62,293,1,0,0,0,64,295,1,0,0,0,66,297,1,0,0,0,68,299,1,0,0,0,70,301,1,0,0,0,72,303,1,0,0,0,74,305,1,0,0,0,76,307,1,0,0,0,78,309,1,0,0,0,80,311,1,0,0,0,82,313,1,0,0,0,84,315,1,0,0,0,86,320,1,0,0,0,88,326,1,0,0,0,90,331,1,0,0,0,92,333,1,0,0,0,94,335,1,0,0,0,96,337,1,0,0,0,98,346,1,0,0,0,100,348,1,0,0,0,102,354,1,0,0,0,104,356,1,0,0,0,106,359,1,0,0,0,108,364,1,0,0,0,110,387,1,0,0,0,112,390,1,0,0,0,114,394,1,0,0,0,116,435,1,0,0,0,118,450,1,0,0,0,120,469,1,0,0,0,122,567,1,0,0,0,124,569,1,0,0,0,126,574,1,0,0,0,128,586,1,0,0,0,130,601,1,0,0,0,132,613,1,0,0,0,134,664,1,0,0,0,136,666,1,0,0,0,138,670,1,0,0,0,140,674,1,0,0,0,142,678,1,0,0,0,144,682,1,0,0,0,146,686,1,0,0,0,148,690,1,0,0,0,150,151,5,35,0,0,151,3,1,0,0,0,152,153,5,58,0,0,153,5,1,0,0,0,154,155,5,44,0,0,155,7,1,0,0,0,156,157,5,97,0,0,157,158,5,110,0,0,158,159,5,100,0,0,159,9,1,0,0,0,160,161,5,111,0,0,161,162,5,114,0,0,162,11,1,0,0,0,163,164,5,98,0,0,164,165,5,117,0,0,165,166,5,116,0,0,166,167,5,32,0,0,167,168,5,110,0,0,168,169,5,111,0,0,169,170,5,116,0,0,170,13,1,0,0,0,171,172,5,102,0,0,172,173,5,114,0,0,173,174,5,111,0,0,174,175,5,109,0,0,175,15,1,0,0,0,176,177,5,109,0,0,177,178,5,111,0,0,178,179,5,100,0,0,179,180,5,117,0,0,180,181,5,108,0,0,181,182,5,101,0,0,182,17,1,0,0,0,183,184,5,109,0,0,184,185,5,111,0,0,185,186,5,100,0,0,186,187,5,101,0,0,187,188,5,108,0,0,188,19,1,0,0,0,189,190,5,115,0,0,190,191,5,99,0,0,191,192,5,104,0,0,192,193,5,101,0,0,193,194,5,109,0,0,194,195,5,97,0,0,195,21,1,0,0,0,196,198,3,94,46,0,197,196,1,0,0,0,198,199,1,0,0,0,199,197,1,0,0,0,199,200,1,0,0,0,200,201,1,0,0,0,201,203,5,46,0,0,202,204,3,94,46,0,203,202,1,0,0,0,204,205,1,0,0,0,205,203,1,0,0,0,205,206,1,0,0,0,206,23,1,0,0,0,207,208,5,101,0,0,208,209,5,120,0,0,209,210,5,116,0,0,210,211,5,101,0,0,211,212,5,110,0,0,212,213,5,100,0,0,213,25,1,0,0,0,214,215,5,116,0,0,215,216,5,121,0,0,216,217,5,112,0,0,217,218,5,101,0,0,218,27,1,0,0,0,219,220,5,99,0,0,220,221,5,111,0,0,221,222,5,110,0,0,222,223,5,100,0,0,223,224,5,105,0,0,224,225,5,116,0,0,225,226,5,105,0,0,226,227,5,111,0,0,227,228,5,110,0,0,228,229,1,0,0,0,229,230,6,13,0,0,230,29,1,0,0,0,231,232,5,114,0,0,232,233,5,101,0,0,233,234,5,108,0,0,234,235,5,97,0,0,235,236,5,116,0,0,236,237,5,105,0,0,237,238,5,111,0,0,238,239,5,110,0,0,239,240,5,115,0,0,240,31,1,0,0,0,241,242,5,114,0,0,242,243,5,101,0,0,243,244,5,108,0,0,244,245,5,97,0,0,245,246,5,116,0,0,246,247,5,105,0,0,247,248,5,111,0,0,248,249,5,110,0,0,249,33,1,0,0,0,250,251,5,100,0,0,251,252,5,101,0,0,252,253,5,102,0,0,253,254,5,105,0,0,254,255,5,110,0,0,255,256,5,101,0,0,256,35,1,0,0,0,257,258,5,119,0,0,258,259,5,105,0,0,259,260,5,116,0,0,260,261,5,104,0,0,261,37,1,0,0,0,262,263,5,61,0,0,263,264,5,61,0,0,264,39,1,0,0,0,265,266,5,33,0,0,266,267,5,61,0,0,267,41,1,0,0,0,268,269,5,105,0,0,269,270,5,110,0,0,270,43,1,0,0,0,271,272,5,60,0,0,272,45,1,0,0,0,273,274,5,60,0,0,274,275,5,61,0,0,275,47,1,0,0,0,276,277,5,62,0,0,277,278,5,61,0,0,278,49,1,0,0,0,279,280,5,62,0,0,280,51,1,0,0,0,281,282,5,38,0,0,282,283,5,38,0,0,283,53,1,0,0,0,284,285,5,124,0,0,285,286,5,124,0,0,286,55,1,0,0,0,287,288,5,91,0,0,288,57,1,0,0,0,289,290,5,93,0,0,290,59,1,0,0,0,291,292,5,123,0,0,292,61,1,0,0,0,293,294,5,125,0,0,294,63,1,0,0,0,295,296,5,40,0,0,296,65,1,0,0,0,297,298,5,41,0,0,298,67,1,0,0,0,299,300,5,46,0,0,300,69,1,0,0,0,301,302,5,45,0,0,302,71,1,0,0,0,303,304,5,33,0,0,304,73,1,0,0,0,305,306,5,63,0,0,306,75,1,0,0,0,307,308,5,43,0,0,308,77,1,0,0,0,309,310,5,42,0,0,310,79,1,0,0,0,311,312,5,47,0,0,312,81,1,0,0,0,313,314,5,37,0,0,314,83,1,0,0,0,315,316,5,116,0,0,316,317,5,114,0,0,317,318,5,117,0,0,318,319,5,101,0,0,319,85,1,0,0,0,320,321,5,102,0,0,321,322,5,97,0,0,322,323,5,108,0,0,323,324,5,115,0,0,324,325,5,101,0,0,325,87,1,0,0,0,326,327,5,110,0,0,327,328,5,117,0,0,328,329,5,108,0,0,329,330,5,108,0,0,330,89,1,0,0,0,331,332,5,92,0,0,332,91,1,0,0,0,333,334,7,0,0,0,334,93,1,0,0,0,335,336,2,48,57,0,336,95,1,0,0,0,337,339,7,1,0,0,338,340,7,2,0,0,339,338,1,0,0,0,339,340,1,0,0,0,340,342,1,0,0,0,341,343,3,94,46,0,342,341,1,0,0,0,343,344,1,0,0,0,344,342,1,0,0,0,344,345,1,0,0,0,345,97,1,0,0,0,346,347,7,3,0,0,347,99,1,0,0,0,348,349,7,4,0,0,349,101,1,0,0,0,350,355,3,104,51,0,351,355,3,108,53,0,352,355,3,110,54,0,353,355,3,106,52,0,354,350,1,0,0,0,354,351,1,0,0,0,354,352,1,0,0,0,354,353,1,0,0,0,355,103,1,0,0,0,356,357,3,90,44,0,357,358,7,5,0,0,358,105,1,0,0,0,359,360,3,90,44,0,360,361,2,48,51,0,361,362,2,48,55,0,362,363,2,48,55,0,363,107,1,0,0,0,364,365,3,90,44,0,365,366,7,6,0,0,366,367,3,98,48,0,367,368,3,98,48,0,368,109,1,0,0,0,369,370,3,90,44,0,370,371,5,117,0,0,371,372,3,98,48,0,372,373,3,98,48,0,373,374,3,98,48,0,374,375,3,98,48,0,375,388,1,0,0,0,376,377,3,90,44,0,377,378,5,85,0,0,378,379,3,98,48,0,379,380,3,98,48,0,380,381,3,98,48,0,381,382,3,98,48,0,382,383,3,98,48,0,383,384,3,98,48,0,384,385,3,98,48,0,385,386,3,98,48,0,386,388,1,0,0,0,387,369,1,0,0,0,387,376,1,0,0,0,388,111,1,0,0,0,389,391,7,7,0,0,390,389,1,0,0,0,391,392,1,0,0,0,392,390,1,0,0,0,392,393,1,0,0,0,393,113,1,0,0,0,394,395,5,47,0,0,395,396,5,47,0,0,396,400,1,0,0,0,397,399,8,8,0,0,398,397,1,0,0,0,399,402,1,0,0,0,400,398,1,0,0,0,400,401,1,0,0,0,401,403,1,0,0,0,402,400,1,0,0,0,403,404,6,56,1,0,404,115,1,0,0,0,405,407,3,94,46,0,406,405,1,0,0,0,407,408,1,0,0,0,408,406,1,0,0,0,408,409,1,0,0,0,409,410,1,0,0,0,410,412,5,46,0,0,411,413,3,94,46,0,412,411,1,0,0,0,413,414,1,0,0,0,414,412,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,418,3,96,47,0,417,416,1,0,0,0,417,418,1,0,0,0,418,436,1,0,0,0,419,421,3,94,46,0,420,419,1,0,0,0,421,422,1,0,0,0,422,420,1,0,0,0,422,423,1,0,0,0,423,424,1,0,0,0,424,425,3,96,47,0,425,436,1,0,0,0,426,428,5,46,0,0,427,429,3,94,46,0,428,427,1,0,0,0,429,430,1,0,0,0,430,428,1,0,0,0,430,431,1,0,0,0,431,433,1,0,0,0,432,434,3,96,47,0,433,432,1,0,0,0,433,434,1,0,0,0,434,436,1,0,0,0,435,406,1,0,0,0,435,420,1,0,0,0,435,426,1,0,0,0,436,117,1,0,0,0,437,439,3,94,46,0,438,437,1,0,0,0,439,440,1,0,0,0,440,438,1,0,0,0,440,441,1,0,0,0,441,451,1,0,0,0,442,443,5,48,0,0,443,444,5,120,0,0,444,446,1,0,0,0,445,447,3,98,48,0,446,445,1,0,0,0,447,448,1,0,0,0,448,446,1,0,0,0,448,449,1,0,0,0,449,451,1,0,0,0,450,438,1,0,0,0,450,442,1,0,0,0,451,119,1,0,0,0,452,454,3,94,46,0,453,452,1,0,0,0,454,455,1,0,0,0,455,453,1,0,0,0,455,456,1,0,0,0,456,457,1,0,0,0,457,458,7,9,0,0,458,470,1,0,0,0,459,460,5,48,0,0,460,461,5,120,0,0,461,463,1,0,0,0,462,464,3,98,48,0,463,462,1,0,0,0,464,465,1,0,0,0,465,463,1,0,0,0,465,466,1,0,0,0,466,467,1,0,0,0,467,468,7,9,0,0,468,470,1,0,0,0,469,453,1,0,0,0,469,459,1,0,0,0,470,121,1,0,0,0,471,476,5,34,0,0,472,475,3,102,50,0,473,475,8,10,0,0,474,472,1,0,0,0,474,473,1,0,0,0,475,478,1,0,0,0,476,474,1,0,0,0,476,477,1,0,0,0,477,479,1,0,0,0,478,476,1,0,0,0,479,568,5,34,0,0,480,485,5,39,0,0,481,484,3,102,50,0,482,484,8,11,0,0,483,481,1,0,0,0,483,482,1,0,0,0,484,487,1,0,0,0,485,483,1,0,0,0,485,486,1,0,0,0,486,488,1,0,0,0,487,485,1,0,0,0,488,568,5,39,0,0,489,490,5,34,0,0,490,491,5,34,0,0,491,492,5,34,0,0,492,497,1,0,0,0,493,496,3,102,50,0,494,496,8,12,0,0,495,493,1,0,0,0,495,494,1,0,0,0,496,499,1,0,0,0,497,498,1,0,0,0,497,495,1,0,0,0,498,500,1,0,0,0,499,497,1,0,0,0,500,501,5,34,0,0,501,502,5,34,0,0,502,568,5,34,0,0,503,504,5,39,0,0,504,505,5,39,0,0,505,506,5,39,0,0,506,511,1,0,0,0,507,510,3,102,50,0,508,510,8,12,0,0,509,507,1,0,0,0,509,508,1,0,0,0,510,513,1,0,0,0,511,512,1,0,0,0,511,509,1,0,0,0,512,514,1,0,0,0,513,511,1,0,0,0,514,515,5,39,0,0,515,516,5,39,0,0,516,568,5,39,0,0,517,518,3,100,49,0,518,522,5,34,0,0,519,521,8,13,0,0,520,519,1,0,0,0,521,524,1,0,0,0,522,520,1,0,0,0,522,523,1,0,0,0,523,525,1,0,0,0,524,522,1,0,0,0,525,526,5,34,0,0,526,568,1,0,0,0,527,528,3,100,49,0,528,532,5,39,0,0,529,531,8,14,0,0,530,529,1,0,0,0,531,534,1,0,0,0,532,530,1,0,0,0,532,533,1,0,0,0,533,535,1,0,0,0,534,532,1,0,0,0,535,536,5,39,0,0,536,568,1,0,0,0,537,538,3,100,49,0,538,539,5,34,0,0,539,540,5,34,0,0,540,541,5,34,0,0,541,545,1,0,0,0,542,544,9,0,0,0,543,542,1,0,0,0,544,547,1,0,0,0,545,546,1,0,0,0,545,543,1,0,0,0,546,548,1,0,0,0,547,545,1,0,0,0,548,549,5,34,0,0,549,550,5,34,0,0,550,551,5,34,0,0,551,568,1,0,0,0,552,553,3,100,49,0,553,554,5,39,0,0,554,555,5,39,0,0,555,556,5,39,0,0,556,560,1,0,0,0,557,559,9,0,0,0,558,557,1,0,0,0,559,562,1,0,0,0,560,561,1,0,0,0,560,558,1,0,0,0,561,563,1,0,0,0,562,560,1,0,0,0,563,564,5,39,0,0,564,565,5,39,0,0,565,566,5,39,0,0,566,568,1,0,0,0,567,471,1,0,0,0,567,480,1,0,0,0,567,489,1,0,0,0,567,503,1,0,0,0,567,517,1,0,0,0,567,527,1,0,0,0,567,537,1,0,0,0,567,552,1,0,0,0,568,123,1,0,0,0,569,570,7,15,0,0,570,571,3,122,60,0,571,125,1,0,0,0,572,575,3,92,45,0,573,575,5,95,0,0,574,572,1,0,0,0,574,573,1,0,0,0,575,582,1,0,0,0,576,581,3,92,45,0,577,581,3,94,46,0,578,581,5,95,0,0,579,581,3,70,34,0,580,576,1,0,0,0,580,577,1,0,0,0,580,578,1,0,0,0,580,579,1,0,0,0,581,584,1,0,0,0,582,580,1,0,0,0,582,583,1,0,0,0,583,127,1,0,0,0,584,582,1,0,0,0,585,587,3,112,55,0,586,585,1,0,0,0,586,587,1,0,0,0,587,593,1,0,0,0,588,590,5,13,0,0,589,588,1,0,0,0,589,590,1,0,0,0,590,591,1,0,0,0,591,594,5,10,0,0,592,594,2,12,13,0,593,589,1,0,0,0,593,592,1,0,0,0,594,596,1,0,0,0,595,597,3,112,55,0,596,595,1,0,0,0,596,597,1,0,0,0,597,599,1,0,0,0,598,600,3,128,63,0,599,598,1,0,0,0,599,600,1,0,0,0,600,129,1,0,0,0,601,602,3,66,32,0,602,603,1,0,0,0,603,604,6,64,2,0,604,605,6,64,3,0,605,131,1,0,0,0,606,607,5,109,0,0,607,608,5,97,0,0,608,614,5,112,0,0,609,610,5,108,0,0,610,611,5,105,0,0,611,612,5,115,0,0,612,614,5,116,0,0,613,606,1,0,0,0,613,609,1,0,0,0,614,133,1,0,0,0,615,616,5,98,0,0,616,617,5,111,0,0,617,618,5,111,0,0,618,665,5,108,0,0,619,620,5,115,0,0,620,621,5,116,0,0,621,622,5,114,0,0,622,623,5,105,0,0,623,624,5,110,0,0,624,665,5,103,0,0,625,626,5,105,0,0,626,627,5,110,0,0,627,665,5,116,0,0,628,629,5,117,0,0,629,630,5,105,0,0,630,631,5,110,0,0,631,665,5,116,0,0,632,633,5,100,0,0,633,634,5,111,0,0,634,635,5,117,0,0,635,636,5,98,0,0,636,637,5,108,0,0,637,665,5,101,0,0,638,639,5,100,0,0,639,640,5,117,0,0,640,641,5,114,0,0,641,642,5,97,0,0,642,643,5,116,0,0,643,644,5,105,0,0,644,645,5,111,0,0,645,665,5,110,0,0,646,647,5,116,0,0,647,648,5,105,0,0,648,649,5,109,0,0,649,650,5,101,0,0,650,651,5,115,0,0,651,652,5,116,0,0,652,653,5,97,0,0,653,654,5,109,0,0,654,665,5,112,0,0,655,656,5,105,0,0,656,657,5,112,0,0,657,658,5,97,0,0,658,659,5,100,0,0,659,660,5,100,0,0,660,661,5,114,0,0,661,662,5,101,0,0,662,663,5,115,0,0,663,665,5,115,0,0,664,615,1,0,0,0,664,619,1,0,0,0,664,625,1,0,0,0,664,628,1,0,0,0,664,632,1,0,0,0,664,638,1,0,0,0,664,646,1,0,0,0,664,655,1,0,0,0,665,135,1,0,0,0,666,667,3,44,21,0,667,668,1,0,0,0,668,669,6,67,4,0,669,137,1,0,0,0,670,671,3,50,24,0,671,672,1,0,0,0,672,673,6,68,5,0,673,139,1,0,0,0,674,675,3,64,31,0,675,676,1,0,0,0,676,677,6,69,6,0,677,141,1,0,0,0,678,679,3,4,1,0,679,680,1,0,0,0,680,681,6,70,7,0,681,143,1,0,0,0,682,683,3,6,2,0,683,684,1,0,0,0,684,685,6,71,8,0,685,145,1,0,0,0,686,687,3,112,55,0,687,688,1,0,0,0,688,689,6,72,9,0,689,147,1,0,0,0,690,691,3,126,62,0,691,692,1,0,0,0,692,693,6,73,10,0,693,149,1,0,0,0,46,0,1,199,205,339,344,354,387,392,400,408,414,417,422,430,433,435,440,448,450,455,465,469,474,476,483,485,495,497,509,511,522,532,545,560,567,574,580,582,586,589,593,596,599,613,664,11,5,1,0,0,1,0,7,8,0,4,0,0,7,3,0,7,4,0,7,7,0,7,1,0,7,2,0,7,9,0,7,10,0],s.DecisionsToDFA=s._ATN.decisionToState.map(((e,t)=>new r.DFA(e,t))),t.default=s},17846:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionExpressionContext=t.IdentifierContext=t.MultiLineCommentContext=t.ParameterTypeContext=t.ParameterNameContext=t.ConditionParameterContext=t.ConditionNameContext=t.ConditionContext=t.ConditionsContext=t.RelationDefTypeRestrictionBaseContext=t.RelationDefTypeRestrictionContext=t.RelationDefRewriteContext=t.RelationDefDirectAssignmentContext=t.RelationRecurseNoDirectContext=t.RelationRecurseContext=t.RelationDefGroupingContext=t.RelationDefPartialsContext=t.RelationDefNoDirectContext=t.RelationDefContext=t.RelationNameContext=t.RelationDeclarationContext=t.TypeDefContext=t.TypeDefsContext=t.ModuleHeaderContext=t.ModelHeaderContext=t.MainContext=void 0;const r=n(36168);class s extends r.Parser{get grammarFileName(){return"OpenFGAParser.g4"}get literalNames(){return s.literalNames}get symbolicNames(){return s.symbolicNames}get ruleNames(){return s.ruleNames}get serializedATN(){return s._serializedATN}createFailedPredicateException(e,t){return new r.FailedPredicateException(this,e,t)}constructor(e){super(e),this._interp=new r.ParserATNSimulator(this,s._ATN,s.DecisionsToDFA,new r.PredictionContextCache)}main(){let e,t=new i(this,this._ctx,this.state);this.enterRule(t,0,s.RULE_main);try{switch(this.enterOuterAlt(t,1),this.state=53,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=52,this.match(s.WHITESPACE)),this.state=56,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=55,this.match(s.NEWLINE)),this.state=60,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,2,this._ctx)){case 1:this.state=58,this.modelHeader();break;case 2:this.state=59,this.moduleHeader()}if(this.state=63,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,3,this._ctx))this.state=62,this.match(s.NEWLINE);if(this.state=65,this.typeDefs(),this.state=67,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,4,this._ctx))this.state=66,this.match(s.NEWLINE);this.state=69,this.conditions(),this.state=71,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=70,this.match(s.NEWLINE)),this.state=73,this.match(s.EOF)}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}modelHeader(){let e,t=new o(this,this._ctx,this.state);this.enterRule(t,2,s.RULE_modelHeader);try{this.enterOuterAlt(t,1),this.state=78,this._errHandler.sync(this),e=this._input.LA(1),11===e&&(this.state=75,this.multiLineComment(),this.state=76,this.match(s.NEWLINE)),this.state=80,this.match(s.MODEL),this.state=81,this.match(s.NEWLINE),this.state=82,this.match(s.SCHEMA),this.state=83,this.match(s.WHITESPACE),this.state=84,t._schemaVersion=this.match(s.SCHEMA_VERSION),this.state=86,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=85,this.match(s.WHITESPACE))}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}moduleHeader(){let e,t=new a(this,this._ctx,this.state);this.enterRule(t,4,s.RULE_moduleHeader);try{this.enterOuterAlt(t,1),this.state=91,this._errHandler.sync(this),e=this._input.LA(1),11===e&&(this.state=88,this.multiLineComment(),this.state=89,this.match(s.NEWLINE)),this.state=93,this.match(s.MODULE),this.state=94,this.match(s.WHITESPACE),this.state=95,t._moduleName=this.identifier(),this.state=97,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=96,this.match(s.WHITESPACE))}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}typeDefs(){let e=new l(this,this._ctx,this.state);this.enterRule(e,6,s.RULE_typeDefs);try{let t;for(this.enterOuterAlt(e,1),this.state=102,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,10,this._ctx);2!==t&&t!==r.ATN.INVALID_ALT_NUMBER;)1===t&&(this.state=99,this.typeDef()),this.state=104,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,10,this._ctx)}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}typeDef(){let e,t=new c(this,this._ctx,this.state);this.enterRule(t,8,s.RULE_typeDef);try{let n;if(this.enterOuterAlt(t,1),this.state=107,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,11,this._ctx))this.state=105,this.match(s.NEWLINE),this.state=106,this.multiLineComment();if(this.state=109,this.match(s.NEWLINE),this.state=112,this._errHandler.sync(this),e=this._input.LA(1),20===e&&(this.state=110,this.match(s.EXTEND),this.state=111,this.match(s.WHITESPACE)),this.state=114,this.match(s.TYPE),this.state=115,this.match(s.WHITESPACE),this.state=116,t._typeName=this.identifier(),this.state=124,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,14,this._ctx)){this.state=117,this.match(s.NEWLINE),this.state=118,this.match(s.RELATIONS),this.state=120,this._errHandler.sync(this),n=1;do{if(1!==n)throw new r.NoViableAltException(this);this.state=119,this.relationDeclaration(),this.state=122,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,13,this._ctx)}while(2!==n&&n!==r.ATN.INVALID_ALT_NUMBER)}}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationDeclaration(){let e,t=new u(this,this._ctx,this.state);this.enterRule(t,10,s.RULE_relationDeclaration);try{if(this.enterOuterAlt(t,1),this.state=128,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,15,this._ctx))this.state=126,this.match(s.NEWLINE),this.state=127,this.multiLineComment();this.state=130,this.match(s.NEWLINE),this.state=131,this.match(s.DEFINE),this.state=132,this.match(s.WHITESPACE),this.state=133,this.relationName(),this.state=135,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=134,this.match(s.WHITESPACE)),this.state=137,this.match(s.COLON),this.state=139,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=138,this.match(s.WHITESPACE)),this.state=141,this.relationDef()}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationName(){let e=new d(this,this._ctx,this.state);this.enterRule(e,12,s.RULE_relationName);try{this.enterOuterAlt(e,1),this.state=143,this.identifier()}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationDef(){let e=new h(this,this._ctx,this.state);this.enterRule(e,14,s.RULE_relationDef);try{switch(this.enterOuterAlt(e,1),this.state=148,this._errHandler.sync(this),this._input.LA(1)){case 5:this.state=145,this.relationDefDirectAssignment();break;case 10:case 16:case 17:case 18:case 20:case 21:case 24:this.state=146,this.relationDefGrouping();break;case 7:this.state=147,this.relationRecurse();break;default:throw new r.NoViableAltException(this)}if(this.state=151,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,19,this._ctx))this.state=150,this.relationDefPartials()}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationDefNoDirect(){let e=new p(this,this._ctx,this.state);this.enterRule(e,16,s.RULE_relationDefNoDirect);try{switch(this.enterOuterAlt(e,1),this.state=155,this._errHandler.sync(this),this._input.LA(1)){case 10:case 16:case 17:case 18:case 20:case 21:case 24:this.state=153,this.relationDefGrouping();break;case 7:this.state=154,this.relationRecurseNoDirect();break;default:throw new r.NoViableAltException(this)}if(this.state=158,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,21,this._ctx))this.state=157,this.relationDefPartials()}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationDefPartials(){let e=new f(this,this._ctx,this.state);this.enterRule(e,18,s.RULE_relationDefPartials);try{let t;switch(this.state=189,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,27,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=167,this._errHandler.sync(this),t=1;do{if(1!==t)throw new r.NoViableAltException(this);switch(this.state=160,this.match(s.WHITESPACE),this.state=161,this.match(s.OR),this.state=162,this.match(s.WHITESPACE),this.state=165,this._errHandler.sync(this),this._input.LA(1)){case 10:case 16:case 17:case 18:case 20:case 21:case 24:this.state=163,this.relationDefGrouping();break;case 7:this.state=164,this.relationRecurseNoDirect();break;default:throw new r.NoViableAltException(this)}this.state=169,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,23,this._ctx)}while(2!==t&&t!==r.ATN.INVALID_ALT_NUMBER);break;case 2:this.enterOuterAlt(e,2),this.state=178,this._errHandler.sync(this),t=1;do{if(1!==t)throw new r.NoViableAltException(this);switch(this.state=171,this.match(s.WHITESPACE),this.state=172,this.match(s.AND),this.state=173,this.match(s.WHITESPACE),this.state=176,this._errHandler.sync(this),this._input.LA(1)){case 10:case 16:case 17:case 18:case 20:case 21:case 24:this.state=174,this.relationDefGrouping();break;case 7:this.state=175,this.relationRecurseNoDirect();break;default:throw new r.NoViableAltException(this)}this.state=180,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,25,this._ctx)}while(2!==t&&t!==r.ATN.INVALID_ALT_NUMBER);break;case 3:switch(this.enterOuterAlt(e,3),this.state=182,this.match(s.WHITESPACE),this.state=183,this.match(s.BUT_NOT),this.state=184,this.match(s.WHITESPACE),this.state=187,this._errHandler.sync(this),this._input.LA(1)){case 10:case 16:case 17:case 18:case 20:case 21:case 24:this.state=185,this.relationDefGrouping();break;case 7:this.state=186,this.relationRecurseNoDirect();break;default:throw new r.NoViableAltException(this)}}}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationDefGrouping(){let e=new m(this,this._ctx,this.state);this.enterRule(e,20,s.RULE_relationDefGrouping);try{this.enterOuterAlt(e,1),this.state=191,this.relationDefRewrite()}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationRecurse(){let e,t=new g(this,this._ctx,this.state);this.enterRule(t,22,s.RULE_relationRecurse);try{for(this.enterOuterAlt(t,1),this.state=193,this.match(s.LPAREN),this.state=197,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=194,this.match(s.WHITESPACE),this.state=199,this._errHandler.sync(this),e=this._input.LA(1);switch(this.state=202,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,29,this._ctx)){case 1:this.state=200,this.relationDef();break;case 2:this.state=201,this.relationRecurseNoDirect()}for(this.state=207,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=204,this.match(s.WHITESPACE),this.state=209,this._errHandler.sync(this),e=this._input.LA(1);this.state=210,this.match(s.RPAREN)}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationRecurseNoDirect(){let e,t=new y(this,this._ctx,this.state);this.enterRule(t,24,s.RULE_relationRecurseNoDirect);try{for(this.enterOuterAlt(t,1),this.state=212,this.match(s.LPAREN),this.state=216,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=213,this.match(s.WHITESPACE),this.state=218,this._errHandler.sync(this),e=this._input.LA(1);switch(this.state=221,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,32,this._ctx)){case 1:this.state=219,this.relationDefNoDirect();break;case 2:this.state=220,this.relationRecurseNoDirect()}for(this.state=226,this._errHandler.sync(this),e=this._input.LA(1);9===e;)this.state=223,this.match(s.WHITESPACE),this.state=228,this._errHandler.sync(this),e=this._input.LA(1);this.state=229,this.match(s.RPAREN)}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationDefDirectAssignment(){let e,t=new b(this,this._ctx,this.state);this.enterRule(t,26,s.RULE_relationDefDirectAssignment);try{for(this.enterOuterAlt(t,1),this.state=231,this.match(s.LBRACKET),this.state=233,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=232,this.match(s.WHITESPACE)),this.state=235,this.relationDefTypeRestriction(),this.state=237,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=236,this.match(s.WHITESPACE)),this.state=249,this._errHandler.sync(this),e=this._input.LA(1);2===e;)this.state=239,this.match(s.COMMA),this.state=241,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=240,this.match(s.WHITESPACE)),this.state=243,this.relationDefTypeRestriction(),this.state=245,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=244,this.match(s.WHITESPACE)),this.state=251,this._errHandler.sync(this),e=this._input.LA(1);this.state=252,this.match(s.RPRACKET)}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationDefRewrite(){let e=new v(this,this._ctx,this.state);this.enterRule(e,28,s.RULE_relationDefRewrite);try{if(this.enterOuterAlt(e,1),this.state=254,e._rewriteComputedusersetName=this.identifier(),this.state=259,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,39,this._ctx))this.state=255,this.match(s.WHITESPACE),this.state=256,this.match(s.FROM),this.state=257,this.match(s.WHITESPACE),this.state=258,e._rewriteTuplesetName=this.identifier()}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}relationDefTypeRestriction(){let e,t=new _(this,this._ctx,this.state);this.enterRule(t,30,s.RULE_relationDefTypeRestriction);try{switch(this.enterOuterAlt(t,1),this.state=262,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=261,this.match(s.NEWLINE)),this.state=271,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,41,this._ctx)){case 1:this.state=264,this.relationDefTypeRestrictionBase();break;case 2:this.state=265,this.relationDefTypeRestrictionBase(),this.state=266,this.match(s.WHITESPACE),this.state=267,this.match(s.KEYWORD_WITH),this.state=268,this.match(s.WHITESPACE),this.state=269,this.conditionName()}this.state=274,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=273,this.match(s.NEWLINE))}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}relationDefTypeRestrictionBase(){let e=new E(this,this._ctx,this.state);this.enterRule(e,32,s.RULE_relationDefTypeRestrictionBase);try{switch(this.enterOuterAlt(e,1),this.state=276,e._relationDefTypeRestrictionType=this.identifier(),this.state=281,this._errHandler.sync(this),this._input.LA(1)){case 1:this.state=277,this.match(s.COLON),this.state=278,e._relationDefTypeRestrictionWildcard=this.match(s.STAR);break;case 11:this.state=279,this.match(s.HASH),this.state=280,e._relationDefTypeRestrictionRelation=this.identifier()}}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}conditions(){let e=new T(this,this._ctx,this.state);this.enterRule(e,34,s.RULE_conditions);try{let t;for(this.enterOuterAlt(e,1),this.state=286,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,44,this._ctx);2!==t&&t!==r.ATN.INVALID_ALT_NUMBER;)1===t&&(this.state=283,this.condition()),this.state=288,this._errHandler.sync(this),t=this._interp.adaptivePredict(this._input,44,this._ctx)}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}condition(){let e,t=new x(this,this._ctx,this.state);this.enterRule(t,36,s.RULE_condition);try{if(this.enterOuterAlt(t,1),this.state=291,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,45,this._ctx))this.state=289,this.match(s.NEWLINE),this.state=290,this.multiLineComment();for(this.state=293,this.match(s.NEWLINE),this.state=294,this.match(s.CONDITION),this.state=295,this.match(s.WHITESPACE),this.state=296,this.conditionName(),this.state=298,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=297,this.match(s.WHITESPACE)),this.state=300,this.match(s.LPAREN),this.state=302,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=301,this.match(s.WHITESPACE)),this.state=304,this.conditionParameter(),this.state=306,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=305,this.match(s.WHITESPACE)),this.state=318,this._errHandler.sync(this),e=this._input.LA(1);2===e;)this.state=308,this.match(s.COMMA),this.state=310,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=309,this.match(s.WHITESPACE)),this.state=312,this.conditionParameter(),this.state=314,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=313,this.match(s.WHITESPACE)),this.state=320,this._errHandler.sync(this),e=this._input.LA(1);if(this.state=322,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=321,this.match(s.NEWLINE)),this.state=324,this.match(s.RPAREN),this.state=326,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=325,this.match(s.WHITESPACE)),this.state=328,this.match(s.LBRACE),this.state=330,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,54,this._ctx))this.state=329,this.match(s.NEWLINE);if(this.state=333,this._errHandler.sync(this),1===this._interp.adaptivePredict(this._input,55,this._ctx))this.state=332,this.match(s.WHITESPACE);this.state=335,this.conditionExpression(),this.state=337,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=336,this.match(s.NEWLINE)),this.state=339,this.match(s.RBRACE)}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}conditionName(){let e=new w(this,this._ctx,this.state);this.enterRule(e,38,s.RULE_conditionName);try{this.enterOuterAlt(e,1),this.state=341,this.match(s.IDENTIFIER)}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}conditionParameter(){let e,t=new k(this,this._ctx,this.state);this.enterRule(t,40,s.RULE_conditionParameter);try{this.enterOuterAlt(t,1),this.state=344,this._errHandler.sync(this),e=this._input.LA(1),54===e&&(this.state=343,this.match(s.NEWLINE)),this.state=346,this.parameterName(),this.state=348,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=347,this.match(s.WHITESPACE)),this.state=350,this.match(s.COLON),this.state=352,this._errHandler.sync(this),e=this._input.LA(1),9===e&&(this.state=351,this.match(s.WHITESPACE)),this.state=354,this.parameterType()}catch(n){if(!(n instanceof r.RecognitionException))throw n;t.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n)}finally{this.exitRule()}return t}parameterName(){let e=new S(this,this._ctx,this.state);this.enterRule(e,42,s.RULE_parameterName);try{this.enterOuterAlt(e,1),this.state=356,this.match(s.IDENTIFIER)}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}parameterType(){let e=new N(this,this._ctx,this.state);this.enterRule(e,44,s.RULE_parameterType);try{switch(this.state=363,this._errHandler.sync(this),this._input.LA(1)){case 56:this.enterOuterAlt(e,1),this.state=358,this.match(s.CONDITION_PARAM_TYPE);break;case 55:this.enterOuterAlt(e,2),this.state=359,this.match(s.CONDITION_PARAM_CONTAINER),this.state=360,this.match(s.LESS),this.state=361,this.match(s.CONDITION_PARAM_TYPE),this.state=362,this.match(s.GREATER);break;default:throw new r.NoViableAltException(this)}}catch(t){if(!(t instanceof r.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e}multiLineComment(){let e,t=new A(this,this._ctx,this.state);this.enterRule(t,46,s.RULE_multiLineComment);try{for(this.enterOuterAlt(t,1),this.state=365,this.match(s.HASH),this.state=369,this._errHandler.sync(this),e=this._input.LA(1);!(-32&e)&&1<'","'['",null,"'('","')'",null,null,"'#'","'and'","'or'","'but not'","'from'","'module'","'model'","'schema'",null,"'extend'","'type'","'condition'","'relations'","'relation'","'define'","'with'","'=='","'!='","'in'","'<='","'>='","'&&'","'||'","']'","'{'","'}'","'.'","'-'","'!'","'?'","'+'","'*'","'/'","'%'","'true'","'false'","'null'"],s.symbolicNames=[null,"COLON","COMMA","LESS","GREATER","LBRACKET","RBRACKET","LPAREN","RPAREN","WHITESPACE","IDENTIFIER","HASH","AND","OR","BUT_NOT","FROM","MODULE","MODEL","SCHEMA","SCHEMA_VERSION","EXTEND","TYPE","CONDITION","RELATIONS","RELATION","DEFINE","KEYWORD_WITH","EQUALS","NOT_EQUALS","IN","LESS_EQUALS","GREATER_EQUALS","LOGICAL_AND","LOGICAL_OR","RPRACKET","LBRACE","RBRACE","DOT","MINUS","EXCLAM","QUESTIONMARK","PLUS","STAR","SLASH","PERCENT","CEL_TRUE","CEL_FALSE","NUL","CEL_COMMENT","NUM_FLOAT","NUM_INT","NUM_UINT","STRING","BYTES","NEWLINE","CONDITION_PARAM_CONTAINER","CONDITION_PARAM_TYPE"],s.ruleNames=["main","modelHeader","moduleHeader","typeDefs","typeDef","relationDeclaration","relationName","relationDef","relationDefNoDirect","relationDefPartials","relationDefGrouping","relationRecurse","relationRecurseNoDirect","relationDefDirectAssignment","relationDefRewrite","relationDefTypeRestriction","relationDefTypeRestrictionBase","conditions","condition","conditionName","conditionParameter","parameterName","parameterType","multiLineComment","identifier","conditionExpression"],s._serializedATN=[4,1,56,386,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,1,0,3,0,54,8,0,1,0,3,0,57,8,0,1,0,1,0,3,0,61,8,0,1,0,3,0,64,8,0,1,0,1,0,3,0,68,8,0,1,0,1,0,3,0,72,8,0,1,0,1,0,1,1,1,1,1,1,3,1,79,8,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,87,8,1,1,2,1,2,1,2,3,2,92,8,2,1,2,1,2,1,2,1,2,3,2,98,8,2,1,3,5,3,101,8,3,10,3,12,3,104,9,3,1,4,1,4,3,4,108,8,4,1,4,1,4,1,4,3,4,113,8,4,1,4,1,4,1,4,1,4,1,4,1,4,4,4,121,8,4,11,4,12,4,122,3,4,125,8,4,1,5,1,5,3,5,129,8,5,1,5,1,5,1,5,1,5,1,5,3,5,136,8,5,1,5,1,5,3,5,140,8,5,1,5,1,5,1,6,1,6,1,7,1,7,1,7,3,7,149,8,7,1,7,3,7,152,8,7,1,8,1,8,3,8,156,8,8,1,8,3,8,159,8,8,1,9,1,9,1,9,1,9,1,9,3,9,166,8,9,4,9,168,8,9,11,9,12,9,169,1,9,1,9,1,9,1,9,1,9,3,9,177,8,9,4,9,179,8,9,11,9,12,9,180,1,9,1,9,1,9,1,9,1,9,3,9,188,8,9,3,9,190,8,9,1,10,1,10,1,11,1,11,5,11,196,8,11,10,11,12,11,199,9,11,1,11,1,11,3,11,203,8,11,1,11,5,11,206,8,11,10,11,12,11,209,9,11,1,11,1,11,1,12,1,12,5,12,215,8,12,10,12,12,12,218,9,12,1,12,1,12,3,12,222,8,12,1,12,5,12,225,8,12,10,12,12,12,228,9,12,1,12,1,12,1,13,1,13,3,13,234,8,13,1,13,1,13,3,13,238,8,13,1,13,1,13,3,13,242,8,13,1,13,1,13,3,13,246,8,13,5,13,248,8,13,10,13,12,13,251,9,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,3,14,260,8,14,1,15,3,15,263,8,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,3,15,272,8,15,1,15,3,15,275,8,15,1,16,1,16,1,16,1,16,1,16,3,16,282,8,16,1,17,5,17,285,8,17,10,17,12,17,288,9,17,1,18,1,18,3,18,292,8,18,1,18,1,18,1,18,1,18,1,18,3,18,299,8,18,1,18,1,18,3,18,303,8,18,1,18,1,18,3,18,307,8,18,1,18,1,18,3,18,311,8,18,1,18,1,18,3,18,315,8,18,5,18,317,8,18,10,18,12,18,320,9,18,1,18,3,18,323,8,18,1,18,1,18,3,18,327,8,18,1,18,1,18,3,18,331,8,18,1,18,3,18,334,8,18,1,18,1,18,3,18,338,8,18,1,18,1,18,1,19,1,19,1,20,3,20,345,8,20,1,20,1,20,3,20,349,8,20,1,20,1,20,3,20,353,8,20,1,20,1,20,1,21,1,21,1,22,1,22,1,22,1,22,1,22,3,22,364,8,22,1,23,1,23,5,23,368,8,23,10,23,12,23,371,9,23,1,23,1,23,3,23,375,8,23,1,24,1,24,1,25,1,25,5,25,381,8,25,10,25,12,25,384,9,25,1,25,0,0,26,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,0,4,1,0,54,54,4,0,10,10,16,18,20,21,24,24,4,0,3,5,7,10,27,35,37,54,1,0,36,36,427,0,53,1,0,0,0,2,78,1,0,0,0,4,91,1,0,0,0,6,102,1,0,0,0,8,107,1,0,0,0,10,128,1,0,0,0,12,143,1,0,0,0,14,148,1,0,0,0,16,155,1,0,0,0,18,189,1,0,0,0,20,191,1,0,0,0,22,193,1,0,0,0,24,212,1,0,0,0,26,231,1,0,0,0,28,254,1,0,0,0,30,262,1,0,0,0,32,276,1,0,0,0,34,286,1,0,0,0,36,291,1,0,0,0,38,341,1,0,0,0,40,344,1,0,0,0,42,356,1,0,0,0,44,363,1,0,0,0,46,365,1,0,0,0,48,376,1,0,0,0,50,382,1,0,0,0,52,54,5,9,0,0,53,52,1,0,0,0,53,54,1,0,0,0,54,56,1,0,0,0,55,57,5,54,0,0,56,55,1,0,0,0,56,57,1,0,0,0,57,60,1,0,0,0,58,61,3,2,1,0,59,61,3,4,2,0,60,58,1,0,0,0,60,59,1,0,0,0,61,63,1,0,0,0,62,64,5,54,0,0,63,62,1,0,0,0,63,64,1,0,0,0,64,65,1,0,0,0,65,67,3,6,3,0,66,68,5,54,0,0,67,66,1,0,0,0,67,68,1,0,0,0,68,69,1,0,0,0,69,71,3,34,17,0,70,72,5,54,0,0,71,70,1,0,0,0,71,72,1,0,0,0,72,73,1,0,0,0,73,74,5,0,0,1,74,1,1,0,0,0,75,76,3,46,23,0,76,77,5,54,0,0,77,79,1,0,0,0,78,75,1,0,0,0,78,79,1,0,0,0,79,80,1,0,0,0,80,81,5,17,0,0,81,82,5,54,0,0,82,83,5,18,0,0,83,84,5,9,0,0,84,86,5,19,0,0,85,87,5,9,0,0,86,85,1,0,0,0,86,87,1,0,0,0,87,3,1,0,0,0,88,89,3,46,23,0,89,90,5,54,0,0,90,92,1,0,0,0,91,88,1,0,0,0,91,92,1,0,0,0,92,93,1,0,0,0,93,94,5,16,0,0,94,95,5,9,0,0,95,97,3,48,24,0,96,98,5,9,0,0,97,96,1,0,0,0,97,98,1,0,0,0,98,5,1,0,0,0,99,101,3,8,4,0,100,99,1,0,0,0,101,104,1,0,0,0,102,100,1,0,0,0,102,103,1,0,0,0,103,7,1,0,0,0,104,102,1,0,0,0,105,106,5,54,0,0,106,108,3,46,23,0,107,105,1,0,0,0,107,108,1,0,0,0,108,109,1,0,0,0,109,112,5,54,0,0,110,111,5,20,0,0,111,113,5,9,0,0,112,110,1,0,0,0,112,113,1,0,0,0,113,114,1,0,0,0,114,115,5,21,0,0,115,116,5,9,0,0,116,124,3,48,24,0,117,118,5,54,0,0,118,120,5,23,0,0,119,121,3,10,5,0,120,119,1,0,0,0,121,122,1,0,0,0,122,120,1,0,0,0,122,123,1,0,0,0,123,125,1,0,0,0,124,117,1,0,0,0,124,125,1,0,0,0,125,9,1,0,0,0,126,127,5,54,0,0,127,129,3,46,23,0,128,126,1,0,0,0,128,129,1,0,0,0,129,130,1,0,0,0,130,131,5,54,0,0,131,132,5,25,0,0,132,133,5,9,0,0,133,135,3,12,6,0,134,136,5,9,0,0,135,134,1,0,0,0,135,136,1,0,0,0,136,137,1,0,0,0,137,139,5,1,0,0,138,140,5,9,0,0,139,138,1,0,0,0,139,140,1,0,0,0,140,141,1,0,0,0,141,142,3,14,7,0,142,11,1,0,0,0,143,144,3,48,24,0,144,13,1,0,0,0,145,149,3,26,13,0,146,149,3,20,10,0,147,149,3,22,11,0,148,145,1,0,0,0,148,146,1,0,0,0,148,147,1,0,0,0,149,151,1,0,0,0,150,152,3,18,9,0,151,150,1,0,0,0,151,152,1,0,0,0,152,15,1,0,0,0,153,156,3,20,10,0,154,156,3,24,12,0,155,153,1,0,0,0,155,154,1,0,0,0,156,158,1,0,0,0,157,159,3,18,9,0,158,157,1,0,0,0,158,159,1,0,0,0,159,17,1,0,0,0,160,161,5,9,0,0,161,162,5,13,0,0,162,165,5,9,0,0,163,166,3,20,10,0,164,166,3,24,12,0,165,163,1,0,0,0,165,164,1,0,0,0,166,168,1,0,0,0,167,160,1,0,0,0,168,169,1,0,0,0,169,167,1,0,0,0,169,170,1,0,0,0,170,190,1,0,0,0,171,172,5,9,0,0,172,173,5,12,0,0,173,176,5,9,0,0,174,177,3,20,10,0,175,177,3,24,12,0,176,174,1,0,0,0,176,175,1,0,0,0,177,179,1,0,0,0,178,171,1,0,0,0,179,180,1,0,0,0,180,178,1,0,0,0,180,181,1,0,0,0,181,190,1,0,0,0,182,183,5,9,0,0,183,184,5,14,0,0,184,187,5,9,0,0,185,188,3,20,10,0,186,188,3,24,12,0,187,185,1,0,0,0,187,186,1,0,0,0,188,190,1,0,0,0,189,167,1,0,0,0,189,178,1,0,0,0,189,182,1,0,0,0,190,19,1,0,0,0,191,192,3,28,14,0,192,21,1,0,0,0,193,197,5,7,0,0,194,196,5,9,0,0,195,194,1,0,0,0,196,199,1,0,0,0,197,195,1,0,0,0,197,198,1,0,0,0,198,202,1,0,0,0,199,197,1,0,0,0,200,203,3,14,7,0,201,203,3,24,12,0,202,200,1,0,0,0,202,201,1,0,0,0,203,207,1,0,0,0,204,206,5,9,0,0,205,204,1,0,0,0,206,209,1,0,0,0,207,205,1,0,0,0,207,208,1,0,0,0,208,210,1,0,0,0,209,207,1,0,0,0,210,211,5,8,0,0,211,23,1,0,0,0,212,216,5,7,0,0,213,215,5,9,0,0,214,213,1,0,0,0,215,218,1,0,0,0,216,214,1,0,0,0,216,217,1,0,0,0,217,221,1,0,0,0,218,216,1,0,0,0,219,222,3,16,8,0,220,222,3,24,12,0,221,219,1,0,0,0,221,220,1,0,0,0,222,226,1,0,0,0,223,225,5,9,0,0,224,223,1,0,0,0,225,228,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227,229,1,0,0,0,228,226,1,0,0,0,229,230,5,8,0,0,230,25,1,0,0,0,231,233,5,5,0,0,232,234,5,9,0,0,233,232,1,0,0,0,233,234,1,0,0,0,234,235,1,0,0,0,235,237,3,30,15,0,236,238,5,9,0,0,237,236,1,0,0,0,237,238,1,0,0,0,238,249,1,0,0,0,239,241,5,2,0,0,240,242,5,9,0,0,241,240,1,0,0,0,241,242,1,0,0,0,242,243,1,0,0,0,243,245,3,30,15,0,244,246,5,9,0,0,245,244,1,0,0,0,245,246,1,0,0,0,246,248,1,0,0,0,247,239,1,0,0,0,248,251,1,0,0,0,249,247,1,0,0,0,249,250,1,0,0,0,250,252,1,0,0,0,251,249,1,0,0,0,252,253,5,34,0,0,253,27,1,0,0,0,254,259,3,48,24,0,255,256,5,9,0,0,256,257,5,15,0,0,257,258,5,9,0,0,258,260,3,48,24,0,259,255,1,0,0,0,259,260,1,0,0,0,260,29,1,0,0,0,261,263,5,54,0,0,262,261,1,0,0,0,262,263,1,0,0,0,263,271,1,0,0,0,264,272,3,32,16,0,265,266,3,32,16,0,266,267,5,9,0,0,267,268,5,26,0,0,268,269,5,9,0,0,269,270,3,38,19,0,270,272,1,0,0,0,271,264,1,0,0,0,271,265,1,0,0,0,272,274,1,0,0,0,273,275,5,54,0,0,274,273,1,0,0,0,274,275,1,0,0,0,275,31,1,0,0,0,276,281,3,48,24,0,277,278,5,1,0,0,278,282,5,42,0,0,279,280,5,11,0,0,280,282,3,48,24,0,281,277,1,0,0,0,281,279,1,0,0,0,281,282,1,0,0,0,282,33,1,0,0,0,283,285,3,36,18,0,284,283,1,0,0,0,285,288,1,0,0,0,286,284,1,0,0,0,286,287,1,0,0,0,287,35,1,0,0,0,288,286,1,0,0,0,289,290,5,54,0,0,290,292,3,46,23,0,291,289,1,0,0,0,291,292,1,0,0,0,292,293,1,0,0,0,293,294,5,54,0,0,294,295,5,22,0,0,295,296,5,9,0,0,296,298,3,38,19,0,297,299,5,9,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299,300,1,0,0,0,300,302,5,7,0,0,301,303,5,9,0,0,302,301,1,0,0,0,302,303,1,0,0,0,303,304,1,0,0,0,304,306,3,40,20,0,305,307,5,9,0,0,306,305,1,0,0,0,306,307,1,0,0,0,307,318,1,0,0,0,308,310,5,2,0,0,309,311,5,9,0,0,310,309,1,0,0,0,310,311,1,0,0,0,311,312,1,0,0,0,312,314,3,40,20,0,313,315,5,9,0,0,314,313,1,0,0,0,314,315,1,0,0,0,315,317,1,0,0,0,316,308,1,0,0,0,317,320,1,0,0,0,318,316,1,0,0,0,318,319,1,0,0,0,319,322,1,0,0,0,320,318,1,0,0,0,321,323,5,54,0,0,322,321,1,0,0,0,322,323,1,0,0,0,323,324,1,0,0,0,324,326,5,8,0,0,325,327,5,9,0,0,326,325,1,0,0,0,326,327,1,0,0,0,327,328,1,0,0,0,328,330,5,35,0,0,329,331,5,54,0,0,330,329,1,0,0,0,330,331,1,0,0,0,331,333,1,0,0,0,332,334,5,9,0,0,333,332,1,0,0,0,333,334,1,0,0,0,334,335,1,0,0,0,335,337,3,50,25,0,336,338,5,54,0,0,337,336,1,0,0,0,337,338,1,0,0,0,338,339,1,0,0,0,339,340,5,36,0,0,340,37,1,0,0,0,341,342,5,10,0,0,342,39,1,0,0,0,343,345,5,54,0,0,344,343,1,0,0,0,344,345,1,0,0,0,345,346,1,0,0,0,346,348,3,42,21,0,347,349,5,9,0,0,348,347,1,0,0,0,348,349,1,0,0,0,349,350,1,0,0,0,350,352,5,1,0,0,351,353,5,9,0,0,352,351,1,0,0,0,352,353,1,0,0,0,353,354,1,0,0,0,354,355,3,44,22,0,355,41,1,0,0,0,356,357,5,10,0,0,357,43,1,0,0,0,358,364,5,56,0,0,359,360,5,55,0,0,360,361,5,3,0,0,361,362,5,56,0,0,362,364,5,4,0,0,363,358,1,0,0,0,363,359,1,0,0,0,364,45,1,0,0,0,365,369,5,11,0,0,366,368,8,0,0,0,367,366,1,0,0,0,368,371,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,374,1,0,0,0,371,369,1,0,0,0,372,373,5,54,0,0,373,375,3,46,23,0,374,372,1,0,0,0,374,375,1,0,0,0,375,47,1,0,0,0,376,377,7,1,0,0,377,49,1,0,0,0,378,381,7,2,0,0,379,381,8,3,0,0,380,378,1,0,0,0,380,379,1,0,0,0,381,384,1,0,0,0,382,380,1,0,0,0,382,383,1,0,0,0,383,51,1,0,0,0,384,382,1,0,0,0,65,53,56,60,63,67,71,78,86,91,97,102,107,112,122,124,128,135,139,148,151,155,158,165,169,176,180,187,189,197,202,207,216,221,226,233,237,241,245,249,259,262,271,274,281,286,291,298,302,306,310,314,318,322,326,330,333,337,344,348,352,363,369,374,380,382],s.DecisionsToDFA=s._ATN.decisionToState.map(((e,t)=>new r.DFA(e,t))),t.default=s;class i extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}typeDefs(){return this.getTypedRuleContext(l,0)}conditions(){return this.getTypedRuleContext(T,0)}EOF(){return this.getToken(s.EOF,0)}modelHeader(){return this.getTypedRuleContext(o,0)}moduleHeader(){return this.getTypedRuleContext(a,0)}WHITESPACE(){return this.getToken(s.WHITESPACE,0)}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}get ruleIndex(){return s.RULE_main}enterRule(e){e.enterMain&&e.enterMain(this)}exitRule(e){e.exitMain&&e.exitMain(this)}}t.MainContext=i;class o extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}MODEL(){return this.getToken(s.MODEL,0)}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}SCHEMA(){return this.getToken(s.SCHEMA,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}SCHEMA_VERSION(){return this.getToken(s.SCHEMA_VERSION,0)}multiLineComment(){return this.getTypedRuleContext(A,0)}get ruleIndex(){return s.RULE_modelHeader}enterRule(e){e.enterModelHeader&&e.enterModelHeader(this)}exitRule(e){e.exitModelHeader&&e.exitModelHeader(this)}}t.ModelHeaderContext=o;class a extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}MODULE(){return this.getToken(s.MODULE,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}identifier(){return this.getTypedRuleContext(O,0)}multiLineComment(){return this.getTypedRuleContext(A,0)}NEWLINE(){return this.getToken(s.NEWLINE,0)}get ruleIndex(){return s.RULE_moduleHeader}enterRule(e){e.enterModuleHeader&&e.enterModuleHeader(this)}exitRule(e){e.exitModuleHeader&&e.exitModuleHeader(this)}}t.ModuleHeaderContext=a;class l extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}typeDef_list(){return this.getTypedRuleContexts(c)}typeDef(e){return this.getTypedRuleContext(c,e)}get ruleIndex(){return s.RULE_typeDefs}enterRule(e){e.enterTypeDefs&&e.enterTypeDefs(this)}exitRule(e){e.exitTypeDefs&&e.exitTypeDefs(this)}}t.TypeDefsContext=l;class c extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}TYPE(){return this.getToken(s.TYPE,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}identifier(){return this.getTypedRuleContext(O,0)}multiLineComment(){return this.getTypedRuleContext(A,0)}EXTEND(){return this.getToken(s.EXTEND,0)}RELATIONS(){return this.getToken(s.RELATIONS,0)}relationDeclaration_list(){return this.getTypedRuleContexts(u)}relationDeclaration(e){return this.getTypedRuleContext(u,e)}get ruleIndex(){return s.RULE_typeDef}enterRule(e){e.enterTypeDef&&e.enterTypeDef(this)}exitRule(e){e.exitTypeDef&&e.exitTypeDef(this)}}t.TypeDefContext=c;class u extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}DEFINE(){return this.getToken(s.DEFINE,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}relationName(){return this.getTypedRuleContext(d,0)}COLON(){return this.getToken(s.COLON,0)}relationDef(){return this.getTypedRuleContext(h,0)}multiLineComment(){return this.getTypedRuleContext(A,0)}get ruleIndex(){return s.RULE_relationDeclaration}enterRule(e){e.enterRelationDeclaration&&e.enterRelationDeclaration(this)}exitRule(e){e.exitRelationDeclaration&&e.exitRelationDeclaration(this)}}t.RelationDeclarationContext=u;class d extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}identifier(){return this.getTypedRuleContext(O,0)}get ruleIndex(){return s.RULE_relationName}enterRule(e){e.enterRelationName&&e.enterRelationName(this)}exitRule(e){e.exitRelationName&&e.exitRelationName(this)}}t.RelationNameContext=d;class h extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}relationDefDirectAssignment(){return this.getTypedRuleContext(b,0)}relationDefGrouping(){return this.getTypedRuleContext(m,0)}relationRecurse(){return this.getTypedRuleContext(g,0)}relationDefPartials(){return this.getTypedRuleContext(f,0)}get ruleIndex(){return s.RULE_relationDef}enterRule(e){e.enterRelationDef&&e.enterRelationDef(this)}exitRule(e){e.exitRelationDef&&e.exitRelationDef(this)}}t.RelationDefContext=h;class p extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}relationDefGrouping(){return this.getTypedRuleContext(m,0)}relationRecurseNoDirect(){return this.getTypedRuleContext(y,0)}relationDefPartials(){return this.getTypedRuleContext(f,0)}get ruleIndex(){return s.RULE_relationDefNoDirect}enterRule(e){e.enterRelationDefNoDirect&&e.enterRelationDefNoDirect(this)}exitRule(e){e.exitRelationDefNoDirect&&e.exitRelationDefNoDirect(this)}}t.RelationDefNoDirectContext=p;class f extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}OR_list(){return this.getTokens(s.OR)}OR(e){return this.getToken(s.OR,e)}relationDefGrouping_list(){return this.getTypedRuleContexts(m)}relationDefGrouping(e){return this.getTypedRuleContext(m,e)}relationRecurseNoDirect_list(){return this.getTypedRuleContexts(y)}relationRecurseNoDirect(e){return this.getTypedRuleContext(y,e)}AND_list(){return this.getTokens(s.AND)}AND(e){return this.getToken(s.AND,e)}BUT_NOT(){return this.getToken(s.BUT_NOT,0)}get ruleIndex(){return s.RULE_relationDefPartials}enterRule(e){e.enterRelationDefPartials&&e.enterRelationDefPartials(this)}exitRule(e){e.exitRelationDefPartials&&e.exitRelationDefPartials(this)}}t.RelationDefPartialsContext=f;class m extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}relationDefRewrite(){return this.getTypedRuleContext(v,0)}get ruleIndex(){return s.RULE_relationDefGrouping}enterRule(e){e.enterRelationDefGrouping&&e.enterRelationDefGrouping(this)}exitRule(e){e.exitRelationDefGrouping&&e.exitRelationDefGrouping(this)}}t.RelationDefGroupingContext=m;class g extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}LPAREN(){return this.getToken(s.LPAREN,0)}RPAREN(){return this.getToken(s.RPAREN,0)}relationDef(){return this.getTypedRuleContext(h,0)}relationRecurseNoDirect(){return this.getTypedRuleContext(y,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}get ruleIndex(){return s.RULE_relationRecurse}enterRule(e){e.enterRelationRecurse&&e.enterRelationRecurse(this)}exitRule(e){e.exitRelationRecurse&&e.exitRelationRecurse(this)}}t.RelationRecurseContext=g;class y extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}LPAREN(){return this.getToken(s.LPAREN,0)}RPAREN(){return this.getToken(s.RPAREN,0)}relationDefNoDirect(){return this.getTypedRuleContext(p,0)}relationRecurseNoDirect(){return this.getTypedRuleContext(y,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}get ruleIndex(){return s.RULE_relationRecurseNoDirect}enterRule(e){e.enterRelationRecurseNoDirect&&e.enterRelationRecurseNoDirect(this)}exitRule(e){e.exitRelationRecurseNoDirect&&e.exitRelationRecurseNoDirect(this)}}t.RelationRecurseNoDirectContext=y;class b extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}LBRACKET(){return this.getToken(s.LBRACKET,0)}relationDefTypeRestriction_list(){return this.getTypedRuleContexts(_)}relationDefTypeRestriction(e){return this.getTypedRuleContext(_,e)}RPRACKET(){return this.getToken(s.RPRACKET,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}COMMA_list(){return this.getTokens(s.COMMA)}COMMA(e){return this.getToken(s.COMMA,e)}get ruleIndex(){return s.RULE_relationDefDirectAssignment}enterRule(e){e.enterRelationDefDirectAssignment&&e.enterRelationDefDirectAssignment(this)}exitRule(e){e.exitRelationDefDirectAssignment&&e.exitRelationDefDirectAssignment(this)}}t.RelationDefDirectAssignmentContext=b;class v extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}identifier_list(){return this.getTypedRuleContexts(O)}identifier(e){return this.getTypedRuleContext(O,e)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}FROM(){return this.getToken(s.FROM,0)}get ruleIndex(){return s.RULE_relationDefRewrite}enterRule(e){e.enterRelationDefRewrite&&e.enterRelationDefRewrite(this)}exitRule(e){e.exitRelationDefRewrite&&e.exitRelationDefRewrite(this)}}t.RelationDefRewriteContext=v;class _ extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}relationDefTypeRestrictionBase(){return this.getTypedRuleContext(E,0)}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}KEYWORD_WITH(){return this.getToken(s.KEYWORD_WITH,0)}conditionName(){return this.getTypedRuleContext(w,0)}get ruleIndex(){return s.RULE_relationDefTypeRestriction}enterRule(e){e.enterRelationDefTypeRestriction&&e.enterRelationDefTypeRestriction(this)}exitRule(e){e.exitRelationDefTypeRestriction&&e.exitRelationDefTypeRestriction(this)}}t.RelationDefTypeRestrictionContext=_;class E extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}identifier_list(){return this.getTypedRuleContexts(O)}identifier(e){return this.getTypedRuleContext(O,e)}COLON(){return this.getToken(s.COLON,0)}HASH(){return this.getToken(s.HASH,0)}STAR(){return this.getToken(s.STAR,0)}get ruleIndex(){return s.RULE_relationDefTypeRestrictionBase}enterRule(e){e.enterRelationDefTypeRestrictionBase&&e.enterRelationDefTypeRestrictionBase(this)}exitRule(e){e.exitRelationDefTypeRestrictionBase&&e.exitRelationDefTypeRestrictionBase(this)}}t.RelationDefTypeRestrictionBaseContext=E;class T extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}condition_list(){return this.getTypedRuleContexts(x)}condition(e){return this.getTypedRuleContext(x,e)}get ruleIndex(){return s.RULE_conditions}enterRule(e){e.enterConditions&&e.enterConditions(this)}exitRule(e){e.exitConditions&&e.exitConditions(this)}}t.ConditionsContext=T;class x extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}CONDITION(){return this.getToken(s.CONDITION,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}conditionName(){return this.getTypedRuleContext(w,0)}LPAREN(){return this.getToken(s.LPAREN,0)}conditionParameter_list(){return this.getTypedRuleContexts(k)}conditionParameter(e){return this.getTypedRuleContext(k,e)}RPAREN(){return this.getToken(s.RPAREN,0)}LBRACE(){return this.getToken(s.LBRACE,0)}conditionExpression(){return this.getTypedRuleContext(C,0)}RBRACE(){return this.getToken(s.RBRACE,0)}multiLineComment(){return this.getTypedRuleContext(A,0)}COMMA_list(){return this.getTokens(s.COMMA)}COMMA(e){return this.getToken(s.COMMA,e)}get ruleIndex(){return s.RULE_condition}enterRule(e){e.enterCondition&&e.enterCondition(this)}exitRule(e){e.exitCondition&&e.exitCondition(this)}}t.ConditionContext=x;class w extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}IDENTIFIER(){return this.getToken(s.IDENTIFIER,0)}get ruleIndex(){return s.RULE_conditionName}enterRule(e){e.enterConditionName&&e.enterConditionName(this)}exitRule(e){e.exitConditionName&&e.exitConditionName(this)}}t.ConditionNameContext=w;class k extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}parameterName(){return this.getTypedRuleContext(S,0)}COLON(){return this.getToken(s.COLON,0)}parameterType(){return this.getTypedRuleContext(N,0)}NEWLINE(){return this.getToken(s.NEWLINE,0)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}get ruleIndex(){return s.RULE_conditionParameter}enterRule(e){e.enterConditionParameter&&e.enterConditionParameter(this)}exitRule(e){e.exitConditionParameter&&e.exitConditionParameter(this)}}t.ConditionParameterContext=k;class S extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}IDENTIFIER(){return this.getToken(s.IDENTIFIER,0)}get ruleIndex(){return s.RULE_parameterName}enterRule(e){e.enterParameterName&&e.enterParameterName(this)}exitRule(e){e.exitParameterName&&e.exitParameterName(this)}}t.ParameterNameContext=S;class N extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}CONDITION_PARAM_TYPE(){return this.getToken(s.CONDITION_PARAM_TYPE,0)}CONDITION_PARAM_CONTAINER(){return this.getToken(s.CONDITION_PARAM_CONTAINER,0)}LESS(){return this.getToken(s.LESS,0)}GREATER(){return this.getToken(s.GREATER,0)}get ruleIndex(){return s.RULE_parameterType}enterRule(e){e.enterParameterType&&e.enterParameterType(this)}exitRule(e){e.exitParameterType&&e.exitParameterType(this)}}t.ParameterTypeContext=N;class A extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}HASH(){return this.getToken(s.HASH,0)}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}multiLineComment(){return this.getTypedRuleContext(A,0)}get ruleIndex(){return s.RULE_multiLineComment}enterRule(e){e.enterMultiLineComment&&e.enterMultiLineComment(this)}exitRule(e){e.exitMultiLineComment&&e.exitMultiLineComment(this)}}t.MultiLineCommentContext=A;class O extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}MODEL(){return this.getToken(s.MODEL,0)}SCHEMA(){return this.getToken(s.SCHEMA,0)}TYPE(){return this.getToken(s.TYPE,0)}RELATION(){return this.getToken(s.RELATION,0)}IDENTIFIER(){return this.getToken(s.IDENTIFIER,0)}MODULE(){return this.getToken(s.MODULE,0)}EXTEND(){return this.getToken(s.EXTEND,0)}get ruleIndex(){return s.RULE_identifier}enterRule(e){e.enterIdentifier&&e.enterIdentifier(this)}exitRule(e){e.exitIdentifier&&e.exitIdentifier(this)}}t.IdentifierContext=O;class C extends r.ParserRuleContext{constructor(e,t,n){super(t,n),this.parser=e}IDENTIFIER_list(){return this.getTokens(s.IDENTIFIER)}IDENTIFIER(e){return this.getToken(s.IDENTIFIER,e)}EQUALS_list(){return this.getTokens(s.EQUALS)}EQUALS(e){return this.getToken(s.EQUALS,e)}NOT_EQUALS_list(){return this.getTokens(s.NOT_EQUALS)}NOT_EQUALS(e){return this.getToken(s.NOT_EQUALS,e)}IN_list(){return this.getTokens(s.IN)}IN(e){return this.getToken(s.IN,e)}LESS_list(){return this.getTokens(s.LESS)}LESS(e){return this.getToken(s.LESS,e)}LESS_EQUALS_list(){return this.getTokens(s.LESS_EQUALS)}LESS_EQUALS(e){return this.getToken(s.LESS_EQUALS,e)}GREATER_EQUALS_list(){return this.getTokens(s.GREATER_EQUALS)}GREATER_EQUALS(e){return this.getToken(s.GREATER_EQUALS,e)}GREATER_list(){return this.getTokens(s.GREATER)}GREATER(e){return this.getToken(s.GREATER,e)}LOGICAL_AND_list(){return this.getTokens(s.LOGICAL_AND)}LOGICAL_AND(e){return this.getToken(s.LOGICAL_AND,e)}LOGICAL_OR_list(){return this.getTokens(s.LOGICAL_OR)}LOGICAL_OR(e){return this.getToken(s.LOGICAL_OR,e)}LBRACKET_list(){return this.getTokens(s.LBRACKET)}LBRACKET(e){return this.getToken(s.LBRACKET,e)}RPRACKET_list(){return this.getTokens(s.RPRACKET)}RPRACKET(e){return this.getToken(s.RPRACKET,e)}LBRACE_list(){return this.getTokens(s.LBRACE)}LBRACE(e){return this.getToken(s.LBRACE,e)}LPAREN_list(){return this.getTokens(s.LPAREN)}LPAREN(e){return this.getToken(s.LPAREN,e)}RPAREN_list(){return this.getTokens(s.RPAREN)}RPAREN(e){return this.getToken(s.RPAREN,e)}DOT_list(){return this.getTokens(s.DOT)}DOT(e){return this.getToken(s.DOT,e)}MINUS_list(){return this.getTokens(s.MINUS)}MINUS(e){return this.getToken(s.MINUS,e)}EXCLAM_list(){return this.getTokens(s.EXCLAM)}EXCLAM(e){return this.getToken(s.EXCLAM,e)}QUESTIONMARK_list(){return this.getTokens(s.QUESTIONMARK)}QUESTIONMARK(e){return this.getToken(s.QUESTIONMARK,e)}PLUS_list(){return this.getTokens(s.PLUS)}PLUS(e){return this.getToken(s.PLUS,e)}STAR_list(){return this.getTokens(s.STAR)}STAR(e){return this.getToken(s.STAR,e)}SLASH_list(){return this.getTokens(s.SLASH)}SLASH(e){return this.getToken(s.SLASH,e)}PERCENT_list(){return this.getTokens(s.PERCENT)}PERCENT(e){return this.getToken(s.PERCENT,e)}CEL_TRUE_list(){return this.getTokens(s.CEL_TRUE)}CEL_TRUE(e){return this.getToken(s.CEL_TRUE,e)}CEL_FALSE_list(){return this.getTokens(s.CEL_FALSE)}CEL_FALSE(e){return this.getToken(s.CEL_FALSE,e)}NUL_list(){return this.getTokens(s.NUL)}NUL(e){return this.getToken(s.NUL,e)}WHITESPACE_list(){return this.getTokens(s.WHITESPACE)}WHITESPACE(e){return this.getToken(s.WHITESPACE,e)}CEL_COMMENT_list(){return this.getTokens(s.CEL_COMMENT)}CEL_COMMENT(e){return this.getToken(s.CEL_COMMENT,e)}NUM_FLOAT_list(){return this.getTokens(s.NUM_FLOAT)}NUM_FLOAT(e){return this.getToken(s.NUM_FLOAT,e)}NUM_INT_list(){return this.getTokens(s.NUM_INT)}NUM_INT(e){return this.getToken(s.NUM_INT,e)}NUM_UINT_list(){return this.getTokens(s.NUM_UINT)}NUM_UINT(e){return this.getToken(s.NUM_UINT,e)}STRING_list(){return this.getTokens(s.STRING)}STRING(e){return this.getToken(s.STRING,e)}BYTES_list(){return this.getTokens(s.BYTES)}BYTES(e){return this.getToken(s.BYTES,e)}NEWLINE_list(){return this.getTokens(s.NEWLINE)}NEWLINE(e){return this.getToken(s.NEWLINE,e)}RBRACE_list(){return this.getTokens(s.RBRACE)}RBRACE(e){return this.getToken(s.RBRACE,e)}get ruleIndex(){return s.RULE_conditionExpression}enterRule(e){e.enterConditionExpression&&e.enterConditionExpression(this)}exitRule(e){e.exitConditionExpression&&e.exitConditionExpression(this)}}t.ConditionExpressionContext=C},7730:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(36168);class s extends r.ParseTreeListener{}t.default=s},41418:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.errors=t.transformer=t.validator=void 0,t.validator=i(n(70483)),t.transformer=i(n(58298)),t.errors=i(n(26351))},20366:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return s(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseDSL=y,t.transformDSLToJSONObject=b,t.transformDSLToJSON=function(e){return JSON.stringify(b(e))},t.transformModularDSLToJSONObject=function(e){const{listener:t,errorListener:n}=y(e);if(n.errors.length)throw new h.DSLSyntaxError(n.errors);return{authorizationModel:t.authorizationModel,typeDefExtensions:t.typeDefExtensions}};const a=i(n(36168)),l=n(36168),c=o(n(7730)),u=o(n(83891)),d=o(n(17846)),h=n(26351);var p;function f(e,t){let n;if(null==e?void 0:e.length){if(1===(null==e?void 0:e.length))n=e[0];else switch(t){case p.RELATION_DEFINITION_OPERATOR_OR:n={union:{child:e}};break;case p.RELATION_DEFINITION_OPERATOR_AND:n={intersection:{child:e}};break;case p.RELATION_DEFINITION_OPERATOR_BUT_NOT:n={difference:{base:e.shift(),subtract:e.shift()}}}return n}}!function(e){e.RELATION_DEFINITION_OPERATOR_NONE="",e.RELATION_DEFINITION_OPERATOR_OR="or",e.RELATION_DEFINITION_OPERATOR_AND="and",e.RELATION_DEFINITION_OPERATOR_BUT_NOT="but not"}(p||(p={}));class m extends c.default{constructor(){super(...arguments),this.authorizationModel={},this.typeDefExtensions=new Map,this.isModularModel=!1,this.rewriteStack=[],this.exitModuleHeader=e=>{e._moduleName&&(this.isModularModel=!0,this.moduleName=e._moduleName.getText())},this.exitModelHeader=e=>{e.SCHEMA_VERSION()&&(this.authorizationModel.schema_version=e.SCHEMA_VERSION().getText())},this.enterTypeDefs=e=>{this.authorizationModel.type_definitions=[]},this.exitTypeDefs=e=>{var t;(null===(t=this.authorizationModel.type_definitions)||void 0===t?void 0:t.length)||delete this.authorizationModel.type_definitions},this.enterTypeDef=e=>{var t;e._typeName&&(e.EXTEND()&&!this.isModularModel&&(null===(t=e.parser)||void 0===t||t.notifyErrorListeners("extend can only be used in a modular model",e._typeName.start,void 0)),this.currentTypeDef={type:e._typeName.getText(),relations:{},metadata:{relations:{}}},this.isModularModel&&(this.currentTypeDef.metadata.module=this.moduleName))},this.exitTypeDef=e=>{var t,n,r,s,i,o,a;(null===(t=this.currentTypeDef)||void 0===t?void 0:t.type)&&(this.isModularModel&&!Object.keys((null===(r=null===(n=this.currentTypeDef)||void 0===n?void 0:n.metadata)||void 0===r?void 0:r.relations)||{}).length?this.currentTypeDef.metadata.relations=void 0:this.isModularModel||Object.keys((null===(i=null===(s=this.currentTypeDef)||void 0===s?void 0:s.metadata)||void 0===i?void 0:i.relations)||{}).length||(this.currentTypeDef.metadata=null),null===(o=this.authorizationModel.type_definitions)||void 0===o||o.push(this.currentTypeDef),e.EXTEND()&&this.isModularModel&&(this.typeDefExtensions.has(this.currentTypeDef.type)?null===(a=e.parser)||void 0===a||a.notifyErrorListeners(`'${this.currentTypeDef.type}' is already extended in file.`,e._typeName.start,void 0):this.typeDefExtensions.set(this.currentTypeDef.type,this.currentTypeDef)),this.currentTypeDef=void 0)},this.enterRelationDeclaration=e=>{this.currentRelation={rewrites:[],typeInfo:{directly_related_user_types:[]}},this.rewriteStack=[]},this.exitRelationDeclaration=e=>{var t,n,r,s,i,o;if(!e.relationName())return;const a=e.relationName().getText(),l=f(null===(t=this.currentRelation)||void 0===t?void 0:t.rewrites,null===(n=this.currentRelation)||void 0===n?void 0:n.operator);if(l){this.currentTypeDef.relations[a]&&(null===(r=e.parser)||void 0===r||r.notifyErrorListeners(`'${a}' is already defined in '${null===(s=this.currentTypeDef)||void 0===s?void 0:s.type}'`,e.relationName().start,void 0)),this.currentTypeDef.relations[a]=l;const t=null===(o=null===(i=this.currentRelation)||void 0===i?void 0:i.typeInfo)||void 0===o?void 0:o.directly_related_user_types;this.currentTypeDef.metadata.relations[a]={directly_related_user_types:t},this.isModularModel&&e.parentCtx.EXTEND()&&(this.currentTypeDef.metadata.relations[a].module=this.moduleName)}this.currentRelation=void 0},this.enterRelationDefDirectAssignment=e=>{this.currentRelation.typeInfo={directly_related_user_types:[]}},this.exitRelationDefDirectAssignment=e=>{var t,n;null===(n=null===(t=this.currentRelation)||void 0===t?void 0:t.rewrites)||void 0===n||n.push({this:{}})},this.exitRelationDefTypeRestriction=e=>{var t;const n={},r=e.relationDefTypeRestrictionBase();if(!r)return;n.type=null===(t=r._relationDefTypeRestrictionType)||void 0===t?void 0:t.getText();const s=r._relationDefTypeRestrictionRelation,i=r._relationDefTypeRestrictionWildcard;e.conditionName()&&(n.condition=e.conditionName().getText()),s&&(n.relation=s.getText()),i&&(n.wildcard={}),this.currentRelation.typeInfo.directly_related_user_types.push(n)},this.exitRelationDefRewrite=e=>{var t,n;let r={computedUserset:{relation:e._rewriteComputedusersetName.getText()}};e._rewriteTuplesetName&&(r={tupleToUserset:Object.assign(Object.assign({},r),{tupleset:{relation:e._rewriteTuplesetName.getText()}})}),null===(n=null===(t=this.currentRelation)||void 0===t?void 0:t.rewrites)||void 0===n||n.push(r)},this.exitRelationRecurse=()=>{var e,t;const n=f(null===(e=this.currentRelation)||void 0===e?void 0:e.rewrites,null===(t=this.currentRelation)||void 0===t?void 0:t.operator);n&&(this.currentRelation.rewrites=[n])},this.enterRelationRecurseNoDirect=()=>{var e;null===(e=this.rewriteStack)||void 0===e||e.push({rewrites:this.currentRelation.rewrites,operator:this.currentRelation.operator}),this.currentRelation.rewrites=[]},this.exitRelationRecurseNoDirect=()=>{var e,t;const n=f(null===(e=this.currentRelation)||void 0===e?void 0:e.rewrites,null===(t=this.currentRelation)||void 0===t?void 0:t.operator),r=this.rewriteStack.pop();n&&(this.currentRelation.operator=null==r?void 0:r.operator,this.currentRelation.rewrites=[...r.rewrites,n])},this.enterRelationDefPartials=e=>{e.OR_list().length?this.currentRelation.operator=p.RELATION_DEFINITION_OPERATOR_OR:e.AND_list().length?this.currentRelation.operator=p.RELATION_DEFINITION_OPERATOR_AND:e.BUT_NOT()&&(this.currentRelation.operator=p.RELATION_DEFINITION_OPERATOR_BUT_NOT)},this.enterCondition=e=>{var t;if(null===e.conditionName())return;this.authorizationModel.conditions||(this.authorizationModel.conditions={});const n=e.conditionName().getText();this.authorizationModel.conditions[n]&&(null===(t=e.parser)||void 0===t||t.notifyErrorListeners(`condition '${n}' is already defined in the model`,e.conditionName().start,void 0)),this.currentCondition={name:n,expression:"",parameters:{}},this.isModularModel&&(this.currentCondition.metadata={module:this.moduleName})},this.exitConditionParameter=e=>{var t,n,r,s;if(!e.parameterName()||!e.parameterType())return;const i=e.parameterName().getText();(null===(n=null===(t=this.currentCondition)||void 0===t?void 0:t.parameters)||void 0===n?void 0:n[i])&&(null===(r=e.parser)||void 0===r||r.notifyErrorListeners(`parameter '${i}' is already defined in the condition '${null===(s=this.currentCondition)||void 0===s?void 0:s.name}'`,e.parameterName().start,void 0));const o=e.parameterType().CONDITION_PARAM_CONTAINER(),a={};if(o){a.type_name=`TYPE_NAME_${o.getText().toUpperCase()}`;const t=e.parameterType().CONDITION_PARAM_TYPE()&&`TYPE_NAME_${e.parameterType().CONDITION_PARAM_TYPE().getText().toUpperCase()}`;t&&(a.generic_types=[{type_name:t}])}else a.type_name=`TYPE_NAME_${e.parameterType().getText().toUpperCase()}`;this.currentCondition.parameters[i]=a},this.exitConditionExpression=e=>{this.currentCondition.expression=e.getText().trim()},this.exitCondition=()=>{this.currentCondition&&(this.authorizationModel.conditions[this.currentCondition.name]=this.currentCondition,this.currentCondition=void 0)}}}class g extends l.ErrorListener{constructor(){super(...arguments),this.errors=[]}syntaxError(e,t,n,r,s,i){let o,l=0;t instanceof a.Token&&(o={symbol:t.text},l=o.symbol.length),this.errors.push(new h.DSLSyntaxSingleError({line:{start:n-1,end:n-1},column:{start:r,end:r+l},msg:s},o,i))}}function y(e){const t=e.split("\n").map((e=>"#"===e.trimStart()[0]?"":e.split(" #")[0].trimEnd())).join("\n"),n=new a.InputStream(t),r=new g,s=new u.default(n);s.removeErrorListeners(),s.addErrorListener(r);const i=new a.CommonTokenStream(s),o=new d.default(i);o.removeErrorListeners(),o.addErrorListener(r);const l=new m;return(new a.ParseTreeWalker).walk(l,o.main()),{listener:l,errorListener:r}}function b(e){const{listener:t,errorListener:n}=y(e);if(n.errors.length)throw new h.DSLSyntaxError(n.errors);return t.authorizationModel}},58298:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(20366),t),s(n(29624),t),s(n(82387),t),s(n(22395),t)},29624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformJSONStringToDSL=t.transformJSONToDSL=void 0,t.getModulesFromJSON=function(e){var t,n,s;const i=(null==e?void 0:e.schema_version)||"1.1";if("1.2"!==i)throw new r.UnsupportedModularModules(i);if(!(null===(t=e.type_definitions)||void 0===t?void 0:t.some((e=>{var t;return null===(t=e.metadata)||void 0===t?void 0:t.module}))))return[];const o={};null===(n=e.type_definitions)||void 0===n||n.forEach((e=>{var t,n,r,s;const i=null===(t=e.metadata)||void 0===t?void 0:t.module;i&&(o[i]=!0);for(const a in null===(n=null==e?void 0:e.metadata)||void 0===n?void 0:n.relations){const t=null===(s=null===(r=null==e?void 0:e.metadata)||void 0===r?void 0:r.relations[a])||void 0===s?void 0:s.module;t&&(o[t]=!0)}}));const a=e.conditions||{};for(const r in a){const e=null===(s=a[r].metadata)||void 0===s?void 0:s.module;e&&(o[e]=!0)}return Object.keys(o).sort()};const r=n(26351);class s{constructor(){this.occured=0,this.isFirstPosition=e=>{var t,n,r;return!!e.this||((null===(t=e.difference)||void 0===t?void 0:t.base)?!!e.difference.base.this||this.isFirstPosition(e.difference.base):(null===(n=e.intersection)||void 0===n?void 0:n.child.length)?!!e.intersection.child[0].this||this.isFirstPosition(e.intersection.child[0]):!!(null===(r=e.union)||void 0===r?void 0:r.child.length)&&(!!e.union.child[0].this||this.isFirstPosition(e.union.child[0])))}}}function i(e){const t=e.type,n=e.relation,r=e.wildcard,s=e.condition;let i=t;return r&&(i=`${i}:*`),n&&(i=`${i}#${n}`),s&&(i=`${i} with ${s}`),i}function o(e){return`[${function(e){const t=[];for(let n=0;n<(null==e?void 0:e.length);n++)t.push(i(e[n]));return t}(e).join(", ")}]`}function a(e,t,n,r,s){return`${u(e,t,n.difference.base,r,s)} but not ${u(e,t,n.difference.subtract,r,s)}`}function l(e,t,n,r,s){var i;const o=[],a=h(null===(i=null==n?void 0:n.union)||void 0===i?void 0:i.child);for(const l of a||[])o.push(u(e,t,l,r,s));return o.join(" or ")}function c(e,t,n,r,s){var i;const o=[],a=h(null===(i=null==n?void 0:n.intersection)||void 0===i?void 0:i.child);for(const l of a||[])o.push(u(e,t,l,r,s));return o.join(" and ")}function u(e,t,n,s,i){if(n.this)return i.occured++,o(s);if(n.computedUserset)return function(e){return e.computedUserset.relation}(n);if(n.tupleToUserset)return function(e){var t,n,r,s;return`${null===(n=null===(t=null==e?void 0:e.tupleToUserset)||void 0===t?void 0:t.computedUserset)||void 0===n?void 0:n.relation} from ${null===(s=null===(r=null==e?void 0:e.tupleToUserset)||void 0===r?void 0:r.tupleset)||void 0===s?void 0:s.relation}`}(n);if(n.union)return`(${l(e,t,n,s,i)})`;if(n.intersection)return`(${c(e,t,n,s,i)})`;if(n.difference)return`(${a(e,t,n,s,i)})`;throw new r.UnsupportedDSLNestingError(e,t)}function d(e,t,n={},r={},i=!1){const o=new s;let d=` define ${t}: `;const h=r.directly_related_user_types||[];if(null!=n.difference?d+=a(e,t,n,h,o):null!=n.union?d+=l(e,t,n,h,o):null!=n.intersection?d+=c(e,t,n,h,o):d+=u(e,t,n,h,o),d+=f(r," extended by:",i),!o.occured||1===o.occured&&o.isFirstPosition(n))return d;throw new Error(`the '${t}' relation definition under the '${e}' type is not supported by the OpenFGA DSL syntax yet`)}const h=e=>{if(null==e?void 0:e.length){const t=e.findIndex((e=>e.this));t>0&&e.unshift(...e.splice(t,1))}return e},p=(e,t,n=!1)=>{if(e!=t.name)throw new r.ConditionNameDoesntMatchError(e,t.name);const s=(e=>{const t=[];return Object.keys(e).sort().forEach((n=>{var r;const s=e[n];let i=s.type_name.replace("TYPE_NAME_","").toLowerCase();"list"!==i&&"map"!==i||(i=`${i}<${null===(r=s.generic_types)||void 0===r?void 0:r[0].type_name.replace("TYPE_NAME_","").toLowerCase()}>`),t.push(`${n}: ${i}`)})),t.join(", ")})(t.parameters||{}),i=f(t.metadata,"",n);return`condition ${e}(${s}) {\n ${t.expression}\n}${i}\n`},f=(e,t="",n=!1)=>{var r;return(null==e?void 0:e.module)&&n?` #${t} module: ${e.module}, file: ${null===(r=e.source_info)||void 0===r?void 0:r.file}`:""};t.transformJSONToDSL=(e,t)=>{var n,r;const s=(null==e?void 0:e.schema_version)||"1.1",i=null===(n=e.type_definitions)||void 0===n?void 0:n.some((e=>{var t;return null===(t=e.metadata)||void 0===t?void 0:t.module})),o=null===(r=i?null==e?void 0:e.type_definitions.sort(((e,t)=>m(e.type,t.type,e.metadata,t.metadata))):null==e?void 0:e.type_definitions)||void 0===r?void 0:r.map((e=>((e,t,n=!1)=>{var r,s;const i=e.type;let o=`\ntype ${i}${f(e.metadata,"",n)}`;const a=e.relations||{},l=e.metadata;if(null===(r=Object.keys(a))||void 0===r?void 0:r.length){o+="\n relations";const e=Object.entries(a).sort((([e],[n])=>{var r,s;return t?m(e,n,(null===(r=null==l?void 0:l.relations)||void 0===r?void 0:r[e])||{},(null===(s=null==l?void 0:l.relations)||void 0===s?void 0:s[n])||{}):0}));for(const[t,r]of e)o+=`\n${d(i,t,r,null===(s=null==l?void 0:l.relations)||void 0===s?void 0:s[t],n)}`}return o})(e,i,null==t?void 0:t.includeSourceInformation))),a=((e,t,n=!1)=>{const r=e.conditions||{};if(!Object.keys(r).length)return"";let s="";return Object.entries(r).sort((([e,n],[r,s])=>t?m(e,r,n.metadata,s.metadata):e.localeCompare(r))).forEach((([e,t])=>{const r=p(e,t,n);s+=`\n${r}`})),s})(e,i,null==t?void 0:t.includeSourceInformation);return`model\n schema ${s}\n${o?`${o.join("\n")}\n`:""}${a}`};function m(e,t,n,r){var s,i;return(null==n?void 0:n.module)||(null==r?void 0:r.module)?null==(null==n?void 0:n.module)?-1:void 0===(null==r?void 0:r.module)?1:n.module!==r.module?n.module.localeCompare(r.module):(null===(s=n.source_info)||void 0===s?void 0:s.file)!==(null===(i=r.source_info)||void 0===i?void 0:i.file)?n.source_info.file.localeCompare(r.source_info.file):e.localeCompare(t):e.localeCompare(t)}t.transformJSONStringToDSL=(e,n)=>{const r=JSON.parse(e);return(0,t.transformJSONToDSL)(r,n)}},82387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformModFileToJSON=void 0;const r=n(12020),s=n(26351);function i(e){if(void 0===e)return{line:{start:0,end:0},column:{start:0,end:0}};let[t,n]=e;return void 0===n&&(n=t),{line:{start:t.line,end:n.line},column:{start:t.col,end:n.col}}}function o(e,t){if(!(0,r.isNode)(e)||!e.range)return{line:{start:0,end:0},column:{start:0,end:0}};const n=t.linePos(e.range[0]),s=t.linePos(e.range[1]);return{line:{start:n.line-1,end:s.line-1},column:{start:n.col-1,end:s.col-1}}}t.transformModFileToJSON=e=>{const t=new r.LineCounter,n=(0,r.parseDocument)(e,{lineCounter:t,keepSourceTokens:!0}),a=[];for(const r of n.errors)a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:r.message},i(r.linePos))));const l={},c=n.get("schema",!0);c?"string"!=typeof c.value?a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:`unexpected schema type, expected string got value ${c.value}`},o(c,t)))):"1.2"!==c.value?a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:"unsupported schema version, fga.mod only supported in version `1.2`"},o(c,t)))):l.schema=Object.assign({value:c.value},o(c,t)):a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:"missing schema field"},i())));const u=n.get("contents",!0);if(u)if((0,r.isSeq)(u)){const e=n.get("contents"),r=[];for(const n of e.items){if("string"!=typeof n.value){a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:`unexpected contents item type, expected string got value ${n.value}`},o(n,t))));continue}let e=n.value.replace(/%2e/gi,".");e=e.replace(/%2f/gi,"/"),e=e.replace(/%5c/gi,"\\"),e.includes("../")||e.includes("..\\")||e.startsWith("/")?a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:`invalid contents item ${n.value}`},o(n,t)))):e.endsWith(".fga")?r.push(Object.assign({value:e},o(n,t))):a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:`contents items should use fga file extension, got ${n.value}`},o(n,t))))}const i=n.get("contents",!0);l.contents=Object.assign({value:r},o(i,t))}else{const e=n.get("contents",!0),r=n.get("contents");a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:`unexpected contents type, expected list of strings got value ${r}`},o(e,t))))}else a.push(new s.FGAModFileValidationSingleError(Object.assign({msg:"missing contents field"},i())));if(a.length)throw new s.FGAModFileValidationError(a);return l}},22395:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformModuleFilesToModel=void 0;const r=n(7975),s=n(20366),i=n(26351),o=n(37162),a=n(47361);function l(e,t){const{metadata:n}=e;let r;if(!n||!t)return-1;switch(null==n?void 0:n.errorType){case i.ValidationError.ConditionNotUsed:r=(0,o.getConditionLineNumber)(n.symbol,t);break;case i.ValidationError.ReservedTypeKeywords:r=(0,o.getTypeLineNumber)(n.symbol,t);break;case i.ValidationError.InvalidName:r=e.message.startsWith("invalid-name error: relation")?(0,o.getRelationLineNumber)(n.symbol,t):(0,o.getTypeLineNumber)(n.symbol,t);break;case i.ValidationError.ReservedRelationKeywords:r=(0,o.getRelationLineNumber)(n.symbol,t);break;case i.ValidationError.InvalidRelationType:let s=(0,o.getTypeLineNumber)(n.offendingType,t);-1===s&&(s=(0,o.getTypeLineNumber)(n.offendingType,t,void 0,!0)),r=(0,o.getRelationLineNumber)(n.relation,t,s);break;case i.ValidationError.InvalidRelationOnTupleset:case i.ValidationError.MissingDefinition:case i.ValidationError.InvalidType:case i.ValidationError.ConditionNotDefined:case i.ValidationError.TuplesetNotDirect:case i.ValidationError.TypeRestrictionCannotHaveWildcardAndRelation:case i.ValidationError.RelationNoEntrypoint:case i.ValidationError.DuplicatedError:let a=(0,o.getTypeLineNumber)(n.type,t);if(-1===a&&(a=(0,o.getTypeLineNumber)(n.type,t,void 0,!0)),!n.relation){r=a;break}r=(0,o.getRelationLineNumber)(n.relation,t,a)}return void 0===r?-1:r}function c(e,t){const{metadata:n}=e;if(!n)return-1;const r=new RegExp("\\b"+n.symbol+"\\b");let s;switch(n.errorType){case i.ValidationError.InvalidType:const e=t.split(":");s=e[0].length+e[1].search(r)+1;break;case i.ValidationError.TuplesetNotDirect:const o=t.indexOf("from")+4;s=o+t.slice(o).indexOf(n.symbol);break;default:s=null==t?void 0:t.search(r)}return(null==s||isNaN(s)||-1===s)&&(s=0),s}t.transformModuleFilesToModel=(e,t)=>{var n,u,d,h,p;const f={schema_version:t,type_definitions:[],conditions:{}},m=[],g=new Set,y={},b=new Map,v=[],_=new Map(e.map((e=>[e.name,e.contents])));for(const{name:r,contents:l}of e)try{const e=l.split("\n"),{authorizationModel:t,typeDefExtensions:n}=(0,s.transformModularDSLToJSONObject)(l);for(const s of t.type_definitions)n.has(s.type)?(y[r]||(y[r]=[]),y[r].push(s)):(s.metadata.source_info={file:r},g.add(s.type),m.push(s));if(t.conditions)for(const[s,i]of Object.entries(t.conditions))if(b.has(s)){const t=(0,o.getConditionLineNumber)(s,e);v.push((0,a.constructTransformationError)({message:`duplicate condition ${s}`,lines:e,lineIndex:t,metadata:{symbol:s,file:r}}))}else i.metadata.source_info={file:r},b.set(s,i)}catch(E){if(E instanceof i.DSLSyntaxError)for(const e of E.errors)e.file=r,v.push(e);else E instanceof Error&&v.push(E)}for(const[r,s]of Object.entries(y)){const e=null===(n=_.get(r))||void 0===n?void 0:n.split("\n");for(const t of s){if(!t.relations)continue;const n=m.findIndex((e=>e.type===t.type)),s=m[n];if(!s){const n=(0,o.getTypeLineNumber)(t.type,e,0,!0);v.push((0,a.constructTransformationError)({message:`extended type ${t.type} does not exist`,lines:e,lineIndex:n,metadata:{symbol:t.type,file:r}}));continue}const l=Object.keys(s.relations||{});if(l&&l.length){for(const[n,c]of Object.entries(t.relations)){if(l.includes(n)){const s=(0,o.getRelationLineNumber)(n,e);v.push((0,a.constructTransformationError)({message:`relation ${n} already exists on type ${t.type}`,lines:e,lineIndex:s,metadata:{symbol:n,file:r}}));continue}const d=Object.entries((null===(u=t.metadata)||void 0===u?void 0:u.relations)||{}).find((([e])=>e===n));if(!d){v.push(new i.ModuleTransformationSingleError({msg:`unable to find relation metadata for ${n}`}));continue}const[,h]=d;h.source_info={file:r},s.relations[n]=c,s.metadata.relations[n]=h}m[n]=s}else{s.relations=t.relations,s.metadata||(s.metadata={}),s.metadata.relations=t.metadata.relations;for(const e of Object.keys(s.metadata.relations))s.metadata.relations[e].source_info={file:r};m[n]=s}}}f.type_definitions=m,f.conditions=Object.fromEntries(b);try{(0,r.validateJSON)(f)}catch(E){if(E instanceof i.ModelValidationError)for(const e of E.errors){if(!e.file||!(null===(d=e.metadata)||void 0===d?void 0:d.module)||!e.metadata.symbol){v.push(e);continue}const t=null===(h=_.get(e.file))||void 0===h?void 0:h.split("\n");if(!t){v.push(e);continue}const n=l(e,t);if(-1===n){v.push(e);continue}const r=c(e,t[n]);e.line={start:n,end:n},e.column={start:r,end:r+((null===(p=e.metadata.symbol)||void 0===p?void 0:p.length)||0)},v.push(e)}}if(v.length)throw new i.ModuleTransformationError(v);return f}},47361:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExceptionCollector=t.createMaximumOneDirectRelationship=t.createSchemaVersionRequiredError=t.createInvalidSchemaVersionError=void 0,t.constructTransformationError=function(e){var t;const{message:n,lines:s,lineIndex:i,metadata:o}=e;if(!(null==s?void 0:s.length)||void 0===i)return new r.ModuleTransformationSingleError({msg:n},{symbol:null==o?void 0:o.symbol});const a=s[i],l=new RegExp("\\b"+o.symbol+"\\b");let c=null==a?void 0:a.search(l);(isNaN(c)||-1===c)&&(c=0);return new r.ModuleTransformationSingleError({line:{start:i,end:i},column:{start:c,end:c+((null===(t=o.symbol)||void 0===t?void 0:t.length)||0)},msg:n,file:o.file},{symbol:null==o?void 0:o.symbol})};const r=n(26351),s=n(73439);t.createInvalidSchemaVersionError=e=>{const{errors:t,lines:n,lineIndex:s,symbol:o}=e;t.push(i({message:`invalid schema ${o}`,lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.InvalidSchema}}))};t.createSchemaVersionRequiredError=e=>{const{errors:t,lines:n,lineIndex:s,symbol:o}=e;t.push(i({message:"schema version required",lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.SchemaVersionRequired}}))};t.createMaximumOneDirectRelationship=e=>{const{errors:t,lines:n,lineIndex:s,symbol:o}=e;t.push(i({message:"each relationship must have at most 1 set of direct relations defined.",lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.AssignableRelationsMustHaveType},customResolver:(e,t,n)=>t.indexOf(n.substring(1))}))};function i(e){var t;const{message:n,lines:s,lineIndex:i,customResolver:o,metadata:a}=e,l={msg:n,file:a.file},c={symbol:null==a?void 0:a.symbol,errorType:a.errorType,module:a.module,relation:a.relation,type:a.typeName,offendingType:a.offendingType};if((null==s?void 0:s.length)&&null!=i){const e=s[i],n=new RegExp("\\b"+a.symbol+"\\b");let r=null==e?void 0:e.search(n);(isNaN(r)||-1===r)&&(r=0),"function"==typeof o&&(r=o(r,e,a.symbol)),l.line={start:i,end:i},l.column={start:r,end:r+((null===(t=a.symbol)||void 0===t?void 0:t.length)||0)}}return new r.ModelValidationSingleError(l,c)}t.ExceptionCollector=class{constructor(e,t){this.errors=e,this.lines=t}raiseInvalidName(e,t,n,s,o){((e,t,n)=>{const{errors:s,lines:o,lineIndex:a,symbol:l,file:c,module:u}=e,d=(n?`relation '${l}' of type '${n}' `:`type '${l}' `)+`does not match naming rule: '${t}'.`;s.push(i({message:d,lines:o,lineIndex:a,metadata:{symbol:l,errorType:r.ValidationError.InvalidName,file:c,module:u}}))})({errors:this.errors,lines:this.lines,lineIndex:s,symbol:e,file:null==o?void 0:o.file,module:null==o?void 0:o.module},t,n)}raiseReservedTypeName(e,t,n){(e=>{const{errors:t,lines:n,lineIndex:o,symbol:a,file:l,module:c}=e;t.push(i({message:`a type cannot be named '${s.Keyword.SELF}' or '${s.ReservedKeywords.THIS}'.`,lines:n,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.ReservedTypeKeywords,file:l,module:c}}))})({errors:this.errors,lines:this.lines,lineIndex:t,symbol:e,file:null==n?void 0:n.file,module:null==n?void 0:n.module})}raiseReservedRelationName(e,t,n){(e=>{const{errors:t,lines:n,lineIndex:o,symbol:a,file:l,module:c}=e;t.push(i({message:`a relation cannot be named '${s.Keyword.SELF}' or '${s.ReservedKeywords.THIS}'.`,lines:n,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.ReservedRelationKeywords,file:l,module:c}}))})({errors:this.errors,lines:this.lines,lineIndex:t,symbol:e,file:null==n?void 0:n.file,module:null==n?void 0:n.module})}raiseTupleUsersetRequiresDirect(e,t,n,s,o){(e=>{const{errors:t,lines:n,lineIndex:s,symbol:o,file:a,module:l,type:c,relation:u}=e;t.push(i({message:`\`${o}\` relation used inside from allows only direct relation.`,lines:n,lineIndex:s,customResolver:(e,t,n)=>{const r=t.indexOf("from")+4;return r+t.slice(r).indexOf(n)},metadata:{symbol:o,errorType:r.ValidationError.TuplesetNotDirect,file:a,module:l,typeName:c,relation:u}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,file:s.file,module:s.module,relation:n,type:t})}raiseDuplicateTypeName(e,t,n){(e=>{const{errors:t,lines:n,lineIndex:s,symbol:o,file:a,module:l}=e;t.push(i({message:`the type \`${o}\` is a duplicate.`,lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.DuplicatedError,typeName:o,file:a,module:l}}))})({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e,module:t.module,file:t.file})}raiseDuplicateTypeRestriction(e,t,n,s,o){((e,t,n)=>{const{errors:s,lines:o,lineIndex:a,symbol:l,file:c,module:u}=e;s.push(i({message:`the type restriction \`${l}\` is a duplicate in the relation \`${t}\`.`,lines:o,lineIndex:a,metadata:{symbol:l,errorType:r.ValidationError.DuplicatedError,relation:t,typeName:n,file:c,module:u}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,module:s.module,file:s.file},t,n)}raiseDuplicateType(e,t,n,s,o){((e,t,n)=>{const{errors:s,lines:o,lineIndex:a,symbol:l,file:c,module:u}=e;s.push(i({message:`the partial relation definition \`${l}\` is a duplicate in the relation \`${t}\`.`,lines:o,lineIndex:a,metadata:{symbol:l,errorType:r.ValidationError.DuplicatedError,relation:t,typeName:n,file:c,module:u}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,module:s.module,file:s.file},t,n)}raiseDuplicateRelationshipDefinition(e,t,n){(e=>{const{errors:t,lines:n,lineIndex:i,symbol:o,file:a,module:l}=e;if(!(null==n?void 0:n.length)||void 0===i)return void t.push(new r.ModelValidationSingleError({msg:`duplicate relationship definition \`${o}\`.`,file:a},{symbol:o,errorType:r.ValidationError.DuplicatedError,module:l}));const c=n[i];t.push(new r.ModelValidationSingleError({msg:`duplicate relationship definition \`${o}\`.`,line:{start:i,end:i},column:{start:c.indexOf(s.Keyword.DEFINE),end:c.length},file:a},{symbol:o,errorType:r.ValidationError.DuplicatedError,module:l}))})({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e,module:t.module,file:t.file})}raiseNoEntryPointLoop(e,t,n,s){((e,t)=>{const{errors:n,lines:s,lineIndex:o,symbol:a,file:l,module:c}=e;n.push(i({message:`\`${a}\` is an impossible relation for \`${t}\` (potential loop).`,lines:s,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.RelationNoEntrypoint,relation:a,typeName:t,file:l,module:c}}))})({errors:this.errors,lines:this.lines,lineIndex:s,symbol:e,module:n.module,file:n.file},t)}raiseNoEntryPoint(e,t,n,s){((e,t)=>{const{errors:n,lines:s,lineIndex:o,symbol:a,module:l,file:c}=e;n.push(i({message:`\`${a}\` is an impossible relation for \`${t}\` (no entrypoint).`,lines:s,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.RelationNoEntrypoint,relation:a,typeName:t,module:l,file:c}}))})({errors:this.errors,lines:this.lines,lineIndex:s,symbol:e,file:n.file,module:n.module},t)}raiseInvalidRelationOnTupleset(e,t,n,s,o,a,l,c){((e,t,n,s,o,a)=>{const{errors:l,lines:c,lineIndex:u,symbol:d,file:h,module:p}=e;l.push(i({message:`the \`${o}\` relation definition on type \`${n}\` is not valid: \`${o}\` does not exist on \`${a}\`, which is of type \`${t}\`.`,lines:c,lineIndex:u,metadata:{symbol:d,errorType:r.ValidationError.InvalidRelationOnTupleset,relation:s,typeName:n,file:h,module:p}}))})({errors:this.errors,lines:this.lines,lineIndex:l,symbol:e,file:null==c?void 0:c.file,module:null==c?void 0:c.module},t,n,s,o,a)}raiseInvalidTypeRelation(e,t,n,s,o,a,l){((e,t,n,s,o)=>{const{errors:a,lines:l,lineIndex:c,symbol:u,file:d,module:h}=e;a.push(i({message:`\`${s}\` is not a valid relation for \`${t}\`.`,lines:l,lineIndex:c,metadata:{symbol:u,errorType:r.ValidationError.InvalidRelationType,relation:n,typeName:t,file:d,module:h,offendingType:o}}))})({errors:this.errors,lines:this.lines,lineIndex:a,symbol:e,file:null==l?void 0:l.file,module:null==l?void 0:l.module},t,n,s,o)}raiseInvalidType(e,t,n,s,o){((e,t)=>{const{errors:n,lines:s,lineIndex:o,symbol:a,file:l,module:c,relation:u}=e;n.push(i({message:`\`${a}\` is not a valid type.`,lines:s,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.InvalidType,typeName:t,file:l,module:c,relation:u},customResolver:(e,t,n)=>{const r=new RegExp("\\b"+n+"\\b"),s=t.split(":");return s[0].length+s[1].search(r)+1}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,module:s.module,file:s.file,relation:n},t)}raiseAssignableRelationMustHaveTypes(e,t){(e=>{const{errors:t,lines:n,lineIndex:s}=e;if(!(null==n?void 0:n.length)||void 0===s){const e="";return void t.push(i({message:`assignable relation '${e}' must have types`,metadata:{symbol:e,errorType:r.ValidationError.AssignableRelationsMustHaveType}}))}const o=n[s],a=o.includes("[")?o.slice(o.indexOf("["),o.lastIndexOf("]")):"self";t.push(i({message:`assignable relation '${a}' must have types`,lines:n,lineIndex:s,customResolver:(e,t,n)=>t.indexOf(n.substring(1)),metadata:{symbol:a,errorType:r.ValidationError.AssignableRelationsMustHaveType}}))})({errors:this.errors,lines:this.lines,lineIndex:t,symbol:e})}raiseAssignableTypeWildcardRelation(e,t,n,s,o){(e=>{const{errors:t,lines:n,lineIndex:s,symbol:o,file:a,module:l,type:c,relation:u}=e;t.push(i({message:`type restriction \`${o}\` cannot contain both wildcard and relation`,lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.TypeRestrictionCannotHaveWildcardAndRelation,relation:u,typeName:c,module:l,file:a}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,relation:n,type:t,module:s.module,file:s.file})}raiseInvalidRelationError(e,t,n,s,o,a){((e,t)=>{const{errors:n,lines:s,lineIndex:o,symbol:a,file:l,module:c,type:u,relation:d}=e;!(null==t?void 0:t.includes(a))&&n.push(i({message:`the relation \`${a}\` does not exist.`,lines:s,lineIndex:o,metadata:{symbol:a,errorType:r.ValidationError.MissingDefinition,relation:d,file:l,module:c,typeName:u}}))})({errors:this.errors,lines:this.lines,lineIndex:o,symbol:e,file:null==a?void 0:a.file,module:null==a?void 0:a.module,type:t,relation:n},s)}raiseInvalidSchemaVersion(e,n){(0,t.createInvalidSchemaVersionError)({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e})}raiseSchemaVersionRequired(e,n){(0,t.createSchemaVersionRequiredError)({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e})}raiseMaximumOneDirectRelationship(e,n){(0,t.createMaximumOneDirectRelationship)({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e})}raiseInvalidConditionNameInParameter(e,t,n,s,o,a){((e,t,n,s)=>{const{errors:o,lines:a,lineIndex:l,symbol:c,module:u,file:d}=e;o.push(i({message:`\`${s}\` is not a defined condition in the model.`,lines:a,lineIndex:l,metadata:{symbol:c,errorType:r.ValidationError.ConditionNotDefined,relation:n,typeName:t,file:d,module:u}}))})({errors:this.errors,lines:this.lines,lineIndex:a,symbol:e,module:o.module,file:o.file},t,n,s)}raiseUnusedCondition(e,t,n){(e=>{const{errors:t,lines:n,lineIndex:s,symbol:o,module:a,file:l}=e;t.push(i({message:`\`${o}\` condition is not used in the model.`,lines:n,lineIndex:s,metadata:{symbol:o,errorType:r.ValidationError.ConditionNotUsed,conditionName:o,module:a,file:l}}))})({errors:this.errors,lines:this.lines,lineIndex:n,symbol:e,module:t.module,file:t.file})}raiseDifferentNestedConditionName(e,t){((e,t,n)=>{const{errors:s}=e;s.push(i({message:`condition key is \`${t}\` but nested name property is ${n}`,metadata:{symbol:n,errorType:r.ValidationError.DifferentNestedConditionName}}))})({errors:this.errors,symbol:e},e,t)}raiseMultipleModulesInSingleFile(e,t){!function(e,t,n){const{errors:s}=e;s.push(i({message:`file ${t} would contain multiple module definitions (${n.join(", ")}) when transforming to DSL. Only one module can be defined per file.`,metadata:{symbol:t,errorType:r.ValidationError.MultipleModulesInFile}}))}({errors:this.errors,lines:this.lines,symbol:e},e,Array.from(t))}}},37162:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRelationLineNumber=t.getTypeLineNumber=t.getConditionLineNumber=void 0;t.getConditionLineNumber=(e,t,n)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().startsWith(`condition ${e}`)))+n};t.getTypeLineNumber=(e,t,n,r=!1)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().match(`^${r?"extend ":""}type ${e}$`)))+n};t.getRelationLineNumber=(e,t,n)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().replace(/ {2,}/g," ").match(`^define ${e}\\s*:`)))+n}},70483:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(7975),t),s(n(78347),t),s(n(6453),t)},73439:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.ReservedKeywords=t.Keyword=void 0,function(e){e.SELF="self",e.DEFINE="DEFINE"}(n||(t.Keyword=n={})),function(e){e.THIS="this"}(r||(t.ReservedKeywords=r={}))},7975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateJSON=S,t.validateDSL=function(e,t={}){const{listener:n,errorListener:r}=(0,s.parseDSL)(e);if(r.errors.length)throw new i.DSLSyntaxError(r.errors);S(n.authorizationModel,t,e)};const r=n(73439),s=n(20366),i=n(26351),o=n(47361),a=n(78347);var l,c;!function(e){e.Union="union",e.Intersection="intersection",e.Difference="difference"}(l||(l={})),function(e){e.Direct="direct",e.ComputedUserset="computed_userset",e.TupleToUserset="tuple_to_userset"}(c||(c={}));const u=e=>{let t=e.type;return e.wildcard?t+=":*":e.relation&&(t+=`#${e.relation}`),e.condition&&(t+=` with ${e.condition}`),t},d=e=>e.map((e=>u(e))),h=e=>{var t,n,r,s;let i,o;e.computedUserset?i=e.computedUserset.relation||void 0:(i=(null===(n=null===(t=e.tupleToUserset)||void 0===t?void 0:t.computedUserset)||void 0===n?void 0:n.relation)||void 0,o=(null===(s=null===(r=e.tupleToUserset)||void 0===r?void 0:r.tupleset)||void 0===s?void 0:s.relation)||void 0);let a=c.Direct;return i&&(a=c.ComputedUserset),o&&(a=c.TupleToUserset),{target:i,from:o,rewrite:a}},p=e=>{var t;let n=null===(t=e.computedUserset)||void 0===t?void 0:t.relation;const r=h(e);return r.rewrite===c.ComputedUserset?n=r.target:r.rewrite===c.TupleToUserset&&(n=`${r.target} from ${r.from}`),n},f=e=>JSON.parse(JSON.stringify(e)),m=e=>!Object.prototype.hasOwnProperty.call(e,l.Union)&&!Object.prototype.hasOwnProperty.call(e,l.Intersection)&&!Object.prototype.hasOwnProperty.call(e,l.Difference);const g=e=>{const[t,n]=e.split(" with "),r=t.includes(":*"),s=t.replace(":*","").split("#");return{decodedType:s[0],decodedRelation:s[1],isWildcard:r,decodedConditionName:n}};function y(e,t,n,r,s){var i,o,a,l;const c=f(s);if(!n)return{hasEntry:!1,loop:!1};c[t]||(c[t]={}),c[t][n]=!0;const u=e[t].relations;if(!u||!u[n])return{hasEntry:!1,loop:!1};const h=null===(i=e[t].metadata)||void 0===i?void 0:i.relations;if(!e[t].relations||!e[t].relations[n])return{hasEntry:!1,loop:!1};if(r.this){for(const t of d((null===(o=null==h?void 0:h[n])||void 0===o?void 0:o.directly_related_user_types)||[])){const{decodedType:n,decodedRelation:r,isWildcard:s}=g(t);if(!r||s)return{hasEntry:!0,loop:!1};const i=e[n].relations[r];if(!i)return{hasEntry:!1,loop:!1};if(null===(a=c[n])||void 0===a?void 0:a[r])continue;const{hasEntry:o}=y(e,n,r,i,c);if(o)return{hasEntry:!0,loop:!1}}return{hasEntry:!1,loop:!1}}if(r.computedUserset){const n=r.computedUserset.relation;if(!n)return{hasEntry:!1,loop:!1};if(!e[t].relations[n])return{hasEntry:!1,loop:!1};const s=e[t].relations[n];return s?c[t][n]?{hasEntry:!1,loop:!0}:y(e,t,n,s,c):{hasEntry:!1,loop:!1}}if(r.tupleToUserset){const n=r.tupleToUserset.tupleset.relation,s=r.tupleToUserset.computedUserset.relation;if(!n||!s)return{hasEntry:!1,loop:!1};if(!e[t].relations[n])return{hasEntry:!1,loop:!1};for(const t of d((null===(l=null==h?void 0:h[n])||void 0===l?void 0:l.directly_related_user_types)||[])){const n=e[t].relations[s];if(n){if(c[t]&&c[t][s])continue;const{hasEntry:r}=y(e,t,s,n,c);if(r)return{hasEntry:!0,loop:!1}}}return{hasEntry:!1,loop:!1}}if(r.union){let s=!1;for(const i of r.union.child){const{hasEntry:r,loop:o}=y(e,t,n,i,f(c));if(r)return{hasEntry:!0,loop:!1};s=s||o}return{hasEntry:!1,loop:s}}if(r.intersection){for(const s of r.intersection.child){const{hasEntry:r,loop:i}=y(e,t,n,s,f(c));if(!r)return{hasEntry:!1,loop:i}}return{hasEntry:!0,loop:!1}}if(r.difference){const i=f(s),o=y(e,t,n,r.difference.base,i);if(!o.hasEntry)return{hasEntry:!1,loop:o.loop};const a=y(e,t,n,r.difference.subtract,i);return a.hasEntry?{hasEntry:!0,loop:!1}:{hasEntry:!1,loop:a.loop}}return{hasEntry:!1,loop:!1}}const b=(e,t,n)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().startsWith(`condition ${e}`)))+n},v=(e,t,n)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().match(`^type ${e}$`)))+n},_=(e,t,n)=>{if(n||(n=0),t)return t.slice(n).findIndex((t=>t.trim().replace(/ {2,}/g," ").match(`^define ${e}\\s*:`)))+n},E=(e,t)=>{if(!t)return;const n=t.findIndex((t=>t.trim().replace(/ {2,}/g," ").match(`^schema ${e}$`)));return n>=1?n:0};function T(e,t,n,r,s,i,o){var a;const l=new Set;null===(a=t.directly_related_user_types)||void 0===a||a.forEach((a=>{var c;const d=u(a);if(l.has(d)){const l=v(a.type,o),u=_(n,o,l),h=(null===(c=t.source_info)||void 0===c?void 0:c.file)||s,p=t.module||i;e.raiseDuplicateTypeRestriction(d,n,r,{file:h,module:p},u)}l.add(d)}))}function x(e,t,n,r){var s,i,o,a,c,u,d;const h=t.relations[n],f=null===(i=null===(s=t.metadata)||void 0===s?void 0:s.source_info)||void 0===i?void 0:i.file,m=null===(o=t.metadata)||void 0===o?void 0:o.module,g=new Set;null===(c=null===(a=h.union)||void 0===a?void 0:a.child)||void 0===c||c.forEach((s=>{const i=p(s);if(i&&g.has(i)){const s=v(t.type,r),o=_(n,r,s);e.raiseDuplicateType(i,n,t.type,{file:f,module:m},o)}g.add(i)}));const y=new Set;if(null===(d=null===(u=h.intersection)||void 0===u?void 0:u.child)||void 0===d||d.forEach((s=>{const i=p(s);if(i&&y.has(i)){const s=v(t.type,r),o=_(n,r,s);e.raiseDuplicateType(i,n,t.type,{file:f,module:m},o)}y.add(i)})),Object.prototype.hasOwnProperty.call(h,l.Difference)){const s=p(h.difference.base),i=p(h.difference.subtract);if(s&&s===i){const i=v(t.type,r),o=_(n,r,i);e.raiseDuplicateType(s,n,t.type,{file:f,module:m},o)}}}function w(e,t,n,r,s,i={},o){var a,l,u,p,f;const y=t[n].relations;if(!y||!y[r])return;const b=null===(a=t[n].metadata)||void 0===a?void 0:a.relations[r];let E=null===(l=null==b?void 0:b.source_info)||void 0===l?void 0:l.file;E||(E=null===(p=null===(u=t[n].metadata)||void 0===u?void 0:u.source_info)||void 0===p?void 0:p.file);let T=null==b?void 0:b.module;switch(T||(T=null===(f=t[n].metadata)||void 0===f?void 0:f.module),s.rewrite){case c.Direct:{const s=d((null==b?void 0:b.directly_related_user_types)||[]);if(!s.length){const t=v(n,o),s=_(r,o,t);e.raiseAssignableRelationMustHaveTypes(r,s)}for(const a of s){const{decodedType:s,decodedRelation:l,isWildcard:c,decodedConditionName:u}=g(a);if(!t[s]){const t=v(n,o),i=_(r,o,t);e.raiseInvalidType(s,n,r,{file:E,module:T},i)}if(u&&!i[u]){const t=v(n,o),s=_(r,o,t);e.raiseInvalidConditionNameInParameter(`${u}`,n,r,u,{file:E,module:T},s)}if(c&&l){const t=v(n,o),s=_(r,o,t);e.raiseAssignableTypeWildcardRelation(a,n,r,{file:E,module:T},s)}else if(l&&(!t[s]||!t[s].relations[l])){const t=v(n,o),i=_(r,o,t);e.raiseInvalidTypeRelation(`${s}#${l}`,s,r,l,n,i,{file:E,module:T})}}break}case c.ComputedUserset:if(s.target&&!y[s.target]){const t=v(n,o),i=_(r,o,t),a=s.target;e.raiseInvalidRelationError(a,n,r,Object.keys(y),i,{file:E,module:T})}break;case c.TupleToUserset:if(s.from&&s.target)if(y[s.from]){const[i,a]=function(e,t,n){var r;const s=[],i=e[t].relations[n],o=d((null===(r=e[t].metadata)||void 0===r?void 0:r.relations[n].directly_related_user_types)||[]),a=m(i);a&&h(i).rewrite===c.Direct&&s.push(...o);return[s,a]}(t,n,s.from);if(a&&i.length){const a=[];for(const l of i){const{decodedType:i,decodedRelation:c,isWildcard:u}=g(l);if(u||c){const t=v(n,o),i=_(r,o,t);e.raiseTupleUsersetRequiresDirect(s.from,n,r,{file:E,module:T},i)}else if(!t[i]||!t[i].relations[s.target]){const e=v(n,o),t=_(r,o,e);a.push({symbol:`${s.target} from ${s.from}`,typeName:i,relationName:s.target,parent:s.from,lineIndex:t})}}if(a.length===i.length)for(const t of a){const{lineIndex:s,symbol:i,typeName:o,relationName:a,parent:l}=t;e.raiseInvalidRelationOnTupleset(i,o,n,r,a,l,s,{module:T,file:E})}}else{const t=v(n,o),i=_(r,o,t);e.raiseTupleUsersetRequiresDirect(s.from,n,r,{module:T,file:E},i)}}else{const t=v(n,o),i=_(r,o,t);e.raiseInvalidTypeRelation(`${s.target} from ${s.from}`,n,r,s.from,n,i,{file:E,module:T})}}}function k(e,t,n,r,s,i){var o,a,l,c;const u=t[n].relations;if(!u||!u[r])return;const d=[Object.assign({},u[r])];for(;d.length;){const u=d.shift();(null===(o=null==u?void 0:u.union)||void 0===o?void 0:o.child.length)?d.push(...u.union.child):(null===(a=null==u?void 0:u.intersection)||void 0===a?void 0:a.child.length)?d.push(...u.intersection.child):(null===(l=null==u?void 0:u.difference)||void 0===l?void 0:l.base)&&u.difference.subtract?d.push(null===(c=null==u?void 0:u.difference)||void 0===c?void 0:c.base,u.difference.subtract):u&&w(e,t,n,r,h(u),s,i)}}function S(e,t={},n){const s=null==n?void 0:n.split("\n"),l=[],c=new o.ExceptionCollector(l,s),u=t.typeValidation||`^${a.Rules.type}$`,d=t.relationValidation||`^${a.Rules.relation}$`,h=new RegExp("[a-zA-Z]*"),p={};let f={regex:h,rule:u};try{f={regex:new RegExp(u),rule:u}}catch(w){throw new i.ConfigurationError(`Incorrect type regex specification for ${u}`,w)}let m={regex:h,rule:d};try{m={regex:new RegExp(d),rule:d}}catch(w){throw new i.ConfigurationError(`Incorrect relation regex specification for ${d}`,w)}!function(e,t,n,s,i,o){var a;null===(a=t.type_definitions)||void 0===a||a.forEach((t=>{var a,l,c,u,d,h,p,f,m,g,y,b,E;const T=t.type,x=null===(l=null===(a=t.metadata)||void 0===a?void 0:a.source_info)||void 0===l?void 0:l.file,w=null===(c=t.metadata)||void 0===c?void 0:c.module;if(x&&w&&(i[x]||(i[x]=new Set),i[x].add(w)),T===r.Keyword.SELF||T===r.ReservedKeywords.THIS){const n=v(T,o);e.raiseReservedTypeName(T,n,{file:null===(d=null===(u=t.metadata)||void 0===u?void 0:u.source_info)||void 0===d?void 0:d.file,module:null===(h=t.metadata)||void 0===h?void 0:h.module})}if(!n.regex.test(T)){const r=v(T,o);e.raiseInvalidName(T,n.rule,void 0,r,{file:null===(f=null===(p=t.metadata)||void 0===p?void 0:p.source_info)||void 0===f?void 0:f.file,module:null===(m=t.metadata)||void 0===m?void 0:m.module})}for(const n in t.relations){const i=n;let a=null===(y=null===(g=t.metadata)||void 0===g?void 0:g.relations)||void 0===y?void 0:y[n];if((null==a?void 0:a.module)||(a=t.metadata),i===r.Keyword.SELF||i===r.ReservedKeywords.THIS){const t=v(T,o),n=_(i,o,t);e.raiseReservedRelationName(i,n,{file:null===(b=null==a?void 0:a.source_info)||void 0===b?void 0:b.file,module:null==a?void 0:a.module})}if(!s.regex.test(i)){const t=v(T,o),n=_(i,o,t);e.raiseInvalidName(i,s.rule,T,n,{file:null===(E=null==a?void 0:a.source_info)||void 0===E?void 0:E.file,module:null==a?void 0:a.module})}}}))}(c,e,f,m,p,s);const g=e.schema_version;switch(g||c.raiseSchemaVersionRequired("",0),g){case"1.1":case"1.2":!function(e,t,n,r,s){var i,o,a,l,c,u,d;if(t.length)return;const h={},p=new Set;if(null===(i=n.type_definitions)||void 0===i||i.forEach((e=>{var t,n;const r=e.type;h[r]=e;for(const s in null===(t=e.metadata)||void 0===t?void 0:t.relations)((null===(n=e.metadata)||void 0===n?void 0:n.relations[s].directly_related_user_types)||[]).forEach((e=>{e.condition&&p.add(e.condition)}))})),null===(o=n.type_definitions)||void 0===o||o.forEach((t=>{const r=t.type;for(const i in t.relations)k(e,h,r,i,n.conditions,s)})),0===t.length){const t=new Set;null===(a=n.type_definitions)||void 0===a||a.forEach((n=>{var r,i,o,a,l;const c=n.type,u=null===(i=null===(r=n.metadata)||void 0===r?void 0:r.source_info)||void 0===i?void 0:i.file,d=null===(o=n.metadata)||void 0===o?void 0:o.module;if(t.has(c)){const t=v(c,s);e.raiseDuplicateTypeName(c,{file:u,module:d},t)}t.add(n.type);for(const t in null===(a=n.metadata)||void 0===a?void 0:a.relations)T(e,null===(l=n.metadata)||void 0===l?void 0:l.relations[t],t,c,u,d,s),x(e,n,t,s)}))}if(0===t.length&&(null===(l=n.type_definitions)||void 0===l||l.forEach((t=>{var n,i,o,a,l;const c=t.type;for(const u in t.relations){const d=h[c].relations,p=null===(n=t.metadata)||void 0===n?void 0:n.relations[u];let f=null===(i=null==p?void 0:p.source_info)||void 0===i?void 0:i.file;f||(f=null===(a=null===(o=t.metadata)||void 0===o?void 0:o.source_info)||void 0===a?void 0:a.file);let m=null==p?void 0:p.module;m||(m=null===(l=t.metadata)||void 0===l?void 0:l.module),f&&m&&(r[f]||(r[f]=new Set),r[f].add(m));const{hasEntry:g,loop:b}=y(h,c,u,d[u],{});if(!g){const t=v(c,s),n=_(u,s,t);b?e.raiseNoEntryPointLoop(u,c,{file:f,module:m},n):e.raiseNoEntryPoint(u,c,{file:f,module:m},n)}}}))),n.conditions)for(const[f,m]of Object.entries(n.conditions)){const t=null===(c=m.metadata)||void 0===c?void 0:c.module,n=null===(d=null===(u=m.metadata)||void 0===u?void 0:u.source_info)||void 0===d?void 0:d.file;if(n&&t&&(r[n]||(r[n]=new Set),r[n].add(t)),f!=m.name&&e.raiseDifferentNestedConditionName(f,m.name),!p.has(f)){const r=b(f,s);e.raiseUnusedCondition(f,{module:t,file:n},r)}}}(c,l,e,p,s);break;case void 0:break;default:{const e=E(g,s);c.raiseInvalidSchemaVersion(g,e);break}}for(const[r,i]of Object.entries(p))1!==i.size&&c.raiseMultipleModulesInSingleFile(r,i);if(l.length)throw new i.ModelValidationError(l)}},78347:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validator=t.Rules=void 0,t.Rules={type:"[^:#@\\*\\s]{1,254}",relation:"[^:#@\\*\\s]{1,50}",condition:"[^\\*\\s]{1,50}",id:"[^#:\\s*][a-zA-Z0-9_|*@.+]*",object:"[^\\s]{2,256}"},t.Validator={object:e=>n(`^${t.Rules.type}:${t.Rules.id}$`,e)&&n(`^${t.Rules.object}$`,e),relation:e=>n(`^${t.Rules.relation}$`,e),userSet:e=>n(`^${t.Rules.type}:${t.Rules.id}#${t.Rules.relation}$`,e),userObject:e=>n(`^${t.Rules.type}:${t.Rules.id}$`,e)&&n(`^${t.Rules.object}$`,e),userWildcard:e=>n(`^${t.Rules.type}:\\*$`,e),user:e=>t.Validator.userSet(e)||t.Validator.userObject(e)||t.Validator.userWildcard(e),relationshipCondition:e=>n(`^${t.Rules.condition}$`,e),type:e=>n(`^${t.Rules.type}$`,e),objectId:e=>n(`^${t.Rules.id}$`,e)};const n=(e,t)=>new RegExp(e).test(t)},6453:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isStringValue=o,t.YamlTuplesValidator=function(){return new s.default({allErrors:!0,verbose:!0,passContext:!0,$data:!0}).addFormat("user",{validate:i.Validator.user}).addFormat("relation",{validate:i.Validator.relation}).addFormat("object",{validate:i.Validator.object}).addFormat("condition",{validate:i.Validator.relationshipCondition}).addKeyword({keyword:"valid_tuple",type:"object",schema:!1,errors:!0,validate:x}).compile(C)},t.YamlStoreValidator=function(){return new s.default({allErrors:!0,verbose:!0,passContext:!0,$data:!0}).addFormat("user",{validate:i.Validator.user}).addFormat("relation",{validate:i.Validator.relation}).addFormat("object",{validate:i.Validator.object}).addFormat("condition",{validate:i.Validator.relationshipCondition}).addFormat("type",{validate:i.Validator.type}).addKeyword({keyword:"valid_tuple",type:"object",schema:!1,errors:!0,validate:x}).addKeyword({keyword:"valid_store",type:"object",schema:!1,errors:!0,validate:O}).compile(I)};const s=r(n(63282)),i=n(78347);function o(e){return"string"==typeof e||String}const a=(e,t)=>({keyword:"valid_tuple",message:e,instancePath:t}),l=(e,t,n)=>a(`invalid type '${e}'. Valid types are [${t}]`,n),c=(e,t,n)=>a(`relation '${e}' is not a relation on type '${t}'.`,n),u=(e,t,n)=>{var r;return a(`'${e}' is not a parameter on condition '${null===(r=t.condition)||void 0===r?void 0:r.name}'.`,n+`/condition/context/${e}`)},d=(e,t)=>({keyword:"valid_store",message:e,instancePath:t}),h=e=>d("`user` field must be one of [:, :* or :#]",e),p=(e,t,n)=>d(`invalid type '${e}'. Valid types are [${t}]`,n),f=(e,t,n)=>d(`invalid relation '${e}'. Valid relations are [${t}]`,n),m=(e,t,n,r)=>n.length?d(`\`${e}\` is not a relation on \`${t}\`, and does not exist in model - valid relations are [${n}].`,r):d(`\`${e}\` is not a relation on \`${t}\`, and does not exist in model.`,r),g=(e,t,n)=>d(`\`${e}\` is not a relationship for type \`${t}\`.`,n),y=(e,t)=>d(`\`${e}\` is not a recognized paramaeter for any condition defined in the model.`,t),b=(e,t)=>({keyword:"valid_store_warning",message:`${e} does not match any existing tuples; the check is still valid - but double check to ensure this is intended.`,instancePath:t});function v(e){const t=e.split(":");return{type:t[0],id:t[1]}}function _(e){const t=e.split(":"),n=t[0];if("*"===t[1])return{type:n,id:void 0,relation:void 0,wildcard:!0};if(t[1].includes("#")){const[e,r]=t[1].split("#");return{type:n,id:e,relation:r,wildcard:!1}}return{type:n,id:t[1],relation:void 0,wildcard:!1}}function E(e,t,n,r){var s,i;x.errors=x.errors||[];const o=function(e){var t;return{type:e.user.split(":")[0],relation:e.user.includes("#")?e.user.split("#")[1]:void 0,wildcard:e.user.includes(":*")?{}:void 0,condition:null===(t=e.condition)||void 0===t?void 0:t.name}}(e),l=v(e.object).type,c=t.filter((e=>e.type===l))[0],d=null===(i=null===(s=null==c?void 0:c.metadata)||void 0===s?void 0:s.relations)||void 0===i?void 0:i[e.relation].directly_related_user_types;return(null==d?void 0:d.filter((e=>e.type===o.type&&!!o.wildcard==!!e.wildcard&&e.relation===o.relation&&e.condition===o.condition)).length)?!o.condition||!n||function(e,t,n,r){if(x.errors=x.errors||[],e.condition&&e.condition.context&&n[t].parameters)for(const s of Object.keys(e.condition.context))if(!n[t].parameters[s])return x.errors.push(u(s,e,r)),!1;return!0}(e,o.condition,n,r):(x.errors.push(((e,t,n)=>a(`'${e}' is not a type restriction on relation '${t.relation}' of type '${t.object.split(":")[0]}'.`,n+"/user"))(function(e){let t=e.type;return e.wildcard?t+=":*":e.relation&&(t+=`#${e.relation}`),e.condition&&(t+=`' with '${e.condition}`),t}(o),e,r)),!1)}function T(e,t,n){return!e.condition||(x.errors=x.errors||[],!(!t||!t[e.condition.name])||(x.errors.push(((e,t)=>{var n;return a(`condition '${null===(n=e.condition)||void 0===n?void 0:n.name}' is not defined.`,t+"/condition/name")})(e,n)),!1))}const x=function(e,t){if(x.errors=x.errors||[],!function(e){return!!(e.user&&o(e.user)&&e.object&&o(e.object)&&e.relation&&o(e.relation))}(e))return!1;if(!this.jsonModel)return!1;const n=this.jsonModel;return function(e,t,n){var r;const s=[],i=_(e.user).type;t.includes(i)||s.push(l(i,t,n+"/user"));const o=v(e.object).type;return t.includes(o)||s.push(l(o,t,n+"/object")),!s.length||(null===(r=x.errors)||void 0===r||r.push(...s),!1)}(e,n.type_definitions.map((e=>e.type)),t.instancePath)&&function(e,t,n){var r,s,i;const o=[];let a=!1;if(e.user.includes("#")){const s=_(e.user);for(const e of t)if(e&&e.type===s.type&&s.relation&&(null===(r=e.relations)||void 0===r?void 0:r[s.relation])){a=!0;break}!a&&s.relation&&o.push(c(s.relation,s.type,n+"/user"))}const l=v(e.object).type;let u=!1;for(const c of t)if(c&&c.type===l&&(null===(s=c.relations)||void 0===s?void 0:s[e.relation])){u=!0;break}return u||o.push(c(e.relation,l,n+"/relation")),!o.length||(null===(i=x.errors)||void 0===i||i.push(...o),!1)}(e,n.type_definitions,t.instancePath)&&T(e,n.conditions,t.instancePath)&&E(e,n.type_definitions,n.conditions,t.instancePath)};function w(e,t,n,r){const s=[],i=_(n).type;if(t.includes(i)||(s.push(h(r+"/user")),s.push(p(i,t,r+"/user"))),n.includes("#")){const[t,i]=n.split("#"),o=e.type_definitions.filter((e=>e.type===t)).flatMap((e=>{const n=[];for(const r in e.relations)n.push(t+"#"+r);return n}));o.includes(n)||s.push(m(i,t,o.map((e=>e.split("#")[1])),r+"/user"))}return s}function k(e,t,n,r){var s;const i=[],o=e.type_definitions.filter((e=>e.type===t)).map((e=>e.relations));for(const a in n)for(const e in o)(null===(s=o[e])||void 0===s?void 0:s[a])||i.push(g(a,t,r+`/assertions/${a}`));return i}function S(e,t,n,r,s){const i=[],a=e.type_definitions.map((e=>e.type));if(t.user&&o(t.user)){const r=t.user;i.push(...w(e,a,r,s)),i.length||n.map((e=>e.user)).filter((e=>e===r)).length||i.push(b(r,s+"/user"))}const l=[];if(t.object&&o(t.object)){const r=t.object,i=v(r).type;a.includes(i)||l.push(p(i,a,s+"/object")),l.length||n.map((e=>e.object)).filter((e=>e===r)).length||l.push(b(r,s+"/object")),l.push(...k(e,i,t.assertions,s))}const c=t.context;for(const o in c)r.includes(o)||l.push(y(o,s+`/context/${o}`));return[...i,...l]}function N(e,t,n,r,s){const i=[],a=e.type_definitions.map((e=>e.type));if(t.user&&o(t.user)){const r=t.user;i.push(...w(e,a,r,s)),i.length||n.map((e=>e.user)).filter((e=>e===r)).length||i.push(b(r,s+"/user"))}if(t.type&&o(t.type)){const n=t.type;a.includes(n)||i.push(p(n,a,s+"/type")),i.push(...k(e,n,t.assertions,s))}const l=t.context;for(const o in l)r.includes(o)||i.push(y(o,s+`/context/${o}`));return i}function A(e,t,n,r,s){const i=[],a=e.type_definitions.map((e=>e.type));if(t&&o(t.object)){const e=t.object,r=v(e).type;a.includes(r)||i.push(p(r,a,s+"/object")),i.length||n.map((e=>e.object)).filter((t=>t===e)).length||i.push(b(e,s+"/object"))}if(t.user_filter){for(const n in t.user_filter){const r=t.user_filter[n].type;r&&o(r)&&(a.includes(r)||i.push(p(r,a,s+`/user_filter/${n}/type`)));const l=t.user_filter[n].relation;if(l&&o(l)){const t=e.type_definitions.filter((e=>e.type===r)).map((e=>e.relations));t.length&&t[0]&&Object.keys(t[0]).length?Object.keys(t[0]).includes(l)||i.push(f(l,Object.keys(t[0]),s+`/user_filter/${n}/relation`)):i.push(c(l,r,s+`/user_filter/${n}/relation`))}}if(t.assertions)for(const e of Object.keys(t.assertions))if(t.assertions[e].users)for(const r of t.assertions[e].users)n.some((e=>e.user===r))||i.push(b(r,s+`/assertions/${e}/users`))}if(t.context)for(const o in t.context)r.includes(o)||i.push(y(o,s+`/context/${o}`));return i}const O=function(e,t){return O.errors=O.errors||[],e.model||e.model_file?function(e,t,n){var r;const s=[],i=[];for(const o in t.conditions)for(const e in t.conditions[o].parameters)i.push(e);for(const o in e.tests){const r=[];e.tuples&&e.tuples.length&&r.push(...e.tuples);const a=e.tests[o];if(a.tuples&&a.tuples.length&&r.push(...a.tuples),a.check)for(const[e,l]of Object.entries(a.check)){if(!l.user||!l.object)return!1;s.push(...S(t,l,r,i,n+`/tests/${o}/check/${e}`))}if(a.list_objects)for(const[e,l]of Object.entries(a.list_objects)){if(!l.user||!l.type)return!1;s.push(...N(t,l,r,i,n+`/tests/${o}/list_objects/${e}`))}if(a.list_users)for(const[e,l]of Object.entries(a.list_users)){if(!l.object||!l.user_filter)return!1;s.push(...A(t,l,r,i,n+`/tests/${o}/list_users/${e}`))}}return!s.length||(null===(r=O.errors)||void 0===r||r.push(...s),!1)}(e,this.jsonModel,t.instancePath):(O.errors.push((n=t.instancePath,d("'model' or 'model_file' must be presenet keys.",n))),!1);var n};const C={type:"array",description:"the tuples (takes precedence over tuples_file)",items:{type:"object",additionalProperties:!1,required:["user","relation","object"],valid_tuple:!0,properties:{user:{type:"string",format:"user",description:"the user"},relation:{type:"string",format:"relation",description:"the relation"},object:{type:"string",format:"object",description:"the object"},condition:{type:"object",additionalProperties:!1,required:["name"],properties:{name:{type:"string",format:"condition"},context:{type:"object"}}}}}};const I={type:"object",required:["tests"],additionalProperties:!1,valid_store:!0,properties:{name:{type:"string",description:"the store name"},model_file:{type:"string",description:"the authorization model file path"},model:{type:"string",description:"the authorization model (takes precedence over model_file)"},tuple_file:{type:"string",description:"the tuple file path"},tuples:C,tests:{type:"array",items:{type:"object",additionalProperties:!1,properties:{name:{type:"string",description:"the test name"},description:{type:"string",description:"the test description"},tuple_file:{type:"string",description:"the tuple file with additional tuples for this test"},tuples:C,check:{type:"array",items:{type:"object",additionalProperties:!1,required:["user","object","assertions"],properties:{user:{type:"string",format:"user",description:"the user"},object:{type:"string",format:"object",description:"the object"},assertions:{type:"object",patternProperties:{".*":{type:"boolean"}}},context:{type:"object"}}}},list_objects:{type:"array",items:{type:"object",additionalProperties:!1,required:["user","type","assertions"],properties:{user:{type:"string",format:"user",description:"the user"},relation:{type:"string",format:"relation",description:"the relation"},type:{type:"string",format:"type",description:"the object type"},assertions:{type:"object",patternProperties:{".*":{type:"array",items:{type:"string"}}}},context:{type:"object"}}}},list_users:{type:"array",items:{type:"object",additionalProperties:!1,required:["object","user_filter","assertions"],properties:{object:{type:"string",format:"object"},user_filter:{type:"array",items:{type:"object",required:["type"],properties:{type:{type:"string"},relation:{type:"string"}}}},context:{type:"object"},assertions:{type:"object",patternProperties:{".*":{type:"object",additionalProperties:!1,properties:{users:{type:"array",items:{type:"string",format:"user"}}}}}}}}}}}}}}},63282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=n(4042),s=n(86144),i=n(36653),o=n(72079),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),s.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=n(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var h=n(13558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var p=n(34551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},41520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class s extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof r&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const n=[e[0]];let r=0;for(;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const r=n(41520),s=n(57845);var i=n(41520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var o=n(57845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const n=e?s.varKinds.var:this.varKind,r=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=I(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=I(this.rhs,e,t),this}get names(){return C(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class f extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=I(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class m extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const s=n[r];s.optimizeNames(e,t)||(R(e,s.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>O(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends m{}class b extends g{}b.kind="else";class v extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(L(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=I(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&O(e,this.else.names),e}}v.kind="if";class _ extends g{}_.kind="for";class E extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=I(this.iteration,e,t),this}get names(){return O(super.names,this.iteration.names)}}class T extends _{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?s.varKinds.var:this.varKind,{name:n,from:r,to:i}=this;return`for(${t} ${n}=${r}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class x extends _{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=I(this.iterable,e,t),this}get names(){return O(super.names,this.iterable.names)}}class w extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}w.kind="func";class k extends m{render(e){return"return "+super.render(e)}}k.kind="return";class S extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&O(e,this.catch.names),this.finally&&O(e,this.finally.names),e}}class N extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}N.kind="catch";class A extends g{render(e){return"finally"+super.render(e)}}A.kind="finally";function O(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function C(e,t){return t instanceof r._CodeOrName?O(e,t.names):e}function I(e,t,n){return e instanceof r.Name?i(e):(s=e)instanceof r._Code&&s._items.some((e=>e instanceof r.Name&&1===t[e.str]&&void 0!==n[e.str]))?new r._Code(e._items.reduce(((e,t)=>(t instanceof r.Name&&(t=i(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e)),[])):e;var s;function i(e){const r=n[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}}function R(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function L(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:r._`!${M(e)}`}t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new s.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const s=this._scope.toName(t);return void 0!==n&&r&&(this._constants[s.str]=n),this._leafNode(new l(e,s,n)),s}const(e,t,n){return this._def(s.varKinds.const,e,t,n)}let(e,t,n){return this._def(s.varKinds.let,e,t,n)}var(e,t,n){return this._def(s.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,n){return this._leafNode(new u(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new f(e)),this}object(...e){const t=["{"];for(const[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,r.addCodeArg)(t,s));return t.push("}"),new r._Code(t)}if(e,t,n){if(this._blockNode(new v(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new E(e),t)}forRange(e,t,n,r,i=(this.opts.es5?s.varKinds.var:s.varKinds.let)){const o=this._scope.toName(e);return this._for(new T(i,o,t,n),(()=>r(o)))}forOf(e,t,n,i=s.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,r._`${e}.length`,(t=>{this.var(o,r._`${e}[${t}]`),n(o)}))}return this._for(new x("of",i,o,t),(()=>n(o)))}forIn(e,t,n,i=(this.opts.es5?s.varKinds.var:s.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,r._`Object.keys(${t})`,n);const o=this._scope.toName(e);return this._for(new x("in",i,o,t),(()=>n(o)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new h(e))}return(e){const t=new k;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new S;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new N(e),t(e)}return n&&(this._currNode=r.finally=new A,this.code(n)),this._endBlockNode(N,A)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,n,s){return this._blockNode(new w(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=L;const P=$(t.operators.AND);t.and=function(...e){return e.reduce(P)};const D=$(t.operators.OR);function $(e){return(t,n)=>t===r.nil?n:n===r.nil?t:r._`${M(t)} ${e} ${M(n)}`}function M(e){return e instanceof r.Name?e:r._`(${e})`}t.or=function(...e){return e.reduce(D)}},57845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const r=n(41520);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i||(t.UsedValueState=i={})),t.varKinds={const:new r.Name("const"),let:new r.Name("let"),var:new r.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof r.Name?e:this.name(e)}name(e){return new r.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends r.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=r._`.${new r.Name(t)}[${n}]`}}t.ValueScopeName=a;const l=r._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:r.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(e),{prefix:s}=r,i=null!==(n=t.key)&&void 0!==n?n:t.ref;let o=this._values[s];if(o){const e=o.get(i);if(e)return e}else o=this._values[s]=new Map;o.set(i,r);const a=this._scope[s]||(this._scope[s]=[]),l=a.length;return a[l]=t.ref,r.setValue(t,{property:s,itemIndex:l}),r}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return r._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(e,n,o={},a){let l=r.nil;for(const c in e){const u=e[c];if(!u)continue;const d=o[c]=o[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,i.Started);let o=n(e);if(o){const n=this.opts.es5?t.varKinds.var:t.varKinds.const;l=r._`${l}${n} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new s(e);l=r._`${l}${o}${this.opts._n}`}d.set(e,i.Completed)}))}return l}}},48708:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const r=n(99029),s=n(94227),i=n(42023);function o(e,t){const n=e.const("err",t);e.if(r._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,r._`[${n}]`)),r._`${i.default.vErrors}.push(${n})`),e.code(r._`${i.default.errors}++`)}function a(e,t){const{gen:n,validateName:s,schemaEnv:i}=e;i.$async?n.throw(r._`new ${e.ValidationError}(${t})`):(n.assign(r._`${s}.errors`,t),n.return(!1))}t.keywordError={message:({keyword:e})=>r.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?r.str`"${e}" keyword must be ${t} ($data)`:r.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,n=t.keywordError,s,i){const{it:l}=e,{gen:u,compositeRule:d,allErrors:h}=l,p=c(e,n,s);(null!=i?i:d||h)?o(u,p):a(l,r._`[${p}]`)},t.reportExtraError=function(e,n=t.keywordError,r){const{it:s}=e,{gen:l,compositeRule:u,allErrors:d}=s;o(l,c(e,n,r)),u||d||a(s,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(r._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(r._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:s,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",o,i.default.errors,(o=>{e.const(l,r._`${i.default.vErrors}[${o}]`),e.if(r._`${l}.instancePath === undefined`,(()=>e.assign(r._`${l}.instancePath`,(0,r.strConcat)(i.default.instancePath,a.errorPath)))),e.assign(r._`${l}.schemaPath`,r.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(r._`${l}.schema`,n),e.assign(r._`${l}.data`,s))}))};const l={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function c(e,t,n){const{createErrors:s}=e.it;return!1===s?r._`{}`:function(e,t,n={}){const{gen:s,it:o}=e,a=[u(o,n),d(e,n)];return function(e,{params:t,message:n},s){const{keyword:o,data:a,schemaValue:c,it:u}=e,{opts:d,propertyName:h,topSchemaRef:p,schemaPath:f}=u;s.push([l.keyword,o],[l.params,"function"==typeof t?t(e):t||r._`{}`]),d.messages&&s.push([l.message,"function"==typeof n?n(e):n]);d.verbose&&s.push([l.schema,c],[l.parentSchema,r._`${p}${f}`],[i.default.data,a]);h&&s.push([l.propertyName,h])}(e,t,a),s.object(...a)}(e,t,n)}function u({errorPath:e},{instancePath:t}){const n=t?r.str`${e}${(0,s.getErrorPath)(t,s.Type.Str)}`:e;return[i.default.instancePath,(0,r.strConcat)(i.default.instancePath,n)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:i}){let o=i?t:r.str`${t}/${e}`;return n&&(o=r.str`${o}${(0,s.getErrorPath)(n,s.Type.Str)}`),[l.schemaPath,o]}},73835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const r=n(99029),s=n(13558),i=n(42023),o=n(66939),a=n(94227),l=n(62586);class c{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function u(e){const t=h.call(this,e);if(t)return t;const n=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new r.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let p;e.$async&&(p=d.scopeValue("Error",{ref:s.default,code:r._`require("ajv/dist/runtime/validation_error").default`}));const f=d.scopeName("validate");e.validateName=f;const m={gen:d,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,r.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:r._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),d.optimize(this.opts.code.optimize);const t=d.toString();g=`${d.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const n=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(f,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:f,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=m;n.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},n.source&&(n.source.evaluated=(0,r.stringify)(n.evaluated))}return e.validate=n,e}catch(y){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),y}finally{this._compilations.delete(e)}}function d(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function h(e){for(const r of this._compilations)if(n=e,(t=r).schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return r;var t,n}function p(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||f.call(this,e,t)}function f(e,t){const n=this.opts.uriResolver.parse(t),r=(0,o._getFullPath)(this.opts.uriResolver,n);let s=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===s)return g.call(this,n,e);const i=(0,o.normalizeId)(r),a=this.refs[i]||this.schemas[i];if("string"==typeof a){const t=f.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,n,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),i===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:n}=this.opts,r=t[n];return r&&(s=(0,o.resolveUrl)(this.opts.uriResolver,s,r)),new c({schema:t,schemaId:n,root:e,baseId:s})}return g.call(this,n,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,n){var r;n=(0,o.resolveUrl)(this.opts.uriResolver,t,n);const s=e.refs[n];if(s)return s;let i=p.call(this,e,n);if(void 0===i){const s=null===(r=e.localRefs)||void 0===r?void 0:r[n],{schemaId:o}=this.opts;s&&(i=new c({schema:s,schemaId:o,root:e,baseId:t}))}return void 0!==i?e.refs[n]=d.call(this,i):void 0},t.getCompilingSchema=h,t.resolveSchema=f;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:n,root:r}){var s;if("/"!==(null===(s=e.fragment)||void 0===s?void 0:s[0]))return;for(const c of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const e=n[(0,a.unescapeFragment)(c)];if(void 0===e)return;const r="object"==typeof(n=e)&&n[this.opts.schemaId];!m.has(c)&&r&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,r))}let i;if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=f.call(this,r,e)}const{schemaId:l}=this.opts;return i=i||new c({schema:n,schemaId:l,root:r,baseId:t}),i.schema!==i.root.schema?i:void 0}},42023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")};t.default=s},34551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(66939);class s extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,r.resolveUrl)(e,t,n),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(e,this.missingRef))}}t.default=s},66939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=n(94227),s=n(32017),i=n(7106),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(e){let t=0;for(const n in e){if("$ref"===n)return 1/0;if(t++,!o.has(n)&&("object"==typeof e[n]&&(0,r.eachItem)(e[n],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",n){!1!==n&&(t=p(t));const r=e.parse(t);return d(e,r)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const h=/#\/?$/;function p(e){return e?e.replace(h,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,n){return n=p(n),e.resolve(t,n)};const f=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:n,uriResolver:r}=this.opts,o=p(e[n]||t),a={"":o},l=u(r,o,!1),c={},d=new Set;return i(e,{allKeys:!0},((e,t,r,s)=>{if(void 0===s)return;const i=l+t;let o=a[s];function u(t){const n=this.opts.uriResolver.resolve;if(t=p(o?n(o,t):t),d.has(t))throw m(t);d.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?h(e,r.schema,t):t!==p(i)&&("#"===t[0]?(h(e,c[t],t),c[t]=e):this.refs[t]=i),t}function g(e){if("string"==typeof e){if(!f.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[n]&&(o=u.call(this,e[n])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=o})),c;function h(e,t,n){if(void 0!==t&&!s(e,t))throw m(n)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},10396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},94227:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const r=n(99029),s=n(41520);function i(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const s=r.RULES.keywords;for(const i in t)s[i]||f(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:s}){return(i,o,a,l)=>{const c=void 0===a?o:a instanceof r.Name?(o instanceof r.Name?e(i,o,a):t(i,o,a),a):o instanceof r.Name?(t(i,a,o),o):n(o,a);return l!==r.Name||c instanceof r.Name?c:s(i,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",r._`{}`);return void 0!==t&&d(e,n,t),n}function d(e,t,n){Object.keys(n).forEach((n=>e.assign(r._`${t}${(0,r.getProperty)(n)}`,!0)))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,s,i){if(!i){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return r._`${n}`}return r._`${e}${t}${(0,r.getProperty)(s)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>{e.if(r._`${t} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,r._`${n} || {}`).code(r._`Object.assign(${n}, ${t})`)))})),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>{!0===t?e.assign(n,!0):(e.assign(n,r._`${n} || {}`),d(e,n,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,n)=>e.if(r._`${n} !== true && ${t} !== undefined`,(()=>e.assign(n,r._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`))),mergeToName:(e,t,n)=>e.if(r._`${n} !== true`,(()=>e.assign(n,!0===t||r._`${n} > ${t} ? ${n} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const h={};var p;function f(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:h[t.code]||(h[t.code]=new s._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p||(t.Type=p={})),t.getErrorPath=function(e,t,n){if(e instanceof r.Name){const s=t===p.Num;return n?s?r._`"[" + ${e} + "]"`:r._`"['" + ${e} + "']"`:s?r._`"/" + ${e}`:r._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,r.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=f},7887:(e,t)=>{"use strict";function n(e,t){return t.rules.some((t=>r(e,t)))}function r(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},r){const s=t.RULES.types[r];return s&&!0!==s&&n(e,s)},t.shouldUseGroup=n,t.shouldUseRule=r},28727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const r=n(48708),s=n(99029),i=n(42023),o={message:"boolean schema is false"};function a(e,t){const{gen:n,data:s}=e,i={gen:n,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,r.reportError)(i,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:n,validateName:r}=e;!1===n?a(e,!1):"object"==typeof n&&!0===n.$async?t.return(i.default.data):(t.assign(s._`${r}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:n,schema:r}=e;!1===r?(n.var(t,!1),a(e)):n.var(t,!0)}},10208:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const r=n(10396),s=n(7887),i=n(48708),o=n(99029),a=n(94227);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(r.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:n,data:r,opts:i}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(c){const s=h(t,r,i.strictNumbers,l.Wrong);n.if(s,(()=>{a.length?function(e,t,n){const{gen:r,data:s,opts:i}=e,a=r.let("dataType",o._`typeof ${s}`),l=r.let("coerced",o._`undefined`);"array"===i.coerceTypes&&r.if(o._`${a} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,(()=>r.assign(s,o._`${s}[0]`).assign(a,o._`typeof ${s}`).if(h(t,s,i.strictNumbers),(()=>r.assign(l,s)))));r.if(o._`${l} !== undefined`);for(const o of n)(u.has(o)||"array"===o&&"array"===i.coerceTypes)&&c(o);function c(e){switch(e){case"string":return void r.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(l,o._`"" + ${s}`).elseIf(o._`${s} === null`).assign(l,o._`""`);case"number":return void r.elseIf(o._`${a} == "boolean" || ${s} === null || (${a} == "string" && ${s} && ${s} == +${s})`).assign(l,o._`+${s}`);case"integer":return void r.elseIf(o._`${a} === "boolean" || ${s} === null || (${a} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(l,o._`+${s}`);case"boolean":return void r.elseIf(o._`${s} === "false" || ${s} === 0 || ${s} === null`).assign(l,!1).elseIf(o._`${s} === "true" || ${s} === 1`).assign(l,!0);case"null":return r.elseIf(o._`${s} === "" || ${s} === 0 || ${s} === false`),void r.assign(l,null);case"array":r.elseIf(o._`${a} === "string" || ${a} === "number" || ${a} === "boolean" || ${s} === null`).assign(l,o._`[${s}]`)}}r.else(),f(e),r.endIf(),r.if(o._`${l} !== undefined`,(()=>{r.assign(s,l),function({gen:e,parentData:t,parentDataProperty:n},r){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${n}]`,r)))}(e,l)}))}(e,t,a):f(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,n,r=l.Correct){const s=r===l.Correct?o.operators.EQ:o.operators.NEQ;let i;switch(e){case"null":return o._`${t} ${s} null`;case"array":i=o._`Array.isArray(${t})`;break;case"object":i=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return o._`typeof ${t} ${s} ${e}`}return r===l.Correct?i:(0,o.not)(i);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,n?o._`isFinite(${t})`:o.nil)}}function h(e,t,n,r){if(1===e.length)return d(e[0],t,n,r);let s;const i=(0,a.toHash)(e);if(i.array&&i.object){const e=o._`typeof ${t} != "object"`;s=i.null?e:o._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else s=o.nil;i.number&&delete i.integer;for(const a in i)s=(0,o.and)(s,d(a,t,n,r));return s}t.checkDataType=d,t.checkDataTypes=h;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function f(e){const t=function(e){const{gen:t,data:n,schema:r}=e,s=(0,a.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:s,schemaValue:s,parentSchema:r,params:{},it:e}}(e);(0,i.reportError)(t,p)}t.reportTypeError=f},7870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const r=n(99029),s=n(94227);function i(e,t,n){const{gen:i,compositeRule:o,data:a,opts:l}=e;if(void 0===n)return;const c=r._`${a}${(0,r.getProperty)(t)}`;if(o)return void(0,s.checkStrictMode)(e,`default is ignored for: ${c}`);let u=r._`${c} === undefined`;"empty"===l.useDefaults&&(u=r._`${u} || ${c} === null || ${c} === ""`),i.if(u,r._`${c} = ${(0,r.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:r}=e.schema;if("object"===t&&n)for(const s in n)i(e,s,n[s].default);else"array"===t&&Array.isArray(r)&&r.forEach(((t,n)=>i(e,n,t.default)))}},62586:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=n(28727),s=n(10208),i=n(7887),o=n(10208),a=n(7870),l=n(33673),c=n(24495),u=n(99029),d=n(42023),h=n(66939),p=n(94227),f=n(48708);function m({gen:e,validateName:t,schema:n,schemaEnv:r,opts:s},i){s.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,r.$async,(()=>{e.code(u._`"use strict"; ${g(n,s)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,s),e.code(i)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(s)}`,r.$async,(()=>e.code(g(n,s)).code(i)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function y(e,t){v(e)&&(_(e),b(e))?function(e,t){const{schema:n,gen:r,opts:s}=e;s.$comment&&n.$comment&&T(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,h.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=r.const("_errs",d.default.errors);E(e,i),r.var(t,u._`${i} === ${d.default.errors}`)}(e,t):(0,r.boolOrEmptySchema)(e,t)}function b({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:n,opts:r,self:s}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function E(e,t){if(e.opts.jtd)return x(e,[],!1,t);const n=(0,s.getSchemaTypes)(e.schema);x(e,n,!(0,s.coerceAndCheckDataType)(e,n),t)}function T({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:s}){const i=n.$comment;if(!0===s.$comment)e.code(u._`${d.default.self}.logger.log(${i})`);else if("function"==typeof s.$comment){const n=u.str`${r}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${i}, ${n}, ${s}.schema)`)}}function x(e,t,n,r){const{gen:s,schema:a,data:l,allErrors:c,opts:h,self:f}=e,{RULES:m}=f;function g(p){(0,i.shouldUseGroup)(a,p)&&(p.type?(s.if((0,o.checkDataType)(p.type,l,h.strictNumbers)),w(e,p),1===t.length&&t[0]===p.type&&n&&(s.else(),(0,o.reportTypeError)(e)),s.endIf()):w(e,p),c||s.if(u._`${d.default.errors} === ${r||0}`))}!a.$ref||!h.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(a,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{S(e.dataTypes,t)||N(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const n=[];for(const r of e.dataTypes)S(t,r)?n.push(r):t.includes("integer")&&"number"===r&&n.push("integer");e.dataTypes=n}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&N(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const r in n){const s=n[r];if("object"==typeof s&&(0,i.shouldUseRule)(e.schema,s)){const{type:n}=s.definition;n.length&&!n.some((e=>k(t,e)))&&N(e,`missing type "${n.join(",")}" for keyword "${r}"`)}}}(e,e.dataTypes)}(e,t),s.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):s.block((()=>O(e,"$ref",m.all.$ref.definition)))}function w(e,t){const{gen:n,schema:r,opts:{useDefaults:s}}=e;s&&(0,a.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,i.shouldUseRule)(r,n)&&O(e,n.keyword,n.definition,t.type)}))}function k(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function S(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function N(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),b(e))?function(e){const{schema:t,opts:n,gen:r}=e;m(e,(()=>{n.$comment&&t.$comment&&T(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),r.let(d.default.vErrors,null),r.let(d.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",u._`${n}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),E(e),function(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:s,opts:i}=e;n.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${s}(${d.default.vErrors})`))):(t.assign(u._`${r}.errors`,d.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:n,items:r}){n instanceof u.Name&&e.assign(u._`${t}.props`,n);r instanceof u.Name&&e.assign(u._`${t}.items`,r)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,r.topBoolOrEmptySchema)(e)))};class A{constructor(e,t,n){if((0,l.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",R(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,n){this.failResult((0,u.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=u.nil){this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:n,schemaCode:r,schemaType:s,def:i}=this;n.if((0,u.or)(u._`${r} === undefined`,t)),e!==u.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:r,it:s}=this;return(0,u.or)(function(){if(n.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return u._`${(0,o.checkDataTypes)(e,t,s.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}(),function(){if(r.validateSchema){const n=e.scopeValue("validate$data",{ref:r.validateSchema});return u._`!${n}(${t})`}return u.nil}())}subschema(e,t){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const r={...this.it,...n,items:void 0,props:void 0};return y(r,t),r}mergeEvaluated(e,t){const{it:n,gen:r}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=p.mergeEvaluated.props(r,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=p.mergeEvaluated.items(r,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:r}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return r.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function O(e,t,n,r){const s=new A(e,n,t);"code"in n?n.code(s,r):s.$data&&n.validate?(0,l.funcKeywordCode)(s,n):"macro"in n?(0,l.macroKeywordCode)(s,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(s,n)}t.KeywordCxt=A;const C=/^\/(?:[^~]|~0|~1)*$/,I=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function R(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let s,i;if(""===e)return d.default.rootData;if("/"===e[0]){if(!C.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);s=e,i=d.default.rootData}else{const o=I.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(s=o[2],"#"===s){if(a>=t)throw new Error(l("property/index",a));return r[t-a]}if(a>t)throw new Error(l("data",a));if(i=n[t-a],!s)return i}let o=i;const a=s.split("/");for(const c of a)c&&(i=u._`${i}${(0,u.getProperty)((0,p.unescapeJsonPointer)(c))}`,o=u._`${o} && ${i}`);return o;function l(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=R},33673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const r=n(99029),s=n(42023),i=n(15765),o=n(48708);function a(e){const{gen:t,data:n,it:s}=e;t.if(s.parentData,(()=>t.assign(n,r._`${s.parentData}[${s.parentDataProperty}]`)))}function l(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,r.stringify)(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:s,schema:i,parentSchema:o,it:a}=e,c=t.macro.call(a.self,i,o,a),u=l(n,s,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const d=n.name("valid");e.subschema({schema:c,schemaPath:r.nil,errSchemaPath:`${a.errSchemaPath}/${s}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:c,keyword:u,schema:d,parentSchema:h,$data:p,it:f}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,t);const m=!p&&t.compile?t.compile.call(f.self,d,h,f):t.validate,g=l(c,u,m),y=c.let("valid");function b(n=(t.async?r._`await `:r.nil)){const o=f.opts.passContext?s.default.this:s.default.self,a=!("compile"in t&&!p||!1===t.schema);c.assign(y,r._`${n}${(0,i.callValidateCode)(e,g,o,a)}`,t.modifying)}function v(e){var n;c.if((0,r.not)(null!==(n=t.valid)&&void 0!==n?n:y),e)}e.block$data(y,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const n=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(r._`await `)),(t=>c.assign(y,!1).if(r._`${t} instanceof ${f.ValidationError}`,(()=>c.assign(e,r._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=r._`${g}.errors`;return c.assign(e,null),b(r.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:n}=e;n.if(r._`Array.isArray(${t})`,(()=>{n.assign(s.default.vErrors,r._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`).assign(s.default.errors,r._`${s.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:y)},t.validSchemaType=function(e,t,n=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:r},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");const o=s.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema){if(!s.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(s.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);n.logger.error(e)}}}},24495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const r=n(99029),s=n(94227);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:i,schemaPath:o,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===n?{schema:i,schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:r._`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,s.escapeFragment)(n)}`}}if(void 0!==i){if(void 0===o||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:o,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:i,data:o,dataTypes:a,propertyName:l}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:l}=t;u(c.let("data",r._`${t.data}${(0,r.getProperty)(n)}`,!0)),e.errorPath=r.str`${o}${(0,s.getErrorPath)(n,i,l.jsPropertySyntax)}`,e.parentDataProperty=r._`${n}`,e.dataPathArr=[...a,e.parentDataProperty]}if(void 0!==o){u(o instanceof r.Name?o:c.let("data",o,!0)),void 0!==l&&(e.propertyName=l)}function u(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:s,allErrors:i}){void 0!==r&&(e.compositeRule=r),void 0!==s&&(e.createErrors=s),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}},4042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=n(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var s=n(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return s.CodeGen}});const i=n(13558),o=n(34551),a=n(10396),l=n(73835),c=n(99029),u=n(66939),d=n(10208),h=n(94227),p=n(63837),f=n(55944),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,n,r,s,i,o,a,l,c,u,d,h,p,g,y,b,v,_,E,T,x,w,k,S,N;const A=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,C=!0===O||void 0===O?1:O||0,I=null!==(r=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==r?r:m,R=null!==(s=e.uriResolver)&&void 0!==s?s:f.default;return{strictSchema:null===(o=null!==(i=e.strictSchema)&&void 0!==i?i:A)||void 0===o||o,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:A)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:A)&&void 0!==u?u:"log",strictTuples:null!==(h=null!==(d=e.strictTuples)&&void 0!==d?d:A)&&void 0!==h?h:"log",strictRequired:null!==(g=null!==(p=e.strictRequired)&&void 0!==p?p:A)&&void 0!==g&&g,code:e.code?{...e.code,optimize:C,regExp:I}:{optimize:C,regExp:I},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(E=e.inlineRefs)||void 0===E||E,schemaId:null!==(T=e.schemaId)&&void 0!==T?T:"$id",addUsedSchema:null===(x=e.addUsedSchema)||void 0===x||x,validateSchema:null===(w=e.validateSchema)||void 0===w||w,validateFormats:null===(k=e.validateFormats)||void 0===k||k,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(N=e.int32range)||void 0===N||N,uriResolver:R}}class E{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:n}),this.logger=function(e){if(!1===e)return A;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),T.call(this,b,e,"NOT SUPPORTED"),T.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=N.call(this),e.formats&&k.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&S.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),w.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let r=p;"id"===n&&(r={...p},r.id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const r=n(t);return"$async"in n||(this.errors=n.errors),r}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return r.call(this,e,t);async function r(e,t){await s.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||i.call(this,n)}async function s(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const n=await c.call(this,e);this.refs[e]||await s.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,r=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,r);return this}let s;if("object"==typeof e){const{schemaId:t}=this.opts;if(s=e[t],void 0!==s&&"string"!=typeof s)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,r,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const r=this.validate(n,e);if(!r&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=x.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:n});if(t=l.resolveSchema.call(this,r,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=x.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(C.call(this,n,t),!t)return(0,h.eachItem)(n,(e=>I.call(this,e))),this;L.call(this,t);const r={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(n,0===r.type.length?e=>I.call(this,e,r):e=>r.type.forEach((t=>I.call(this,e,r,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const r of t){const t=r.split("/").slice(1);let s=e;for(const e of t)s=s[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:r}=t.definition,i=s[e];r&&i&&(s[e]=D(i))}}return e}_removeAllSchemas(e,t){for(const n in e){const r=e[n];t&&!t.test(n)||("string"==typeof r?delete e[n]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[n]))}}_addSchema(e,t,n,r=this.opts.validateSchema,s=this.opts.addUsedSchema){let i;const{schemaId:o}=this.opts;if("object"==typeof e)i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;n=(0,u.normalizeId)(i||n);const c=u.getSchemaRefs.call(this,e,n);return a=new l.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:c}),this._cache.set(a.schema,a),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=a),r&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function T(e,t,n,r="error"){for(const s in e){const i=s;i in t&&this.logger[r](`${n}: option ${s}. ${e[i]}`)}}function x(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function w(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function k(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function S(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function N(){const e={...this.opts};for(const t of g)delete e[t];return e}E.ValidationError=i.default,E.MissingRefError=o.default,t.default=E;const A={log(){},warn(){},error(){}};const O=/^[a-z_$][a-z0-9_$:-]*$/i;function C(e,t){const{RULES:n}=this;if((0,h.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!O.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function I(e,t,n){var r;const s=null==t?void 0:t.post;if(n&&s)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let o=s?i.post:i.rules.find((({type:e})=>e===n));if(o||(o={type:n,rules:[]},i.rules.push(o)),i.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?R.call(this,o,a,t.before):o.rules.push(a),i.all[e]=a,null===(r=t.implements)||void 0===r||r.forEach((e=>this.addKeyword(e)))}function R(e,t,n){const r=e.rules.findIndex((e=>e.keyword===n));r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function L(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const P={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,P]}}},76250:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(32017);r.code='require("ajv/dist/runtime/equal").default',t.default=r},53853:(e,t)=>{"use strict";function n(e){const t=e.length;let n,r=0,s=0;for(;s=55296&&n<=56319&&s{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(48343);r.code='require("ajv/dist/runtime/uri").default',t.default=r},13558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=n},15457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r=n(99029),s=n(94227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:r}=t;Array.isArray(r)?o(e,r):(0,s.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:n,schema:i,data:o,keyword:a,it:l}=e;l.items=!0;const c=n.const("len",r._`${o}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(r._`${c} <= ${t.length}`);else if("object"==typeof i&&!(0,s.alwaysValidSchema)(l,i)){const i=n.var("valid",r._`${c} <= ${t.length}`);n.if((0,r.not)(i),(()=>function(i){n.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:s.Type.Num},i),l.allErrors||n.if((0,r.not)(i),(()=>n.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=o,t.default=i},38660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15765),s=n(99029),i=n(42023),o=n(94227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>s._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:a,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:d,opts:h}=u;if(u.props=!0,"all"!==h.removeAdditional&&(0,o.alwaysValidSchema)(u,n))return;const p=(0,r.allSchemaProperties)(a.properties),f=(0,r.allSchemaProperties)(a.patternProperties);function m(e){t.code(s._`delete ${l}[${e}]`)}function g(r){if("all"===h.removeAdditional||h.removeAdditional&&!1===n)m(r);else{if(!1===n)return e.setParams({additionalProperty:r}),e.error(),void(d||t.break());if("object"==typeof n&&!(0,o.alwaysValidSchema)(u,n)){const n=t.name("valid");"failing"===h.removeAdditional?(y(r,n,!1),t.if((0,s.not)(n),(()=>{e.reset(),m(r)}))):(y(r,n),d||t.if((0,s.not)(n),(()=>t.break())))}}}function y(t,n,r){const s={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===r&&Object.assign(s,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(s,n)}t.forIn("key",l,(n=>{p.length||f.length?t.if(function(n){let i;if(p.length>8){const e=(0,o.schemaRefOrVal)(u,a.properties,"properties");i=(0,r.isOwnProperty)(t,e,n)}else i=p.length?(0,s.or)(...p.map((e=>s._`${n} === ${e}`))):s.nil;return f.length&&(i=(0,s.or)(i,...f.map((t=>s._`${(0,r.usePattern)(e,t)}.test(${n})`)))),(0,s.not)(i)}(n),(()=>g(n))):g(n)})),e.ok(s._`${c} === ${i.default.errors}`)}};t.default=a},15844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(94227),s={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:s}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const i=t.name("valid");n.forEach(((t,n)=>{if((0,r.alwaysValidSchema)(s,t))return;const o=e.subschema({keyword:"allOf",schemaProp:n},i);e.ok(i),e.mergeEvaluated(o)}))}};t.default=s},16505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(15765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r},12661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?r.str`must contain at least ${e} valid item(s)`:r.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?r._`{minContains: ${e}}`:r._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:i,data:o,it:a}=e;let l,c;const{minContains:u,maxContains:d}=i;a.opts.next?(l=void 0===u?1:u,c=d):l=1;const h=t.const("len",r._`${o}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,s.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,s.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,s.alwaysValidSchema)(a,n)){let t=r._`${h} >= ${l}`;return void 0!==c&&(t=r._`${t} && ${h} <= ${c}`),void e.pass(t)}a.items=!0;const p=t.name("valid");function f(){const e=t.name("_valid"),n=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(r._`${e}++`),void 0===c?t.if(r._`${e} >= ${l}`,(()=>t.assign(p,!0).break())):(t.if(r._`${e} > ${c}`,(()=>t.assign(p,!1).break())),1===l?t.assign(p,!0):t.if(r._`${e} >= ${l}`,(()=>t.assign(p,!0))))}(n)))))}function m(n,r){t.forRange("i",0,h,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:s.Type.Num,compositeRule:!0},n),r()}))}void 0===c&&1===l?m(p,(()=>t.if(p,(()=>t.break())))):0===l?(t.let(p,!0),void 0!==c&&t.if(r._`${o}.length > 0`,f)):(t.let(p,!1),f()),e.result(p,(()=>e.reset()))}};t.default=i},83025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const r=n(99029),s=n(94227),i=n(15765);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>{const s=1===t?"property":"properties";return r.str`must have ${s} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:s}})=>r._`{property: ${e}, missingProperty: ${s}, depsCount: ${t}, - deps: ${n}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,n]=function({schema:e}){const t={},n={};for(const r in e){if("__proto__"===r)continue;(Array.isArray(e[r])?t:n)[r]=e[r]}return[t,n]}(e);a(e,t),l(e,n)}};function a(e,t=e.schema){const{gen:n,data:s,it:o}=e;if(0===Object.keys(t).length)return;const a=n.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,i.propertyInData)(n,s,l,o.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),o.allErrors?n.if(u,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(n.if(r._`${u} && (${(0,i.checkMissingProp)(e,c,a)})`),(0,i.reportMissingProp)(e,a),n.else())}}function l(e,t=e.schema){const{gen:n,data:r,keyword:o,it:a}=e,l=n.name("valid");for(const c in t)(0,s.alwaysValidSchema)(a,t[c])||(n.if((0,i.propertyInData)(n,r,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:o,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>n.var(l,!0))),e.ok(l))}t.validatePropertyDeps=a,t.validateSchemaDeps=l,t.default=o},1239:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>r.str`must match "${e.ifClause}" schema`,params:({params:e})=>r._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:n,it:i}=e;void 0===n.then&&void 0===n.else&&(0,s.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const a=o(i,"then"),l=o(i,"else");if(!a&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),a&&l){const n=t.let("ifClause");e.setParams({ifClause:n}),t.if(u,d("then",n),d("else",n))}else a?t.if(u,d("then")):t.if((0,r.not)(u),d("else"));function d(n,s){return()=>{const i=e.subschema({keyword:n},u);t.assign(c,u),e.mergeValidEvaluated(i,c),s?t.assign(s,r._`${n}`):e.setParams({ifClause:n})}}e.pass(c,(()=>e.error(!0)))}};function o(e,t){const n=e.schema[t];return void 0!==n&&!(0,s.alwaysValidSchema)(e,n)}t.default=i},56378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15457),s=n(65354),i=n(20494),o=n(93966),a=n(12661),l=n(83025),c=n(19713),u=n(38660),d=n(40117),h=n(45333),p=n(57923),f=n(16505),m=n(96163),g=n(15844),y=n(1239),b=n(14426);t.default=function(e=!1){const t=[p.default,f.default,m.default,g.default,y.default,b.default,c.default,u.default,l.default,d.default,h.default];return e?t.push(s.default,o.default):t.push(r.default,i.default),t.push(a.default),t}},20494:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r=n(99029),s=n(94227),i=n(15765),o={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return a(e,"additionalItems",t);n.items=!0,(0,s.alwaysValidSchema)(n,t)||e.ok((0,i.validateArray)(e))}};function a(e,t,n=e.schema){const{gen:i,parentSchema:o,data:a,keyword:l,it:c}=e;!function(e){const{opts:r,errSchemaPath:i}=c,o=n.length,a=o===e.minItems&&(o===e.maxItems||!1===e[t]);if(r.strictTuples&&!a){const e=`"${l}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,s.checkStrictMode)(c,e,r.strictTuples)}}(o),c.opts.unevaluated&&n.length&&!0!==c.items&&(c.items=s.mergeEvaluated.items(i,n.length,c.items));const u=i.name("valid"),d=i.const("len",r._`${a}.length`);n.forEach(((t,n)=>{(0,s.alwaysValidSchema)(c,t)||(i.if(r._`${d} > ${n}`,(()=>e.subschema({keyword:l,schemaProp:n,dataProp:n},u))),e.ok(u))}))}t.validateTuple=a,t.default=o},93966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i=n(15765),o=n(15457),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>r.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>r._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:a}=n;r.items=!0,(0,s.alwaysValidSchema)(r,t)||(a?(0,o.validateAdditionalItems)(e,a):e.ok((0,i.validateArray)(e)))}};t.default=a},57923:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(94227),s={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:s}=e;if((0,r.alwaysValidSchema)(s,n))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=s},96163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>r._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:n,parentSchema:i,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&i.discriminator)return;const a=n,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((n,i)=>{let a;(0,s.alwaysValidSchema)(o,n)?t.var(u,!0):a=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(r._`${u} && ${l}`).assign(l,!1).assign(c,r._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),a&&e.mergeEvaluated(a,r.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},45333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15765),s=n(99029),i=n(94227),o=n(94227),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:a,parentSchema:l,it:c}=e,{opts:u}=c,d=(0,r.allSchemaProperties)(n),h=d.filter((e=>(0,i.alwaysValidSchema)(c,n[e])));if(0===d.length||h.length===d.length&&(!c.opts.unevaluated||!0===c.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&l.properties,f=t.name("valid");!0===c.props||c.props instanceof s.Name||(c.props=(0,o.evaluatedPropsToName)(t,c.props));const{props:m}=c;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function y(n){t.forIn("key",a,(i=>{t.if(s._`${(0,r.usePattern)(e,n)}.test(${i})`,(()=>{const r=h.includes(n);r||e.subschema({keyword:"patternProperties",schemaProp:n,dataProp:i,dataPropType:o.Type.Str},f),c.opts.unevaluated&&!0!==m?t.assign(s._`${m}[${i}]`,!0):r||c.allErrors||t.if((0,s.not)(f),(()=>t.break()))}))}))}!function(){for(const e of d)p&&g(e),c.allErrors?y(e):(t.var(f,!0),y(e),t.if(f))}()}};t.default=a},65354:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(20494),s={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")};t.default=s},40117:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(62586),s=n(15765),i=n(94227),o=n(38660),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:a,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&o.default.code(new r.KeywordCxt(c,o.default,"additionalProperties"));const u=(0,s.allSchemaProperties)(n);for(const r of u)c.definedProperties.add(r);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),c.props));const d=u.filter((e=>!(0,i.alwaysValidSchema)(c,n[e])));if(0===d.length)return;const h=t.name("valid");for(const r of d)p(r)?f(r):(t.if((0,s.propertyInData)(t,l,r,c.opts.ownProperties)),f(r),c.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(h);function p(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==n[e].default}function f(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}};t.default=a},19713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>r._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:n,data:i,it:o}=e;if((0,s.alwaysValidSchema)(o,n))return;const a=t.name("valid");t.forIn("key",i,(n=>{e.setParams({propertyName:n}),e.subschema({keyword:"propertyNames",data:n,dataTypes:["string"],propertyName:n,compositeRule:!0},a),t.if((0,r.not)(a),(()=>{e.error(!0),o.allErrors||t.break()}))})),e.ok(a)}};t.default=i},14426:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(94227),s={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){void 0===t.if&&(0,r.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};t.default=s},15765:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=n(99029),s=n(94227),i=n(42023),o=n(94227);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:r._`Object.prototype.hasOwnProperty`})}function l(e,t,n){return r._`${a(e)}.call(${t}, ${n})`}function c(e,t,n,s){const i=r._`${t}${(0,r.getProperty)(n)} === undefined`;return s?(0,r.or)(i,(0,r.not)(l(e,t,n))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:n,data:s,it:i}=e;n.if(c(n,s,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:r._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:n}},s,i){return(0,r.or)(...s.map((s=>(0,r.and)(c(e,t,s,n.ownProperties),r._`${i} = ${s}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=l,t.propertyInData=function(e,t,n,s){const i=r._`${t}${(0,r.getProperty)(n)} !== undefined`;return s?r._`${i} && ${l(e,t,n)}`:i},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((n=>!(0,s.alwaysValidSchema)(e,t[n])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:n,topSchemaRef:s,schemaPath:o,errorPath:a},it:l},c,u,d){const h=d?r._`${e}, ${t}, ${s}${o}`:t,p=[[i.default.instancePath,(0,r.strConcat)(i.default.instancePath,a)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&p.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const f=r._`${h}, ${n.object(...p)}`;return u!==r.nil?r._`${c}.call(${u}, ${f})`:r._`${c}(${f})`};const d=r._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},n){const s=t.unicodeRegExp?"u":"",{regExp:i}=t.code,a=i(n,s);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:r._`${"new RegExp"===i.code?d:(0,o.useFunc)(e,i)}(${n}, ${s})`})},t.validateArray=function(e){const{gen:t,data:n,keyword:i,it:o}=e,a=t.name("valid");if(o.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(a,!0),l((()=>t.break())),a;function l(o){const l=t.const("len",r._`${n}.length`);t.forRange("i",0,l,(n=>{e.subschema({keyword:i,dataProp:n,dataPropType:s.Type.Num},a),t.if((0,r.not)(a),o)}))}},t.validateUnion=function(e){const{gen:t,schema:n,keyword:i,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some((e=>(0,s.alwaysValidSchema)(o,e)))&&!o.opts.unevaluated)return;const a=t.let("valid",!1),l=t.name("_valid");t.block((()=>n.forEach(((n,s)=>{const o=e.subschema({keyword:i,schemaProp:s,compositeRule:!0},l);t.assign(a,r._`${a} || ${l}`);e.mergeValidEvaluated(o,l)||t.if((0,r.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=n},72128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(83463),s=n(13693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,s.default];t.default=i},13693:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r=n(34551),s=n(15765),i=n(99029),o=n(42023),a=n(73835),l=n(94227),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:s}=e,{baseId:o,schemaEnv:l,validateName:c,opts:h,self:p}=s,{root:f}=l;if(("#"===n||"#/"===n)&&o===f.baseId)return function(){if(l===f)return d(e,c,l,l.$async);const n=t.scopeValue("root",{ref:f});return d(e,i._`${n}.validate`,f,f.$async)}();const m=a.resolveRef.call(p,f,o,n);if(void 0===m)throw new r.default(s.opts.uriResolver,o,n);return m instanceof a.SchemaEnv?function(t){const n=u(e,t);d(e,n,t,t.$async)}(m):function(r){const s=t.scopeValue("schema",!0===h.code.source?{ref:r,code:(0,i.stringify)(r)}:{ref:r}),o=t.name("valid"),a=e.subschema({schema:r,dataTypes:[],schemaPath:i.nil,topSchemaRef:s,errSchemaPath:n},o);e.mergeEvaluated(a),e.ok(o)}(m)}};function u(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):i._`${n.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,n,r){const{gen:a,it:c}=e,{allErrors:u,schemaEnv:d,opts:h}=c,p=h.passContext?o.default.this:i.nil;function f(e){const t=i._`${e}.errors`;a.assign(o.default.vErrors,i._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`),a.assign(o.default.errors,i._`${o.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const r=null===(t=null==n?void 0:n.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(a,r.props,c.props));else{const t=a.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(a,t,c.props,i.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(a,r.items,c.items));else{const t=a.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(a,t,c.items,i.Name)}}r?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const n=a.let("valid");a.try((()=>{a.code(i._`await ${(0,s.callValidateCode)(e,t,p)}`),m(t),u||a.assign(n,!0)}),(e=>{a.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),f(e),u||a.assign(n,!1)})),e.ok(n)}():e.result((0,s.callValidateCode)(e,t,p),(()=>m(t)),(()=>f(t)))}t.getValidate=u,t.callRef=d,t.default=c},36653:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(97652),i=n(73835),o=n(34551),a=n(94227),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===s.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>r._`{error: ${e}, tag: ${n}, tagValue: ${t}}`},code(e){const{gen:t,data:n,schema:l,parentSchema:c,it:u}=e,{oneOf:d}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const h=l.propertyName;if("string"!=typeof h)throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!d)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),f=t.const("tag",r._`${n}${(0,r.getProperty)(h)}`);function m(n){const s=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:n},s);return e.mergeEvaluated(i,r.Name),s}t.if(r._`typeof ${f} == "string"`,(()=>function(){const n=function(){var e;const t={},n=s(c);let r=!0;for(let c=0;ce.error(!1,{discrError:s.DiscrError.Tag,tag:f,tagName:h}))),e.ok(p)}};t.default=l},97652:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(n||(t.DiscrError=n={}))},86144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(72128),s=n(67060),i=n(56378),o=n(97532),a=n(69857),l=[r.default,s.default,(0,i.default)(),o.default,a.metadataVocabulary,a.contentVocabulary];t.default=l},94737:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>r.str`must match format "${e}"`,params:({schemaCode:e})=>r._`{format: ${e}}`},code(e,t){const{gen:n,data:s,$data:i,schema:o,schemaCode:a,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:d,self:h}=l;c.validateFormats&&(i?function(){const i=n.scopeValue("formats",{ref:h.formats,code:c.code.formats}),o=n.const("fDef",r._`${i}[${a}]`),l=n.let("fType"),u=n.let("format");n.if(r._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,(()=>n.assign(l,r._`${o}.type || "string"`).assign(u,r._`${o}.validate`)),(()=>n.assign(l,r._`"string"`).assign(u,o))),e.fail$data((0,r.or)(!1===c.strictSchema?r.nil:r._`${a} && !${u}`,function(){const e=d.$async?r._`(${o}.async ? await ${u}(${s}) : ${u}(${s}))`:r._`${u}(${s})`,n=r._`(typeof ${u} == "function" ? ${e} : ${u}.test(${s}))`;return r._`${u} && ${u} !== true && ${l} === ${t} && !${n}`}()))}():function(){const i=h.formats[o];if(!i)return void function(){if(!1===c.strictSchema)return void h.logger.warn(e());throw new Error(e());function e(){return`unknown format "${o}" ignored in schema at path "${u}"`}}();if(!0===i)return;const[a,l,p]=function(e){const t=e instanceof RegExp?(0,r.regexpCode)(e):c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(o)}`:void 0,s=n.scopeValue("formats",{key:o,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,r._`${s}.validate`];return["string",e,s]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!d.$async)throw new Error("async format in sync schema");return r._`await ${p}(${s})`}return"function"==typeof l?r._`${p}(${s})`:r._`${p}.test(${s})`}())}())}};t.default=s},97532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=[n(94737).default];t.default=r},69857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i=n(76250),o={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>r._`{allowedValue: ${e}}`},code(e){const{gen:t,data:n,$data:o,schemaCode:a,schema:l}=e;o||l&&"object"==typeof l?e.fail$data(r._`!${(0,s.useFunc)(t,i.default)}(${n}, ${a})`):e.fail(r._`${l} !== ${n}`)}};t.default=o},28643:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i=n(76250),o={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>r._`{allowedValues: ${e}}`},code(e){const{gen:t,data:n,$data:o,schema:a,schemaCode:l,it:c}=e;if(!o&&0===a.length)throw new Error("enum must have non-empty array");const u=a.length>=c.opts.loopEnum;let d;const h=()=>null!=d?d:d=(0,s.useFunc)(t,i.default);let p;if(u||o)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",l,(e=>t.if(r._`${h()}(${n}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",l);p=(0,r.or)(...a.map(((t,s)=>function(e,t){const s=a[t];return"object"==typeof s&&null!==s?r._`${h()}(${n}, ${e}[${t}])`:r._`${n} === ${s}`}(e,s))))}e.pass(p)}};t.default=o},67060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(75882),s=n(63439),i=n(77307),o=n(90422),a=n(34486),l=n(34003),c=n(61163),u=n(60617),d=n(27935),h=n(28643),p=[r.default,s.default,i.default,o.default,a.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,h.default];t.default=p},61163:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxItems"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:s}=e,i="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`${n}.length ${i} ${s}`)}};t.default=s},77307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=n(94227),i=n(53853),o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxLength"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:o,it:a}=e,l="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===a.opts.unicode?r._`${n}.length`:r._`${(0,s.useFunc)(e.gen,i.default)}(${n})`;e.fail$data(r._`${c} ${l} ${o}`)}};t.default=o},75882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s=r.operators,i={maximum:{okStr:"<=",ok:s.LTE,fail:s.GT},minimum:{okStr:">=",ok:s.GTE,fail:s.LT},exclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},exclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},o={message:({keyword:e,schemaCode:t})=>r.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${i[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:o,code(e){const{keyword:t,data:n,schemaCode:s}=e;e.fail$data(r._`${n} ${i[t].fail} ${s} || isNaN(${n})`)}};t.default=a},34486:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const n="maxProperties"===e?"more":"fewer";return r.str`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>r._`{limit: ${e}}`},code(e){const{keyword:t,data:n,schemaCode:s}=e,i="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data(r._`Object.keys(${n}).length ${i} ${s}`)}};t.default=s},63439:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(99029),s={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>r.str`must be multiple of ${e}`,params:({schemaCode:e})=>r._`{multipleOf: ${e}}`},code(e){const{gen:t,data:n,schemaCode:s,it:i}=e,o=i.opts.multipleOfPrecision,a=t.let("res"),l=o?r._`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:r._`${a} !== parseInt(${a})`;e.fail$data(r._`(${s} === 0 || (${a} = ${n}/${s}, ${l}))`)}};t.default=s},90422:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15765),s=n(99029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{data:t,$data:n,schema:i,schemaCode:o,it:a}=e,l=a.opts.unicodeRegExp?"u":"",c=n?s._`(new RegExp(${o}, ${l}))`:(0,r.usePattern)(e,i);e.fail$data(s._`!${c}.test(${t})`)}};t.default=i},34003:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(15765),s=n(99029),i=n(94227),o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>s.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>s._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:n,schemaCode:o,data:a,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===n.length)return;const d=n.length>=u.loopRequired;if(c.allErrors?function(){if(d||l)e.block$data(s.nil,h);else for(const t of n)(0,r.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(d||l){const n=t.let("valid",!0);e.block$data(n,(()=>function(n,i){e.setParams({missingProperty:n}),t.forOf(n,o,(()=>{t.assign(i,(0,r.propertyInData)(t,a,n,u.ownProperties)),t.if((0,s.not)(i),(()=>{e.error(),t.break()}))}),s.nil)}(i,n))),e.ok(n)}else t.if((0,r.checkMissingProp)(e,n,i)),(0,r.reportMissingProp)(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:r}=e.it;for(const e of n)if(void 0===(null==t?void 0:t[e])&&!r.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function h(){t.forOf("prop",o,(n=>{e.setParams({missingProperty:n}),t.if((0,r.noPropertyInData)(t,a,n,u.ownProperties),(()=>e.error()))}))}}};t.default=o},60617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(10208),s=n(99029),i=n(94227),o=n(76250),a={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>s.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>s._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:n,$data:a,schema:l,parentSchema:c,schemaCode:u,it:d}=e;if(!a&&!l)return;const h=t.let("valid"),p=c.items?(0,r.getSchemaTypes)(c.items):[];function f(i,o){const a=t.name("item"),l=(0,r.checkDataTypes)(p,a,d.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",s._`{}`);t.for(s._`;${i}--;`,(()=>{t.let(a,s._`${n}[${i}]`),t.if(l,s._`continue`),p.length>1&&t.if(s._`typeof ${a} == "string"`,s._`${a} += "_"`),t.if(s._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(o,s._`${c}[${a}]`),e.error(),t.assign(h,!1).break()})).code(s._`${c}[${a}] = ${i}`)}))}function m(r,a){const l=(0,i.useFunc)(t,o.default),c=t.name("outer");t.label(c).for(s._`;${r}--;`,(()=>t.for(s._`${a} = ${r}; ${a}--;`,(()=>t.if(s._`${l}(${n}[${r}], ${n}[${a}])`,(()=>{e.error(),t.assign(h,!1).break(c)}))))))}e.block$data(h,(function(){const r=t.let("i",s._`${n}.length`),i=t.let("j");e.setParams({i:r,j:i}),t.assign(h,!0),t.if(s._`${r} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?f:m)(r,i)))}),s._`${u} === false`),e.ok(h)}};t.default=a},35947:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});n(96540);var r=n(53259),s=n.n(r),i=n(84054);const o={"0058b4c6":[()=>n.e(849).then(n.t.bind(n,86164,19)),"@generated/docusaurus-plugin-content-docs/default/p/docs-175.json",86164],"01a85c17":[()=>Promise.all([n.e(1869),n.e(8209)]).then(n.bind(n,69158)),"@theme/BlogTagsListPage",69158],"028b1cc5":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6767)]).then(n.bind(n,38860)),"@site/docs/content/interacting/read-tuple-changes.mdx",38860],"03f1273c":[()=>Promise.all([n.e(2076),n.e(9884)]).then(n.bind(n,74575)),"@site/blog/kubecon-na-2023.md?truncated=true",74575],"0682978e":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7962)]).then(n.bind(n,11321)),"@site/docs/content/modeling/modular-models.mdx",11321],"0938166f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1786)]).then(n.bind(n,1600)),"@site/docs/content/modeling/migrating/overview.mdx",1600],"0a0ef58c":[()=>n.e(5731).then(n.t.bind(n,63890,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-conferences-f50.json",63890],"0bf6a463":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9775)]).then(n.bind(n,28705)),"@site/docs/content/authorization-concepts.mdx",28705],"116d061d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7178)]).then(n.bind(n,59622)),"@site/docs/content/getting-started/setup-openfga/overview.mdx",59622],"11a254f1":[()=>Promise.all([n.e(2076),n.e(3908)]).then(n.bind(n,35068)),"@site/blog/fine-grained-news-2024-03.md",35068],"11d41818":[()=>Promise.all([n.e(2076),n.e(3277)]).then(n.bind(n,95757)),"@site/blog/fine-grained-news-2024-04.md",95757],"138e0e15":[()=>n.e(4921).then(n.t.bind(n,41597,19)),"@generated/@easyops-cn/docusaurus-search-local/default/__plugin.json",41597],15369573:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4266)]).then(n.bind(n,10270)),"@site/docs/content/modeling/building-blocks/object-to-object-relationships.mdx",10270],"15f23c38":[()=>n.e(2282).then(n.t.bind(n,51305,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-newsletter-7f7.json",51305],17896441:[()=>Promise.all([n.e(1869),n.e(2076),n.e(575),n.e(8401)]).then(n.bind(n,30575)),"@theme/DocItem",30575],"18e2b0e6":[()=>Promise.all([n.e(2076),n.e(394)]).then(n.bind(n,36239)),"@site/docs/content/getting-started/setup-openfga/playground.mdx",36239],"18eda3ee":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6765)]).then(n.bind(n,46966)),"@site/docs/content/getting-started/framework.mdx",46966],"1959be70":[()=>Promise.all([n.e(2076),n.e(3261)]).then(n.bind(n,10849)),"@site/blog/fine-grained-news-2023-12.md",10849],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,41283)),"@theme/SearchPage",41283],"1bbc0b1c":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5117)]).then(n.bind(n,77234)),"@site/docs/content/getting-started/setup-openfga/kubernetes-setup.mdx",77234],"1bd78af1":[()=>Promise.all([n.e(2076),n.e(6815)]).then(n.bind(n,92869)),"@site/blog/fine-grained-news-2024-02.md?truncated=true",92869],"1dd44026":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5124)]).then(n.bind(n,76122)),"@site/docs/content/getting-started/setup-openfga/access-control.mdx",76122],"1df93b7f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8325),n.e(4583)]).then(n.bind(n,95638)),"@site/src/pages/index.tsx",95638],"24708ceb":[()=>Promise.all([n.e(2076),n.e(9682)]).then(n.bind(n,3506)),"@site/blog/fine-grained-news-2024-05.md?truncated=true",3506],"25c8fc86":[()=>Promise.all([n.e(2076),n.e(370)]).then(n.bind(n,83052)),"@site/blog/fine-grained-news-2024-07.md?truncated=true",83052],"2a5effb0":[()=>Promise.all([n.e(2076),n.e(8828)]).then(n.bind(n,5944)),"@site/blog/fine-grained-news-2024-03.md?truncated=true",5944],"2f791d74":[()=>Promise.all([n.e(2076),n.e(6917)]).then(n.bind(n,7833)),"@site/docs/content/community.mdx",7833],"30325ba4":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8667)]).then(n.bind(n,27798)),"@site/docs/content/modeling/direct-access.mdx",27798],"30d9c7f8":[()=>Promise.all([n.e(1869),n.e(2076),n.e(259)]).then(n.bind(n,31658)),"@site/docs/content/getting-started/cli.mdx",31658],"33b74eba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7822)]).then(n.bind(n,97515)),"@site/docs/content/configuration-language.mdx",97515],"34a3e208":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9547)]).then(n.bind(n,91737)),"@site/docs/content/getting-started/update-tuples.mdx",91737],"3592ef06":[()=>Promise.all([n.e(2076),n.e(629)]).then(n.bind(n,88480)),"@site/blog/fine-grained-news-2024-08.md?truncated=true",88480],"3652cf2a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(881)]).then(n.bind(n,64679)),"@site/docs/content/modeling/building-blocks/concentric-relationships.mdx",64679],"36994c47":[()=>n.e(9858).then(n.t.bind(n,45516,19)),"@generated/docusaurus-plugin-content-blog/default/__plugin.json",45516],"3759cf4b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6922)]).then(n.bind(n,12079)),"@site/docs/content/getting-started/immutable-models.mdx",12079],"3a191a7b":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7556)]).then(n.bind(n,18347)),"@site/docs/content/getting-started/setup-sdk-client.mdx",18347],"3a2db09e":[()=>n.e(8121).then(n.t.bind(n,68070,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-df9.json",68070],"3aada504":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3342)]).then(n.bind(n,23040)),"@site/docs/content/interacting/managing-user-access.mdx",23040],"3c873722":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7544)]).then(n.bind(n,69925)),"@site/docs/content/interacting/consistency.mdx",69925],"3d83e150":[()=>Promise.all([n.e(1869),n.e(2076),n.e(288)]).then(n.bind(n,17957)),"@site/docs/content/interacting/managing-relationships-between-objects.mdx",17957],"3fcc87c9":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1921)]).then(n.bind(n,69743)),"@site/docs/content/modeling/token-claims-contextual-tuples.mdx",69743],"4204f988":[()=>Promise.all([n.e(1869),n.e(2076),n.e(1114)]).then(n.bind(n,85396)),"@site/docs/content/modeling/building-blocks/direct-relationships.mdx",85396],"4337ba13":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4517)]).then(n.bind(n,66307)),"@site/docs/content/interacting/managing-group-access.mdx",66307],43777892:[()=>Promise.all([n.e(2076),n.e(7386)]).then(n.bind(n,58371)),"@site/blog/fine-grained-news-2024-11.md",58371],"4398cac5":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3319)]).then(n.bind(n,83381)),"@site/docs/content/intro.mdx",83381],"439d46c1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9525)]).then(n.bind(n,80493)),"@site/docs/content/modeling/user-groups.mdx",80493],"4427aa46":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6366)]).then(n.bind(n,48775)),"@site/docs/content/modeling/advanced/github.mdx",48775],"487f279c":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8865)]).then(n.bind(n,92054)),"@site/docs/content/getting-started/tuples-api-best-practices.mdx",92054],"4920f1c1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6451)]).then(n.bind(n,18227)),"@site/docs/content/modeling/multiple-restrictions.mdx",18227],"4a075682":[()=>Promise.all([n.e(1869),n.e(2076),n.e(6898)]).then(n.bind(n,70719)),"@site/docs/content/modeling/overview.mdx",70719],"4c2069ba":[()=>Promise.all([n.e(1869),n.e(2076),n.e(4710)]).then(n.bind(n,36656)),"@site/docs/content/getting-started/production-best-practices.mdx",36656],"4d7851de":[()=>Promise.all([n.e(2076),n.e(6509)]).then(n.bind(n,12755)),"@site/blog/list-users-announcement.md?truncated=true",12755],"5352c875":[()=>Promise.all([n.e(2076),n.e(2271)]).then(n.bind(n,41358)),"@site/blog/fine-grained-news-2024-01.md?truncated=true",41358],"54f0799f":[()=>Promise.all([n.e(2076),n.e(2759)]).then(n.bind(n,94254)),"@site/blog/fine-grained-news-2024-05.md",94254],"5ccffc9c":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8365)]).then(n.bind(n,55815)),"@site/docs/content/modeling/building-blocks/overview.mdx",55815],"5dfc8d6a":[()=>Promise.all([n.e(2076),n.e(3094)]).then(n.bind(n,11789)),"@site/blog/kubecon-na-2023.md",11789],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"621db11d":[()=>Promise.all([n.e(1869),n.e(3347),n.e(4212)]).then(n.bind(n,13250)),"@theme/Blog/Pages/BlogAuthorsListPage",13250],"63b646c1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3640)]).then(n.bind(n,35425)),"@site/docs/content/modeling/advanced/overview.mdx",35425],"65a696c4":[()=>n.e(4069).then(n.t.bind(n,91163,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-kubecon-4db.json",91163],"66e11443":[()=>n.e(9845).then(n.t.bind(n,8117,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-newsletter-page-2-065.json",8117],"6786195a":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3168)]).then(n.bind(n,85142)),"@site/docs/content/modeling/getting-started.mdx",85142],"678d2109":[()=>Promise.all([n.e(2076),n.e(9372)]).then(n.bind(n,32847)),"@site/blog/fine-grained-news-2024-04.md?truncated=true",32847],"6875c492":[()=>Promise.all([n.e(1869),n.e(2076),n.e(3347),n.e(4528),n.e(4813)]).then(n.bind(n,33069)),"@theme/BlogTagsPostsPage",33069],"6990fd21":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7474)]).then(n.bind(n,94367)),"@site/docs/content/modeling/conditions.mdx",94367],"6a4b619d":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7550)]).then(n.bind(n,87417)),"@site/docs/content/modeling/parent-child.mdx",87417],"71589d69":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7696)]).then(n.bind(n,58727)),"@site/docs/content/modeling/testing-models.mdx",58727],"7284575f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9185)]).then(n.bind(n,55767)),"@site/docs/content/modeling/custom-roles.mdx",55767],"73db2c80":[()=>Promise.all([n.e(1869),n.e(2076),n.e(650)]).then(n.bind(n,82083)),"@site/docs/content/interacting/relationship-queries.mdx",82083],"76c18be1":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5896)]).then(n.bind(n,29596)),"@site/docs/content/interacting/search-with-permissions.mdx",29596],"7742897f":[()=>Promise.all([n.e(1869),n.e(2076),n.e(41)]).then(n.bind(n,18638)),"@site/docs/content/getting-started/configure-model.mdx",18638],"78431c72":[()=>Promise.all([n.e(1869),n.e(2076),n.e(754)]).then(n.bind(n,84094)),"@site/docs/content/modeling/advanced/iot.mdx",84094],"78aaed86":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5749)]).then(n.bind(n,92666)),"@site/docs/content/modeling/public-access.mdx",92666],"814f3328":[()=>n.e(7472).then(n.t.bind(n,55513,19)),"~blog/default/blog-post-list-prop-default.json",55513],"8573b819":[()=>Promise.all([n.e(2076),n.e(3464)]).then(n.bind(n,53754)),"@site/blog/fine-grained-news-2024-01.md",53754],"87513e6a":[()=>Promise.all([n.e(2076),n.e(8061)]).then(n.bind(n,52232)),"@site/blog/fine-grained-news-2024-10.md?truncated=true",52232],"87a4c587":[()=>Promise.all([n.e(1869),n.e(2076),n.e(9952)]).then(n.bind(n,72759)),"@site/docs/content/modeling/blocklists.mdx",72759],"87c4c920":[()=>Promise.all([n.e(1869),n.e(2076),n.e(159)]).then(n.bind(n,26198)),"@site/docs/content/getting-started/install-sdk.mdx",26198],"8d107848":[()=>Promise.all([n.e(1869),n.e(2076),n.e(5073)]).then(n.bind(n,65802)),"@site/docs/content/modeling/migrating/migrating-models.mdx",65802],"8ea09047":[()=>n.e(9385).then(n.t.bind(n,40600,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-page-2-433.json",40600],"9578a8cf":[()=>Promise.all([n.e(1869),n.e(2076),n.e(892)]).then(n.bind(n,8273)),"@site/docs/content/modeling/organization-context-authorization.mdx",8273],"966ae436":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7773)]).then(n.bind(n,67229)),"@site/docs/content/getting-started/perform-list-users.mdx",67229],"97140aee":[()=>Promise.all([n.e(1869),n.e(2076),n.e(8603)]).then(n.bind(n,71006)),"@site/docs/content/modeling/advanced/entitlements.mdx",71006],"98dac049":[()=>Promise.all([n.e(2076),n.e(7597)]).then(n.bind(n,64326)),"@site/blog/query-consistency-options-announcement.md?truncated=true",64326],"9b7f5ff3":[()=>Promise.all([n.e(2076),n.e(2205)]).then(n.bind(n,94549)),"@site/blog/fine-grained-news-2024-11.md?truncated=true",94549],"9b914286":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7504)]).then(n.bind(n,26526)),"@site/docs/content/getting-started/setup-openfga/configure-openfga.mdx",26526],"9c4cd4c4":[()=>Promise.all([n.e(1869),n.e(2076),n.e(7709)]).then(n.bind(n,17459)),"@site/docs/content/interacting/overview.mdx",17459],"9e4087bc":[()=>n.e(2711).then(n.bind(n,89331)),"@theme/BlogArchivePage",89331],a09a1188:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2424)]).then(n.bind(n,57669)),"@site/docs/content/modeling/building-blocks/usersets.mdx",57669],a2ab5d86:[()=>Promise.all([n.e(2076),n.e(7022)]).then(n.bind(n,11582)),"@site/blog/conditional-tuples-announcement.md",11582],a33f8907:[()=>Promise.all([n.e(2076),n.e(9762)]).then(n.bind(n,63155)),"@site/blog/fine-grained-news-2024-02.md",63155],a6aa9e1f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3347),n.e(4528),n.e(7643)]).then(n.bind(n,35124)),"@theme/BlogListPage",35124],a7456010:[()=>n.e(1235).then(n.t.bind(n,88552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",88552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,74532)),"@theme/DocVersionRoot",74532],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,87432)),"@theme/DocRoot",87432],a99917a0:[()=>Promise.all([n.e(2076),n.e(2300)]).then(n.bind(n,18215)),"@site/blog/fine-grained-news-2024-06.md",18215],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,27093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",27093],acecf23e:[()=>n.e(1903).then(n.t.bind(n,1912,19)),"~blog/default/blogMetadata-default.json",1912],acf022e4:[()=>Promise.all([n.e(1869),n.e(2076),n.e(5688),n.e(4054)]).then(n.bind(n,35402)),"@site/src/pages/api/service.tsx",35402],b2fd7883:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4875)]).then(n.bind(n,12218)),"@site/docs/content/modeling/advanced/gdrive.mdx",12218],b65825d9:[()=>Promise.all([n.e(2076),n.e(9034)]).then(n.bind(n,7474)),"@site/blog/query-consistency-options-announcement.md",7474],b89f0a14:[()=>Promise.all([n.e(1869),n.e(2076),n.e(9078)]).then(n.bind(n,87532)),"@site/docs/content/interacting/managing-group-membership.mdx",87532],bac6be44:[()=>n.e(1124).then(n.t.bind(n,14833,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-openfga-7ff.json",14833],bb879dcd:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4862)]).then(n.bind(n,1067)),"@site/docs/content/modeling/migrating/migrating-relations.mdx",1067],bd85ffac:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4760)]).then(n.bind(n,53708)),"@site/docs/content/concepts.mdx",53708],c0e854c3:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3136)]).then(n.bind(n,97167)),"@site/docs/content/getting-started/perform-list-objects.mdx",97167],c15d9823:[()=>n.e(8146).then(n.t.bind(n,29328,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-bd9.json",29328],c606f954:[()=>Promise.all([n.e(2076),n.e(574)]).then(n.bind(n,63334)),"@site/blog/fine-grained-news-2024-09.md?truncated=true",63334],caf99389:[()=>Promise.all([n.e(2076),n.e(6565)]).then(n.bind(n,57634)),"@site/blog/conditional-tuples-announcement.md?truncated=true",57634],cb8ccc1a:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4243)]).then(n.bind(n,64147)),"@site/docs/content/getting-started/perform-check.mdx",64147],ccc49370:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3347),n.e(4528),n.e(3249)]).then(n.bind(n,73858)),"@theme/BlogPostPage",73858],d2f51707:[()=>Promise.all([n.e(2076),n.e(9797)]).then(n.bind(n,60448)),"@site/blog/fine-grained-news-2024-07.md",60448],d3d4dca1:[()=>Promise.all([n.e(1869),n.e(2076),n.e(1717)]).then(n.bind(n,79690)),"@site/docs/content/modeling/roles-and-permissions.mdx",79690],d4468f65:[()=>Promise.all([n.e(2076),n.e(3784)]).then(n.bind(n,90681)),"@site/blog/fine-grained-news-2024-06.md?truncated=true",90681],d5823966:[()=>n.e(3088).then(n.t.bind(n,60628,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-tags-features-ebb.json",60628],da16da38:[()=>Promise.all([n.e(1869),n.e(2076),n.e(7203)]).then(n.bind(n,13411)),"@site/docs/content/getting-started/overview.mdx",13411],db2cdc18:[()=>Promise.all([n.e(1869),n.e(2076),n.e(4988)]).then(n.bind(n,53817)),"@site/docs/content/getting-started/create-store.mdx",53817],e072f248:[()=>Promise.all([n.e(2076),n.e(3535)]).then(n.bind(n,96451)),"@site/blog/fine-grained-news-2023-12.md?truncated=true",96451],e23d3c5f:[()=>Promise.all([n.e(1869),n.e(2076),n.e(9080)]).then(n.bind(n,13051)),"@site/docs/content/getting-started/setup-openfga/docker-setup.mdx",13051],e260e0bb:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6679)]).then(n.bind(n,75868)),"@site/docs/content/modeling/contextual-time-based-authorization.mdx",75868],eb63e0da:[()=>Promise.all([n.e(1869),n.e(2076),n.e(3745)]).then(n.bind(n,12025)),"@site/docs/content/getting-started/configure-telemetry.mdx",12025],ed2f6563:[()=>Promise.all([n.e(1869),n.e(2076),n.e(2110)]).then(n.bind(n,67684)),"@site/docs/content/interacting/transactional-writes.mdx",67684],ef8b811a:[()=>n.e(8947).then(n.t.bind(n,56600,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-authors-790.json",56600],f07fb3da:[()=>Promise.all([n.e(2076),n.e(1258)]).then(n.bind(n,7763)),"@site/blog/modular-models-announcement.md",7763],f36658ee:[()=>Promise.all([n.e(2076),n.e(2099)]).then(n.bind(n,98097)),"@site/blog/fine-grained-news-2024-08.md",98097],f4eae614:[()=>Promise.all([n.e(2076),n.e(9365)]).then(n.bind(n,69253)),"@site/blog/modular-models-announcement.md?truncated=true",69253],f5ba7293:[()=>Promise.all([n.e(1869),n.e(2076),n.e(6368)]).then(n.bind(n,99039)),"@site/docs/content/modeling/advanced/slack.mdx",99039],f80d803f:[()=>Promise.all([n.e(2076),n.e(6810)]).then(n.bind(n,76497)),"@site/blog/list-users-announcement.md",76497],f81c1134:[()=>n.e(8130).then(n.t.bind(n,77735,19)),"@generated/docusaurus-plugin-content-blog/default/p/blog-archive-f05.json",77735],f9ee1d99:[()=>Promise.all([n.e(2076),n.e(7175)]).then(n.bind(n,88018)),"@site/blog/fine-grained-news-2024-09.md",88018],ff31ea65:[()=>Promise.all([n.e(2076),n.e(9750)]).then(n.bind(n,78444)),"@site/blog/fine-grained-news-2024-10.md",78444]};var a=n(74848);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,a.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,a.jsx)("p",{children:String(t)}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,a.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,a.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,a.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,a.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,a.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,a.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,a.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,a.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,a.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,a.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(86921),u=n(53102);function d(e,t){if("*"===e)return s()({loading:l,loader:()=>Promise.all([n.e(1869),n.e(93)]).then(n.bind(n,70093)),modules:["@theme/NotFound"],webpack:()=>[70093],render(e,t){const n=e.default;return(0,a.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,a.jsx)(n,{...t})})}});const r=i[`${e}-${t}`],d={},h=[],p=[],f=(0,c.A)(r);return Object.entries(f).forEach((e=>{let[t,n]=e;const r=o[n];r&&(d[t]=r[0],h.push(r[1]),p.push(r[2]))})),s().Map({loading:l,loader:d,modules:h,webpack:()=>p,render(t,n){const s=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const i=r.default;if(!i)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof i&&"function"!=typeof i||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{i[e]=r[e]}));let o=s;const a=n.split(".");a.slice(0,-1).forEach((e=>{o=o[e]})),o[a[a.length-1]]=i}));const i=s.__comp;delete s.__comp;const o=s.__context;delete s.__context;const l=s.__props;return delete s.__props,(0,a.jsx)(u.W,{value:o,children:(0,a.jsx)(i,{...s,...l,...n})})}})}const h=[{path:"/api/service",component:d("/api/service","234"),exact:!0},{path:"/blog",component:d("/blog","8f0"),exact:!0},{path:"/blog/archive",component:d("/blog/archive","182"),exact:!0},{path:"/blog/authors",component:d("/blog/authors","0b7"),exact:!0},{path:"/blog/conditional-tuples-announcement",component:d("/blog/conditional-tuples-announcement","f4f"),exact:!0},{path:"/blog/fine-grained-news-2023-12",component:d("/blog/fine-grained-news-2023-12","a3c"),exact:!0},{path:"/blog/fine-grained-news-2024-01",component:d("/blog/fine-grained-news-2024-01","750"),exact:!0},{path:"/blog/fine-grained-news-2024-02",component:d("/blog/fine-grained-news-2024-02","d84"),exact:!0},{path:"/blog/fine-grained-news-2024-03",component:d("/blog/fine-grained-news-2024-03","94b"),exact:!0},{path:"/blog/fine-grained-news-2024-04",component:d("/blog/fine-grained-news-2024-04","239"),exact:!0},{path:"/blog/fine-grained-news-2024-05",component:d("/blog/fine-grained-news-2024-05","942"),exact:!0},{path:"/blog/fine-grained-news-2024-06",component:d("/blog/fine-grained-news-2024-06","044"),exact:!0},{path:"/blog/fine-grained-news-2024-07",component:d("/blog/fine-grained-news-2024-07","db0"),exact:!0},{path:"/blog/fine-grained-news-2024-08",component:d("/blog/fine-grained-news-2024-08","2f4"),exact:!0},{path:"/blog/fine-grained-news-2024-09",component:d("/blog/fine-grained-news-2024-09","701"),exact:!0},{path:"/blog/fine-grained-news-2024-10",component:d("/blog/fine-grained-news-2024-10","2df"),exact:!0},{path:"/blog/fine-grained-news-2024-11",component:d("/blog/fine-grained-news-2024-11","086"),exact:!0},{path:"/blog/kubecon-na-2023",component:d("/blog/kubecon-na-2023","96b"),exact:!0},{path:"/blog/list-users-announcement",component:d("/blog/list-users-announcement","0c5"),exact:!0},{path:"/blog/modular-models-announcement",component:d("/blog/modular-models-announcement","a45"),exact:!0},{path:"/blog/page/2",component:d("/blog/page/2","7fe"),exact:!0},{path:"/blog/query-consistency-options-announcement",component:d("/blog/query-consistency-options-announcement","09b"),exact:!0},{path:"/blog/tags",component:d("/blog/tags","287"),exact:!0},{path:"/blog/tags/conferences",component:d("/blog/tags/conferences","e76"),exact:!0},{path:"/blog/tags/features",component:d("/blog/tags/features","3dc"),exact:!0},{path:"/blog/tags/kubecon",component:d("/blog/tags/kubecon","b44"),exact:!0},{path:"/blog/tags/newsletter",component:d("/blog/tags/newsletter","174"),exact:!0},{path:"/blog/tags/newsletter/page/2",component:d("/blog/tags/newsletter/page/2","e3f"),exact:!0},{path:"/blog/tags/openfga",component:d("/blog/tags/openfga","46a"),exact:!0},{path:"/search",component:d("/search","822"),exact:!0},{path:"/docs",component:d("/docs","fc5"),routes:[{path:"/docs",component:d("/docs","1cf"),routes:[{path:"/docs",component:d("/docs","49c"),routes:[{path:"/docs/authorization-concepts",component:d("/docs/authorization-concepts","6f2"),exact:!0,sidebar:"docs"},{path:"/docs/community",component:d("/docs/community","641"),exact:!0,sidebar:"docs"},{path:"/docs/concepts",component:d("/docs/concepts","5e1"),exact:!0,sidebar:"docs"},{path:"/docs/configuration-language",component:d("/docs/configuration-language","0c6"),exact:!0,sidebar:"docs"},{path:"/docs/fga",component:d("/docs/fga","488"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started",component:d("/docs/getting-started","bc6"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/cli",component:d("/docs/getting-started/cli","a30"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/configure-model",component:d("/docs/getting-started/configure-model","617"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/configure-telemetry",component:d("/docs/getting-started/configure-telemetry","faa"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/create-store",component:d("/docs/getting-started/create-store","5a7"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/framework",component:d("/docs/getting-started/framework","259"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/immutable-models",component:d("/docs/getting-started/immutable-models","a98"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/install-sdk",component:d("/docs/getting-started/install-sdk","1cf"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/perform-check",component:d("/docs/getting-started/perform-check","180"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/perform-list-objects",component:d("/docs/getting-started/perform-list-objects","705"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/perform-list-users",component:d("/docs/getting-started/perform-list-users","4a8"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/running-in-production",component:d("/docs/getting-started/running-in-production","4c4"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/access-control",component:d("/docs/getting-started/setup-openfga/access-control","413"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/configure-openfga",component:d("/docs/getting-started/setup-openfga/configure-openfga","c76"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/docker",component:d("/docs/getting-started/setup-openfga/docker","c14"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/kubernetes",component:d("/docs/getting-started/setup-openfga/kubernetes","3f3"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/overview",component:d("/docs/getting-started/setup-openfga/overview","05b"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-openfga/playground",component:d("/docs/getting-started/setup-openfga/playground","c2e"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/setup-sdk-client",component:d("/docs/getting-started/setup-sdk-client","83e"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/tuples-api-best-practices",component:d("/docs/getting-started/tuples-api-best-practices","6cb"),exact:!0,sidebar:"docs"},{path:"/docs/getting-started/update-tuples",component:d("/docs/getting-started/update-tuples","b42"),exact:!0,sidebar:"docs"},{path:"/docs/interacting",component:d("/docs/interacting","96d"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/consistency",component:d("/docs/interacting/consistency","13a"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/managing-group-access",component:d("/docs/interacting/managing-group-access","a51"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/managing-group-membership",component:d("/docs/interacting/managing-group-membership","e7c"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/managing-relationships-between-objects",component:d("/docs/interacting/managing-relationships-between-objects","3bf"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/managing-user-access",component:d("/docs/interacting/managing-user-access","8ac"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/read-tuple-changes",component:d("/docs/interacting/read-tuple-changes","872"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/relationship-queries",component:d("/docs/interacting/relationship-queries","df7"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/search-with-permissions",component:d("/docs/interacting/search-with-permissions","d99"),exact:!0,sidebar:"docs"},{path:"/docs/interacting/transactional-writes",component:d("/docs/interacting/transactional-writes","dbe"),exact:!0,sidebar:"docs"},{path:"/docs/modeling",component:d("/docs/modeling","488"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced",component:d("/docs/modeling/advanced","53a"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced/entitlements",component:d("/docs/modeling/advanced/entitlements","e50"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced/gdrive",component:d("/docs/modeling/advanced/gdrive","632"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced/github",component:d("/docs/modeling/advanced/github","938"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced/iot",component:d("/docs/modeling/advanced/iot","964"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/advanced/slack",component:d("/docs/modeling/advanced/slack","565"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/blocklists",component:d("/docs/modeling/blocklists","954"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/building-blocks",component:d("/docs/modeling/building-blocks","338"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/building-blocks/concentric-relationships",component:d("/docs/modeling/building-blocks/concentric-relationships","7cc"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/building-blocks/direct-relationships",component:d("/docs/modeling/building-blocks/direct-relationships","b68"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/building-blocks/object-to-object-relationships",component:d("/docs/modeling/building-blocks/object-to-object-relationships","d6a"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/building-blocks/usersets",component:d("/docs/modeling/building-blocks/usersets","c8d"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/conditions",component:d("/docs/modeling/conditions","8c8"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/contextual-time-based-authorization",component:d("/docs/modeling/contextual-time-based-authorization","21e"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/custom-roles",component:d("/docs/modeling/custom-roles","0f5"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/direct-access",component:d("/docs/modeling/direct-access","ef2"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/getting-started",component:d("/docs/modeling/getting-started","dc7"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/migrating",component:d("/docs/modeling/migrating","0e5"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/migrating/migrating-models",component:d("/docs/modeling/migrating/migrating-models","25b"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/migrating/migrating-relations",component:d("/docs/modeling/migrating/migrating-relations","f1b"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/modular-models",component:d("/docs/modeling/modular-models","b81"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/multiple-restrictions",component:d("/docs/modeling/multiple-restrictions","9e8"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/organization-context-authorization",component:d("/docs/modeling/organization-context-authorization","801"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/parent-child",component:d("/docs/modeling/parent-child","aaa"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/public-access",component:d("/docs/modeling/public-access","1a1"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/roles-and-permissions",component:d("/docs/modeling/roles-and-permissions","dac"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/testing",component:d("/docs/modeling/testing","731"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/token-claims-contextual-tuples",component:d("/docs/modeling/token-claims-contextual-tuples","dad"),exact:!0,sidebar:"docs"},{path:"/docs/modeling/user-groups",component:d("/docs/modeling/user-groups","569"),exact:!0,sidebar:"docs"}]}]}]},{path:"/",component:d("/","e5f"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>i,x:()=>o});var r=n(96540),s=n(74848);const i=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),(0,s.jsx)(i.Provider,{value:n,children:t})}},60788:(e,t,n)=>{"use strict";var r=n(96540),s=n(5338),i=n(80545),o=n(54625),a=n(4784),l=n(38193);const c=[n(10119),n(30661),n(76294),n(68170),n(51043)];var u=n(35947),d=n(56347),h=n(22831),p=n(5260),f=n(44586),m=n(74848);function g(e){let{children:t}=e;const{siteConfig:n}=(0,f.A)(),{contentSecurityPolicy:r}=n.customFields;return(0,m.jsxs)("div",{className:"CustomizedRoot",children:[(0,m.jsx)(p.A,{children:(0,m.jsx)("meta",{httpEquiv:"Content-Security-Policy",content:r})}),t]})}var y=n(86025),b=n(6342),v=n(61213),_=n(32131),E=n(14090);const T="default";var x=n(70440),w=n(41463);function k(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,f.A)(),r=(0,_.o)(),s=n[e].htmlLang,i=e=>e.replace("-","_");return(0,m.jsxs)(p.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,m.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,m.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,m.jsx)("meta",{property:"og:locale",content:i(s)}),Object.values(n).filter((e=>s!==e.htmlLang)).map((e=>(0,m.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function S(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,f.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,f.A)(),{pathname:r}=(0,d.zy)();return e+(0,x.Ks)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),s=t?`${n}${t}`:r;return(0,m.jsxs)(p.A,{children:[(0,m.jsx)("meta",{property:"og:url",content:s}),(0,m.jsx)("link",{rel:"canonical",href:s})]})}function N(){const{i18n:{currentLocale:e}}=(0,f.A)(),{metadata:t,image:n}=(0,b.p)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(p.A,{children:[(0,m.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,m.jsx)("body",{className:E.w})]}),n&&(0,m.jsx)(v.be,{image:n}),(0,m.jsx)(S,{}),(0,m.jsx)(k,{}),(0,m.jsx)(w.A,{tag:T,locale:e}),(0,m.jsx)(p.A,{children:t.map(((e,t)=>(0,m.jsx)("meta",{...e},t)))})]})}const A=new Map;var O=n(6125),C=n(26988),I=n(205);function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>s.forEach((e=>e?.()))}const L=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,I.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,s=t.hash===n.hash,i=t.search===n.search;if(r&&s&&!i)return;const{hash:o}=t;if(o){const e=decodeURIComponent(o.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),R("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function P(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,h.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class D extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?R("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=R("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),P(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,m.jsx)(L,{previousLocation:this.previousLocation,location:t,children:(0,m.jsx)(d.qh,{location:t,render:()=>e})})}}const $=D,M="__docusaurus-base-url-issue-banner-container",j="__docusaurus-base-url-issue-banner",F="__docusaurus-base-url-issue-banner-suggestion-container";function U(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${M}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{let{route:t}=e;return!0===t.exact})))return A.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return A.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,m.jsx)($,{location:e,children:G})}function Y(){return(0,m.jsx)(V.A,{children:(0,m.jsx)(C.l,{children:(0,m.jsxs)(O.x,{children:[(0,m.jsxs)(g,{children:[(0,m.jsx)(z,{}),(0,m.jsx)(N,{}),(0,m.jsx)(H,{}),(0,m.jsx)(q,{})]}),(0,m.jsx)(W,{})]})})})}var Q=n(84054);const J=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const s=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;s?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var X=n(86921);const Z=new Set,ee=new Set,te=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ne={prefetch:e=>{if(!(e=>!te()&&!ee.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,h.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(Q).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,X.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?J(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!te()&&!ee.has(e))(e)&&(ee.add(e),P(e))},re=Object.freeze(ne);function se(e){let{children:t}=e;return"hash"===a.default.future.experimental_router?(0,m.jsx)(o.I9,{children:t}):(0,m.jsx)(o.Kd,{children:t})}const ie=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=re;const e=document.getElementById("__docusaurus"),t=(0,m.jsx)(i.vd,{children:(0,m.jsx)(se,{children:(0,m.jsx)(Y,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},o=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(ie)window.docusaurusRoot=s.hydrateRoot(e,t,{onRecoverableError:n});else{const r=s.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};P(window.location.pathname).then((()=>{(0,r.startTransition)(o)}))}},26988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>h});var r=n(96540),s=n(4784);const i=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"content/intro","docs":[{"id":"content/authorization-concepts","path":"/docs/authorization-concepts","sidebar":"docs"},{"id":"content/community","path":"/docs/community","sidebar":"docs"},{"id":"content/concepts","path":"/docs/concepts","sidebar":"docs"},{"id":"content/configuration-language","path":"/docs/configuration-language","sidebar":"docs"},{"id":"content/getting-started/cli","path":"/docs/getting-started/cli","sidebar":"docs"},{"id":"content/getting-started/configure-model","path":"/docs/getting-started/configure-model","sidebar":"docs"},{"id":"content/getting-started/configure-telemetry","path":"/docs/getting-started/configure-telemetry","sidebar":"docs"},{"id":"content/getting-started/create-store","path":"/docs/getting-started/create-store","sidebar":"docs"},{"id":"content/getting-started/framework","path":"/docs/getting-started/framework","sidebar":"docs"},{"id":"content/getting-started/immutable-models","path":"/docs/getting-started/immutable-models","sidebar":"docs"},{"id":"content/getting-started/install-sdk","path":"/docs/getting-started/install-sdk","sidebar":"docs"},{"id":"content/getting-started/overview","path":"/docs/getting-started","sidebar":"docs"},{"id":"content/getting-started/perform-check","path":"/docs/getting-started/perform-check","sidebar":"docs"},{"id":"content/getting-started/perform-list-objects","path":"/docs/getting-started/perform-list-objects","sidebar":"docs"},{"id":"content/getting-started/perform-list-users","path":"/docs/getting-started/perform-list-users","sidebar":"docs"},{"id":"content/getting-started/production-best-practices","path":"/docs/getting-started/running-in-production","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/access-control","path":"/docs/getting-started/setup-openfga/access-control","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/configure-openfga","path":"/docs/getting-started/setup-openfga/configure-openfga","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/docker-setup","path":"/docs/getting-started/setup-openfga/docker","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/kubernetes-setup","path":"/docs/getting-started/setup-openfga/kubernetes","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/overview","path":"/docs/getting-started/setup-openfga/overview","sidebar":"docs"},{"id":"content/getting-started/setup-openfga/playground","path":"/docs/getting-started/setup-openfga/playground","sidebar":"docs"},{"id":"content/getting-started/setup-sdk-client","path":"/docs/getting-started/setup-sdk-client","sidebar":"docs"},{"id":"content/getting-started/tuples-api-best-practices","path":"/docs/getting-started/tuples-api-best-practices","sidebar":"docs"},{"id":"content/getting-started/update-tuples","path":"/docs/getting-started/update-tuples","sidebar":"docs"},{"id":"content/interacting/consistency","path":"/docs/interacting/consistency","sidebar":"docs"},{"id":"content/interacting/managing-group-access","path":"/docs/interacting/managing-group-access","sidebar":"docs"},{"id":"content/interacting/managing-group-membership","path":"/docs/interacting/managing-group-membership","sidebar":"docs"},{"id":"content/interacting/managing-relationships-between-objects","path":"/docs/interacting/managing-relationships-between-objects","sidebar":"docs"},{"id":"content/interacting/managing-user-access","path":"/docs/interacting/managing-user-access","sidebar":"docs"},{"id":"content/interacting/overview","path":"/docs/interacting","sidebar":"docs"},{"id":"content/interacting/read-tuple-changes","path":"/docs/interacting/read-tuple-changes","sidebar":"docs"},{"id":"content/interacting/relationship-queries","path":"/docs/interacting/relationship-queries","sidebar":"docs"},{"id":"content/interacting/search-with-permissions","path":"/docs/interacting/search-with-permissions","sidebar":"docs"},{"id":"content/interacting/transactional-writes","path":"/docs/interacting/transactional-writes","sidebar":"docs"},{"id":"content/intro","path":"/docs/fga","sidebar":"docs"},{"id":"content/modeling/advanced/entitlements","path":"/docs/modeling/advanced/entitlements","sidebar":"docs"},{"id":"content/modeling/advanced/gdrive","path":"/docs/modeling/advanced/gdrive","sidebar":"docs"},{"id":"content/modeling/advanced/github","path":"/docs/modeling/advanced/github","sidebar":"docs"},{"id":"content/modeling/advanced/iot","path":"/docs/modeling/advanced/iot","sidebar":"docs"},{"id":"content/modeling/advanced/overview","path":"/docs/modeling/advanced","sidebar":"docs"},{"id":"content/modeling/advanced/slack","path":"/docs/modeling/advanced/slack","sidebar":"docs"},{"id":"content/modeling/blocklists","path":"/docs/modeling/blocklists","sidebar":"docs"},{"id":"content/modeling/building-blocks/concentric-relationships","path":"/docs/modeling/building-blocks/concentric-relationships","sidebar":"docs"},{"id":"content/modeling/building-blocks/direct-relationships","path":"/docs/modeling/building-blocks/direct-relationships","sidebar":"docs"},{"id":"content/modeling/building-blocks/object-to-object-relationships","path":"/docs/modeling/building-blocks/object-to-object-relationships","sidebar":"docs"},{"id":"content/modeling/building-blocks/overview","path":"/docs/modeling/building-blocks","sidebar":"docs"},{"id":"content/modeling/building-blocks/usersets","path":"/docs/modeling/building-blocks/usersets","sidebar":"docs"},{"id":"content/modeling/conditions","path":"/docs/modeling/conditions","sidebar":"docs"},{"id":"content/modeling/contextual-time-based-authorization","path":"/docs/modeling/contextual-time-based-authorization","sidebar":"docs"},{"id":"content/modeling/custom-roles","path":"/docs/modeling/custom-roles","sidebar":"docs"},{"id":"content/modeling/direct-access","path":"/docs/modeling/direct-access","sidebar":"docs"},{"id":"content/modeling/getting-started","path":"/docs/modeling/getting-started","sidebar":"docs"},{"id":"content/modeling/migrating/migrating-models","path":"/docs/modeling/migrating/migrating-models","sidebar":"docs"},{"id":"content/modeling/migrating/migrating-relations","path":"/docs/modeling/migrating/migrating-relations","sidebar":"docs"},{"id":"content/modeling/migrating/overview","path":"/docs/modeling/migrating","sidebar":"docs"},{"id":"content/modeling/modular-models","path":"/docs/modeling/modular-models","sidebar":"docs"},{"id":"content/modeling/multiple-restrictions","path":"/docs/modeling/multiple-restrictions","sidebar":"docs"},{"id":"content/modeling/organization-context-authorization","path":"/docs/modeling/organization-context-authorization","sidebar":"docs"},{"id":"content/modeling/overview","path":"/docs/modeling","sidebar":"docs"},{"id":"content/modeling/parent-child","path":"/docs/modeling/parent-child","sidebar":"docs"},{"id":"content/modeling/public-access","path":"/docs/modeling/public-access","sidebar":"docs"},{"id":"content/modeling/roles-and-permissions","path":"/docs/modeling/roles-and-permissions","sidebar":"docs"},{"id":"content/modeling/testing-models","path":"/docs/modeling/testing","sidebar":"docs"},{"id":"content/modeling/token-claims-contextual-tuples","path":"/docs/modeling/token-claims-contextual-tuples","sidebar":"docs"},{"id":"content/modeling/user-groups","path":"/docs/modeling/user-groups","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/docs/fga","label":"What is OpenFGA"}}}}],"breadcrumbs":true}}}'),o=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var a=n(22654);const l=JSON.parse('{"docusaurusVersion":"3.6.3","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.6.3"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.6.3"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.6.3"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.6.3"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.6.3"},"webpack-overrides-docusaurus-plugin":{"type":"project"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.6.3"},"docusaurus-plugin-local-resolve":{"type":"package","name":"docusaurus-plugin-module-alias","version":"0.0.2"},"@easyops-cn/docusaurus-search-local":{"type":"package","name":"@easyops-cn/docusaurus-search-local","version":"0.45.0"}}}');var c=n(74848);const u={siteConfig:s.default,siteMetadata:l,globalData:i,i18n:o,codeTranslations:a},d=r.createContext(u);function h(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(96540),s=n(38193),i=n(5260),o=n(70440),a=n(12161),l=n(53102),c=n(74848);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,o.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function h(e){let{children:t}=e;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function p(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(h,{children:(0,c.jsxs)(m,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(a.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const f=e=>(0,c.jsx)(p,{...e});class m extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){s.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??f)(e)}return e??null}}},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,s={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(96540);var r=n(80545),s=n(74848);function i(e){return(0,s.jsx)(r.mg,{...e})}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(96540),s=n(54625),i=n(70440),o=n(44586),a=n(16654),l=n(38193),c=n(63427),u=n(86025),d=n(74848);function h(e,t){let{isNavLink:n,to:h,href:p,activeClassName:f,isActive:m,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:v}=(0,o.A)(),{trailingSlash:_,baseUrl:E}=v,T=v.future.experimental_router,{withBaseUrl:x}=(0,u.hH)(),w=(0,c.A)(),k=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>k.current));const S=h||p;const N=(0,a.A)(S),A=S?.replace("pathname://","");let O=void 0!==A?(C=A,y&&(e=>e.startsWith("/"))(C)?x(C):C):void 0;var C;"hash"===T&&O?.startsWith("./")&&(O=O?.slice(1)),O&&N&&(O=(0,i.Ks)(O,{trailingSlash:_,baseUrl:E}));const I=(0,r.useRef)(!1),R=n?s.k2:s.N_,L=l.A.canUseIntersectionObserver,P=(0,r.useRef)(),D=()=>{I.current||null==O||(window.docusaurus.preload(O),I.current=!0)};(0,r.useEffect)((()=>(!L&&N&&l.A.canUseDOM&&null!=O&&window.docusaurus.prefetch(O),()=>{L&&P.current&&P.current.disconnect()})),[P,O,L,N]);const $=O?.startsWith("#")??!1,M=!b.target||"_self"===b.target,j=!O||!N||!M||$&&"hash"!==T;g||!$&&j||w.collectLink(O),b.id&&w.collectAnchor(b.id);const F={};return j?(0,d.jsx)("a",{ref:k,href:O,...S&&!N&&{target:"_blank",rel:"noopener noreferrer"},...b,...F}):(0,d.jsx)(R,{...b,onMouseEnter:D,onTouchStart:D,innerRef:e=>{k.current=e,L&&e&&N&&(P.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(P.current.unobserve(e),P.current.disconnect(),null!=O&&window.docusaurus.prefetch(O))}))})),P.current.observe(e))},to:O,...n&&{isActive:m,activeClassName:f},...F})}const p=r.forwardRef(h)},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>l});var r=n(96540),s=n(74848);function i(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(22654);function a(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return o[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return i(a({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const o=a({message:t,id:n});return(0,s.jsx)(s.Fragment,{children:i(o,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function s(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>s,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,hH:()=>o});var r=n(96540),s=n(44586),i=n(16654);function o(){const{siteConfig:e}=(0,s.A)(),{baseUrl:t,url:n}=e,o=e.future.experimental_router,a=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:s=!1,absolute:o=!1}={},router:a}=e;if(!r||r.startsWith("#")||(0,i.z)(r))return r;if("hash"===a)return r.startsWith("/")?`.${r}`:`./${r}`;if(s)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const l=r.startsWith(n)?r:n+r.replace(/^\//,"");return o?t+l:l}({siteUrl:n,baseUrl:t,url:e,options:r,router:o})),[n,t,o]);return{withBaseUrl:a}}function a(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);n(74848);const s=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),i=()=>(0,r.useContext)(s);function o(){return i()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),s=n(26988);function i(){return(0,r.useContext)(s.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),s=n(6125);function i(){return(0,r.useContext)(s.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(96540);const s=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},36803:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),s=n(53102);function i(){const e=r.useContext(s.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function s(e){const t={};return function e(n,s){Object.entries(n).forEach((n=>{let[i,o]=n;const a=s?`${s}.${i}`:i;r(o)?e(o,a):t[a]=o}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,o:()=>i});var r=n(96540),s=n(74848);const i=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(i),a=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return(0,s.jsx)(i.Provider,{value:a,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>g,XK:()=>v,g1:()=>b});var r=n(96540),s=n(44070),i=n(17065),o=n(6342),a=n(70679),l=n(89532),c=n(74848);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,a.Wf)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,a.Wf)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,a.Wf)(u(e),{persistence:t}).del()}},h=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const p=r.createContext(null);function f(){const e=(0,s.Gy)(),t=(0,o.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[i,a]=(0,r.useState)((()=>h(n)));(0,r.useEffect)((()=>{a(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function s(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,s(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[i,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),a((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function m(e){let{children:t}=e;const n=f();return(0,c.jsx)(p.Provider,{value:n,children:t})}function g(e){let{children:t}=e;return(0,c.jsx)(m,{children:t})}function y(){const e=(0,r.useContext)(p);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function b(e){void 0===e&&(e=i.W);const t=(0,s.ht)(e),[n,o]=y(),{preferredVersionName:a}=n[e];return{preferredVersion:t.versions.find((e=>e.name===a))??null,savePreferredVersionName:(0,r.useCallback)((t=>{o.savePreferredVersion(e,t)}),[o,e])}}function v(){const e=(0,s.Gy)(),[t]=y();function n(n){const r=e[n],{preferredVersionName:s}=t[n];return r.versions.find((e=>e.name===s))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>i,v:()=>o});var r=n(44070),s=n(53886);function i(e,t){return`docs-${e}-${t}`}function o(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,s.XK)();return[...Object.keys(e).map((function(r){const s=t?.activePlugin.pluginId===r?t.activeVersion:void 0,o=n[r],a=e[r].versions.find((e=>e.isLast));return i(r,(s??o??a).name)}))]}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(96540),s=n(89532),i=n(74848);const o=Symbol("EmptyContext"),a=r.createContext(o);function l(e){let{children:t,name:n,items:s}=e;const o=(0,r.useMemo)((()=>n&&s?{name:n,items:s}:null),[n,s]);return(0,i.jsx)(a.Provider,{value:o,children:t})}function c(){const e=(0,r.useContext)(a);if(e===o)throw new s.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>p,B5:()=>w,Nr:()=>h,OF:()=>_,QB:()=>x,Vd:()=>E,Y:()=>b,d1:()=>k,fW:()=>T,w8:()=>g});var r=n(96540),s=n(56347),i=n(22831),o=n(44070),a=n(99169),l=n(31682),c=n(53886),u=n(23025),d=n(60609);function h(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=h(t);if(e)return e}}(e):void 0:e.href}function p(){const{pathname:e}=(0,s.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=v({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const f=(e,t)=>void 0!==e&&(0,a.ys)(e,t),m=(e,t)=>e.some((e=>g(e,t)));function g(e,t){return"link"===e.type?f(e.href,t):"category"===e.type&&(f(e.href,t)||m(e.items,t))}function y(e,t){switch(e.type){case"category":return g(e,t)||e.items.some((e=>y(e,t)));case"link":return!e.unlisted||g(e,t);default:return!0}}function b(e,t){return(0,r.useMemo)((()=>e.filter((e=>y(e,t)))),[e,t])}function v(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const s=[];return function e(t){for(const i of t)if("category"===i.type&&((0,a.ys)(i.href,n)||e(i.items))||"link"===i.type&&(0,a.ys)(i.href,n)){return r&&"category"!==i.type||s.unshift(i),!0}return!1}(t),s}function _(){const e=(0,d.t)(),{pathname:t}=(0,s.zy)(),n=(0,o.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?v({sidebarItems:e.items,pathname:t}):null}function E(e){const{activeVersion:t}=(0,o.zK)(e),{preferredVersion:n}=(0,c.g1)(e),s=(0,o.r7)(e);return(0,r.useMemo)((()=>(0,l.sb)([t,n,s].filter(Boolean))),[t,n,s])}function T(e,t){const n=E(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function x(e,t){const n=E(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,l.sb)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function w(e){let{route:t}=e;const n=(0,s.zy)(),r=(0,u.r)(),o=t.routes,a=o.find((e=>(0,s.B6)(n.pathname,e)));if(!a)return null;const l=a.sidebar,c=l?r.docsSidebars[l]:void 0;return{docElement:(0,i.v)(o),sidebarName:l,sidebarItems:c}}function k(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!h(e)))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>a,r:()=>l});var r=n(96540),s=n(89532),i=n(74848);const o=r.createContext(null);function a(e){let{children:t,version:n}=e;return(0,i.jsx)(o.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(o);if(null===e)throw new s.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{d1:()=>u.d1,zK:()=>_,vT:()=>g,gk:()=>y,Gy:()=>f,$S:()=>u.$S,HW:()=>E,vF:()=>h.v,ht:()=>m,g1:()=>d.g1,r7:()=>v,jh:()=>b});var r=n(56347),s=n(44586),i=n(17065);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,s.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const a=e=>e.versions.find((e=>e.isLast));function l(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=l(e,t),s=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:s,alternateDocVersions:s?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(s.id):{}}}var u=n(26972),d=n(53886),h=n(82565);const p={},f=()=>o("docusaurus-plugin-content-docs")??p,m=e=>{try{return function(e,t,n){void 0===t&&(t=i.W),void 0===n&&(n={});const r=o(e),s=r?.[t];if(!s&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return s}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function g(e){void 0===e&&(e={});const t=f(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const s=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),i=s?{pluginId:s[0],pluginData:s[1]}:void 0;if(!i&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return i}(t,n,e)}function y(e){void 0===e&&(e={});const t=g(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function b(e){return m(e).versions}function v(e){const t=m(e);return a(t)}function _(e){const t=m(e),{pathname:n}=(0,r.zy)();return c(t,n)}function E(e){const t=m(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=a(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(5947),s=n.n(r);s().configure({showSpinner:!1});const i={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{s().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){s().done()}}},30661:(e,t,n)=>{"use strict";var r=n(71765),s=n(4784),i=n(18537);const{PrismExtensions:o}=i.tools;!function(e){const{themeConfig:{prism:t}}=s.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(95357)(`./prism-${e}`)})),e.languages[o.LANGUAGE_NAME]=o.languageDefinition,delete globalThis.Prism}(r.My)},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(96540);var r=n(34164),s=n(21312),i=n(6342),o=n(28774),a=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(74848);function u(e){let{as:t,id:n,...u}=e;const d=(0,a.A)(),{navbar:{hideOnScroll:h}}=(0,i.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const p=(0,s.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",h?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(o.A,{className:"hash-link",to:`#${n}`,"aria-label":p,title:p,children:"\u200b"})]})}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(96540);const r={iconExternalLink:"iconExternalLink_nPIU"};var s=n(74848);function i(e){let{width:t=13.5,height:n=13.5}=e;return(0,s.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,s.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},12161:(e,t,n)=>{"use strict";n.d(t,{A:()=>Mt});var r=n(96540),s=n(34164),i=n(67489),o=n(61213),a=n(56347),l=n(21312),c=n(75062),u=n(74848);const d="__docusaurus_skipToContent_fallback";function h(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,a.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&h(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&h(e.current)})),{containerRef:e,onClick:n}}const f=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function m(e){const t=e.children??f,{containerRef:n,onClick:r}=p();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":f,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(17559),y=n(14090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(m,{className:b.skipToContent})}var _=n(6342),E=n(65041);function T(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:s=1.2,className:i,...o}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...o,children:(0,u.jsx)("g",{stroke:r,strokeWidth:s,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const x={closeButton:"closeButton_CVFx"};function w(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,s.A)("clean-btn close",x.closeButton,e.className),children:(0,u.jsx)(T,{width:14,height:14,strokeWidth:3.1})})}const k={content:"content_knG7"};function S(e){const{announcementBar:t}=(0,_.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,s.A)(k.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const N={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function A(){const{announcementBar:e}=(0,_.p)(),{isActive:t,close:n}=(0,E.M)();if(!t)return null;const{backgroundColor:r,textColor:s,isCloseable:i}=e;return(0,u.jsxs)("div",{className:N.announcementBar,style:{backgroundColor:r,color:s},role:"banner",children:[i&&(0,u.jsx)("div",{className:N.announcementBarPlaceholder}),(0,u.jsx)(S,{className:N.announcementBarContent}),i&&(0,u.jsx)(w,{onClick:n,className:N.announcementBarClose})]})}var O=n(22069),C=n(23104);var I=n(89532),R=n(75600);const L=r.createContext(null);function P(e){let{children:t}=e;const n=function(){const e=(0,O.M)(),t=(0,R.YL)(),[n,s]=(0,r.useState)(!1),i=null!==t.component,o=(0,I.ZC)(i);return(0,r.useEffect)((()=>{i&&!o&&s(!0)}),[i,o]),(0,r.useEffect)((()=>{i?e.shown||s(!0):s(!1)}),[e.shown,i]),(0,r.useMemo)((()=>[n,s]),[n])}();return(0,u.jsx)(L.Provider,{value:n,children:t})}function D(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function $(){const e=(0,r.useContext)(L);if(!e)throw new I.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,s=(0,r.useCallback)((()=>n(!1)),[n]),i=(0,R.YL)();return(0,r.useMemo)((()=>({shown:t,hide:s,content:D(i)})),[s,i,t])}function M(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:i}=$();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,s.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var j=n(95293),F=n(92303);function U(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const H={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function z(e){let{className:t,buttonClassName:n,value:r,onChange:i}=e;const o=(0,F.A)(),a=(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,s.A)(H.toggle,t),children:(0,u.jsxs)("button",{className:(0,s.A)("clean-btn",H.toggleButton,!o&&H.toggleButtonDisabled,n),type:"button",onClick:()=>i("dark"===r?"light":"dark"),disabled:!o,title:a,"aria-label":a,"aria-live":"polite","aria-pressed":"dark"===r?"true":"false",children:[(0,u.jsx)(U,{className:(0,s.A)(H.toggleIcon,H.lightToggleIcon)}),(0,u.jsx)(B,{className:(0,s.A)(H.toggleIcon,H.darkToggleIcon)})]})})}const V=r.memo(z),K={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function W(e){let{className:t}=e;const n=(0,_.p)().navbar.style,r=(0,_.p)().colorMode.disableSwitch,{colorMode:s,setColorMode:i}=(0,j.G)();return r?null:(0,u.jsx)(V,{className:t,buttonClassName:"dark"===n?K.darkNavbarColorModeToggle:void 0,value:s,onChange:i})}var G=n(23465);function q(){return(0,u.jsx)(G.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Y(){const e=(0,O.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(T,{color:"var(--ifm-color-emphasis-600)"})})}function Q(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(q,{}),(0,u.jsx)(W,{className:"margin-right--md"}),(0,u.jsx)(Y,{})]})}var J=n(28774),X=n(86025),Z=n(16654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(43186);const ne="openfga_github_stars";function re(e){let{activeBasePath:t,activeBaseRegex:n,to:s,href:i,label:o,html:a,isDropdownLink:l,prependBaseUrlToHref:c,...d}=e;const h=(0,X.Ay)(s),p=(0,X.Ay)(t),f=(0,X.Ay)(i,{forcePrependBaseUrl:!0}),m=o&&i&&!(0,Z.A)(i),[g,y]=(0,r.useState)(null);(0,r.useEffect)((()=>{g||(async()=>{const e=JSON.parse(sessionStorage.getItem(ne));try{if(e){const t=new Date(e.retrievedTime);if(t.setDate(t.getDate()+1),t.getTime()>Date.now())return void y({count:e.count,retrievedTime:Date.now()})}const t=await fetch("https://api.github.com/repos/openfga/openfga");if(!t.ok)throw new Error(`This is an HTTP error: The status is ${t.status}`);const n={count:(await t.json()).stargazers_count,retrievedTime:Date.now()};y(n),sessionStorage.setItem(ne,JSON.stringify(n))}catch(t){y(e||null)}})()}),[]);const b="GitHub"===o&&g?`GitHub | ${g.count}`:o,v=a?{dangerouslySetInnerHTML:{__html:a}}:{children:(0,u.jsxs)(u.Fragment,{children:[b,m&&(0,u.jsx)(te.A,{...l&&{width:12,height:12}})]})};return i?(0,u.jsx)(J.A,{href:c?f:i,...d,...v}):(0,u.jsx)(J.A,{to:h,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},...d,...v})}function se(e){let{className:t,isDropdownItem:n=!1,...r}=e;const i=(0,u.jsx)(re,{className:(0,s.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:i}):i}function ie(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(re,{className:(0,s.A)("menu__link",t),...r})})}function oe(e){let{mobile:t=!1,position:n,...r}=e;const s=t?ie:se;return(0,u.jsx)(s,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ae=n(41422),le=n(99169),ce=n(44586);const ue={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function de(e,t){return e.some((e=>function(e,t){return!!(0,le.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function he(e){let{items:t,position:n,className:i,onClick:o,...a}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,s.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(re,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:a.to?void 0:"#",className:(0,s.A)("navbar__link",i),...a,onClick:a.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:a.children??a.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Ye,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:i,onClick:o,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,ce.A)(),{pathname:t}=(0,a.zy)();return t.replace(e,"/")}(),d=de(t,c),{collapsed:h,toggleCollapsed:p,setCollapsed:f}=(0,ae.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&f(!d)}),[c,d,f]),(0,u.jsxs)("li",{className:(0,s.A)("menu__list-item",{"menu__list-item--collapsed":h}),children:[(0,u.jsx)(re,{role:"button",className:(0,s.A)(ue.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),p()},children:l.children??l.label}),(0,u.jsx)(ae.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:h,children:t.map(((e,t)=>(0,r.createElement)(Ye,{mobile:!0,isDropdownItem:!0,onClick:o,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:he;return(0,u.jsx)(r,{...n})}var me=n(32131);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ye="iconLanguage_nlXk";var be=n(11088),ve=n(5391);var _e=n(44070),Ee=n(5891),Te=n(32384),xe=n(69913),we=n(4471),ke=n(27674),Se=n(86841),Ne=n(43810);const Ae='',Oe='',Ce='',Ie='',Re='',Le='',Pe='',De={searchBar:"searchBar_RVTs",dropdownMenu:"dropdownMenu_qbY6",searchBarLeft:"searchBarLeft_MXDe",suggestion:"suggestion_fB_2",cursor:"cursor_eG29",hitTree:"hitTree_kk6K",hitIcon:"hitIcon_a7Zy",hitPath:"hitPath_ieM4",noResultsIcon:"noResultsIcon_EBY5",hitFooter:"hitFooter_E9YW",hitWrapper:"hitWrapper_sAK8",hitTitle:"hitTitle_vyVt",hitAction:"hitAction_NqkB",hideAction:"hideAction_vcyE",noResults:"noResults_l6Q3",searchBarContainer:"searchBarContainer_NW3z",searchBarLoadingRing:"searchBarLoadingRing_YnHq",searchClearButton:"searchClearButton_qk4g",searchIndexLoading:"searchIndexLoading_EJ1f",searchHintContainer:"searchHintContainer_Pkmr",searchHint:"searchHint_iIMx",focused:"focused_OWtg",input:"input_FOTf",hint:"hint_URu1",suggestions:"suggestions_X8XU",dataset:"dataset_QiCy",empty:"empty_eITn"};function $e(e){let{document:t,type:n,page:r,metadata:s,tokens:i,isInterOfTree:o,isLastOfTree:a}=e;const l=n===xe.i.Title,c=n===xe.i.Keywords,u=l||c,d=n===xe.i.Heading,h=[];o?h.push(Le):a&&h.push(Pe);const p=h.map((e=>`${e}`)),f=`${u?Ae:d?Oe:Ce}`,m=[`${c?(0,Se.Z)(t.s,i):(0,Ne.C)(t.t,(0,ke.g)(s,"t"),i)}`];if(!o&&!a&&be.tb){const e=r?r.b?.concat(r.t).concat(t.s&&t.s!==r.t?t.s:[]):t.b;m.push(`${(0,we.$)(e??[])}`)}else u||m.push(`${(0,Se.Z)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),i)}`);const g=`${Ie}`;return[...p,f,``,...m,"",g].join("")}function Me(){return`${Re}${(0,l.T)({id:"theme.SearchBar.noResultsText",message:"No results"})}`}var je=n(2849),Fe=n(43385);async function Ue(){const e=await Promise.all([n.e(489),n.e(5741)]).then(n.t.bind(n,90489,23)),t=e.default;return t.noConflict?t.noConflict():e.noConflict&&e.noConflict(),t}const Be="_highlight";const He=function(e){let{handleSearchBarToggle:t}=e;const s=(0,F.A)(),{siteConfig:{baseUrl:i},i18n:{currentLocale:o}}=(0,ce.A)(),c=(0,_e.vT)();let d=i;try{const{preferredVersion:e}=function(){return n(44070).g1(...arguments)}(c?.pluginId??be.UB);e&&!e.isLast&&(d=e.path+"/")}catch(j){if(be.I$&&!(j instanceof I.dV))throw j}const h=(0,a.W6)(),p=(0,a.zy)(),f=(0,r.useRef)(null),m=(0,r.useRef)(new Map),g=(0,r.useRef)(!1),[y,b]=(0,r.useState)(!1),[v,_]=(0,r.useState)(!1),[E,T]=(0,r.useState)(""),x=(0,r.useRef)(null),w=(0,r.useRef)(""),[k,S]=(0,r.useState)("");(0,r.useEffect)((()=>{if(!Array.isArray(be.Hg))return;let e="";if(p.pathname.startsWith(d)){const t=p.pathname.substring(d.length);let n;for(const e of be.Hg){const r="string"==typeof e?e:e.path;if(t===r||t.startsWith(`${r}/`)){n=r;break}}n&&(e=n)}w.current!==e&&(m.current.delete(e),w.current=e),S(e)}),[p.pathname,d]);const N=!!be.O6&&Array.isArray(be.Hg)&&""===k,A=(0,r.useCallback)((async()=>{if(N||m.current.get(k))return;m.current.set(k,"loading"),x.current?.autocomplete.destroy(),b(!0);const[{wrappedIndexes:e,zhDictionary:t},n]=await Promise.all([(0,Ee.Z)(d,k),Ue()]);if(x.current=n(f.current,{hint:!1,autoselect:!0,openOnFocus:!0,cssClasses:{root:(0,ve.A)(De.searchBar,{[De.searchBarLeft]:"left"===be.ZG}),noPrefix:!0,dropdownMenu:De.dropdownMenu,input:De.input,hint:De.hint,suggestions:De.suggestions,suggestion:De.suggestion,cursor:De.cursor,dataset:De.dataset,empty:De.empty}},[{source:(0,Te.m)(e,t,be.AT),templates:{suggestion:$e,empty:Me,footer:e=>{let{query:t,isEmpty:n}=e;if(n&&(!k||!be.dz))return;const r=(e=>{let{query:t,isEmpty:n}=e;const r=document.createElement("a"),s=new URLSearchParams;let a;if(s.set("q",t),k){const e=k&&Array.isArray(be.Hg)?be.Hg.find((e=>"string"==typeof e?e===k:e.path===k)):k,t=e?(0,Fe.p)(e,o).label:k;a=be.dz&&n?(0,l.T)({id:"theme.SearchBar.seeAllOutsideContext",message:'See all results outside "{context}"'},{context:t}):(0,l.T)({id:"theme.SearchBar.searchInContext",message:'See all results within "{context}"'},{context:t})}else a=(0,l.T)({id:"theme.SearchBar.seeAll",message:"See all results"});if(!k||!Array.isArray(be.Hg)||be.dz&&n||s.set("ctx",k),d!==i){if(!d.startsWith(i))throw new Error(`Version url '${d}' does not start with base url '${i}', this is a bug of \`@easyops-cn/docusaurus-search-local\`, please report it.`);s.set("version",d.substring(i.length))}const c=`${i}search/?${s.toString()}`;return r.href=c,r.textContent=a,r.addEventListener("click",(e=>{e.ctrlKey||e.metaKey||(e.preventDefault(),x.current?.autocomplete.close(),h.push(c))})),r})({query:t,isEmpty:n}),s=document.createElement("div");return s.className=De.hitFooter,s.appendChild(r),s}}}]).on("autocomplete:selected",(function(e,t){let{document:{u:n,h:r},tokens:s}=t;f.current?.blur();let i=n;if(be.CU&&s.length>0){const e=new URLSearchParams;for(const t of s)e.append(Be,t);i+=`?${e.toString()}`}r&&(i+=r),h.push(i)})).on("autocomplete:closed",(()=>{f.current?.blur()})),m.current.set(k,"done"),b(!1),g.current){const e=f.current;e.value&&x.current?.autocomplete.open(),e.focus()}}),[N,k,d,i,h]);(0,r.useEffect)((()=>{if(!be.CU)return;const e=s?new URLSearchParams(p.search).getAll(Be):[];setTimeout((()=>{const t=document.querySelector("article");if(!t)return;const n=new be.CU(t);n.unmark(),0!==e.length&&n.mark(e),T(e.join(" ")),x.current?.autocomplete.setVal(e.join(" "))}))}),[s,p.search,p.pathname]);const[O,C]=(0,r.useState)(!1),R=(0,r.useCallback)((()=>{g.current=!0,A(),C(!0),t?.(!0)}),[t,A]),L=(0,r.useCallback)((()=>{C(!1),t?.(!1)}),[t]),P=(0,r.useCallback)((()=>{A()}),[A]),D=(0,r.useCallback)((e=>{T(e.target.value),e.target.value&&_(!0)}),[]),$=!!s&&/mac/i.test(navigator.userAgentData?.platform??navigator.platform);(0,r.useEffect)((()=>{if(!be.WW)return;const e=e=>{!($?e.metaKey:e.ctrlKey)||"k"!==e.key&&"K"!==e.key||(e.preventDefault(),f.current?.focus(),R())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[$,R]);const M=(0,r.useCallback)((()=>{const e=new URLSearchParams(p.search);e.delete(Be);const t=e.toString(),n=p.pathname+(""!=t?`?${t}`:"")+p.hash;n!=p.pathname+p.search+p.hash&&h.push(n),T(""),x.current?.autocomplete.setVal("")}),[p.pathname,p.search,p.hash,h]);return(0,u.jsxs)("div",{className:(0,ve.A)("navbar__search",De.searchBarContainer,{[De.searchIndexLoading]:y&&v,[De.focused]:O}),hidden:N,dir:"ltr",children:[(0,u.jsx)("input",{placeholder:(0,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),"aria-label":"Search",className:"navbar__search-input",onMouseEnter:P,onFocus:R,onBlur:L,onChange:D,ref:f,value:E}),(0,u.jsx)(je.A,{className:De.searchBarLoadingRing}),be.WW&&be.pk&&(""!==E?(0,u.jsx)("button",{className:De.searchClearButton,onClick:M,children:"\u2715"}):s&&(0,u.jsxs)("div",{className:De.searchHintContainer,children:[(0,u.jsx)("kbd",{className:De.searchHint,children:$?"\u2318":"ctrl"}),(0,u.jsx)("kbd",{className:De.searchHint,children:"K"})]}))]})},ze={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ve(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,s.A)(n,ze.navbarSearchContainer),children:t})}var Ke=n(26972);var We=n(53886);function Ge(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const qe={default:oe,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:s="",...i}=e;const{i18n:{currentLocale:o,locales:c,localeConfigs:d}}=(0,ce.A)(),h=(0,me.o)(),{search:p,hash:f}=(0,a.zy)(),m=[...n,...c.map((e=>{const n=`${`pathname://${h.createUrl({locale:e,fullyQualified:!1})}`}${p}${f}${s}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===o?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[o].label;return(0,u.jsx)(fe,{...i,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ge,{className:ye}),g]}),items:m})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(Ve,{className:n,children:(0,u.jsx)(He,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:i=!1}=e;const o=i?"li":"div";return(0,u.jsx)(o,{className:(0,s.A)({navbar__item:!r&&!i,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...s}=e;const{activeDoc:i}=(0,_e.zK)(r),o=(0,Ke.QB)(t,r),a=i?.path===o?.path;return null===o||o.unlisted&&!a?null:(0,u.jsx)(oe,{exact:!0,...s,isActive:()=>a||!!i?.sidebar&&i.sidebar===o.sidebar,label:n??o.id,to:o.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...s}=e;const{activeDoc:i}=(0,_e.zK)(r),o=(0,Ke.fW)(t,r).link;if(!o)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(oe,{exact:!0,...s,isActive:()=>i?.sidebar===t,label:n??o.label,to:o.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...s}=e;const i=(0,Ke.Vd)(r)[0],o=t??i.label,a=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return(0,u.jsx)(oe,{...s,label:o,to:a})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:s,dropdownItemsAfter:i,...o}=e;const{search:c,hash:d}=(0,a.zy)(),h=(0,_e.zK)(n),p=(0,_e.jh)(n),{savePreferredVersionName:f}=(0,We.g1)(n),m=[...s,...p.map((function(e){const t=Ge(e,h);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===h.activeVersion,onClick:()=>f(e.name)}})),...i],g=(0,Ke.Vd)(n)[0],y=t&&m.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&m.length>1?void 0:Ge(g,h).path;return m.length<=1?(0,u.jsx)(oe,{...o,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...o,mobile:t,label:y,to:b,items:m,isActive:r?()=>!1:void 0})}};function Ye(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),s=qe[r];if(!s)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(s,{...n})}function Qe(){const e=(0,O.M)(),t=(0,_.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Ye,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Je(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Xe(){const e=0===(0,_.p)().navbar.items.length,t=$();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Je,{onClick:()=>t.hide()}),t.content]})}function Ze(){const e=(0,O.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(M,{header:(0,u.jsx)(Q,{}),primaryMenu:(0,u.jsx)(Qe,{}),secondaryMenu:(0,u.jsx)(Xe,{})}):null}const et={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function tt(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,s.A)("navbar-sidebar__backdrop",e.className)})}function nt(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:i}}=(0,_.p)(),o=(0,O.M)(),{navbarRef:a,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),s=(0,r.useRef)(!1),i=(0,r.useRef)(0),o=(0,r.useCallback)((e=>{null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,C.Mq)(((t,r)=>{let{scrollY:o}=t;if(!e)return;if(o=a?n(!1):o+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return s.current=!0,void n(!1);n(!0)})),{navbarRef:o,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:a,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,s.A)("navbar","navbar--fixed-top",n&&[et.navbarHideable,!d&&et.navbarHidden],{"navbar--dark":"dark"===i,"navbar--primary":"primary"===i,"navbar-sidebar--show":o.shown}),children:[t,(0,u.jsx)(tt,{onClick:o.toggle}),(0,u.jsx)(Ze,{})]})}var rt=n(70440);const st={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function it(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function ot(e){let{error:t}=e;const n=(0,rt.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:st.errorBoundaryError,children:n})}class at extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const lt="right";function ct(e){let{width:t=30,height:n=30,className:r,...s}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...s,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function ut(){const{toggle:e,shown:t}=(0,O.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(ct,{})})}const dt={colorModeToggle:"colorModeToggle_DEke"};function ht(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(at,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Ye,{...e})},t)))})}function pt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function ft(){const e=(0,O.M)(),t=(0,_.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??lt)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),s=t.find((e=>"search"===e.type));return(0,u.jsx)(pt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(ut,{}),(0,u.jsx)(q,{}),(0,u.jsx)(ht,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ht,{items:r}),(0,u.jsx)(W,{className:dt.colorModeToggle}),!s&&(0,u.jsx)(Ve,{children:(0,u.jsx)(He,{})})]})})}function mt(){return(0,u.jsx)(nt,{children:(0,u.jsx)(ft,{})})}function gt(e){let{item:t}=e;const{to:n,href:r,label:s,prependBaseUrlToHref:i,...o}=t,a=(0,X.Ay)(n),l=(0,X.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(J.A,{className:"footer__link-item",...r?{href:i?l:r}:{to:a},...o,children:[s,r&&!(0,Z.A)(r)&&(0,u.jsx)(te.A,{})]})}function yt(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(gt,{item:t})},t.href??t.to)}function bt(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(yt,{item:e},t)))})]})}function vt(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(bt,{column:e},t)))})}function _t(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Et(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(gt,{item:t})}function Tt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(Et,{item:e}),t.length!==n+1&&(0,u.jsx)(_t,{})]},n)))})})}function xt(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(vt,{columns:t}):(0,u.jsx)(Tt,{links:t})}var wt=n(21122);const kt={footerLogoLink:"footerLogoLink_BH7S"};function St(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(wt.A,{className:(0,s.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function Nt(e){let{logo:t}=e;return t.href?(0,u.jsx)(J.A,{href:t.href,className:kt.footerLogoLink,target:t.target,children:(0,u.jsx)(St,{logo:t})}):(0,u.jsx)(St,{logo:t})}function At(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function Ot(e){let{style:t,links:n,logo:r,copyright:i}=e;return(0,u.jsx)("footer",{className:(0,s.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||i)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),i]})]})})}function Ct(){const{footer:e}=(0,_.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:s}=e;return(0,u.jsx)(Ot,{style:s,links:n&&n.length>0&&(0,u.jsx)(xt,{links:n}),logo:r&&(0,u.jsx)(Nt,{logo:r}),copyright:t&&(0,u.jsx)(At,{copyright:t})})}const It=r.memo(Ct),Rt=(0,I.fM)([j.a,E.o,C.Tv,We.VQ,o.Jx,function(e){let{children:t}=e;return(0,u.jsx)(R.y_,{children:(0,u.jsx)(O.e,{children:(0,u.jsx)(P,{children:t})})})}]);function Lt(e){let{children:t}=e;return(0,u.jsx)(Rt,{children:t})}var Pt=n(51107);function Dt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(Pt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(it,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(ot,{error:t})})]})})})}const $t={mainWrapper:"mainWrapper_z2l0"};function Mt(e){const{children:t,noFooter:n,wrapperClassName:r,title:a,description:l}=e;return(0,y.J)(),(0,u.jsxs)(Lt,{children:[(0,u.jsx)(o.be,{title:a,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(A,{}),(0,u.jsx)(mt,{}),(0,u.jsx)("div",{id:d,className:(0,s.A)(g.G.wrapper.main,$t.mainWrapper,r),children:(0,u.jsx)(i.A,{fallback:e=>(0,u.jsx)(Dt,{...e}),children:t})}),!n&&(0,u.jsx)(It,{})]})}},23465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(96540);var r=n(28774),s=n(86025),i=n(44586),o=n(6342),a=n(21122),l=n(74848);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const i={light:(0,s.Ay)(t.src),dark:(0,s.Ay)(t.srcDark||t.src)},o=(0,l.jsx)(a.A,{className:t.className,sources:i,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:o}):o}function u(e){const{siteConfig:{title:t}}=(0,i.A)(),{navbar:{title:n,logo:a}}=(0,o.p)(),{imageClassName:u,titleClassName:d,...h}=e,p=(0,s.Ay)(a?.href||"/"),f=n?"":t,m=a?.alt??f;return(0,l.jsxs)(r.A,{to:p,...h,...a?.target&&{target:a.target},children:[a&&(0,l.jsx)(c,{logo:a,alt:m,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(96540);var r=n(5260),s=n(74848);function i(e){let{locale:t,version:n,tag:i}=e;const o=t;return(0,s.jsxs)(r.A,{children:[t&&(0,s.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,s.jsx)("meta",{name:"docusaurus_version",content:n}),i&&(0,s.jsx)("meta",{name:"docusaurus_tag",content:i}),o&&(0,s.jsx)("meta",{name:"docsearch:language",content:o}),n&&(0,s.jsx)("meta",{name:"docsearch:version",content:n}),i&&(0,s.jsx)("meta",{name:"docsearch:docusaurus_tag",content:i})]})}},21122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96540),s=n(34164),i=n(92303),o=n(95293);const a={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(74848);function c(e){let{className:t,children:n}=e;const c=(0,i.A)(),{colorMode:u}=(0,o.G)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const i=n({theme:e,className:(0,s.A)(t,a.themedComponent,a[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:i},e)}))})}function u(e){const{sources:t,className:n,alt:r,...s}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:i}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:i,...s})}})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(96540),s=n(38193),i=n(205),o=n(53109),a=n(74848);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,s]=(0,r.useState)(t??!1),i=(0,r.useCallback)((()=>{s((e=>!e))}),[]);return{collapsed:n,setCollapsed:s,toggleCollapsed:i}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function h(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:s}=e;const i=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=s?.duration??function(e){if((0,o.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${s?.easing??l}`,height:`${t}px`}}function a(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!i.current)return h(e,n),void(i.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(a(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{a()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,s])}function f(e){if(!s.A.canUseDOM)return e?u:d}function m(e){let{as:t="div",collapsed:n,children:s,animation:i,onCollapseTransitionEnd:o,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return p({collapsibleRef:u,collapsed:n,animation:i}),(0,a.jsx)(t,{ref:u,style:c?void 0:f(n),onTransitionEnd:e=>{"height"===e.propertyName&&(h(u.current,n),o?.(n))},className:l,children:s})}function g(e){let{collapsed:t,...n}=e;const[s,o]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,i.A)((()=>{t||o(!0)}),[t]),(0,i.A)((()=>{s&&c(t)}),[s,t]),s?(0,a.jsx)(m,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:m;return(0,a.jsx)(r,{...n})}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>m,o:()=>f});var r=n(96540),s=n(92303),i=n(70679),o=n(89532),a=n(6342),l=n(74848);const c=(0,i.Wf)("docusaurus.announcement.dismiss"),u=(0,i.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),h=e=>c.set(String(e)),p=r.createContext(null);function f(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,a.p)(),t=(0,s.A)(),[n,i]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{i(d())}),[]);const o=(0,r.useCallback)((()=>{h(!0),i(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&h(!1),!r&&d()||i(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:o})),[e,n,o])}();return(0,l.jsx)(p.Provider,{value:n,children:t})}function m(){const e=(0,r.useContext)(p);if(!e)throw new o.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(96540),s=n(38193),i=n(89532),o=n(70679),a=n(6342),l=n(74848);const c=r.createContext(void 0),u="theme",d=(0,o.Wf)(u),h={light:"light",dark:"dark"},p=e=>e===h.dark?h.dark:h.light,f=e=>s.A.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),m=e=>{d.set(p(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,a.p)(),[s,i]=(0,r.useState)(f(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const o=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:s=!0}=r;t?(i(t),s&&m(t)):(i(n?window.matchMedia("(prefers-color-scheme: dark)").matches?h.dark:h.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(s))}),[s]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&o(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,o]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:o(null)};return e.addListener(r),()=>e.removeListener(r)}),[o,t,n]),(0,r.useMemo)((()=>({colorMode:s,setColorMode:o,get isDarkTheme(){return s===h.dark},setLightTheme(){o(h.light)},setDarkTheme(){o(h.dark)}})),[s,o])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new i.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>p,e:()=>h});var r=n(96540),s=n(75600),i=n(24581),o=n(57485),a=n(6342),l=n(89532),c=n(74848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,s.YL)(),{items:t}=(0,a.p)().navbar;return 0===t.length&&!e.component}(),t=(0,i.l)(),n=!e&&"mobile"===t,[l,c]=(0,r.useState)(!1);(0,o.$Z)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:l})),[e,n,u,l])}function h(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function p(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>a});var r=n(96540),s=n(89532),i=n(74848);const o=r.createContext(null);function a(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,i.jsx)(o.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(o);if(!e)throw new s.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new s.dV("NavbarSecondaryMenuContentProvider");const[,a]=i,l=(0,s.Be)(n);return(0,r.useEffect)((()=>{a({component:t,props:l})}),[a,t,l]),(0,r.useEffect)((()=>()=>a({component:null,props:null})),[a]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>s,J:()=>i});var r=n(96540);const s="navigation-with-keyboard";function i(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(s),"mousedown"===e.type&&document.body.classList.remove(s)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(s),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>a});var r=n(96540),s=n(38193);const i={desktop:"desktop",mobile:"mobile",ssr:"ssr"},o=996;function a(e){let{desktopBreakpoint:t=o}=void 0===e?{}:e;const[n,a]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){a(function(e){if(!s.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?i.desktop:i.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>o,aZ:()=>l});var r=n(96540),s=n(56347),i=n(89532);function o(e){!function(e){const t=(0,s.W6)(),n=(0,i._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function a(e){const t=(0,s.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function l(e){return a((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function s(e){return Array.from(new Set(e))}function i(e,t){const n={};let r=0;for(const s of e){const e=t(s,r);n[e]??=[],n[e].push(s),r+=1}return n}n.d(t,{$z:()=>i,XI:()=>r,sb:()=>s})},61213:(e,t,n)=>{"use strict";n.d(t,{e3:()=>h,be:()=>u,Jx:()=>p});var r=n(96540),s=n(34164),i=n(5260),o=n(36803),a=n(86025),l=n(44586);var c=n(74848);function u(e){let{title:t,description:n,keywords:r,image:s,children:o}=e;const u=function(e){const{siteConfig:t}=(0,l.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,a.hH)(),h=s?d(s,{absolute:!0}):void 0;return(0,c.jsxs)(i.A,{children:[t&&(0,c.jsx)("title",{children:u}),t&&(0,c.jsx)("meta",{property:"og:title",content:u}),n&&(0,c.jsx)("meta",{name:"description",content:n}),n&&(0,c.jsx)("meta",{property:"og:description",content:n}),r&&(0,c.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),h&&(0,c.jsx)("meta",{property:"og:image",content:h}),h&&(0,c.jsx)("meta",{name:"twitter:image",content:h}),o]})}const d=r.createContext(void 0);function h(e){let{className:t,children:n}=e;const o=r.useContext(d),a=(0,s.A)(o,t);return(0,c.jsxs)(d.Provider,{value:a,children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("html",{className:a})}),n]})}function p(e){let{children:t}=e;const n=(0,o.A)(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const i=`plugin-id-${n.plugin.id}`;return(0,c.jsx)(h,{className:(0,s.A)(r,i),children:t})}},89532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>a,_q:()=>o,dV:()=>l,fM:()=>u});var r=n(96540),s=n(205),i=n(74848);function o(e){const t=(0,r.useRef)(e);return(0,s.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function a(e){const t=(0,r.useRef)();return(0,s.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,i.jsx)(i.Fragment,{children:e.reduceRight(((e,t)=>(0,i.jsx)(t,{children:e})),n)})}}},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>a,ys:()=>o});var r=n(96540),s=n(35947),i=n(44586);function o(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function a(){const{baseUrl:e}=(0,i.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function s(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(s).flatMap((e=>e.routes??[])))}(n)}({routes:s.A,baseUrl:e})),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>u,a_:()=>f,gk:()=>m});var r=n(96540),s=n(38193),i=n(92303),o=n(205),a=n(89532),l=n(74848);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ScrollControllerProvider");return e}const h=()=>s.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),s=(0,r.useRef)(h()),i=(0,a._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=h();i(e,s.current),s.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[i,n,...t])}function f(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),s=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,o.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:s}}function m(){const e=(0,r.useRef)(null),t=(0,i.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const s=document.documentElement.scrollTop;(n&&s>e||!n&&st&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},70679:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const s=JSON.parse('{"N":"localStorage","M":""}'),i=s.N;function o(e){let{key:t,oldValue:n,newValue:r,storage:s}=e;if(n===r)return;const i=document.createEvent("StorageEvent");i.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,s),window.dispatchEvent(i)}function a(e){if(void 0===e&&(e=i),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${s.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const r=a(t?.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),o({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),o({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),s=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(s,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var r=n(44586),s=n(56347),i=n(70440);function o(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:o,currentLocale:a}}=(0,r.A)(),{pathname:l}=(0,s.zy)(),c=(0,i.Ks)(l,{trailingSlash:n,baseUrl:e}),u=a===o?e:e.replace(`/${a}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===o?`${u}`:`${u}${e}/`}(n)}${d}`}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>o});var r=n(96540),s=n(56347),i=n(89532);function o(e){const t=(0,s.zy)(),n=(0,i.ZC)(t),o=(0,i._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&o({location:t,previousLocation:n})}),[o,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>s});var r=n(44586);function s(){return(0,r.A)().siteConfig.themeConfig}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=s,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[o]=e.split(/[#?]/),a="/"===o||o===r?o:(l=o,c=n,c?s(l):i(l));var l,c;return e.replace(o,a)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=i;const r=n(42566);function s(e){return e.endsWith("/")?e:`${e}/`}function i(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=t.LU=void 0;const r=n(31635);t.LU="__blog-post-container";var s=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(s).default}});var i=n(42566);var o=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return o.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},2849:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(96540);var r=n(5391);const s={loadingRing:"loadingRing_RJI3","loading-ring":"loading-ring_FB5o"};var i=n(74848);function o(e){let{className:t}=e;return(0,i.jsxs)("div",{className:(0,r.A)(s.loadingRing,t),children:[(0,i.jsx)("div",{}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{})]})}},5891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(58291),s=n.n(r),i=n(11088);const o=new Map;function a(e,t){const n=`${e}${t}`;let r=o.get(n);return r||(r=async function(e,t){{const n=`${e}${i.IH.replace("{dir}",t?`-${t.replace(/\//g,"-")}`:"")}`;if(new URL(n,location.origin).origin!==location.origin)throw new Error("Unexpected version url");const r=await(await fetch(n)).json(),o=r.map(((e,t)=>{let{documents:n,index:r}=e;return{type:t,documents:n,index:s().Index.load(r)}})),a=r.reduce(((e,t)=>{for(const n of t.index.invertedIndex)/\p{Unified_Ideograph}/u.test(n[0][0])&&e.add(n[0]);return e}),new Set);return{wrappedIndexes:o,zhDictionary:Array.from(a)}}return{wrappedIndexes:[],zhDictionary:[]}}(e,t),o.set(n,r)),r}},32384:(e,t,n)=>{"use strict";n.d(t,{m:()=>h});var r=n(58291),s=n.n(r);const i=12,o=i/2;var a=n(11088);function l(e,t){const n=function(e,t){const n=e.map((e=>/\p{Unified_Ideograph}/u.test(e)?function(e,t){const n=[];return function e(r,s){let i=0,o=!1;for(const a of t)if(r.substr(0,a.length)===a){const t={missed:s.missed,term:s.term.concat({value:a})};r.length>a.length?e(r.substr(a.length),t):n.push(t),o=!0}else for(let t=a.length-1;t>i;t-=1){const l=a.substr(0,t);if(r.substr(0,t)===l){i=t;const a={missed:s.missed,term:s.term.concat({value:l,trailing:!0})};r.length>t?e(r.substr(t),a):n.push(a),o=!0;break}}o||(r.length>0?e(r.substr(1),{missed:s.missed+1,term:s.term}):s.term.length>0&&n.push(s))}(e,{missed:0,term:[]}),n.sort(((e,t)=>{const n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((e=>e.term))}(e,t):[{value:e}])).slice(0,i),r=n.filter((e=>e.length>1));let s=1,a=!1;for(const c of r)if(a)c.splice(1,c.length-1);else{c.length>o&&c.splice(o,c.length-o);const e=s*c.length;if(e>=i){if(e>i){const e=Math.floor(i/s);c.splice(e,c.length-e),s*=e}else s=e;s>o&&(a=!0)}else s=e}const l=[];return function e(t,r){if(t===n.length||r.length>=i)l.push(r.slice(0,i));else for(const s of n[t])e(t+1,r.concat(s))}(0,[]),l}(e,t);if(0===n.length)return[{tokens:e,term:e.map((e=>({value:e,presence:s().Query.presence.REQUIRED,wildcard:s().Query.wildcard.LEADING|s().Query.wildcard.TRAILING})))}];for(const s of n)s[s.length-1].maybeTyping=!0;const r=[];for(const i of a.BH)if("en"===i)a.sx||r.unshift(s().stopWordFilter);else{const e=s()[i];e.stopWordFilter&&r.unshift(e.stopWordFilter)}let l;if(r.length>0){const e=e=>r.reduce(((e,t)=>e.filter((e=>t(e.value)))),e);l=[];const t=[];for(const r of n){const n=e(r);l.push(n),n.length0&&t.push(n)}n.push(...t)}else l=n.slice();const u=[];for(const s of l)if(s.length>2)for(let e=s.length-1;e>=0;e-=1)u.push(s.slice(0,e).concat(s.slice(e+1)));return c(n).concat(c(u))}function c(e){return u(e).concat(u(e.filter((e=>{const t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function u(e,t){return e.map((e=>({tokens:e.map((e=>e.value)),term:e.map((e=>({value:e.value,presence:s().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?s().Query.wildcard.TRAILING:s().Query.wildcard.NONE})))})))}var d=n(69913);function h(e,t,n){return function(r,i){const o=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return s()[t[0]].tokenizer(e).map((e=>e.toString()));let n=/[^-\s]+/g;return t.includes("zh")&&(n=/\w+|\p{Unified_Ideograph}+/gu),e.toLowerCase().match(n)||[]}(r,a.BH);if(0===o.length)return void i([]);const c=l(o,t),u=[];e:for(const{term:t,tokens:s}of c)for(const{documents:r,index:i,type:o}of e)if(u.push(...i.query((e=>{for(const n of t)e.term(n.value,{wildcard:n.wildcard,presence:n.presence})})).slice(0,n).filter((e=>!u.some((t=>t.document.i.toString()===e.ref)))).slice(0,n-u.length).map((t=>{const n=r.find((e=>e.i.toString()===t.ref));return{document:n,type:o,page:o!==d.i.Title&&e[0].documents.find((e=>e.i===n.p)),metadata:t.matchData.metadata,tokens:s,score:t.score}}))),u.length>=n)break e;!function(e){e.forEach(((e,t)=>{e.index=t})),e.sort(((t,n)=>{let r=t.type!==d.i.Heading&&t.type!==d.i.Content&&t.type!==d.i.Description||!t.page?t.index:e.findIndex((e=>e.document===t.page)),s=n.type!==d.i.Heading&&n.type!==d.i.Content&&n.type!==d.i.Description||!n.page?n.index:e.findIndex((e=>e.document===n.page));if(-1===r&&(r=t.index),-1===s&&(s=n.index),r===s){const e=(0===n.type?1:0)-(0===t.type?1:0);return 0===e?t.index-n.index:e}return r-s}))}(u),function(e){e.forEach(((t,n)=>{n>0&&t.page&&e.slice(0,n).some((e=>(e.type===d.i.Keywords?e.page:e.document)===t.page))&&(n{"use strict";function r(e){return e.join(" \u203a ")}n.d(t,{$:()=>r})},53103:(e,t,n)=>{"use strict";function r(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{Z:()=>r})},27674:(e,t,n)=>{"use strict";function r(e,t){const n=[];for(const r of Object.values(e))r[t]&&n.push(...r[t].position);return n.sort(((e,t)=>e[0]-t[0]||t[1]-e[1]))}n.d(t,{g:()=>r})},86841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(53103);function s(e,t,n){const i=[];for(const o of t){const n=e.toLowerCase().indexOf(o);if(n>=0){n>0&&i.push(s(e.substr(0,n),t)),i.push(`${(0,r.Z)(e.substr(n,o.length))}`);const a=n+o.length;a${(0,r.Z)(e)}`:(0,r.Z)(e):i.join("")}},43810:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(53103),s=n(86841);const i=/\w+|\p{Unified_Ideograph}/u;function o(e){const t=[];let n=0,r=e;for(;r.length>0;){const s=r.match(i);if(!s){t.push(r);break}s.index>0&&t.push(r.substring(0,s.index)),t.push(s[0]),n+=s.index+s[0].length,r=e.substring(n)}return t}var a=n(11088);function l(e,t,n,i){void 0===i&&(i=a.rG);const{chunkIndex:l,chunks:c}=function(e,t,n){const i=[];let a=0,l=0,c=-1;for(;al){const t=o(e.substring(l,u)).map((e=>({html:(0,r.Z)(e),textLength:e.length})));for(const e of t)i.push(e)}-1===c&&(c=i.length),l=u+d,i.push({html:(0,s.Z)(e.substring(u,l),n,!0),textLength:d})}}if(l({html:(0,r.Z)(e),textLength:e.length})));for(const e of t)i.push(e)}return{chunkIndex:c,chunks:i}}(e,t,n),u=c.slice(0,l),d=c[l],h=[d.html],p=c.slice(l+1);let f=d.textLength,m=0,g=0,y=!1,b=!1;for(;f0){const e=u.pop();f+e.textLength<=i?(h.unshift(e.html),m+=e.textLength,f+=e.textLength):(y=!0,u.length=0)}else{if(!(p.length>0))break;{const e=p.shift();f+e.textLength<=i?(h.push(e.html),g+=e.textLength,f+=e.textLength):(b=!0,p.length=0)}}return(y||u.length>0)&&h.unshift("\u2026"),(b||p.length>0)&&h.push("\u2026"),h.join("")}},43385:(e,t,n)=>{"use strict";function r(e,t){if("string"==typeof e)return{label:e,path:e};{const{label:n,path:r}=e;return"string"==typeof n?{label:n,path:r}:Object.prototype.hasOwnProperty.call(n,t)?{label:n[t],path:r}:{label:r,path:r}}}n.d(t,{p:()=>r})},11088:(e,t,n)=>{"use strict";n.d(t,{CU:()=>i,UB:()=>p,tb:()=>c,O6:()=>g,I$:()=>f,BH:()=>r,sx:()=>s,ZG:()=>h,WW:()=>u,pk:()=>d,Hg:()=>m,IH:()=>o,rG:()=>l,AT:()=>a,dz:()=>y});n(58291);const r=["en"],s=!1,i=null,o="search-index{dir}.json?_=a349c1a2",a=8,l=50,c=!1,u=!0,d=!0,h="right",p=void 0,f=!0,m=null,g=!1,y=!1},69913:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>r}),function(e){e[e.Title=0]="Title",e[e.Heading=1]="Heading",e[e.Description=2]="Description",e[e.Keywords=3]="Keywords",e[e.Content=4]="Content"}(r||(r={}))},32017:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(s=r;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=r;0!=s--;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;0!=s--;){var o=i[s];if(!e(t[o],n[o]))return!1}return!0}return t!=t&&n!=n}},31513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>_,TM:()=>S,yJ:()=>p,sC:()=>A,AO:()=>h});var r=n(58168);function s(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,s=e.length;r=0;h--){var p=o[h];"."===p?i(o,h):".."===p?(i(o,h),d++):d&&(i(o,h),d--)}if(!c)for(;d--;d)o.unshift("..");!c||""===o[0]||o[0]&&s(o[0])||o.unshift("");var f=o.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};var a=n(11561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,s=t||"/";return n&&"?"!==n&&(s+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(s+="#"===r.charAt(0)?r:"#"+r),s}function p(e,t,n,s){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",s=t.indexOf("#");-1!==s&&(r=t.substr(s),t=t.substr(0,s));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),i.state=t):(void 0===(i=(0,r.A)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(a){throw a instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):a}return n&&(i.key=n),s?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=o(i.pathname,s.pathname)):i.pathname=s.pathname:i.pathname||(i.pathname="/"),i}function f(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,s){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,s):s(!0):s(!1!==i)}else s(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,s):n.push(s),d({action:r,location:s,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",s=p(e,t,m(),_.location);u.confirmTransitionTo(s,r,n,(function(e){e&&(_.entries[_.index]=s,d({action:r,location:s}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return _}},4146:(e,t,n)=>{"use strict";var r=n(44363),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?o:a[e.$$typeof]||s}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var s=p(n);s&&s!==f&&e(t,s,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var a=l(t),m=l(n),g=0;g{"use strict";e.exports=function(e,t,n,r,s,i,o,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,o,a],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},64634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},7106:e=>{"use strict";var t=e.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),n(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function n(e,r,s,i,o,a,l,c,u,d){if(i&&"object"==typeof i&&!Array.isArray(i)){for(var h in r(i,o,a,l,c,u,d),i){var p=i[h];if(Array.isArray(p)){if(h in t.arrayKeywords)for(var f=0;f{var r,s;!function(){var i,o,a,l,c,u,d,h,p,f,m,g,y,b,v,_,E,T,x,w,k,S,N,A,O,C,I,R,L,P,D=function(e){var t=new D.Builder;return t.pipeline.add(D.trimmer,D.stopWordFilter,D.stemmer),t.searchPipeline.add(D.stemmer),e.call(t,t),t.build()};D.version="2.3.9",D.utils={},D.utils.warn=(i=this,function(e){i.console&&console.warn&&console.warn(e)}),D.utils.asString=function(e){return null==e?"":e.toString()},D.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var l=D.utils.clone(t)||{};l.position=[o,a],l.index=s.length,s.push(new D.Token(n.slice(o,i),l))}o=i+1}}return s},D.tokenizer.separator=/[\s\-]+/,D.Pipeline=function(){this._stack=[]},D.Pipeline.registeredFunctions=Object.create(null),D.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&D.utils.warn("Overwriting existing registered function: "+t),e.label=t,D.Pipeline.registeredFunctions[e.label]=e},D.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||D.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},D.Pipeline.load=function(e){var t=new D.Pipeline;return e.forEach((function(e){var n=D.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},D.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){D.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},D.Pipeline.prototype.after=function(e,t){D.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)},D.Pipeline.prototype.before=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},D.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},D.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(ie&&(n=s),i!=e);)r=n-t,s=t+Math.floor(r/2),i=this.elements[2*s];return i==e||i>e?2*s:ia?c+=2:o==a&&(t+=n[l+1]*r[c+1],l+=2,c+=2);return t},D.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},D.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var i,o=s.str.charAt(0);o in s.node.edges?i=s.node.edges[o]:(i=new D.TokenSet,s.node.edges[o]=i),1==s.str.length&&(i.final=!0),r.push({node:i,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(0!=s.editsRemaining){if("*"in s.node.edges)var a=s.node.edges["*"];else{a=new D.TokenSet;s.node.edges["*"]=a}if(0==s.str.length&&(a.final=!0),r.push({node:a,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&r.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),1==s.str.length&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{l=new D.TokenSet;s.node.edges["*"]=l}1==s.str.length&&(l.final=!0),r.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var c,u=s.str.charAt(0),d=s.str.charAt(1);d in s.node.edges?c=s.node.edges[d]:(c=new D.TokenSet,s.node.edges[d]=c),1==s.str.length&&(c.final=!0),r.push({node:c,editsRemaining:s.editsRemaining-1,str:u+s.str.slice(2)})}}}return n},D.TokenSet.fromString=function(e){for(var t=new D.TokenSet,n=t,r=0,s=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},D.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},D.Index.prototype.search=function(e){return this.query((function(t){new D.QueryParser(e,t).parse()}))},D.Index.prototype.query=function(e){for(var t=new D.Query(this.fields),n=Object.create(null),r=Object.create(null),s=Object.create(null),i=Object.create(null),o=Object.create(null),a=0;a1?1:e},D.Builder.prototype.k1=function(e){this._k1=e},D.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var s=0;s=this.length)return D.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},D.QueryLexer.prototype.width=function(){return this.pos-this.start},D.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},D.QueryLexer.prototype.backup=function(){this.pos-=1},D.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=D.QueryLexer.EOS&&this.backup()},D.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(D.QueryLexer.TERM)),e.ignore(),e.more())return D.QueryLexer.lexText},D.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.EDIT_DISTANCE),D.QueryLexer.lexText},D.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.BOOST),D.QueryLexer.lexText},D.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(D.QueryLexer.TERM)},D.QueryLexer.termSeparator=D.tokenizer.separator,D.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==D.QueryLexer.EOS)return D.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return D.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if(t.match(D.QueryLexer.termSeparator))return D.QueryLexer.lexTerm}else e.escapeCharacter()}},D.QueryParser=function(e,t){this.lexer=new D.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},D.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=D.QueryParser.parseClause;e;)e=e(this);return this.query},D.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},D.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},D.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},D.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case D.QueryLexer.PRESENCE:return D.QueryParser.parsePresence;case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.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 D.QueryParseError(n,t.start,t.end)}},D.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=D.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=D.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new D.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new D.QueryParseError(n,t.start,t.end)}switch(r.type){case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new D.QueryParseError(n,r.start,r.end)}}},D.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(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var s=e.peekLexeme();if(null==s){r="expecting term, found nothing";throw new D.QueryParseError(r,t.start,t.end)}if(s.type===D.QueryLexer.TERM)return D.QueryParser.parseTerm;r="expecting term, found '"+s.type+"'";throw new D.QueryParseError(r,s.start,s.end)}},D.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 D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new D.QueryParseError(r,n.start,n.end)}else e.nextClause()}},D.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(null!=s)switch(s.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+s.type+"'";throw new D.QueryParseError(r,s.start,s.end)}else e.nextClause()}},D.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(null!=s)switch(s.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+s.type+"'";throw new D.QueryParseError(r,s.start,s.end)}else e.nextClause()}},void 0===(s="function"==typeof(r=function(){return D})?r.call(t,n,t,e):r)||(e.exports=s)}()},10119:(e,t,n)=>{"use strict";n.r(t)},51043:(e,t,n)=>{"use strict";n.r(t)},68170:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,s;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function s(e,t,n){return en?n:e}function i(e){return 100*(-1+e)}function o(e,t,n){var s;return(s="translate3d"===r.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+n,s}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=s(e,r.minimum,1),n.status=1===e?null:e;var i=n.render(!t),c=i.querySelector(r.barSelector),u=r.speed,d=r.easing;return i.offsetWidth,a((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,o(e,u,d)),1===e?(l(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout((function(){l(i,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*s(Math.random()*t,.1,.95)),t=s(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var s,o=t.querySelector(r.barSelector),a=e?"-100":i(n.status||0),c=document.querySelector(r.parent);return l(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),r.showSpinner||(s=t.querySelector(r.spinnerSelector))&&p(s),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,s=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);s--;)if((r=e[s]+i)in n)return r;return t}function s(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=s(t),e.style[t]=n}return function(e,t){var n,r,s=arguments;if(2==s.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,s[1],s[2])}}();function c(e,t){return("string"==typeof e?e:h(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=h(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=h(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function h(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(s="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=s)},35302:(e,t,n)=>{var r=n(64634);e.exports=f,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var s=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,l="",c=t&&t.delimiter||"/";null!=(n=s.exec(e));){var d=n[0],h=n[1],p=n.index;if(l+=e.slice(a,p),a=p+d.length,h)l+=h[1];else{var f=e[a],m=n[2],g=n[3],y=n[4],b=n[5],v=n[6],_=n[7];l&&(r.push(l),l="");var E=null!=m&&null!=f&&f!==m,T="+"===v||"*"===v,x="?"===v||"*"===v,w=m||c,k=y||b,S=m||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||i++,prefix:m||"",delimiter:w,optional:x,repeat:T,partial:E,asterisk:!!_,pattern:k?u(k):_?".*":o(w,S)})}}return a-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),s=0;s{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,o=0;o{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},5651:()=>{!function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),r||"")}function r(e,t){for(var n=0;n>/g,(function(){return"(?:"+e+")"}));return e.replace(/<>/g,"[^\\s\\S]")}var s="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",a="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=l(i),u=RegExp(l(s+" "+i+" "+o+" "+a)),d=l(i+" "+o+" "+a),h=l(s+" "+i+" "+a),p=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),f=r(/\((?:[^()]|<>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,g=t(/<<0>>(?:\s*<<1>>)?/.source,[m,p]),y=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,g]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[y,b]),_=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,f,b]),E=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[_]),T=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[E,y,b]),x={keyword:u,punctuation:/[<>()?,.:[\]]/},w=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,k=/"(?:\\.|[^\\"\r\n])*"/.source,S=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[k]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[y]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,T]),lookbehind:!0,inside:x},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,g]),lookbehind:!0,inside:x},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[y]),lookbehind:!0,inside:x},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:x},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[T,h,m]),inside:x}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[f]),lookbehind:!0,alias:"class-name",inside:x},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[T,y]),inside:x,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[T]),lookbehind:!0,inside:x,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,p]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(p),alias:"class-name",inside:x}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,g,m,T,u.source,f,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[g,f]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(T),greedy:!0,inside:x},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var N=k+"|"+w,A=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[N]),O=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[A]),2),C=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[y,O]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[C,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[C]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[O]),inside:e.languages.csharp},"class-name":{pattern:RegExp(y),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var R=/:[^}\r\n]+/.source,L=r(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[A]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,R]),D=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[N]),2),$=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[D,R]);function M(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,R]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:M(P,L)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[$]),lookbehind:!0,greedy:!0,inside:M($,D)}],char:{pattern:RegExp(w),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)},96976:()=>{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},72514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},95357:(e,t,n)=>{var r={"./prism-bash":57022,"./prism-clike":75624,"./prism-csharp":5651,"./prism-java":96976,"./prism-json":72514};function s(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=i,e.exports=s,s.id=95357},2694:(e,t,n)=>{"use strict";var r=n(6925);function s(){}function i(){}i.resetWarningCache=s,e.exports=function(){function e(e,t,n,s,i,o){if(o!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:s};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},22551:(e,t,n)=>{"use strict";var r=n(96540),s=n(69982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n