decap-cms-backend-forgejo 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.4.1](https://github.com/decaporg/decap-cms/compare/decap-cms-backend-forgejo@3.4.0...decap-cms-backend-forgejo@3.4.1) (2026-09-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package decap-cms-backend-forgejo
|
|
9
|
+
|
|
6
10
|
# 3.4.0 (2026-07-23)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package decap-cms-backend-forgejo
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! For license information please see decap-cms-backend-forgejo.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendForgejo",["decap-cms-lib-util","@emotion/react","react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendForgejo=t(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):e.DecapCmsBackendForgejo=t(e.DecapCmsLibUtil,e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsLibAuth,e.DecapCmsUiDefault)}(window,(e,t,r,n,i,o)=>(()=>{var a={5985(e,t,r){"use strict";var n=r(524),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return n.isMemo(e)?a:s[e.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var u=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(d){var i=f(r);i&&i!==d&&e(t,i,n)}var a=l(r);h&&(a=a.concat(h(r)));for(var s=c(t),g=c(r),y=0;y<a.length;++y){var m=a[y];if(!(o[m]||n&&n[m]||g&&g[m]||s&&s[m])){var v=p(r,m);try{u(t,m,v)}catch(e){}}}}return t}},5098(e,t,r){var n=r(3305),i=r(9361),o=r(1112),a=r(5276),s=r(7452);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},7553(e,t,r){var n=r(9747),i=r(5962);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},1386(e,t,r){var n=r(2393),i=r(2049),o=r(7144),a=r(5071),s=r(3964);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},528(e,t,r){var n=r(9747),i=r(5962);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},9770(e,t,r){var n=r(4715)(r(8942),"Map");e.exports=n},8250(e,t,r){var n=r(9753),i=r(5681),o=r(88),a=r(4732),s=r(9068);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},5650(e,t,r){var n=r(8942).Symbol;e.exports=n},9270(e,t,r){var n=r(4715)(r(8942),"WeakMap");e.exports=n},6912(e){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},9968(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},9756(e,t,r){var n=r(2478);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},5111(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},2837(e){e.exports=function(e){return e.split("")}},7034(e,t,r){var n=r(6285);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9747(e,t,r){var n=r(1580),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},7250(e){e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},7379(e,t,r){var n=r(5650),i=r(8870),o=r(9005),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},2478(e,t,r){var n=r(7250),i=r(9454),o=r(7706);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},9454(e){e.exports=function(e){return e!=e}},9624(e,t,r){var n=r(3655),i=r(4759),o=r(1580),a=r(4066),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,p=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?p:s).test(a(e))}},5962(e){e.exports=function(){}},3945(e,t,r){var n=r(2053),i=r(5234),o=r(796);e.exports=function(e,t){return o(i(e,t,n),e+"")}},4943(e,t,r){var n=r(2053),i=r(6065),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},7403(e,t,r){var n=r(2619),i=r(2532),o=r(2053),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},3501(e){e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},2291(e,t,r){var n=r(5650),i=r(5111),o=r(3142),a=r(1187),s=n?n.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},6403(e,t,r){var n=r(2945),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},3526(e,t,r){var n=r(3142),i=r(5187),o=r(6493),a=r(5243);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},8931(e,t,r){var n=r(3501);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},8774(e,t,r){var n=r(2478);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},7905(e,t,r){var n=r(2478);e.exports=function(e,t){for(var r=-1,i=e.length;++r<i&&n(t,e[r],0)>-1;);return r}},4977(e){var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,c=-1,u=r.length,l=t(a-s,0),h=Array(u+l),p=!i;++c<u;)h[c]=r[c];for(;++o<s;)(p||o<a)&&(h[n[o]]=e[o]);for(;l--;)h[c++]=e[o++];return h}},5755(e){var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,c=n.length,u=-1,l=r.length,h=t(a-c,0),p=Array(h+l),f=!i;++o<h;)p[o]=e[o];for(var d=o;++u<l;)p[d+u]=r[u];for(;++s<c;)(f||o<a)&&(p[d+n[s]]=e[o++]);return p}},4354(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},1950(e,t,r){var n=r(8942)["__core-js_shared__"];e.exports=n},3816(e){e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},6713(e,t,r){var n=r(4364),i=r(8942);e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){return(this&&this!==i&&this instanceof t?a:e).apply(o?r:this,arguments)}}},4364(e,t,r){var n=r(9747),i=r(1580);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},2443(e,t,r){var n=r(6912),i=r(4364),o=r(3504),a=r(4216),s=r(6850),c=r(8813),u=r(8942);e.exports=function(e,t,r){var l=i(e);return function i(){for(var h=arguments.length,p=Array(h),f=h,d=s(i);f--;)p[f]=arguments[f];var g=h<3&&p[0]!==d&&p[h-1]!==d?[]:c(p,d);return(h-=g.length)<r?a(e,t,o,i.placeholder,void 0,p,g,void 0,void 0,r-h):n(this&&this!==u&&this instanceof i?l:e,this,p)}}},3504(e,t,r){var n=r(4977),i=r(5755),o=r(3816),a=r(4364),s=r(4216),c=r(6850),u=r(6591),l=r(8813),h=r(8942);e.exports=function e(t,r,p,f,d,g,y,m,v,b){var w=128&r,x=1&r,_=2&r,k=24&r,R=512&r,A=_?void 0:a(t);return function P(){for(var S=arguments.length,C=Array(S),F=S;F--;)C[F]=arguments[F];if(k)var O=c(P),E=o(C,O);if(f&&(C=n(C,f,d,k)),g&&(C=i(C,g,y,k)),S-=E,k&&S<b){var $=l(C,O);return s(t,r,e,P.placeholder,p,C,$,m,v,b-S)}var L=x?p:this,U=_?L[t]:t;return S=C.length,m?C=u(C,m):R&&S>1&&C.reverse(),w&&v<S&&(C.length=v),this&&this!==h&&this instanceof P&&(U=A||a(U)),U.apply(L,C)}}},6341(e,t,r){var n=r(6912),i=r(4364),o=r(8942);e.exports=function(e,t,r,a){var s=1&t,c=i(e);return function t(){for(var i=-1,u=arguments.length,l=-1,h=a.length,p=Array(h+u),f=this&&this!==o&&this instanceof t?c:e;++l<h;)p[l]=a[l];for(;u--;)p[l++]=arguments[++i];return n(f,s?r:this,p)}}},4216(e,t,r){var n=r(6648),i=r(5512),o=r(5620);e.exports=function(e,t,r,a,s,c,u,l,h,p){var f=8&t;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var d=[e,t,s,f?c:void 0,f?u:void 0,f?void 0:c,f?void 0:u,l,h,p],g=r.apply(void 0,d);return n(e)&&i(g,d),g.placeholder=a,o(g,e,t)}},8638(e,t,r){var n=r(4943),i=r(6713),o=r(2443),a=r(3504),s=r(6341),c=r(5196),u=r(7028),l=r(5512),h=r(5620),p=r(7642),f=Math.max;e.exports=function(e,t,r,d,g,y,m,v){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(t&=-97,d=g=void 0),m=void 0===m?m:f(p(m),0),v=void 0===v?v:p(v),w-=g?g.length:0,64&t){var x=d,_=g;d=g=void 0}var k=b?void 0:c(e),R=[e,t,r,d,g,x,_,y,m,v];if(k&&u(R,k),e=R[0],t=R[1],r=R[2],d=R[3],g=R[4],!(v=R[9]=void 0===R[9]?b?0:e.length:f(R[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)A=8==t||16==t?o(e,t,v):32!=t&&33!=t||g.length?a.apply(void 0,R):s(e,t,r,d);else var A=i(e,t,r);return h((k?n:l)(A,R),e,t)}},2532(e,t,r){var n=r(4715),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},4967(e,t,r){var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},5196(e,t,r){var n=r(6065),i=r(9071),o=n?function(e){return n.get(e)}:i;e.exports=o},961(e,t,r){var n=r(3476),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},6850(e){e.exports=function(e){return e.placeholder}},4700(e,t,r){var n=r(9067);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},4715(e,t,r){var n=r(9624),i=r(155);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},8870(e,t,r){var n=r(5650),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},155(e){e.exports=function(e,t){return null==e?void 0:e[t]}},8788(e){var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},3417(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3305(e,t,r){var n=r(4497);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},9361(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1112(e,t,r){var n=r(4497),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},5276(e,t,r){var n=r(4497),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},7452(e,t,r){var n=r(4497);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},9141(e){var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},9632(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=r??9007199254740991)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},5187(e,t,r){var n=r(3142),i=r(1187),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},9067(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},6648(e,t,r){var n=r(7553),i=r(5196),o=r(961),a=r(3321);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},4759(e,t,r){var n,i=r(1950),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},2393(e){e.exports=function(){this.__data__=[],this.size=0}},2049(e,t,r){var n=r(7034),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},7144(e,t,r){var n=r(7034);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},5071(e,t,r){var n=r(7034);e.exports=function(e){return n(this.__data__,e)>-1}},3964(e,t,r){var n=r(7034);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},9753(e,t,r){var n=r(5098),i=r(1386),o=r(9770);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},5681(e,t,r){var n=r(4700);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},88(e,t,r){var n=r(4700);e.exports=function(e){return n(this,e).get(e)}},4732(e,t,r){var n=r(4700);e.exports=function(e){return n(this,e).has(e)}},9068(e,t,r){var n=r(4700);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},6853(e,t,r){var n=r(9011);e.exports=function(e){var t=n(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}},7028(e,t,r){var n=r(4977),i=r(5755),o=r(8813),a="__lodash_placeholder__",s=Math.min;e.exports=function(e,t){var r=e[1],c=t[1],u=r|c,l=u<131,h=128==c&&8==r||128==c&&256==r&&e[7].length<=t[8]||384==c&&t[7].length<=t[8]&&8==r;if(!l&&!h)return e;1&c&&(e[2]=t[2],u|=1&r?0:4);var p=t[3];if(p){var f=e[3];e[3]=f?n(f,p,t[4]):p,e[4]=f?o(e[3],a):t[4]}return(p=t[5])&&(f=e[5],e[5]=f?i(f,p,t[6]):p,e[6]=f?o(e[5],a):t[6]),(p=t[7])&&(e[7]=p),128&c&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=u,e}},6065(e,t,r){var n=r(9270),i=n&&new n;e.exports=i},4497(e,t,r){var n=r(4715)(Object,"create");e.exports=n},9005(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5234(e,t,r){var n=r(6912),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),c=Array(s);++a<s;)c[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=r(c),n(e,this,u)}}},3476(e){e.exports={}},6591(e,t,r){var n=r(4354),i=r(9632),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var c=t[a];e[a]=i(c,r)?s[c]:void 0}return e}},8813(e){var t="__lodash_placeholder__";e.exports=function(e,r){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==r&&s!==t||(e[n]=t,a[o++]=n)}return a}},8942(e,t,r){var n=r(4967),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},5512(e,t,r){var n=r(4943),i=r(3316)(n);e.exports=i},796(e,t,r){var n=r(7403),i=r(3316)(n);e.exports=i},5620(e,t,r){var n=r(8788),i=r(9141),o=r(796),a=r(33);e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},3316(e){var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},7706(e){e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},2237(e,t,r){var n=r(2837),i=r(3417),o=r(2013);e.exports=function(e){return i(e)?o(e):n(e)}},6493(e,t,r){var n=r(6853),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)}),t});e.exports=a},6040(e,t,r){var n=r(1187);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},4066(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2945(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},2013(e){var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+n+"|"+i+")?",u="[\\ufe0e\\ufe0f]?",l=u+c+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+u+c+")*",h="(?:"+[o+n+"?",n,a,s,r].join("|")+")",p=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(p)||[]}},33(e,t,r){var n=r(9968),i=r(9756),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)}),e.sort()}},3410(e,t,r){var n=r(7553),i=r(528),o=r(4354);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},2619(e){e.exports=function(e){return function(){return e}}},6285(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2053(e){e.exports=function(e){return e}},3142(e){var t=Array.isArray;e.exports=t},3655(e,t,r){var n=r(7379),i=r(1580);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1580(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},547(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1187(e,t,r){var n=r(7379),i=r(547);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},9011(e,t,r){var n=r(8250);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},9071(e){e.exports=function(){}},578(e,t,r){var n=r(3945),i=r(8638),o=r(6850),a=r(8813),s=n(function(e,t){var r=a(t,o(s));return i(e,32,void 0,t,r)});s.placeholder={},e.exports=s},1034(e,t,r){var n=r(3526),i=r(3655),o=r(6040);e.exports=function(e,t,r){var a=-1,s=(t=n(t,e)).length;for(s||(s=1,e=void 0);++a<s;){var c=null==e?void 0:e[o(t[a])];void 0===c&&(a=s,c=r),e=i(c)?c.call(e):c}return e}},3301(e,t,r){var n=r(6131),i=1/0;e.exports=function(e){return e?(e=n(e))===i||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},7642(e,t,r){var n=r(3301);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},6131(e,t,r){var n=r(6403),i=r(1580),o=r(1187),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||c.test(e)?u(e.slice(2),r?2:8):a.test(e)?NaN:+e}},5243(e,t,r){var n=r(2291);e.exports=function(e){return null==e?"":n(e)}},107(e,t,r){var n=r(2291),i=r(6403),o=r(8931),a=r(8774),s=r(7905),c=r(2237),u=r(5243);e.exports=function(e,t,r){if((e=u(e))&&(r||void 0===t))return i(e);if(!e||!(t=n(t)))return e;var l=c(e),h=c(t),p=s(l,h),f=a(l,h)+1;return o(l,p,f).join("")}},959(e,t,r){var n=r(2291),i=r(8931),o=r(7905),a=r(2237),s=r(5243),c=/^\s+/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(c,"");if(!e||!(t=n(t)))return e;var u=a(e),l=o(u,a(t));return i(u,l).join("")}},3321(e,t,r){var n=r(7553),i=r(528),o=r(5962),a=r(3142),s=r(547),c=r(3410),u=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(u.call(e,"__wrapped__"))return c(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},320(e,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,f=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case l:case h:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case u:case p:case y:case g:case c:return e;default:return t}}case i:return t}}}function _(e){return x(e)===h}t.AsyncMode=l,t.ConcurrentMode=h,t.ContextConsumer=u,t.ContextProvider=c,t.Element=n,t.ForwardRef=p,t.Fragment=o,t.Lazy=y,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return _(e)||x(e)===l},t.isConcurrentMode=_,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===y},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===h||e===s||e===a||e===f||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===p||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===m)},t.typeOf=x},524(e,t,r){"use strict";e.exports=r(320)},1197(e,t){"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(e,t,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:i,ref:void 0!==t?t:null,props:n}}t.Fragment=n,t.jsx=i,t.jsxs=i},1085(e,t,r){"use strict";e.exports=r(1197)},3554(e){!function(){"use strict";var t=function(e){setTimeout(e,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(t=process.nextTick),e.exports=function(e){var r={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===r.firstHere){r.current++,r.firstHere=!0;var e=1}else e=0;var t={n:1};"function"==typeof arguments[0]?t.task=arguments[0]:t.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?t.task=arguments[1]:t.n=arguments[1]);var n=t.task;if(t.task=function(){n(r.leave)},r.current+t.n-e>r.capacity)return 1===e&&(r.current--,r.firstHere=!1),r.queue.push(t);r.current+=t.n-e,t.task(r.leave),1===e&&(r.firstHere=!1)},leave:function(e){if(e=e||1,r.current-=e,r.queue.length){var n=r.queue[0];n.n+r.current>r.capacity||(r.queue.shift(),r.current+=n.n,t(n.task))}else if(r.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,r.current+e<=r.capacity}};return r}}()},4119(e){"use strict";e.exports=r},8110(e){"use strict";e.exports=t},7434(e){"use strict";e.exports=n},7125(e){"use strict";e.exports=i},3135(t){"use strict";t.exports=e},6171(e){"use strict";e.exports=o}};const s={};function c(e){const t=s[e];if(void 0!==t)return t.exports;const r=s[e]={exports:{}};return a[e].call(r.exports,r,r.exports,c),r.exports}c.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},c.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var n=t[r++],i=t[r++];c.o(e,n)?0===i&&r++:0===i?Object.defineProperty(e,n,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,n,{enumerable:!0,get:i})}else for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let u={};return(()=>{"use strict";c.d(u,{DecapCmsBackendForgejo:()=>cr});var e,t,r=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),n=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),i=function(){function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(e){return"function"==typeof e?e():e}),this.tag}return r(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return this.tag(n,e.apply(void 0,[t].concat(i)))}},{key:"processSubstitutions",value:function(e,t,r){var n=this.transformSubstitution(e.shift(),t);return"".concat(t,n,r)}},{key:"transformString",value:function(e){return this.transformers.reduce(function(e,t){return t.onString?t.onString(e):e},e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce(function(e,r){return r.onSubstitution?r.onSubstitution(e,t):e},e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce(function(e,t){return t.onEndResult?t.onEndResult(e):e},e)}}]),e}();const o=i,a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var r=t.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r.map(function(e){return e.length})));if(n){var i=new RegExp("^.{"+n+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}};var s={separator:"",conjunction:"",serial:!1};const l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=r.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&n>1){var c=t.lastIndexOf(i);t=t.slice(0,c)+(a?i:"")+" "+o+t.slice(c+1)}}return t}}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new o(l({separator:","}),a,h),new o(l({separator:",",conjunction:"and"}),a,h),new o(l({separator:",",conjunction:"or"}),a,h);const p=function(e){return{onSubstitution:function(t,r){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var f=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new o(p("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(f):f(e)?e:""}}},l,a,h);const d=function(e,t){return{onSubstitution:function(r,n){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(e,t)}}};new o(p("\n"),l,a,h,d(/&/g,"&"),d(/</g,"<"),d(/>/g,">"),d(/"/g,"""),d(/'/g,"'"),d(/`/g,"`"));const g=function(e,t){return{onEndResult:function(r){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(e,t)}}};new o(g(/(?:\n(?:\s*))+/g," "),h),new o(g(/(?:\n\s*)/g,""),h),new o(l({separator:","}),g(/(?:\s+)/g," "),h),new o(l({separator:",",conjunction:"or"}),g(/(?:\s+)/g," "),h),new o(l({separator:",",conjunction:"and"}),g(/(?:\s+)/g," "),h),new o(l,a,h),new o(l,g(/(?:\s+)/g," "),h);const y=new o(a,h);new o(a("all"),h);var m=c(959),v=c.n(m),b=c(3554),w=c.n(b),x=c(3135);const _="3.9.1",k=_,R="function"==typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,A="function"==typeof TextEncoder?new TextEncoder:void 0,P=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),S=(e=>{let t={};return e.forEach((e,r)=>t[e]=r),t})(P),C=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,F=String.fromCharCode.bind(String),O="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),E=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),$=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),L=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=P[t>>18&63]+P[t>>12&63]+P[t>>6&63]+P[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},U="function"==typeof btoa?e=>btoa(e):L,j="function"==typeof Uint8Array.prototype.toBase64?e=>e.toBase64():e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(F.apply(null,e.subarray(r,r+4096)));return U(t.join(""))},T=(e,t=!1)=>t?E(j(e)):j(e),q=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?F(192|t>>>6)+F(128|63&t):F(224|t>>>12&15)+F(128|t>>>6&63)+F(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return F(240|t>>>18&7)+F(128|t>>>12&63)+F(128|t>>>6&63)+F(128|63&t)},M=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,B=e=>e.replace(M,q),I=A?e=>j(A.encode(e)):e=>U(B(e)),D=(e,t=!1)=>t?E(I(e)):I(e),z=e=>D(e,!0),W=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,N=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return F((t>>>10)+55296)+F(56320+(1023&t));case 3:return F((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return F((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},H=e=>e.replace(W,N),K=e=>{if(e=e.replace(/\s+/g,""),!C.test(e))throw new TypeError("malformed base64.");let t,r,n;e+="==".slice(2-(3&e.length));let i=[];for(let o=0;o<e.length;)t=S[e.charAt(o++)]<<18|S[e.charAt(o++)]<<12|(r=S[e.charAt(o++)])<<6|(n=S[e.charAt(o++)]),64===r?i.push(F(t>>16&255)):64===n?i.push(F(t>>16&255,t>>8&255)):i.push(F(t>>16&255,t>>8&255,255&t));return i.join("")},G="function"==typeof atob?e=>atob($(e)):K,J="function"==typeof Uint8Array.fromBase64?e=>Uint8Array.fromBase64(e):e=>O(G(e).split("").map(e=>e.charCodeAt(0))),Y=e=>J(X(e)),V=R?e=>R.decode(J(e)):e=>H(G(e)),X=e=>$(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),Z=e=>V(X(e)),Q=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),ee=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Q(t));e("fromBase64",function(){return Z(this)}),e("toBase64",function(e){return D(this,e)}),e("toBase64URI",function(){return D(this,!0)}),e("toBase64URL",function(){return D(this,!0)}),e("toUint8Array",function(){return Y(this)})},te=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Q(t));e("toBase64",function(e){return T(this,e)}),e("toBase64URI",function(){return T(this,!0)}),e("toBase64URL",function(){return T(this,!0)})},re={version:_,VERSION:k,atob:G,atobPolyfill:K,btoa:U,btoaPolyfill:L,fromBase64:Z,toBase64:D,encode:D,encodeURI:z,encodeURL:z,utob:B,btou:H,decode:Z,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:T,toUint8Array:Y,extendString:ee,extendUint8Array:te,extendBuiltins:()=>{ee(),te()}};var ne=c(107),ie=c.n(ne),oe=c(1034),ae=c.n(oe),se=c(578),ce=c.n(se);const ue="Forgejo",le=-1;var he=function(e){return e.CREATE="create",e.DELETE="delete",e.UPDATE="update",e}(he||{});class pe{constructor(e){if(!e.apiRoot)throw new Error("API root is required");this.apiRoot=e.apiRoot,this.token=e.token||"",this.branch=e.branch||"master",this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.useOpenAuthoring=!!e.useOpenAuthoring,this.cmsLabelPrefix=e.cmsLabelPrefix||"",this.initialWorkflowStatus=e.initialWorkflowStatus||"draft",this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[t,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=r[0],this.originRepoName=r[1]}static DEFAULT_COMMIT_MESSAGE="Automatically generated by Static CMS";user(){return this._userPromise||(this._userPromise=this.getUser()),this._userPromise}getUser(){return this.request("/user")}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions.push}catch(e){throw console.error("Problem fetching repo data from Forgejo"),e}}reset(){}requestHeaders(e={}){const t={"Content-Type":"application/json; charset=utf-8",...e};return this.token?(t.Authorization=`token ${this.token}`,Promise.resolve(t)):Promise.resolve(t)}async parseJsonResponse(e){const t=await e.json();return e.ok?t:Promise.reject(t)}urlFor(e,t){const r=[];if(t.params)for(const e in t.params)r.push(`${e}=${encodeURIComponent(t.params[e])}`);return r.length&&(e+=`?${r.join("&")}`),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then(t=>e.ok?t:Promise.reject(t))}handleRequestError(e,t){throw new x.APIError(e.message,t,ue)}buildRequest(e){return e}async request(e,t={},r=e=>this.parseResponse(e)){t={cache:"no-cache",...t};const n=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=x.unsentRequest.fromFetchArguments(i,{...t,headers:n}),a=await(0,x.requestWithBackoff)(this,e);return o=a.status,await r(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){t={cache:"no-cache",...t};const r=await this.requestHeaders(t.headers||{}),n=this.urlFor(e,t),i=await(0,x.getAllResponses)(n,{...t,headers:r},"next",this.nextUrlProcessor()),o=await Promise.all(i.map(e=>this.parseResponse(e)));return[].concat(...o)}generateContentKey(e,t){const r=(0,x.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(e){if(!this.useOpenAuthoring)return(0,x.parseContentKey)(e);const t=`${this.repo}/`,r=this.originRepo?`${this.originRepo}/`:null;let n=e;return e.startsWith(t)?n=e.slice(t.length):r&&e.startsWith(r)&&(n=e.slice(r.length)),(0,x.parseContentKey)(n)}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:t,repoURL:n,parseText:i})}async readFileMetadata(e,t){const r=await(0,x.readFileMetadata)(t,async()=>{try{const t=await this.request(`${this.originRepoURL}/commits`,{params:{path:e,sha:this.branch,stat:"false"}}),{commit:r}=t[0];return{author:r.author.name||r.author.email,updatedOn:r.author.date}}catch(e){return{author:"",updatedOn:""}}},x.localForage);return r}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){const n=await this.request(`${t}/git/blobs/${e}`,{cache:"force-cache"});if(r)return re.decode(n.content);{const e=re.atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t])}}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={},i){const o=ie()(e,"/"),a=Boolean(o);try{const e=(await this.request(`${t}/branches/${encodeURIComponent(r)}`)).commit.id,s=n>1||a;return(await this.request(`${t}/git/trees/${encodeURIComponent(e)}`,{params:s?{recursive:1}:{}})).tree.filter(e=>{if((i||"blob"===e.type)&&e.path){if(!a)return e.path.split("/").length<=n;if(!e.path.startsWith(`${o}/`))return!1;const t=e.path.slice(o.length+1);return!!t&&t.split("/").length<=n}return!1}).map(e=>{const t=a&&e.path.startsWith(`${o}/`)?e.path.slice(o.length+1):e.path;return{type:e.type,id:e.sha,name:(0,x.basename)(e.path),path:a?`${o}/${t}`:e.path,size:e.size}})}catch(e){if(e&&404===e.status)return console.info("[StaticCMS] This 404 was expected and handled appropriately."),[];throw e}}async persistFiles(e,t,r){const n=[...t,...e],i=await this.getChangeFileOperations(n,this.branch);return this.changeFiles(i,r)}async changeFiles(e,t){return await this.request(`${this.repoURL}/contents`,{method:"POST",body:JSON.stringify({branch:this.branch,files:e,message:t.commitMessage})})}async getChangeFileOperations(e,t){return await Promise.all(e.map(async e=>{const r=await ae()(e,"toBase64",ce()(this.toBase64,e.raw));let n,i,o,a=v()(e.path,"/");try{n=await this.getFileSha(e.path,{branch:t}),i=he.UPDATE;const r="newPath"in e?e.newPath:void 0;o=r&&a,a=r?v()(r,"/"):a}catch{n=void 0,i=he.CREATE}return{operation:i,content:r,path:a,from_path:o,sha:n}}))}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const n=(e.startsWith("/")?e.slice(1):e).split("/").map(e=>encodeURIComponent(e)).join("/"),i=await this.request(`${t}/contents/${n}`,{params:{ref:r}});if(i?.sha)return i.sha;throw new x.APIError("Not Found",404,ue)}async deleteFiles(e,t){if(this.useOpenAuthoring)throw new x.APIError("Cannot delete published entries as an Open Authoring user!",403,ue);const r=await Promise.all(e.map(async e=>{const t=await this.getFileSha(e);return{operation:he.DELETE,path:e,sha:t}}));return this.changeFiles(r,{commitMessage:t})}toBase64(e){return Promise.resolve(re.encode(e))}async getBranch(e){return this.request(`${this.repoURL}/branches/${encodeURIComponent(e)}`)}async getDefaultBranch(){return this.getBranch(this.branch)}async createBranch(e,t=this.branch){return this.request(`${this.repoURL}/branches`,{method:"POST",body:JSON.stringify({new_branch_name:e,old_ref_name:t})})}async deleteBranch(e){await this.request(`${this.repoURL}/branches/${encodeURIComponent(e)}`,{method:"DELETE"})}async getPullRequests(e="open",t){const r=await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:{state:e,base:this.branch,limit:100}});return t?r.filter(e=>{const r=e.head?.label;if(r)return r===t;const n=e.head?.repo?.owner?.login,i=e.head?.ref;return!(!n||!i)&&`${n}:${i}`===t}):r}async getOpenAuthoringPullRequest(e,t){const r=await this.getBranch(e).catch(()=>{throw new x.EditorialWorkflowError("content is not under editorial workflow",!0)}),n=t.filter(e=>e.head.sha===r.commit.id)[0];if(!n)return{pullRequest:{number:le,state:"open",labels:[{name:(0,x.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],head:{ref:e,sha:r.commit.id}},branch:r};const i=n.labels.filter(e=>!(0,x.isCMSLabel)(e.name,this.cmsLabelPrefix)),o="closed"===n.state?{name:(0,x.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,x.statusToLabel)("pending_review",this.cmsLabelPrefix)};return{pullRequest:{...n,labels:[...i,o]},branch:r}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getHeadReference(e),r=await this.getPullRequests("all",t);return(await this.getOpenAuthoringPullRequest(e,r)).pullRequest}const t=(await this.getPullRequests("open",`${this.repoOwner}:${e}`)).filter(e=>e.labels.some(e=>(0,x.isCMSLabel)(e.name,this.cmsLabelPrefix)));if(t.length>0)return t[0];throw new x.EditorialWorkflowError("content is not under editorial workflow",!0)}async getHeadReference(e){return`${this.repoOwner}:${e}`}async createPR(e,t,r=x.DEFAULT_PR_BODY){return this.request(`${this.originRepoURL}/pulls`,{method:"POST",body:JSON.stringify({title:e,head:await this.getHeadReference(t),base:this.branch,body:r})})}async updatePR(e,t){return this.request(`${this.originRepoURL}/pulls/${e}`,{method:"PATCH",body:JSON.stringify({state:t})})}async closePR(e){return this.updatePR(e,"closed")}async mergePR(e){await this.request(`${this.originRepoURL}/pulls/${e.number}/merge`,{method:"POST",body:JSON.stringify({Do:"merge",MergeMessageField:x.MERGE_COMMIT_MESSAGE})})}async getPullRequestFiles(e){return e===le?[]:this.request(`${this.originRepoURL}/pulls/${e}/files`)}async getDifferences(e,t){const r=this.useOpenAuthoring?this.repoURL:this.originRepoURL;try{return await this.request(`${r}/compare/${encodeURIComponent(e)}...${encodeURIComponent(t)}`)}catch(r){if(this.useOpenAuthoring)return this.request(`${this.originRepoURL}/compare/${encodeURIComponent(e)}...${encodeURIComponent(t)}`);throw r}}async updatePullRequestLabels(e,t){return this.request(`${this.originRepoURL}/issues/${e}/labels`,{method:"PUT",body:JSON.stringify({labels:t})})}async getLabels(){return this.requestAllPages(`${this.originRepoURL}/labels`,{params:{limit:100}})}async createLabel(e,t="0052cc"){return this.request(`${this.originRepoURL}/labels`,{method:"POST",body:JSON.stringify({name:e,color:t})})}async getOrCreateLabel(e){return(await this.getLabels()).find(t=>t.name===e)||this.createLabel(e)}async setPullRequestStatus(e,t){if(this.useOpenAuthoring||e.number===le)return;const r=(0,x.statusToLabel)(t,this.cmsLabelPrefix),n=await this.getOrCreateLabel(r);if("number"!=typeof n.id)throw new Error(`Status label "${n.name}" returned from getOrCreateLabel is missing a numeric id`);const i=e.labels.filter(e=>!(0,x.isCMSLabel)(e.name,this.cmsLabelPrefix)).filter(e=>"number"==typeof e.id).map(e=>e.id);await this.updatePullRequestLabels(e.number,[...i,n.id])}async getOpenAuthoringBranches(){const e=await this.requestAllPages(`${this.repoURL}/branches`),t=`${x.CMS_BRANCH_PREFIX}/${this.repo}/`;return e.filter(e=>e.name.startsWith(t))}filterOpenAuthoringBranches=async e=>{try{const t=await this.getBranchPullRequest(e),{state:r,merged_at:n}=t;return t.number!==le&&"closed"===r&&n?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return t instanceof x.APIError&&404===t.status||t instanceof x.EditorialWorkflowError?{branch:e,filter:!1}:{branch:e,filter:!0}}};async listUnpublishedBranches(){if(this.useOpenAuthoring){let e=(await this.getOpenAuthoringBranches()).map(e=>e.name);const t=await Promise.all(e.map(e=>this.filterOpenAuthoringBranches(e)));return e=t.filter(e=>e.filter).map(e=>e.branch),e}return(await this.getPullRequests("open")).filter(e=>e.head.ref.startsWith(`${x.CMS_BRANCH_PREFIX}/`)&&e.labels.some(e=>(0,x.isCMSLabel)(e.name,this.cmsLabelPrefix))).map(e=>e.head.ref)}async retrieveUnpublishedEntryData(e){const t=(0,x.branchFromContentKey)(e);let r,n,i=null;if(this.useOpenAuthoring){const e=await this.getHeadReference(t),n=await this.getPullRequests("all",e),o=await this.getOpenAuthoringPullRequest(t,n);r=o.pullRequest,i=o.branch}else r=await this.getBranchPullRequest(t);try{const e=await this.getHeadReference(t);n=(await this.getDifferences(this.branch,e)).files.map(e=>({path:e.filename,newFile:"added"===e.status,id:e.sha||""}))}catch(e){n=(await this.getPullRequestFiles(r.number)).map(e=>({path:e.filename,newFile:"added"===e.status,id:""}))}const o=r.labels.find(e=>(0,x.isCMSLabel)(e.name,this.cmsLabelPrefix)),a=o?(0,x.labelToStatus)(o.name,this.cmsLabelPrefix):this.initialWorkflowStatus,{collection:s,slug:c}=this.parseContentKey(e);return{collection:s,slug:c,status:a,diffs:n,updatedAt:r?.updated_at||i?.commit?.author?.date||i?.commit?.committer?.date||(new Date).toISOString(),pullRequestAuthor:r?.user?.login||i?.commit?.author?.name||"Unknown"}}async updateUnpublishedEntryStatus(e,t,r){const n=this.generateContentKey(e,t),i=(0,x.branchFromContentKey)(n),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===r)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(o.number!==le){const{state:e}=o;"open"===e&&"draft"===r&&await this.closePR(o.number),"closed"===e&&"pending_review"===r&&await this.updatePR(o.number,"open")}else if("pending_review"===r){const e=await this.getDifferences(this.branch,await this.getHeadReference(i)),t=e.commits[0]?.commit?.message||pe.DEFAULT_COMMIT_MESSAGE;await this.createPR(t,i)}}else await this.setPullRequestStatus(o,r)}async deleteUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,x.branchFromContentKey)(r);try{const e=await this.getBranchPullRequest(n);e.number!==le&&await this.closePR(e.number)}catch(e){if(!(e instanceof x.EditorialWorkflowError||e instanceof x.APIError&&404===e.status))throw e}await this.deleteBranch(n)}async publishUnpublishedEntry(e,t){const r=this.generateContentKey(e,t),n=(0,x.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number===le)throw new x.APIError("Cannot publish entry without a pull request",400,ue);await this.mergePR(i),await this.deleteBranch(n)}async editorialWorkflowGit(e,t,r,n){const i=this.generateContentKey(r,t),o=(0,x.branchFromContentKey)(i);let a=!1;try{await this.getBranch(o),a=!0}catch(e){if(!(e instanceof x.APIError&&404===e.status))throw e}a||await this.createBranch(o,this.branch);const s=await this.getChangeFileOperations(e,o);if(await this.changeFilesOnBranch(s,n,o),!a&&!this.useOpenAuthoring){const e=await this.createPR(n.commitMessage,o),t=n.status||this.initialWorkflowStatus;await this.setPullRequestStatus(e,t)}}async changeFilesOnBranch(e,t,r){return await this.request(`${this.repoURL}/contents`,{method:"POST",body:JSON.stringify({branch:r,files:e,message:t.commitMessage})})}async forkExists(){try{const e=this.originRepo.split("/")[1],t=`/repos/${this.repoOwner}/${e}`,r=await this.request(t);return!0===r.fork&&!!r.parent&&r.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async createFork(){return this.request(`${this.originRepoURL}/forks`,{method:"POST"})}async mergeUpstream(){try{await this.request(`${this.repoURL}/sync_fork`,{method:"POST"})}catch(e){console.warn("Failed to sync fork with upstream:",e)}}}function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fe.apply(null,arguments)}var de=c(8110),ge={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ye(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var me=/[A-Z]|^ms/g,ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,be=function(e){return 45===e.charCodeAt(1)},we=function(e){return null!=e&&"boolean"!=typeof e},xe=ye(function(e){return be(e)?e:e.replace(me,"-$&").toLowerCase()}),_e=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ve,function(e,t,r){return Re={name:t,styles:r,next:Re},t})}return 1===ge[e]||be(e)||"number"!=typeof t||0===t?t:t+"px"};function ke(e,t,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var i=r;if(1===i.anim)return Re={name:i.name,styles:i.styles,next:Re},i.name;var o=r;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)Re={name:a.name,styles:a.styles,next:Re},a=a.next;return o.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ke(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":we(s)&&(n+=xe(o)+":"+_e(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var c=ke(e,t,a);switch(o){case"animation":case"animationName":n+=xe(o)+":"+c+";";break;default:n+=o+"{"+c+"}"}}else for(var u=0;u<a.length;u++)we(a[u])&&(n+=xe(o)+":"+_e(o,a[u])+";")}return n}(e,t,r);case"function":if(void 0!==e){var s=Re,c=r(e);return Re=s,ke(e,t,c)}}var u=r;if(null==t)return u;var l=t[u];return void 0!==l?l:u}var Re,Ae=/label:\s*([^\s;{]+)\s*(;|$)/g;function Pe(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";Re=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=ke(r,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=ke(r,t,e[a]),n&&(i+=o[a]);Ae.lastIndex=0;for(var s,c="";null!==(s=Ae.exec(i));)c+="-"+s[1];var u=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+c;return{name:u,styles:i,next:Re}}var Se=c(4119),Ce=c.n(Se),Fe=!!Se.useInsertionEffect&&Se.useInsertionEffect,Oe=Fe||function(e){return e()};function Ee(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(e[r]+";"):r&&(n+=r+" ")}),n}Fe||Se.useLayoutEffect;var $e=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Le=function(e,t,r){$e(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}},Ue=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,je=ye(function(e){return Ue.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Te=function(e){return"theme"!==e},qe=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?je:Te},Me=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},Be=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return $e(t,r,n),Oe(function(){return Le(t,r,n)}),null},Ie=function e(t,r){var n,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var s=Me(t,r,o),c=s||qe(a),u=!c("as");return function(){var l=arguments,h=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&h.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)h.push.apply(h,l);else{var p=l[0];h.push(p[0]);for(var f=l.length,d=1;d<f;d++)h.push(l[d],p[d])}var g=(0,de.withEmotionCache)(function(e,t,r){var n=u&&e.as||a,o="",l=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=Se.useContext(de.ThemeContext)}"string"==typeof e.className?o=Ee(t.registered,l,e.className):null!=e.className&&(o=e.className+" ");var d=Pe(h.concat(l),t.registered,p);o+=t.key+"-"+d.name,void 0!==i&&(o+=" "+i);var g=u&&void 0===s?qe(n):c,y={};for(var m in e)u&&"as"===m||g(m)&&(y[m]=e[m]);return y.className=o,r&&(y.ref=r),Se.createElement(Se.Fragment,null,Se.createElement(Be,{cache:t,serialized:d,isStringTag:"string"==typeof n}),Se.createElement(n,y))});return g.displayName=void 0!==n?n:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=a,g.__emotion_styles=h,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(t,n){return e(t,fe({},r,n,{shouldForwardProp:Me(g,n,!0)})).apply(void 0,h)},g}},De=c(7434),ze=c.n(De),We=c(7125),Ne=c(6171),He=c(1085),Ke=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Ge=Math.abs,Je=String.fromCharCode,Ye=Object.assign;function Ve(e){return e.trim()}function Xe(e,t,r){return e.replace(t,r)}function Ze(e,t){return e.indexOf(t)}function Qe(e,t){return 0|e.charCodeAt(t)}function et(e,t,r){return e.slice(t,r)}function tt(e){return e.length}function rt(e){return e.length}function nt(e,t){return t.push(e),e}var it=1,ot=1,at=0,st=0,ct=0,ut="";function lt(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:it,column:ot,length:a,return:""}}function ht(e,t){return Ye(lt("",null,null,"",null,null,0),e,{length:-e.length},t)}function pt(){return ct=st>0?Qe(ut,--st):0,ot--,10===ct&&(ot=1,it--),ct}function ft(){return ct=st<at?Qe(ut,st++):0,ot++,10===ct&&(ot=1,it++),ct}function dt(){return Qe(ut,st)}function gt(){return st}function yt(e,t){return et(ut,e,t)}function mt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vt(e){return it=ot=1,at=tt(ut=e),st=0,[]}function bt(e){return ut="",e}function wt(e){return Ve(yt(st-1,kt(91===e?e+2:40===e?e+1:e)))}function xt(e){for(;(ct=dt())&&ct<33;)ft();return mt(e)>2||mt(ct)>3?"":" "}function _t(e,t){for(;--t&&ft()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return yt(e,gt()+(t<6&&32==dt()&&32==ft()))}function kt(e){for(;ft();)switch(ct){case e:return st;case 34:case 39:34!==e&&39!==e&&kt(ct);break;case 40:41===e&&kt(e);break;case 92:ft()}return st}function Rt(e,t){for(;ft()&&e+ct!==57&&(e+ct!==84||47!==dt()););return"/*"+yt(t,st-1)+"*"+Je(47===e?e:ft())}function At(e){for(;!mt(dt());)ft();return yt(e,st)}var Pt="-ms-",St="-moz-",Ct="-webkit-",Ft="comm",Ot="rule",Et="decl",$t="@keyframes";function Lt(e,t){for(var r="",n=rt(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Ut(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Et:return e.return=e.return||e.value;case Ft:return"";case $t:return e.return=e.value+"{"+Lt(e.children,n)+"}";case Ot:e.value=e.props.join(",")}return tt(r=Lt(e.children,n))?e.return=e.value+"{"+r+"}":""}function jt(e){return bt(Tt("",null,null,null,[""],e=vt(e),0,[0],e))}function Tt(e,t,r,n,i,o,a,s,c){for(var u=0,l=0,h=a,p=0,f=0,d=0,g=1,y=1,m=1,v=0,b="",w=i,x=o,_=n,k=b;y;)switch(d=v,v=ft()){case 40:if(108!=d&&58==Qe(k,h-1)){-1!=Ze(k+=Xe(wt(v),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:k+=wt(v);break;case 9:case 10:case 13:case 32:k+=xt(d);break;case 92:k+=_t(gt()-1,7);continue;case 47:switch(dt()){case 42:case 47:nt(Mt(Rt(ft(),gt()),t,r),c);break;default:k+="/"}break;case 123*g:s[u++]=tt(k)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+l:-1==m&&(k=Xe(k,/\f/g,"")),f>0&&tt(k)-h&&nt(f>32?Bt(k+";",n,r,h-1):Bt(Xe(k," ","")+";",n,r,h-2),c);break;case 59:k+=";";default:if(nt(_=qt(k,t,r,u,l,i,s,b,w=[],x=[],h),o),123===v)if(0===l)Tt(k,t,_,_,w,o,h,s,x);else switch(99===p&&110===Qe(k,3)?100:p){case 100:case 108:case 109:case 115:Tt(e,_,_,n&&nt(qt(e,_,_,0,0,i,s,b,i,w=[],h),x),i,x,h,s,n?w:x);break;default:Tt(k,_,_,_,[""],x,0,s,x)}}u=l=f=0,g=m=1,b=k="",h=a;break;case 58:h=1+tt(k),f=d;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==pt())continue;switch(k+=Je(v),v*g){case 38:m=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(tt(k)-1)*m,m=1;break;case 64:45===dt()&&(k+=wt(ft())),p=dt(),l=h=tt(b=k+=At(gt())),v++;break;case 45:45===d&&2==tt(k)&&(g=0)}}return o}function qt(e,t,r,n,i,o,a,s,c,u,l){for(var h=i-1,p=0===i?o:[""],f=rt(p),d=0,g=0,y=0;d<n;++d)for(var m=0,v=et(e,h+1,h=Ge(g=a[d])),b=e;m<f;++m)(b=Ve(g>0?p[m]+" "+v:Xe(v,/&\f/g,p[m])))&&(c[y++]=b);return lt(e,t,r,0===i?Ot:s,c,u,l)}function Mt(e,t,r){return lt(e,t,r,Ft,Je(ct),et(e,2,-2),0)}function Bt(e,t,r,n){return lt(e,t,r,Et,et(e,0,n),et(e,n+1,-1),n)}var It=function(e,t,r){for(var n=0,i=0;n=i,i=dt(),38===n&&12===i&&(t[r]=1),!mt(i);)ft();return yt(e,st)},Dt=new WeakMap,zt=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Dt.get(r))&&!n){Dt.set(e,!0);for(var i=[],o=function(e,t){return bt(function(e,t){var r=-1,n=44;do{switch(mt(n)){case 0:38===n&&12===dt()&&(t[r]=1),e[r]+=It(st-1,t,r);break;case 2:e[r]+=wt(n);break;case 4:if(44===n){e[++r]=58===dt()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Je(n)}}while(n=ft());return e}(vt(e),t))}(t,i),a=r.props,s=0,c=0;s<o.length;s++)for(var u=0;u<a.length;u++,c++)e.props[c]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},Wt=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Nt(e,t){switch(function(e,t){return 45^Qe(e,0)?(((t<<2^Qe(e,0))<<2^Qe(e,1))<<2^Qe(e,2))<<2^Qe(e,3):0}(e,t)){case 5103:return Ct+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ct+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ct+e+St+e+Pt+e+e;case 6828:case 4268:return Ct+e+Pt+e+e;case 6165:return Ct+e+Pt+"flex-"+e+e;case 5187:return Ct+e+Xe(e,/(\w+).+(:[^]+)/,Ct+"box-$1$2"+Pt+"flex-$1$2")+e;case 5443:return Ct+e+Pt+"flex-item-"+Xe(e,/flex-|-self/,"")+e;case 4675:return Ct+e+Pt+"flex-line-pack"+Xe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ct+e+Pt+Xe(e,"shrink","negative")+e;case 5292:return Ct+e+Pt+Xe(e,"basis","preferred-size")+e;case 6060:return Ct+"box-"+Xe(e,"-grow","")+Ct+e+Pt+Xe(e,"grow","positive")+e;case 4554:return Ct+Xe(e,/([^-])(transform)/g,"$1"+Ct+"$2")+e;case 6187:return Xe(Xe(Xe(e,/(zoom-|grab)/,Ct+"$1"),/(image-set)/,Ct+"$1"),e,"")+e;case 5495:case 3959:return Xe(e,/(image-set\([^]*)/,Ct+"$1$`$1");case 4968:return Xe(Xe(e,/(.+:)(flex-)?(.*)/,Ct+"box-pack:$3"+Pt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ct+e+e;case 4095:case 3583:case 4068:case 2532:return Xe(e,/(.+)-inline(.+)/,Ct+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(tt(e)-1-t>6)switch(Qe(e,t+1)){case 109:if(45!==Qe(e,t+4))break;case 102:return Xe(e,/(.+:)(.+)-([^]+)/,"$1"+Ct+"$2-$3$1"+St+(108==Qe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ze(e,"stretch")?Nt(Xe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Qe(e,t+1))break;case 6444:switch(Qe(e,tt(e)-3-(~Ze(e,"!important")&&10))){case 107:return Xe(e,":",":"+Ct)+e;case 101:return Xe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ct+(45===Qe(e,14)?"inline-":"")+"box$3$1"+Ct+"$2$3$1"+Pt+"$2box$3")+e}break;case 5936:switch(Qe(e,t+11)){case 114:return Ct+e+Pt+Xe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ct+e+Pt+Xe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ct+e+Pt+Xe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ct+e+Pt+e+e}return e}var Ht=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Et:e.return=Nt(e.value,e.length);break;case $t:return Lt([ht(e,{value:Xe(e.value,"@","@"+Ct)})],n);case Ot:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Lt([ht(e,{props:[Xe(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Lt([ht(e,{props:[Xe(t,/:(plac\w+)/,":"+Ct+"input-$1")]}),ht(e,{props:[Xe(t,/:(plac\w+)/,":-moz-$1")]}),ht(e,{props:[Xe(t,/:(plac\w+)/,Pt+"input-$1")]})],n)}return""})}}],Kt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,i,o=e.stylisPlugins||Ht,a={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)a[t[r]]=!0;s.push(e)});var c,u,l,h,p=[Ut,(h=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],f=(u=[zt,Wt].concat(o,p),l=rt(u),function(e,t,r,n){for(var i="",o=0;o<l;o++)i+=u[o](e,t,r,n)||"";return i});i=function(e,t,r,n){c=r,Lt(jt(e?e+"{"+t.styles+"}":t.styles),f),n&&(d.inserted[t.name]=!0)};var d={key:t,sheet:new Ke({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return d.sheet.hydrate(s),d},Gt=Se.createContext("undefined"!=typeof HTMLElement?Kt({key:"css"}):null),Jt=(Gt.Provider,function(e){return(0,Se.forwardRef)(function(t,r){var n=(0,Se.useContext)(Gt);return e(t,n,r)})}),Yt=Se.createContext({}),Vt={}.hasOwnProperty,Xt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Zt=function(e,t){var r={};for(var n in t)Vt.call(t,n)&&(r[n]=t[n]);return r[Xt]=e,r},Qt=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return $e(t,r,n),Oe(function(){return Le(t,r,n)}),null},er=Jt(function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var i=e[Xt],o=[n],a="";"string"==typeof e.className?a=Ee(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=Pe(o,void 0,Se.useContext(Yt));a+=t.key+"-"+s.name;var c={};for(var u in e)Vt.call(e,u)&&"css"!==u&&u!==Xt&&(c[u]=e[u]);return c.className=a,r&&(c.ref=r),Se.createElement(Se.Fragment,null,Se.createElement(Qt,{cache:t,serialized:s,isStringTag:"string"==typeof i}),Se.createElement(i,c))}),tr=(c(5985),He.Fragment,function(e,t,r){return Vt.call(t,"css")?He.jsx(er,Zt(e,t),r):He.jsx(e,t,r)}),rr=function(e,t,r){return Vt.call(t,"css")?He.jsxs(er,Zt(e,t),r):He.jsxs(e,t,r)};const nr=Ie(Ne.Icon,{target:"e1szyeam2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),ir=Ie("div",{target:"e1szyeam1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),or=Ie("div",{target:"e1szyeam0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class ar extends Ce().Component{static propTypes={inProgress:ze().bool,config:ze().object.isRequired,onLogin:ze().func.isRequired,t:ze().func.isRequired,backend:ze().object};state={};componentDidMount(){ze().checkPropTypes(ar.propTypes,this.props,"prop","ForgejoAuthenticationPage");const{api_root:e,app_id:t=""}=this.props.config.backend,r=e?e.replace(/\/api\/[^/]+\/?$/,""):"";r?(this.auth=new We.PkceAuthenticator({base_url:r,auth_endpoint:"login/oauth/authorize",app_id:t,auth_token_endpoint:"login/oauth/access_token",auth_token_endpoint_content_type:"application/json; charset=utf-8"}),this.auth.completeAuth((e,t)=>{if(e)this.setState({loginError:e.toString()});else if(t){const{open_authoring:e=!1}=this.props.config.backend;if(e)return this.loginWithOpenAuthoring(t).then(()=>this.props.onLogin(t)).catch(e=>{this.setState({loginError:e&&e.toString?e.toString():String(e),findingFork:!1,requestingFork:!1})});this.props.onLogin(t)}})):this.setState({loginError:'Forgejo backend requires "api_root" to be set in the backend configuration.'})}getPermissionToFork=()=>new Promise((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t(new Error("User declined to create a fork"))}})});loginWithOpenAuthoring(e){const{backend:t}=this.props;if(!t){const e=new Error("Backend prop is required for open authoring login flow");return Promise.reject(e)}return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch(e=>{throw console.error(e),e}).finally(()=>{this.setState({findingFork:!1,requestingFork:!1,approveFork:void 0,refuseFork:void 0})})}handleLogin=e=>{if(e.preventDefault(),!this.auth)return;const{open_authoring:t=!1}=this.props.config.backend;this.auth.authenticate({scope:"repository"},(e,r)=>{if(!e)return t?this.loginWithOpenAuthoring(r).then(()=>this.props.onLogin(r)).catch(e=>{this.setState({loginError:e&&e.toString?e.toString():String(e),findingFork:!1,requestingFork:!1})}):void this.props.onLogin(r);this.setState({loginError:e.toString()})})};renderLoginButton=()=>{const{inProgress:e,t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):rr(Ce().Fragment,{children:[tr(nr,{type:"forgejo"}),t("auth.loginWithForgejo")]})};getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>rr(ir,{children:[tr("p",{children:"Open Authoring is enabled: we need to use a fork on your Forgejo account. (If a fork already exists, we'll use that.)"}),rr(or,{children:[tr(r,{onClick:e,children:"Fork the repo"}),i&&tr(n,{onClick:t,children:"Don't fork the repo"})]})]})}}return{renderButtonContent:this.renderLoginButton}}render(){const{config:e,t}=this.props,r=this.getAuthenticationPageRenderArgs();return tr(Ne.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:this.props.inProgress||this.state.findingFork||this.state.requestingFork,loginErrorMessage:this.state.loginError,logoUrl:e.logo_url,logo:e.logo,siteUrl:e.site_url,t,...r})}}const{fetchWithTimeout:sr}=x.unsentRequest,cr={ForgejoBackend:class{constructor(e,t={}){if(this.options={proxied:!1,API:null,useWorkflow:!1,initialWorkflowStatus:"",...t},!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The Forgejo backend needs a "repo" in the backend configuration.');if(!e.backend.api_root)throw new Error('The Forgejo backend needs an "api_root" in the backend configuration when not proxied.');if(this.api=this.options.API||null,this.openAuthoringEnabled=e.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=e.backend.repo||""}else this.repo=this.originRepo=e.backend.repo||"";this.alwaysForkEnabled=e.backend.always_fork||!1,this.branch=e.backend.branch?.trim()||"main",this.apiRoot=e.backend.api_root,this.token="",this.mediaFolder=e.media_folder,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.initialWorkflowStatus=this.options.initialWorkflowStatus||"draft",this.lock=(0,x.asyncLock)()}isGitBackend(){return!0}async status(){return{auth:{status:await(this.api?.user().then(e=>!!e).catch(e=>(console.warn("[StaticCMS] Failed getting Forgejo user",e),!1)))||!1},api:{status:!0,statusPage:""}}}authComponent(){const e=e=>tr(ar,{...e,backend:this});return e.displayName="AuthenticationPage",e}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=sr(`${this.apiRoot}/user`,{headers:{Authorization:`token ${e}`}}).then(e=>e.json())),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const r=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=sr(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`token ${t}`}}).then(e=>e.json()).then(({permission:e})=>"admin"===e||"write"===e)),this._userIsOriginMaintainerPromises[r]}async pollUntilForkExists({repo:e,token:t}){const r=Date.now();let n=250,i=!1;for(;!i&&Date.now()-r<6e4;){const r=await sr(`${this.apiRoot}${e}`,{headers:{Authorization:`token ${t}`}});if(r.ok)i=!0;else{if(404!==r.status)throw new Error(`Error while checking for fork existence: ${r.status} ${r.statusText}`);i=!1}i||(await new Promise(e=>setTimeout(e,n)),n=Math.min(2*n,2e3))}if(!i)throw new Error("Timed out waiting for fork to be created.")}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=e.token;if(this._currentUserPromise=void 0,this._userIsOriginMaintainerPromises={},!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,!this.options.API){const e=pe;this.api=new e({token:r,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,useOpenAuthoring:this.useOpenAuthoring,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.initialWorkflowStatus})}if(await this.api.forkExists())return await this.api.mergeUpstream(),Promise.resolve();{await t();const e=await this.api.createFork();return this.pollUntilForkExists({repo:`/repos/${e.full_name}`,token:r})}}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>{}}).then(()=>this.authenticate(e)):this.authenticate(e)}async authenticate(e){this.token=e.token,this._currentUserPromise=void 0,this._userIsOriginMaintainerPromises={};const t=pe;this.api=new t({token:this.token,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,useOpenAuthoring:this.useOpenAuthoring,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.initialWorkflowStatus});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch(e=>{throw e.message=y`
|
|
2
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendForgejo",["decap-cms-lib-util","@emotion/react","react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],e):"object"==typeof exports?exports.DecapCmsBackendForgejo=e(require("decap-cms-lib-util"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):t.DecapCmsBackendForgejo=e(t.DecapCmsLibUtil,t.DecapCmsDefaultExports.EmotionCore,t.React,t.DecapCmsDefaultExports.PropTypes,t.DecapCmsLibAuth,t.DecapCmsUiDefault)}(window,(t,e,r,n,i,o)=>(()=>{var s={95:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},128:(t,e,r)=>{var n=r(8506);t.exports=function(t,e){return!(null==t||!t.length)&&n(t,e,0)>-1}},166:t=>{t.exports=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},310:t=>{t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},330:(t,e,r)=>{var n=r(5874),i=r(759),o=r(9505),s=r(983);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(s(t))}},462:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},476:(t,e,r)=>{var n=r(1200);t.exports=function(t){return n(this,t).get(t)}},552:(t,e,r)=>{var n=r(9438);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},638:t=>{t.exports=function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}},656:(t,e,r)=>{var n=r(4757),i=r(6695),o=r(4153),s="__lodash_placeholder__",a=Math.min;t.exports=function(t,e){var r=t[1],u=e[1],c=r|u,l=c<131,h=128==u&&8==r||128==u&&256==r&&t[7].length<=e[8]||384==u&&e[7].length<=e[8]&&8==r;if(!l&&!h)return t;1&u&&(t[2]=e[2],c|=1&r?0:4);var f=e[3];if(f){var p=t[3];t[3]=p?n(p,f,e[4]):f,t[4]=p?o(t[3],s):e[4]}return(f=e[5])&&(p=t[5],t[5]=p?i(p,f,e[6]):f,t[6]=p?o(t[5],s):e[6]),(f=e[7])&&(t[7]=f),128&u&&(t[8]=null==t[8]?e[8]:a(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=c,t}},714:(t,e,r)=>{var n=r(1603),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},759:(t,e,r)=>{var n=r(5874),i=r(975),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||s.test(t)||!o.test(t)||null!=e&&t in Object(e)}},809:(t,e,r)=>{var n=r(7156),i=r(3256),o=r(714);t.exports=function(t,e,r,s){var a=1&e,u=i(t);return function e(){for(var i=-1,c=arguments.length,l=-1,h=s.length,f=Array(h+c),p=this&&this!==o&&this instanceof e?u:t;++l<h;)f[l]=s[l];for(;c--;)f[l++]=arguments[++i];return n(p,a?r:this,f)}}},975:(t,e,r)=>{var n=r(5271),i=r(7583);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},983:(t,e,r)=>{var n=r(8071);t.exports=function(t){return null==t?"":n(t)}},984:(t,e,r)=>{var n=r(1200);t.exports=function(t){return n(this,t).has(t)}},1022:(t,e,r)=>{var n=r(6821),i=r(7221),o=r(1596),s=r(1992),a=r(552);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},1095:(t,e,r)=>{var n=r(9400),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},1200:(t,e,r)=>{var n=r(95);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},1400:t=>{t.exports={}},1467:(t,e,r)=>{var n=r(8071),i=r(6311),o=r(4821),s=r(8337),a=r(983),u=/^\s+/;t.exports=function(t,e,r){if((t=a(t))&&(r||void 0===e))return t.replace(u,"");if(!t||!(e=n(e)))return t;var c=s(t),l=o(c,s(e));return i(c,l).join("")}},1596:(t,e,r)=>{var n=r(9438);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},1603:(t,e,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},1683:(t,e,r)=>{var n=r(9169),i=r(3821),o=i?function(t,e){return i.set(t,e),t}:n;t.exports=o},1824:t=>{var e=Date.now;t.exports=function(t){var r=0,n=0;return function(){var i=e(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}},1908:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},1992:(t,e,r)=>{var n=r(9438);t.exports=function(t){return n(this.__data__,t)>-1}},2121:(t,e,r)=>{var n=r(8487);t.exports=function(t){var e=n(t,function(t){return 500===r.size&&r.clear(),t}),r=e.cache;return e}},2176:(t,e,r)=>{var n=r(3821),i=r(3883),o=n?function(t){return n.get(t)}:i;t.exports=o},2275:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},2405:(t,e,r)=>{var n=r(8637);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},2409:t=>{t.exports=function(t){return t.split("")}},2532:(t,e,r)=>{var n=r(8255),i=r(2176),o=r(8581),s=r(8973);t.exports=function(t){var e=o(t),r=s[e];if("function"!=typeof r||!(e in n.prototype))return!1;if(t===r)return!0;var a=i(r);return!!a&&t===a[0]}},2750:t=>{t.exports=function(){}},2972:(t,e,r)=>{var n=r(2532),i=r(4676),o=r(2992);t.exports=function(t,e,r,s,a,u,c,l,h,f){var p=8&e;e|=p?32:64,4&(e&=~(p?64:32))||(e&=-4);var d=[t,e,a,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,h,f],g=r.apply(void 0,d);return n(t)&&i(g,d),g.placeholder=s,o(g,t,e)}},2992:(t,e,r)=>{var n=r(8136),i=r(5585),o=r(3232),s=r(9893);t.exports=function(t,e,r){var a=e+"";return o(t,i(a,s(n(a),r)))}},3135:e=>{"use strict";e.exports=t},3232:(t,e,r)=>{var n=r(3431),i=r(1824)(n);t.exports=i},3256:(t,e,r)=>{var n=r(1095),i=r(9400);t.exports=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=n(t.prototype),o=t.apply(r,e);return i(o)?o:r}}},3328:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*g}},3431:(t,e,r)=>{var n=r(8295),i=r(4856),o=r(9169),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=s},3493:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},3510:t=>{t.exports=function(t){return t.placeholder}},3758:(t,e,r)=>{var n=r(8265);t.exports=function(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},3784:(t,e,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},3821:(t,e,r)=>{var n=r(8154),i=n&&new n;t.exports=i},3883:t=>{t.exports=function(){}},4069:(t,e,r)=>{var n=r(6766),i=r(1022),o=r(5870);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},4119:t=>{"use strict";t.exports=r},4136:(t,e,r)=>{var n=r(1200);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},4153:t=>{var e="__lodash_placeholder__";t.exports=function(t,r){for(var n=-1,i=t.length,o=0,s=[];++n<i;){var a=t[n];a!==r&&a!==e||(t[n]=e,s[o++]=n)}return s}},4228:(t,e,r)=>{var n=r(7787),i=r(7827),o=r(9400),s=r(462),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?f:a).test(s(t))}},4276:function(t,e,r){var n=r(5409);!function(){"use strict";var e=function(t){setTimeout(t,0)};void 0!==n&&n&&"function"==typeof n.nextTick&&(e=n.nextTick),t.exports=function(t){var r={capacity:t||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===r.firstHere){r.current++,r.firstHere=!0;var t=1}else t=0;var e={n:1};"function"==typeof arguments[0]?e.task=arguments[0]:e.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?e.task=arguments[1]:e.n=arguments[1]);var n=e.task;if(e.task=function(){n(r.leave)},r.current+e.n-t>r.capacity)return 1===t&&(r.current--,r.firstHere=!1),r.queue.push(e);r.current+=e.n-t,e.task(r.leave),1===t&&(r.firstHere=!1)},leave:function(t){if(t=t||1,r.current-=t,r.queue.length){var n=r.queue[0];n.n+r.current>r.capacity||(r.queue.shift(),r.current+=n.n,e(n.task))}else if(r.current<0)throw new Error("leave called too many times.")},available:function(t){return t=t||1,r.current+t<=r.capacity}};return r}}()},4361:t=>{var e="\\ud800-\\udfff",r="["+e+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+e+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,s,a].join("|")+")"+c+u+")*",h="(?:"+[o+n+"?",n,s,a,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");t.exports=function(t){return t.match(f)||[]}},4671:(t,e,r)=>{var n=r(4228),i=r(7559);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},4674:(t,e,r)=>{"use strict";var n=r(7020),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return n.isMemo(t)?s:a[t.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var c=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(d){var i=p(r);i&&i!==d&&t(e,i,n)}var s=l(r);h&&(s=s.concat(h(r)));for(var a=u(e),g=u(r),y=0;y<s.length;++y){var m=s[y];if(!(o[m]||n&&n[m]||g&&g[m]||a&&a[m])){var b=f(r,m);try{c(e,m,b)}catch(t){}}}}return e}},4676:(t,e,r)=>{var n=r(1683),i=r(1824)(n);t.exports=i},4757:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var o=-1,s=t.length,a=n.length,u=-1,c=r.length,l=e(s-a,0),h=Array(c+l),f=!i;++u<c;)h[u]=r[u];for(;++o<a;)(f||o<s)&&(h[n[o]]=t[o]);for(;l--;)h[u++]=t[o++];return h}},4821:(t,e,r)=>{var n=r(8506);t.exports=function(t,e){for(var r=-1,i=t.length;++r<i&&n(e,t[r],0)>-1;);return r}},4822:(t,e,r)=>{var n=r(8255),i=r(8820),o=r(310);t.exports=function(t){if(t instanceof n)return t.clone();var e=new i(t.__wrapped__,t.__chain__);return e.__actions__=o(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}},4856:(t,e,r)=>{var n=r(4671),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},4933:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],u=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),l=0,h=u>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[l++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4997:t=>{var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},5097:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},5103:(t,e,r)=>{var n=r(4997),i=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(i,""):t}},5270:(t,e,r)=>{"use strict";t.exports=r(5460)},5271:(t,e,r)=>{var n=r(9006),i=r(9650),o=r(6881),s=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},5360:(t,e)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,l=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,v=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case l:case h:case o:case a:case s:case p:return t;default:switch(t=t&&t.$$typeof){case c:case f:case y:case g:case u:return t;default:return e}}case i:return e}}}function _(t){return x(t)===h}e.AsyncMode=l,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=u,e.Element=n,e.ForwardRef=f,e.Fragment=o,e.Lazy=y,e.Memo=g,e.Portal=i,e.Profiler=a,e.StrictMode=s,e.Suspense=p,e.isAsyncMode=function(t){return _(t)||x(t)===l},e.isConcurrentMode=_,e.isContextConsumer=function(t){return x(t)===c},e.isContextProvider=function(t){return x(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return x(t)===f},e.isFragment=function(t){return x(t)===o},e.isLazy=function(t){return x(t)===y},e.isMemo=function(t){return x(t)===g},e.isPortal=function(t){return x(t)===i},e.isProfiler=function(t){return x(t)===a},e.isStrictMode=function(t){return x(t)===s},e.isSuspense=function(t){return x(t)===p},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===a||t===s||t===p||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===g||t.$$typeof===u||t.$$typeof===c||t.$$typeof===f||t.$$typeof===b||t.$$typeof===v||t.$$typeof===w||t.$$typeof===m)},e.typeOf=x},5390:(t,e,r)=>{var n=r(7156),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=o[s];return c[e]=r(u),n(t,this,c)}}},5409:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,u=[],c=!1,l=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||c||s(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},5460:(t,e)=>{"use strict";var r=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(t,e,n){var i=null;if(void 0!==n&&(i=""+n),void 0!==e.key&&(i=""+e.key),"key"in e)for(var o in n={},e)"key"!==o&&(n[o]=e[o]);else n=e;return e=n.ref,{$$typeof:r,type:t,key:i,ref:void 0!==e?e:null,props:n}}e.Fragment=n,e.jsx=i,e.jsxs=i},5585:t=>{var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;t.exports=function(t,r){var n=r.length;if(!n)return t;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+r+"] */\n")}},5639:(t,e,r)=>{var n=r(7156),i=r(3256),o=r(7524),s=r(2972),a=r(3510),u=r(4153),c=r(714);t.exports=function(t,e,r){var l=i(t);return function i(){for(var h=arguments.length,f=Array(h),p=h,d=a(i);p--;)f[p]=arguments[p];var g=h<3&&f[0]!==d&&f[h-1]!==d?[]:u(f,d);return(h-=g.length)<r?s(t,e,o,i.placeholder,void 0,f,g,void 0,void 0,r-h):n(this&&this!==c&&this instanceof i?l:t,this,f)}}},5733:(t,e,r)=>{var n=r(3256),i=r(714);t.exports=function(t,e,r){var o=1&e,s=n(t);return function e(){return(this&&this!==i&&this instanceof e?s:t).apply(o?r:this,arguments)}}},5870:(t,e,r)=>{var n=r(4671)(r(714),"Map");t.exports=n},5874:t=>{var e=Array.isArray;t.exports=e},6171:t=>{"use strict";t.exports=o},6172:t=>{t.exports=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}},6264:(t,e,r)=>{var n=r(8637);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},6270:(t,e,r)=>{var n=r(6965),i=r(9298),o=r(3510),s=r(4153),a=n(function(t,e){var r=s(e,o(a));return i(t,32,void 0,e,r)});a.placeholder={},t.exports=a},6311:(t,e,r)=>{var n=r(7201);t.exports=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},6450:(t,e,r)=>{var n=r(714)["__core-js_shared__"];t.exports=n},6533:(t,e,r)=>{"use strict";const n=r(4933),i=r(3328),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=u,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(V(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(V(t,ArrayBuffer)||t&&V(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(V(t,SharedArrayBuffer)||t&&V(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?a(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),a(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||V(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(t).length;default:if(i)return n?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return E(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return R(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(t,o+n)!==c(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function x(t,e,r,n){return Y(K(e,t.length-r),t,r,n)}function _(t,e,r,n){return Y(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return Y(G(e),t,r,n)}function k(t,e,r,n){return Y(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function R(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function E(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return l(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=u.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(V(e,Uint8Array))i+e.length>n.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?E(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r);for(let t=0;t<a;++t)if(c[t]!==l[t]){o=c[t],s=l[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return _(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function P(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function U(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function B(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function F(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i){N(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function $(t,e,r,n,i){N(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function T(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,o){return e=+e,r>>>=0,o||T(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return e=+e,r>>>=0,o||T(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z(function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=Z(function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||B(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z(function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),u.prototype.readBigInt64BE=Z(function(t){z(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||F(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||F(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Z(function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Z(function(t,e=0){return $(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);F(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);F(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||F(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Z(function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Z(function(t,e=0){return $(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const M={};function q(t,e,r){M[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function D(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function N(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function z(t,e){if("number"!=typeof t)throw new M.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw z(t,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}q("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),q("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),q("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function K(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function V(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Z(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},6559:(t,e,r)=>{var n=r(8071),i=r(5103),o=r(6311),s=r(8402),a=r(4821),u=r(8337),c=r(983);t.exports=function(t,e,r){if((t=c(t))&&(r||void 0===e))return i(t);if(!t||!(e=n(e)))return t;var l=u(t),h=u(e),f=a(l,h),p=s(l,h)+1;return o(l,f,p).join("")}},6619:(t,e,r)=>{var n=r(310),i=r(1908),o=Math.min;t.exports=function(t,e){for(var r=t.length,s=o(e.length,r),a=n(t);s--;){var u=e[s];t[s]=i(u,r)?a[u]:void 0}return t}},6695:t=>{var e=Math.max;t.exports=function(t,r,n,i){for(var o=-1,s=t.length,a=-1,u=n.length,c=-1,l=r.length,h=e(s-u,0),f=Array(h+l),p=!i;++o<h;)f[o]=t[o];for(var d=o;++c<l;)f[d+c]=r[c];for(;++a<u;)(p||o<s)&&(f[d+n[a]]=t[o++]);return f}},6766:(t,e,r)=>{var n=r(2405),i=r(8341),o=r(9644),s=r(3784),a=r(6264);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},6821:t=>{t.exports=function(){this.__data__=[],this.size=0}},6881:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},6965:(t,e,r)=>{var n=r(9169),i=r(5390),o=r(3232);t.exports=function(t,e){return o(i(t,e,n),t+"")}},7012:t=>{t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},7020:(t,e,r)=>{"use strict";t.exports=r(5360)},7125:t=>{"use strict";t.exports=i},7156:t=>{t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},7201:t=>{t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}},7221:(t,e,r)=>{var n=r(9438),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},7434:t=>{"use strict";t.exports=n},7477:(t,e,r)=>{var n=r(1200);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},7524:(t,e,r)=>{var n=r(4757),i=r(6695),o=r(6172),s=r(3256),a=r(2972),u=r(3510),c=r(6619),l=r(4153),h=r(714);t.exports=function t(e,r,f,p,d,g,y,m,b,v){var w=128&r,x=1&r,_=2&r,A=24&r,k=512&r,R=_?void 0:s(e);return function E(){for(var S=arguments.length,P=Array(S),O=S;O--;)P[O]=arguments[O];if(A)var C=u(E),U=o(P,C);if(p&&(P=n(P,p,d,A)),g&&(P=i(P,g,y,A)),S-=U,A&&S<v){var B=l(P,C);return a(e,r,t,E.placeholder,f,P,B,m,b,v-S)}var F=x?f:this,L=_?F[e]:e;return S=P.length,m?P=c(P,m):k&&S>1&&P.reverse(),w&&b<S&&(P.length=b),this&&this!==h&&this instanceof E&&(L=R||s(L)),L.apply(F,P)}}},7559:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},7583:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},7639:(t,e,r)=>{var n=r(5103),i=r(9400),o=r(975),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=a.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):s.test(t)?NaN:+t}},7787:(t,e,r)=>{var n=r(5271),i=r(9400);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},7827:(t,e,r)=>{var n,i=r(6450),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},8071:(t,e,r)=>{var n=r(9006),i=r(2275),o=r(5874),s=r(975),a=n?n.prototype:void 0,u=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},8110:t=>{"use strict";t.exports=e},8136:t=>{var e=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;t.exports=function(t){var n=t.match(e);return n?n[1].split(r):[]}},8154:(t,e,r)=>{var n=r(4671)(r(714),"WeakMap");t.exports=n},8255:(t,e,r)=>{var n=r(1095),i=r(2750);function o(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,t.exports=o},8265:(t,e,r)=>{var n=r(7639),i=1/0;t.exports=function(t){return t?(t=n(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},8295:t=>{t.exports=function(t){return function(){return t}}},8306:t=>{t.exports=function(t){return t!=t}},8337:(t,e,r)=>{var n=r(2409),i=r(3493),o=r(4361);t.exports=function(t){return i(t)?o(t):n(t)}},8341:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},8402:(t,e,r)=>{var n=r(8506);t.exports=function(t,e){for(var r=t.length;r--&&n(e,t[r],0)>-1;);return r}},8487:(t,e,r)=>{var n=r(8910);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},8506:(t,e,r)=>{var n=r(166),i=r(8306),o=r(638);t.exports=function(t,e,r){return e==e?o(t,e,r):n(t,i,r)}},8581:(t,e,r)=>{var n=r(1400),i=Object.prototype.hasOwnProperty;t.exports=function(t){for(var e=t.name+"",r=n[e],o=i.call(n,e)?r.length:0;o--;){var s=r[o],a=s.func;if(null==a||a==t)return s.name}return e}},8637:(t,e,r)=>{var n=r(4671)(Object,"create");t.exports=n},8820:(t,e,r)=>{var n=r(1095),i=r(2750);function o(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,t.exports=o},8910:(t,e,r)=>{var n=r(4069),i=r(7477),o=r(476),s=r(984),a=r(4136);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},8973:(t,e,r)=>{var n=r(8255),i=r(8820),o=r(2750),s=r(5874),a=r(7583),u=r(4822),c=Object.prototype.hasOwnProperty;function l(t){if(a(t)&&!s(t)&&!(t instanceof n)){if(t instanceof i)return t;if(c.call(t,"__wrapped__"))return u(t)}return new i(t)}l.prototype=o.prototype,l.prototype.constructor=l,t.exports=l},9006:(t,e,r)=>{var n=r(714).Symbol;t.exports=n},9169:t=>{t.exports=function(t){return t}},9182:(t,e,r)=>{var n=r(330),i=r(7787),o=r(9628);t.exports=function(t,e,r){var s=-1,a=(e=n(e,t)).length;for(a||(a=1,t=void 0);++s<a;){var u=null==t?void 0:t[o(e[s])];void 0===u&&(s=a,u=r),t=i(u)?u.call(t):u}return t}},9298:(t,e,r)=>{var n=r(1683),i=r(5733),o=r(5639),s=r(7524),a=r(809),u=r(2176),c=r(656),l=r(4676),h=r(2992),f=r(3758),p=Math.max;t.exports=function(t,e,r,d,g,y,m,b){var v=2&e;if(!v&&"function"!=typeof t)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(e&=-97,d=g=void 0),m=void 0===m?m:p(f(m),0),b=void 0===b?b:f(b),w-=g?g.length:0,64&e){var x=d,_=g;d=g=void 0}var A=v?void 0:u(t),k=[t,e,r,d,g,x,_,y,m,b];if(A&&c(k,A),t=k[0],e=k[1],r=k[2],d=k[3],g=k[4],!(b=k[9]=void 0===k[9]?v?0:t.length:p(k[9]-w,0))&&24&e&&(e&=-25),e&&1!=e)R=8==e||16==e?o(t,e,b):32!=e&&33!=e||g.length?s.apply(void 0,k):a(t,e,r,d);else var R=i(t,e,r);return h((A?n:l)(R,k),t,e)}},9400:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},9438:(t,e,r)=>{var n=r(5097);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},9505:(t,e,r)=>{var n=r(2121),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=n(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)}),e});t.exports=s},9628:(t,e,r)=>{var n=r(975);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},9644:(t,e,r)=>{var n=r(8637),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},9650:(t,e,r)=>{var n=r(9006),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},9893:(t,e,r)=>{var n=r(7012),i=r(128),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];t.exports=function(t,e){return n(o,function(r){var n="_."+r[0];e&r[1]&&!i(t,n)&&t.push(n)}),t.sort()}}},a={};function u(t){var e=a[t];if(void 0!==e)return e.exports;var r=a[t]={exports:{}};return s[t].call(r.exports,r,r.exports,u),r.exports}u.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return u.d(e,{a:e}),e},u.d=(t,e)=>{for(var r in e)u.o(e,r)&&!u.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),u.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendForgejo:()=>fr});var t,e,r=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),n=(t=["",""],e=["",""],Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))),i=function(){function t(){for(var e=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tag=function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof t?e.interimTag.bind(e,t):"string"==typeof t?e.transformEndResult(t):(t=t.map(e.transformString.bind(e)),e.transformEndResult(t.reduce(e.processSubstitutions.bind(e,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map(function(t){return"function"==typeof t?t():t}),this.tag}return r(t,[{key:"interimTag",value:function(t,e){for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return this.tag(n,t.apply(void 0,[e].concat(i)))}},{key:"processSubstitutions",value:function(t,e,r){var n=this.transformSubstitution(t.shift(),e);return"".concat(e,n,r)}},{key:"transformString",value:function(t){return this.transformers.reduce(function(t,e){return e.onString?e.onString(t):t},t)}},{key:"transformSubstitution",value:function(t,e){return this.transformers.reduce(function(t,r){return r.onSubstitution?r.onSubstitution(t,e):t},t)}},{key:"transformEndResult",value:function(t){return this.transformers.reduce(function(t,e){return e.onEndResult?e.onEndResult(t):t},t)}}]),t}();const o=i;var s={separator:"",conjunction:"",serial:!1};const a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;return{onSubstitution:function(e,r){if(Array.isArray(e)){var n=e.length,i=t.separator,o=t.conjunction,s=t.serial,a=r.match(/(\n?[^\S\n]+)$/);if(e=a?e.join(i+a[1]):e.join(i+" "),o&&n>1){var u=e.lastIndexOf(i);e=e.slice(0,u)+(s?i:"")+" "+o+e.slice(u+1)}}return e}}},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(e){if("initial"===t){var r=e.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}(r.map(function(t){return t.length})));if(n){var i=new RegExp("^.{"+n+"}","gm");return e.replace(i,"")}return e}if("all"===t)return e.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}},h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(e){if(""===t)return e.trim();if("start"===(t=t.toLowerCase())||"left"===t)return e.replace(/^\s*/,"");if("end"===t||"right"===t)return e.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};new o(a({separator:","}),l,h),new o(a({separator:",",conjunction:"and"}),l,h),new o(a({separator:",",conjunction:"or"}),l,h);const f=function(t){return{onSubstitution:function(e,r){if(null==t||"string"!=typeof t)throw new Error("You need to specify a string character to split by.");return"string"==typeof e&&e.includes(t)&&(e=e.split(t)),e}}};var p=function(t){return null!=t&&!Number.isNaN(t)&&"boolean"!=typeof t};new o(f("\n"),function(){return{onSubstitution:function(t){return Array.isArray(t)?t.filter(p):p(t)?t:""}}},a,l,h);const d=function(t,e){return{onSubstitution:function(r,n){if(null==t||null==e)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(t,e)}}};new o(f("\n"),a,l,h,d(/&/g,"&"),d(/</g,"<"),d(/>/g,">"),d(/"/g,"""),d(/'/g,"'"),d(/`/g,"`"));const g=function(t,e){return{onEndResult:function(r){if(null==t||null==e)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(t,e)}}};new o(g(/(?:\n(?:\s*))+/g," "),h),new o(g(/(?:\n\s*)/g,""),h),new o(a({separator:","}),g(/(?:\s+)/g," "),h),new o(a({separator:",",conjunction:"or"}),g(/(?:\s+)/g," "),h),new o(a({separator:",",conjunction:"and"}),g(/(?:\s+)/g," "),h),new o(a,l,h),new o(a,g(/(?:\s+)/g," "),h);const y=new o(l,h);new o(l("all"),h);var m=u(1467),b=u.n(m),v=u(4276),w=u.n(v),x=u(3135),_=u(6533).hp;const A="3.7.5",k=A,R="function"==typeof atob,E="function"==typeof btoa,S="function"==typeof _,P="function"==typeof TextDecoder?new TextDecoder:void 0,O="function"==typeof TextEncoder?new TextEncoder:void 0,C=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),U=(t=>{let e={};return t.forEach((t,r)=>e[t]=r),e})(C),B=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,F=String.fromCharCode.bind(String),L="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):t=>new Uint8Array(Array.prototype.slice.call(t,0)),$=t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_"),T=t=>t.replace(/[^A-Za-z0-9\+\/]/g,""),I=t=>{let e,r,n,i,o="";const s=t.length%3;for(let s=0;s<t.length;){if((r=t.charCodeAt(s++))>255||(n=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=r<<16|n<<8|i,o+=C[e>>18&63]+C[e>>12&63]+C[e>>6&63]+C[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o},j=E?t=>btoa(t):S?t=>_.from(t,"binary").toString("base64"):I,M=S?t=>_.from(t).toString("base64"):t=>{let e=[];for(let r=0,n=t.length;r<n;r+=4096)e.push(F.apply(null,t.subarray(r,r+4096)));return j(e.join(""))},q=(t,e=!1)=>e?$(M(t)):M(t),D=t=>{if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?F(192|e>>>6)+F(128|63&e):F(224|e>>>12&15)+F(128|e>>>6&63)+F(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return F(240|e>>>18&7)+F(128|e>>>12&63)+F(128|e>>>6&63)+F(128|63&e)},N=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,z=t=>t.replace(N,D),W=S?t=>_.from(t,"utf8").toString("base64"):O?t=>M(O.encode(t)):t=>j(z(t)),H=(t,e=!1)=>e?$(W(t)):W(t),K=t=>H(t,!0),G=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Y=t=>{switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return F((e>>>10)+55296)+F(56320+(1023&e));case 3:return F((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return F((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},V=t=>t.replace(G,Y),J=t=>{if(t=t.replace(/\s+/g,""),!B.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));let e,r,n,i="";for(let o=0;o<t.length;)e=U[t.charAt(o++)]<<18|U[t.charAt(o++)]<<12|(r=U[t.charAt(o++)])<<6|(n=U[t.charAt(o++)]),i+=64===r?F(e>>16&255):64===n?F(e>>16&255,e>>8&255):F(e>>16&255,e>>8&255,255&e);return i},X=R?t=>atob(T(t)):S?t=>_.from(t,"base64").toString("binary"):J,Z=S?t=>L(_.from(t,"base64")):t=>L(X(t).split("").map(t=>t.charCodeAt(0))),Q=t=>Z(et(t)),tt=S?t=>_.from(t,"base64").toString("utf8"):P?t=>P.decode(Z(t)):t=>V(X(t)),et=t=>T(t.replace(/[-_]/g,t=>"-"==t?"+":"/")),rt=t=>tt(et(t)),nt=t=>({value:t,enumerable:!1,writable:!0,configurable:!0}),it=function(){const t=(t,e)=>Object.defineProperty(String.prototype,t,nt(e));t("fromBase64",function(){return rt(this)}),t("toBase64",function(t){return H(this,t)}),t("toBase64URI",function(){return H(this,!0)}),t("toBase64URL",function(){return H(this,!0)}),t("toUint8Array",function(){return Q(this)})},ot=function(){const t=(t,e)=>Object.defineProperty(Uint8Array.prototype,t,nt(e));t("toBase64",function(t){return q(this,t)}),t("toBase64URI",function(){return q(this,!0)}),t("toBase64URL",function(){return q(this,!0)})},st={version:A,VERSION:k,atob:X,atobPolyfill:J,btoa:j,btoaPolyfill:I,fromBase64:rt,toBase64:H,encode:H,encodeURI:K,encodeURL:K,utob:z,btou:V,decode:rt,isValid:t=>{if("string"!=typeof t)return!1;const e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:q,toUint8Array:Q,extendString:it,extendUint8Array:ot,extendBuiltins:()=>{it(),ot()}};var at=u(6559),ut=u.n(at),ct=u(9182),lt=u.n(ct),ht=u(6270),ft=u.n(ht);const pt="Forgejo",dt=-1;var gt=function(t){return t.CREATE="create",t.DELETE="delete",t.UPDATE="update",t}(gt||{});class yt{constructor(t){if(!t.apiRoot)throw new Error("API root is required");this.apiRoot=t.apiRoot,this.token=t.token||"",this.branch=t.branch||"master",this.repo=t.repo||"",this.originRepo=t.originRepo||this.repo,this.useOpenAuthoring=!!t.useOpenAuthoring,this.cmsLabelPrefix=t.cmsLabelPrefix||"",this.initialWorkflowStatus=t.initialWorkflowStatus||"draft",this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[e,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=e[0],this.repoName=e[1],this.originRepoOwner=r[0],this.originRepoName=r[1]}static DEFAULT_COMMIT_MESSAGE="Automatically generated by Static CMS";user(){return this._userPromise||(this._userPromise=this.getUser()),this._userPromise}getUser(){return this.request("/user")}async hasWriteAccess(){try{const t=await this.request(this.repoURL);return this.repoOwner=t.owner.login,t.permissions.push}catch(t){throw console.error("Problem fetching repo data from Forgejo"),t}}reset(){}requestHeaders(t={}){const e={"Content-Type":"application/json; charset=utf-8",...t};return this.token?(e.Authorization=`token ${this.token}`,Promise.resolve(e)):Promise.resolve(e)}async parseJsonResponse(t){const e=await t.json();return t.ok?e:Promise.reject(e)}urlFor(t,e){const r=[];if(e.params)for(const t in e.params)r.push(`${t}=${encodeURIComponent(e.params[t])}`);return r.length&&(t+=`?${r.join("&")}`),this.apiRoot+t}parseResponse(t){const e=t.headers.get("Content-Type");return e&&e.match(/json/)?this.parseJsonResponse(t):t.text().then(e=>t.ok?e:Promise.reject(e))}handleRequestError(t,e){throw new x.APIError(t.message,e,pt)}buildRequest(t){return t}async request(t,e={},r=t=>this.parseResponse(t)){e={cache:"no-cache",...e};const n=await this.requestHeaders(e.headers||{}),i=this.urlFor(t,e);let o=500;try{const t=x.unsentRequest.fromFetchArguments(i,{...e,headers:n}),s=await(0,x.requestWithBackoff)(this,t);return o=s.status,await r(s)}catch(t){return this.handleRequestError(t,o)}}nextUrlProcessor(){return t=>t}async requestAllPages(t,e={}){e={cache:"no-cache",...e};const r=await this.requestHeaders(e.headers||{}),n=this.urlFor(t,e),i=await(0,x.getAllResponses)(n,{...e,headers:r},"next",this.nextUrlProcessor()),o=await Promise.all(i.map(t=>this.parseResponse(t)));return[].concat(...o)}generateContentKey(t,e){const r=(0,x.generateContentKey)(t,e);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(t){if(!this.useOpenAuthoring)return(0,x.parseContentKey)(t);const e=`${this.repo}/`,r=this.originRepo?`${this.originRepo}/`:null;let n=t;return t.startsWith(e)?n=t.slice(e.length):r&&t.startsWith(r)&&(n=t.slice(r.length)),(0,x.parseContentKey)(n)}async readFile(t,e,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return e||(e=await this.getFileSha(t,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:e,repoURL:n,parseText:i})}async readFileMetadata(t,e){const r=await(0,x.readFileMetadata)(e,async()=>{try{const e=await this.request(`${this.originRepoURL}/commits`,{params:{path:t,sha:this.branch,stat:"false"}}),{commit:r}=e[0];return{author:r.author.name||r.author.email,updatedOn:r.author.date}}catch(t){return{author:"",updatedOn:""}}},x.localForage);return r}async fetchBlobContent({sha:t,repoURL:e,parseText:r}){const n=await this.request(`${e}/git/blobs/${t}`,{cache:"force-cache"});if(r)return st.decode(n.content);{const t=st.atob(n.content),e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return new Blob([e])}}async listFiles(t,{repoURL:e=this.repoURL,branch:r=this.branch,depth:n=1}={},i){const o=ut()(t,"/"),s=Boolean(o);try{const t=(await this.request(`${e}/branches/${encodeURIComponent(r)}`)).commit.id,a=n>1||s;return(await this.request(`${e}/git/trees/${encodeURIComponent(t)}`,{params:a?{recursive:1}:{}})).tree.filter(t=>{if((i||"blob"===t.type)&&t.path){if(!s)return t.path.split("/").length<=n;if(!t.path.startsWith(`${o}/`))return!1;const e=t.path.slice(o.length+1);return!!e&&e.split("/").length<=n}return!1}).map(t=>{const e=s&&t.path.startsWith(`${o}/`)?t.path.slice(o.length+1):t.path;return{type:t.type,id:t.sha,name:(0,x.basename)(t.path),path:s?`${o}/${e}`:t.path,size:t.size}})}catch(t){if(t&&404===t.status)return console.info("[StaticCMS] This 404 was expected and handled appropriately."),[];throw t}}async persistFiles(t,e,r){const n=[...e,...t],i=await this.getChangeFileOperations(n,this.branch);return this.changeFiles(i,r)}async changeFiles(t,e){return await this.request(`${this.repoURL}/contents`,{method:"POST",body:JSON.stringify({branch:this.branch,files:t,message:e.commitMessage})})}async getChangeFileOperations(t,e){return await Promise.all(t.map(async t=>{const r=await lt()(t,"toBase64",ft()(this.toBase64,t.raw));let n,i,o,s=b()(t.path,"/");try{n=await this.getFileSha(t.path,{branch:e}),i=gt.UPDATE;const r="newPath"in t?t.newPath:void 0;o=r&&s,s=r?b()(r,"/"):s}catch{n=void 0,i=gt.CREATE}return{operation:i,content:r,path:s,from_path:o,sha:n}}))}async getFileSha(t,{repoURL:e=this.repoURL,branch:r=this.branch}={}){const n=(t.startsWith("/")?t.slice(1):t).split("/").map(t=>encodeURIComponent(t)).join("/"),i=await this.request(`${e}/contents/${n}`,{params:{ref:r}});if(i?.sha)return i.sha;throw new x.APIError("Not Found",404,pt)}async deleteFiles(t,e){if(this.useOpenAuthoring)throw new x.APIError("Cannot delete published entries as an Open Authoring user!",403,pt);const r=await Promise.all(t.map(async t=>{const e=await this.getFileSha(t);return{operation:gt.DELETE,path:t,sha:e}}));return this.changeFiles(r,{commitMessage:e})}toBase64(t){return Promise.resolve(st.encode(t))}async getBranch(t){return this.request(`${this.repoURL}/branches/${encodeURIComponent(t)}`)}async getDefaultBranch(){return this.getBranch(this.branch)}async createBranch(t,e=this.branch){return this.request(`${this.repoURL}/branches`,{method:"POST",body:JSON.stringify({new_branch_name:t,old_ref_name:e})})}async deleteBranch(t){await this.request(`${this.repoURL}/branches/${encodeURIComponent(t)}`,{method:"DELETE"})}async getPullRequests(t="open",e){const r=await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:{state:t,base:this.branch,limit:100}});return e?r.filter(t=>{const r=t.head?.label;if(r)return r===e;const n=t.head?.repo?.owner?.login,i=t.head?.ref;return!(!n||!i)&&`${n}:${i}`===e}):r}async getOpenAuthoringPullRequest(t,e){const r=await this.getBranch(t).catch(()=>{throw new x.EditorialWorkflowError("content is not under editorial workflow",!0)}),n=e.filter(t=>t.head.sha===r.commit.id)[0];if(!n)return{pullRequest:{number:dt,state:"open",labels:[{name:(0,x.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],head:{ref:t,sha:r.commit.id}},branch:r};const i=n.labels.filter(t=>!(0,x.isCMSLabel)(t.name,this.cmsLabelPrefix)),o="closed"===n.state?{name:(0,x.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,x.statusToLabel)("pending_review",this.cmsLabelPrefix)};return{pullRequest:{...n,labels:[...i,o]},branch:r}}async getBranchPullRequest(t){if(this.useOpenAuthoring){const e=await this.getHeadReference(t),r=await this.getPullRequests("all",e);return(await this.getOpenAuthoringPullRequest(t,r)).pullRequest}const e=(await this.getPullRequests("open",`${this.repoOwner}:${t}`)).filter(t=>t.labels.some(t=>(0,x.isCMSLabel)(t.name,this.cmsLabelPrefix)));if(e.length>0)return e[0];throw new x.EditorialWorkflowError("content is not under editorial workflow",!0)}async getHeadReference(t){return`${this.repoOwner}:${t}`}async createPR(t,e,r=x.DEFAULT_PR_BODY){return this.request(`${this.originRepoURL}/pulls`,{method:"POST",body:JSON.stringify({title:t,head:await this.getHeadReference(e),base:this.branch,body:r})})}async updatePR(t,e){return this.request(`${this.originRepoURL}/pulls/${t}`,{method:"PATCH",body:JSON.stringify({state:e})})}async closePR(t){return this.updatePR(t,"closed")}async mergePR(t){await this.request(`${this.originRepoURL}/pulls/${t.number}/merge`,{method:"POST",body:JSON.stringify({Do:"merge",MergeMessageField:x.MERGE_COMMIT_MESSAGE})})}async getPullRequestFiles(t){return t===dt?[]:this.request(`${this.originRepoURL}/pulls/${t}/files`)}async getDifferences(t,e){const r=this.useOpenAuthoring?this.repoURL:this.originRepoURL;try{return await this.request(`${r}/compare/${encodeURIComponent(t)}...${encodeURIComponent(e)}`)}catch(r){if(this.useOpenAuthoring)return this.request(`${this.originRepoURL}/compare/${encodeURIComponent(t)}...${encodeURIComponent(e)}`);throw r}}async updatePullRequestLabels(t,e){return this.request(`${this.originRepoURL}/issues/${t}/labels`,{method:"PUT",body:JSON.stringify({labels:e})})}async getLabels(){return this.requestAllPages(`${this.originRepoURL}/labels`,{params:{limit:100}})}async createLabel(t,e="0052cc"){return this.request(`${this.originRepoURL}/labels`,{method:"POST",body:JSON.stringify({name:t,color:e})})}async getOrCreateLabel(t){return(await this.getLabels()).find(e=>e.name===t)||this.createLabel(t)}async setPullRequestStatus(t,e){if(this.useOpenAuthoring||t.number===dt)return;const r=(0,x.statusToLabel)(e,this.cmsLabelPrefix),n=await this.getOrCreateLabel(r);if("number"!=typeof n.id)throw new Error(`Status label "${n.name}" returned from getOrCreateLabel is missing a numeric id`);const i=t.labels.filter(t=>!(0,x.isCMSLabel)(t.name,this.cmsLabelPrefix)).filter(t=>"number"==typeof t.id).map(t=>t.id);await this.updatePullRequestLabels(t.number,[...i,n.id])}async getOpenAuthoringBranches(){const t=await this.requestAllPages(`${this.repoURL}/branches`),e=`${x.CMS_BRANCH_PREFIX}/${this.repo}/`;return t.filter(t=>t.name.startsWith(e))}filterOpenAuthoringBranches=async t=>{try{const e=await this.getBranchPullRequest(t),{state:r,merged_at:n}=e;return e.number!==dt&&"closed"===r&&n?(await this.deleteBranch(t),{branch:t,filter:!1}):{branch:t,filter:!0}}catch(e){return e instanceof x.APIError&&404===e.status||e instanceof x.EditorialWorkflowError?{branch:t,filter:!1}:{branch:t,filter:!0}}};async listUnpublishedBranches(){if(this.useOpenAuthoring){let t=(await this.getOpenAuthoringBranches()).map(t=>t.name);const e=await Promise.all(t.map(t=>this.filterOpenAuthoringBranches(t)));return t=e.filter(t=>t.filter).map(t=>t.branch),t}return(await this.getPullRequests("open")).filter(t=>t.head.ref.startsWith(`${x.CMS_BRANCH_PREFIX}/`)&&t.labels.some(t=>(0,x.isCMSLabel)(t.name,this.cmsLabelPrefix))).map(t=>t.head.ref)}async retrieveUnpublishedEntryData(t){const e=(0,x.branchFromContentKey)(t);let r,n,i=null;if(this.useOpenAuthoring){const t=await this.getHeadReference(e),n=await this.getPullRequests("all",t),o=await this.getOpenAuthoringPullRequest(e,n);r=o.pullRequest,i=o.branch}else r=await this.getBranchPullRequest(e);try{const t=await this.getHeadReference(e);n=(await this.getDifferences(this.branch,t)).files.map(t=>({path:t.filename,newFile:"added"===t.status,id:t.sha||""}))}catch(t){n=(await this.getPullRequestFiles(r.number)).map(t=>({path:t.filename,newFile:"added"===t.status,id:""}))}const o=r.labels.find(t=>(0,x.isCMSLabel)(t.name,this.cmsLabelPrefix)),s=o?(0,x.labelToStatus)(o.name,this.cmsLabelPrefix):this.initialWorkflowStatus,{collection:a,slug:u}=this.parseContentKey(t);return{collection:a,slug:u,status:s,diffs:n,updatedAt:r?.updated_at||i?.commit?.author?.date||i?.commit?.committer?.date||(new Date).toISOString(),pullRequestAuthor:r?.user?.login||i?.commit?.author?.name||"Unknown"}}async updateUnpublishedEntryStatus(t,e,r){const n=this.generateContentKey(t,e),i=(0,x.branchFromContentKey)(n),o=await this.getBranchPullRequest(i);if(this.useOpenAuthoring){if("pending_publish"===r)throw new Error('Open Authoring entries may not be set to the status "pending_publish".');if(o.number!==dt){const{state:t}=o;"open"===t&&"draft"===r&&await this.closePR(o.number),"closed"===t&&"pending_review"===r&&await this.updatePR(o.number,"open")}else if("pending_review"===r){const t=await this.getDifferences(this.branch,await this.getHeadReference(i)),e=t.commits[0]?.commit?.message||yt.DEFAULT_COMMIT_MESSAGE;await this.createPR(e,i)}}else await this.setPullRequestStatus(o,r)}async deleteUnpublishedEntry(t,e){const r=this.generateContentKey(t,e),n=(0,x.branchFromContentKey)(r);try{const t=await this.getBranchPullRequest(n);t.number!==dt&&await this.closePR(t.number)}catch(t){if(!(t instanceof x.EditorialWorkflowError||t instanceof x.APIError&&404===t.status))throw t}await this.deleteBranch(n)}async publishUnpublishedEntry(t,e){const r=this.generateContentKey(t,e),n=(0,x.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number===dt)throw new x.APIError("Cannot publish entry without a pull request",400,pt);await this.mergePR(i),await this.deleteBranch(n)}async editorialWorkflowGit(t,e,r,n){const i=this.generateContentKey(r,e),o=(0,x.branchFromContentKey)(i);let s=!1;try{await this.getBranch(o),s=!0}catch(t){if(!(t instanceof x.APIError&&404===t.status))throw t}s||await this.createBranch(o,this.branch);const a=await this.getChangeFileOperations(t,o);if(await this.changeFilesOnBranch(a,n,o),!s&&!this.useOpenAuthoring){const t=await this.createPR(n.commitMessage,o),e=n.status||this.initialWorkflowStatus;await this.setPullRequestStatus(t,e)}}async changeFilesOnBranch(t,e,r){return await this.request(`${this.repoURL}/contents`,{method:"POST",body:JSON.stringify({branch:r,files:t,message:e.commitMessage})})}async forkExists(){try{const t=this.originRepo.split("/")[1],e=`/repos/${this.repoOwner}/${t}`,r=await this.request(e);return!0===r.fork&&!!r.parent&&r.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async createFork(){return this.request(`${this.originRepoURL}/forks`,{method:"POST"})}async mergeUpstream(){try{await this.request(`${this.repoURL}/sync_fork`,{method:"POST"})}catch(t){console.warn("Failed to sync fork with upstream:",t)}}}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mt.apply(null,arguments)}var bt=u(8110),vt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function wt(t){var e=Object.create(null);return function(r){return void 0===e[r]&&(e[r]=t(r)),e[r]}}var xt=/[A-Z]|^ms/g,_t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,At=function(t){return 45===t.charCodeAt(1)},kt=function(t){return null!=t&&"boolean"!=typeof t},Rt=wt(function(t){return At(t)?t:t.replace(xt,"-$&").toLowerCase()}),Et=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(_t,function(t,e,r){return Pt={name:e,styles:r,next:Pt},e})}return 1===vt[t]||At(t)||"number"!=typeof e||0===e?e:e+"px"};function St(t,e,r){if(null==r)return"";var n=r;if(void 0!==n.__emotion_styles)return n;switch(typeof r){case"boolean":return"";case"object":var i=r;if(1===i.anim)return Pt={name:i.name,styles:i.styles,next:Pt},i.name;var o=r;if(void 0!==o.styles){var s=o.next;if(void 0!==s)for(;void 0!==s;)Pt={name:s.name,styles:s.styles,next:Pt},s=s.next;return o.styles+";"}return function(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=St(t,e,r[i])+";";else for(var o in r){var s=r[o];if("object"!=typeof s){var a=s;null!=e&&void 0!==e[a]?n+=o+"{"+e[a]+"}":kt(a)&&(n+=Rt(o)+":"+Et(o,a)+";")}else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=e&&void 0!==e[s[0]]){var u=St(t,e,s);switch(o){case"animation":case"animationName":n+=Rt(o)+":"+u+";";break;default:n+=o+"{"+u+"}"}}else for(var c=0;c<s.length;c++)kt(s[c])&&(n+=Rt(o)+":"+Et(o,s[c])+";")}return n}(t,e,r);case"function":if(void 0!==t){var a=Pt,u=r(t);return Pt=a,St(t,e,u)}}var c=r;if(null==e)return c;var l=e[c];return void 0!==l?l:c}var Pt,Ot=/label:\s*([^\s;{]+)\s*(;|$)/g;function Ct(t,e,r){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0,i="";Pt=void 0;var o=t[0];null==o||void 0===o.raw?(n=!1,i+=St(r,e,o)):i+=o[0];for(var s=1;s<t.length;s++)i+=St(r,e,t[s]),n&&(i+=o[s]);Ot.lastIndex=0;for(var a,u="";null!==(a=Ot.exec(i));)u+="-"+a[1];var c=function(t){for(var e,r=0,n=0,i=t.length;i>=4;++n,i-=4)e=1540483477*(65535&(e=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&t.charCodeAt(n+2))<<16;case 2:r^=(255&t.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:Pt}}var Ut=u(4119),Bt=u.n(Ut),Ft=!!Ut.useInsertionEffect&&Ut.useInsertionEffect,Lt=Ft||function(t){return t()};function $t(t,e,r){var n="";return r.split(" ").forEach(function(r){void 0!==t[r]?e.push(t[r]+";"):r&&(n+=r+" ")}),n}Ft||Ut.useLayoutEffect;var Tt=function(t,e,r){var n=t.key+"-"+e.name;!1===r&&void 0===t.registered[n]&&(t.registered[n]=e.styles)},It=function(t,e,r){Tt(t,e,r);var n=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var i=e;do{t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next}while(void 0!==i)}},jt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mt=wt(function(t){return jt.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}),qt=function(t){return"theme"!==t},Dt=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?Mt:qt},Nt=function(t,e,r){var n;if(e){var i=e.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(e){return t.__emotion_forwardProp(e)&&i(e)}:i}return"function"!=typeof n&&r&&(n=t.__emotion_forwardProp),n},zt=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return Tt(e,r,n),Lt(function(){return It(e,r,n)}),null},Wt=function t(e,r){var n,i,o=e.__emotion_real===e,s=o&&e.__emotion_base||e;void 0!==r&&(n=r.label,i=r.target);var a=Nt(e,r,o),u=a||Dt(s),c=!u("as");return function(){var l=arguments,h=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==n&&h.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)h.push.apply(h,l);else{var f=l[0];h.push(f[0]);for(var p=l.length,d=1;d<p;d++)h.push(l[d],f[d])}var g=(0,bt.withEmotionCache)(function(t,e,r){var n=c&&t.as||s,o="",l=[],f=t;if(null==t.theme){for(var p in f={},t)f[p]=t[p];f.theme=Ut.useContext(bt.ThemeContext)}"string"==typeof t.className?o=$t(e.registered,l,t.className):null!=t.className&&(o=t.className+" ");var d=Ct(h.concat(l),e.registered,f);o+=e.key+"-"+d.name,void 0!==i&&(o+=" "+i);var g=c&&void 0===a?Dt(n):u,y={};for(var m in t)c&&"as"===m||g(m)&&(y[m]=t[m]);return y.className=o,r&&(y.ref=r),Ut.createElement(Ut.Fragment,null,Ut.createElement(zt,{cache:e,serialized:d,isStringTag:"string"==typeof n}),Ut.createElement(n,y))});return g.displayName=void 0!==n?n:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=e.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=h,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(e,n){return t(e,mt({},r,n,{shouldForwardProp:Nt(g,n,!0)})).apply(void 0,h)},g}},Ht=u(7434),Kt=u.n(Ht),Gt=u(7125),Yt=u(6171),Vt=u(5270),Jt=function(){function t(t){var e=this;this._insertTag=function(t){var r;r=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,r),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{r.insertRule(t,r.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach(function(t){var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)}),this.tags=[],this.ctr=0},t}(),Xt=Math.abs,Zt=String.fromCharCode,Qt=Object.assign;function te(t){return t.trim()}function ee(t,e,r){return t.replace(e,r)}function re(t,e){return t.indexOf(e)}function ne(t,e){return 0|t.charCodeAt(e)}function ie(t,e,r){return t.slice(e,r)}function oe(t){return t.length}function se(t){return t.length}function ae(t,e){return e.push(t),t}var ue=1,ce=1,le=0,he=0,fe=0,pe="";function de(t,e,r,n,i,o,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:ue,column:ce,length:s,return:""}}function ge(t,e){return Qt(de("",null,null,"",null,null,0),t,{length:-t.length},e)}function ye(){return fe=he>0?ne(pe,--he):0,ce--,10===fe&&(ce=1,ue--),fe}function me(){return fe=he<le?ne(pe,he++):0,ce++,10===fe&&(ce=1,ue++),fe}function be(){return ne(pe,he)}function ve(){return he}function we(t,e){return ie(pe,t,e)}function xe(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _e(t){return ue=ce=1,le=oe(pe=t),he=0,[]}function Ae(t){return pe="",t}function ke(t){return te(we(he-1,Se(91===t?t+2:40===t?t+1:t)))}function Re(t){for(;(fe=be())&&fe<33;)me();return xe(t)>2||xe(fe)>3?"":" "}function Ee(t,e){for(;--e&&me()&&!(fe<48||fe>102||fe>57&&fe<65||fe>70&&fe<97););return we(t,ve()+(e<6&&32==be()&&32==me()))}function Se(t){for(;me();)switch(fe){case t:return he;case 34:case 39:34!==t&&39!==t&&Se(fe);break;case 40:41===t&&Se(t);break;case 92:me()}return he}function Pe(t,e){for(;me()&&t+fe!==57&&(t+fe!==84||47!==be()););return"/*"+we(e,he-1)+"*"+Zt(47===t?t:me())}function Oe(t){for(;!xe(be());)me();return we(t,he)}var Ce="-ms-",Ue="-moz-",Be="-webkit-",Fe="comm",Le="rule",$e="decl",Te="@keyframes";function Ie(t,e){for(var r="",n=se(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function je(t,e,r,n){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case $e:return t.return=t.return||t.value;case Fe:return"";case Te:return t.return=t.value+"{"+Ie(t.children,n)+"}";case Le:t.value=t.props.join(",")}return oe(r=Ie(t.children,n))?t.return=t.value+"{"+r+"}":""}function Me(t){return Ae(qe("",null,null,null,[""],t=_e(t),0,[0],t))}function qe(t,e,r,n,i,o,s,a,u){for(var c=0,l=0,h=s,f=0,p=0,d=0,g=1,y=1,m=1,b=0,v="",w=i,x=o,_=n,A=v;y;)switch(d=b,b=me()){case 40:if(108!=d&&58==ne(A,h-1)){-1!=re(A+=ee(ke(b),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:A+=ke(b);break;case 9:case 10:case 13:case 32:A+=Re(d);break;case 92:A+=Ee(ve()-1,7);continue;case 47:switch(be()){case 42:case 47:ae(Ne(Pe(me(),ve()),e,r),u);break;default:A+="/"}break;case 123*g:a[c++]=oe(A)*m;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+l:-1==m&&(A=ee(A,/\f/g,"")),p>0&&oe(A)-h&&ae(p>32?ze(A+";",n,r,h-1):ze(ee(A," ","")+";",n,r,h-2),u);break;case 59:A+=";";default:if(ae(_=De(A,e,r,c,l,i,a,v,w=[],x=[],h),o),123===b)if(0===l)qe(A,e,_,_,w,o,h,a,x);else switch(99===f&&110===ne(A,3)?100:f){case 100:case 108:case 109:case 115:qe(t,_,_,n&&ae(De(t,_,_,0,0,i,a,v,i,w=[],h),x),i,x,h,a,n?w:x);break;default:qe(A,_,_,_,[""],x,0,a,x)}}c=l=p=0,g=m=1,v=A="",h=s;break;case 58:h=1+oe(A),p=d;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==ye())continue;switch(A+=Zt(b),b*g){case 38:m=l>0?1:(A+="\f",-1);break;case 44:a[c++]=(oe(A)-1)*m,m=1;break;case 64:45===be()&&(A+=ke(me())),f=be(),l=h=oe(v=A+=Oe(ve())),b++;break;case 45:45===d&&2==oe(A)&&(g=0)}}return o}function De(t,e,r,n,i,o,s,a,u,c,l){for(var h=i-1,f=0===i?o:[""],p=se(f),d=0,g=0,y=0;d<n;++d)for(var m=0,b=ie(t,h+1,h=Xt(g=s[d])),v=t;m<p;++m)(v=te(g>0?f[m]+" "+b:ee(b,/&\f/g,f[m])))&&(u[y++]=v);return de(t,e,r,0===i?Le:a,u,c,l)}function Ne(t,e,r){return de(t,e,r,Fe,Zt(fe),ie(t,2,-2),0)}function ze(t,e,r,n){return de(t,e,r,$e,ie(t,0,n),ie(t,n+1,-1),n)}var We=function(t,e,r){for(var n=0,i=0;n=i,i=be(),38===n&&12===i&&(e[r]=1),!xe(i);)me();return we(t,he)},He=new WeakMap,Ke=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,r=t.parent,n=t.column===r.column&&t.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||He.get(r))&&!n){He.set(t,!0);for(var i=[],o=function(t,e){return Ae(function(t,e){var r=-1,n=44;do{switch(xe(n)){case 0:38===n&&12===be()&&(e[r]=1),t[r]+=We(he-1,e,r);break;case 2:t[r]+=ke(n);break;case 4:if(44===n){t[++r]=58===be()?"&\f":"",e[r]=t[r].length;break}default:t[r]+=Zt(n)}}while(n=me());return t}(_e(t),e))}(e,i),s=r.props,a=0,u=0;a<o.length;a++)for(var c=0;c<s.length;c++,u++)t.props[u]=i[a]?o[a].replace(/&\f/g,s[c]):s[c]+" "+o[a]}}},Ge=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function Ye(t,e){switch(function(t,e){return 45^ne(t,0)?(((e<<2^ne(t,0))<<2^ne(t,1))<<2^ne(t,2))<<2^ne(t,3):0}(t,e)){case 5103:return Be+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Be+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Be+t+Ue+t+Ce+t+t;case 6828:case 4268:return Be+t+Ce+t+t;case 6165:return Be+t+Ce+"flex-"+t+t;case 5187:return Be+t+ee(t,/(\w+).+(:[^]+)/,Be+"box-$1$2"+Ce+"flex-$1$2")+t;case 5443:return Be+t+Ce+"flex-item-"+ee(t,/flex-|-self/,"")+t;case 4675:return Be+t+Ce+"flex-line-pack"+ee(t,/align-content|flex-|-self/,"")+t;case 5548:return Be+t+Ce+ee(t,"shrink","negative")+t;case 5292:return Be+t+Ce+ee(t,"basis","preferred-size")+t;case 6060:return Be+"box-"+ee(t,"-grow","")+Be+t+Ce+ee(t,"grow","positive")+t;case 4554:return Be+ee(t,/([^-])(transform)/g,"$1"+Be+"$2")+t;case 6187:return ee(ee(ee(t,/(zoom-|grab)/,Be+"$1"),/(image-set)/,Be+"$1"),t,"")+t;case 5495:case 3959:return ee(t,/(image-set\([^]*)/,Be+"$1$`$1");case 4968:return ee(ee(t,/(.+:)(flex-)?(.*)/,Be+"box-pack:$3"+Ce+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Be+t+t;case 4095:case 3583:case 4068:case 2532:return ee(t,/(.+)-inline(.+)/,Be+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(oe(t)-1-e>6)switch(ne(t,e+1)){case 109:if(45!==ne(t,e+4))break;case 102:return ee(t,/(.+:)(.+)-([^]+)/,"$1"+Be+"$2-$3$1"+Ue+(108==ne(t,e+3)?"$3":"$2-$3"))+t;case 115:return~re(t,"stretch")?Ye(ee(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==ne(t,e+1))break;case 6444:switch(ne(t,oe(t)-3-(~re(t,"!important")&&10))){case 107:return ee(t,":",":"+Be)+t;case 101:return ee(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Be+(45===ne(t,14)?"inline-":"")+"box$3$1"+Be+"$2$3$1"+Ce+"$2box$3")+t}break;case 5936:switch(ne(t,e+11)){case 114:return Be+t+Ce+ee(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Be+t+Ce+ee(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Be+t+Ce+ee(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Be+t+Ce+t+t}return t}var Ve=[function(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case $e:t.return=Ye(t.value,t.length);break;case Te:return Ie([ge(t,{value:ee(t.value,"@","@"+Be)})],n);case Le:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,function(e){switch(function(t){return(t=/(::plac\w+|:read-\w+)/.exec(t))?t[0]:t}(e)){case":read-only":case":read-write":return Ie([ge(t,{props:[ee(e,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ie([ge(t,{props:[ee(e,/:(plac\w+)/,":"+Be+"input-$1")]}),ge(t,{props:[ee(e,/:(plac\w+)/,":-moz-$1")]}),ge(t,{props:[ee(e,/:(plac\w+)/,Ce+"input-$1")]})],n)}return""})}}],Je=function(t){var e=t.key;if("css"===e){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))})}var n,i,o=t.stylisPlugins||Ve,s={},a=[];n=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(t){for(var e=t.getAttribute("data-emotion").split(" "),r=1;r<e.length;r++)s[e[r]]=!0;a.push(t)});var u,c,l,h,f=[je,(h=function(t){u.insert(t)},function(t){t.root||(t=t.return)&&h(t)})],p=(c=[Ke,Ge].concat(o,f),l=se(c),function(t,e,r,n){for(var i="",o=0;o<l;o++)i+=c[o](t,e,r,n)||"";return i});i=function(t,e,r,n){u=r,Ie(Me(t?t+"{"+e.styles+"}":e.styles),p),n&&(d.inserted[e.name]=!0)};var d={key:e,sheet:new Jt({key:e,container:n,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:i};return d.sheet.hydrate(a),d},Xe=Ut.createContext("undefined"!=typeof HTMLElement?Je({key:"css"}):null),Ze=(Xe.Provider,function(t){return(0,Ut.forwardRef)(function(e,r){var n=(0,Ut.useContext)(Xe);return t(e,n,r)})}),Qe=Ut.createContext({}),tr={}.hasOwnProperty,er="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",rr=function(t,e){var r={};for(var n in e)tr.call(e,n)&&(r[n]=e[n]);return r[er]=t,r},nr=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return Tt(e,r,n),Lt(function(){return It(e,r,n)}),null},ir=Ze(function(t,e,r){var n=t.css;"string"==typeof n&&void 0!==e.registered[n]&&(n=e.registered[n]);var i=t[er],o=[n],s="";"string"==typeof t.className?s=$t(e.registered,o,t.className):null!=t.className&&(s=t.className+" ");var a=Ct(o,void 0,Ut.useContext(Qe));s+=e.key+"-"+a.name;var u={};for(var c in t)tr.call(t,c)&&"css"!==c&&c!==er&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),Ut.createElement(Ut.Fragment,null,Ut.createElement(nr,{cache:e,serialized:a,isStringTag:"string"==typeof i}),Ut.createElement(i,u))}),or=(u(4674),Vt.Fragment,function(t,e,r){return tr.call(e,"css")?Vt.jsx(ir,rr(t,e),r):Vt.jsx(t,e,r)}),sr=function(t,e,r){return tr.call(e,"css")?Vt.jsxs(ir,rr(t,e),r):Vt.jsxs(t,e,r)};const ar=Wt(Yt.Icon,{target:"e1szyeam2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),ur=Wt("div",{target:"e1szyeam1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),cr=Wt("div",{target:"e1szyeam0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class lr extends Bt().Component{static propTypes={inProgress:Kt().bool,config:Kt().object.isRequired,onLogin:Kt().func.isRequired,t:Kt().func.isRequired,backend:Kt().object};state={};componentDidMount(){Kt().checkPropTypes(lr.propTypes,this.props,"prop","ForgejoAuthenticationPage");const{api_root:t,app_id:e=""}=this.props.config.backend,r=t?t.replace(/\/api\/[^/]+\/?$/,""):"";r?(this.auth=new Gt.PkceAuthenticator({base_url:r,auth_endpoint:"login/oauth/authorize",app_id:e,auth_token_endpoint:"login/oauth/access_token",auth_token_endpoint_content_type:"application/json; charset=utf-8"}),this.auth.completeAuth((t,e)=>{if(t)this.setState({loginError:t.toString()});else if(e){const{open_authoring:t=!1}=this.props.config.backend;if(t)return this.loginWithOpenAuthoring(e).then(()=>this.props.onLogin(e)).catch(t=>{this.setState({loginError:t&&t.toString?t.toString():String(t),findingFork:!1,requestingFork:!1})});this.props.onLogin(e)}})):this.setState({loginError:'Forgejo backend requires "api_root" to be set in the backend configuration.'})}getPermissionToFork=()=>new Promise((t,e)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),t()},refuseFork:()=>{this.setState({requestingFork:!1}),e(new Error("User declined to create a fork"))}})});loginWithOpenAuthoring(t){const{backend:e}=this.props;if(!e){const t=new Error("Backend prop is required for open authoring login flow");return Promise.reject(t)}return this.setState({findingFork:!0}),e.authenticateWithFork({userData:t,getPermissionToFork:this.getPermissionToFork}).catch(t=>{throw console.error(t),t}).finally(()=>{this.setState({findingFork:!1,requestingFork:!1,approveFork:void 0,refuseFork:void 0})})}handleLogin=t=>{if(t.preventDefault(),!this.auth)return;const{open_authoring:e=!1}=this.props.config.backend;this.auth.authenticate({scope:"repository"},(t,r)=>{if(!t)return e?this.loginWithOpenAuthoring(r).then(()=>this.props.onLogin(r)).catch(t=>{this.setState({loginError:t&&t.toString?t.toString():String(t),findingFork:!1,requestingFork:!1})}):void this.props.onLogin(r);this.setState({loginError:t.toString()})})};renderLoginButton=()=>{const{inProgress:t,t:e}=this.props;return t||this.state.findingFork?e("auth.loggingIn"):sr(Bt().Fragment,{children:[or(ar,{type:"forgejo"}),e("auth.loginWithForgejo")]})};getAuthenticationPageRenderArgs(){const{requestingFork:t}=this.state;if(t){const{approveFork:t,refuseFork:e}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>sr(ur,{children:[or("p",{children:"Open Authoring is enabled: we need to use a fork on your Forgejo account. (If a fork already exists, we'll use that.)"}),sr(cr,{children:[or(r,{onClick:t,children:"Fork the repo"}),i&&or(n,{onClick:e,children:"Don't fork the repo"})]})]})}}return{renderButtonContent:this.renderLoginButton}}render(){const{config:t,t:e}=this.props,r=this.getAuthenticationPageRenderArgs();return or(Yt.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:this.props.inProgress||this.state.findingFork||this.state.requestingFork,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,logo:t.logo,siteUrl:t.site_url,t:e,...r})}}const{fetchWithTimeout:hr}=x.unsentRequest,fr={ForgejoBackend:class{constructor(t,e={}){if(this.options={proxied:!1,API:null,useWorkflow:!1,initialWorkflowStatus:"",...e},!this.options.proxied&&(null===t.backend.repo||void 0===t.backend.repo))throw new Error('The Forgejo backend needs a "repo" in the backend configuration.');if(!t.backend.api_root)throw new Error('The Forgejo backend needs an "api_root" in the backend configuration when not proxied.');if(this.api=this.options.API||null,this.openAuthoringEnabled=t.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=t.backend.repo||""}else this.repo=this.originRepo=t.backend.repo||"";this.alwaysForkEnabled=t.backend.always_fork||!1,this.branch=t.backend.branch?.trim()||"main",this.apiRoot=t.backend.api_root,this.token="",this.mediaFolder=t.media_folder,this.cmsLabelPrefix=t.backend.cms_label_prefix||"",this.initialWorkflowStatus=this.options.initialWorkflowStatus||"draft",this.lock=(0,x.asyncLock)()}isGitBackend(){return!0}async status(){return{auth:{status:await(this.api?.user().then(t=>!!t).catch(t=>(console.warn("[StaticCMS] Failed getting Forgejo user",t),!1)))||!1},api:{status:!0,statusPage:""}}}authComponent(){const t=t=>or(lr,{...t,backend:this});return t.displayName="AuthenticationPage",t}async currentUser({token:t}){return this._currentUserPromise||(this._currentUserPromise=hr(`${this.apiRoot}/user`,{headers:{Authorization:`token ${t}`}}).then(t=>t.json())),this._currentUserPromise}async userIsOriginMaintainer({username:t,token:e}){const r=t||(await this.currentUser({token:e})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=hr(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`token ${e}`}}).then(t=>t.json()).then(({permission:t})=>"admin"===t||"write"===t)),this._userIsOriginMaintainerPromises[r]}async pollUntilForkExists({repo:t,token:e}){const r=Date.now();let n=250,i=!1;for(;!i&&Date.now()-r<6e4;){const r=await hr(`${this.apiRoot}${t}`,{headers:{Authorization:`token ${e}`}});if(r.ok)i=!0;else{if(404!==r.status)throw new Error(`Error while checking for fork existence: ${r.status} ${r.statusText}`);i=!1}i||(await new Promise(t=>setTimeout(t,n)),n=Math.min(2*n,2e3))}if(!i)throw new Error("Timed out waiting for fork to be created.")}async authenticateWithFork({userData:t,getPermissionToFork:e}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=t.token;if(this._currentUserPromise=void 0,this._userIsOriginMaintainerPromises={},!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,!this.options.API){const t=yt;this.api=new t({token:r,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,useOpenAuthoring:this.useOpenAuthoring,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.initialWorkflowStatus})}if(await this.api.forkExists())return await this.api.mergeUpstream(),Promise.resolve();{await e();const t=await this.api.createFork();return this.pollUntilForkExists({repo:`/repos/${t.full_name}`,token:r})}}restoreUser(t){return this.openAuthoringEnabled?this.authenticateWithFork({userData:t,getPermissionToFork:()=>{}}).then(()=>this.authenticate(t)):this.authenticate(t)}async authenticate(t){this.token=t.token,this._currentUserPromise=void 0,this._userIsOriginMaintainerPromises={};const e=yt;this.api=new e({token:this.token,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,useOpenAuthoring:this.useOpenAuthoring,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.initialWorkflowStatus});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch(t=>{throw t.message=y`
|
|
3
3
|
Repo "${this.repo}" not found.
|
|
4
4
|
|
|
5
5
|
Please ensure the repo information is spelled correctly.
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
|
|
9
9
|
If your repo is under an organization, ensure the organization has granted access to Static
|
|
10
10
|
CMS.
|
|
11
|
-
`,
|
|
11
|
+
`,t}))throw new Error("Your Forgejo user account does not have access to this repo.");return{name:r.full_name,login:r.login,email:r.email,avatar_url:r.avatar_url,token:t.token,useOpenAuthoring:this.useOpenAuthoring}}logout(){if(this.token=null,this._currentUserPromise=void 0,this._userIsOriginMaintainerPromises={},this.api&&this.api.reset&&"function"==typeof this.api.reset)return this.api.reset()}getToken(){return Promise.resolve(this.token)}getCursorAndFiles=(t,e)=>{const r=t.length,n=Math.ceil(t.length/20),i=[];return e>1&&(i.push("prev"),i.push("first")),e<n&&(i.push("next"),i.push("last")),{cursor:x.Cursor.create({actions:i,meta:{page:e,count:r,pageSize:20,pageCount:n},data:{files:t}}),files:t.slice(20*(e-1),20*e)}};async entriesByFolder(t,e,r){const n=this.api.originRepoURL;let i;const o=await(0,x.entriesByFolder)(()=>this.api.listFiles(t,{repoURL:n,depth:r}).then(t=>{const r=t.filter(t=>(0,x.filterByExtension)(t,e)),n=this.getCursorAndFiles(r,1);return i=n.cursor,n.files}),(t,e)=>this.api.readFile(t,e,{repoURL:n}),this.api.readFileMetadata.bind(this.api),pt);return o[x.CURSOR_COMPATIBILITY_SYMBOL]=i,o}async allEntriesByFolder(t,e,r){const n=this.api.originRepoURL;return await(0,x.entriesByFolder)(()=>this.api.listFiles(t,{repoURL:n,depth:r}).then(t=>t.filter(t=>(0,x.filterByExtension)(t,e))),(t,e)=>this.api.readFile(t,e,{repoURL:n}),this.api.readFileMetadata.bind(this.api),pt)}entriesByFiles(t){const e=this.useOpenAuthoring?this.api.originRepoURL:this.api.repoURL;return(0,x.entriesByFiles)(t,(t,r)=>this.api.readFile(t,r,{repoURL:e}).catch(()=>""),this.api.readFileMetadata.bind(this.api),pt)}getEntry(t){const e=this.api.originRepoURL;return this.api.readFile(t,null,{repoURL:e}).then(e=>({file:{path:t,id:null},data:e})).catch(()=>({file:{path:t,id:null},data:""}))}async getMedia(t=this.mediaFolder,e){return t?this.api.listFiles(t,void 0,e).then(t=>t.map(({id:t,name:e,size:r,path:n,type:i})=>({id:t,name:e,size:r,displayURL:{id:t,path:n},path:n,isDirectory:"tree"===i}))):[]}async getMediaFile(t){const e=await(0,x.getMediaAsBlob)(t,null,this.api.readFile.bind(this.api)),r=(0,x.basename)(t),n=(0,x.blobToFileObj)(r,e),i=URL.createObjectURL(n);return{id:await(0,x.getBlobSHA)(e),displayURL:i,path:t,name:r,size:n.size,file:n,url:i}}getMediaDisplayURL(t){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||w()(10),(0,x.getMediaDisplayURL)(t,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}persistEntry(t,e){return(0,x.runWithLock)(this.lock,()=>{if(e.useWorkflow){const r=t.dataFiles[0].slug,n=e.collectionName,i=[...t.dataFiles,...t.assets];return this.api.editorialWorkflowGit(i,r,n,e)}return this.api.persistFiles(t.dataFiles,t.assets,e)},"Failed to acquire persist entry lock")}async persistMedia(t,e){try{await this.api.persistFiles([],[t],e);const{sha:r,path:n,fileObj:i}=t,o=URL.createObjectURL(i);return{id:r,name:i.name,size:i.size,displayURL:o,path:b()(n,"/")}}catch(t){throw console.error(t),t}}async deleteFiles(t,e){await this.api.deleteFiles(t,e)}async traverseCursor(t,e){const r=t.meta,n=t.data.get("files").toJS();let i;switch(e){case"first":default:i=this.getCursorAndFiles(n,1);break;case"last":i=this.getCursorAndFiles(n,r.get("pageCount"));break;case"next":i=this.getCursorAndFiles(n,r.get("page")+1);break;case"prev":i=this.getCursorAndFiles(n,r.get("page")-1)}return{entries:await(0,x.entriesByFiles)(i.files,(t,e)=>this.api.readFile(t,e,{repoURL:this.api.originRepoURL}).catch(()=>""),this.api.readFileMetadata.bind(this.api),pt),cursor:i.cursor}}async unpublishedEntries(){return await(0,x.unpublishedEntries)(()=>this.api.listUnpublishedBranches().then(t=>t.map(t=>(0,x.contentKeyFromBranch)(t))))}async unpublishedEntry({id:t,collection:e,slug:r}){if(t)return await this.api.retrieveUnpublishedEntryData(t);if(e&&r){const t=this.api.generateContentKey(e,r);return await this.api.retrieveUnpublishedEntryData(t)}throw new Error("Missing unpublished entry id or collection and slug")}async unpublishedEntryDataFile(t,e,r,n){const i=this.api.generateContentKey(t,e),o=(0,x.branchFromContentKey)(i);return await this.api.readFile(r,n,{branch:o})}async unpublishedEntryMediaFile(t,e,r,n){const i=this.api.generateContentKey(t,e),o=(0,x.branchFromContentKey)(i),s=await this.api.readFile(r,n,{branch:o,parseText:!1}),a=(0,x.basename)(r),u=(0,x.blobToFileObj)(a,s);return{id:n,name:a,path:r,size:u.size,displayURL:URL.createObjectURL(u),file:u}}updateUnpublishedEntryStatus(t,e,r){return(0,x.runWithLock)(this.lock,()=>this.api.updateUnpublishedEntryStatus(t,e,r),"Failed to acquire update entry status lock")}publishUnpublishedEntry(t,e){return(0,x.runWithLock)(this.lock,()=>this.api.publishUnpublishedEntry(t,e),"Failed to acquire publish entry lock")}deleteUnpublishedEntry(t,e){return(0,x.runWithLock)(this.lock,()=>this.api.deleteUnpublishedEntry(t,e),"Failed to acquire delete entry lock")}async getDeployPreview(){return null}},API:yt,AuthenticationPage:lr}})(),c.DecapCmsBackendForgejo})());
|
|
12
12
|
//# sourceMappingURL=decap-cms-backend-forgejo.js.map
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* The buffer module from node.js, for the browser.
|
|
3
|
+
*
|
|
4
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
9
|
+
|
|
1
10
|
/**
|
|
2
11
|
* @license React
|
|
3
12
|
* react-jsx-runtime.production.js
|