diff --git a/404.html b/404.html index e336ea2..e2e048c 100644 --- a/404.html +++ b/404.html @@ -6,13 +6,13 @@ Page Not Found | Ransack documentation - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/assets/js/8c747907.46cd5056.js b/assets/js/8c747907.adfba67b.js similarity index 83% rename from assets/js/8c747907.46cd5056.js rename to assets/js/8c747907.adfba67b.js index c0b570c..260d868 100644 --- a/assets/js/8c747907.46cd5056.js +++ b/assets/js/8c747907.adfba67b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[2364],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=a.createContext({}),c=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=c(e.components);return a.createElement(l.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(t),m=r,h=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?a.createElement(h,o(o({ref:n},u),{},{components:t})):a.createElement(h,o({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=d;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var c=2;cPG::UndefinedFunction: ERROR: could not identify an equality operator for type json",id:"pgundefinedfunction-error-could-not-identify-an-equality-operator-for-type-json",level:4},{value:"Authorization (allowlisting/denylisting)",id:"authorization-allowlistingdenylisting",level:3},{value:"Handling unknown predicates or attributes",id:"handling-unknown-predicates-or-attributes",level:3},{value:"Using Scopes/Class Methods",id:"using-scopesclass-methods",level:3},{value:"Grouping queries by OR instead of AND",id:"grouping-queries-by-or-instead-of-and",level:3},{value:"Using SimpleForm",id:"using-simpleform",level:3}],d={toc:p};function m(e){var n=e.components,t=(0,r.Z)(e,o);return(0,i.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h3",{id:"ransack-aliases"},"Ransack Aliases"),(0,i.kt)("p",null,"You can customize the attribute names for your Ransack searches by using a\n",(0,i.kt)("inlineCode",{parentName:"p"},"ransack_alias"),". This is particularly useful for long attribute names that are\nnecessary when querying associations or multiple columns."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Post < ActiveRecord::Base\n belongs_to :author\n\n # Abbreviate :author_first_name_or_author_last_name to :author\n ransack_alias :author, :author_first_name_or_author_last_name\nend\n")),(0,i.kt)("p",null,"Now, rather than using ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name_or_author_last_name_cont")," in your\nform, you can simply use ",(0,i.kt)("inlineCode",{parentName:"p"},":author_cont"),". This serves to produce more expressive\nquery parameters in your URLs."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-erb"},"<%= search_form_for @q do |f| %>\n <%= f.label :author_cont %>\n <%= f.search_field :author_cont %>\n<% end %>\n")),(0,i.kt)("p",null,"You can also use ",(0,i.kt)("inlineCode",{parentName:"p"},"ransack_alias")," for sorting."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Post < ActiveRecord::Base\n belongs_to :author\n\n # Abbreviate :author_first_name to :author\n ransack_alias :author, :author_first_name\nend\n")),(0,i.kt)("p",null,"Now, you can use ",(0,i.kt)("inlineCode",{parentName:"p"},":author")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name")," in a ",(0,i.kt)("inlineCode",{parentName:"p"},"sort_link"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-erb"},"<%= sort_link(@q, :author) %>\n")),(0,i.kt)("p",null,"Note that using ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name_or_author_last_name_cont")," would produce an invalid sql query. In those cases, Ransack ignores the sorting clause."),(0,i.kt)("h3",{id:"problem-with-distinct-selects"},"Problem with DISTINCT selects"),(0,i.kt)("p",null,"If passed ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"result")," will generate a ",(0,i.kt)("inlineCode",{parentName:"p"},"SELECT DISTINCT")," to\navoid returning duplicate rows, even if conditions on a join would otherwise\nresult in some. It generates the same SQL as calling ",(0,i.kt)("inlineCode",{parentName:"p"},"uniq")," on the relation."),(0,i.kt)("p",null,"Please note that for many databases, a sort on an associated table's columns\nmay result in invalid SQL with ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true")," -- in those cases, you\nwill need to modify the result as needed to allow these queries to work."),(0,i.kt)("p",null,"For example, you could call joins and includes on the result which has the\neffect of adding those tables columns to the select statement, overcoming\nthe issue, like so:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result(distinct: true)\n .includes(:articles)\n .joins(:articles)\n .page(params[:page])\nend\n")),(0,i.kt)("p",null,"If the above doesn't help, you can also use ActiveRecord's ",(0,i.kt)("inlineCode",{parentName:"p"},"select")," query\nto explicitly add the columns you need, which brute force's adding the\ncolumns you need that your SQL engine is complaining about, you need to\nmake sure you give all of the columns you care about, for example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result(distinct: true)\n .select('people.*, articles.name, articles.description')\n .page(params[:page])\nend\n")),(0,i.kt)("p",null,"Another method to approach this when using Postgresql is to use ActiveRecords's ",(0,i.kt)("inlineCode",{parentName:"p"},".includes")," in combination with ",(0,i.kt)("inlineCode",{parentName:"p"},".group")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true"),"."),(0,i.kt)("p",null,"For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result\n .group('persons.id')\n .includes(:articles)\n .page(params[:page])\nend\n\n")),(0,i.kt)("p",null,"A final way of last resort is to call ",(0,i.kt)("inlineCode",{parentName:"p"},"to_a.uniq")," on the collection at the end\nwith the caveat that the de-duping is taking place in Ruby instead of in SQL,\nwhich is potentially slower and uses more memory, and that it may display\nawkwardly with pagination if the number of results is greater than the page size."),(0,i.kt)("p",null,"For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result.includes(:articles).page(params[:page]).to_a.uniq\nend\n")),(0,i.kt)("h4",{id:"pgundefinedfunction-error-could-not-identify-an-equality-operator-for-type-json"},(0,i.kt)("inlineCode",{parentName:"h4"},"PG::UndefinedFunction: ERROR: could not identify an equality operator for type json")),(0,i.kt)("p",null,"If you get the above error while using ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true")," that means that\none of the columns that Ransack is selecting is a ",(0,i.kt)("inlineCode",{parentName:"p"},"json")," column.\nPostgreSQL does not provide comparison operators for the ",(0,i.kt)("inlineCode",{parentName:"p"},"json")," type. While\nit is possible to work around this, in practice it's much better to convert those\nto ",(0,i.kt)("inlineCode",{parentName:"p"},"jsonb"),", as ",(0,i.kt)("a",{parentName:"p",href:"https://www.postgresql.org/docs/9.6/static/datatype-json.html"},"recommended by the PostgreSQL documentation"),"."),(0,i.kt)("h3",{id:"authorization-allowlistingdenylisting"},"Authorization (allowlisting/denylisting)"),(0,i.kt)("p",null,"By default, searching and sorting are authorized on any column of your model\nand no class methods/scopes are whitelisted."),(0,i.kt)("p",null,"Ransack adds four methods to ",(0,i.kt)("inlineCode",{parentName:"p"},"ActiveRecord::Base")," that you can redefine as\nclass methods in your models to apply selective authorization:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_attributes")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_associations")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_scopes")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransortable_attributes"))),(0,i.kt)("p",null,"Here is how these four methods are implemented in Ransack:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"}," # `ransackable_attributes` by default returns all column names\n # and any defined ransackers as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransackable_attributes(auth_object = nil)\n column_names + _ransackers.keys\n end\n\n # `ransackable_associations` by default returns the names\n # of all associations as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransackable_associations(auth_object = nil)\n reflect_on_all_associations.map { |a| a.name.to_s }\n end\n\n # `ransortable_attributes` by default returns the names\n # of all attributes available for sorting as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransortable_attributes(auth_object = nil)\n ransackable_attributes(auth_object)\n end\n\n # `ransackable_scopes` by default returns an empty array\n # i.e. no class methods/scopes are authorized.\n # For overriding with a whitelist array of *symbols*.\n #\n def ransackable_scopes(auth_object = nil)\n []\n end\n")),(0,i.kt)("p",null,"Any values not returned from these methods will be ignored by Ransack, i.e.\nthey are not authorized."),(0,i.kt)("p",null,"All four methods can receive a single optional parameter, ",(0,i.kt)("inlineCode",{parentName:"p"},"auth_object"),". When\nyou call the search or ransack method on your model, you can provide a value\nfor an ",(0,i.kt)("inlineCode",{parentName:"p"},"auth_object")," key in the options hash which can be used by your own\noverridden methods."),(0,i.kt)("p",null,"Here is an example that puts all this together, adapted from\n",(0,i.kt)("a",{parentName:"p",href:"http://erniemiller.org/2012/05/11/why-your-ruby-class-macros-might-suck-mine-did/"},"this blog post by Ernie Miller"),".\nIn an ",(0,i.kt)("inlineCode",{parentName:"p"},"Article")," model, add the following ",(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_attributes")," class method\n(preferably private):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Article < ActiveRecord::Base\n def self.ransackable_attributes(auth_object = nil)\n if auth_object == :admin\n # whitelist all attributes for admin\n super\n else\n # whitelist only the title and body attributes for other users\n super & %w(title body)\n end\n end\n\n private_class_method :ransackable_attributes\nend\n")),(0,i.kt)("p",null,"Here is example code for the ",(0,i.kt)("inlineCode",{parentName:"p"},"articles_controller"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class ArticlesController < ApplicationController\n def index\n @q = Article.ransack(params[:q], auth_object: set_ransack_auth_object)\n @articles = @q.result\n end\n\n private\n\n def set_ransack_auth_object\n current_user.admin? ? :admin : nil\n end\nend\n")),(0,i.kt)("p",null,"Trying it out in ",(0,i.kt)("inlineCode",{parentName:"p"},"rails console"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'> Article\n=> Article(id: integer, person_id: integer, title: string, body: text)\n\n> Article.ransackable_attributes\n=> ["title", "body"]\n\n> Article.ransackable_attributes(:admin)\n=> ["id", "person_id", "title", "body"]\n\n> Article.ransack(id_eq: 1).result.to_sql\n=> SELECT "articles".* FROM "articles" # Note that search param was ignored!\n\n> Article.ransack({ id_eq: 1 }, { auth_object: nil }).result.to_sql\n=> SELECT "articles".* FROM "articles" # Search param still ignored!\n\n> Article.ransack({ id_eq: 1 }, { auth_object: :admin }).result.to_sql\n=> SELECT "articles".* FROM "articles" WHERE "articles"."id" = 1\n')),(0,i.kt)("p",null,"That's it! Now you know how to whitelist/blacklist various elements in Ransack."),(0,i.kt)("h3",{id:"handling-unknown-predicates-or-attributes"},"Handling unknown predicates or attributes"),(0,i.kt)("p",null,"By default, Ransack will ignore any unknown predicates or attributes:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'Article.ransack(unknown_attr_eq: \'Ernie\').result.to_sql\n=> SELECT "articles".* FROM "articles"\n')),(0,i.kt)("p",null,"Ransack may be configured to raise an error if passed an unknown predicate or\nattributes, by setting the ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_unknown_conditions")," option to ",(0,i.kt)("inlineCode",{parentName:"p"},"false")," in your\nRansack initializer file at ",(0,i.kt)("inlineCode",{parentName:"p"},"config/initializers/ransack.rb"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Ransack.configure do |c|\n # Raise errors if a query contains an unknown predicate or attribute.\n # Default is true (do not raise error on unknown conditions).\n c.ignore_unknown_conditions = false\nend\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Article.ransack(unknown_attr_eq: 'Ernie')\n# ArgumentError (Invalid search term unknown_attr_eq)\n")),(0,i.kt)("p",null,"As an alternative to setting a global configuration option, the ",(0,i.kt)("inlineCode",{parentName:"p"},".ransack!"),"\nclass method also raises an error if passed an unknown condition:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Article.ransack!(unknown_attr_eq: 'Ernie')\n# ArgumentError: Invalid search term unknown_attr_eq\n")),(0,i.kt)("p",null,"This is equivalent to the ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_unknown_conditions")," configuration option,\nexcept it may be applied on a case-by-case basis."),(0,i.kt)("h3",{id:"using-scopesclass-methods"},"Using Scopes/Class Methods"),(0,i.kt)("p",null,"Continuing on from the preceding section, searching by scopes requires defining\na whitelist of ",(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_scopes")," on the model class. The whitelist should be\nan array of ",(0,i.kt)("em",{parentName:"p"},"symbols"),". By default, all class methods (e.g. scopes) are ignored.\nScopes will be applied for matching ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," values, or for given values if the\nscope accepts a value:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Employee < ActiveRecord::Base\n scope :activated, ->(boolean = true) { where(active: boolean) }\n scope :salary_gt, ->(amount) { where('salary > ?', amount) }\n\n # Scopes are just syntactical sugar for class methods, which may also be used:\n\n def self.hired_since(date)\n where('start_date >= ?', date)\n end\n\n def self.ransackable_scopes(auth_object = nil)\n if auth_object.try(:admin?)\n # allow admin users access to all three methods\n %i(activated hired_since salary_gt)\n else\n # allow other users to search on `activated` and `hired_since` only\n %i(activated hired_since)\n end\n end\nend\n\nEmployee.ransack({ activated: true, hired_since: '2013-01-01' })\n\nEmployee.ransack({ salary_gt: 100_000 }, { auth_object: current_user })\n")),(0,i.kt)("p",null,"In Rails 3 and 4, if the ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," value is being passed via url params or some\nother mechanism that will convert it to a string, the true value may not be\npassed to the ransackable scope unless you wrap it in an array\n(i.e. ",(0,i.kt)("inlineCode",{parentName:"p"},"activated: ['true']"),"). Ransack will take care of changing 'true' into a\nboolean. This is currently resolved in Rails 5 \ud83d\ude03"),(0,i.kt)("p",null,"However, perhaps you have ",(0,i.kt)("inlineCode",{parentName:"p"},"user_id: [1]")," and you do not want Ransack to convert\n1 into a boolean. (Values sanitized to booleans can be found in the\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/constants.rb#L28"},"constants.rb"),").\nTo turn this off globally, and handle type conversions yourself, set\n",(0,i.kt)("inlineCode",{parentName:"p"},"sanitize_custom_scope_booleans")," to false in an initializer file like\nconfig/initializers/ransack.rb:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Ransack.configure do |c|\n c.sanitize_custom_scope_booleans = false\nend\n")),(0,i.kt)("p",null,"To turn this off on a per-scope basis Ransack adds the following method to\n",(0,i.kt)("inlineCode",{parentName:"p"},"ActiveRecord::Base")," that you can redefine to selectively override sanitization:"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_scopes_skip_sanitize_args")),(0,i.kt)("p",null,"Add the scope you wish to bypass this behavior to ransackable_scopes_skip_sanitize_args:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def self.ransackable_scopes_skip_sanitize_args\n [:scope_to_skip_sanitize_args]\nend\n")),(0,i.kt)("p",null,"Scopes are a recent addition to Ransack and currently have a few caveats:\nFirst, a scope involving child associations needs to be defined in the parent\ntable model, not in the child model. Second, scopes with an array as an\nargument are not easily usable yet, because the array currently needs to be\nwrapped in an array to function (see\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/activerecord-hackery/ransack/issues/404"},"this issue"),"),\nwhich is not compatible with Ransack form helpers. For this use case, it may be\nbetter for now to use ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/activerecord-hackery/ransack/wiki/Using-Ransackers"},"ransackers")," instead,\nwhere feasible. Pull requests with solutions and tests are welcome!"),(0,i.kt)("h3",{id:"grouping-queries-by-or-instead-of-and"},"Grouping queries by OR instead of AND"),(0,i.kt)("p",null,"The default ",(0,i.kt)("inlineCode",{parentName:"p"},"AND")," grouping can be changed to ",(0,i.kt)("inlineCode",{parentName:"p"},"OR")," by adding ",(0,i.kt)("inlineCode",{parentName:"p"},"m: 'or'")," to the\nquery hash."),(0,i.kt)("p",null,"You can easily try it in your controller code by changing ",(0,i.kt)("inlineCode",{parentName:"p"},"params[:q]")," in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"index")," action to ",(0,i.kt)("inlineCode",{parentName:"p"},"params[:q].try(:merge, m: 'or')")," as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Artist.ransack(params[:q].try(:merge, m: 'or'))\n @artists = @q.result\nend\n")),(0,i.kt)("p",null,"Normally, if you wanted users to be able to toggle between ",(0,i.kt)("inlineCode",{parentName:"p"},"AND")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"OR"),"\nquery grouping, you would probably set up your search form so that ",(0,i.kt)("inlineCode",{parentName:"p"},"m")," was in\nthe URL params hash, but here we assigned ",(0,i.kt)("inlineCode",{parentName:"p"},"m")," manually just to try it out\nquickly."),(0,i.kt)("p",null,"Alternatively, trying it in the Rails console:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'artists = Artist.ransack(name_cont: \'foo\', style_cont: \'bar\', m: \'or\')\n=> Ransack::Search,\n Condition \n ], combinator: or>>\n\nartists.result.to_sql\n=> "SELECT \\"artists\\".* FROM \\"artists\\"\n WHERE ((\\"artists\\".\\"name\\" ILIKE \'%foo%\'\n OR \\"artists\\".\\"style\\" ILIKE \'%bar%\'))"\n')),(0,i.kt)("p",null,"The combinator becomes ",(0,i.kt)("inlineCode",{parentName:"p"},"or")," instead of the default ",(0,i.kt)("inlineCode",{parentName:"p"},"and"),", and the SQL query\nbecomes ",(0,i.kt)("inlineCode",{parentName:"p"},"WHERE...OR")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"WHERE...AND"),"."),(0,i.kt)("p",null,"This works with associations as well. Imagine an Artist model that has many\nMemberships, and many Musicians through Memberships:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'artists = Artist.ransack(name_cont: \'foo\', musicians_email_cont: \'bar\', m: \'or\')\n=> Ransack::Search,\n Condition \n ], combinator: or>>\n\nartists.result.to_sql\n=> "SELECT \\"artists\\".* FROM \\"artists\\"\n LEFT OUTER JOIN \\"memberships\\"\n ON \\"memberships\\".\\"artist_id\\" = \\"artists\\".\\"id\\"\n LEFT OUTER JOIN \\"musicians\\"\n ON \\"musicians\\".\\"id\\" = \\"memberships\\".\\"musician_id\\"\n WHERE ((\\"artists\\".\\"name\\" ILIKE \'%foo%\'\n OR \\"musicians\\".\\"email\\" ILIKE \'%bar%\'))"\n')),(0,i.kt)("h3",{id:"using-simpleform"},"Using SimpleForm"),(0,i.kt)("p",null,"If you would like to combine the Ransack and SimpleForm form builders, set the\n",(0,i.kt)("inlineCode",{parentName:"p"},"RANSACK_FORM_BUILDER")," environment variable before Rails boots up, e.g. in\n",(0,i.kt)("inlineCode",{parentName:"p"},"config/application.rb")," before ",(0,i.kt)("inlineCode",{parentName:"p"},"require 'rails/all'")," as shown below (and add\n",(0,i.kt)("inlineCode",{parentName:"p"},"gem 'simple_form'")," in your Gemfile)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"require File.expand_path('../boot', __FILE__)\nENV['RANSACK_FORM_BUILDER'] = '::SimpleForm::FormBuilder'\nrequire 'rails/all'\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[2364],{3905:function(e,n,t){t.d(n,{Zo:function(){return u},kt:function(){return m}});var a=t(7294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function o(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l=a.createContext({}),c=function(e){var n=a.useContext(l),t=n;return e&&(t="function"==typeof e?e(n):o(o({},n),e)),t},u=function(e){var n=c(e.components);return a.createElement(l.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},d=a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(t),m=r,h=d["".concat(l,".").concat(m)]||d[m]||p[m]||i;return t?a.createElement(h,o(o({ref:n},u),{},{components:t})):a.createElement(h,o({ref:n},u))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,o=new Array(i);o[0]=d;var s={};for(var l in n)hasOwnProperty.call(n,l)&&(s[l]=n[l]);s.originalType=e,s.mdxType="string"==typeof e?e:r,o[1]=s;for(var c=2;cPG::UndefinedFunction: ERROR: could not identify an equality operator for type json",id:"pgundefinedfunction-error-could-not-identify-an-equality-operator-for-type-json",level:4},{value:"Authorization (allowlisting/denylisting)",id:"authorization-allowlistingdenylisting",level:3},{value:"Handling unknown predicates or attributes",id:"handling-unknown-predicates-or-attributes",level:3},{value:"Using Scopes/Class Methods",id:"using-scopesclass-methods",level:3},{value:"Grouping queries by OR instead of AND",id:"grouping-queries-by-or-instead-of-and",level:3},{value:"Using SimpleForm",id:"using-simpleform",level:3}],d={toc:p};function m(e){var n=e.components,t=(0,r.Z)(e,o);return(0,i.kt)("wrapper",(0,a.Z)({},d,t,{components:n,mdxType:"MDXLayout"}),(0,i.kt)("h3",{id:"ransack-aliases"},"Ransack Aliases"),(0,i.kt)("p",null,"You can customize the attribute names for your Ransack searches by using a\n",(0,i.kt)("inlineCode",{parentName:"p"},"ransack_alias"),". This is particularly useful for long attribute names that are\nnecessary when querying associations or multiple columns."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Post < ActiveRecord::Base\n belongs_to :author\n\n # Abbreviate :author_first_name_or_author_last_name to :author\n ransack_alias :author, :author_first_name_or_author_last_name\nend\n")),(0,i.kt)("p",null,"Now, rather than using ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name_or_author_last_name_cont")," in your\nform, you can simply use ",(0,i.kt)("inlineCode",{parentName:"p"},":author_cont"),". This serves to produce more expressive\nquery parameters in your URLs."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-erb"},"<%= search_form_for @q do |f| %>\n <%= f.label :author_cont %>\n <%= f.search_field :author_cont %>\n<% end %>\n")),(0,i.kt)("p",null,"You can also use ",(0,i.kt)("inlineCode",{parentName:"p"},"ransack_alias")," for sorting."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Post < ActiveRecord::Base\n belongs_to :author\n\n # Abbreviate :author_first_name to :author\n ransack_alias :author, :author_first_name\nend\n")),(0,i.kt)("p",null,"Now, you can use ",(0,i.kt)("inlineCode",{parentName:"p"},":author")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name")," in a ",(0,i.kt)("inlineCode",{parentName:"p"},"sort_link"),"."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-erb"},"<%= sort_link(@q, :author) %>\n")),(0,i.kt)("p",null,"Note that using ",(0,i.kt)("inlineCode",{parentName:"p"},":author_first_name_or_author_last_name_cont")," would produce an invalid sql query. In those cases, Ransack ignores the sorting clause."),(0,i.kt)("h3",{id:"problem-with-distinct-selects"},"Problem with DISTINCT selects"),(0,i.kt)("p",null,"If passed ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"result")," will generate a ",(0,i.kt)("inlineCode",{parentName:"p"},"SELECT DISTINCT")," to\navoid returning duplicate rows, even if conditions on a join would otherwise\nresult in some. It generates the same SQL as calling ",(0,i.kt)("inlineCode",{parentName:"p"},"uniq")," on the relation."),(0,i.kt)("p",null,"Please note that for many databases, a sort on an associated table's columns\nmay result in invalid SQL with ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true")," -- in those cases, you\nwill need to modify the result as needed to allow these queries to work."),(0,i.kt)("p",null,"For example, you could call joins and includes on the result which has the\neffect of adding those tables columns to the select statement, overcoming\nthe issue, like so:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result(distinct: true)\n .includes(:articles)\n .joins(:articles)\n .page(params[:page])\nend\n")),(0,i.kt)("p",null,"If the above doesn't help, you can also use ActiveRecord's ",(0,i.kt)("inlineCode",{parentName:"p"},"select")," query\nto explicitly add the columns you need, which brute force's adding the\ncolumns you need that your SQL engine is complaining about, you need to\nmake sure you give all of the columns you care about, for example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result(distinct: true)\n .select('people.*, articles.name, articles.description')\n .page(params[:page])\nend\n")),(0,i.kt)("p",null,"Another method to approach this when using Postgresql is to use ActiveRecords's ",(0,i.kt)("inlineCode",{parentName:"p"},".includes")," in combination with ",(0,i.kt)("inlineCode",{parentName:"p"},".group")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true"),"."),(0,i.kt)("p",null,"For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result\n .group('persons.id')\n .includes(:articles)\n .page(params[:page])\nend\n\n")),(0,i.kt)("p",null,"A final way of last resort is to call ",(0,i.kt)("inlineCode",{parentName:"p"},"to_a.uniq")," on the collection at the end\nwith the caveat that the de-duping is taking place in Ruby instead of in SQL,\nwhich is potentially slower and uses more memory, and that it may display\nawkwardly with pagination if the number of results is greater than the page size."),(0,i.kt)("p",null,"For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Person.ransack(params[:q])\n @people = @q.result.includes(:articles).page(params[:page]).to_a.uniq\nend\n")),(0,i.kt)("h4",{id:"pgundefinedfunction-error-could-not-identify-an-equality-operator-for-type-json"},(0,i.kt)("inlineCode",{parentName:"h4"},"PG::UndefinedFunction: ERROR: could not identify an equality operator for type json")),(0,i.kt)("p",null,"If you get the above error while using ",(0,i.kt)("inlineCode",{parentName:"p"},"distinct: true")," that means that\none of the columns that Ransack is selecting is a ",(0,i.kt)("inlineCode",{parentName:"p"},"json")," column.\nPostgreSQL does not provide comparison operators for the ",(0,i.kt)("inlineCode",{parentName:"p"},"json")," type. While\nit is possible to work around this, in practice it's much better to convert those\nto ",(0,i.kt)("inlineCode",{parentName:"p"},"jsonb"),", as ",(0,i.kt)("a",{parentName:"p",href:"https://www.postgresql.org/docs/9.6/static/datatype-json.html"},"recommended by the PostgreSQL documentation"),"."),(0,i.kt)("h3",{id:"authorization-allowlistingdenylisting"},"Authorization (allowlisting/denylisting)"),(0,i.kt)("p",null,"By default, searching and sorting are authorized on any column of your model\nand no class methods/scopes are whitelisted."),(0,i.kt)("p",null,"Ransack adds four methods to ",(0,i.kt)("inlineCode",{parentName:"p"},"ActiveRecord::Base")," that you can redefine as\nclass methods in your models to apply selective authorization:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_attributes")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_associations")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransackable_scopes")),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("inlineCode",{parentName:"li"},"ransortable_attributes"))),(0,i.kt)("p",null,"Here is how these four methods are implemented in Ransack:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"}," # `ransackable_attributes` by default returns all column names\n # and any defined ransackers as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransackable_attributes(auth_object = nil)\n column_names + _ransackers.keys\n end\n\n # `ransackable_associations` by default returns the names\n # of all associations as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransackable_associations(auth_object = nil)\n reflect_on_all_associations.map { |a| a.name.to_s }\n end\n\n # `ransortable_attributes` by default returns the names\n # of all attributes available for sorting as an array of strings.\n # For overriding with a whitelist array of strings.\n #\n def ransortable_attributes(auth_object = nil)\n ransackable_attributes(auth_object)\n end\n\n # `ransackable_scopes` by default returns an empty array\n # i.e. no class methods/scopes are authorized.\n # For overriding with a whitelist array of *symbols*.\n #\n def ransackable_scopes(auth_object = nil)\n []\n end\n")),(0,i.kt)("p",null,"Any values not returned from these methods will be ignored by Ransack, i.e.\nthey are not authorized."),(0,i.kt)("p",null,"All four methods can receive a single optional parameter, ",(0,i.kt)("inlineCode",{parentName:"p"},"auth_object"),". When\nyou call the search or ransack method on your model, you can provide a value\nfor an ",(0,i.kt)("inlineCode",{parentName:"p"},"auth_object")," key in the options hash which can be used by your own\noverridden methods."),(0,i.kt)("p",null,"Here is an example that puts all this together, adapted from\n",(0,i.kt)("a",{parentName:"p",href:"http://erniemiller.org/2012/05/11/why-your-ruby-class-macros-might-suck-mine-did/"},"this blog post by Ernie Miller"),".\nIn an ",(0,i.kt)("inlineCode",{parentName:"p"},"Article")," model, add the following ",(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_attributes")," class method\n(preferably private):"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Article < ActiveRecord::Base\n def self.ransackable_attributes(auth_object = nil)\n if auth_object == :admin\n # whitelist all attributes for admin\n super\n else\n # whitelist only the title and body attributes for other users\n super & %w(title body)\n end\n end\n\n private_class_method :ransackable_attributes\nend\n")),(0,i.kt)("p",null,"Here is example code for the ",(0,i.kt)("inlineCode",{parentName:"p"},"articles_controller"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class ArticlesController < ApplicationController\n def index\n @q = Article.ransack(params[:q], auth_object: set_ransack_auth_object)\n @articles = @q.result\n end\n\n private\n\n def set_ransack_auth_object\n current_user.admin? ? :admin : nil\n end\nend\n")),(0,i.kt)("p",null,"Trying it out in ",(0,i.kt)("inlineCode",{parentName:"p"},"rails console"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'> Article\n=> Article(id: integer, person_id: integer, title: string, body: text)\n\n> Article.ransackable_attributes\n=> ["title", "body"]\n\n> Article.ransackable_attributes(:admin)\n=> ["id", "person_id", "title", "body"]\n\n> Article.ransack(id_eq: 1).result.to_sql\n=> SELECT "articles".* FROM "articles" # Note that search param was ignored!\n\n> Article.ransack({ id_eq: 1 }, { auth_object: nil }).result.to_sql\n=> SELECT "articles".* FROM "articles" # Search param still ignored!\n\n> Article.ransack({ id_eq: 1 }, { auth_object: :admin }).result.to_sql\n=> SELECT "articles".* FROM "articles" WHERE "articles"."id" = 1\n')),(0,i.kt)("p",null,"That's it! Now you know how to whitelist/blacklist various elements in Ransack."),(0,i.kt)("h3",{id:"handling-unknown-predicates-or-attributes"},"Handling unknown predicates or attributes"),(0,i.kt)("p",null,"By default, Ransack will ignore any unknown predicates or attributes:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'Article.ransack(unknown_attr_eq: \'Ernie\').result.to_sql\n=> SELECT "articles".* FROM "articles"\n')),(0,i.kt)("p",null,"Ransack may be configured to raise an error if passed an unknown predicate or\nattributes, by setting the ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_unknown_conditions")," option to ",(0,i.kt)("inlineCode",{parentName:"p"},"false")," in your\nRansack initializer file at ",(0,i.kt)("inlineCode",{parentName:"p"},"config/initializers/ransack.rb"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Ransack.configure do |c|\n # Raise errors if a query contains an unknown predicate or attribute.\n # Default is true (do not raise error on unknown conditions).\n c.ignore_unknown_conditions = false\nend\n")),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Article.ransack(unknown_attr_eq: 'Ernie')\n# ArgumentError (Invalid search term unknown_attr_eq)\n")),(0,i.kt)("p",null,"As an alternative to setting a global configuration option, the ",(0,i.kt)("inlineCode",{parentName:"p"},".ransack!"),"\nclass method also raises an error if passed an unknown condition:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Article.ransack!(unknown_attr_eq: 'Ernie')\n# ArgumentError: Invalid search term unknown_attr_eq\n")),(0,i.kt)("p",null,"This is equivalent to the ",(0,i.kt)("inlineCode",{parentName:"p"},"ignore_unknown_conditions")," configuration option,\nexcept it may be applied on a case-by-case basis."),(0,i.kt)("h3",{id:"using-scopesclass-methods"},"Using Scopes/Class Methods"),(0,i.kt)("p",null,"Continuing on from the preceding section, searching by scopes requires defining\na whitelist of ",(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_scopes")," on the model class. The whitelist should be\nan array of ",(0,i.kt)("em",{parentName:"p"},"symbols"),". By default, all class methods (e.g. scopes) are ignored.\nScopes will be applied for matching ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," values, or for given values if the\nscope accepts a value:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"class Employee < ActiveRecord::Base\n scope :activated, ->(boolean = true) { where(active: boolean) }\n scope :salary_gt, ->(amount) { where('salary > ?', amount) }\n\n # Scopes are just syntactical sugar for class methods, which may also be used:\n\n def self.hired_since(date)\n where('start_date >= ?', date)\n end\n\n def self.ransackable_scopes(auth_object = nil)\n if auth_object.try(:admin?)\n # allow admin users access to all three methods\n %i(activated hired_since salary_gt)\n else\n # allow other users to search on `activated` and `hired_since` only\n %i(activated hired_since)\n end\n end\nend\n\nEmployee.ransack({ activated: true, hired_since: '2013-01-01' })\n\nEmployee.ransack({ salary_gt: 100_000 }, { auth_object: current_user })\n")),(0,i.kt)("p",null,"In Rails 3 and 4, if the ",(0,i.kt)("inlineCode",{parentName:"p"},"true")," value is being passed via url params or some\nother mechanism that will convert it to a string, the true value may not be\npassed to the ransackable scope unless you wrap it in an array\n(i.e. ",(0,i.kt)("inlineCode",{parentName:"p"},"activated: ['true']"),"). Ransack will take care of changing 'true' into a\nboolean. This is currently resolved in Rails 5 \ud83d\ude03"),(0,i.kt)("p",null,"However, perhaps you have ",(0,i.kt)("inlineCode",{parentName:"p"},"user_id: [1]")," and you do not want Ransack to convert\n1 into a boolean. (Values sanitized to booleans can be found in the\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/activerecord-hackery/ransack/blob/master/lib/ransack/constants.rb#L28"},"constants.rb"),").\nTo turn this off globally, and handle type conversions yourself, set\n",(0,i.kt)("inlineCode",{parentName:"p"},"sanitize_custom_scope_booleans")," to false in an initializer file like\nconfig/initializers/ransack.rb:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"Ransack.configure do |c|\n c.sanitize_custom_scope_booleans = false\nend\n")),(0,i.kt)("p",null,"To turn this off on a per-scope basis Ransack adds the following method to\n",(0,i.kt)("inlineCode",{parentName:"p"},"ActiveRecord::Base")," that you can redefine to selectively override sanitization:"),(0,i.kt)("p",null,(0,i.kt)("inlineCode",{parentName:"p"},"ransackable_scopes_skip_sanitize_args")),(0,i.kt)("p",null,"Add the scope you wish to bypass this behavior to ransackable_scopes_skip_sanitize_args:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def self.ransackable_scopes_skip_sanitize_args\n [:scope_to_skip_sanitize_args]\nend\n")),(0,i.kt)("p",null,"Scopes are a recent addition to Ransack and currently have a few caveats:\nFirst, a scope involving child associations needs to be defined in the parent\ntable model, not in the child model. Second, scopes with an array as an\nargument are not easily usable yet, because the array currently needs to be\nwrapped in an array to function (see\n",(0,i.kt)("a",{parentName:"p",href:"https://github.com/activerecord-hackery/ransack/issues/404"},"this issue"),"),\nwhich is not compatible with Ransack form helpers. For this use case, it may be\nbetter for now to use ",(0,i.kt)("a",{parentName:"p",href:"https://activerecord-hackery.github.io/ransack/going-further/ransackers"},"ransackers")," instead,\nwhere feasible. Pull requests with solutions and tests are welcome!"),(0,i.kt)("h3",{id:"grouping-queries-by-or-instead-of-and"},"Grouping queries by OR instead of AND"),(0,i.kt)("p",null,"The default ",(0,i.kt)("inlineCode",{parentName:"p"},"AND")," grouping can be changed to ",(0,i.kt)("inlineCode",{parentName:"p"},"OR")," by adding ",(0,i.kt)("inlineCode",{parentName:"p"},"m: 'or'")," to the\nquery hash."),(0,i.kt)("p",null,"You can easily try it in your controller code by changing ",(0,i.kt)("inlineCode",{parentName:"p"},"params[:q]")," in the\n",(0,i.kt)("inlineCode",{parentName:"p"},"index")," action to ",(0,i.kt)("inlineCode",{parentName:"p"},"params[:q].try(:merge, m: 'or')")," as follows:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"def index\n @q = Artist.ransack(params[:q].try(:merge, m: 'or'))\n @artists = @q.result\nend\n")),(0,i.kt)("p",null,"Normally, if you wanted users to be able to toggle between ",(0,i.kt)("inlineCode",{parentName:"p"},"AND")," and ",(0,i.kt)("inlineCode",{parentName:"p"},"OR"),"\nquery grouping, you would probably set up your search form so that ",(0,i.kt)("inlineCode",{parentName:"p"},"m")," was in\nthe URL params hash, but here we assigned ",(0,i.kt)("inlineCode",{parentName:"p"},"m")," manually just to try it out\nquickly."),(0,i.kt)("p",null,"Alternatively, trying it in the Rails console:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'artists = Artist.ransack(name_cont: \'foo\', style_cont: \'bar\', m: \'or\')\n=> Ransack::Search,\n Condition \n ], combinator: or>>\n\nartists.result.to_sql\n=> "SELECT \\"artists\\".* FROM \\"artists\\"\n WHERE ((\\"artists\\".\\"name\\" ILIKE \'%foo%\'\n OR \\"artists\\".\\"style\\" ILIKE \'%bar%\'))"\n')),(0,i.kt)("p",null,"The combinator becomes ",(0,i.kt)("inlineCode",{parentName:"p"},"or")," instead of the default ",(0,i.kt)("inlineCode",{parentName:"p"},"and"),", and the SQL query\nbecomes ",(0,i.kt)("inlineCode",{parentName:"p"},"WHERE...OR")," instead of ",(0,i.kt)("inlineCode",{parentName:"p"},"WHERE...AND"),"."),(0,i.kt)("p",null,"This works with associations as well. Imagine an Artist model that has many\nMemberships, and many Musicians through Memberships:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},'artists = Artist.ransack(name_cont: \'foo\', musicians_email_cont: \'bar\', m: \'or\')\n=> Ransack::Search,\n Condition \n ], combinator: or>>\n\nartists.result.to_sql\n=> "SELECT \\"artists\\".* FROM \\"artists\\"\n LEFT OUTER JOIN \\"memberships\\"\n ON \\"memberships\\".\\"artist_id\\" = \\"artists\\".\\"id\\"\n LEFT OUTER JOIN \\"musicians\\"\n ON \\"musicians\\".\\"id\\" = \\"memberships\\".\\"musician_id\\"\n WHERE ((\\"artists\\".\\"name\\" ILIKE \'%foo%\'\n OR \\"musicians\\".\\"email\\" ILIKE \'%bar%\'))"\n')),(0,i.kt)("h3",{id:"using-simpleform"},"Using SimpleForm"),(0,i.kt)("p",null,"If you would like to combine the Ransack and SimpleForm form builders, set the\n",(0,i.kt)("inlineCode",{parentName:"p"},"RANSACK_FORM_BUILDER")," environment variable before Rails boots up, e.g. in\n",(0,i.kt)("inlineCode",{parentName:"p"},"config/application.rb")," before ",(0,i.kt)("inlineCode",{parentName:"p"},"require 'rails/all'")," as shown below (and add\n",(0,i.kt)("inlineCode",{parentName:"p"},"gem 'simple_form'")," in your Gemfile)."),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-ruby"},"require File.expand_path('../boot', __FILE__)\nENV['RANSACK_FORM_BUILDER'] = '::SimpleForm::FormBuilder'\nrequire 'rails/all'\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.d4fefde7.js b/assets/js/main.aa84797f.js similarity index 99% rename from assets/js/main.d4fefde7.js rename to assets/js/main.aa84797f.js index 8b6ccd3..4bb6a1c 100644 --- a/assets/js/main.d4fefde7.js +++ b/assets/js/main.aa84797f.js @@ -1,2 +1,2 @@ -/*! For license information please see main.d4fefde7.js.LICENSE.txt */ -(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[179],{9782:function(e,t){"use strict";t.Z={title:"Ransack documentation",tagline:"Object-based searching",url:"https://activerecord-hackery.github.io",baseUrl:"/ransack/",onBrokenMarkdownLinks:"warn",favicon:"img/favicon.ico",organizationName:"activerecord-hackery",projectName:"ransack",trailingSlash:!0,presets:[["classic",{docs:{routeBasePath:"/",sidebarPath:"/home/runner/work/ransack/ransack/docs/sidebars.js",editUrl:"https://github.com/activerecord-hackery/ransack/edit/main/docs/"},blog:{showReadingTime:!0,editUrl:"https://github.com/activerecord-hackery/ransack/edit/main/blog/"},theme:{customCss:"/home/runner/work/ransack/ransack/docs/src/css/custom.css"}}]],themeConfig:{navbar:{logo:{alt:"Ransack Logo",src:"./logo/ransack-h.png"},items:[{type:"doc",docId:"intro",position:"left",label:"Documentation"},{to:"/blog",label:"Blog",position:"left"},{href:"https://github.com/activerecord-hackery/ransack",label:"GitHub",position:"right"}],hideOnScroll:!1},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Documentation",to:"/"}]},{title:"Community",items:[{label:"Stack Overflow",href:"https://stackoverflow.com/questions/tagged/ransack"}]},{title:"More",items:[{label:"Blog",to:"/blog"},{label:"GitHub",href:"https://github.com/activerecord-hackery/ransack"}]}]},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:["ruby","erb"],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},themes:[["/home/runner/work/ransack/ransack/docs/node_modules/@easyops-cn/docusaurus-search-local/dist/server/server/index.js",{hashed:!0,docsRouteBasePath:"/"}]],baseUrlIssueBanner:!0,i18n:{defaultLocale:"en",locales:["en"],localeConfigs:{}},onBrokenLinks:"throw",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],scripts:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},723:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(7294),a=n(3117),o=n(8356),i=n.n(o);function u(e){var t=e.error,n=e.retry,a=e.pastDelay;return t?r.createElement("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%"}},r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("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"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var l=n(6887),s={"009f1e98":[function(){return n.e(3436).then(n.bind(n,2783))},"@site/docs/getting-started/configuration.md",2783],"01a85c17":[function(){return Promise.all([n.e(532),n.e(4013)]).then(n.bind(n,3881))},"@theme/BlogTagsListPage",3881],"01befa62":[function(){return n.e(3939).then(n.bind(n,576))},"@site/docs/going-further/merging-searches.md",576],"0d4fa94e":[function(){return n.e(3245).then(n.t.bind(n,4045,19))},"~blog/default/ransack-blog-tags-release-630.json",4045],"0e384e19":[function(){return n.e(9671).then(n.bind(n,9881))},"@site/docs/intro.md",9881],17896441:[function(){return Promise.all([n.e(532),n.e(5290),n.e(7918)]).then(n.bind(n,1857))},"@theme/DocItem",1857],"1a4e3797":[function(){return Promise.all([n.e(532),n.e(7920)]).then(n.bind(n,1473))},"@theme/SearchPage",1473],"1be78505":[function(){return Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,9068))},"@theme/DocPage",9068],"1f391b9e":[function(){return Promise.all([n.e(532),n.e(5290),n.e(3085)]).then(n.bind(n,6416))},"@theme/MDXPage",6416],"260cca1a":[function(){return n.e(1628).then(n.t.bind(n,3769,19))},"/home/runner/work/ransack/ransack/docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],"29104dc6":[function(){return n.e(7324).then(n.t.bind(n,7354,19))},"~blog/default/ransack-blog-tags-ransack-a38.json",7354],"2bc2bb50":[function(){return n.e(230).then(n.bind(n,5829))},"@site/docs/going-further/form-customisation.md",5829],"31a91795":[function(){return n.e(570).then(n.t.bind(n,713,19))},"~blog/default/ransack-blog-74f.json",713],"3428807b":[function(){return n.e(1977).then(n.t.bind(n,5745,19))},"/home/runner/work/ransack/ransack/docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"393be207":[function(){return n.e(7414).then(n.bind(n,3123))},"@site/src/pages/markdown-page.md",3123],"3fbeb73f":[function(){return n.e(4841).then(n.t.bind(n,8277,19))},"~blog/default/ransack-blog-tags-tags-fa4.json",8277],"460f2046":[function(){return n.e(1782).then(n.bind(n,7864))},"@site/docs/going-further/exporting-to-csv.md",7864],"4eaee7fa":[function(){return n.e(1719).then(n.bind(n,4713))},"@site/docs/getting-started/sorting.md",4713],52275109:[function(){return n.e(6401).then(n.bind(n,4421))},"@site/docs/going-further/polymorphic-search.md",4421],"5647493f":[function(){return n.e(189).then(n.bind(n,7447))},"@site/docs/going-further/wiki-contributors.md",7447],"6875c492":[function(){return Promise.all([n.e(532),n.e(5290),n.e(1465),n.e(8610)]).then(n.bind(n,9404))},"@theme/BlogTagsPostsPage",9404],"764f00df":[function(){return n.e(5395).then(n.bind(n,409))},"@site/blog/2022-03-27-ransack-3.0.0.md",409],"79e06ba9":[function(){return n.e(6424).then(n.t.bind(n,2776,19))},"/home/runner/work/ransack/ransack/docs/.docusaurus/@easyops-cn/docusaurus-search-local/default/plugin-route-context-module-100.json",2776],"7bc87c9b":[function(){return n.e(8382).then(n.bind(n,2154))},"@site/docs/going-further/documentation.md",2154],"7bf2db17":[function(){return n.e(7407).then(n.bind(n,7100))},"@site/docs/going-further/searching-postgres.md",7100],"814f3328":[function(){return n.e(2535).then(n.t.bind(n,5641,19))},"~blog/default/blog-post-list-prop-default.json",5641],"8c747907":[function(){return n.e(2364).then(n.bind(n,4910))},"@site/docs/going-further/other-notes.md",4910],"92fe0e90":[function(){return n.e(2591).then(n.bind(n,3128))},"@site/docs/going-further/ransackers.md",3128],"935f2afb":[function(){return n.e(53).then(n.t.bind(n,1109,19))},"~docs/default/version-current-metadata-prop-751.json",1109],"99efcd31":[function(){return n.e(1944).then(n.bind(n,1397))},"@site/docs/getting-started/search-matches.md",1397],"9c504410":[function(){return n.e(5600).then(n.bind(n,5777))},"@site/docs/going-further/associations.md",5777],"9e4087bc":[function(){return n.e(3608).then(n.bind(n,3012))},"@theme/BlogArchivePage",3012],"9fa839ec":[function(){return n.e(2491).then(n.t.bind(n,3707,19))},"~blog/default/ransack-blog-archive-c3f.json",3707],a6235bd5:[function(){return n.e(6680).then(n.bind(n,7468))},"@site/docs/going-further/acts-as-taggable-on.md",7468],a6866e6d:[function(){return n.e(722).then(n.t.bind(n,4469,19))},"/home/runner/work/ransack/ransack/docs/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],a6aa9e1f:[function(){return Promise.all([n.e(532),n.e(5290),n.e(1465),n.e(3089)]).then(n.bind(n,7329))},"@theme/BlogListPage",7329],b1e4a2bb:[function(){return n.e(1260).then(n.bind(n,8198))},"@site/docs/going-further/external-guides.md",8198],b8ab82ee:[function(){return n.e(4510).then(n.bind(n,383))},"@site/docs/getting-started/advanced-mode.md",383],bb5657b1:[function(){return n.e(8197).then(n.bind(n,2801))},"@site/docs/getting-started/using-predicates.md",2801],ccc49370:[function(){return Promise.all([n.e(532),n.e(5290),n.e(6103)]).then(n.bind(n,9360))},"@theme/BlogPostPage",9360],ce7a2be6:[function(){return n.e(3699).then(n.bind(n,4993))},"@site/docs/going-further/saving-queries.md",4993],d4672cd7:[function(){return n.e(9953).then(n.bind(n,5385))},"@site/docs/going-further/i18n.md",5385],da250cee:[function(){return n.e(7341).then(n.bind(n,4227))},"@site/docs/going-further/release_process.md",4227],db1f0725:[function(){return n.e(597).then(n.t.bind(n,3571,19))},"~blog/default/ransack-blog-tags-ransack-a38-list.json",3571],dffbd312:[function(){return n.e(2168).then(n.bind(n,677))},"@site/docs/getting-started/simple-mode.md",677],e3caf117:[function(){return n.e(6843).then(n.bind(n,2342))},"@site/docs/going-further/custom-predicates.md",2342],eae51d00:[function(){return n.e(3015).then(n.bind(n,1006))},"@site/blog/2022-03-27-ransack-3.0.0.md?truncated=true",1006],fc57f22d:[function(){return n.e(5474).then(n.t.bind(n,9250,19))},"~blog/default/ransack-blog-tags-release-630-list.json",9250]},c=n(9670),d=n(226);function f(e,t){if("*"===e)return i()({loading:u,loader:function(){return n.e(4608).then(n.bind(n,4608)).then((function(e){var t=e.default;return function(e){return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(t,e))}}))}});var o=l[e+"-"+t],f={},p=[],h=[],g=(0,c.Z)(o);return Object.entries(g).forEach((function(e){var t=e[0],n=e[1],r=s[n];r&&(f[t]=r[0],p.push(r[1]),h.push(r[2]))})),i().Map({loading:u,loader:f,modules:p,webpack:function(){return h},render:function(t,n){var i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((function(t){var n=t[0],r=t[1],a=r.default;if(!a)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 a&&"function"!=typeof a||Object.keys(r).filter((function(e){return"default"!==e})).forEach((function(e){a[e]=r[e]}));var o=i,u=n.split(".");u.slice(0,-1).forEach((function(e){o=o[e]})),o[u[u.length-1]]=a}));var u=i.__comp;delete i.__comp;var l=i.__context;return delete i.__context,r.createElement(d.z,{value:l},r.createElement(u,(0,a.Z)({},i,n)))}})}var p=[{path:"/ransack/blog/",component:f("/ransack/blog/","118"),exact:!0},{path:"/ransack/blog/archive/",component:f("/ransack/blog/archive/","ae7"),exact:!0},{path:"/ransack/blog/ransack-3-0-0/",component:f("/ransack/blog/ransack-3-0-0/","1df"),exact:!0},{path:"/ransack/blog/tags/",component:f("/ransack/blog/tags/","b04"),exact:!0},{path:"/ransack/blog/tags/ransack/",component:f("/ransack/blog/tags/ransack/","8a7"),exact:!0},{path:"/ransack/blog/tags/release/",component:f("/ransack/blog/tags/release/","c37"),exact:!0},{path:"/ransack/markdown-page/",component:f("/ransack/markdown-page/","7bc"),exact:!0},{path:"/ransack/search/",component:f("/ransack/search/","6be"),exact:!0},{path:"/ransack/",component:f("/ransack/","0c1"),routes:[{path:"/ransack/",component:f("/ransack/","79b"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/advanced-mode/",component:f("/ransack/getting-started/advanced-mode/","0ea"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/configuration/",component:f("/ransack/getting-started/configuration/","c6e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/search-matches/",component:f("/ransack/getting-started/search-matches/","f0d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/simple-mode/",component:f("/ransack/getting-started/simple-mode/","1ef"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/sorting/",component:f("/ransack/getting-started/sorting/","aa2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/getting-started/using-predicates/",component:f("/ransack/getting-started/using-predicates/","c70"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/acts-as-taggable-on/",component:f("/ransack/going-further/acts-as-taggable-on/","bd2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/associations/",component:f("/ransack/going-further/associations/","b78"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/custom-predicates/",component:f("/ransack/going-further/custom-predicates/","4d9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/documentation/",component:f("/ransack/going-further/documentation/","8bb"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/exporting-to-csv/",component:f("/ransack/going-further/exporting-to-csv/","f1e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/external-guides/",component:f("/ransack/going-further/external-guides/","b51"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/form-customisation/",component:f("/ransack/going-further/form-customisation/","938"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/i18n/",component:f("/ransack/going-further/i18n/","b8c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/merging-searches/",component:f("/ransack/going-further/merging-searches/","99e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/other-notes/",component:f("/ransack/going-further/other-notes/","e63"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/polymorphic-search/",component:f("/ransack/going-further/polymorphic-search/","b16"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/ransackers/",component:f("/ransack/going-further/ransackers/","4b7"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/release_process/",component:f("/ransack/going-further/release_process/","982"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/saving-queries/",component:f("/ransack/going-further/saving-queries/","104"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/searching-postgres/",component:f("/ransack/going-further/searching-postgres/","29a"),exact:!0,sidebar:"tutorialSidebar"},{path:"/ransack/going-further/wiki-contributors/",component:f("/ransack/going-further/wiki-contributors/","374"),exact:!0,sidebar:"tutorialSidebar"}]},{path:"*",component:f("*")}]},8934:function(e,t,n){"use strict";n.d(t,{_:function(){return a},t:function(){return o}});var r=n(7294),a=r.createContext(!1);function o(e){var t=e.children,n=(0,r.useState)(!1),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(!0)}),[]),r.createElement(a.Provider,{value:o},t)}},8864:function(e,t,n){"use strict";var r=n(7294),a=n(3935),o=n(3727),i=n(405),u=n(412),l=[n(2497),n(2448),n(6743),n(8320),n(2295)],s=n(723),c=n(6775),d=n(8790),f=new Map;function p(e){if(f.has(e.pathname))return Object.assign({},e,{pathname:f.get(e.pathname)});if((0,d.f)(s.Z,e.pathname).some((function(e){return!0===e.route.exact})))return f.set(e.pathname,e.pathname),e;var t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return f.set(e.pathname,t),Object.assign({},e,{pathname:t})}var h=n(8934),g=n(8940),m=n(1073);function v(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\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(/0)&&(B.current.unobserve(e),B.current.disconnect(),null!=I&&window.docusaurus.prefetch(I))}))})),B.current.observe(e))},to:I},g&&{isActive:y,activeClassName:b}))}var g=o.forwardRef(h)},5999:function(e,t,n){"use strict";n.d(t,{Z:function(){return l},I:function(){return u}});var r=n(7294);function a(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var o=n(7529);function i(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:a])?n:a)?t:r}function u(e,t){return a(i({message:e.message,id:e.id}),t)}function l(e){var t=e.children,n=e.id,o=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var u=i({message:t,id:n});return r.createElement(r.Fragment,null,a(u,o))}},9935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},3919:function(e,t,n){"use strict";function r(e){return!0===/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return a},b:function(){return r}})},8143:function(e,t,n){"use strict";n.r(t),n.d(t,{Redirect:function(){return r.l_},matchPath:function(){return r.LX},useHistory:function(){return r.k6},useLocation:function(){return r.TH}});var r=n(6775)},4996:function(e,t,n){"use strict";n.d(t,{C:function(){return o},Z:function(){return i}});var r=n(2263),a=n(3919);function o(){var e=(0,r.Z)().siteConfig,t=e.baseUrl,n=e.url;return{withBaseUrl:function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,i=o.forcePrependBaseUrl,u=void 0!==i&&i,l=o.absolute,s=void 0!==l&&l;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(u)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var c=n.startsWith(t)?n:t+n.replace(/^\//,"");return s?e+c:c}(n,t,e,r)}}}function i(e,t){return void 0===t&&(t={}),(0,o().withBaseUrl)(e,t)}},2263:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},8084:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o},useAllPluginInstancesData:function(){return i},usePluginData:function(){return u}});var r=n(2263),a=n(9935);function o(){var e=(0,r.Z)().globalData;if(!e)throw new Error("Docusaurus global data not found.");return e}function i(e,t){void 0===t&&(t={});var n=o()[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}function u(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});var r=i(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}},2389:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},9670:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var a,o=n[0],i=n[1],u=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,u):t[u]=i}))}(e),t}},226:function(e,t,n){"use strict";n.d(t,{_:function(){return a},z:function(){return o}});var r=n(7294),a=r.createContext(null);function o(e){var t=e.children,n=e.value,o=r.useContext(a),i=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;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}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:o,value:n})}),[o,n]);return r.createElement(a.Provider,{value:i},t)}},4953:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(7294),a=n(4397),o=n(780),i=n(5742);function u(e){var t=e.error,n=e.tryAgain;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function l(e){var t=e.error,n=e.tryAgain;return r.createElement(o.Z,{fallback:function(){return r.createElement(u,{error:t,tryAgain:n})}},r.createElement(i.Z,null,r.createElement("title",null,"Page Error")),r.createElement(a.Z,null,r.createElement(u,{error:t,tryAgain:n})))}},8408:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;var r=n(8143);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.matchPath)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&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((function(e){return e.path})).join(", "));return o};function a(e,n){var a=(0,t.getLatestVersion)(e);return[].concat(e.versions.filter((function(e){return e!==a})),[a]).find((function(e){return!!(0,r.matchPath)(n,{path:e.path,exact:!1,strict:!1})}))}function o(e,t){var n,o,i=a(e,t),u=null==i?void 0:i.docs.find((function(e){return!!(0,r.matchPath)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:i,activeDoc:u,alternateDocVersions:u?(n=u.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}t.getLatestVersion=function(e){return e.versions.find((function(e){return e.isLast}))},t.getActiveVersion=a,t.getActiveDocContext=o,t.getDocVersionSuggestions=function(e,n){var r=(0,t.getLatestVersion)(e),a=o(e,n);return{latestDocSuggestion:null==a?void 0:a.alternateDocVersions[r.name],latestVersionSuggestion:r}}},5551:function(e,t,n){"use strict";t.Jo=t.Iw=t.yW=t.gB=t.gA=t.zh=t._r=void 0;var r=n(8143),a=n(8084),o=n(8408),i={};t._r=function(){var e;return null!=(e=(0,a.useAllPluginInstancesData)("docusaurus-plugin-content-docs"))?e:i};function u(e){void 0===e&&(e={});var n=(0,t._r)(),a=(0,r.useLocation)().pathname;return(0,o.getActivePlugin)(n,a,e)}t.zh=function(e){return(0,a.usePluginData)("docusaurus-plugin-content-docs",e,{failfast:!0})},t.gA=u,t.gB=function(e){return(0,t.zh)(e).versions},t.yW=function(e){var n=(0,t.zh)(e);return(0,o.getLatestVersion)(n)},t.Iw=function(e){var n=(0,t.zh)(e),a=(0,r.useLocation)().pathname;return(0,o.getActiveDocContext)(n,a)},t.Jo=function(e){var n=(0,t.zh)(e),a=(0,r.useLocation)().pathname;return(0,o.getDocVersionSuggestions)(n,a)}},541:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a="iconExternalLink_I5OW";function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,i=void 0===o?13.5:o;return r.createElement("svg",{width:n,height:i,"aria-hidden":"true",viewBox:"0 0 24 24",className:a},r.createElement("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"}))}},4397:function(e,t,n){"use strict";n.d(t,{Z:function(){return sn}});var r=n(7294),a=n(6010),o=n(780),i=n(5999),u=n(6775),l=n(5936),s=n(5281);function c(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}var d="skipToContent_ZgBM";function f(){var e=function(){var e=(0,r.useRef)(null),t=(0,u.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t=document.querySelector("main:first-of-type")||document.querySelector("."+s.k.wrapper.main);t&&c(t)}),[]);return(0,l.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&c(e.current)})),{containerRef:e,handleSkip:n}}(),t=e.containerRef,n=e.handleSkip;return r.createElement("div",{ref:t,role:"region"},r.createElement("a",{href:"#",className:d,onClick:n},r.createElement(i.Z,{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"},"Skip to main content")))}var p=n(9689),h=n(6668),g=n(3117),m=n(102),v=["width","height","color","strokeWidth","className"];function b(e){var t=e.width,n=void 0===t?21:t,a=e.height,o=void 0===a?21:a,i=e.color,u=void 0===i?"currentColor":i,l=e.strokeWidth,s=void 0===l?1.2:l,c=(e.className,(0,m.Z)(e,v));return r.createElement("svg",(0,g.Z)({viewBox:"0 0 15 15",width:n,height:o},c),r.createElement("g",{stroke:u,strokeWidth:s},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var y="announcementBar_IbjG",w="announcementBarPlaceholder_NC_W",k="announcementBarClose_FG1z",E="announcementBarContent_KsVm";function S(){var e=(0,p.nT)(),t=e.isActive,n=e.close,o=(0,h.L)().announcementBar;if(!t)return null;var u=o.content,l=o.backgroundColor,s=o.textColor,c=o.isCloseable;return r.createElement("div",{className:y,style:{backgroundColor:l,color:s},role:"banner"},c&&r.createElement("div",{className:w}),r.createElement("div",{className:E,dangerouslySetInnerHTML:{__html:u}}),c?r.createElement("button",{type:"button",className:(0,a.Z)("clean-btn close",k),onClick:n,"aria-label":(0,i.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(b,{width:14,height:14,strokeWidth:3.1})):null)}var x=n(4700),_=n(2961),C=n(3102),T=r.createContext(null);function L(e){var t,n,a,o,i,u,l,s=e.children,c=(t=(0,_.e)(),n=(0,C.HY)(),a=(0,r.useState)(!1),o=a[0],i=a[1],u=null!==n.component,l=(0,x.D9)(u),(0,r.useEffect)((function(){u&&!l&&i(!0)}),[u,l]),(0,r.useEffect)((function(){u?t.shown||i(!0):i(!1)}),[t.shown,u]),(0,r.useMemo)((function(){return[o,i]}),[o]));return r.createElement(T.Provider,{value:c},s)}function A(e){if(e.component){var t=e.component;return r.createElement(t,Object.assign({},e.props))}}function O(){var e=(0,r.useContext)(T);if(!e)throw new x.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,C.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:a,content:A(o)}}),[a,o,t])}function P(e){var t=e.header,n=e.primaryMenu,o=e.secondaryMenu,i=O().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var N=n(2949),D=n(2389);function I(e){return r.createElement("svg",(0,g.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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 R(e){return r.createElement("svg",(0,g.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("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"}))}var F={toggle:"toggle_S7eR",toggleButton:"toggleButton_rCf9",darkToggleIcon:"darkToggleIcon_nQuB",lightToggleIcon:"lightToggleIcon_v35p",toggleButtonDisabled:"toggleButtonDisabled_Pu9x"};function M(e){var t=e.className,n=e.value,o=e.onChange,u=(0,D.Z)(),l=(0,i.I)({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"===n?(0,i.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,i.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(F.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",F.toggleButton,!u&&F.toggleButtonDisabled),type:"button",onClick:function(){return o("dark"===n?"light":"dark")},disabled:!u,title:l,"aria-label":l},r.createElement(I,{className:(0,a.Z)(F.toggleIcon,F.lightToggleIcon)}),r.createElement(R,{className:(0,a.Z)(F.toggleIcon,F.darkToggleIcon)})))}var B=r.memo(M);function j(e){var t=e.className,n=(0,h.L)().colorMode.disableSwitch,a=(0,N.I)(),o=a.colorMode,i=a.setColorMode;return n?null:r.createElement(B,{className:t,value:o,onChange:i})}var z=n(5537);function U(){return r.createElement(z.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Z(){var e=(0,_.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(b,{color:"var(--ifm-color-emphasis-600)"}))}function $(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(U,null),r.createElement(j,{className:"margin-right--md"}),r.createElement(Z,null))}var H=n(9960),Q=n(4996),V=n(541),W=n(3919);function G(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var q=["activeBasePath","activeBaseRegex","to","href","label","html","activeClassName","prependBaseUrlToHref"];function Y(e){var t,n=e.activeBasePath,a=e.activeBaseRegex,o=e.to,i=e.href,u=e.label,l=e.html,s=e.activeClassName,c=void 0===s?"":s,d=e.prependBaseUrlToHref,f=(0,m.Z)(e,q),p=(0,Q.Z)(o),h=(0,Q.Z)(n),v=(0,Q.Z)(i,{forcePrependBaseUrl:!0}),b=u&&i&&!(0,W.Z)(i),y="dropdown__link--active"===c,w=l?{dangerouslySetInnerHTML:{__html:l}}:{children:r.createElement(r.Fragment,null,u,b&&r.createElement(V.Z,y&&{width:12,height:12}))};return i?r.createElement(H.Z,(0,g.Z)({href:d?v:i},f,w)):r.createElement(H.Z,(0,g.Z)({to:p,isNavLink:!0,activeClassName:null!=(t=f.className)&&t.includes(c)?"":c},(n||a)&&{isActive:function(e,t){return a?G(a,t.pathname):t.pathname.startsWith(h)}},f,w))}var K=function(e){return e?"menu__link--active":"navbar__link--active"},X=["className","isDropdownItem"],J=["className","isDropdownItem"],ee=["mobile","position"];function te(e){var t=e.className,n=e.isDropdownItem,o=void 0!==n&&n,i=(0,m.Z)(e,X),u=r.createElement(Y,(0,g.Z)({className:(0,a.Z)(o?"dropdown__link":"navbar__item navbar__link",t)},i));return o?r.createElement("li",null,u):u}function ne(e){var t=e.className,n=(e.isDropdownItem,(0,m.Z)(e,J));return r.createElement("li",{className:"menu__list-item"},r.createElement(Y,(0,g.Z)({className:(0,a.Z)("menu__link",t)},n)))}function re(e){var t,n=e.mobile,a=void 0!==n&&n,o=(e.position,(0,m.Z)(e,ee)),i=a?ne:te;return r.createElement(i,(0,g.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:K(a)}))}var ae=n(8596),oe=n(2263);var ie=n(6043),ue=["items","position","className"],le=["items","className","position"],se=["mobile"];function ce(e,t){return e.some((function(e){return function(e,t){return!!(0,ae.Mg)(e.to,t)||!!G(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function de(e){var t,n=e.items,o=e.position,i=e.className,u=(0,m.Z)(e,ue),l=(0,r.useRef)(null),s=(0,r.useState)(!1),c=s[0],d=s[1];return(0,r.useEffect)((function(){var e=function(e){l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[l]),r.createElement("div",{ref:l,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":c})},r.createElement(Y,(0,g.Z)({"aria-haspopup":"true","aria-expanded":c,role:"button",href:u.to?void 0:"#",className:(0,a.Z)("navbar__link",i)},u,{onClick:u.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d(!c))}}),null!=(t=u.children)?t:u.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(bt,(0,g.Z)({isDropdownItem:!0,onKeyDown:function(e){if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);var r=l.current.nextElementSibling;if(r)(r instanceof HTMLAnchorElement?r:r.querySelector("a")).focus()}},activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function fe(e){var t,n,o=e.items,i=e.className,l=(e.position,(0,m.Z)(e,le)),s=(n=(0,oe.Z)().siteConfig.baseUrl,(0,u.TH)().pathname.replace(n,"/")),c=ce(o,s),d=(0,ie.u)({initialState:function(){return!c}}),f=d.collapsed,p=d.toggleCollapsed,h=d.setCollapsed;return(0,r.useEffect)((function(){c&&h(!c)}),[s,c,h]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":f})},r.createElement(Y,(0,g.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",i)},l,{onClick:function(e){e.preventDefault(),p()}}),null!=(t=l.children)?t:l.label),r.createElement(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f},o.map((function(e,t){return r.createElement(bt,(0,g.Z)({mobile:!0,isDropdownItem:!0,onClick:l.onClick,activeClassName:"menu__link--active"},e,{key:t}))}))))}function pe(e){var t=e.mobile,n=void 0!==t&&t,a=(0,m.Z)(e,se),o=n?fe:de;return r.createElement(o,a)}var he=["width","height"];function ge(e){var t=e.width,n=void 0===t?20:t,a=e.height,o=void 0===a?20:a,i=(0,m.Z)(e,he);return r.createElement("svg",(0,g.Z)({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},i),r.createElement("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"}))}var me=n(4711),ve="iconLanguage_dNtB",be=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var ye=n(1029),we=n(1017),ke=n(7872),Ee=n(4035),Se=n(412),xe=n(22),_e=n(8202),Ce=n(3926),Te=n(2775),Le=n(2539),Ae=n(726),Oe="searchBar_RVTs",Pe="dropdownMenu_qbY6",Ne="suggestion_fB_2",De="cursor_eG29",Ie="hitTree_kk6K",Re="hitIcon_a7Zy",Fe="hitPath_ieM4",Me="noResultsIcon_EBY5",Be="hitFooter_E9YW",je="hitWrapper_sAK8",ze="hitTitle_vyVt",Ue="hitAction_NqkB",Ze="noResults_l6Q3",$e="searchBarContainer_NW3z",He="searchBarLoadingRing_YnHq",Qe="searchIndexLoading_EJ1f",Ve="searchHintContainer_Pkmr",We="searchHint_iIMx",Ge="input_FOTf",qe="hint_URu1",Ye="suggestions_X8XU",Ke="dataset_QiCy",Xe="empty_eITn";function Je(e){var t=e.document,n=e.type,r=e.page,a=e.metadata,o=e.tokens,i=e.isInterOfTree,u=e.isLastOfTree,l=0===n,s=1===n,c=[];i?c.push(''):u&&c.push('');var d=c.map((function(e){return''+e+""})),f=''+(l?'':s?'':'')+"",p=[''+(0,Ae.o)(t.t,(0,Te.m)(a,"t"),o)+""];if(!i&&!u&&ye.H6){var h,g=r?(null!=(h=r.b)?h:[]).concat(r.t).concat(t.s&&t.s!==r.t?t.s:[]):t.b;p.push(''+(0,Ce.e)(null!=g?g:[])+"")}else l||p.push(''+(0,Le.C)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),o)+"");return[].concat(d,[f,''],p,["",'']).join("")}function et(){return''+(0,i.I)({id:"theme.SearchBar.noResultsText",message:"No results"})+""}var tt=n(311);function nt(){return rt.apply(this,arguments)}function rt(){return(rt=(0,Ee.Z)((0,we.Z)().mark((function e(){var t,r;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8443),n.e(5525)]).then(n.t.bind(n,8443,23));case 2:return t=e.sent,(r=t.default).noConflict?r.noConflict():t.noConflict&&t.noConflict(),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var at="_highlight";var ot=function(e){var t,n,o,l=e.handleSearchBarToggle,s=(0,oe.Z)().siteConfig.baseUrl,c=(0,u.k6)(),d=(0,u.TH)(),f=(0,r.useRef)(null),p=(0,r.useRef)("empty"),h=(0,r.useRef)(!1),g=(0,r.useState)(!1),m=g[0],v=g[1],b=(0,r.useState)(!1),y=b[0],w=b[1],k=(0,r.useCallback)((0,Ee.Z)((0,we.Z)().mark((function e(){var t,n,r,a,o,u,l;return(0,we.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("empty"===p.current){e.next=2;break}return e.abrupt("return");case 2:return p.current="loading",v(!0),e.next=6,Promise.all([(0,xe.w)(s),nt()]);case 6:t=e.sent,n=t[0],r=n.wrappedIndexes,a=n.zhDictionary,o=t[1],u=o(f.current,{hint:!1,autoselect:!0,openOnFocus:!0,cssClasses:{root:Oe,noPrefix:!0,dropdownMenu:Pe,input:Ge,hint:qe,suggestions:Ye,suggestion:Ne,cursor:De,dataset:Ke,empty:Xe}},[{source:(0,_e.v)(r,a,ye.qo),templates:{suggestion:Je,empty:et,footer:function(e){var t=e.query;if(!e.isEmpty){var n=document.createElement("a"),r=s+"search?q="+encodeURIComponent(t);n.href=r,n.textContent=(0,i.I)({id:"theme.SearchBar.seeAll",message:"See all results"}),n.addEventListener("click",(function(e){e.ctrlKey||e.metaKey||(e.preventDefault(),u.autocomplete.close(),c.push(r))}));var a=document.createElement("div");return a.className=Be,a.appendChild(n),a}}}}]).on("autocomplete:selected",(function(e,t){var n,r=t.document,a=r.u,o=r.h,i=t.tokens;null==(n=f.current)||n.blur();var u=a;if(ye.vc&&i.length>0){for(var l,s=new URLSearchParams,d=(0,ke.Z)(i);!(l=d()).done;){var p=l.value;s.append(at,p)}u+="?"+s.toString()}o&&(u+=o),c.push(u)})).on("autocomplete:closed",(function(){var e;null==(e=f.current)||e.blur()})),p.current="done",v(!1),h.current&&((l=f.current).value&&u.autocomplete.open(),l.focus());case 15:case"end":return e.stop()}}),e)}))),[s,c]);(0,r.useEffect)((function(){if(ye.vc){var e=Se.Z.canUseDOM?new URLSearchParams(d.search).getAll(at):[];0!==e.length&&setTimeout((function(){var t=document.querySelector("article");if(t){var n=new ye.vc(t);n.unmark(),n.mark(e)}}))}}),[d.search,d.pathname]);var E=(0,r.useCallback)((function(){h.current=!0,k(),null==l||l(!0)}),[l,k]),S=(0,r.useCallback)((function(){null==l||l(!1)}),[l]),x=(0,r.useCallback)((function(){k()}),[k]),_=(0,r.useCallback)((function(e){e.target.value&&w(!0)}),[]),C=!!Se.Z.canUseDOM&&/mac/i.test(null!=(t=null==(n=navigator.userAgentData)?void 0:n.platform)?t:navigator.platform);return(0,r.useEffect)((function(){function e(e){var t;(C?e.metaKey:e.ctrlKey)&&"KeyK"===e.code&&(e.preventDefault(),null==(t=f.current)||t.focus(),E())}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[C,E]),r.createElement("div",{className:(0,a.Z)("navbar__search",$e,(o={},o[Qe]=m&&y,o))},r.createElement("input",{placeholder:(0,i.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),"aria-label":"Search",className:"navbar__search-input",onMouseEnter:x,onFocus:E,onBlur:S,onChange:_,ref:f}),r.createElement(tt.Z,{className:He}),r.createElement("div",{className:Ve},r.createElement("kbd",{className:We},C?"\u2318":"ctrl"),r.createElement("kbd",{className:We},"K")))},it="searchBox_dLyj";function ut(e){var t=e.children;return r.createElement("div",{className:it},t)}var lt=n(5551),st=n(2802),ct=["docId","label","docsPluginId"];var dt=["sidebarId","label","docsPluginId"];var ft=["label","to","docsPluginId"];var pt=n(373),ht=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],gt=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var mt={default:re,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,a=e.dropdownItemsAfter,o=(0,m.Z)(e,be),u=(0,oe.Z)().i18n,l=u.currentLocale,s=u.locales,c=u.localeConfigs,d=(0,me.l)(),f=s.map((function(e){var t="pathname://"+d.createUrl({locale:e,fullyQualified:!1});return{isNavLink:!0,label:c[e].label,to:t,target:"_self",autoAddBaseUrl:!1,className:e===l?"dropdown__link--active":""}})),p=[].concat(n,f,a),h=t?(0,i.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):c[l].label;return r.createElement(pe,(0,g.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(ge,{className:ve}),h),items:p}))},search:function(e){return e.mobile?null:r.createElement(ut,null,r.createElement(ot,null))},dropdown:pe,html:function(e){var t=e.value,n=e.className,o=e.mobile,i=void 0!==o&&o,u=e.isDropdownItem,l=void 0!==u&&u,s=l?"li":"div";return r.createElement(s,{className:(0,a.Z)({navbar__item:!i&&!l,"menu__list-item":i},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t,n=e.docId,o=e.label,i=e.docsPluginId,u=(0,m.Z)(e,ct),l=(0,lt.Iw)(i).activeDoc,s=(0,st.vY)(n,i);if(null===s)return null;var c=K(u.mobile);return r.createElement(re,(0,g.Z)({exact:!0},u,{className:(0,a.Z)(u.className,(t={},t[c]=(null==l?void 0:l.sidebar)&&l.sidebar===s.sidebar,t)),activeClassName:c,label:null!=o?o:s.id,to:s.path}))},docSidebar:function(e){var t,n=e.sidebarId,o=e.label,i=e.docsPluginId,u=(0,m.Z)(e,dt),l=(0,lt.Iw)(i).activeDoc,s=(0,st.oz)(n,i).link;if(!s)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+n+"\" doesn't have anything to be linked to.");var c=K(u.mobile);return r.createElement(re,(0,g.Z)({exact:!0},u,{className:(0,a.Z)(u.className,(t={},t[c]=(null==l?void 0:l.sidebar)===n,t)),activeClassName:c,label:null!=o?o:s.label,to:s.path}))},docsVersion:function(e){var t=e.label,n=e.to,a=e.docsPluginId,o=(0,m.Z)(e,ft),i=(0,st.lO)(a)[0],u=null!=t?t:i.label,l=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(i).path;return r.createElement(re,(0,g.Z)({},o,{label:u,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,a=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,u=e.dropdownItemsAfter,l=(0,m.Z)(e,ht),s=(0,lt.Iw)(n),c=(0,lt.gB)(n),d=(0,pt.J)(n).savePreferredVersionName,f=c.map((function(e){var t,n=null!=(t=null==s?void 0:s.alternateDocVersions[e.name])?t:gt(e);return{isNavLink:!0,label:e.label,to:n.path,isActive:function(){return e===(null==s?void 0:s.activeVersion)},onClick:function(){return d(e.name)}}})),p=[].concat(o,f,u),h=(0,st.lO)(n)[0],v=t&&p.length>1?(0,i.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,b=t&&p.length>1?void 0:gt(h).path;return p.length<=1?r.createElement(re,(0,g.Z)({},l,{mobile:t,label:v,to:b,isActive:a?function(){return!1}:void 0})):r.createElement(pe,(0,g.Z)({},l,{mobile:t,label:v,to:b,items:p,isActive:a?function(){return!1}:void 0}))}},vt=["type"];function bt(e){var t=e.type,n=(0,m.Z)(e,vt),a=function(e,t){return e&&"default"!==e?e:t?"dropdown":"default"}(t,void 0!==n.items),o=function(e){var t=mt[e];if(!t)throw new Error('No NavbarItem component found for type "'+e+'".');return t}(a);return r.createElement(o,n)}function yt(){var e=(0,_.e)(),t=(0,h.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(bt,(0,g.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function wt(e){return r.createElement("button",(0,g.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(i.Z,{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)"},"\u2190 Back to main menu"))}function kt(){var e=0===(0,h.L)().navbar.items.length,t=O();return r.createElement(r.Fragment,null,!e&&r.createElement(wt,{onClick:function(){return t.hide()}}),t.content)}function Et(){var e,t=(0,_.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(P,{header:r.createElement($,null),primaryMenu:r.createElement(yt,null),secondaryMenu:r.createElement(kt,null)}):null}var St=n(2466);var xt="navbarHideable_ObN2",_t="navbarHidden_FtgE";function Ct(e){return r.createElement("div",(0,g.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Tt(e){var t=e.children,n=(0,h.L)().navbar,o=n.hideOnScroll,i=n.style,u=(0,_.e)(),s=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),u=(0,r.useCallback)((function(e){null!==e&&(i.current=e.getBoundingClientRect().height)}),[]);return(0,St.RF)((function(t,n){var r=t.scrollY;if(e)if(r=u?a(!1):r+s0&&r.createElement(Qt,{links:n}),logo:a&&r.createElement(qt,{logo:a}),copyright:t&&r.createElement(Yt,{copyright:t})})}var Jt=r.memo(Xt),en=n(12),tn="docusaurus.tab.",nn=r.createContext(void 0);function rn(e){var t=e.children,n=function(){var e=(0,r.useState)({}),t=e[0],n=e[1],a=(0,r.useCallback)((function(e,t){(0,en.W)("docusaurus.tab."+e).set(t)}),[]);(0,r.useEffect)((function(){try{var e={};(0,en._)().forEach((function(t){if(t.startsWith(tn)){var n=t.substring(tn.length);e[n]=(0,en.W)(t).get()}})),n(e)}catch(t){console.error(t)}}),[]);var o=(0,r.useCallback)((function(e,t){n((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))})),a(e,t)}),[a]);return(0,r.useMemo)((function(){return{tabGroupChoices:t,setTabGroupChoices:o}}),[t,o])}();return r.createElement(nn.Provider,{value:n},t)}var an=n(1944);function on(e){var t=e.children;return r.createElement(N.S,null,r.createElement(p.pl,null,r.createElement(rn,null,r.createElement(St.OC,null,r.createElement(pt.L5,null,r.createElement(an.VC,null,r.createElement(Lt,null,t)))))))}var un=n(9727);function ln(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(i.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(i.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}function sn(e){var t=e.children,n=e.noFooter,i=e.wrapperClassName,u=e.title,l=e.description;return(0,un.t)(),r.createElement(on,null,r.createElement(an.d,{title:u,description:l}),r.createElement(f,null),r.createElement(S,null),r.createElement(Ft,null),r.createElement("div",{className:(0,a.Z)(s.k.wrapper.main,i)},r.createElement(o.Z,{fallback:ln},t)),!n&&r.createElement(Jt,null))}},5537:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(3117),a=n(102),o=n(7294),i=n(9960),u=n(9750),l=n(4996),s=n(2263),c=n(6668),d=["imageClassName","titleClassName"];function f(e){var t=(0,s.Z)().siteConfig.title,n=(0,c.L)().navbar,f=n.title,p=n.logo,h=void 0===p?{src:""}:p,g=e.imageClassName,m=e.titleClassName,v=(0,a.Z)(e,d),b=(0,l.Z)(h.href||"/"),y={light:(0,l.Z)(h.src),dark:(0,l.Z)(h.srcDark||h.src)},w=o.createElement(u.Z,{sources:y,height:h.height,width:h.width,alt:h.alt||f||t});return o.createElement(i.Z,(0,r.Z)({to:b},v,h.target&&{target:h.target}),h.src&&(g?o.createElement("div",{className:g},w):w),null!=f&&o.createElement("b",{className:m},f))}},4739:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(7294),a=n(5742);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},9750:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(3117),a=n(102),o=n(7294),i=n(6010),u=n(2389),l=n(2949),s={themedImage:"themedImage_W2Cr","themedImage--light":"themedImage--light_TfLj","themedImage--dark":"themedImage--dark_oUvU"},c=["sources","className","alt"];function d(e){var t=(0,u.Z)(),n=(0,l.I)().colorMode,d=e.sources,f=e.className,p=e.alt,h=(0,a.Z)(e,c),g=t?"dark"===n?["dark"]:["light"]:["light","dark"];return o.createElement(o.Fragment,null,g.map((function(e){return o.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,i.Z)(s.themedImage,s["themedImage--"+e],f)},h))})))}},467:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return a}});var r=n(9782);function a(e){var t=r.Z.themeConfig.prism.additionalLanguages;globalThis.Prism=e,t.forEach((function(e){n(4644)("./prism-"+e)})),delete globalThis.Prism}},8320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=(r=n(4865))&&r.__esModule?r:{default:r};n(9014),a.default.configure({showSpinner:!1});var o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){a.default.start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a.default.done()}};t.default=o},2448:function(e,t,n){"use strict";var r=a(n(7410));function a(e){return e&&e.__esModule?e:{default:e}}(0,a(n(467)).default)(r.default)},6043:function(e,t,n){"use strict";n.d(t,{u:function(){return l},z:function(){return m}});var r=n(102),a=n(412),o=n(7294),i=["collapsed"],u=["lazy"];function l(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],a=n[1],i=(0,o.useCallback)((function(){a((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:a,toggleCollapsed:i}}var s={display:"none",overflow:"hidden",height:"0px"},c={display:"block",overflow:"visible",height:"auto"};function d(e,t){var n=t?s:c;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,a=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function i(){var e,t,n=o.scrollHeight,a=null!=(e=null==r?void 0:r.duration)?e:function(e){var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+a+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function u(){var e=i();o.style.transition=e.transition,o.style.height=e.height}if(!a.current)return d(o,n),void(a.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(u(),requestAnimationFrame((function(){o.style.height=s.height,o.style.overflow=s.overflow}))):(o.style.display="block",requestAnimationFrame((function(){u()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function p(e){if(!a.Z.canUseDOM)return e?s:c}function h(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,a=e.children,i=e.animation,u=e.onCollapseTransitionEnd,l=e.className,s=e.disableSSRStyle,c=(0,o.useRef)(null);return f({collapsibleRef:c,collapsed:r,animation:i}),o.createElement(n,{ref:c,style:s?void 0:p(r),onTransitionEnd:function(e){"height"===e.propertyName&&(d(c.current,r),null==u||u(r))},className:l},a)}function g(e){var t=e.collapsed,n=(0,r.Z)(e,i),a=(0,o.useState)(!t),u=a[0],l=a[1],s=(0,o.useState)(t),c=s[0],d=s[1];return(0,o.useLayoutEffect)((function(){t||l(!0)}),[t]),(0,o.useLayoutEffect)((function(){u&&d(t)}),[u,t]),u?o.createElement(h,Object.assign({},n,{collapsed:c})):null}function m(e){var t=e.lazy,n=(0,r.Z)(e,u),a=t?g:h;return o.createElement(a,Object.assign({},n))}},9689:function(e,t,n){"use strict";n.d(t,{nT:function(){return h},pl:function(){return p}});var r=n(7294),a=n(2389),o=n(12),i=n(4700),u=n(6668),l=(0,o.W)("docusaurus.announcement.dismiss"),s=(0,o.W)("docusaurus.announcement.id"),c=function(){return"true"===l.get()},d=function(e){return l.set(String(e))},f=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,u.L)().announcementBar,t=(0,a.Z)(),n=(0,r.useState)((function(){return!!t&&c()})),o=n[0],i=n[1];(0,r.useEffect)((function(){i(c())}),[]);var l=(0,r.useCallback)((function(){d(!0),i(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=s.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;s.set(t),r&&d(!1),!r&&c()||i(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:l}}),[e,o,l])}();return r.createElement(f.Provider,{value:n},t)}function h(){var e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:function(e,t,n){"use strict";n.d(t,{I:function(){return m},S:function(){return g}});var r=n(7294),a=n(4700),o=n(412),i=n(12),u=n(6668),l=r.createContext(void 0),s="theme",c=(0,i.W)(s),d="light",f="dark",p=function(e){return e===f?f:d};function h(){var e=(0,u.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,a=e.respectPrefersColorScheme,i=(0,r.useState)(function(e){return o.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e)}(t)),l=i[0],h=i[1];(0,r.useEffect)((function(){n&&c.del()}),[n]);var g=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(h(e),o&&function(e){c.set(p(e))}(e)):(h(a?window.matchMedia("(prefers-color-scheme: dark)").matches?f:d:t),c.del())}),[a,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",p(l))}),[l]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===s){var t=c.get();null!==t&&g(p(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,g]);var m=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||a){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||m.current?m.current=window.matchMedia("print").matches:g(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[g,n,a]),(0,r.useMemo)((function(){return{colorMode:l,setColorMode:g,get isDarkTheme(){return l===f},setLightTheme:function(){g(d)},setDarkTheme:function(){g(f)}}}),[l,g])}function g(e){var t=e.children,n=h();return r.createElement(l.Provider,{value:n},t)}function m(){var e=(0,r.useContext)(l);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return v}});var r=n(7294),a=n(6668),o=n(2802),i=n(4700),u=n(12),l=n(5551),s=n(9935),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,u.W)(c(e),{persistence:t}).set(n)},f=function(e,t){return(0,u.W)(c(e),{persistence:t}).get()},p=function(e,t){(0,u.W)(c(e),{persistence:t}).del()};var h=r.createContext(null);function g(){var e=(0,l._r)(),t=(0,a.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),i=o[0],u=o[1];return(0,r.useEffect)((function(){u(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,a=f(t,n),r[t].versions.some((function(e){return e.name===a}))?{preferredVersionName:a}:(p(t,n),{preferredVersionName:null}))];var t,a})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[i,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),u((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function m(e){var t=e.children,n=g();return r.createElement(h.Provider,{value:n},t)}function v(e){var t=e.children;return o.cE?r.createElement(m,null,t):t}function b(){var e=(0,r.useContext)(h);if(!e)throw new i.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=s.m);var n=(0,l.zh)(e),a=b(),o=a[0],i=a[1],u=o[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===u})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){i.savePreferredVersion(e,t)}),[i,e])}}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return l},b:function(){return u}});var r=n(7294),a=n(4700),o=Symbol("EmptyContext"),i=r.createContext(o);function u(e){var t=e.children,n=e.name,a=e.items,o=(0,r.useMemo)((function(){return n&&a?{name:n,items:a}:null}),[n,a]);return r.createElement(i.Provider,{value:o},t)}function l(){var e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},2961:function(e,t,n){"use strict";n.d(t,{M:function(){return f},e:function(){return p}});var r=n(7294),a=n(3102),o=n(7524),i=n(6775),u=n(4700);function l(e){!function(e){var t=(0,i.k6)().block,n=(0,u.ed)(e);(0,r.useEffect)((function(){return t((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var s=n(6668),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.HY)(),0===(0,s.L)().navbar.items.length&&!e.component),n=(0,o.i)(),i=!t&&"mobile"===n,u=(0,r.useState)(!1),c=u[0],d=u[1];l((function(){if(c)return d(!1),!1}));var f=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:i,toggle:f,shown:c}}),[t,i,f,c])}function f(e){var t=e.children,n=d();return r.createElement(c.Provider,{value:n},t)}function p(){var e=r.useContext(c);if(void 0===e)throw new u.i6("NavbarMobileSidebarProvider");return e}},3102:function(e,t,n){"use strict";n.d(t,{HY:function(){return u},Zo:function(){return l},n2:function(){return i}});var r=n(7294),a=n(4700),o=r.createContext(null);function i(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function u(){var e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){var t=e.component,n=e.props,i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");var u,l=i[1],s=(u=n,(0,r.useMemo)((function(){return u}),[].concat(Object.keys(u),Object.values(u))));return(0,r.useEffect)((function(){l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((function(){return function(){return l({component:null,props:null})}}),[l]),null}},9727:function(e,t,n){"use strict";n.d(t,{h:function(){return a},t:function(){return o}});var r=n(7294),a="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7524:function(e,t,n){"use strict";n.d(t,{i:function(){return s}});var r=n(7294),a=n(412),o="desktop",i="mobile",u="ssr";function l(){return a.Z.canUseDOM?window.innerWidth>996?o:i:u}function s(){var e=(0,r.useState)((function(){return l()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(l())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},5281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-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"},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:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},2802:function(e,t,n){"use strict";n.d(t,{Wl:function(){return p},_F:function(){return g},cE:function(){return f},hI:function(){return w},lO:function(){return v},vY:function(){return y},oz:function(){return b},s1:function(){return m}});var r=n(7872),a=n(7294),o=n(5551),i=n(373),u=n(1116);function l(e){return Array.from(new Set(e))}var s=n(8596),c=n(6775),d=n(8790),f=!!o._r;function p(e){if(e.href)return e.href;for(var t,n=(0,r.Z)(e.items);!(t=n()).done;){var a=t.value;if("link"===a.type)return a.href;if("category"===a.type){var o=p(a);if(o)return o}}}var h=function(e,t){return void 0!==e&&(0,s.Mg)(e,t)};function g(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||function(e,t){return e.some((function(e){return g(e,t)}))}(e.items,t))}function m(){var e,t=(0,u.V)(),n=(0,c.TH)().pathname;if(!1===(null==(e=(0,o.gA)())?void 0:e.pluginData.breadcrumbs)||!t)return null;var a=[];return function e(t){for(var o,i=(0,r.Z)(t);!(o=i()).done;){var u=o.value;if("category"===u.type&&((0,s.Mg)(u.href,n)||e(u.items))||"link"===u.type&&(0,s.Mg)(u.href,n))return a.push(u),!0}return!1}(t.items),a.reverse()}function v(e){var t=(0,o.Iw)(e).activeVersion,n=(0,i.J)(e).preferredVersion,r=(0,o.yW)(e);return(0,a.useMemo)((function(){return l([t,n,r].filter(Boolean))}),[t,n,r])}function b(e,t){var n=v(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function y(e,t){var n=v(t);return(0,a.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+l(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function w(e){var t=e.route,n=e.versionMetadata,r=(0,c.TH)(),a=t.routes,o=a.find((function(e){return(0,c.LX)(r.pathname,e)}));if(!o)return null;var i=o.sidebar,u=i?n.docsSidebars[i]:void 0;return{docElement:(0,d.H)(a,{versionMetadata:n}),sidebarName:i,sidebarItems:u}}},1944:function(e,t,n){"use strict";n.d(t,{FG:function(){return f},d:function(){return c},VC:function(){return p}});var r=n(7294),a=n(5742),o=n(6010),i=n(226);function u(){var e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(4996),s=n(2263);function c(e){var t=e.title,n=e.description,o=e.keywords,i=e.image,u=e.children,c=function(e){var t=(0,s.Z)().siteConfig,n=t.title,r=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),d=(0,l.C)().withBaseUrl,f=i?d(i,{absolute:!0}):void 0;return r.createElement(a.Z,null,t&&r.createElement("title",null,c),t&&r.createElement("meta",{property:"og:title",content:c}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),u)}var d=r.createContext(void 0);function f(e){var t=e.className,n=e.children,i=r.useContext(d),u=(0,o.Z)(i,t);return r.createElement(d.Provider,{value:u},r.createElement(a.Z,null,r.createElement("html",{className:u})),n)}function p(e){var t=e.children,n=u(),a="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,o.Z)(a,i)},t)}},4700:function(e,t,n){"use strict";n.d(t,{i6:function(){return h},ed:function(){return f},D9:function(){return p}});var r=n(7802),a=n(1073);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(9817);function u(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,n){return l=u()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&(0,i.Z)(a,n.prototype),a},l.apply(null,arguments)}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(r,e)},s(e)}var c=n(7294),d=n(412).Z.canUseDOM?c.useLayoutEffect:c.useEffect;function f(e){var t=(0,c.useRef)(e);return d((function(){t.current=e}),[e]),(0,c.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function p(e){var t=(0,c.useRef)();return d((function(){t.current=e})),t.current}var h=function(e){function t(t,n){var a,o,i,u;return(u=e.call(this)||this).name="ReactContextError",u.message="Hook "+(null==(a=u.stack)||null==(o=a.split("\n")[1])||null==(i=o.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:i.groups.name)+" is called outside the <"+t+">. "+(n||""),u}return(0,a.Z)(t,e),t}(s(Error))},8596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return i},Ns:function(){return u}});var r=n(7294),a=n(723),o=n(2263);function i(e,t){var n=function(e){var t;return null==(t=!e||null!=e&&e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function u(){var e=(0,o.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:a.Z,baseUrl:e})}),[e])}},2466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return f},OC:function(){return l},RF:function(){return d}});var r=n(7294),a=n(4700),o=n(412),i=n(2389);var u=r.createContext(void 0);function l(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(u.Provider,{value:a},n)}function s(){var e=(0,r.useContext)(u);if(null==e)throw new a.i6("ScrollControllerProvider");return e}var c=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=s().scrollEventsEnabledRef,o=(0,r.useRef)(c()),i=(0,a.ed)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=c();i&&i(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[i,n].concat(t))}function f(){var e=(0,r.useRef)(null),t=(0,i.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&ac.length?e(a.substr(c.length),d):n.push(d),l=!0}else for(var f=c.length-1;f>u;f-=1){var p=c.substr(0,f);if(a.substr(0,f)===p){u=f;var h={missed:o.missed,term:o.term.concat({value:p,trailing:!0})};a.length>f?e(a.substr(f),h):n.push(h),l=!0;break}}}l||(a.length>0?e(a.substr(1),{missed:o.missed+1,term:o.term}):o.term.length>0&&n.push(o))}(e,{missed:0,term:[]}),n.sort((function(e,t){var n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((function(e){return e.term}))}(i,t),s=(0,r.Z)(l);!(u=s()).done;){var c=u.value,d=o.concat.apply(o,c);e(a.slice(1),d)}else{var f=o.concat({value:i});e(a.slice(1),f)}}else n.push(o)}(e,[]),n}var u=n(1029);function l(e){return s(e).concat(s(e.filter((function(e){var t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function s(e,t){return e.map((function(e){return{tokens:e.map((function(e){return e.value})),term:e.map((function(e){return{value:e.value,presence:o().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?o().Query.wildcard.TRAILING:o().Query.wildcard.NONE}}))}}))}function c(e,t,n){return function(a,s){var c=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return o()[t[0]].tokenizer(e).map((function(e){return e.toString()}));var n=/[^-\s]+/g;return t.includes("zh")&&(n=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD884[\uDC00-\uDF4A])+/g),e.toLowerCase().match(n)||[]}(a,u.dK);if(0!==c.length){var d=function(e,t){var n=i(e,t);if(0===n.length)return[{tokens:e,term:e.map((function(e){return{value:e,presence:o().Query.presence.REQUIRED,wildcard:o().Query.wildcard.LEADING|o().Query.wildcard.TRAILING}}))}];for(var a,s=(0,r.Z)(n);!(a=s()).done;){var c=a.value;c[c.length-1].maybeTyping=!0}for(var d,f,p=[],h=(0,r.Z)(u.dK);!(d=h()).done;){var g=d.value;if("en"===g)u._k||p.unshift(o().stopWordFilter);else{var m=o()[g];m.stopWordFilter&&p.unshift(m.stopWordFilter)}}if(p.length>0){var v=function(e){return p.reduce((function(e,t){return e.filter((function(e){return t(e.value)}))}),e)};f=[];for(var b,y=[],w=(0,r.Z)(n);!(b=w()).done;){var k=b.value,E=v(k);f.push(E),E.length0&&y.push(E)}n.push.apply(n,y)}else f=n.slice();for(var S,x=[],_=(0,r.Z)(f);!(S=_()).done;){var C=S.value;if(C.length>2)for(var T=C.length-1;T>=0;T-=1)x.push(C.slice(0,T).concat(C.slice(T+1)))}return l(n).concat(l(x))}(c,t),f=[],p=function(){for(var t,a=h.value,o=a.term,i=a.tokens,u=function(){var a=t.value,u=a.documents,l=a.index,s=a.type;if(f.push.apply(f,l.query((function(e){for(var t,n=(0,r.Z)(o);!(t=n()).done;){var a=t.value;e.term(a.value,{wildcard:a.wildcard,presence:a.presence})}})).slice(0,n).filter((function(e){return!f.some((function(t){return t.document.i.toString()===e.ref}))})).slice(0,n-f.length).map((function(t){var n=u.find((function(e){return e.i.toString()===t.ref}));return{document:n,type:s,page:0!==s&&e[0].documents.find((function(e){return e.i===n.p})),metadata:t.matchData.metadata,tokens:i,score:t.score}}))),f.length>=n)return{v:"break|search"}},l=(0,r.Z)(e);!(t=l()).done;){var s=u();if("object"==typeof s)return s.v}};e:for(var h,g=(0,r.Z)(d);!(h=g()).done;){if("break|search"===p())break e}!function(e){e.forEach((function(e,t){e.index=t})),e.sort((function(t,n){var r=t.type>0&&t.page?e.findIndex((function(e){return e.document===t.page})):t.index,a=n.type>0&&n.page?e.findIndex((function(e){return e.document===n.page})):n.index;return-1===r&&(r=t.index),-1===a&&(a=n.index),r===a?0===t.type?-1:0===n.type?1:t.index-n.index:r-a}))}(f),function(e){e.forEach((function(t,n){n>0&&t.page&&e.some((function(e){return e.document===t.page}))&&(n/g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{X:function(){return r}})},2775:function(e,t,n){"use strict";function r(e,t){for(var n=[],r=0,a=Object.values(e);r=0){c>0&&u.push(o(e.substr(0,c),t)),u.push(""+(0,a.X)(e.substr(c,s.length))+"");var d=c+s.length;d"+(0,a.X)(e)+"":(0,a.X)(e):u.join("")}},726:function(e,t,n){"use strict";n.d(t,{o:function(){return l}});var r=n(1690),a=n(2539),o=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD884[\uDC00-\uDF4A])/;function i(e){for(var t=[],n=0,r=e;r.length>0;){var a=r.match(o);if(!a){t.push(r);break}a.index>0&&t.push(r.substr(0,a.index)),t.push(a[0]),n+=a.index+a[0].length,r=e.substr(n)}return t}var u=n(1029);function l(e,t,n,r){void 0===r&&(r=u.Hk);for(var a={chunkIndex:-1},o=s(e,t,n,0,0,a),i=o.slice(0,a.chunkIndex),l=o[a.chunkIndex],c=[l.html],d=o.slice(a.chunkIndex+1),f=l.textLength,p=0,h=0,g=!1,m=!1;f0){var v=i.pop();f+v.textLength<=r?(c.unshift(v.html),p+=v.textLength,f+=v.textLength):(g=!0,i.length=0)}else{if(!(d.length>0))break;var b=d.shift();f+b.textLength<=r?(c.push(b.html),h+=b.textLength,f+=b.textLength):(m=!0,d.length=0)}return(g||i.length>0)&&c.unshift("\u2026"),(m||d.length>0)&&c.push("\u2026"),c.join("")}function s(e,t,n,o,u,l){var c=[],d=t[o],f=d[0],p=d[1];if(fu&&c.push.apply(c,i(e.substring(u,f)).map((function(e){return{html:(0,r.X)(e),textLength:e.length}}))),l&&(l.chunkIndex=c.length),c.push({html:(0,a.C)(e.substr(f,p),n,!0),textLength:p});var h=f+p;(o+=1)=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!s)for(;d--;d)i.unshift("..");!s||""===i[0]||i[0]&&a(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var l=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=u(t),a=u(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(2177);function c(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(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 p(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,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function g(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(u){throw u instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):u}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&l(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!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,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=g(e,t,f(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t0){var l=P.utils.clone(t)||{};l.position=[i,u],l.index=a.length,a.push(new P.Token(n.slice(i,o),l))}i=o+1}}return a},P.tokenizer.separator=/[\s\-]+/,P.Pipeline=function(){this._stack=[]},P.Pipeline.registeredFunctions=Object.create(null),P.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&P.utils.warn("Overwriting existing registered function: "+t),e.label=t,P.Pipeline.registeredFunctions[e.label]=e},P.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||P.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},P.Pipeline.load=function(e){var t=new P.Pipeline;return e.forEach((function(e){var n=P.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},P.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){P.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},P.Pipeline.prototype.after=function(e,t){P.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)},P.Pipeline.prototype.before=function(e,t){P.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},P.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},P.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:ou?s+=2:i==u&&(t+=n[l+1]*r[s+1],l+=2,s+=2);return t},P.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},P.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new P.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var u=a.node.edges["*"];else{u=new P.TokenSet;a.node.edges["*"]=u}if(0==a.str.length&&(u.final=!0),r.push({node:u,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var l=a.node.edges["*"];else{l=new P.TokenSet;a.node.edges["*"]=l}1==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var s,c=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?s=a.node.edges[d]:(s=new P.TokenSet,a.node.edges[d]=s),1==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:c+a.str.slice(2)})}}}return n},P.TokenSet.fromString=function(e){for(var t=new P.TokenSet,n=t,r=0,a=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()}},P.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},P.Index.prototype.search=function(e){return this.query((function(t){new P.QueryParser(e,t).parse()}))},P.Index.prototype.query=function(e){for(var t=new P.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),u=0;u1?1:e},P.Builder.prototype.k1=function(e){this._k1=e},P.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 a=0;a=this.length)return P.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},P.QueryLexer.prototype.width=function(){return this.pos-this.start},P.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},P.QueryLexer.prototype.backup=function(){this.pos-=1},P.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=P.QueryLexer.EOS&&this.backup()},P.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(P.QueryLexer.TERM)),e.ignore(),e.more())return P.QueryLexer.lexText},P.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(P.QueryLexer.EDIT_DISTANCE),P.QueryLexer.lexText},P.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(P.QueryLexer.BOOST),P.QueryLexer.lexText},P.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(P.QueryLexer.TERM)},P.QueryLexer.termSeparator=P.tokenizer.separator,P.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==P.QueryLexer.EOS)return P.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return P.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(P.QueryLexer.TERM),P.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(P.QueryLexer.TERM),P.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(P.QueryLexer.PRESENCE),P.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(P.QueryLexer.PRESENCE),P.QueryLexer.lexText;if(t.match(P.QueryLexer.termSeparator))return P.QueryLexer.lexTerm}else e.escapeCharacter()}},P.QueryParser=function(e,t){this.lexer=new P.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},P.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=P.QueryParser.parseClause;e;)e=e(this);return this.query},P.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},P.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},P.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},P.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case P.QueryLexer.PRESENCE:return P.QueryParser.parsePresence;case P.QueryLexer.FIELD:return P.QueryParser.parseField;case P.QueryLexer.TERM:return P.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 P.QueryParseError(n,t.start,t.end)}},P.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=P.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=P.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new P.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new P.QueryParseError(n,t.start,t.end)}switch(r.type){case P.QueryLexer.FIELD:return P.QueryParser.parseField;case P.QueryLexer.TERM:return P.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new P.QueryParseError(n,r.start,r.end)}}},P.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 P.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new P.QueryParseError(r,t.start,t.end)}if(a.type===P.QueryLexer.TERM)return P.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new P.QueryParseError(r,a.start,a.end)}},P.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 P.QueryLexer.TERM:return e.nextClause(),P.QueryParser.parseTerm;case P.QueryLexer.FIELD:return e.nextClause(),P.QueryParser.parseField;case P.QueryLexer.EDIT_DISTANCE:return P.QueryParser.parseEditDistance;case P.QueryLexer.BOOST:return P.QueryParser.parseBoost;case P.QueryLexer.PRESENCE:return e.nextClause(),P.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new P.QueryParseError(r,n.start,n.end)}else e.nextClause()}},P.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 P.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case P.QueryLexer.TERM:return e.nextClause(),P.QueryParser.parseTerm;case P.QueryLexer.FIELD:return e.nextClause(),P.QueryParser.parseField;case P.QueryLexer.EDIT_DISTANCE:return P.QueryParser.parseEditDistance;case P.QueryLexer.BOOST:return P.QueryParser.parseBoost;case P.QueryLexer.PRESENCE:return e.nextClause(),P.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new P.QueryParseError(r,a.start,a.end)}else e.nextClause()}},P.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 P.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case P.QueryLexer.TERM:return e.nextClause(),P.QueryParser.parseTerm;case P.QueryLexer.FIELD:return e.nextClause(),P.QueryParser.parseField;case P.QueryLexer.EDIT_DISTANCE:return P.QueryParser.parseEditDistance;case P.QueryLexer.BOOST:return P.QueryParser.parseBoost;case P.QueryLexer.PRESENCE:return e.nextClause(),P.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new P.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return P})?r.call(t,n,t,e):r)||(e.exports=a)}()},6743:function(e,t,n){"use strict";n.r(t)},9014:function(e,t,n){"use strict";n.r(t)},2497:function(e,t,n){"use strict";n.r(t)},2295:function(e,t,n){"use strict";n.r(t)},4865:function(e,t,n){var r,a;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 a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}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=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),s=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,u((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(s,i(e,c,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),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)*a(Math.random()*t,.1,.95)),t=a(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");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),u=e?"-100":o(n.status||0),s=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),s!=document.body&&c(s,"nprogress-custom-parent"),s.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 u=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,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,u,l=a(e),s=1;s=d.reach);S+=E.value.length,E=E.next){var x=E.value;if(t.length>e.length)return;if(!(x instanceof a)){var _,C=1;if(b){if(!(_=o(k,S,e,v))||_.index>=e.length)break;var T=_.index,L=_.index+_[0].length,A=S;for(A+=E.value.length;T>=A;)A+=(E=E.next).value.length;if(S=A-=E.value.length,E.value instanceof a)continue;for(var O=E;O!==t.tail&&(Ad.reach&&(d.reach=I);var R=E.prev;if(N&&(R=l(t,R,N),S+=N.length),s(t,R,C),E=l(t,R,new a(f,m?r.tokenize(P,m):P,y,P)),D&&l(t,E,D),C>1){var F={cause:f+","+h,reach:I};i(e,t,n,E.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function s(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,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+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},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|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|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|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 a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},u=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var l=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=i(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}a.content&&"string"!=typeof a.content&&u(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||u(e.tokens)}))}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,u=o.indexOf(a);if(-1!==u){++i;var l=o.substring(0,u),d=s(c[a]),p=o.substring(u+a.length),h=[];if(l&&h.push(l),h.push(d),p){var g=[p];e(g),h.push.apply(h,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(h)),n+=h.length-1):r.content=h}}else{var m=r.content;Array.isArray(m)?e(m):e([m])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var u=f(/^\{$/,/^\}$/);if(-1===u)continue;for(var l=n;l=0&&p(s,"variable-input")}}}}function c(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n=o.length);l++){var s=u[l];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof s?s:s.content,p=t(r,c),h=f.indexOf(p);if(h>-1){++a;var g=f.substring(0,h),m=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),v=f.substring(h+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(m),v&&b.push.apply(b,i([v])),"string"==typeof s?u.splice.apply(u,[l,1].concat(b)):s.content=b}}else s.content&&i(s.content)}return u}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.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"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),t.default=a},6512:function(){!function(e){e.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:e.languages.ruby}},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"erb")}))}(Prism)},9385:function(){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)},4644:function(e,t,n){var r={"./prism-erb":6512,"./prism-ruby":9385};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=4644},2703:function(e,t,n){"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var u=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 u.name="Invariant Violation",u}}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:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:function(e,t,n){e.exports=n(2703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:function(e,t,n){"use strict";var r=n(7294),a=n(7418),o=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n