"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([[45871],{45871:(t,e,r)=>{var n,o,a,i,E,L=r(74199);e.BLOCKS=void 0,(n=e.BLOCKS||(e.BLOCKS={})).DOCUMENT="document",n.PARAGRAPH="paragraph",n.HEADING_1="heading-1",n.HEADING_2="heading-2",n.HEADING_3="heading-3",n.HEADING_4="heading-4",n.HEADING_5="heading-5",n.HEADING_6="heading-6",n.OL_LIST="ordered-list",n.UL_LIST="unordered-list",n.LIST_ITEM="list-item",n.HR="hr",n.QUOTE="blockquote",n.EMBEDDED_ENTRY="embedded-entry-block",n.EMBEDDED_ASSET="embedded-asset-block",n.EMBEDDED_RESOURCE="embedded-resource-block",n.TABLE="table",n.TABLE_ROW="table-row",n.TABLE_CELL="table-cell",n.TABLE_HEADER_CELL="table-header-cell",e.INLINES=void 0,(o=e.INLINES||(e.INLINES={})).ASSET_HYPERLINK="asset-hyperlink",o.EMBEDDED_ENTRY="embedded-entry-inline",o.EMBEDDED_RESOURCE="embedded-resource-inline",o.ENTRY_HYPERLINK="entry-hyperlink",o.HYPERLINK="hyperlink",o.RESOURCE_HYPERLINK="resource-hyperlink",e.MARKS=void 0,(a=e.MARKS||(e.MARKS={})).BOLD="bold",a.ITALIC="italic",a.UNDERLINE="underline",a.CODE="code",a.SUPERSCRIPT="superscript",a.SUBSCRIPT="subscript",a.STRIKETHROUGH="strikethrough";var u=function(t,e){return(u=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function S(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function c(t,e,r){if(r||2==arguments.length)for(var n,o=0,a=e.length;o=e||(r.catch(I({min:e,value:n,path:r.path.of(t)})),!1)},this.noAdditionalProperties=function(t){var e=Object.keys(r.obj).sort().filter(function(e){return!t.includes(e)});return e.forEach(function(t){return r.catch(d({property:t,path:r.path.of(t)}))}),0===e.length},this.each=function(t,e){if(r.array(t)){var n=r.obj[t],o=!1;n.forEach(function(n,a){if(!o){var i=e(n,r.path.of(t).of(a));i.length>0&&(o=!0),r.catch.apply(r,i)}})}}}return Object.defineProperty(t.prototype,"errors",{get:function(){var t=this,e=function(t){return JSON.stringify({details:t.details,path:t.path})};return this._errors.filter(function(r,n){return t._errors.findIndex(function(t){return e(r)===e(t)})===n})},enumerable:!1,configurable:!0}),t}(),H=[],b=function(){function t(t,e){this.contentRule=t,this.validateData=e}return t.prototype.assert=function(t,e){var r,n,o=new v(t,e);if(!o.object())return o.errors;o.noAdditionalProperties(["nodeType","data","content"]);var a=Array.isArray(this.contentRule)?{nodeTypes:this.contentRule}:this.contentRule(t,e),i=a.nodeTypes,E=a.min,L=void 0===E?0:E;if(0===i.length&&L>0)throw Error("Invalid content rule. Cannot have enforce a 'min' of ".concat(L," with no nodeTypes"));if(o.minLength("content",L),0===i.length?o.empty("content"):o.each("content",function(t,e){var r=new v(t,e);return r.object()&&r.enum("nodeType",i),r.errors}),o.object("data")){var u=null!=(n=null==(r=this.validateData)?void 0:r.call(this,t.data,e.of("data")))?n:[];o.catch.apply(o,u)}return o.errors},t}(),m=function(t){function e(e,r){var n=t.call(this,r,function(t,e){return n.assertLink(t,e)})||this;return n.linkType=e,n.assertLink=function(t,e){var r=new v(t,e);if(r.object("target")){var o=new v(t.target.sys,e.of("target").of("sys"));o.object()&&(o.enum("type",[n.type]),o.enum("linkType",[n.linkType]),"Link"===n.type?(o.string("id"),o.noAdditionalProperties(["type","linkType","id"])):"ResourceLink"===n.type&&(o.string("urn"),o.noAdditionalProperties(["type","linkType","urn"]))),r.catch.apply(r,o.errors)}return r.noAdditionalProperties(["target"]),r.errors},n.type=n.linkType.startsWith("Contentful:")?"ResourceLink":"Link",n}return S(e,t),e}(b),P=function(t){function e(){var e=t.call(this,["text"],function(t,r){return e.assertLink(t,r)})||this;return e.assertLink=function(t,e){var r=new v(t,e);return r.string("uri"),r.noAdditionalProperties(["uri"]),r.errors},e}return S(e,t),e}(b),g=function(t,e){return new b(t,e)},G=function(t,e){return new m(t,e)},M=function t(e){void 0===e&&(e=[]);var r=this;this.path=e,this.of=function(e){return new t(c(c([],r.path,!0),[e],!1))},this.isRoot=function(){return 0===r.path.length},this.last=function(){return r.path[r.path.length-1]},this.toArray=function(){return r.path}},j=g(c(c([],Object.values(e.INLINES),!0),["text"],!1).sort()),U=g([e.BLOCKS.LIST_ITEM]),k=G("Entry",H),x=g(function(){return{nodeTypes:[e.BLOCKS.PARAGRAPH],min:1}},function(t,e){var r=new v(t,e);return r.noAdditionalProperties(["colspan","rowspan"]),r.number("colspan",!0),r.number("rowspan",!0),r.errors}),w=((E={})[e.BLOCKS.DOCUMENT]=g(s),E[e.BLOCKS.PARAGRAPH]=j,E[e.BLOCKS.HEADING_1]=j,E[e.BLOCKS.HEADING_2]=j,E[e.BLOCKS.HEADING_3]=j,E[e.BLOCKS.HEADING_4]=j,E[e.BLOCKS.HEADING_5]=j,E[e.BLOCKS.HEADING_6]=j,E[e.BLOCKS.QUOTE]=g(C[e.BLOCKS.QUOTE]),E[e.BLOCKS.EMBEDDED_ENTRY]=k,E[e.BLOCKS.EMBEDDED_ASSET]=G("Asset",H),E[e.BLOCKS.EMBEDDED_RESOURCE]=G("Contentful:Entry",H),E[e.BLOCKS.HR]=g(H),E[e.BLOCKS.OL_LIST]=U,E[e.BLOCKS.UL_LIST]=U,E[e.BLOCKS.LIST_ITEM]=g(c([],p,!0).sort()),E[e.BLOCKS.TABLE]=g(function(){return{nodeTypes:[e.BLOCKS.TABLE_ROW],min:1}}),E[e.BLOCKS.TABLE_ROW]=g(function(){return{nodeTypes:[e.BLOCKS.TABLE_CELL,e.BLOCKS.TABLE_HEADER_CELL],min:1}}),E[e.BLOCKS.TABLE_CELL]=x,E[e.BLOCKS.TABLE_HEADER_CELL]=x,E[e.INLINES.HYPERLINK]=new P,E[e.INLINES.EMBEDDED_ENTRY]=k,E[e.INLINES.EMBEDDED_RESOURCE]=G("Contentful:Entry",H),E[e.INLINES.ENTRY_HYPERLINK]=G("Entry",["text"]),E[e.INLINES.ASSET_HYPERLINK]=G("Asset",["text"]),E[e.INLINES.RESOURCE_HYPERLINK]=G("Contentful:Entry",["text"]),E);e.CONTAINERS=C,e.EMPTY_DOCUMENT=K,e.HEADINGS=l,e.LIST_ITEM_BLOCKS=p,e.TABLE_BLOCKS=O,e.TEXT_CONTAINERS=h,e.TOP_LEVEL_BLOCKS=s,e.V1_MARKS=_,e.V1_NODE_TYPES=A,e.VOID_BLOCKS=B,e.helpers=D,e.validateRichTextDocument=function(t){var r=new M,n=new v(t,r);return(n.object()&&n.enum("nodeType",[e.BLOCKS.DOCUMENT]),n.errors.length>0)?n.errors:function t(e,r){if("text"===e.nodeType){var n;return(n=new v(e,r)).object()&&(n.noAdditionalProperties(["nodeType","data","value","marks"]),n.object("data"),n.each("marks",function(t,e){var r=new v(t,e);return r.object()&&r.string("type"),r.errors}),n.string("value")),n.errors}var o=w[e.nodeType].assert(e,r);if(o.length>0)return o;var a=new v(e,r);return a.each("content",function(e,r){return t(e,r)}),a.errors}(t,r)}},74199:t=>{t.exports=t=>{if("[object Object]"!==Object.prototype.toString.call(t))return!1;let e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}}}]); //# sourceMappingURL=45871-e543b5388ce0.js.map