decap-cms-backend-bitbucket 3.2.0 → 3.2.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.2.1](https://github.com/decaporg/decap-cms/compare/decap-cms-backend-bitbucket@3.2.0...decap-cms-backend-bitbucket@3.2.1) (2025-07-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package decap-cms-backend-bitbucket
|
|
9
|
+
|
|
6
10
|
# [3.2.0](https://github.com/decaporg/decap-cms/compare/decap-cms-backend-bitbucket@3.1.4...decap-cms-backend-bitbucket@3.2.0) (2025-06-26)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package decap-cms-backend-bitbucket
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("decap-cms-lib-util"),require("decap-cms-lib-auth"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendBitbucket",["decap-cms-lib-util","decap-cms-lib-auth","@emotion/react","react","prop-types","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendBitbucket=t(require("decap-cms-lib-util"),require("decap-cms-lib-auth"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-ui-default")):e.DecapCmsBackendBitbucket=t(e.DecapCmsLibUtil,e.DecapCmsLibAuth,e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsUiDefault)}(window,(e,t,r,n,i,s)=>(()=>{var o={88:(e,t,r)=>{var n=r(4700);e.exports=function(e){return n(this,e).get(e)}},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},313:(e,t,r)=>{var n=r(1129),i=r(714);e.exports=function e(t,r,s,o,a){var u=-1,c=t.length;for(s||(s=i),a||(a=[]);++u<c;){var l=t[u];r>0&&s(l)?r>1?e(l,r-1,s,o,a):n(a,l):o||(a[a.length]=l)}return a}},473:(e,t,r)=>{var n=r(5837),i=r(9986);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),v(function(e){return e.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(a).split("\\,").join(u).split("\\.").join(c)}(e),!0).map(h)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function h(e){return e.split(s).join("\\").split(o).join("{").split(a).join("}").split(u).join(",").split(c).join(".")}function p(e){if(!e)return[""];var t=[],r=i("{","}",e);if(!r)return e.split(",");var n=r.pre,s=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+s+"}";var u=p(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}function f(e){return"{"+e+"}"}function d(e){return/^-?0\d/.test(e)}function g(e,t){return e<=t}function m(e,t){return e>=t}function v(e,t){var r=[],s=i("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var o,u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),h=u||c,y=s.body.indexOf(",")>=0;if(!h&&!y)return s.post.match(/,(?!,).*\}/)?v(e=s.pre+"{"+s.body+a+s.post):[e];if(h)o=s.body.split(/\.\./);else if(1===(o=p(s.body)).length&&1===(o=v(o[0],!1).map(f)).length)return(w=s.post.length?v(s.post,!1):[""]).map(function(e){return s.pre+o[0]+e});var b,x=s.pre,w=s.post.length?v(s.post,!1):[""];if(h){var _=l(o[0]),P=l(o[1]),k=Math.max(o[0].length,o[1].length),S=3==o.length?Math.abs(l(o[2])):1,O=g;P<_&&(S*=-1,O=m);var C=o.some(d);b=[];for(var A=_;O(A,P);A+=S){var R;if(c)"\\"===(R=String.fromCharCode(A))&&(R="");else if(R=String(A),C){var j=k-R.length;if(j>0){var E=new Array(j+1).join("0");R=A<0?"-"+E+R.slice(1):E+R}}b.push(R)}}else b=n(o,function(e){return v(e,!1)});for(var F=0;F<b.length;F++)for(var q=0;q<w.length;q++){var T=x+b[F]+w[q];(!t||h||T)&&r.push(T)}return r}},528:(e,t,r)=>{var n=r(9747),i=r(5962);function s(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}s.prototype=n(i.prototype),s.prototype.constructor=s,e.exports=s},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},714:(e,t,r)=>{var n=r(5650),i=r(3283),s=r(3142),o=n?n.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},796:(e,t,r)=>{var n=r(7403),i=r(3316)(n);e.exports=i},959:(e,t,r)=>{var n=r(2291),i=r(8931),s=r(7905),o=r(2237),a=r(5243),u=/^\s+/;e.exports=function(e,t,r){if((e=a(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=o(e),l=s(c,o(t));return i(c,l).join("")}},961:(e,t,r)=>{var n=r(3476),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],s=i.call(n,t)?r.length:0;s--;){var o=r[s],a=o.func;if(null==a||a==e)return o.name}return 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}},1129:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return 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)}},1386:(e,t,r)=>{var n=r(2393),i=r(2049),s=r(7144),o=r(5071),a=r(3964);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},1439:(e,t,r)=>{var n=r(5857),i=r(5234),s=r(796);e.exports=function(e){return s(i(e,void 0,n),e+"")}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1942:(e,t,r)=>{var n=r(528),i=r(1439),s=r(5196),o=r(961),a=r(3142),u=r(6648);e.exports=function(e){return i(function(t){var r=t.length,i=r,c=n.prototype.thru;for(e&&t.reverse();i--;){var l=t[i];if("function"!=typeof l)throw new TypeError("Expected a function");if(c&&!h&&"wrapper"==o(l))var h=new n([],!0)}for(i=h?i:r;++i<r;){l=t[i];var p=o(l),f="wrapper"==p?s(l):void 0;h=f&&u(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?h[o(f[0])].apply(h,f[3]):1==l.length&&u(l)?h[p]():h.thru(l)}return function(){var e=arguments,n=e[0];if(h&&1==e.length&&a(n))return h.plant(n).value();for(var i=0,s=r?t[i].apply(this,e):n;++i<r;)s=t[i].call(this,s);return s}})}},1950:(e,t,r)=>{var n=r(8942)["__core-js_shared__"];e.exports=n},2013:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",s="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[s,o,a].join("|")+")"+c+u+")*",h="(?:"+[s+n+"?",n,o,a,r].join("|")+")",p=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(p)||[]}},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))}},2053:e=>{e.exports=function(e){return e}},2237:(e,t,r)=>{var n=r(2837),i=r(3417),s=r(2013);e.exports=function(e){return i(e)?s(e):n(e)}},2291:(e,t,r)=>{var n=r(5650),i=r(5111),s=r(3142),o=r(1187),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2478:(e,t,r)=>{var n=r(7250),i=r(9454),s=r(7706);e.exports=function(e,t,r){return t==t?s(e,t,r):n(e,i,r)}},2532:(e,t,r)=>{var n=r(4715),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},2619:e=>{e.exports=function(e){return function(){return e}}},2837:e=>{e.exports=function(e){return e.split("")}},2879:(e,t,r)=>{var n=r(1942)();e.exports=n},3063:e=>{"use strict";function t(e,r,n,i){this.message=e,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?s(e.parts[t][0])+"-"+s(e.parts[t][1]):s(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=new Array(e.length);for(t=0;t<e.length;t++)n[t]=o(e[t]);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:t,parse:function(e,r){r=void 0!==r?r:{};var n,i,s,o,a={},u={diffs:at},c=at,l=function(e){return e},h=function(e,t){return kt(e,t,void 0,!0)},p="Binary files ",f=rt("Binary files ",!1),d=function(e,t,r){return kt(e,t,r)},g=function(e){return St(e,void 0,!0)},m=function(e,t,r,n,i,s){return function(e,t,r,n,i,s){const o={oldPath:r,newPath:n,hunks:s?s.hunks:[],status:"copy"===e?"copied":"renamed",similarity:t};return i&&(o.oldMode=i.old_mode,o.newMode=i.new_mode),o}(r.operation,t,r.file,n.file,e||i,s)},v=function(e,t){return St(e,t)},y="diff --cc ",b=rt("diff --cc ",!1),x=function(e){return e},w="* Unmerged path ",_=rt("* Unmerged path ",!1),P=function(e){return St(e)},k=function(e,t){return{hunks:t}},S="--- ",O=rt("--- ",!1),C="+++ ",A=rt("+++ ",!1),R=function(e,t){return{old_file_name:e,new_file_name:t}},j=function(e,t){return Object.assign({},e,{lines:t})},E="@@@ -",F=rt("@@@ -",!1),q=" -",T=rt(" -",!1),L=" +",M=rt(" +",!1),U=" @@@",B=rt(" @@@",!1),$=function(e,t,r,n){return{ourStartLine:e.start,ourLineCount:e.count,theirStartLine:r.start,theirLineCount:r.count,baseStartLine:t.start,baseLineCount:t.count,heading:n?n.trim():""}},D="@@ -",I=rt("@@ -",!1),N=" @@",z=rt(" @@",!1),W=function(e,t,r){return{oldStartLine:e.start,oldLineCount:e.count,newStartLine:t.start,newLineCount:t.count,heading:r?r.trim():""}},H=",",G=rt(",",!1),J=function(e,t){return{start:e,count:t}},K=function(e){return{start:e,count:1}},Y="+",V=rt("+",!1),X="-",Z=rt("-",!1),Q=" ",ee=rt(" ",!1),te="\\",re=rt("\\",!1),ne=function(e){return e.join("")},ie="diff ",se=rt("diff ",!1),oe=function(e,t){return{file_name:t}},ae=function(e){return e.substr(e.length/2+1)},ue="similarity index ",ce=rt("similarity index ",!1),le="%",he=rt("%",!1),pe=function(e){return e},fe=function(e,t){return e||t},de="new",ge=rt("new",!1),me="deleted",ve=rt("deleted",!1),ye=" file mode ",be=rt(" file mode ",!1),xe=function(e,t){return"new"===e?{old_mode:null,new_mode:t}:{old_mode:t,new_mode:null}},we="old mode ",_e=rt("old mode ",!1),Pe="new mode ",ke=rt("new mode ",!1),Se=function(e,t){return{old_mode:e,new_mode:t}},Oe="rename",Ce=rt("rename",!1),Ae="copy",Re=rt("copy",!1),je=" from ",Ee=rt(" from ",!1),Fe=function(e,t){return{operation:e,file:t}},qe=" to ",Te=rt(" to ",!1),Le="index ",Me=rt("index ",!1),Ue=function(e){return{old_mode:e,new_mode:e}},Be=(nt([" ","\t"],!1,!1),"\n"),$e=rt("\n",!1),De="\r\n",Ie=rt("\r\n",!1),Ne={type:"any"},ze=/^[^\r\n]/,We=nt(["\r","\n"],!0,!1),He=/^[^ \t\r\n]/,Ge=nt([" ","\t","\r","\n"],!0,!1),Je=/^[0-9]/,Ke=nt([["0","9"]],!1,!1),Ye=function(e){return parseInt(e.join(""),10)},Ve=0,Xe=[{line:1,column:1}],Ze=0,Qe=[],et=0,tt={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');c=u[r.startRule]}function rt(e,t){return{type:"literal",text:e,ignoreCase:t}}function nt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function it(t){var r,n=Xe[t];if(n)return n;for(r=t-1;!Xe[r];)r--;for(n={line:(n=Xe[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Xe[t]=n,n}function st(e,t){var r=it(e),n=it(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function ot(e){Ve<Ze||(Ve>Ze&&(Ze=Ve,Qe=[]),Qe.push(e))}function at(){var e,t,r,n=35*Ve+0,i=tt[n];if(i)return Ve=i.nextPos,i.result;for(Ve,t=[],r=ut();r!==a;)t.push(r),r=ut();return t!==a&&(t=l(t)),e=t,tt[n]={nextPos:Ve,result:e},e}function ut(){var t,r=35*Ve+1,n=tt[r];return n?(Ve=n.nextPos,n.result):(t=function(){var e,t,r=35*Ve+5,n=tt[r];return n?(Ve=n.nextPos,n.result):(e=Ve,(t=lt())!==a&&bt()!==a&&ct()!==a?e=t=g(t):(Ve=e,e=a),tt[r]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var t,r,n,i,s,o,u,c,l=35*Ve+6,h=tt[l];return h?(Ve=h.nextPos,h.result):(t=Ve,r=function(){var t,r,n,i,s,o,u=35*Ve+19,c=tt[u];return c?(Ve=c.nextPos,c.result):(t=Ve,e.substr(Ve,5)===ie?(r=ie,Ve+=5):(r=a,0===et&&ot(se)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a&&(s=wt())!==a&&(o=xt())!==a?t=r=[r,n,i,s,o]:(Ve=t,t=a)):(Ve=t,t=a),tt[u]={nextPos:Ve,result:t},t)}(),r!==a?((n=yt())===a&&(n=null),n!==a?(i=function(){var t,r,n,i,s=35*Ve+21,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,17)===ue?(r=ue,Ve+=17):(r=a,0===et&&ot(ce)),r!==a&&(n=Pt())!==a?(37===e.charCodeAt(Ve)?(i=le,Ve++):(i=a,0===et&&ot(he)),i!==a&&xt()!==a?t=r=pe(n):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),i!==a?(s=function(){var t,r,n,i,s=35*Ve+25,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,6)===Oe?(r=Oe,Ve+=6):(r=a,0===et&&ot(Ce)),r===a&&(e.substr(Ve,4)===Ae?(r=Ae,Ve+=4):(r=a,0===et&&ot(Re))),r!==a?(e.substr(Ve,6)===je?(n=je,Ve+=6):(n=a,0===et&&ot(Ee)),n!==a&&(i=wt())!==a&&xt()!==a?t=r=Fe(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),s!==a?(o=function(){var t,r,n,i,s=35*Ve+26,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,6)===Oe?(r=Oe,Ve+=6):(r=a,0===et&&ot(Ce)),r===a&&(e.substr(Ve,4)===Ae?(r=Ae,Ve+=4):(r=a,0===et&&ot(Re))),r!==a?(e.substr(Ve,4)===qe?(n=qe,Ve+=4):(n=a,0===et&&ot(Te)),n!==a&&(i=wt())!==a&&xt()!==a?t=r=Fe(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),o!==a?((u=bt())===a&&(u=null),u!==a?((c=ct())===a&&(c=ht()),c===a&&(c=null),c!==a?t=r=m(n,i,s,o,u,c):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[l]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var e,t,r,n=35*Ve+7,i=tt[n];return i?(Ve=i.nextPos,i.result):(e=Ve,(t=lt())!==a&&bt()!==a?((r=ht())===a&&(r=null),r!==a?e=t=v(t,r):(Ve=e,e=a)):(Ve=e,e=a),tt[n]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var t,r,n,i=35*Ve+9,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,e.substr(Ve,16)===w?(r=w,Ve+=16):(r=a,0===et&&ot(_)),r!==a&&(n=wt())!==a&&xt()!==a?t=r=P(n):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var e,t,r,n,i=35*Ve+2,s=tt[i];return s?(Ve=s.nextPos,s.result):(e=Ve,(t=mt())!==a?((r=vt())===a&&(r=null),r!==a?((n=pt())===a&&(n=null),n!==a&&ct()!==a?e=t=h(t,r):(Ve=e,e=a)):(Ve=e,e=a)):(Ve=e,e=a),tt[i]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var e,t,r,n,i=35*Ve+4,s=tt[i];return s?(Ve=s.nextPos,s.result):(e=Ve,(t=mt())!==a?((r=vt())===a&&(r=null),r!==a?((n=ht())===a&&(n=null),n!==a?e=t=d(t,r,n):(Ve=e,e=a)):(Ve=e,e=a)):(Ve=e,e=a),tt[i]={nextPos:Ve,result:e},e)}()))))),tt[r]={nextPos:Ve,result:t},t)}function ct(){var t,r,n,i,s=35*Ve+3,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,13)===p?(r=p,Ve+=13):(r=a,0===et&&ot(f)),r!==a&&(n=wt())!==a&&(i=xt())!==a?t=r=[r,n,i]:(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}function lt(){var t,r,n,i=35*Ve+8,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,e.substr(Ve,10)===y?(r=y,Ve+=10):(r=a,0===et&&ot(b)),r!==a&&(n=wt())!==a&&xt()!==a?t=r=x(n):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}function ht(){var e,t,r,n,i=35*Ve+10,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(e=Ve,(t=pt())!==a){for(r=[],n=ft();n!==a;)r.push(n),n=ft();r!==a?e=t=k(t,r):(Ve=e,e=a)}else Ve=e,e=a;return tt[i]={nextPos:Ve,result:e},e}function pt(){var t,r,n,i,s,o=35*Ve+11,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,4)===S?(r=S,Ve+=4):(r=a,0===et&&ot(O)),r!==a&&(n=wt())!==a&&xt()!==a?(e.substr(Ve,4)===C?(i=C,Ve+=4):(i=a,0===et&&ot(A)),i!==a&&(s=wt())!==a&&xt()!==a?t=r=R(n,s):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function ft(){var t,r,n,i,s=35*Ve+12,o=tt[s];if(o)return Ve=o.nextPos,o.result;if(t=Ve,r=function(){var t,r=35*Ve+13,n=tt[r];return n?(Ve=n.nextPos,n.result):(t=function(){var t,r,n,i,s,o,u,c,l,h=35*Ve+14,p=tt[h];return p?(Ve=p.nextPos,p.result):(t=Ve,e.substr(Ve,5)===E?(r=E,Ve+=5):(r=a,0===et&&ot(F)),r!==a&&(n=dt())!==a?(e.substr(Ve,2)===q?(i=q,Ve+=2):(i=a,0===et&&ot(T)),i!==a&&(s=dt())!==a?(e.substr(Ve,2)===L?(o=L,Ve+=2):(o=a,0===et&&ot(M)),o!==a&&(u=dt())!==a?(e.substr(Ve,4)===U?(c=U,Ve+=4):(c=a,0===et&&ot(B)),c!==a?((l=wt())===a&&(l=null),l!==a&&xt()!==a?t=r=$(n,s,u,l):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[h]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var t,r,n,i,s,o,u,c=35*Ve+15,l=tt[c];return l?(Ve=l.nextPos,l.result):(t=Ve,e.substr(Ve,4)===D?(r=D,Ve+=4):(r=a,0===et&&ot(I)),r!==a&&(n=dt())!==a?(e.substr(Ve,2)===L?(i=L,Ve+=2):(i=a,0===et&&ot(M)),i!==a&&(s=dt())!==a?(e.substr(Ve,3)===N?(o=N,Ve+=3):(o=a,0===et&&ot(z)),o!==a?((u=wt())===a&&(u=null),u!==a&&xt()!==a?t=r=W(n,s,u):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[c]={nextPos:Ve,result:t},t)}()),tt[r]={nextPos:Ve,result:t},t)}(),r!==a){if(n=[],(i=gt())!==a)for(;i!==a;)n.push(i),i=gt();else n=a;n!==a?t=r=j(r,n):(Ve=t,t=a)}else Ve=t,t=a;return tt[s]={nextPos:Ve,result:t},t}function dt(){var t,r,n,i,s=35*Ve+16,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,(r=Pt())!==a?(44===e.charCodeAt(Ve)?(n=H,Ve++):(n=a,0===et&&ot(G)),n!==a&&(i=Pt())!==a?t=r=J(r,i):(Ve=t,t=a)):(Ve=t,t=a),t===a&&(t=Ve,(r=Pt())!==a&&(r=K(r)),t=r),tt[s]={nextPos:Ve,result:t},t)}function gt(){var t,r,n,i,s=35*Ve+17,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,r=Ve,43===e.charCodeAt(Ve)?(n=Y,Ve++):(n=a,0===et&&ot(V)),n===a&&(45===e.charCodeAt(Ve)?(n=X,Ve++):(n=a,0===et&&ot(Z)),n===a&&(32===e.charCodeAt(Ve)?(n=Q,Ve++):(n=a,0===et&&ot(ee)),n===a&&(92===e.charCodeAt(Ve)?(n=te,Ve++):(n=a,0===et&&ot(re))))),n!==a?((i=wt())===a&&(i=null),i!==a?r=n=[n,i]:(Ve=r,r=a)):(Ve=r,r=a),r!==a&&(n=xt())!==a?t=r=ne(r):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}function mt(){var t,r,n,i,s,o=35*Ve+18,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,5)===ie?(r=ie,Ve+=5):(r=a,0===et&&ot(se)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a?(s=function(){var e,t,r=35*Ve+20,n=tt[r];return n?(Ve=n.nextPos,n.result):(Ve,(t=wt())!==a&&(t=ae(t)),e=t,tt[r]={nextPos:Ve,result:e},e)}(),s!==a&&xt()!==a?t=r=oe(n,s):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function vt(){var t,r,n,i=35*Ve+22,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,r=function(){var t,r,n,i,s=35*Ve+23,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,3)===de?(r=de,Ve+=3):(r=a,0===et&&ot(ge)),r===a&&(e.substr(Ve,7)===me?(r=me,Ve+=7):(r=a,0===et&&ot(ve))),r!==a?(e.substr(Ve,11)===ye?(n=ye,Ve+=11):(n=a,0===et&&ot(be)),n!==a&&(i=wt())!==a&&xt()!==a?t=r=xe(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),r===a&&(r=yt()),r===a&&(r=null),r!==a?((n=bt())===a&&(n=null),n!==a?t=r=fe(r,n):(Ve=t,t=a)):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}function yt(){var t,r,n,i,s,o=35*Ve+24,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,9)===we?(r=we,Ve+=9):(r=a,0===et&&ot(_e)),r!==a&&(n=wt())!==a&&xt()!==a?(e.substr(Ve,9)===Pe?(i=Pe,Ve+=9):(i=a,0===et&&ot(ke)),i!==a&&(s=wt())!==a&&xt()!==a?t=r=Se(n,s):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function bt(){var t,r,n,i,s,o=35*Ve+27,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,6)===Le?(r=Le,Ve+=6):(r=a,0===et&&ot(Me)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a&&(s=wt())!==a&&xt()!==a?t=r=Ue(s):(Ve=t,t=a)):(Ve=t,t=a),t===a&&(t=Ve,e.substr(Ve,6)===Le?(r=Le,Ve+=6):(r=a,0===et&&ot(Me)),r!==a&&(n=_t())!==a&&(i=xt())!==a?t=r=[r,n,i]:(Ve=t,t=a)),tt[o]={nextPos:Ve,result:t},t)}function xt(){var t,r=35*Ve+29,n=tt[r];return n?(Ve=n.nextPos,n.result):(10===e.charCodeAt(Ve)?(t=Be,Ve++):(t=a,0===et&&ot($e)),t===a&&(e.substr(Ve,2)===De?(t=De,Ve+=2):(t=a,0===et&&ot(Ie))),t===a&&(t=function(){var t,r,n=35*Ve+31,i=tt[n];return i?(Ve=i.nextPos,i.result):(t=Ve,et++,e.length>Ve?(r=e.charAt(Ve),Ve++):(r=a,0===et&&ot(Ne)),et--,r===a?t=void 0:(Ve=t,t=a),tt[n]={nextPos:Ve,result:t},t)}()),tt[r]={nextPos:Ve,result:t},t)}function wt(){var t,r,n,i=35*Ve+32,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],ze.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(We)),n!==a)for(;n!==a;)r.push(n),ze.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(We));else r=a;return r!==a&&(r=ne(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function _t(){var t,r,n,i=35*Ve+33,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],He.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ge)),n!==a)for(;n!==a;)r.push(n),He.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ge));else r=a;return r!==a&&(r=ne(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function Pt(){var t,r,n,i=35*Ve+34,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],Je.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ke)),n!==a)for(;n!==a;)r.push(n),Je.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ke));else r=a;return r!==a&&(r=Ye(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function kt(e,t,r,n){if(t.old_mode&&!t.new_mode)return{newPath:null,oldPath:e.file_name,newMode:null,oldMode:t.old_mode,hunks:r?r.hunks:[],status:"deleted",binary:!!n};if(!t.old_mode&&t.new_mode)return{oldPath:null,newPath:e.file_name,oldMode:null,newMode:t.new_mode,hunks:r?r.hunks:[],status:"added",binary:!!n};if(t.old_mode&&t.new_mode)return{newPath:e.file_name,oldPath:e.file_name,oldMode:t.old_mode,newMode:t.new_mode,hunks:r?r.hunks:[],status:"modified",binary:!!n};throw new Error("file modes missing")}function St(e,t,r){return(t=t||{}).filePath=e,t.status="unmerged",t.binary=!!r,t}if((n=c())!==a&&Ve===e.length)return n;throw n!==a&&Ve<e.length&&ot({type:"end"}),i=Qe,s=Ze<e.length?e.charAt(Ze):null,o=Ze<e.length?st(Ze,Ze+1):st(Ze,Ze),new t(t.buildMessage(i,s),i,s,o)}}},3135:t=>{"use strict";t.exports=e},3142:e=>{var t=Array.isArray;e.exports=t},3283:(e,t,r)=>{var n=r(6027),i=r(547),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},3305:(e,t,r)=>{var n=r(4497);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3316:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),s=16-(i-n);if(n=i,s>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},3321:(e,t,r)=>{var n=r(7553),i=r(528),s=r(5962),o=r(3142),a=r(547),u=r(3410),c=Object.prototype.hasOwnProperty;function l(e){if(a(e)&&!o(e)&&!(e instanceof n)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=s.prototype,l.prototype.constructor=l,e.exports=l},3410:(e,t,r)=>{var n=r(7553),i=r(528),s=r(4354);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},3417:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3476:e=>{e.exports={}},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 s=Array(i);++n<i;)s[n]=e[n+t];return s}},3526:(e,t,r)=>{var n=r(3142),i=r(5187),s=r(6493),o=r(5243);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:s(o(e))}},3554:function(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}}()},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}},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}},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""}},4119:e=>{"use strict";e.exports=n},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}},4497:(e,t,r)=>{var n=r(4715)(Object,"create");e.exports=n},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}},4732:(e,t,r)=>{var n=r(4700);e.exports=function(e){return n(this,e).has(e)}},4759:(e,t,r)=>{var n,i=r(1950),s=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!s&&s in e}},4967:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},5071:(e,t,r)=>{var n=r(7034);e.exports=function(e){return n(this.__data__,e)>-1}},5098:(e,t,r)=>{var n=r(3305),i=r(9361),s=r(1112),o=r(5276),a=r(7452);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},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}},5187:(e,t,r)=>{var n=r(3142),i=r(1187),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\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))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},5196:(e,t,r)=>{var n=r(6065),i=r(9071),s=n?function(e){return n.get(e)}:i;e.exports=s},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 s=arguments,o=-1,a=i(s.length-t,0),u=Array(a);++o<a;)u[o]=s[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=s[o];return c[t]=r(u),n(e,this,c)}}},5243:(e,t,r)=>{var n=r(2291);e.exports=function(e){return null==e?"":n(e)}},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)}},5650:(e,t,r)=>{var n=r(8942).Symbol;e.exports=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}},5837:e=>{e.exports=function(e,r){for(var n=[],i=0;i<e.length;i++){var s=r(e[i],i);t(s)?n.push.apply(n,s):n.push(s)}return n};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},5857:(e,t,r)=>{var n=r(313);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},5962:e=>{e.exports=function(){}},6027:(e,t,r)=>{var n=r(7379),i=r(547);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},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}},6065:(e,t,r)=>{var n=r(9270),i=n&&new n;e.exports=i},6123:(e,t,r)=>{var n=r(7923);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},6171:e=>{"use strict";e.exports=s},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6493:(e,t,r)=>{var n=r(6853),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=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(s,"$1"):r||e)}),t});e.exports=o},6648:(e,t,r)=>{var n=r(7553),i=r(5196),s=r(961),o=r(3321);e.exports=function(e){var t=s(e),r=o[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var a=i(r);return!!a&&e===a[0]}},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}},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)}},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}},7125:e=>{"use strict";e.exports=t},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]}},7250:e=>{e.exports=function(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},7330:(e,t,r)=>{var n=r(3063);e.exports={parse:function(e){return n.parse(e.toString())}}},7379:(e,t,r)=>{var n=r(5650),i=r(8870),s=r(9005),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},7403:(e,t,r)=>{var n=r(2619),i=r(2532),s=r(2053),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=o},7434:e=>{"use strict";e.exports=i},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}},7553:(e,t,r)=>{var n=r(9747),i=r(5962);function s(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}s.prototype=n(i.prototype),s.prototype.constructor=s,e.exports=s},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}},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}},7923:(e,t,r)=>{var n=r(3526),i=r(6040);e.exports=function(e,t){for(var r=0,s=(t=n(t,e)).length;null!=e&&r<s;)e=e[i(t[r++])];return r&&r==s?e:void 0}},8110:e=>{"use strict";e.exports=r},8250:(e,t,r)=>{var n=r(9753),i=r(5681),s=r(88),o=r(4732),a=r(9068);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},8870:(e,t,r)=>{var n=r(5650),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[a]=r:delete e[a]),i}},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)}},8942:(e,t,r)=>{var n=r(4967),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();e.exports=s},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(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],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===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}},9071:e=>{e.exports=function(){}},9270:(e,t,r)=>{var n=r(4715)(r(8942),"WeakMap");e.exports=n},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},9454:e=>{e.exports=function(e){return e!=e}},9624:(e,t,r)=>{var n=r(3655),i=r(4759),s=r(1580),o=r(4066),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,p=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(n(e)?p:a).test(o(e))}},9747:(e,t,r)=>{var n=r(1580),i=Object.create,s=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=s},9753:(e,t,r)=>{var n=r(5098),i=r(1386),s=r(9770);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||i),string:new n}}},9770:(e,t,r)=>{var n=r(4715)(r(8942),"Map");e.exports=n},9914:(e,t,r)=>{e.exports=p,p.Minimatch=f;var n=function(){try{return r(9942)}catch(e){}}()||{sep:"/"};p.sep=n.sep;var i=p.GLOBSTAR=f.GLOBSTAR={},s=r(473),o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",u=a+"*?",c="().*{}+?[]^$\\!".split("").reduce(function(e,t){return e[t]=!0,e},{}),l=/\/+/;function h(e,t){t=t||{};var r={};return Object.keys(e).forEach(function(t){r[t]=e[t]}),Object.keys(t).forEach(function(e){r[e]=t[e]}),r}function p(e,t,r){return g(t),r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&new f(t,r).match(e)}function f(e,t){if(!(this instanceof f))return new f(e,t);g(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===n.sep||(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function d(e,t){return t||(t=this instanceof f?this.options:{}),e=void 0===e?this.pattern:e,g(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:s(e)}p.filter=function(e,t){return t=t||{},function(r,n,i){return p(r,e,t)}},p.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return p;var t=p,r=function(r,n,i){return t(r,n,h(e,i))};return(r.Minimatch=function(r,n){return new t.Minimatch(r,h(e,n))}).defaults=function(r){return t.defaults(h(e,r)).Minimatch},r.filter=function(r,n){return t.filter(r,h(e,n))},r.defaults=function(r){return t.defaults(h(e,r))},r.makeRe=function(r,n){return t.makeRe(r,h(e,n))},r.braceExpand=function(r,n){return t.braceExpand(r,h(e,n))},r.match=function(r,n,i){return t.match(r,n,h(e,i))},r},f.defaults=function(e){return p.defaults(e).Minimatch},f.prototype.debug=function(){},f.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(l)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}else this.empty=!0;else this.comment=!0},f.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=0;if(!this.options.nonegate){for(var n=0,i=e.length;n<i&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.substr(r)),this.negate=t}},p.braceExpand=function(e,t){return d(e,t)},f.prototype.braceExpand=d;var g=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};f.prototype.parse=function(e,t){g(e);var r=this.options;if("**"===e){if(!r.noglobstar)return i;e="*"}if(""===e)return"";var n,s="",l=!!r.nocase,h=!1,p=[],f=[],d=!1,v=-1,y=-1,b="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",x=this;function w(){if(n){switch(n){case"*":s+=u,l=!0;break;case"?":s+=a,l=!0;break;default:s+="\\"+n}x.debug("clearStateChar %j %j",n,s),n=!1}}for(var _,P=0,k=e.length;P<k&&(_=e.charAt(P));P++)if(this.debug("%s\t%s %s %j",e,P,s,_),h&&c[_])s+="\\"+_,h=!1;else switch(_){case"/":return!1;case"\\":w(),h=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,P,s,_),d){this.debug(" in class"),"!"===_&&P===y+1&&(_="^"),s+=_;continue}x.debug("call clearStateChar %j",n),w(),n=_,r.noext&&w();continue;case"(":if(d){s+="(";continue}if(!n){s+="\\(";continue}p.push({type:n,start:P-1,reStart:s.length,open:o[n].open,close:o[n].close}),s+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,s),n=!1;continue;case")":if(d||!p.length){s+="\\)";continue}w(),l=!0;var S=p.pop();s+=S.close,"!"===S.type&&f.push(S),S.reEnd=s.length;continue;case"|":if(d||!p.length||h){s+="\\|",h=!1;continue}w(),s+="|";continue;case"[":if(w(),d){s+="\\"+_;continue}d=!0,y=P,v=s.length,s+=_;continue;case"]":if(P===y+1||!d){s+="\\"+_,h=!1;continue}var O=e.substring(y+1,P);try{RegExp("["+O+"]")}catch(e){var C=this.parse(O,m);s=s.substr(0,v)+"\\["+C[0]+"\\]",l=l||C[1],d=!1;continue}l=!0,d=!1,s+=_;continue;default:w(),h?h=!1:!c[_]||"^"===_&&d||(s+="\\"),s+=_}for(d&&(O=e.substr(y+1),C=this.parse(O,m),s=s.substr(0,v)+"\\["+C[0],l=l||C[1]),S=p.pop();S;S=p.pop()){var A=s.slice(S.reStart+S.open.length);this.debug("setting tail",s,S),A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,r){return r||(r="\\"),t+t+r+"|"}),this.debug("tail=%j\n %s",A,A,S,s);var R="*"===S.type?u:"?"===S.type?a:"\\"+S.type;l=!0,s=s.slice(0,S.reStart)+R+"\\("+A}w(),h&&(s+="\\\\");var j=!1;switch(s.charAt(0)){case"[":case".":case"(":j=!0}for(var E=f.length-1;E>-1;E--){var F=f[E],q=s.slice(0,F.reStart),T=s.slice(F.reStart,F.reEnd-8),L=s.slice(F.reEnd-8,F.reEnd),M=s.slice(F.reEnd);L+=M;var U=q.split("(").length-1,B=M;for(P=0;P<U;P++)B=B.replace(/\)[+*?]?/,"");var $="";""===(M=B)&&t!==m&&($="$"),s=q+T+M+$+L}if(""!==s&&l&&(s="(?=.)"+s),j&&(s=b+s),t===m)return[s,l];if(!l)return e.replace(/\\(.)/g,"$1");var D=r.nocase?"i":"";try{var I=new RegExp("^"+s+"$",D)}catch(e){return new RegExp("$.")}return I._glob=e,I._src=s,I};var m={};p.makeRe=function(e,t){return new f(e,t||{}).makeRe()},f.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?u:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"",s=e.map(function(e){return e.map(function(e){return e===i?r:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch(e){this.regexp=!1}return this.regexp},p.match=function(e,t,r){var n=new f(t,r=r||{});return e=e.filter(function(e){return n.match(e)}),n.options.nonull&&!e.length&&e.push(t),e},f.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==n.sep&&(e=e.split(n.sep).join("/")),e=e.split(l),this.debug(this.pattern,"split",e);var i,s,o=this.set;for(this.debug(this.pattern,"set",o),s=e.length-1;s>=0&&!(i=e[s]);s--);for(s=0;s<o.length;s++){var a=o[s],u=e;if(r.matchBase&&1===a.length&&(u=[i]),this.matchOne(u,a,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},f.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,o=0,a=e.length,u=t.length;s<a&&o<u;s++,o++){this.debug("matchOne loop");var c,l=t[o],h=e[s];if(this.debug(t,l,h),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[t,l,h]);var p=s,f=o+1;if(f===u){for(this.debug("** at the end");s<a;s++)if("."===e[s]||".."===e[s]||!n.dot&&"."===e[s].charAt(0))return!1;return!0}for(;p<a;){var d=e[p];if(this.debug("\nglobstar while",e,p,t,f,d),this.matchOne(e.slice(p),t.slice(f),r))return this.debug("globstar found match!",p,a,d),!0;if("."===d||".."===d||!n.dot&&"."===d.charAt(0)){this.debug("dot detected!",e,p,t,f);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!r||(this.debug("\n>>> no match, partial?",e,p,t,f),p!==a))}if("string"==typeof l?(c=h===l,this.debug("string match",l,h,c)):(c=h.match(l),this.debug("pattern match",l,h,c)),!c)return!1}if(s===a&&o===u)return!0;if(s===a)return r;if(o===u)return s===a-1&&""===e[s];throw new Error("wtf?")}},9942:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),s=a,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,s=a,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(n=o+"/"+n,i=47===o.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var u=r.length-a,c=o<u?o:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===r.charCodeAt(a+h))return r.slice(a+h+1);if(0===h)return r.slice(a+h)}else o>c&&(47===e.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var p=e.charCodeAt(i+h);if(p!==r.charCodeAt(a+h))break;47===p&&(l=h)}var f="";for(h=i+l+1;h<=s;++h)h!==s&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+l):(a+=l,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,s=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===u&&(o=!1,u=n+1),a>=0&&(c===r.charCodeAt(a)?-1===--a&&(s=n):(a=-1,s=u))}return i===s?s=u:-1===s&&(s=e.length),e.slice(i,s)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===i&&(s=!1,i=a+1),46===u?-1===r?r=a:1!==o&&(o=1):-1!==r&&(o=-1);else if(!s){n=a+1;break}}return-1===r||-1===i||0===o||1===o&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),s=47===i;s?(r.root="/",n=1):n=0;for(var o=-1,a=0,u=-1,c=!0,l=e.length-1,h=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===o?o=l:1!==h&&(h=1):-1!==o&&(h=-1);else if(!c){a=l+1;break}return-1===o||-1===u||0===h||1===h&&o===u-1&&o===a+1?-1!==u&&(r.base=r.name=0===a&&s?e.slice(1,u):e.slice(a,u)):(0===a&&s?(r.name=e.slice(1,o),r.base=e.slice(1,u)):(r.name=e.slice(a,o),r.base=e.slice(a,u)),r.ext=e.slice(o,u)),a>0?r.dir=e.slice(0,a-1):s&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},9986:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var s=n(e,t,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+e.length,s[1]),post:i.slice(s[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,s,o,a,u=r.indexOf(e),c=r.indexOf(t,u+1),l=u;if(u>=0&&c>0){if(e===t)return[u,c];for(n=[],s=r.length;l>=0&&!a;)l==u?(n.push(l),u=r.indexOf(e,l+1)):1==n.length?a=[n.pop(),c]:((i=n.pop())<s&&(s=i,o=c),c=r.indexOf(t,l+1)),l=u<c&&u>=0?u:c;n.length&&(a=[s,o])}return a}e.exports=t,t.range=n}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e].call(r.exports,r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendBitbucket:()=>Re});var e,t,r=u(3554),n=u.n(r),i=u(959),s=u.n(i),o=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}}(),a=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),l=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 o(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(a,e.apply(void 0,[t].concat(n)))}},{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 h=l;var p={separator:"",conjunction:"",serial:!1};const f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,s=e.conjunction,o=e.serial,a=r.match(/(\n?[^\S\n]+)$/);if(t=a?t.join(i+a[1]):t.join(i+" "),s&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(o?i:"")+" "+s+t.slice(u+1)}}return t}}},d=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)}}},g=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 h(f({separator:","}),d,g),new h(f({separator:",",conjunction:"and"}),d,g),new h(f({separator:",",conjunction:"or"}),d,g);const m=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 v=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new h(m("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(v):v(e)?e:""}}},f,d,g);const y=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 h(m("\n"),f,d,g,y(/&/g,"&"),y(/</g,"<"),y(/>/g,">"),y(/"/g,"""),y(/'/g,"'"),y(/`/g,"`"));const b=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)}}},x=new h(b(/(?:\n(?:\s*))+/g," "),g);new h(b(/(?:\n\s*)/g,""),g),new h(f({separator:","}),b(/(?:\s+)/g," "),g),new h(f({separator:",",conjunction:"or"}),b(/(?:\s+)/g," "),g),new h(f({separator:",",conjunction:"and"}),b(/(?:\s+)/g," "),g),new h(f,d,g),new h(f,b(/(?:\s+)/g," "),g);const w=new h(d,g);new h(d("all"),g);var _=u(3135),P=u(7125);function k(){return k=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},k.apply(null,arguments)}var S=u(8110),O={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 C(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var A=/[A-Z]|^ms/g,R=/_EMO_([^_]+?)_([^]*?)_EMO_/g,j=function(e){return 45===e.charCodeAt(1)},E=function(e){return null!=e&&"boolean"!=typeof e},F=C(function(e){return j(e)?e:e.replace(A,"-$&").toLowerCase()}),q=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(R,function(e,t,r){return L={name:t,styles:r,next:L},t})}return 1===O[e]||j(e)||"number"!=typeof t||0===t?t:t+"px"};function T(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 L={name:i.name,styles:i.styles,next:L},i.name;var s=r;if(void 0!==s.styles){var o=s.next;if(void 0!==o)for(;void 0!==o;)L={name:o.name,styles:o.styles,next:L},o=o.next;return s.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=T(e,t,r[i])+";";else for(var s in r){var o=r[s];if("object"!=typeof o){var a=o;null!=t&&void 0!==t[a]?n+=s+"{"+t[a]+"}":E(a)&&(n+=F(s)+":"+q(s,a)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var u=T(e,t,o);switch(s){case"animation":case"animationName":n+=F(s)+":"+u+";";break;default:n+=s+"{"+u+"}"}}else for(var c=0;c<o.length;c++)E(o[c])&&(n+=F(s)+":"+q(s,o[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var a=L,u=r(e);return L=a,T(e,t,u)}}var c=r;if(null==t)return c;var l=t[c];return void 0!==l?l:c}var L,M=/label:\s*([^\s;{]+)\s*(;|$)/g,U=u(4119),B=u.n(U),$=!!U.useInsertionEffect&&U.useInsertionEffect,D=$||function(e){return e()};$||U.useLayoutEffect;var I=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},N=/^((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|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)-.*))$/,z=C(function(e){return N.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),W=function(e){return"theme"!==e},H=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?z:W},G=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},J=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return I(t,r,n),D(function(){return function(e,t,r){I(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)}}(t,r,n)}),null},K=function e(t,r){var n,i,s=t.__emotion_real===t,o=s&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var a=G(t,r,s),u=a||H(o),c=!u("as");return function(){var l=arguments,h=s&&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,S.withEmotionCache)(function(e,t,r){var n,s,l,p,f=c&&e.as||o,d="",g=[],m=e;if(null==e.theme){for(var v in m={},e)m[v]=e[v];m.theme=U.useContext(S.ThemeContext)}"string"==typeof e.className?(n=t.registered,s=g,l=e.className,p="",l.split(" ").forEach(function(e){void 0!==n[e]?s.push(n[e]+";"):e&&(p+=e+" ")}),d=p):null!=e.className&&(d=e.className+" ");var y=function(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="";L=void 0;var s=e[0];null==s||void 0===s.raw?(n=!1,i+=T(r,t,s)):i+=s[0];for(var o=1;o<e.length;o++)i+=T(r,t,e[o]),n&&(i+=s[o]);M.lastIndex=0;for(var a,u="";null!==(a=M.exec(i));)u+="-"+a[1];var c=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)+u;return{name:c,styles:i,next:L}}(h.concat(g),t.registered,m);d+=t.key+"-"+y.name,void 0!==i&&(d+=" "+i);var b=c&&void 0===a?H(f):u,x={};for(var w in e)c&&"as"===w||b(w)&&(x[w]=e[w]);return x.className=d,r&&(x.ref=r),U.createElement(U.Fragment,null,U.createElement(J,{cache:t,serialized:y,isStringTag:"string"==typeof f}),U.createElement(f,x))});return g.displayName=void 0!==n?n:"Styled("+("string"==typeof o?o:o.displayName||o.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=o,g.__emotion_styles=h,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(t,n){return e(t,k({},r,n,{shouldForwardProp:G(g,n,!0)})).apply(void 0,h)},g}},Y=u(7434),V=u.n(Y),X=u(6171);function Z(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q=K(X.Icon,{target:"e15sc0jo0",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class ee extends B().Component{constructor(...e){super(...e),Z(this,"state",{}),Z(this,"handleLogin",e=>{e.preventDefault(),this.auth.authenticate(this.authSettings,(e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})})}componentDidMount(){V().checkPropTypes(ee.propTypes,this.props,"prop","BitbucketAuthenticationPage");const{auth_type:e=""}=this.props.config.backend;if("implicit"===e){const{base_url:e="https://bitbucket.org",auth_endpoint:t="site/oauth2/authorize",app_id:r=""}=this.props.config.backend;this.auth=new P.ImplicitAuthenticator({base_url:e,auth_endpoint:t,app_id:r,clearHash:this.props.clearHash}),this.auth.completeAuth((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}),this.authSettings={scope:"repository:write"}}else this.auth=new P.NetlifyAuthenticator({base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint}),this.authSettings={provider:"bitbucket",scope:"repo"}}render(){const{inProgress:e,config:t,t:r}=this.props;return(0,S.jsx)(X.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,S.jsx)(B().Fragment,null,(0,S.jsx)(Q,{type:"bitbucket"}),r(e?"auth.loggingIn":"auth.loginWithBitbucket")),t:r})}}Z(ee,"propTypes",{onLogin:V().func.isRequired,inProgress:V().bool,base_url:V().string,siteId:V().string,authEndpoint:V().string,config:V().object.isRequired,clearHash:V().func,t:V().func.isRequired});var te=u(2879),re=u.n(te),ne=u(6123),ie=u.n(ne),se=u(9942),oe=u(7330);function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ue(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ce=function(e){return e.MERGED="MERGED",e.SUPERSEDED="SUPERSEDED",e.OPEN="OPEN",e.DECLINED="DECLINED",e}(ce||{}),le=function(e){return e.Successful="SUCCESSFUL",e.Failed="FAILED",e.InProgress="INPROGRESS",e.Stopped="STOPPED",e}(le||{});const he="Bitbucket",pe="application/json; charset=utf-8";function fe(e){return e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),{size:0,values:[]}):Promise.reject(e)}class de{constructor(e){ue(this,"apiRoot",void 0),ue(this,"branch",void 0),ue(this,"repo",void 0),ue(this,"requestFunction",void 0),ue(this,"repoURL",void 0),ue(this,"commitAuthor",void 0),ue(this,"mergeStrategy",void 0),ue(this,"initialWorkflowStatus",void 0),ue(this,"cmsLabelPrefix",void 0),ue(this,"buildRequest",e=>{const t=_.unsentRequest.withRoot(this.apiRoot)(e);return t.has("cache")?t:_.unsentRequest.withNoCache(t)}),ue(this,"request",e=>{try{return(0,_.requestWithBackoff)(this,e)}catch(e){throw new _.APIError(e.message,null,he)}}),ue(this,"responseToJSON",(0,_.responseParser)({format:"json",apiName:he})),ue(this,"responseToBlob",(0,_.responseParser)({format:"blob",apiName:he})),ue(this,"responseToText",(0,_.responseParser)({format:"text",apiName:he})),ue(this,"requestJSON",e=>this.request(e).then(this.responseToJSON)),ue(this,"requestText",e=>this.request(e).then(this.responseToText)),ue(this,"user",()=>this.requestJSON("/user")),ue(this,"hasWriteAccess",async()=>{const e=await this.request(this.repoURL);if(404===e.status)throw Error("Repo not found");return e.ok}),ue(this,"getBranch",async e=>await this.requestJSON(`${this.repoURL}/refs/branches/${e}`)),ue(this,"branchCommitSha",async e=>{const{target:{hash:t}}=await this.getBranch(e);return t}),ue(this,"defaultBranchCommitSha",()=>this.branchCommitSha(this.branch)),ue(this,"isFile",({type:e})=>"commit_file"===e),ue(this,"getFileId",(e,t)=>`${e}/${t}`),ue(this,"processFile",e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach(function(t){ue(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({id:e.id,type:e.type,path:e.path,name:(0,_.basename)(e.path)},e.commit&&e.commit.hash?{id:this.getFileId(e.commit.hash,e.path)}:{})),ue(this,"processFiles",e=>e.filter(this.isFile).map(this.processFile)),ue(this,"readFile",async(e,t,{parseText:r=!0,branch:n=this.branch,head:i=""}={})=>await(0,_.readFile)(t,async()=>{const t=i||await this.branchCommitSha(n);return await this.request({url:`${this.repoURL}/src/${t}/${e}`,cache:"no-store"}).then(r?this.responseToText:this.responseToBlob)},_.localForage,r)),ue(this,"getEntriesAndCursor",e=>{const{size:t,page:r,pagelen:n,next:i,previous:s,values:o}=e,a=n&&t?Math.ceil(t/n):void 0;return{entries:o,cursor:_.Cursor.create({actions:[...i?["next"]:[],...s?["prev"]:[]],meta:{page:r,count:t,pageSize:n,pageCount:a},data:{links:{next:i,prev:s}}})}}),ue(this,"listFiles",async(e,t=1,r,n)=>{const i=await this.branchCommitSha(n),s=await this.requestJSON({url:`${this.repoURL}/src/${i}/${e}`,params:{max_depth:t,pagelen:r}}).catch(fe),{entries:o,cursor:a}=this.getEntriesAndCursor(s);return{entries:this.processFiles(o),cursor:a}}),ue(this,"traverseCursor",async(e,t)=>re()([this.requestJSON,(0,_.then)(this.getEntriesAndCursor),(0,_.then)(({cursor:e,entries:t})=>({cursor:e,entries:this.processFiles(t)}))])(e.data.getIn(["links",t]))),ue(this,"listAllFiles",async(e,t,r)=>{const{cursor:n,entries:i}=await this.listFiles(e,t,100,r),s=[...i];let o=n;for(;o&&o.actions.has("next");){const{cursor:e,entries:t}=await this.traverseCursor(o,"next");s.push(...t),o=e}return this.processFiles(s)}),ue(this,"deleteFiles",(e,t)=>{const r=new FormData;if(e.forEach(e=>{r.append("files",e)}),r.append("branch",this.branch),t&&r.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;r.append("author",`${e} <${t}>`)}return re()([_.unsentRequest.withMethod("POST"),_.unsentRequest.withBody(r),this.request])(`${this.repoURL}/src`)}),this.apiRoot=e.apiRoot||"https://api.bitbucket.org/2.0",this.branch=e.branch||"master",this.repo=e.repo||"",this.requestFunction=e.requestFunction||_.unsentRequest.performRequest,this.hasWriteAccess=e.hasWriteAccess||this.hasWriteAccess,this.repoURL=this.repo?`/repositories/${this.repo}`:"",this.mergeStrategy=e.squashMerges?"squash":"merge_commit",this.initialWorkflowStatus=e.initialWorkflowStatus,this.cmsLabelPrefix=e.cmsLabelPrefix}async readFileMetadata(e,t){return await(0,_.readFileMetadata)(t,async()=>{try{const{values:t}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{path:e,include:this.branch}}),r=t[0];return{author:r.author.user?r.author.user.display_name||r.author.user.nickname:r.author.raw,updatedOn:r.date}}catch(e){return{author:"",updatedOn:""}}},_.localForage)}async isShaExistsInBranch(e,t){const{values:r}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{include:e,pagelen:100}}).catch(t=>(console.log(`Failed getting commits for branch '${e}'`,t),[]));return r.some(e=>e.hash===t)}async uploadFiles(e,{commitMessage:t,branch:r,parentSha:n}){const i=new FormData,s=[];e.forEach(e=>{if(e.delete)i.append("files",e.path);else if(e.newPath){const t=ie()(e,"fileObj",new Blob([e.raw]));s.push({from:e.path,to:e.newPath,contentBlob:t})}else{const t=ie()(e,"fileObj",new Blob([e.raw]));i.append(e.path,t,(0,_.basename)(e.path))}});for(const{from:e,to:t,contentBlob:o}of s){const s=(0,se.dirname)(e),a=(0,se.dirname)(t),u=n?this.branch:r,c=await this.listAllFiles(s,100,u);for(const t of c){i.append("files",t.path);const r=t.path===e?o:await this.readFile(t.path,null,{branch:u,parseText:!1});i.append(t.path.replace(s,a),r,(0,_.basename)(t.path))}}if(t&&i.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;i.append("author",`${e} <${t}>`)}i.append("branch",r),n&&i.append("parents",n);try{await this.requestText({url:`${this.repoURL}/src`,method:"POST",body:i})}catch(e){const t=e.message||"";throw n&&t.includes("Something went wrong")&&await(0,_.throwOnConflictingBranches)(r,e=>this.getBranch(e),he),e}return e}async persistFiles(e,t,r){const n=[...e,...t];if(r.useWorkflow){const t=e[0].slug;return this.editorialWorkflowGit(n,t,r)}return this.uploadFiles(n,{commitMessage:r.commitMessage,branch:this.branch})}async addPullRequestComment(e,t){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/comments`,headers:{"Content-Type":pe},body:JSON.stringify({content:{raw:t}})})}async getPullRequestLabel(e){const t=await this.requestJSON({url:`${this.repoURL}/pullrequests/${e}/comments`,params:{pagelen:100}});return t.values.map(e=>e.content.raw)[t.values.length-1]}async createPullRequest(e,t,r){const n=await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests`,headers:{"Content-Type":pe},body:JSON.stringify({title:t,source:{branch:{name:e}},destination:{branch:{name:this.branch}},description:_.DEFAULT_PR_BODY,close_source_branch:!0})});await this.addPullRequestComment(n,(0,_.statusToLabel)(r,this.cmsLabelPrefix))}async getDifferences(e,t=this.branch){if(e===t)return[];const r=await this.requestText({url:`${this.repoURL}/diff/${e}..${t}`,params:{binary:!1}});return(0,oe.parse)(r).map(e=>{var t,r;const n=(null===(t=e.oldPath)||void 0===t?void 0:t.replace(/b\//,""))||"",i=(null===(r=e.newPath)||void 0===r?void 0:r.replace(/b\//,""))||"",s=i||n;return{oldPath:n,newPath:i,status:e.status,newFile:"added"===e.status,path:s,binary:e.binary||/.svg$/.test(s)}})}async editorialWorkflowGit(e,t,r){const n=(0,_.generateContentKey)(r.collectionName,t),i=(0,_.branchFromContentKey)(n);if(r.unpublished){const t=await this.getDifferences(i),n=[];for(const r of t.filter(e=>e.binary&&"deleted"!==e.status))e.some(e=>e.path===r.path)||n.push({path:r.path,delete:!0});await this.uploadFiles([...e,...n],{commitMessage:r.commitMessage,branch:i})}else{const t=await this.branchCommitSha(this.branch);await this.uploadFiles(e,{commitMessage:r.commitMessage,branch:i,parentSha:t}),await this.createPullRequest(i,r.commitMessage,r.status||this.initialWorkflowStatus)}}async getPullRequests(e){const t=e?`source.branch.name = "${e}"`:`source.branch.name ~ "${_.CMS_BRANCH_PREFIX}/"`,r=await this.requestJSON({url:`${this.repoURL}/pullrequests`,params:{pagelen:50,q:x`
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("decap-cms-lib-util"),require("decap-cms-lib-auth"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendBitbucket",["decap-cms-lib-util","decap-cms-lib-auth","@emotion/react","react","prop-types","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendBitbucket=t(require("decap-cms-lib-util"),require("decap-cms-lib-auth"),require("@emotion/react"),require("react"),require("prop-types"),require("decap-cms-ui-default")):e.DecapCmsBackendBitbucket=t(e.DecapCmsLibUtil,e.DecapCmsLibAuth,e.DecapCmsDefaultExports.EmotionCore,e.React,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsUiDefault)}(window,(e,t,r,n,i,s)=>(()=>{var o={88:(e,t,r)=>{var n=r(4700);e.exports=function(e){return n(this,e).get(e)}},155:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},313:(e,t,r)=>{var n=r(1129),i=r(714);e.exports=function e(t,r,s,o,a){var u=-1,l=t.length;for(s||(s=i),a||(a=[]);++u<l;){var c=t[u];r>0&&s(c)?r>1?e(c,r-1,s,o,a):n(a,c):o||(a[a.length]=c)}return a}},528:(e,t,r)=>{var n=r(9747),i=r(5962);function s(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}s.prototype=n(i.prototype),s.prototype.constructor=s,e.exports=s},547:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},714:(e,t,r)=>{var n=r(5650),i=r(3283),s=r(3142),o=n?n.isConcatSpreadable:void 0;e.exports=function(e){return s(e)||i(e)||!!(o&&e&&e[o])}},796:(e,t,r)=>{var n=r(7403),i=r(3316)(n);e.exports=i},959:(e,t,r)=>{var n=r(2291),i=r(8931),s=r(7905),o=r(2237),a=r(5243),u=/^\s+/;e.exports=function(e,t,r){if((e=a(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var l=o(e),c=s(l,o(t));return i(l,c).join("")}},961:(e,t,r)=>{var n=r(3476),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],s=i.call(n,t)?r.length:0;s--;){var o=r[s],a=o.func;if(null==a||a==e)return o.name}return 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}},1129:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return 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)}},1386:(e,t,r)=>{var n=r(2393),i=r(2049),s=r(7144),o=r(5071),a=r(3964);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},1439:(e,t,r)=>{var n=r(5857),i=r(5234),s=r(796);e.exports=function(e){return s(i(e,void 0,n),e+"")}},1580:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1942:(e,t,r)=>{var n=r(528),i=r(1439),s=r(5196),o=r(961),a=r(3142),u=r(6648);e.exports=function(e){return i(function(t){var r=t.length,i=r,l=n.prototype.thru;for(e&&t.reverse();i--;){var c=t[i];if("function"!=typeof c)throw new TypeError("Expected a function");if(l&&!h&&"wrapper"==o(c))var h=new n([],!0)}for(i=h?i:r;++i<r;){c=t[i];var p=o(c),f="wrapper"==p?s(c):void 0;h=f&&u(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?h[o(f[0])].apply(h,f[3]):1==c.length&&u(c)?h[p]():h.thru(c)}return function(){var e=arguments,n=e[0];if(h&&1==e.length&&a(n))return h.plant(n).value();for(var i=0,s=r?t[i].apply(this,e):n;++i<r;)s=t[i].call(this,s);return s}})}},1950:(e,t,r)=>{var n=r(8942)["__core-js_shared__"];e.exports=n},2013:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",s="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",l="[\\ufe0e\\ufe0f]?",c=l+u+"(?:\\u200d(?:"+[s,o,a].join("|")+")"+l+u+")*",h="(?:"+[s+n+"?",n,o,a,r].join("|")+")",p=RegExp(i+"(?="+i+")|"+h+c,"g");e.exports=function(e){return e.match(p)||[]}},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))}},2053:e=>{e.exports=function(e){return e}},2237:(e,t,r)=>{var n=r(2837),i=r(3417),s=r(2013);e.exports=function(e){return i(e)?s(e):n(e)}},2291:(e,t,r)=>{var n=r(5650),i=r(5111),s=r(3142),o=r(1187),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(s(t))return i(t,e)+"";if(o(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},2393:e=>{e.exports=function(){this.__data__=[],this.size=0}},2478:(e,t,r)=>{var n=r(7250),i=r(9454),s=r(7706);e.exports=function(e,t,r){return t==t?s(e,t,r):n(e,i,r)}},2532:(e,t,r)=>{var n=r(4715),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},2619:e=>{e.exports=function(e){return function(){return e}}},2837:e=>{e.exports=function(e){return e.split("")}},2879:(e,t,r)=>{var n=r(1942)();e.exports=n},3063:e=>{"use strict";function t(e,r,n,i){this.message=e,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?s(e.parts[t][0])+"-"+s(e.parts[t][1]):s(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function s(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(e){return"\\x0"+n(e)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(e){return"\\x"+n(e)})}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=new Array(e.length);for(t=0;t<e.length;t++)n[t]=o(e[t]);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+i(e)+'"':"end of input"}(t)+" found."},e.exports={SyntaxError:t,parse:function(e,r){r=void 0!==r?r:{};var n,i,s,o,a={},u={diffs:at},l=at,c=function(e){return e},h=function(e,t){return kt(e,t,void 0,!0)},p="Binary files ",f=rt("Binary files ",!1),d=function(e,t,r){return kt(e,t,r)},g=function(e){return St(e,void 0,!0)},m=function(e,t,r,n,i,s){return function(e,t,r,n,i,s){const o={oldPath:r,newPath:n,hunks:s?s.hunks:[],status:"copy"===e?"copied":"renamed",similarity:t};return i&&(o.oldMode=i.old_mode,o.newMode=i.new_mode),o}(r.operation,t,r.file,n.file,e||i,s)},b=function(e,t){return St(e,t)},v="diff --cc ",y=rt("diff --cc ",!1),w=function(e){return e},x="* Unmerged path ",_=rt("* Unmerged path ",!1),P=function(e){return St(e)},k=function(e,t){return{hunks:t}},S="--- ",O=rt("--- ",!1),C="+++ ",A=rt("+++ ",!1),R=function(e,t){return{old_file_name:e,new_file_name:t}},j=function(e,t){return Object.assign({},e,{lines:t})},E="@@@ -",F=rt("@@@ -",!1),L=" -",q=rt(" -",!1),T=" +",M=rt(" +",!1),U=" @@@",$=rt(" @@@",!1),B=function(e,t,r,n){return{ourStartLine:e.start,ourLineCount:e.count,theirStartLine:r.start,theirLineCount:r.count,baseStartLine:t.start,baseLineCount:t.count,heading:n?n.trim():""}},N="@@ -",D=rt("@@ -",!1),I=" @@",W=rt(" @@",!1),z=function(e,t,r){return{oldStartLine:e.start,oldLineCount:e.count,newStartLine:t.start,newLineCount:t.count,heading:r?r.trim():""}},H=",",G=rt(",",!1),J=function(e,t){return{start:e,count:t}},K=function(e){return{start:e,count:1}},Y="+",V=rt("+",!1),X="-",Z=rt("-",!1),Q=" ",ee=rt(" ",!1),te="\\",re=rt("\\",!1),ne=function(e){return e.join("")},ie="diff ",se=rt("diff ",!1),oe=function(e,t){return{file_name:t}},ae=function(e){return e.substr(e.length/2+1)},ue="similarity index ",le=rt("similarity index ",!1),ce="%",he=rt("%",!1),pe=function(e){return e},fe=function(e,t){return e||t},de="new",ge=rt("new",!1),me="deleted",be=rt("deleted",!1),ve=" file mode ",ye=rt(" file mode ",!1),we=function(e,t){return"new"===e?{old_mode:null,new_mode:t}:{old_mode:t,new_mode:null}},xe="old mode ",_e=rt("old mode ",!1),Pe="new mode ",ke=rt("new mode ",!1),Se=function(e,t){return{old_mode:e,new_mode:t}},Oe="rename",Ce=rt("rename",!1),Ae="copy",Re=rt("copy",!1),je=" from ",Ee=rt(" from ",!1),Fe=function(e,t){return{operation:e,file:t}},Le=" to ",qe=rt(" to ",!1),Te="index ",Me=rt("index ",!1),Ue=function(e){return{old_mode:e,new_mode:e}},$e=(nt([" ","\t"],!1,!1),"\n"),Be=rt("\n",!1),Ne="\r\n",De=rt("\r\n",!1),Ie={type:"any"},We=/^[^\r\n]/,ze=nt(["\r","\n"],!0,!1),He=/^[^ \t\r\n]/,Ge=nt([" ","\t","\r","\n"],!0,!1),Je=/^[0-9]/,Ke=nt([["0","9"]],!1,!1),Ye=function(e){return parseInt(e.join(""),10)},Ve=0,Xe=[{line:1,column:1}],Ze=0,Qe=[],et=0,tt={};if("startRule"in r){if(!(r.startRule in u))throw new Error("Can't start parsing from rule \""+r.startRule+'".');l=u[r.startRule]}function rt(e,t){return{type:"literal",text:e,ignoreCase:t}}function nt(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function it(t){var r,n=Xe[t];if(n)return n;for(r=t-1;!Xe[r];)r--;for(n={line:(n=Xe[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Xe[t]=n,n}function st(e,t){var r=it(e),n=it(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function ot(e){Ve<Ze||(Ve>Ze&&(Ze=Ve,Qe=[]),Qe.push(e))}function at(){var e,t,r,n=35*Ve+0,i=tt[n];if(i)return Ve=i.nextPos,i.result;for(Ve,t=[],r=ut();r!==a;)t.push(r),r=ut();return t!==a&&(t=c(t)),e=t,tt[n]={nextPos:Ve,result:e},e}function ut(){var t,r=35*Ve+1,n=tt[r];return n?(Ve=n.nextPos,n.result):(t=function(){var e,t,r=35*Ve+5,n=tt[r];return n?(Ve=n.nextPos,n.result):(e=Ve,(t=ct())!==a&&yt()!==a&<()!==a?e=t=g(t):(Ve=e,e=a),tt[r]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var t,r,n,i,s,o,u,l,c=35*Ve+6,h=tt[c];return h?(Ve=h.nextPos,h.result):(t=Ve,r=function(){var t,r,n,i,s,o,u=35*Ve+19,l=tt[u];return l?(Ve=l.nextPos,l.result):(t=Ve,e.substr(Ve,5)===ie?(r=ie,Ve+=5):(r=a,0===et&&ot(se)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a&&(s=xt())!==a&&(o=wt())!==a?t=r=[r,n,i,s,o]:(Ve=t,t=a)):(Ve=t,t=a),tt[u]={nextPos:Ve,result:t},t)}(),r!==a?((n=vt())===a&&(n=null),n!==a?(i=function(){var t,r,n,i,s=35*Ve+21,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,17)===ue?(r=ue,Ve+=17):(r=a,0===et&&ot(le)),r!==a&&(n=Pt())!==a?(37===e.charCodeAt(Ve)?(i=ce,Ve++):(i=a,0===et&&ot(he)),i!==a&&wt()!==a?t=r=pe(n):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),i!==a?(s=function(){var t,r,n,i,s=35*Ve+25,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,6)===Oe?(r=Oe,Ve+=6):(r=a,0===et&&ot(Ce)),r===a&&(e.substr(Ve,4)===Ae?(r=Ae,Ve+=4):(r=a,0===et&&ot(Re))),r!==a?(e.substr(Ve,6)===je?(n=je,Ve+=6):(n=a,0===et&&ot(Ee)),n!==a&&(i=xt())!==a&&wt()!==a?t=r=Fe(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),s!==a?(o=function(){var t,r,n,i,s=35*Ve+26,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,6)===Oe?(r=Oe,Ve+=6):(r=a,0===et&&ot(Ce)),r===a&&(e.substr(Ve,4)===Ae?(r=Ae,Ve+=4):(r=a,0===et&&ot(Re))),r!==a?(e.substr(Ve,4)===Le?(n=Le,Ve+=4):(n=a,0===et&&ot(qe)),n!==a&&(i=xt())!==a&&wt()!==a?t=r=Fe(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),o!==a?((u=yt())===a&&(u=null),u!==a?((l=lt())===a&&(l=ht()),l===a&&(l=null),l!==a?t=r=m(n,i,s,o,u,l):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[c]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var e,t,r,n=35*Ve+7,i=tt[n];return i?(Ve=i.nextPos,i.result):(e=Ve,(t=ct())!==a&&yt()!==a?((r=ht())===a&&(r=null),r!==a?e=t=b(t,r):(Ve=e,e=a)):(Ve=e,e=a),tt[n]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var t,r,n,i=35*Ve+9,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,e.substr(Ve,16)===x?(r=x,Ve+=16):(r=a,0===et&&ot(_)),r!==a&&(n=xt())!==a&&wt()!==a?t=r=P(n):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var e,t,r,n,i=35*Ve+2,s=tt[i];return s?(Ve=s.nextPos,s.result):(e=Ve,(t=mt())!==a?((r=bt())===a&&(r=null),r!==a?((n=pt())===a&&(n=null),n!==a&<()!==a?e=t=h(t,r):(Ve=e,e=a)):(Ve=e,e=a)):(Ve=e,e=a),tt[i]={nextPos:Ve,result:e},e)}(),t===a&&(t=function(){var e,t,r,n,i=35*Ve+4,s=tt[i];return s?(Ve=s.nextPos,s.result):(e=Ve,(t=mt())!==a?((r=bt())===a&&(r=null),r!==a?((n=ht())===a&&(n=null),n!==a?e=t=d(t,r,n):(Ve=e,e=a)):(Ve=e,e=a)):(Ve=e,e=a),tt[i]={nextPos:Ve,result:e},e)}()))))),tt[r]={nextPos:Ve,result:t},t)}function lt(){var t,r,n,i,s=35*Ve+3,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,13)===p?(r=p,Ve+=13):(r=a,0===et&&ot(f)),r!==a&&(n=xt())!==a&&(i=wt())!==a?t=r=[r,n,i]:(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}function ct(){var t,r,n,i=35*Ve+8,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,e.substr(Ve,10)===v?(r=v,Ve+=10):(r=a,0===et&&ot(y)),r!==a&&(n=xt())!==a&&wt()!==a?t=r=w(n):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}function ht(){var e,t,r,n,i=35*Ve+10,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(e=Ve,(t=pt())!==a){for(r=[],n=ft();n!==a;)r.push(n),n=ft();r!==a?e=t=k(t,r):(Ve=e,e=a)}else Ve=e,e=a;return tt[i]={nextPos:Ve,result:e},e}function pt(){var t,r,n,i,s,o=35*Ve+11,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,4)===S?(r=S,Ve+=4):(r=a,0===et&&ot(O)),r!==a&&(n=xt())!==a&&wt()!==a?(e.substr(Ve,4)===C?(i=C,Ve+=4):(i=a,0===et&&ot(A)),i!==a&&(s=xt())!==a&&wt()!==a?t=r=R(n,s):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function ft(){var t,r,n,i,s=35*Ve+12,o=tt[s];if(o)return Ve=o.nextPos,o.result;if(t=Ve,r=function(){var t,r=35*Ve+13,n=tt[r];return n?(Ve=n.nextPos,n.result):(t=function(){var t,r,n,i,s,o,u,l,c,h=35*Ve+14,p=tt[h];return p?(Ve=p.nextPos,p.result):(t=Ve,e.substr(Ve,5)===E?(r=E,Ve+=5):(r=a,0===et&&ot(F)),r!==a&&(n=dt())!==a?(e.substr(Ve,2)===L?(i=L,Ve+=2):(i=a,0===et&&ot(q)),i!==a&&(s=dt())!==a?(e.substr(Ve,2)===T?(o=T,Ve+=2):(o=a,0===et&&ot(M)),o!==a&&(u=dt())!==a?(e.substr(Ve,4)===U?(l=U,Ve+=4):(l=a,0===et&&ot($)),l!==a?((c=xt())===a&&(c=null),c!==a&&wt()!==a?t=r=B(n,s,u,c):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[h]={nextPos:Ve,result:t},t)}(),t===a&&(t=function(){var t,r,n,i,s,o,u,l=35*Ve+15,c=tt[l];return c?(Ve=c.nextPos,c.result):(t=Ve,e.substr(Ve,4)===N?(r=N,Ve+=4):(r=a,0===et&&ot(D)),r!==a&&(n=dt())!==a?(e.substr(Ve,2)===T?(i=T,Ve+=2):(i=a,0===et&&ot(M)),i!==a&&(s=dt())!==a?(e.substr(Ve,3)===I?(o=I,Ve+=3):(o=a,0===et&&ot(W)),o!==a?((u=xt())===a&&(u=null),u!==a&&wt()!==a?t=r=z(n,s,u):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[l]={nextPos:Ve,result:t},t)}()),tt[r]={nextPos:Ve,result:t},t)}(),r!==a){if(n=[],(i=gt())!==a)for(;i!==a;)n.push(i),i=gt();else n=a;n!==a?t=r=j(r,n):(Ve=t,t=a)}else Ve=t,t=a;return tt[s]={nextPos:Ve,result:t},t}function dt(){var t,r,n,i,s=35*Ve+16,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,(r=Pt())!==a?(44===e.charCodeAt(Ve)?(n=H,Ve++):(n=a,0===et&&ot(G)),n!==a&&(i=Pt())!==a?t=r=J(r,i):(Ve=t,t=a)):(Ve=t,t=a),t===a&&(t=Ve,(r=Pt())!==a&&(r=K(r)),t=r),tt[s]={nextPos:Ve,result:t},t)}function gt(){var t,r,n,i,s=35*Ve+17,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,r=Ve,43===e.charCodeAt(Ve)?(n=Y,Ve++):(n=a,0===et&&ot(V)),n===a&&(45===e.charCodeAt(Ve)?(n=X,Ve++):(n=a,0===et&&ot(Z)),n===a&&(32===e.charCodeAt(Ve)?(n=Q,Ve++):(n=a,0===et&&ot(ee)),n===a&&(92===e.charCodeAt(Ve)?(n=te,Ve++):(n=a,0===et&&ot(re))))),n!==a?((i=xt())===a&&(i=null),i!==a?r=n=[n,i]:(Ve=r,r=a)):(Ve=r,r=a),r!==a&&(n=wt())!==a?t=r=ne(r):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}function mt(){var t,r,n,i,s,o=35*Ve+18,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,5)===ie?(r=ie,Ve+=5):(r=a,0===et&&ot(se)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a?(s=function(){var e,t,r=35*Ve+20,n=tt[r];return n?(Ve=n.nextPos,n.result):(Ve,(t=xt())!==a&&(t=ae(t)),e=t,tt[r]={nextPos:Ve,result:e},e)}(),s!==a&&wt()!==a?t=r=oe(n,s):(Ve=t,t=a)):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function bt(){var t,r,n,i=35*Ve+22,s=tt[i];return s?(Ve=s.nextPos,s.result):(t=Ve,r=function(){var t,r,n,i,s=35*Ve+23,o=tt[s];return o?(Ve=o.nextPos,o.result):(t=Ve,e.substr(Ve,3)===de?(r=de,Ve+=3):(r=a,0===et&&ot(ge)),r===a&&(e.substr(Ve,7)===me?(r=me,Ve+=7):(r=a,0===et&&ot(be))),r!==a?(e.substr(Ve,11)===ve?(n=ve,Ve+=11):(n=a,0===et&&ot(ye)),n!==a&&(i=xt())!==a&&wt()!==a?t=r=we(r,i):(Ve=t,t=a)):(Ve=t,t=a),tt[s]={nextPos:Ve,result:t},t)}(),r===a&&(r=vt()),r===a&&(r=null),r!==a?((n=yt())===a&&(n=null),n!==a?t=r=fe(r,n):(Ve=t,t=a)):(Ve=t,t=a),tt[i]={nextPos:Ve,result:t},t)}function vt(){var t,r,n,i,s,o=35*Ve+24,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,9)===xe?(r=xe,Ve+=9):(r=a,0===et&&ot(_e)),r!==a&&(n=xt())!==a&&wt()!==a?(e.substr(Ve,9)===Pe?(i=Pe,Ve+=9):(i=a,0===et&&ot(ke)),i!==a&&(s=xt())!==a&&wt()!==a?t=r=Se(n,s):(Ve=t,t=a)):(Ve=t,t=a),tt[o]={nextPos:Ve,result:t},t)}function yt(){var t,r,n,i,s,o=35*Ve+27,u=tt[o];return u?(Ve=u.nextPos,u.result):(t=Ve,e.substr(Ve,6)===Te?(r=Te,Ve+=6):(r=a,0===et&&ot(Me)),r!==a&&(n=_t())!==a?(32===e.charCodeAt(Ve)?(i=Q,Ve++):(i=a,0===et&&ot(ee)),i!==a&&(s=xt())!==a&&wt()!==a?t=r=Ue(s):(Ve=t,t=a)):(Ve=t,t=a),t===a&&(t=Ve,e.substr(Ve,6)===Te?(r=Te,Ve+=6):(r=a,0===et&&ot(Me)),r!==a&&(n=_t())!==a&&(i=wt())!==a?t=r=[r,n,i]:(Ve=t,t=a)),tt[o]={nextPos:Ve,result:t},t)}function wt(){var t,r=35*Ve+29,n=tt[r];return n?(Ve=n.nextPos,n.result):(10===e.charCodeAt(Ve)?(t=$e,Ve++):(t=a,0===et&&ot(Be)),t===a&&(e.substr(Ve,2)===Ne?(t=Ne,Ve+=2):(t=a,0===et&&ot(De))),t===a&&(t=function(){var t,r,n=35*Ve+31,i=tt[n];return i?(Ve=i.nextPos,i.result):(t=Ve,et++,e.length>Ve?(r=e.charAt(Ve),Ve++):(r=a,0===et&&ot(Ie)),et--,r===a?t=void 0:(Ve=t,t=a),tt[n]={nextPos:Ve,result:t},t)}()),tt[r]={nextPos:Ve,result:t},t)}function xt(){var t,r,n,i=35*Ve+32,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],We.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(ze)),n!==a)for(;n!==a;)r.push(n),We.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(ze));else r=a;return r!==a&&(r=ne(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function _t(){var t,r,n,i=35*Ve+33,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],He.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ge)),n!==a)for(;n!==a;)r.push(n),He.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ge));else r=a;return r!==a&&(r=ne(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function Pt(){var t,r,n,i=35*Ve+34,s=tt[i];if(s)return Ve=s.nextPos,s.result;if(Ve,r=[],Je.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ke)),n!==a)for(;n!==a;)r.push(n),Je.test(e.charAt(Ve))?(n=e.charAt(Ve),Ve++):(n=a,0===et&&ot(Ke));else r=a;return r!==a&&(r=Ye(r)),t=r,tt[i]={nextPos:Ve,result:t},t}function kt(e,t,r,n){if(t.old_mode&&!t.new_mode)return{newPath:null,oldPath:e.file_name,newMode:null,oldMode:t.old_mode,hunks:r?r.hunks:[],status:"deleted",binary:!!n};if(!t.old_mode&&t.new_mode)return{oldPath:null,newPath:e.file_name,oldMode:null,newMode:t.new_mode,hunks:r?r.hunks:[],status:"added",binary:!!n};if(t.old_mode&&t.new_mode)return{newPath:e.file_name,oldPath:e.file_name,oldMode:t.old_mode,newMode:t.new_mode,hunks:r?r.hunks:[],status:"modified",binary:!!n};throw new Error("file modes missing")}function St(e,t,r){return(t=t||{}).filePath=e,t.status="unmerged",t.binary=!!r,t}if((n=l())!==a&&Ve===e.length)return n;throw n!==a&&Ve<e.length&&ot({type:"end"}),i=Qe,s=Ze<e.length?e.charAt(Ze):null,o=Ze<e.length?st(Ze,Ze+1):st(Ze,Ze),new t(t.buildMessage(i,s),i,s,o)}}},3135:t=>{"use strict";t.exports=e},3142:e=>{var t=Array.isArray;e.exports=t},3283:(e,t,r)=>{var n=r(6027),i=r(547),s=Object.prototype,o=s.hasOwnProperty,a=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&o.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},3305:(e,t,r)=>{var n=r(4497);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3316:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),s=16-(i-n);if(n=i,s>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},3321:(e,t,r)=>{var n=r(7553),i=r(528),s=r(5962),o=r(3142),a=r(547),u=r(3410),l=Object.prototype.hasOwnProperty;function c(e){if(a(e)&&!o(e)&&!(e instanceof n)){if(e instanceof i)return e;if(l.call(e,"__wrapped__"))return u(e)}return new i(e)}c.prototype=s.prototype,c.prototype.constructor=c,e.exports=c},3410:(e,t,r)=>{var n=r(7553),i=r(528),s=r(4354);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},3417:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},3476:e=>{e.exports={}},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 s=Array(i);++n<i;)s[n]=e[n+t];return s}},3526:(e,t,r)=>{var n=r(3142),i=r(5187),s=r(6493),o=r(5243);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:s(o(e))}},3554:function(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}}()},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}},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}},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""}},4119:e=>{"use strict";e.exports=n},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}},4497:(e,t,r)=>{var n=r(4715)(Object,"create");e.exports=n},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}},4732:(e,t,r)=>{var n=r(4700);e.exports=function(e){return n(this,e).has(e)}},4759:(e,t,r)=>{var n,i=r(1950),s=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!s&&s in e}},4967:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},5071:(e,t,r)=>{var n=r(7034);e.exports=function(e){return n(this.__data__,e)>-1}},5098:(e,t,r)=>{var n=r(3305),i=r(9361),s=r(1112),o=r(5276),a=r(7452);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},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}},5187:(e,t,r)=>{var n=r(3142),i=r(1187),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\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))||o.test(e)||!s.test(e)||null!=t&&e in Object(t)}},5196:(e,t,r)=>{var n=r(6065),i=r(9071),s=n?function(e){return n.get(e)}:i;e.exports=s},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 s=arguments,o=-1,a=i(s.length-t,0),u=Array(a);++o<a;)u[o]=s[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=s[o];return l[t]=r(u),n(e,this,l)}}},5243:(e,t,r)=>{var n=r(2291);e.exports=function(e){return null==e?"":n(e)}},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)}},5650:(e,t,r)=>{var n=r(8942).Symbol;e.exports=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}},5857:(e,t,r)=>{var n=r(313);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},5962:e=>{e.exports=function(){}},6027:(e,t,r)=>{var n=r(7379),i=r(547);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},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}},6065:(e,t,r)=>{var n=r(9270),i=n&&new n;e.exports=i},6123:(e,t,r)=>{var n=r(7923);e.exports=function(e,t,r){var i=null==e?void 0:n(e,t);return void 0===i?r:i}},6171:e=>{"use strict";e.exports=s},6285:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6493:(e,t,r)=>{var n=r(6853),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,o=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(s,"$1"):r||e)}),t});e.exports=o},6648:(e,t,r)=>{var n=r(7553),i=r(5196),s=r(961),o=r(3321);e.exports=function(e){var t=s(e),r=o[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var a=i(r);return!!a&&e===a[0]}},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}},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)}},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}},7125:e=>{"use strict";e.exports=t},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]}},7250:e=>{e.exports=function(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}},7330:(e,t,r)=>{var n=r(3063);e.exports={parse:function(e){return n.parse(e.toString())}}},7379:(e,t,r)=>{var n=r(5650),i=r(8870),s=r(9005),o=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?i(e):s(e)}},7403:(e,t,r)=>{var n=r(2619),i=r(2532),s=r(2053),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;e.exports=o},7434:e=>{"use strict";e.exports=i},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}},7553:(e,t,r)=>{var n=r(9747),i=r(5962);function s(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}s.prototype=n(i.prototype),s.prototype.constructor=s,e.exports=s},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}},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}},7923:(e,t,r)=>{var n=r(3526),i=r(6040);e.exports=function(e,t){for(var r=0,s=(t=n(t,e)).length;null!=e&&r<s;)e=e[i(t[r++])];return r&&r==s?e:void 0}},8110:e=>{"use strict";e.exports=r},8250:(e,t,r)=>{var n=r(9753),i=r(5681),s=r(88),o=r(4732),a=r(9068);function u(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])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=o,u.prototype.set=a,e.exports=u},8870:(e,t,r)=>{var n=r(5650),i=Object.prototype,s=i.hasOwnProperty,o=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=s.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=o.call(e);return n&&(t?e[a]=r:delete e[a]),i}},8928:(e,t,r)=>{var n=r(9986);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),m(function(e){return e.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(a).split("\\.").join(u)}(e),!0).map(c)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",u="\0PERIOD"+Math.random()+"\0";function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(e){return e.split(i).join("\\").split(s).join("{").split(o).join("}").split(a).join(",").split(u).join(".")}function h(e){if(!e)return[""];var t=[],r=n("{","}",e);if(!r)return e.split(",");var i=r.pre,s=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var u=h(o);return o.length&&(a[a.length-1]+=u.shift(),a.push.apply(a,u)),t.push.apply(t,a),t}function p(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function d(e,t){return e<=t}function g(e,t){return e>=t}function m(e,t){var r=[],i=n("{","}",e);if(!i)return[e];var s=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var u=0;u<a.length;u++){var c=s+"{"+i.body+"}"+a[u];r.push(c)}else{var b,v,y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),w=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=y||w,_=i.body.indexOf(",")>=0;if(!x&&!_)return i.post.match(/,(?!,).*\}/)?m(e=i.pre+"{"+i.body+o+i.post):[e];if(x)b=i.body.split(/\.\./);else if(1===(b=h(i.body)).length&&1===(b=m(b[0],!1).map(p)).length)return a.map(function(e){return i.pre+b[0]+e});if(x){var P=l(b[0]),k=l(b[1]),S=Math.max(b[0].length,b[1].length),O=3==b.length?Math.abs(l(b[2])):1,C=d;k<P&&(O*=-1,C=g);var A=b.some(f);v=[];for(var R=P;C(R,k);R+=O){var j;if(w)"\\"===(j=String.fromCharCode(R))&&(j="");else if(j=String(R),A){var E=S-j.length;if(E>0){var F=new Array(E+1).join("0");j=R<0?"-"+F+j.slice(1):F+j}}v.push(j)}}else{v=[];for(var L=0;L<b.length;L++)v.push.apply(v,m(b[L],!1))}for(L=0;L<v.length;L++)for(u=0;u<a.length;u++)c=s+v[L]+a[u],(!t||x||c)&&r.push(c)}return r}},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)}},8942:(e,t,r)=>{var n=r(4967),i="object"==typeof self&&self&&self.Object===Object&&self,s=n||i||Function("return this")();e.exports=s},9005:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(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],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},9067:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===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}},9071:e=>{e.exports=function(){}},9270:(e,t,r)=>{var n=r(4715)(r(8942),"WeakMap");e.exports=n},9361:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},9454:e=>{e.exports=function(e){return e!=e}},9624:(e,t,r)=>{var n=r(3655),i=r(4759),s=r(1580),o=r(4066),a=/^\[object .+?Constructor\]$/,u=Function.prototype,l=Object.prototype,c=u.toString,h=l.hasOwnProperty,p=RegExp("^"+c.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!s(e)||i(e))&&(n(e)?p:a).test(o(e))}},9747:(e,t,r)=>{var n=r(1580),i=Object.create,s=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=s},9753:(e,t,r)=>{var n=r(5098),i=r(1386),s=r(9770);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(s||i),string:new n}}},9770:(e,t,r)=>{var n=r(4715)(r(8942),"Map");e.exports=n},9942:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(s===a-1||1===o);else if(s!==a-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),s=a,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,s=a,o=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(n=o+"/"+n,i=47===o.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var s=e.length,o=s-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var u=r.length-a,l=o<u?o:u,c=-1,h=0;h<=l;++h){if(h===l){if(u>l){if(47===r.charCodeAt(a+h))return r.slice(a+h+1);if(0===h)return r.slice(a+h)}else o>l&&(47===e.charCodeAt(i+h)?c=h:0===h&&(c=0));break}var p=e.charCodeAt(i+h);if(p!==r.charCodeAt(a+h))break;47===p&&(c=h)}var f="";for(h=i+c+1;h<=s;++h)h!==s&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+c):(a+=c,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,s=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!o){i=n+1;break}}else-1===u&&(o=!1,u=n+1),a>=0&&(l===r.charCodeAt(a)?-1===--a&&(s=n):(a=-1,s=u))}return i===s?s=u:-1===s&&(s=e.length),e.slice(i,s)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else-1===s&&(o=!1,s=n+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var u=e.charCodeAt(a);if(47!==u)-1===i&&(s=!1,i=a+1),46===u?-1===r?r=a:1!==o&&(o=1):-1!==r&&(o=-1);else if(!s){n=a+1;break}}return-1===r||-1===i||0===o||1===o&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),s=47===i;s?(r.root="/",n=1):n=0;for(var o=-1,a=0,u=-1,l=!0,c=e.length-1,h=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===o?o=c:1!==h&&(h=1):-1!==o&&(h=-1);else if(!l){a=c+1;break}return-1===o||-1===u||0===h||1===h&&o===u-1&&o===a+1?-1!==u&&(r.base=r.name=0===a&&s?e.slice(1,u):e.slice(a,u)):(0===a&&s?(r.name=e.slice(1,o),r.base=e.slice(1,u)):(r.name=e.slice(a,o),r.base=e.slice(a,u)),r.ext=e.slice(o,u)),a>0?r.dir=e.slice(0,a-1):s&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},9986:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=r(e,i)),t instanceof RegExp&&(t=r(t,i));var s=n(e,t,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+e.length,s[1]),post:i.slice(s[1]+t.length)}}function r(e,t){var r=t.match(e);return r?r[0]:null}function n(e,t,r){var n,i,s,o,a,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){if(e===t)return[u,l];for(n=[],s=r.length;c>=0&&!a;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?a=[n.pop(),l]:((i=n.pop())<s&&(s=i,o=l),l=r.indexOf(t,c+1)),c=u<l&&u>=0?u:l;n.length&&(a=[s,o])}return a}e.exports=t,t.range=n}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return o[e].call(r.exports,r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l={};return(()=>{"use strict";u.d(l,{DecapCmsBackendBitbucket:()=>dt});var e,t,r=u(3554),n=u.n(r),i=u(959),s=u.n(i),o=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}}(),a=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),c=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 o(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(a,e.apply(void 0,[t].concat(n)))}},{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 h=c;var p={separator:"",conjunction:"",serial:!1};const f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,s=e.conjunction,o=e.serial,a=r.match(/(\n?[^\S\n]+)$/);if(t=a?t.join(i+a[1]):t.join(i+" "),s&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(o?i:"")+" "+s+t.slice(u+1)}}return t}}},d=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)}}},g=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 h(f({separator:","}),d,g),new h(f({separator:",",conjunction:"and"}),d,g),new h(f({separator:",",conjunction:"or"}),d,g);const m=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 b=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new h(m("\n"),function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(b):b(e)?e:""}}},f,d,g);const v=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 h(m("\n"),f,d,g,v(/&/g,"&"),v(/</g,"<"),v(/>/g,">"),v(/"/g,"""),v(/'/g,"'"),v(/`/g,"`"));const y=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)}}},w=new h(y(/(?:\n(?:\s*))+/g," "),g);new h(y(/(?:\n\s*)/g,""),g),new h(f({separator:","}),y(/(?:\s+)/g," "),g),new h(f({separator:",",conjunction:"or"}),y(/(?:\s+)/g," "),g),new h(f({separator:",",conjunction:"and"}),y(/(?:\s+)/g," "),g),new h(f,d,g),new h(f,y(/(?:\s+)/g," "),g);const x=new h(d,g);new h(d("all"),g);var _=u(3135),P=u(7125);function k(){return k=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},k.apply(null,arguments)}var S=u(8110),O={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 C(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var A=/[A-Z]|^ms/g,R=/_EMO_([^_]+?)_([^]*?)_EMO_/g,j=function(e){return 45===e.charCodeAt(1)},E=function(e){return null!=e&&"boolean"!=typeof e},F=C(function(e){return j(e)?e:e.replace(A,"-$&").toLowerCase()}),L=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(R,function(e,t,r){return T={name:t,styles:r,next:T},t})}return 1===O[e]||j(e)||"number"!=typeof t||0===t?t:t+"px"};function q(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 T={name:i.name,styles:i.styles,next:T},i.name;var s=r;if(void 0!==s.styles){var o=s.next;if(void 0!==o)for(;void 0!==o;)T={name:o.name,styles:o.styles,next:T},o=o.next;return s.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=q(e,t,r[i])+";";else for(var s in r){var o=r[s];if("object"!=typeof o){var a=o;null!=t&&void 0!==t[a]?n+=s+"{"+t[a]+"}":E(a)&&(n+=F(s)+":"+L(s,a)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var u=q(e,t,o);switch(s){case"animation":case"animationName":n+=F(s)+":"+u+";";break;default:n+=s+"{"+u+"}"}}else for(var l=0;l<o.length;l++)E(o[l])&&(n+=F(s)+":"+L(s,o[l])+";")}return n}(e,t,r);case"function":if(void 0!==e){var a=T,u=r(e);return T=a,q(e,t,u)}}var l=r;if(null==t)return l;var c=t[l];return void 0!==c?c:l}var T,M=/label:\s*([^\s;{]+)\s*(;|$)/g,U=u(4119),$=u.n(U),B=!!U.useInsertionEffect&&U.useInsertionEffect,N=B||function(e){return e()};B||U.useLayoutEffect;var D=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},I=/^((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|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)-.*))$/,W=C(function(e){return I.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),z=function(e){return"theme"!==e},H=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?W:z},G=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},J=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return D(t,r,n),N(function(){return function(e,t,r){D(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)}}(t,r,n)}),null},K=function e(t,r){var n,i,s=t.__emotion_real===t,o=s&&t.__emotion_base||t;void 0!==r&&(n=r.label,i=r.target);var a=G(t,r,s),u=a||H(o),l=!u("as");return function(){var c=arguments,h=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&h.push("label:"+n+";"),null==c[0]||void 0===c[0].raw)h.push.apply(h,c);else{var p=c[0];h.push(p[0]);for(var f=c.length,d=1;d<f;d++)h.push(c[d],p[d])}var g=(0,S.withEmotionCache)(function(e,t,r){var n,s,c,p,f=l&&e.as||o,d="",g=[],m=e;if(null==e.theme){for(var b in m={},e)m[b]=e[b];m.theme=U.useContext(S.ThemeContext)}"string"==typeof e.className?(n=t.registered,s=g,c=e.className,p="",c.split(" ").forEach(function(e){void 0!==n[e]?s.push(n[e]+";"):e&&(p+=e+" ")}),d=p):null!=e.className&&(d=e.className+" ");var v=function(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="";T=void 0;var s=e[0];null==s||void 0===s.raw?(n=!1,i+=q(r,t,s)):i+=s[0];for(var o=1;o<e.length;o++)i+=q(r,t,e[o]),n&&(i+=s[o]);M.lastIndex=0;for(var a,u="";null!==(a=M.exec(i));)u+="-"+a[1];var l=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)+u;return{name:l,styles:i,next:T}}(h.concat(g),t.registered,m);d+=t.key+"-"+v.name,void 0!==i&&(d+=" "+i);var y=l&&void 0===a?H(f):u,w={};for(var x in e)l&&"as"===x||y(x)&&(w[x]=e[x]);return w.className=d,r&&(w.ref=r),U.createElement(U.Fragment,null,U.createElement(J,{cache:t,serialized:v,isStringTag:"string"==typeof f}),U.createElement(f,w))});return g.displayName=void 0!==n?n:"Styled("+("string"==typeof o?o:o.displayName||o.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=o,g.__emotion_styles=h,g.__emotion_forwardProp=a,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(t,n){return e(t,k({},r,n,{shouldForwardProp:G(g,n,!0)})).apply(void 0,h)},g}},Y=u(7434),V=u.n(Y),X=u(6171);function Z(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Q=K(X.Icon,{target:"e15sc0jo0",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"});class ee extends $().Component{constructor(...e){super(...e),Z(this,"state",{}),Z(this,"handleLogin",e=>{e.preventDefault(),this.auth.authenticate(this.authSettings,(e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)})})}componentDidMount(){V().checkPropTypes(ee.propTypes,this.props,"prop","BitbucketAuthenticationPage");const{auth_type:e=""}=this.props.config.backend;if("implicit"===e){const{base_url:e="https://bitbucket.org",auth_endpoint:t="site/oauth2/authorize",app_id:r=""}=this.props.config.backend;this.auth=new P.ImplicitAuthenticator({base_url:e,auth_endpoint:t,app_id:r,clearHash:this.props.clearHash}),this.auth.completeAuth((e,t)=>{e?this.setState({loginError:e.toString()}):this.props.onLogin(t)}),this.authSettings={scope:"repository:write"}}else this.auth=new P.NetlifyAuthenticator({base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint}),this.authSettings={provider:"bitbucket",scope:"repo"}}render(){const{inProgress:e,config:t,t:r}=this.props;return(0,S.jsx)(X.AuthenticationPage,{onLogin:this.handleLogin,loginDisabled:e,loginErrorMessage:this.state.loginError,logoUrl:t.logo_url,siteUrl:t.site_url,renderButtonContent:()=>(0,S.jsx)($().Fragment,null,(0,S.jsx)(Q,{type:"bitbucket"}),r(e?"auth.loggingIn":"auth.loginWithBitbucket")),t:r})}}Z(ee,"propTypes",{onLogin:V().func.isRequired,inProgress:V().bool,base_url:V().string,siteId:V().string,authEndpoint:V().string,config:V().object.isRequired,clearHash:V().func,t:V().func.isRequired});var te=u(2879),re=u.n(te),ne=u(6123),ie=u.n(ne),se=u(9942),oe=u(7330);function ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ue(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var le=function(e){return e.MERGED="MERGED",e.SUPERSEDED="SUPERSEDED",e.OPEN="OPEN",e.DECLINED="DECLINED",e}(le||{}),ce=function(e){return e.Successful="SUCCESSFUL",e.Failed="FAILED",e.InProgress="INPROGRESS",e.Stopped="STOPPED",e}(ce||{});const he="Bitbucket",pe="application/json; charset=utf-8";function fe(e){return e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),{size:0,values:[]}):Promise.reject(e)}class de{constructor(e){ue(this,"apiRoot",void 0),ue(this,"branch",void 0),ue(this,"repo",void 0),ue(this,"requestFunction",void 0),ue(this,"repoURL",void 0),ue(this,"commitAuthor",void 0),ue(this,"mergeStrategy",void 0),ue(this,"initialWorkflowStatus",void 0),ue(this,"cmsLabelPrefix",void 0),ue(this,"buildRequest",e=>{const t=_.unsentRequest.withRoot(this.apiRoot)(e);return t.has("cache")?t:_.unsentRequest.withNoCache(t)}),ue(this,"request",e=>{try{return(0,_.requestWithBackoff)(this,e)}catch(e){throw new _.APIError(e.message,null,he)}}),ue(this,"responseToJSON",(0,_.responseParser)({format:"json",apiName:he})),ue(this,"responseToBlob",(0,_.responseParser)({format:"blob",apiName:he})),ue(this,"responseToText",(0,_.responseParser)({format:"text",apiName:he})),ue(this,"requestJSON",e=>this.request(e).then(this.responseToJSON)),ue(this,"requestText",e=>this.request(e).then(this.responseToText)),ue(this,"user",()=>this.requestJSON("/user")),ue(this,"hasWriteAccess",async()=>{const e=await this.request(this.repoURL);if(404===e.status)throw Error("Repo not found");return e.ok}),ue(this,"getBranch",async e=>await this.requestJSON(`${this.repoURL}/refs/branches/${e}`)),ue(this,"branchCommitSha",async e=>{const{target:{hash:t}}=await this.getBranch(e);return t}),ue(this,"defaultBranchCommitSha",()=>this.branchCommitSha(this.branch)),ue(this,"isFile",({type:e})=>"commit_file"===e),ue(this,"getFileId",(e,t)=>`${e}/${t}`),ue(this,"processFile",e=>function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(r),!0).forEach(function(t){ue(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ae(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({id:e.id,type:e.type,path:e.path,name:(0,_.basename)(e.path)},e.commit&&e.commit.hash?{id:this.getFileId(e.commit.hash,e.path)}:{})),ue(this,"processFiles",e=>e.filter(this.isFile).map(this.processFile)),ue(this,"readFile",async(e,t,{parseText:r=!0,branch:n=this.branch,head:i=""}={})=>await(0,_.readFile)(t,async()=>{const t=i||await this.branchCommitSha(n);return await this.request({url:`${this.repoURL}/src/${t}/${e}`,cache:"no-store"}).then(r?this.responseToText:this.responseToBlob)},_.localForage,r)),ue(this,"getEntriesAndCursor",e=>{const{size:t,page:r,pagelen:n,next:i,previous:s,values:o}=e,a=n&&t?Math.ceil(t/n):void 0;return{entries:o,cursor:_.Cursor.create({actions:[...i?["next"]:[],...s?["prev"]:[]],meta:{page:r,count:t,pageSize:n,pageCount:a},data:{links:{next:i,prev:s}}})}}),ue(this,"listFiles",async(e,t=1,r,n)=>{const i=await this.branchCommitSha(n),s=await this.requestJSON({url:`${this.repoURL}/src/${i}/${e}`,params:{max_depth:t,pagelen:r}}).catch(fe),{entries:o,cursor:a}=this.getEntriesAndCursor(s);return{entries:this.processFiles(o),cursor:a}}),ue(this,"traverseCursor",async(e,t)=>re()([this.requestJSON,(0,_.then)(this.getEntriesAndCursor),(0,_.then)(({cursor:e,entries:t})=>({cursor:e,entries:this.processFiles(t)}))])(e.data.getIn(["links",t]))),ue(this,"listAllFiles",async(e,t,r)=>{const{cursor:n,entries:i}=await this.listFiles(e,t,100,r),s=[...i];let o=n;for(;o&&o.actions.has("next");){const{cursor:e,entries:t}=await this.traverseCursor(o,"next");s.push(...t),o=e}return this.processFiles(s)}),ue(this,"deleteFiles",(e,t)=>{const r=new FormData;if(e.forEach(e=>{r.append("files",e)}),r.append("branch",this.branch),t&&r.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;r.append("author",`${e} <${t}>`)}return re()([_.unsentRequest.withMethod("POST"),_.unsentRequest.withBody(r),this.request])(`${this.repoURL}/src`)}),this.apiRoot=e.apiRoot||"https://api.bitbucket.org/2.0",this.branch=e.branch||"master",this.repo=e.repo||"",this.requestFunction=e.requestFunction||_.unsentRequest.performRequest,this.hasWriteAccess=e.hasWriteAccess||this.hasWriteAccess,this.repoURL=this.repo?`/repositories/${this.repo}`:"",this.mergeStrategy=e.squashMerges?"squash":"merge_commit",this.initialWorkflowStatus=e.initialWorkflowStatus,this.cmsLabelPrefix=e.cmsLabelPrefix}async readFileMetadata(e,t){return await(0,_.readFileMetadata)(t,async()=>{try{const{values:t}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{path:e,include:this.branch}}),r=t[0];return{author:r.author.user?r.author.user.display_name||r.author.user.nickname:r.author.raw,updatedOn:r.date}}catch(e){return{author:"",updatedOn:""}}},_.localForage)}async isShaExistsInBranch(e,t){const{values:r}=await this.requestJSON({url:`${this.repoURL}/commits`,params:{include:e,pagelen:100}}).catch(t=>(console.log(`Failed getting commits for branch '${e}'`,t),[]));return r.some(e=>e.hash===t)}async uploadFiles(e,{commitMessage:t,branch:r,parentSha:n}){const i=new FormData,s=[];e.forEach(e=>{if(e.delete)i.append("files",e.path);else if(e.newPath){const t=ie()(e,"fileObj",new Blob([e.raw]));s.push({from:e.path,to:e.newPath,contentBlob:t})}else{const t=ie()(e,"fileObj",new Blob([e.raw]));i.append(e.path,t,(0,_.basename)(e.path))}});for(const{from:e,to:t,contentBlob:o}of s){const s=(0,se.dirname)(e),a=(0,se.dirname)(t),u=n?this.branch:r,l=await this.listAllFiles(s,100,u);for(const t of l){i.append("files",t.path);const r=t.path===e?o:await this.readFile(t.path,null,{branch:u,parseText:!1});i.append(t.path.replace(s,a),r,(0,_.basename)(t.path))}}if(t&&i.append("message",t),this.commitAuthor){const{name:e,email:t}=this.commitAuthor;i.append("author",`${e} <${t}>`)}i.append("branch",r),n&&i.append("parents",n);try{await this.requestText({url:`${this.repoURL}/src`,method:"POST",body:i})}catch(e){const t=e.message||"";throw n&&t.includes("Something went wrong")&&await(0,_.throwOnConflictingBranches)(r,e=>this.getBranch(e),he),e}return e}async persistFiles(e,t,r){const n=[...e,...t];if(r.useWorkflow){const t=e[0].slug;return this.editorialWorkflowGit(n,t,r)}return this.uploadFiles(n,{commitMessage:r.commitMessage,branch:this.branch})}async addPullRequestComment(e,t){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/comments`,headers:{"Content-Type":pe},body:JSON.stringify({content:{raw:t}})})}async getPullRequestLabel(e){const t=await this.requestJSON({url:`${this.repoURL}/pullrequests/${e}/comments`,params:{pagelen:100}});return t.values.map(e=>e.content.raw)[t.values.length-1]}async createPullRequest(e,t,r){const n=await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests`,headers:{"Content-Type":pe},body:JSON.stringify({title:t,source:{branch:{name:e}},destination:{branch:{name:this.branch}},description:_.DEFAULT_PR_BODY,close_source_branch:!0})});await this.addPullRequestComment(n,(0,_.statusToLabel)(r,this.cmsLabelPrefix))}async getDifferences(e,t=this.branch){if(e===t)return[];const r=await this.requestText({url:`${this.repoURL}/diff/${e}..${t}`,params:{binary:!1}});return(0,oe.parse)(r).map(e=>{var t,r;const n=(null===(t=e.oldPath)||void 0===t?void 0:t.replace(/b\//,""))||"",i=(null===(r=e.newPath)||void 0===r?void 0:r.replace(/b\//,""))||"",s=i||n;return{oldPath:n,newPath:i,status:e.status,newFile:"added"===e.status,path:s,binary:e.binary||/.svg$/.test(s)}})}async editorialWorkflowGit(e,t,r){const n=(0,_.generateContentKey)(r.collectionName,t),i=(0,_.branchFromContentKey)(n);if(r.unpublished){const t=await this.getDifferences(i),n=[];for(const r of t.filter(e=>e.binary&&"deleted"!==e.status))e.some(e=>e.path===r.path)||n.push({path:r.path,delete:!0});await this.uploadFiles([...e,...n],{commitMessage:r.commitMessage,branch:i})}else{const t=await this.branchCommitSha(this.branch);await this.uploadFiles(e,{commitMessage:r.commitMessage,branch:i,parentSha:t}),await this.createPullRequest(i,r.commitMessage,r.status||this.initialWorkflowStatus)}}async getPullRequests(e){const t=e?`source.branch.name = "${e}"`:`source.branch.name ~ "${_.CMS_BRANCH_PREFIX}/"`,r=await this.requestJSON({url:`${this.repoURL}/pullrequests`,params:{pagelen:50,q:w`
|
|
2
2
|
source.repository.full_name = "${this.repo}"
|
|
3
|
-
AND state = "${
|
|
3
|
+
AND state = "${le.OPEN}"
|
|
4
4
|
AND destination.branch.name = "${this.branch}"
|
|
5
5
|
AND comment_count > 0
|
|
6
6
|
AND ${t}
|
|
7
|
-
`}}),n=await Promise.all(r.values.map(e=>this.getPullRequestLabel(e.id)));return r.values.filter((e,t)=>(0,_.isCMSLabel)(n[t],this.cmsLabelPrefix))}async getBranchPullRequest(e){const t=await this.getPullRequests(e);if(t.length<=0)throw new _.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async listUnpublishedBranches(){return console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),(await this.getPullRequests()).map(e=>e.source.branch.name)}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=(0,_.parseContentKey)(e),n=(0,_.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),s=await this.getDifferences(n),o=await this.getPullRequestLabel(i.id),a=(0,_.labelToStatus)(o,this.cmsLabelPrefix),u=i.updated_on,c=i.author.display_name;return{collection:t,slug:r,status:a,diffs:s.filter(e=>"deleted"!==e.status).map(e=>({path:e.path,newFile:e.newFile,id:""})),updatedAt:u,pullRequestAuthor:c}}async updateUnpublishedEntryStatus(e,t,r){const n=(0,_.generateContentKey)(e,t),i=(0,_.branchFromContentKey)(n),s=await this.getBranchPullRequest(i);await this.addPullRequestComment(s,(0,_.statusToLabel)(r,this.cmsLabelPrefix))}async mergePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/merge`,headers:{"Content-Type":pe},body:JSON.stringify({message:_.MERGE_COMMIT_MESSAGE,close_source_branch:!0,merge_strategy:this.mergeStrategy})})}async publishUnpublishedEntry(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.mergePullRequest(i)}async declinePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/decline`})}async deleteBranch(e){await this.request({method:"DELETE",url:`${this.repoURL}/refs/branches/${e}`})}async deleteUnpublishedEntry(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.declinePullRequest(i),await this.deleteBranch(n)}async getPullRequestStatuses(e){return(await this.requestJSON({url:`${this.repoURL}/pullrequests/${e.id}/statuses`,params:{pagelen:100}})).values}async getStatuses(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);return(await this.getPullRequestStatuses(i)).map(({key:e,state:t,url:r})=>({context:e,state:t===le.Successful?_.PreviewState.Success:_.PreviewState.Other,target_url:r}))}async getUnpublishedEntrySha(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r);return(await this.getBranchPullRequest(n)).destination.commit.hash}}var ge=u(9914),me=u.n(ge);const ve=["sha"];function ye(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(r),!0).forEach(function(t){xe(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function xe(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class we{constructor(e,t,r,n){this.enabled=e,this.rootURL=t,this.patterns=r,this.makeAuthorizedRequest=n}matchPath(e){return this.patterns.some(t=>me()(e,t,{matchBase:!0}))}async uploadResource(e,t){const r=await this.getResourceUploadRequests([e]);for(const e of r)await this.doUpload(e.actions.upload,t),e.actions.verify&&await this.doVerify(e.actions.verify,e);return e.sha}async doUpload(e,t){await _.unsentRequest.fetchWithTimeout(decodeURI(e.href),{method:"PUT",body:t,headers:e.header})}async doVerify(e,t){this.makeAuthorizedRequest({url:decodeURI(e.href),method:"POST",headers:be(be({},we.defaultContentHeaders),e.header),body:JSON.stringify({oid:t.oid,size:t.size})})}async getResourceUploadRequests(e){const t=await this.makeAuthorizedRequest({url:`${this.rootURL}/objects/batch`,method:"POST",headers:we.defaultContentHeaders,body:JSON.stringify({operation:"upload",transfers:["basic"],objects:e.map(e=>{let{sha:t}=e;return be(be({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,ve)),{},{oid:t})})})});return(await t.json()).objects.filter(e=>"error"in e?(console.error(e.error),!1):e.actions)}}function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(t){ke(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ke(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}xe(we,"defaultContentHeaders",{Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"});const Se="https://bitbucket.status.atlassian.com",Oe=`${Se}/api/v2/components.json`,Ce=["API","Authentication and user management","Git LFS"],{fetchWithTimeout:Ae}=_.unsentRequest,Re={BitbucketBackend:class{constructor(e,t={}){if(ke(this,"lock",void 0),ke(this,"api",void 0),ke(this,"updateUserCredentials",void 0),ke(this,"options",void 0),ke(this,"repo",void 0),ke(this,"isBranchConfigured",void 0),ke(this,"branch",void 0),ke(this,"apiRoot",void 0),ke(this,"baseUrl",void 0),ke(this,"siteId",void 0),ke(this,"token",void 0),ke(this,"mediaFolder",void 0),ke(this,"refreshToken",void 0),ke(this,"refreshedTokenPromise",void 0),ke(this,"authenticator",void 0),ke(this,"_mediaDisplayURLSem",void 0),ke(this,"squashMerges",void 0),ke(this,"cmsLabelPrefix",void 0),ke(this,"previewContext",void 0),ke(this,"largeMediaURL",void 0),ke(this,"_largeMediaClientPromise",void 0),ke(this,"authType",void 0),ke(this,"requestFunction",async e=>{const t=await this.getToken(),r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return _.unsentRequest.performRequest(r)}),ke(this,"apiRequestFunction",async e=>{const t=this.refreshedTokenPromise?await this.refreshedTokenPromise:this.token,r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e),n=await _.unsentRequest.performRequest(r);if(401===n.status){const t=await n.json().catch(()=>null);if(t&&"error"===t.type&&/^access token expired/i.test(t.error.message)){const t=await this.getRefreshedAccessToken(),r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return _.unsentRequest.performRequest(r)}}return n}),this.options=Pe({proxied:!1,API:null,updateUserCredentials:async()=>null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The BitBucket backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.updateUserCredentials=this.options.updateUserCredentials,this.repo=e.backend.repo||"",this.branch=e.backend.branch||"master",this.isBranchConfigured=!!e.backend.branch,this.apiRoot=e.backend.api_root||"https://api.bitbucket.org/2.0",this.baseUrl=e.base_url||"",this.siteId=e.site_id||"",this.largeMediaURL=e.backend.large_media_url||`https://bitbucket.org/${e.backend.repo}/info/lfs`,this.token="",this.mediaFolder=e.media_folder,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.previewContext=e.backend.preview_context||"",this.lock=(0,_.asyncLock)(),this.authType=e.backend.auth_type||""}isGitBackend(){return!0}async status(){const e=await Ae(Oe).then(e=>e.json()).then(e=>e.components.filter(e=>Ce.includes(e.name)).every(e=>"operational"===e.status)).catch(e=>(console.warn("Failed getting BitBucket status",e),!0));let t=!1;var r;return e&&(t=await(null===(r=this.api)||void 0===r?void 0:r.user().then(e=>!!e).catch(e=>(console.warn("Failed getting Bitbucket user",e),!1)))||!1),{auth:{status:t},api:{status:e,statusPage:Se}}}authComponent(){return ee}setUser(e){this.token=e.token,this.api=new de({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus})}restoreUser(e){return this.authenticate(e)}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await Ae(`${this.apiRoot}/repositories/${this.repo}`,{headers:{Authorization:`token ${this.token}`}}).then(e=>e.json()).catch(()=>null);e&&(this.branch=e.mainbranch.name)}if(this.refreshToken=e.refresh_token,this.api=new de({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus}),!await this.api.hasWriteAccess().catch(e=>{throw e.message=w`
|
|
7
|
+
`}}),n=await Promise.all(r.values.map(e=>this.getPullRequestLabel(e.id)));return r.values.filter((e,t)=>(0,_.isCMSLabel)(n[t],this.cmsLabelPrefix))}async getBranchPullRequest(e){const t=await this.getPullRequests(e);if(t.length<=0)throw new _.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}async listUnpublishedBranches(){return console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),(await this.getPullRequests()).map(e=>e.source.branch.name)}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=(0,_.parseContentKey)(e),n=(0,_.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),s=await this.getDifferences(n),o=await this.getPullRequestLabel(i.id),a=(0,_.labelToStatus)(o,this.cmsLabelPrefix),u=i.updated_on,l=i.author.display_name;return{collection:t,slug:r,status:a,diffs:s.filter(e=>"deleted"!==e.status).map(e=>({path:e.path,newFile:e.newFile,id:""})),updatedAt:u,pullRequestAuthor:l}}async updateUnpublishedEntryStatus(e,t,r){const n=(0,_.generateContentKey)(e,t),i=(0,_.branchFromContentKey)(n),s=await this.getBranchPullRequest(i);await this.addPullRequestComment(s,(0,_.statusToLabel)(r,this.cmsLabelPrefix))}async mergePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/merge`,headers:{"Content-Type":pe},body:JSON.stringify({message:_.MERGE_COMMIT_MESSAGE,close_source_branch:!0,merge_strategy:this.mergeStrategy})})}async publishUnpublishedEntry(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.mergePullRequest(i)}async declinePullRequest(e){await this.requestJSON({method:"POST",url:`${this.repoURL}/pullrequests/${e.id}/decline`})}async deleteBranch(e){await this.request({method:"DELETE",url:`${this.repoURL}/refs/branches/${e}`})}async deleteUnpublishedEntry(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);await this.declinePullRequest(i),await this.deleteBranch(n)}async getPullRequestStatuses(e){return(await this.requestJSON({url:`${this.repoURL}/pullrequests/${e.id}/statuses`,params:{pagelen:100}})).values}async getStatuses(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);return(await this.getPullRequestStatuses(i)).map(({key:e,state:t,url:r})=>({context:e,state:t===ce.Successful?_.PreviewState.Success:_.PreviewState.Other,target_url:r}))}async getUnpublishedEntrySha(e,t){const r=(0,_.generateContentKey)(e,t),n=(0,_.branchFromContentKey)(r);return(await this.getBranchPullRequest(n)).destination.commit.hash}}var ge=u(8928);const me={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},be=e=>e.replace(/[[\]\\-]/g,"\\$&"),ve=e=>e.join(""),ye=(e,t)=>{const r=t;if("["!==e.charAt(r))throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,a=!1,u=!1,l=!1,c=r,h="";e:for(;s<e.length;){const t=e.charAt(s);if("!"!==t&&"^"!==t||s!==r+1){if("]"===t&&o&&!u){c=s+1;break}if(o=!0,"\\"!==t||u){if("["===t&&!u)for(const[t,[o,u,l]]of Object.entries(me))if(e.startsWith(t,s)){if(h)return["$.",!1,e.length-r,!0];s+=t.length,l?i.push(o):n.push(o),a=a||u;continue e}u=!1,h?(t>h?n.push(be(h)+"-"+be(t)):t===h&&n.push(be(t)),h="",s++):e.startsWith("-]",s+1)?(n.push(be(t+"-")),s+=2):e.startsWith("-",s+1)?(h=t,s+=2):(n.push(be(t)),s++)}else u=!0,s++}else l=!0,s++}if(c<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,e.length-r,!0];if(0===i.length&&1===n.length&&/^\\?.$/.test(n[0])&&!l){return[(p=2===n[0].length?n[0].slice(-1):n[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,c-r,!1]}var p;const f="["+(l?"^":"")+ve(n)+"]",d="["+(l?"":"^")+ve(i)+"]";return[n.length&&i.length?"("+f+"|"+d+")":n.length?f:d,a,c-r,!0]},we=(e,t,r={})=>(Ze(t),!(!r.nocomment&&"#"===t.charAt(0))&&new tt(t,r).match(e)),xe=we,_e=/^\*+([^+@!?\*\[\(]*)$/,Pe=e=>t=>!t.startsWith(".")&&t.endsWith(e),ke=e=>t=>t.endsWith(e),Se=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Oe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Ce=/^\*+\.\*+$/,Ae=e=>!e.startsWith(".")&&e.includes("."),Re=e=>"."!==e&&".."!==e&&e.includes("."),je=/^\.\*+$/,Ee=e=>"."!==e&&".."!==e&&e.startsWith("."),Fe=/^\*+$/,Le=e=>0!==e.length&&!e.startsWith("."),qe=e=>0!==e.length&&"."!==e&&".."!==e,Te=/^\?+([^+@!?\*\[\(]*)?$/,Me=([e,t=""])=>{const r=Ne([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},Ue=([e,t=""])=>{const r=De([e]);return t?(t=t.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(t)):r},$e=([e,t=""])=>{const r=De([e]);return t?e=>r(e)&&e.endsWith(t):r},Be=([e,t=""])=>{const r=Ne([e]);return t?e=>r(e)&&e.endsWith(t):r},Ne=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")},De=([e])=>{const t=e.length;return e=>e.length===t&&"."!==e&&".."!==e},Ie="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";we.sep="win32"===Ie?"\\":"/";const We=Symbol("globstar **");we.GLOBSTAR=We;const ze={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},He="[^/]",Ge=He+"*?",Je=e=>e.split("").reduce((e,t)=>(e[t]=!0,e),{}),Ke=Je("().*{}+?[]^$\\!"),Ye=Je("[.(");we.filter=(e,t={})=>r=>we(r,e,t);const Ve=(e,t={})=>Object.assign({},e,t);we.defaults=e=>{if(!e||"object"!=typeof e||!Object.keys(e).length)return we;const t=we;return Object.assign((r,n,i={})=>t(r,n,Ve(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,r={}){super(t,Ve(e,r))}static defaults(r){return t.defaults(Ve(e,r)).Minimatch}},unescape:(r,n={})=>t.unescape(r,Ve(e,n)),escape:(r,n={})=>t.escape(r,Ve(e,n)),filter:(r,n={})=>t.filter(r,Ve(e,n)),defaults:r=>t.defaults(Ve(e,r)),makeRe:(r,n={})=>t.makeRe(r,Ve(e,n)),braceExpand:(r,n={})=>t.braceExpand(r,Ve(e,n)),match:(r,n,i={})=>t.match(r,n,Ve(e,i)),sep:t.sep,GLOBSTAR:We})};const Xe=(e,t={})=>(Ze(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:ge(e));we.braceExpand=Xe;const Ze=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};we.makeRe=(e,t={})=>new tt(e,t).makeRe(),we.match=(e,t,r={})=>{const n=new tt(t,r);return e=e.filter(e=>n.match(e)),n.options.nonull&&!e.length&&e.push(t),e};const Qe=/[?*]|[+@!]\(.*?\)|\[|\]/,et=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class tt{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Ze(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Ie,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==t.windowsNoMagicRoot?t.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const t of e)if("string"!=typeof t)return!0;return!1}debug(...e){}make(){const e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let n=this.globParts.map((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=!(""!==e[0]||""!==e[1]||"?"!==e[2]&&Qe.test(e[2])||Qe.test(e[3])),r=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(r)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,n),this.set=n.filter(e=>-1===e.indexOf(!1)),this.isWindows)for(let e=0;e<this.set.length;e++){const t=this.set[e];""===t[0]&&""===t[1]&&"?"===this.globParts[e][2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3])&&(t[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let r=0;r<e[t].length;r++)"**"===e[t][r]&&(e[t][r]="*");const{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;-1!==(t=e.indexOf("**",t+1));){let r=t;for(;"**"===e[r+1];)r++;r!==t&&e.splice(t,r-t)}return e})}levelOneOptimize(e){return e.map(e=>0===(e=e.reduce((e,t)=>{const r=e[e.length-1];return"**"===t&&"**"===r?e:".."===t&&r&&".."!==r&&"."!==r&&"**"!==r?(e.pop(),e):(e.push(t),e)},[])).length?[""]:e)}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){const n=e[r];1===r&&""===n&&""===e[0]||"."!==n&&""!==n||(t=!0,e.splice(r,1),r--)}"."!==e[0]||2!==e.length||"."!==e[1]&&""!==e[1]||(t=!0,e.pop())}let r=0;for(;-1!==(r=e.indexOf("..",r+1));){const n=e[r-1];n&&"."!==n&&".."!==n&&"**"!==n&&(t=!0,e.splice(r-1,2),r-=2)}}while(t);return 0===e.length?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let r of e){let n=-1;for(;-1!==(n=r.indexOf("**",n+1));){let i=n;for(;"**"===r[i+1];)i++;i>n&&r.splice(n+1,i-n);let s=r[n+1];const o=r[n+2],a=r[n+3];if(".."!==s)continue;if(!o||"."===o||".."===o||!a||"."===a||".."===a)continue;t=!0,r.splice(n,1);const u=r.slice(0);u[n]="**",e.push(u),n--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){const n=r[e];1===e&&""===n&&""===r[0]||"."!==n&&""!==n||(t=!0,r.splice(e,1),e--)}"."!==r[0]||2!==r.length||"."!==r[1]&&""!==r[1]||(t=!0,r.pop())}let i=0;for(;-1!==(i=r.indexOf("..",i+1));){const e=r[i-1];if(e&&"."!==e&&".."!==e&&"**"!==e){t=!0;const e=1===i&&"**"===r[i+1]?["."]:[];r.splice(i-1,2,...e),0===r.length&&r.push(""),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let r=t+1;r<e.length;r++){const n=this.partsMatch(e[t],e[r],!this.preserveMultipleSlashes);n&&(e[t]=n,e[r]=[])}return e.filter(e=>e.length)}partsMatch(e,t,r=!1){let n=0,i=0,s=[],o="";for(;n<e.length&&i<t.length;)if(e[n]===t[i])s.push("b"===o?t[i]:e[n]),n++,i++;else if(r&&"**"===e[n]&&t[i]===e[n+1])s.push(e[n]),n++;else if(r&&"**"===t[i]&&e[n]===t[i+1])s.push(t[i]),i++;else if("*"!==e[n]||!t[i]||!this.options.dot&&t[i].startsWith(".")||"**"===t[i]){if("*"!==t[i]||!e[n]||!this.options.dot&&e[n].startsWith(".")||"**"===e[n])return!1;if("a"===o)return!1;o="b",s.push(t[i]),n++,i++}else{if("b"===o)return!1;o="a",s.push(e[n]),n++,i++}return e.length===t.length&&s}parseNegate(){if(this.nonegate)return;const e=this.pattern;let t=!1,r=0;for(let n=0;n<e.length&&"!"===e.charAt(n);n++)t=!t,r++;r&&(this.pattern=e.slice(r)),this.negate=t}matchOne(e,t,r=!1){const n=this.options;if(this.isWindows){const r=""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3]),n=""===t[0]&&""===t[1]&&"?"===t[2]&&"string"==typeof t[3]&&/^[a-z]:$/i.test(t[3]);if(r&&n){const r=e[3],n=t[3];r.toLowerCase()===n.toLowerCase()&&(e[3]=n)}else if(n&&"string"==typeof e[0]){const r=t[3],n=e[0];r.toLowerCase()===n.toLowerCase()&&(t[3]=n,t=t.slice(3))}else if(r&&"string"==typeof t[0]){const r=e[3];r.toLowerCase()===t[0].toLowerCase()&&(t[0]=r,e=e.slice(3))}}const{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var s=0,o=0,a=e.length,u=t.length;s<a&&o<u;s++,o++){this.debug("matchOne loop");var l=t[o],c=e[s];if(this.debug(t,l,c),!1===l)return!1;if(l===We){this.debug("GLOBSTAR",[t,l,c]);var h=s,p=o+1;if(p===u){for(this.debug("** at the end");s<a;s++)if("."===e[s]||".."===e[s]||!n.dot&&"."===e[s].charAt(0))return!1;return!0}for(;h<a;){var f=e[h];if(this.debug("\nglobstar while",e,h,t,p,f),this.matchOne(e.slice(h),t.slice(p),r))return this.debug("globstar found match!",h,a,f),!0;if("."===f||".."===f||!n.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,h,t,p);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!r||(this.debug("\n>>> no match, partial?",e,h,t,p),h!==a))}let i;if("string"==typeof l?(i=c===l,this.debug("string match",l,c,i)):(i=l.test(c),this.debug("pattern match",l,c,i)),!i)return!1}if(s===a&&o===u)return!0;if(s===a)return r;if(o===u)return s===a-1&&""===e[s];throw new Error("wtf?")}braceExpand(){return Xe(this.pattern,this.options)}parse(e){Ze(e);const t=this.options;if("**"===e)return We;if(""===e)return"";let r,n=null;(r=e.match(Fe))?n=t.dot?qe:Le:(r=e.match(_e))?n=(t.nocase?t.dot?Oe:Se:t.dot?ke:Pe)(r[1]):(r=e.match(Te))?n=(t.nocase?t.dot?Ue:Me:t.dot?$e:Be)(r):(r=e.match(Ce))?n=t.dot?Re:Ae:(r=e.match(je))&&(n=Ee);let i="",s=!1,o=!1;const a=[],u=[];let l,c=!1,h=!1,p="."===e.charAt(0),f=t.dot||p;const d=e=>"."===e.charAt(0)?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=()=>{if(c){switch(c){case"*":i+=Ge,s=!0;break;case"?":i+=He,s=!0;break;default:i+="\\"+c}this.debug("clearStateChar %j %j",c,i),c=!1}};for(let r,n=0;n<e.length&&(r=e.charAt(n));n++)if(this.debug("%s\t%s %s %j",e,n,i,r),o){if("/"===r)return!1;Ke[r]&&(i+="\\"),i+=r,o=!1}else switch(r){case"/":return!1;case"\\":g(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",e,n,i,r),this.debug("call clearStateChar %j",c),g(),c=r,t.noext&&g();continue;case"(":{if(!c){i+="\\(";continue}const t={type:c,start:n-1,reStart:i.length,open:ze[c].open,close:ze[c].close};this.debug(this.pattern,"\t",t),a.push(t),i+=t.open,0===t.start&&"!"!==t.type&&(p=!0,i+=d(e.slice(n+1))),this.debug("plType %j %j",c,i),c=!1;continue}case")":{const e=a[a.length-1];if(!e){i+="\\)";continue}a.pop(),g(),s=!0,l=e,i+=l.close,"!"===l.type&&u.push(Object.assign(l,{reEnd:i.length}));continue}case"|":{const t=a[a.length-1];if(!t){i+="\\|";continue}g(),i+="|",0===t.start&&"!"!==t.type&&(p=!0,i+=d(e.slice(n+1)));continue}case"[":g();const[f,m,b,v]=ye(e,n);b?(i+=f,h=h||m,n+=b-1,s=s||v):i+="\\[";continue;case"]":i+="\\"+r;continue;default:g(),i+=et(r)}for(l=a.pop();l;l=a.pop()){let e;e=i.slice(l.reStart+l.open.length),this.debug(this.pattern,"setting tail",i,l),e=e.replace(/((?:\\{2}){0,64})(\\?)\|/g,(e,t,r)=>(r||(r="\\"),t+t+r+"|")),this.debug("tail=%j\n %s",e,e,l,i);const t="*"===l.type?Ge:"?"===l.type?He:"\\"+l.type;s=!0,i=i.slice(0,l.reStart)+t+"\\("+e}g(),o&&(i+="\\\\");const m=Ye[i.charAt(0)];for(let e=u.length-1;e>-1;e--){const t=u[e],r=i.slice(0,t.reStart),n=i.slice(t.reStart,t.reEnd-8);let s=i.slice(t.reEnd);const o=i.slice(t.reEnd-8,t.reEnd)+s,a=r.split(")").length,l=r.split("(").length-a;let c=s;for(let e=0;e<l;e++)c=c.replace(/\)[+*?]?/,"");s=c,i=r+n+s+(""===s?"(?:$|\\/)":"")+o}if(""!==i&&s&&(i="(?=.)"+i),m&&(i=(p?"":f?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)")+i),!t.nocase||s||t.nocaseMagicOnly||(s=e.toUpperCase()!==e.toLowerCase()),!s)return i.replace(/\\(.)/g,"$1");const b=(t.nocase?"i":"")+(h?"u":"");try{const t=n?{_glob:e,_src:i,test:n}:{_glob:e,_src:i};return Object.assign(new RegExp("^"+i+"$",b),t)}catch(e){return this.debug("invalid regexp",e),new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const t=this.options,r=t.noglobstar?Ge:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"";let i=e.map(e=>{const t=e.map(e=>"string"==typeof e?et(e):e===We?We:e._src);return t.forEach((e,n)=>{const i=t[n+1],s=t[n-1];e===We&&s!==We&&(void 0===s?void 0!==i&&i!==We?t[n+1]="(?:\\/|"+r+"\\/)?"+i:t[n]=r:void 0===i?t[n-1]=s+"(?:\\/|"+r+")?":i!==We&&(t[n-1]=s+"(?:\\/|\\/"+r+"\\/)"+i,t[n+1]=We))}),t.filter(e=>e!==We).join("/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(e){this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;const r=this.options;this.isWindows&&(e=e.split("\\").join("/"));const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const i=this.set;this.debug(this.pattern,"set",i);let s=n[n.length-1];if(!s)for(let e=n.length-2;!s&&e>=0;e--)s=n[e];for(let e=0;e<i.length;e++){const o=i[e];let a=n;if(r.matchBase&&1===o.length&&(a=[s]),this.matchOne(a,o,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(e){return we.defaults(e).Minimatch}}we.Minimatch=tt,we.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),we.unescape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const rt=["sha"];function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach(function(t){st(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function st(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class ot{constructor(e,t,r,n){this.enabled=e,this.rootURL=t,this.patterns=r,this.makeAuthorizedRequest=n}matchPath(e){return this.patterns.some(t=>xe(e,t,{matchBase:!0}))}async uploadResource(e,t){const r=await this.getResourceUploadRequests([e]);for(const e of r)await this.doUpload(e.actions.upload,t),e.actions.verify&&await this.doVerify(e.actions.verify,e);return e.sha}async doUpload(e,t){await _.unsentRequest.fetchWithTimeout(decodeURI(e.href),{method:"PUT",body:t,headers:e.header})}async doVerify(e,t){this.makeAuthorizedRequest({url:decodeURI(e.href),method:"POST",headers:it(it({},ot.defaultContentHeaders),e.header),body:JSON.stringify({oid:t.oid,size:t.size})})}async getResourceUploadRequests(e){const t=await this.makeAuthorizedRequest({url:`${this.rootURL}/objects/batch`,method:"POST",headers:ot.defaultContentHeaders,body:JSON.stringify({operation:"upload",transfers:["basic"],objects:e.map(e=>{let{sha:t}=e;return it(it({},function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,rt)),{},{oid:t})})})});return(await t.json()).objects.filter(e=>"error"in e?(console.error(e.error),!1):e.actions)}}function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach(function(t){lt(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function lt(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}st(ot,"defaultContentHeaders",{Accept:"application/vnd.git-lfs+json","Content-Type":"application/vnd.git-lfs+json"});const ct="https://bitbucket.status.atlassian.com",ht=`${ct}/api/v2/components.json`,pt=["API","Authentication and user management","Git LFS"],{fetchWithTimeout:ft}=_.unsentRequest,dt={BitbucketBackend:class{constructor(e,t={}){if(lt(this,"lock",void 0),lt(this,"api",void 0),lt(this,"updateUserCredentials",void 0),lt(this,"options",void 0),lt(this,"repo",void 0),lt(this,"isBranchConfigured",void 0),lt(this,"branch",void 0),lt(this,"apiRoot",void 0),lt(this,"baseUrl",void 0),lt(this,"siteId",void 0),lt(this,"token",void 0),lt(this,"mediaFolder",void 0),lt(this,"refreshToken",void 0),lt(this,"refreshedTokenPromise",void 0),lt(this,"authenticator",void 0),lt(this,"_mediaDisplayURLSem",void 0),lt(this,"squashMerges",void 0),lt(this,"cmsLabelPrefix",void 0),lt(this,"previewContext",void 0),lt(this,"largeMediaURL",void 0),lt(this,"_largeMediaClientPromise",void 0),lt(this,"authType",void 0),lt(this,"requestFunction",async e=>{const t=await this.getToken(),r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return _.unsentRequest.performRequest(r)}),lt(this,"apiRequestFunction",async e=>{const t=this.refreshedTokenPromise?await this.refreshedTokenPromise:this.token,r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e),n=await _.unsentRequest.performRequest(r);if(401===n.status){const t=await n.json().catch(()=>null);if(t&&"error"===t.type&&/^access token expired/i.test(t.error.message)){const t=await this.getRefreshedAccessToken(),r=_.unsentRequest.withHeaders({Authorization:`Bearer ${t}`},e);return _.unsentRequest.performRequest(r)}}return n}),this.options=ut({proxied:!1,API:null,updateUserCredentials:async()=>null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The BitBucket backend needs a "repo" in the backend configuration.');this.api=this.options.API||null,this.updateUserCredentials=this.options.updateUserCredentials,this.repo=e.backend.repo||"",this.branch=e.backend.branch||"master",this.isBranchConfigured=!!e.backend.branch,this.apiRoot=e.backend.api_root||"https://api.bitbucket.org/2.0",this.baseUrl=e.base_url||"",this.siteId=e.site_id||"",this.largeMediaURL=e.backend.large_media_url||`https://bitbucket.org/${e.backend.repo}/info/lfs`,this.token="",this.mediaFolder=e.media_folder,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.previewContext=e.backend.preview_context||"",this.lock=(0,_.asyncLock)(),this.authType=e.backend.auth_type||""}isGitBackend(){return!0}async status(){const e=await ft(ht).then(e=>e.json()).then(e=>e.components.filter(e=>pt.includes(e.name)).every(e=>"operational"===e.status)).catch(e=>(console.warn("Failed getting BitBucket status",e),!0));let t=!1;var r;return e&&(t=await(null===(r=this.api)||void 0===r?void 0:r.user().then(e=>!!e).catch(e=>(console.warn("Failed getting Bitbucket user",e),!1)))||!1),{auth:{status:t},api:{status:e,statusPage:ct}}}authComponent(){return ee}setUser(e){this.token=e.token,this.api=new de({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus})}restoreUser(e){return this.authenticate(e)}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await ft(`${this.apiRoot}/repositories/${this.repo}`,{headers:{Authorization:`token ${this.token}`}}).then(e=>e.json()).catch(()=>null);e&&(this.branch=e.mainbranch.name)}if(this.refreshToken=e.refresh_token,this.api=new de({requestFunction:this.apiRequestFunction,branch:this.branch,repo:this.repo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,initialWorkflowStatus:this.options.initialWorkflowStatus}),!await this.api.hasWriteAccess().catch(e=>{throw e.message=x`
|
|
8
8
|
Repo "${this.repo}" not found.
|
|
9
9
|
|
|
10
10
|
Please ensure the repo information is spelled correctly.
|
|
11
11
|
|
|
12
12
|
If the repo is private, make sure you're logged into a Bitbucket account with access.
|
|
13
|
-
`,e}))throw new Error("Your BitBucket user account does not have access to this repo.");const t=await this.api.user();return
|
|
13
|
+
`,e}))throw new Error("Your BitBucket user account does not have access to this repo.");const t=await this.api.user();return ut(ut({},t),{},{name:t.display_name,login:t.username,token:e.token,avatar_url:t.links.avatar.href,refresh_token:e.refresh_token})}getRefreshedAccessToken(){if("implicit"===this.authType)throw new _.AccessTokenError("Can't refresh access token when using implicit auth");if(this.refreshedTokenPromise)return this.refreshedTokenPromise;if(!this.authenticator){const e={base_url:this.baseUrl,site_id:this.siteId};this.authenticator=new P.NetlifyAuthenticator(e)}return this.refreshedTokenPromise=this.authenticator.refresh({provider:"bitbucket",refresh_token:this.refreshToken}).then(({token:e,refresh_token:t})=>(this.token=e,this.refreshToken=t,this.refreshedTokenPromise=void 0,this.updateUserCredentials({token:e,refresh_token:t}),e)),this.refreshedTokenPromise}logout(){this.token=null}getToken(){return this.refreshedTokenPromise?this.refreshedTokenPromise:Promise.resolve(this.token)}async entriesByFolder(e,t,r){let n;const i=await this.api.defaultBranchCommitSha(),s=await(0,_.entriesByFolder)(()=>this.api.listFiles(e,r,20,this.branch).then(({entries:e,cursor:r})=>(n=r.mergeMeta({extension:t}),e.filter(e=>(0,_.filterByExtension)(e,t)))),(e,t)=>this.api.readFile(e,t,{head:i}),this.api.readFileMetadata.bind(this.api),he);return s[_.CURSOR_COMPATIBILITY_SYMBOL]=n,s}async listAllFiles(e,t,r){return(await this.api.listAllFiles(e,r,this.branch)).filter(e=>(0,_.filterByExtension)(e,t))}async allEntriesByFolder(e,t,r){const n=await this.api.defaultBranchCommitSha();return await(0,_.allEntriesByFolder)({listAllFiles:()=>this.listAllFiles(e,t,r),readFile:(e,t)=>this.api.readFile(e,t,{head:n}),readFileMetadata:this.api.readFileMetadata.bind(this.api),apiName:he,branch:this.branch,localForage:_.localForage,folder:e,extension:t,depth:r,getDefaultBranch:()=>Promise.resolve({name:this.branch,sha:n}),isShaExistsInBranch:this.api.isShaExistsInBranch.bind(this.api),getDifferences:(e,t)=>this.api.getDifferences(e,t),getFileId:e=>Promise.resolve(this.api.getFileId(n,e)),filterFile:e=>(0,_.filterByExtension)(e,t)})}async entriesByFiles(e){const t=await this.api.defaultBranchCommitSha();return(0,_.entriesByFiles)(e,(e,r)=>this.api.readFile(e,r,{head:t}),this.api.readFileMetadata.bind(this.api),he)}getEntry(e){return this.api.readFile(e).then(t=>({file:{path:e,id:null},data:t}))}getMedia(e=this.mediaFolder){return this.api.listAllFiles(e,1,this.branch).then(e=>e.map(({id:e,name:t,path:r})=>({id:e,name:t,path:r,displayURL:{id:e,path:r}})))}getLargeMediaClient(){return this._largeMediaClientPromise||(this._largeMediaClientPromise=(async()=>{const e=await this.api.readFile(".gitattributes").then(e=>(0,_.getLargeMediaPatternsFromGitAttributesFile)(e)).catch(e=>(404===e.status?console.log("This 404 was expected and handled appropriately."):console.error(e),[]));return new ot(!!(this.largeMediaURL&&e.length>0),this.largeMediaURL,e,this.requestFunction)})()),this._largeMediaClientPromise}getMediaDisplayURL(e){return this._mediaDisplayURLSem=this._mediaDisplayURLSem||n()(10),(0,_.getMediaDisplayURL)(e,this.api.readFile.bind(this.api),this._mediaDisplayURLSem)}async getMediaFile(e){const t=(0,_.basename)(e),r=await(0,_.getMediaAsBlob)(e,null,this.api.readFile.bind(this.api)),n=(0,_.blobToFileObj)(t,r),i=URL.createObjectURL(n);return{id:await(0,_.getBlobSHA)(n),displayURL:i,path:e,name:t,size:n.size,file:n,url:i}}async persistEntry(e,t){const r=await this.getLargeMediaClient();return(0,_.runWithLock)(this.lock,async()=>this.api.persistFiles(e.dataFiles,r.enabled?await(0,_.getLargeMediaFilteredMediaFiles)(r,e.assets):e.assets,t),"Failed to acquire persist entry lock")}async persistMedia(e,t){const{fileObj:r,path:n}=e,i=r?URL.createObjectURL(r):"",s=await this.getLargeMediaClient(),o=n.startsWith("/")?n.slice(1):n;if(!s.enabled||!s.matchPath(o))return this._persistMedia(e,t);const a=await(0,_.getPointerFileForMediaFileObj)(s,r,n);return ut(ut({},await this._persistMedia(a,t)),{},{displayURL:i})}async _persistMedia(e,t){const r=e.fileObj,[n]=await Promise.all([(0,_.getBlobSHA)(r),this.api.persistFiles([],[e],t)]),i=URL.createObjectURL(r);return{displayURL:i,path:s()(e.path,"/k"),name:r.name,size:r.size,id:n,file:r,url:i}}deleteFiles(e,t){return this.api.deleteFiles(e,t)}traverseCursor(e,t){return this.api.traverseCursor(e,t).then(async({entries:t,cursor:r})=>{var n;const i=null===(n=e.meta)||void 0===n?void 0:n.get("extension");i&&(t=t.filter(e=>(0,_.filterByExtension)(e,i)),r=r.mergeMeta({extension:i}));const s=await this.api.defaultBranchCommitSha();return{entries:await(0,_.entriesByFiles)(t,(e,t)=>this.api.readFile(e,t,{head:s}),this.api.readFileMetadata.bind(this.api),he),cursor:r}})}async loadMediaFile(e,t,{branch:r}){const n=await(0,_.getMediaAsBlob)(e,t,async(e,t,{parseText:n})=>await this.api.readFile(e,t,{branch:r,parseText:n})),i=(0,_.basename)(e),s=(0,_.blobToFileObj)(i,n);return{id:e,displayURL:URL.createObjectURL(s),path:e,name:i,size:s.size,file:s}}async unpublishedEntries(){return await(0,_.unpublishedEntries)(()=>this.api.listUnpublishedBranches().then(e=>e.map(e=>(0,_.contentKeyFromBranch)(e))))}async unpublishedEntry({id:e,collection:t,slug:r}){if(e)return await this.api.retrieveUnpublishedEntryData(e);if(t&&r){const e=(0,_.generateContentKey)(t,r);return await this.api.retrieveUnpublishedEntryData(e)}throw new Error("Missing unpublished entry id or collection and slug")}getBranch(e,t){const r=(0,_.generateContentKey)(e,t);return(0,_.branchFromContentKey)(r)}async unpublishedEntryDataFile(e,t,r,n){const i=this.getBranch(e,t);return await this.api.readFile(r,n,{branch:i})}async unpublishedEntryMediaFile(e,t,r,n){const i=this.getBranch(e,t);return await this.loadMediaFile(r,n,{branch:i})}async updateUnpublishedEntryStatus(e,t,r){return(0,_.runWithLock)(this.lock,()=>this.api.updateUnpublishedEntryStatus(e,t,r),"Failed to acquire update entry status lock")}async deleteUnpublishedEntry(e,t){return(0,_.runWithLock)(this.lock,()=>this.api.deleteUnpublishedEntry(e,t),"Failed to acquire delete entry lock")}async publishUnpublishedEntry(e,t){return(0,_.runWithLock)(this.lock,()=>this.api.publishUnpublishedEntry(e,t),"Failed to acquire publish entry lock")}async getDeployPreview(e,t){try{const r=await this.api.getStatuses(e,t),n=(0,_.getPreviewStatus)(r,this.previewContext);if(n){const{target_url:e,state:t}=n;return{url:e,status:t}}return null}catch(e){return null}}},API:de,AuthenticationPage:ee}})(),l.DecapCmsBackendBitbucket})());
|
|
14
14
|
//# sourceMappingURL=decap-cms-backend-bitbucket.js.map
|