diff --git a/README.md b/README.md index 0c95e1f..52cecee 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,32 @@ AI-written content with embedded images, plus the GitHub Release sidebar panel f 3. Activate the plugin. 4. Go to **Tools → Release Posts** to configure your AI provider and add repositories. +## GitHub access + +The plugin uses a GitHub Personal Access Token (PAT) to read release data. A PAT is optional for public repositories — without one, GitHub limits the plugin to 60 API requests per hour. Adding a PAT raises that to 5,000 per hour and is required to access private repositories. + +
+Create a fine-grained PAT and add it to WordPress + +A fine-grained token can be scoped to a single user or organization and to specific repositories — ideal for a "service account" that monitors a known set of releases. + +1. Go to [github.com/settings/personal-access-tokens/new](https://github.com/settings/personal-access-tokens/new). +2. **Token name** — something descriptive, e.g. `My Site — GitHub Release Posts`. +3. **Expiration** — pick a value that fits your security policy. +4. **Resource owner** — choose your user account or an organization you belong to. +5. **Repository access** — choose **Only select repositories** and pick the repos you want to monitor. (Or **All repositories** if you'd rather not maintain the list here.) +6. **Repository permissions** — set all four to **Read-only**: + - **Contents** — required for releases and commit comparisons. + - **Metadata** — required (auto-selected). + - **Issues** — used during AI prompt enrichment. + - **Pull requests** — used during AI prompt enrichment. +7. Click **Generate token** and copy the `github_pat_…` value immediately — GitHub won't show it again. +8. Provide the token to the plugin in one of two ways: + - **Environment variable or constant (recommended)** — define `GITHUB_RELEASE_POSTS_PAT` as an environment variable or as a PHP constant in `wp-config.php`. The plugin reads the constant first, then the env var, then the database. When set this way, the value never lives in the WordPress database, and the Settings field becomes read-only. + - **WordPress admin** — go to **Tools → Release Posts → Settings**, paste the token into the **Personal Access Token** field, and click **Save Settings**. + +
+ ## For developers ### Filters diff --git a/assets/js/admin/index.js b/assets/js/admin/index.js index 174f667..7083eb6 100644 --- a/assets/js/admin/index.js +++ b/assets/js/admin/index.js @@ -176,6 +176,51 @@ document.addEventListener( 'DOMContentLoaded', function () { } ); } + // ------------------------------------------------------------------------- + // Refresh accessible-repos cache. + // ------------------------------------------------------------------------- + const refreshReposBtn = document.getElementById( 'ghrp-refresh-repos' ); + if ( refreshReposBtn ) { + refreshReposBtn.addEventListener( 'click', function () { + const resultEl = document.getElementById( 'ghrp-refresh-repos-result' ); + const spinner = refreshReposBtn.parentNode.querySelector( '.ghrp-refresh-repos-spinner' ); + + if ( spinner ) { + spinner.style.display = 'inline-block'; + spinner.classList.add( 'is-active' ); + } + if ( resultEl ) { + resultEl.textContent = ''; + } + + window.ctbpFetch( + 'POST', + '/repos/refresh', + {}, + function ( data ) { + if ( spinner ) { + spinner.classList.remove( 'is-active' ); + spinner.style.display = 'none'; + } + if ( resultEl ) { + var msg = ( data && data.message ) ? data.message : 'Refreshed.'; + resultEl.innerHTML = validIcon( msg ) + ' ' + msg; + } + }, + function ( data ) { + if ( spinner ) { + spinner.classList.remove( 'is-active' ); + spinner.style.display = 'none'; + } + if ( resultEl ) { + var msg = ( data && data.message ) ? data.message : 'Failed to refresh repository list.'; + resultEl.innerHTML = warningIcon( msg ) + ' ' + msg; + } + } + ); + } ); + } + // ------------------------------------------------------------------------- // Repository inline edit — WP Quick Edit clone pattern. // ------------------------------------------------------------------------- diff --git a/dist/js/admin.asset.php b/dist/js/admin.asset.php index d652235..8fd3d76 100644 --- a/dist/js/admin.asset.php +++ b/dist/js/admin.asset.php @@ -1 +1 @@ - array('wp-polyfill'), 'version' => '44d840bca2e214494f81'); + array('wp-polyfill'), 'version' => 'ab2d5f8f5578ef8ac7ac'); diff --git a/dist/js/admin.js b/dist/js/admin.js index 602392b..3ecd29d 100644 --- a/dist/js/admin.js +++ b/dist/js/admin.js @@ -1 +1 @@ -!function(){"use strict";var t={9306:function(t,e,n){var r=n(4901),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a function")}},5548:function(t,e,n){var r=n(3517),o=n(6823),i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not a constructor")}},3506:function(t,e,n){var r=n(3925),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i("Can't set "+o(t)+" as a prototype")}},6469:function(t,e,n){var r=n(8227),o=n(2360),i=n(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},7829:function(t,e,n){var r=n(8183).charAt;t.exports=function(t,e,n){return e+(n&&r(t,e).length||1)}},679:function(t,e,n){var r=n(1625),o=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new o("Incorrect invocation")}},8551:function(t,e,n){var r=n(34),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw new i(o(t)+" is not an object")}},235:function(t,e,n){var r=n(9213).forEach,o=n(4598)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},7916:function(t,e,n){var r=n(6080),o=n(9565),i=n(8981),a=n(6319),s=n(4209),c=n(3517),u=n(6198),f=n(4659),l=n(4527),p=n(81),h=n(851),v=n(9539),d=Array;t.exports=function(t){var e=c(this),n=arguments.length,g=n>1?arguments[1]:void 0,m=void 0!==g;m&&(g=r(g,n>2?arguments[2]:void 0));var y,b,x,w,S,E,L=i(t),O=h(L),k=0;if(!O||this===d&&s(O))for(y=u(L),b=e?new this(y):d(y);y>k;k++)E=m?g(L[k],k):L[k],f(b,k,E);else for(b=e?new this:[],S=(w=p(L,O)).next;!(x=o(S,w)).done;k++){E=m?a(w,g,[x.value,k],!0):x.value;try{f(b,k,E)}catch(t){v(w,"throw",t)}}return l(b,k),b}},9617:function(t,e,n){var r=n(5397),o=n(5610),i=n(6198),a=function(t){return function(e,n,a){var s=r(e),c=i(s);if(0===c)return!t&&-1;var u,f=o(a,c);if(t&&n!==n){for(;c>f;)if((u=s[f++])!==u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9213:function(t,e,n){var r=n(6080),o=n(7055),i=n(8981),a=n(6198),s=n(1469),c=n(4659),u=function(t){var e=1===t,n=2===t,u=3===t,f=4===t,l=6===t,p=7===t,h=5===t||l;return function(v,d,g){for(var m,y,b=i(v),x=o(b),w=a(x),S=r(d,g),E=0,L=0,O=e?s(v,w):n||p?s(v,0):void 0;w>E;E++)if((h||E in x)&&(y=S(m=x[E],E,b),t))if(e)c(O,E,y);else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:c(O,L++,m)}else switch(t){case 4:return!1;case 7:c(O,L++,m)}return l?-1:u||f?f:O}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},4598:function(t,e,n){var r=n(9039);t.exports=function(t,e){var n=[][t];return!!n&&r(function(){n.call(null,e||function(){return 1},1)})}},4527:function(t,e,n){var r=n(3724),o=n(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=s?function(t,e){if(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7680:function(t,e,n){var r=n(9504);t.exports=r([].slice)},4488:function(t,e,n){var r=n(7680),o=Math.floor,i=function(t,e){var n=t.length;if(n<8)for(var a,s,c=1;c0;)t[s]=t[--s];s!==c++&&(t[s]=a)}else for(var u=o(n/2),f=i(r(t,0,u),e),l=i(r(t,u),e),p=f.length,h=l.length,v=0,d=0;v0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},4215:function(t,e,n){var r=n(4576),o=n(2839),i=n(2195),a=function(t){return o.slice(0,t.length)===t};t.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},6518:function(t,e,n){var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),s=n(9433),c=n(7740),u=n(2796);t.exports=function(t,e){var n,f,l,p,h,v=t.target,d=t.global,g=t.stat;if(n=d?r:g?r[v]||s(v,{}):r[v]&&r[v].prototype)for(f in e){if(p=e[f],l=t.dontCallGetSet?(h=o(n,f))&&h.value:n[f],!u(d?f:v+(g?".":"#")+f,t.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(t.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,t)}}},9039:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9228:function(t,e,n){n(7495);var r=n(9565),o=n(6840),i=n(7323),a=n(9039),s=n(8227),c=n(6699),u=s("species"),f=RegExp.prototype;t.exports=function(t,e,n,l){var p=s(t),h=!a(function(){var e={};return e[p]=function(){return 7},7!==""[t](e)}),v=h&&!a(function(){var e=!1,n=/a/;if("split"===t){var r={};r[u]=function(){return n},(n={constructor:r,flags:""})[p]=/./[p]}return n.exec=function(){return e=!0,null},n[p](""),!e});if(!h||!v||n){var d=/./[p],g=e(p,""[t],function(t,e,n,o,a){var s=e.exec;return s===i||s===f.exec?h&&!a?{done:!0,value:r(d,e,n,o)}:{done:!0,value:r(t,n,e,o)}:{done:!1}});o(String.prototype,t,g[0]),o(f,p,g[1])}l&&c(f[p],"sham",!0)}},8745:function(t,e,n){var r=n(616),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},6080:function(t,e,n){var r=n(7476),o=n(9306),i=n(616),a=r(r.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},616:function(t,e,n){var r=n(9039);t.exports=!r(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},9565:function(t,e,n){var r=n(616),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},350:function(t,e,n){var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},6706:function(t,e,n){var r=n(9504),o=n(9306);t.exports=function(t,e,n){try{return r(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},7476:function(t,e,n){var r=n(2195),o=n(9504);t.exports=function(t){if("Function"===r(t))return o(t)}},9504:function(t,e,n){var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);t.exports=r?a:function(t){return function(){return i.apply(t,arguments)}}},7751:function(t,e,n){var r=n(4576),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=r[t],o(n)?n:void 0):r[t]&&r[t][e];var n}},851:function(t,e,n){var r=n(6955),o=n(5966),i=n(4117),a=n(6269),s=n(8227)("iterator");t.exports=function(t){if(!i(t))return o(t,s)||o(t,"@@iterator")||a[r(t)]}},81:function(t,e,n){var r=n(9565),o=n(9306),i=n(8551),a=n(6823),s=n(851),c=TypeError;t.exports=function(t,e){var n=arguments.length<2?s(t):e;if(o(n))return i(r(n,t));throw new c(a(t)+" is not iterable")}},5966:function(t,e,n){var r=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},2478:function(t,e,n){var r=n(9504),o=n(8981),i=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,r,l,p){var h=n+t.length,v=r.length,d=f;return void 0!==l&&(l=o(l),d=u),s(p,d,function(o,s){var u;switch(a(s,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,n);case"'":return c(e,h);case"<":u=l[c(s,1,-1)];break;default:var f=+s;if(0===f)return o;if(f>v){var p=i(f/10);return 0===p?o:p<=v?void 0===r[p-1]?a(s,1):r[p-1]+a(s,1):o}u=r[f-1]}return void 0===u?"":u})}},4576:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},421:function(t){t.exports={}},3138:function(t){t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:function(t,e,n){var r=n(7751);t.exports=r("document","documentElement")},5917:function(t,e,n){var r=n(3724),o=n(9039),i=n(4055);t.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},7055:function(t,e,n){var r=n(9504),o=n(9039),i=n(2195),a=Object,s=r("".split);t.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?s(t,""):a(t)}:a},3706:function(t,e,n){var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},1181:function(t,e,n){var r,o,i,a=n(8622),s=n(4576),c=n(34),u=n(6699),f=n(9297),l=n(7629),p=n(6119),h=n(421),v="Object already initialized",d=s.TypeError,g=s.WeakMap;if(a||l.state){var m=l.state||(l.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw new d(v);return e.facade=t,m.set(t,e),e},o=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var y=p("state");h[y]=!0,r=function(t,e){if(f(t,y))throw new d(v);return e.facade=t,u(t,y,e),e},o=function(t){return f(t,y)?t[y]:{}},i=function(t){return f(t,y)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw new d("Incompatible receiver, "+t+" required");return n}}}},4209:function(t,e,n){var r=n(8227),o=n(6269),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},4376:function(t,e,n){var r=n(2195);t.exports=Array.isArray||function(t){return"Array"===r(t)}},4901:function(t){var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),a=n(6955),s=n(7751),c=n(3706),u=function(){},f=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=r(l.exec),h=!l.test(u),v=function(t){if(!i(t))return!1;try{return f(u,[],t),!0}catch(t){return!1}},d=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(l,c(t))}catch(t){return!0}};d.sham=!0,t.exports=!f||o(function(){var t;return v(v.call)||!v(Object)||!v(function(){t=!0})||t})?d:v},2796:function(t,e,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===f||n!==u&&(o(e)?r(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},4117:function(t){t.exports=function(t){return null===t||void 0===t}},34:function(t,e,n){var r=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},3925:function(t,e,n){var r=n(34);t.exports=function(t){return r(t)||null===t}},6395:function(t){t.exports=!1},757:function(t,e,n){var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,s(t))}},2652:function(t,e,n){var r=n(6080),o=n(9565),i=n(8551),a=n(6823),s=n(4209),c=n(6198),u=n(1625),f=n(81),l=n(851),p=n(9539),h=TypeError,v=function(t,e){this.stopped=t,this.result=e},d=v.prototype;t.exports=function(t,e,n){var g,m,y,b,x,w,S,E=n&&n.that,L=!(!n||!n.AS_ENTRIES),O=!(!n||!n.IS_RECORD),k=!(!n||!n.IS_ITERATOR),P=!(!n||!n.INTERRUPTED),R=r(e,E),j=function(t){var e=g;return g=void 0,e&&p(e,"normal"),new v(!0,t)},A=function(t){return L?(i(t),P?R(t[0],t[1],j):R(t[0],t[1])):P?R(t,j):R(t)};if(O)g=t.iterator;else if(k)g=t;else{if(!(m=l(t)))throw new h(a(t)+" is not iterable");if(s(m)){for(y=0,b=c(t);b>y;y++)if((x=A(t[y]))&&u(d,x))return x;return new v(!1)}g=f(t,m)}for(w=O?t.next:g.next;!(S=o(w,g)).done;){var T=S.value;try{x=A(T)}catch(t){if(!g)throw t;p(g,"throw",t)}if("object"==typeof x&&x&&u(d,x))return x}return new v(!1)}},9539:function(t,e,n){var r=n(9565),o=n(8551),i=n(5966);t.exports=function(t,e,n){var a,s;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw n;return n}a=r(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw n;if(s)throw a;return o(a),n}},3994:function(t,e,n){var r=n(7657).IteratorPrototype,o=n(2360),i=n(6980),a=n(687),s=n(6269),c=function(){return this};t.exports=function(t,e,n,u){var f=e+" Iterator";return t.prototype=o(r,{next:i(+!u,n)}),a(t,f,!1,!0),s[f]=c,t}},1088:function(t,e,n){var r=n(6518),o=n(9565),i=n(6395),a=n(350),s=n(4901),c=n(3994),u=n(2787),f=n(2967),l=n(687),p=n(6699),h=n(6840),v=n(8227),d=n(6269),g=n(7657),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=v("iterator"),S="keys",E="values",L="entries",O=function(){return this};t.exports=function(t,e,n,a,v,g,k){c(n,e,a);var P,R,j,A=function(t){if(t===v&&q)return q;if(!x&&t&&t in C)return C[t];switch(t){case S:case E:case L:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",I=!1,C=t.prototype,U=C[w]||C["@@iterator"]||v&&C[v],q=!x&&U||A(v),B="Array"===e&&C.entries||U;if(B&&(P=u(B.call(new t)))!==Object.prototype&&P.next&&(i||u(P)===b||(f?f(P,b):s(P[w])||h(P,w,O)),l(P,T,!0,!0),i&&(d[T]=O)),m&&v===E&&U&&U.name!==E&&(!i&&y?p(C,"name",E):(I=!0,q=function(){return o(U,this)})),v)if(R={values:A(E),keys:g?q:A(S),entries:A(L)},k)for(j in R)(x||I||!(j in C))&&h(C,j,R[j]);else r({target:e,proto:!0,forced:x||I},R);return i&&!k||C[w]===q||h(C,w,q,{name:v}),d[e]=q,R}},7657:function(t,e,n){var r,o,i,a=n(9039),s=n(4901),c=n(34),u=n(2360),f=n(2787),l=n(6840),p=n(8227),h=n(6395),v=p("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(r=o):d=!0),!c(r)||a(function(){var t={};return r[v].call(t)!==t})?r={}:h&&(r=u(r)),s(r[v])||l(r,v,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},6269:function(t){t.exports={}},6198:function(t,e,n){var r=n(8014);t.exports=function(t){return r(t.length)}},283:function(t,e,n){var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),c=n(350).CONFIGURABLE,u=n(3706),f=n(1181),l=f.enforce,p=f.get,h=String,v=Object.defineProperty,d=r("".slice),g=r("".replace),m=r([].join),y=s&&!o(function(){return 8!==v(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===d(h(e),0,7)&&(e="["+g(h(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!a(t,"name")||c&&t.name!==e)&&(s?v(t,"name",{value:e,configurable:!0}):t.name=e),y&&n&&a(n,"arity")&&t.length!==n.arity&&v(t,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&v(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return a(r,"source")||(r.source=m(b,"string"==typeof e?e:"")),t};Function.prototype.toString=x(function(){return i(this)&&p(this).source||u(this)},"toString")},741:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},1955:function(t,e,n){var r,o,i,a,s,c=n(4576),u=n(3389),f=n(6080),l=n(9225).set,p=n(8265),h=n(9544),v=n(4265),d=n(7860),g=n(6193),m=c.MutationObserver||c.WebKitMutationObserver,y=c.document,b=c.process,x=c.Promise,w=u("queueMicrotask");if(!w){var S=new p,E=function(){var t,e;for(g&&(t=b.domain)&&t.exit();e=S.get();)try{e()}catch(t){throw S.head&&r(),t}t&&t.enter()};h||g||d||!m||!y?!v&&x&&x.resolve?((a=x.resolve(void 0)).constructor=x,s=f(a.then,a),r=function(){s(E)}):g?r=function(){b.nextTick(E)}:(l=f(l,c),r=function(){l(E)}):(o=!0,i=y.createTextNode(""),new m(E).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),w=function(t){S.head||r(),S.add(t)}}t.exports=w},6043:function(t,e,n){var r=n(9306),o=TypeError,i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw new o("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},4213:function(t,e,n){var r=n(3724),o=n(9504),i=n(9565),a=n(9039),s=n(1072),c=n(3717),u=n(8773),f=n(8981),l=n(7055),p=Object.assign,h=Object.defineProperty,v=o([].concat);t.exports=!p||a(function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach(function(t){e[t]=t}),7!==p({},t)[n]||s(p({},e)).join("")!==o})?function(t,e){for(var n=f(t),o=arguments.length,a=1,p=c.f,h=u.f;o>a;)for(var d,g=l(arguments[a++]),m=p?v(s(g),p(g)):s(g),y=m.length,b=0;y>b;)d=m[b++],r&&!i(h,g,d)||(n[d]=g[d]);return n}:p},2360:function(t,e,n){var r,o=n(8551),i=n(6801),a=n(8727),s=n(421),c=n(397),u=n(4055),f=n(6119),l="prototype",p="script",h=f("IE_PROTO"),v=function(){},d=function(t){return"<"+p+">"+t+""},g=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}m="undefined"!=typeof document?document.domain&&r?g(r):function(){var t,e=u("iframe"),n="java"+p+":";return e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F}():g(r);for(var t=a.length;t--;)delete m[l][a[t]];return m()};s[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(v[l]=o(t),n=new v,v[l]=null,n[h]=t):n=m(),void 0===e?n:i.f(n,e)}},6801:function(t,e,n){var r=n(3724),o=n(8686),i=n(4913),a=n(8551),s=n(5397),c=n(1072);e.f=r&&!o?Object.defineProperties:function(t,e){a(t);for(var n,r=s(e),o=c(e),u=o.length,f=0;u>f;)i.f(t,n=o[f++],r[n]);return t}},4913:function(t,e,n){var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",h="writable";e.f=r?i?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var r=f(t,e);r&&r[h]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:l in n?n[l]:r[l],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(a(t),e=s(e),a(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7347:function(t,e,n){var r=n(3724),o=n(9565),i=n(8773),a=n(6980),s=n(5397),c=n(6969),u=n(9297),f=n(5917),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=c(e),f)try{return l(t,e)}catch(t){}if(u(t,e))return a(!o(i.f,t,e),t[e])}},8480:function(t,e,n){var r=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},3717:function(t,e){e.f=Object.getOwnPropertySymbols},2787:function(t,e,n){var r=n(9297),o=n(4901),i=n(8981),a=n(6119),s=n(2211),c=a("IE_PROTO"),u=Object,f=u.prototype;t.exports=s?u.getPrototypeOf:function(t){var e=i(t);if(r(e,c))return e[c];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof u?f:null}},1625:function(t,e,n){var r=n(9504);t.exports=r({}.isPrototypeOf)},1828:function(t,e,n){var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,f=[];for(n in r)!o(s,n)&&o(r,n)&&c(f,n);for(;e.length>u;)o(r,n=e[u++])&&(~a(f,n)||c(f,n));return f}},1072:function(t,e,n){var r=n(1828),o=n(8727);t.exports=Object.keys||function(t){return r(t,o)}},8773:function(t,e){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2967:function(t,e,n){var r=n(6706),o=n(34),i=n(7750),a=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return i(n),a(r),o(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},3179:function(t,e,n){var r=n(2140),o=n(6955);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},4270:function(t,e,n){var r=n(9565),o=n(4901),i=n(34),a=TypeError;t.exports=function(t,e){var n,s;if("string"===e&&o(n=t.toString)&&!i(s=r(n,t)))return s;if(o(n=t.valueOf)&&!i(s=r(n,t)))return s;if("string"!==e&&o(n=t.toString)&&!i(s=r(n,t)))return s;throw new a("Can't convert object to primitive value")}},5031:function(t,e,n){var r=n(7751),o=n(9504),i=n(8480),a=n(3717),s=n(8551),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(s(t)),n=a.f;return n?c(e,n(t)):e}},9167:function(t,e,n){var r=n(4576);t.exports=r},1103:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:function(t,e,n){var r=n(4576),o=n(550),i=n(4901),a=n(2796),s=n(3706),c=n(8227),u=n(4215),f=n(6395),l=n(9519),p=o&&o.prototype,h=c("species"),v=!1,d=i(r.PromiseRejectionEvent),g=a("Promise",function(){var t=s(o),e=t!==String(o);if(!e&&66===l)return!0;if(f&&(!p.catch||!p.finally))return!0;if(!l||l<51||!/native code/.test(t)){var n=new o(function(t){t(1)}),r=function(t){t(function(){},function(){})};if((n.constructor={})[h]=r,!(v=n.then(function(){})instanceof r))return!0}return!e&&("BROWSER"===u||"DENO"===u)&&!d});t.exports={CONSTRUCTOR:g,REJECTION_EVENT:d,SUBCLASSING:v}},550:function(t,e,n){var r=n(4576);t.exports=r.Promise},3438:function(t,e,n){var r=n(8551),o=n(34),i=n(6043);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},537:function(t,e,n){var r=n(550),o=n(4428),i=n(916).CONSTRUCTOR;t.exports=i||!o(function(t){r.all(t).then(void 0,function(){})})},8265:function(t){var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6682:function(t,e,n){var r=n(9565),o=n(8551),i=n(4901),a=n(2195),s=n(7323),c=TypeError;t.exports=function(t,e){var n=t.exec;if(i(n)){var u=r(n,t,e);return null!==u&&o(u),u}if("RegExp"===a(t))return r(s,t,e);throw new c("RegExp#exec called on incompatible receiver")}},7323:function(t,e,n){var r=n(9565),o=n(9504),i=n(655),a=n(7979),s=n(8429),c=n(5745),u=n(2360),f=n(1181).get,l=n(3635),p=n(8814),h=c("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,d=v,g=o("".charAt),m=o("".indexOf),y=o("".replace),b=o("".slice),x=function(){var t=/a/,e=/b*/g;return r(v,t,"a"),r(v,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),w=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1],E=function(t,e){for(var n=t.groups=u(null),r=0;r0&&g(u,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==j&&"\r"!==j&&"\u2028"!==j&&"\u2029"!==j)&&(k="(?: (?:"+k+"))",R=" "+R,P++),n=new RegExp("^(?:"+k+")",O)}S&&(n=new RegExp("^"+k+"$(?!\\s)",O)),x&&(o=s.lastIndex);var A=r(v,L?n:s,R);return L?A?(A.input=u,A[0]=b(A[0],P),A.index=s.lastIndex,s.lastIndex+=A[0].length):s.lastIndex=0:x&&A&&(s.lastIndex=s.global?A.index+A[0].length:o),S&&A&&A.length>1&&r(h,A[0],n,function(){for(var t=1;tb)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")})},7750:function(t,e,n){var r=n(4117),o=TypeError;t.exports=function(t){if(r(t))throw new o("Can't call method on "+t);return t}},3389:function(t,e,n){var r=n(4576),o=n(3724),i=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!o)return r[t];var e=i(r,t);return e&&e.value}},7633:function(t,e,n){var r=n(7751),o=n(2106),i=n(8227),a=n(3724),s=i("species");t.exports=function(t){var e=r(t);a&&e&&!e[s]&&o(e,s,{configurable:!0,get:function(){return this}})}},687:function(t,e,n){var r=n(4913).f,o=n(9297),i=n(8227)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,i)&&r(t,i,{configurable:!0,value:e})}},6119:function(t,e,n){var r=n(5745),o=n(3392),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},7629:function(t,e,n){var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",s=t.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.49.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,n){var r=n(7629);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},2293:function(t,e,n){var r=n(8551),o=n(5548),i=n(4117),a=n(8227)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||i(n=r(s)[a])?e:o(n)}},8183:function(t,e,n){var r=n(9504),o=n(1291),i=n(655),a=n(7750),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),f=function(t){return function(e,n){var r,f,l=i(a(e)),p=o(n),h=l.length;return p<0||p>=h?t?"":void 0:(r=c(l,p))<55296||r>56319||p+1===h||(f=c(l,p+1))<56320||f>57343?t?s(l,p):r:t?u(l,p,p+2):f-56320+(r-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},6098:function(t,e,n){var r=n(9504),o=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=r(a.exec),f=Math.floor,l=String.fromCharCode,p=r("".charCodeAt),h=r([].join),v=r([].push),d=r("".replace),g=r("".split),m=r("".toLowerCase),y=function(t){return t+22+75*(t<26)},b=function(t,e,n){var r=0;for(t=n?f(t/700):t>>1,t+=f(t/e);t>455;)t=f(t/35),r+=36;return f(r+36*t/(t+38))},x=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n=55296&&o<=56319&&n=a&&rf((o-u)/w))throw new c(s);for(u+=(x-a)*w,a=x,n=0;no)throw new c(s);if(r===a){for(var S=u,E=36;;){var L=E<=d?1:E>=d+26?26:E-d;if(S0?o(e,9007199254740991):0}},8981:function(t,e,n){var r=n(7750),o=Object;t.exports=function(t){return o(r(t))}},2777:function(t,e,n){var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),c=n(8227),u=TypeError,f=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=a(t,f);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},6969:function(t,e,n){var r=n(2777),o=n(757);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},2140:function(t,e,n){var r={};r[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(r)},655:function(t,e,n){var r=n(6955),o=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:function(t,e,n){var r=n(9504),o=0,i=Math.random(),a=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},7416:function(t,e,n){var r=n(9039),o=n(8227),i=n(3724),a=n(6395),s=o("iterator");t.exports=!r(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return t.pathname="c%20d",e.forEach(function(t,n){e.delete("b"),r+=n+t}),n.delete("a",2),n.delete("b",void 0),a&&(!t.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!e.size&&(a||!i)||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",void 0).host})},7040:function(t,e,n){var r=n(4495);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,n){var r=n(3724),o=n(9039);t.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812:function(t){var e=TypeError;t.exports=function(t,n){if(t=e.length)return t.target=null,u(void 0,!0);switch(t.kind){case"keys":return u(n,!1);case"values":return u(e[n],!1)}return u([n,e[n]],!1)},"values");var d=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==d.name)try{s(d,"name",{value:"values"})}catch(t){}},2010:function(t,e,n){var r=n(3724),o=n(350).EXISTS,i=n(9504),a=n(2106),s=Function.prototype,c=i(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=i(u.exec);r&&!o&&a(s,"name",{configurable:!0,get:function(){try{return f(u,c(this))[1]}catch(t){return""}}})},9432:function(t,e,n){var r=n(6518),o=n(8981),i=n(1072);r({target:"Object",stat:!0,forced:n(9039)(function(){i(1)})},{keys:function(t){return i(o(t))}})},6099:function(t,e,n){var r=n(2140),o=n(6840),i=n(3179);r||o(Object.prototype,"toString",i,{unsafe:!0})},6499:function(t,e,n){var r=n(6518),o=n(9565),i=n(9306),a=n(6043),s=n(1103),c=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{all:function(t){var e=this,n=a.f(e),r=n.resolve,u=n.reject,f=s(function(){var n=i(e.resolve),a=[],s=0,f=1;c(t,function(t){var i=s++,c=!1;f++,o(n,e,t).then(function(t){c||(c=!0,a[i]=t,--f||r(a))},u)}),--f||r(a)});return f.error&&u(f.value),n.promise}})},2003:function(t,e,n){var r=n(6518),o=n(6395),i=n(916).CONSTRUCTOR,a=n(550),s=n(7751),c=n(4901),u=n(6840),f=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&c(a)){var l=s("Promise").prototype.catch;f.catch!==l&&u(f,"catch",l,{unsafe:!0})}},436:function(t,e,n){var r,o,i,a,s=n(6518),c=n(6395),u=n(6193),f=n(4576),l=n(9167),p=n(9565),h=n(6840),v=n(2967),d=n(687),g=n(7633),m=n(9306),y=n(4901),b=n(34),x=n(679),w=n(2293),S=n(9225).set,E=n(1955),L=n(3138),O=n(1103),k=n(8265),P=n(1181),R=n(550),j=n(916),A=n(6043),T="Promise",I=j.CONSTRUCTOR,C=j.REJECTION_EVENT,U=j.SUBCLASSING,q=P.getterFor(T),B=P.set,M=R&&R.prototype,_=R,N=M,H=f.TypeError,F=f.document,D=f.process,z=A.f,G=z,$=!!(F&&F.createEvent&&f.dispatchEvent),V="unhandledrejection",W=function(t){var e;return!(!b(t)||!y(e=t.then))&&e},J=function(t,e){var n,r,o,i=e.value,a=1===e.state,s=a?t.ok:t.fail,c=t.resolve,u=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Z(e),e.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===t.promise?u(new H("Promise-chain cycle")):(r=W(n))?p(r,n,c,u):c(n)):u(i)}catch(t){f&&!o&&f.exit(),u(t)}},K=function(t,e){t.notified||(t.notified=!0,E(function(){for(var n,r=t.reactions;n=r.get();)J(n,t);t.notified=!1,e&&!t.rejection&&X(t)}))},Y=function(t,e,n){var r,o;$?((r=F.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),f.dispatchEvent(r)):r={promise:e,reason:n},!C&&(o=f["on"+t])?o(r):t===V&&L("Unhandled promise rejection",n)},X=function(t){p(S,f,function(){var e,n=t.facade,r=t.value;if(Q(t)&&(e=O(function(){u?D.emit("unhandledRejection",r,n):Y(V,n,r)}),t.rejection=u||Q(t)?2:1,e.error))throw e.value})},Q=function(t){return 1!==t.rejection&&!t.parent},Z=function(t){p(S,f,function(){var e=t.facade;u?D.emit("rejectionHandled",e):Y("rejectionhandled",e,t.value)})},tt=function(t,e,n){return function(r){t(e,r,n)}},et=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,K(t,!0))},nt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new H("Promise can't be resolved itself");var r=W(e);r?E(function(){var n={done:!1};try{p(r,e,tt(nt,n,t),tt(et,n,t))}catch(e){et(n,e,t)}}):(t.value=e,t.state=1,K(t,!1))}catch(e){et({done:!1},e,t)}}};if(I&&(N=(_=function(t){x(this,N),m(t),p(r,this);var e=q(this);try{t(tt(nt,e),tt(et,e))}catch(t){et(e,t)}}).prototype,(r=function(t){B(this,{type:T,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:null})}).prototype=h(N,"then",function(t,e){var n=q(this),r=z(w(this,_));return n.parent=!0,r.ok=!y(t)||t,r.fail=y(e)&&e,r.domain=u?D.domain:void 0,0===n.state?n.reactions.add(r):E(function(){J(r,n)}),r.promise}),o=function(){var t=new r,e=q(t);this.promise=t,this.resolve=tt(nt,e),this.reject=tt(et,e)},A.f=z=function(t){return t===_||t===i?new o(t):G(t)},!c&&y(R)&&M!==Object.prototype)){a=M.then,U||h(M,"then",function(t,e){var n=this;return new _(function(t,e){p(a,n,t,e)}).then(t,e)},{unsafe:!0});try{delete M.constructor}catch(t){}v&&v(M,N)}s({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:_}),i=l.Promise,d(_,T,!1,!0),g(T)},3362:function(t,e,n){n(436),n(6499),n(2003),n(7743),n(1481),n(280)},7743:function(t,e,n){var r=n(6518),o=n(9565),i=n(9306),a=n(6043),s=n(1103),c=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{race:function(t){var e=this,n=a.f(e),r=n.reject,u=s(function(){var a=i(e.resolve);c(t,function(t){o(a,e,t).then(n.resolve,r)})});return u.error&&r(u.value),n.promise}})},1481:function(t,e,n){var r=n(6518),o=n(6043);r({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return(0,e.reject)(t),e.promise}})},280:function(t,e,n){var r=n(6518),o=n(7751),i=n(6395),a=n(550),s=n(916).CONSTRUCTOR,c=n(3438),u=o("Promise"),f=i&&!s;r({target:"Promise",stat:!0,forced:i||s},{resolve:function(t){return c(f&&this===u?a:this,t)}})},7495:function(t,e,n){var r=n(6518),o=n(7323);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},8781:function(t,e,n){var r=n(350).PROPER,o=n(6840),i=n(8551),a=n(655),s=n(9039),c=n(1034),u="toString",f=RegExp.prototype,l=f[u],p=s(function(){return"/a/b"!==l.call({source:"a",flags:"b"})}),h=r&&l.name!==u;(p||h)&&o(f,u,function(){var t=i(this);return"/"+a(t.source)+"/"+a(c(t))},{unsafe:!0})},7337:function(t,e,n){var r=n(6518),o=n(9504),i=n(5610),a=RangeError,s=String.fromCharCode,c=String.fromCodePoint,u=o([].join);r({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(i(e=+arguments[o],1114111)!==e)throw new a(e+" is not a valid code point");n[o++]=e<65536?s(e):s(55296+((e-=65536)>>10),e%1024+56320)}return u(n,"")}})},7764:function(t,e,n){var r=n(8183).charAt,o=n(655),i=n(1181),a=n(1088),s=n(2529),c="String Iterator",u=i.set,f=i.getterFor(c);a(String,"String",function(t){u(this,{type:c,string:o(t),index:0})},function(){var t,e=f(this),n=e.string,o=e.index;return o>=n.length?s(void 0,!0):(t=r(n,o),e.index+=t.length,s(t,!1))})},5440:function(t,e,n){var r=n(8745),o=n(9565),i=n(9504),a=n(9228),s=n(9039),c=n(8551),u=n(4901),f=n(34),l=n(1291),p=n(8014),h=n(655),v=n(7750),d=n(7829),g=n(5966),m=n(2478),y=n(1034),b=n(6682),x=n(8227)("replace"),w=Math.max,S=Math.min,E=i([].concat),L=i([].push),O=i("".indexOf),k=i("".slice),P=function(t){return void 0===t?t:String(t)},R="$0"==="a".replace(/./,"$0"),j=!!/./[x]&&""===/./[x]("a","$0");a("replace",function(t,e,n){var i=j?"$":"$0";return[function(t,n){var r=v(this),i=f(t)?g(t,x):void 0;return i?o(i,t,r,n):o(e,h(r),t,n)},function(t,o){var a=c(this),s=h(t),f=u(o);f||(o=h(o));var v=h(y(a));if("string"==typeof o&&!~O(o,i)&&!~O(o,"$<")&&!~O(v,"y")){var g=n(e,a,s,o);if(g.done)return g.value}var x,R=!!~O(v,"g");R&&(x=!!~O(v,"u")||!!~O(v,"v"),a.lastIndex=0);for(var j,A=[];null!==(j=b(a,s))&&(L(A,j),R);){""===h(j[0])&&(a.lastIndex=d(s,p(a.lastIndex),x))}for(var T="",I=0,C=0;C=I&&(T+=k(s,I,B)+U,I=B+q.length)}return T+k(s,I)}]},!!s(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})||!R||j)},2762:function(t,e,n){var r=n(6518),o=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},3500:function(t,e,n){var r=n(4576),o=n(7400),i=n(9296),a=n(235),s=n(6699),c=function(t){if(t&&t.forEach!==a)try{s(t,"forEach",a)}catch(e){t.forEach=a}};for(var u in o)o[u]&&c(r[u]&&r[u].prototype);c(i)},2953:function(t,e,n){var r=n(4576),o=n(7400),i=n(9296),a=n(3792),s=n(6699),c=n(687),u=n(8227)("iterator"),f=a.values,l=function(t,e){if(t){if(t[u]!==f)try{s(t,u,f)}catch(e){t[u]=f}if(c(t,e,!0),o[e])for(var n in a)if(t[n]!==a[n])try{s(t,n,a[n])}catch(e){t[n]=a[n]}}};for(var p in o)l(r[p]&&r[p].prototype,p);l(i,"DOMTokenList")},8406:function(t,e,n){n(3792),n(7337);var r=n(6518),o=n(4576),i=n(3389),a=n(7751),s=n(9565),c=n(9504),u=n(3724),f=n(7416),l=n(6840),p=n(2106),h=n(6279),v=n(687),d=n(3994),g=n(1181),m=n(679),y=n(4901),b=n(9297),x=n(6080),w=n(6955),S=n(8551),E=n(34),L=n(655),O=n(2360),k=n(6980),P=n(81),R=n(851),j=n(2529),A=n(2812),T=n(8227),I=n(4488),C=T("iterator"),U="URLSearchParams",q=U+"Iterator",B=g.set,M=g.getterFor(U),_=g.getterFor(q),N=i("fetch"),H=i("Request"),F=i("Headers"),D=H&&H.prototype,z=F&&F.prototype,G=o.TypeError,$=o.encodeURIComponent,V=String.fromCharCode,W=a("String","fromCodePoint"),J=parseInt,K=c("".charAt),Y=c([].join),X=c([].push),Q=c("".replace),Z=c([].shift),tt=c([].splice),et=c("".split),nt=c("".slice),rt=c(/./.exec),ot=/\+/g,it=/^[0-9a-f]+$/i,at=function(t,e){var n=nt(t,e,e+2);return rt(it,n)?J(n,16):NaN},st=function(t){for(var e=0,n=128;n>0&&0!==(t&n);n>>=1)e++;return e},ct=function(t){var e=null,n=t.length;switch(n){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return null===e||e>1114111||e>=55296&&e<=57343||e<(n>3?65536:n>2?2048:n>1?128:0)?null:e},ut=function(t){for(var e=(t=Q(t,ot," ")).length,n="",r=0;re){n+="%",r++;continue}var i=at(t,r+1);if(i!==i){n+=o,r++;continue}r+=2;var a=st(i);if(0===a)o=V(i);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[i],c=1;ce||"%"!==K(t,r));){var u=at(t,r+1);if(u!==u||u>191||u<128)break;if(1===c){if(224===i&&u<160)break;if(237===i&&u>159)break;if(240===i&&u<144)break;if(244===i&&u>143)break}X(s,u),r+=2,c++}if(s.length!==a){n+="�";continue}var f=ct(s);if(null===f){for(var l=0;l=e.length)return t.target=null,j(void 0,!0);var r=e[n];switch(t.kind){case"keys":return j(r.key,!1);case"values":return j(r.value,!1)}return j([r.key,r.value],!1)},!0),dt=function(t){this.entries=[],this.url=null,void 0!==t&&(E(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===K(t,0)?nt(t,1):t:L(t)))};dt.prototype={type:U,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,o,i,a,c,u=this.entries,f=R(t);if(f)for(n=(e=P(t,f)).next;!(r=s(n,e)).done;){if(i=(o=P(S(r.value))).next,(a=s(i,o)).done||(c=s(i,o)).done||!s(i,o).done)throw new G("Expected sequence with length 2");X(u,{key:L(a.value),value:L(c.value)})}else for(var l in t)b(t,l)&&X(u,{key:l,value:L(t[l])})},parseQuery:function(t){if(t)for(var e,n,r=this.entries,o=et(t,"&"),i=0;i0?arguments[0]:void 0));u||(this.size=t.entries.length)},mt=gt.prototype;if(h(mt,{append:function(t,e){var n=M(this);A(arguments.length,2),X(n.entries,{key:L(t),value:L(e)}),u||this.size++,n.updateURL()},delete:function(t){for(var e=M(this),n=A(arguments.length,1),r=e.entries,o=L(t),i=n<2?void 0:arguments[1],a=void 0===i?i:L(i),s=0;se.key?1:-1}),t.updateURL()},forEach:function(t){for(var e,n=M(this).entries,r=x(t,arguments.length>1?arguments[1]:void 0),o=0;o1?xt(arguments[1]):{})}}),y(H)){var wt=function(t){return m(this,D),new H(t,arguments.length>1?xt(arguments[1]):{})};D.constructor=wt,wt.prototype=D,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:wt})}}t.exports={URLSearchParams:gt,getState:M}},8408:function(t,e,n){n(8406)},5806:function(t,e,n){n(7764);var r,o=n(6518),i=n(3724),a=n(7416),s=n(4576),c=n(6080),u=n(9504),f=n(6840),l=n(2106),p=n(679),h=n(9297),v=n(4213),d=n(7916),g=n(7680),m=n(8183).codeAt,y=n(6098),b=n(655),x=n(687),w=n(2812),S=n(8406),E=n(1181),L=E.set,O=E.getterFor("URL"),k=S.URLSearchParams,P=S.getState,R=s.URL,j=s.TypeError,A=s.encodeURIComponent,T=s.parseInt,I=Math.floor,C=Math.pow,U=u("".charAt),q=u(/./.exec),B=u([].join),M=u(1.1.toString),_=u([].pop),N=u([].push),H=u("".replace),F=u([].shift),D=u("".split),z=u("".slice),G=u("".toLowerCase),$=u([].unshift),V="Invalid scheme",W="Invalid host",J="Invalid port",K=/[a-z]/i,Y=/[\d+\-.a-z]/i,X=/\d/,Q=/^0x/i,Z=/^[0-7]+$/,tt=/^\d+$/,et=/^[\da-f]+$/i,nt=/[\0\t\n\r #%/:<>?@[\\\]^|]/,rt=/[\0\t\n\r #/:<>?@[\\\]^|]/,ot=/^[\u0000-\u0020]+/,it=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,at=/[\t\n\r]/g,st=function(t){var e,n,r,o;if("number"==typeof t){for(e=[],n=0;n<4;n++)$(e,t%256),t=I(t/256);return B(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,o=0,i=0;i<8;i++)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n?r:e}(t),n=0;n<8;n++)o&&0===t[n]||(o&&(o=!1),r===n?(e+=n?":":"::",o=!0):(e+=M(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},ct={},ut=v({},ct,{" ":1,'"':1,"#":1,"<":1,">":1}),ft=v({},ut,{"'":1}),lt=v({},ct,{" ":1,'"':1,"<":1,">":1,"`":1}),pt=v({},lt,{"#":1,"?":1,"{":1,"}":1,"^":1}),ht=v({},pt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),vt=function(t,e){var n=m(t,0);return n>=32&&n<127&&!h(e,t)?t:"'"===t&&h(e,t)?"%27":A(t)},dt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gt=function(t,e){var n;return 2===t.length&&q(K,U(t,0))&&(":"===(n=U(t,1))||!e&&"|"===n)},mt=function(t){var e;return t.length>1&>(z(t,0,2))&&(2===t.length||"/"===(e=U(t,2))||"\\"===e||"?"===e||"#"===e)},yt=function(t){return"."===t||"%2e"===G(t)},bt=function(t){return".."===(t=G(t))||"%2e."===t||".%2e"===t||"%2e%2e"===t},xt={},wt={},St={},Et={},Lt={},Ot={},kt={},Pt={},Rt={},jt={},At={},Tt={},It={},Ct={},Ut={},qt={},Bt={},Mt={},_t={},Nt={},Ht={},Ft=function(t,e,n){var r,o,i,a=b(t);if(e){if(o=this.parse(a))throw new j(o);this.searchParams=null}else{if(void 0!==n&&(r=new Ft(n,!0)),o=this.parse(a,null,r))throw new j(o);(i=P(new k)).bindURL(this),this.searchParams=i}};Ft.prototype={type:"URL",parse:function(t,e,n){var o,i,a,s,c=this,u=e||xt,f=0,l="",p=!1,v=!1,m=!1;for(t=b(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=H(t,ot,""),t=H(t,it,"$1")),t=H(t,at,""),o=d(t);f<=o.length;){switch(i=o[f],u){case xt:if(!i||!q(K,i)){if(e)return V;u=St;continue}l+=G(i),u=wt;break;case wt:if(i&&q(Y,i))l+=G(i);else{if(":"!==i){if(e)return V;l="",u=St,f=0;continue}if(e&&(c.isSpecial()!==h(dt,l)||"file"===l&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&""===c.host))return;if(c.scheme=l,e)return void(c.isSpecial()&&dt[c.scheme]===c.port&&(c.port=null));l="","file"===c.scheme?u=Ct:c.isSpecial()&&n&&n.scheme===c.scheme?u=Et:c.isSpecial()?u=Pt:"/"===o[f+1]?(u=Lt,f++):(c.cannotBeABaseURL=!0,N(c.path,""),u=_t)}break;case St:if(!n||n.cannotBeABaseURL&&"#"!==i)return V;if(n.cannotBeABaseURL&&"#"===i){c.scheme=n.scheme,c.path=g(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=Ht;break}u="file"===n.scheme?Ct:Ot;continue;case Et:if("/"!==i||"/"!==o[f+1]){u=Ot;continue}u=Rt,f++;break;case Lt:if("/"===i){u=jt;break}u=Mt;continue;case Ot:if(c.scheme=n.scheme,i===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query;else if("/"===i||"\\"===i&&c.isSpecial())u=kt;else if("?"===i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query="",u=Nt;else{if("#"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.path.length&&c.path.length--,u=Mt;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query,c.fragment="",u=Ht}break;case kt:if(!c.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Mt;continue}u=jt}else u=Rt;break;case Pt:if(u=Rt,"/"!==i||"/"!==o[f+1])continue;f++;break;case Rt:if("/"!==i&&"\\"!==i){u=jt;continue}break;case jt:if("@"===i){p&&(l="%40"+l),p=!0,a=d(l);for(var y=0;y65535)return J;c.port=c.isSpecial()&&S===dt[c.scheme]?null:S,l=""}if(e)return;u=Bt;continue}return J}l+=i;break;case Ct:if(c.scheme="file",c.host="","/"===i||"\\"===i)u=Ut;else{if(!n||"file"!==n.scheme){u=Mt;continue}switch(i){case r:c.host=n.host,c.path=g(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=g(n.path),c.query="",u=Nt;break;case"#":c.host=n.host,c.path=g(n.path),c.query=n.query,c.fragment="",u=Ht;break;default:c.host=n.host,mt(B(g(o,f),""))||(c.path=g(n.path),c.shortenPath()),u=Mt;continue}}break;case Ut:if("/"===i||"\\"===i){u=qt;break}n&&"file"===n.scheme&&(c.host=n.host,!mt(B(g(o,f),""))&>(n.path[0],!0)&&N(c.path,n.path[0])),u=Mt;continue;case qt:if(i===r||"/"===i||"\\"===i||"?"===i||"#"===i){if(!e&>(l))u=Mt;else if(""===l){if(c.host="",e)return;u=Bt}else{if(s=c.parseHost(l))return s;if("localhost"===c.host&&(c.host=""),e)return;l="",u=Bt}continue}l+=i;break;case Bt:if(c.isSpecial()){if(u=Mt,"/"!==i&&"\\"!==i)continue}else if(e||"?"!==i)if(e||"#"!==i){if(i!==r&&(u=Mt,"/"!==i))continue}else c.fragment="",u=Ht;else c.query="",u=Nt;break;case Mt:if(i===r||"/"===i||"\\"===i&&c.isSpecial()||!e&&("?"===i||"#"===i)){if(bt(l)?(c.shortenPath(),"/"===i||"\\"===i&&c.isSpecial()||N(c.path,"")):yt(l)?"/"===i||"\\"===i&&c.isSpecial()||N(c.path,""):("file"===c.scheme&&!c.path.length&>(l)&&(null!==c.host&&""!==c.host&&(c.host=""),l=U(l,0)+":"),N(c.path,l)),l="","file"===c.scheme&&(i===r||"?"===i||"#"===i))for(;c.path.length>1&&""===c.path[0];)F(c.path);"?"===i?(c.query="",u=Nt):"#"===i&&(c.fragment="",u=Ht)}else l+=vt(i,pt);break;case _t:"?"===i?(c.query="",u=Nt):"#"===i?(c.fragment="",u=Ht):i!==r&&(c.path[0]+=vt(i,ct));break;case Nt:e||"#"!==i?i!==r&&(c.query+=vt(i,c.isSpecial()?ft:ut)):(c.fragment="",u=Ht);break;case Ht:i!==r&&(c.fragment+=vt(i,lt))}f++}},parseHost:function(t){var e,n,r;if("["===U(t,0)){if("]"!==U(t,t.length-1))return W;if(e=function(t){var e,n,r,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,p=function(){return U(t,l)};if(":"===p()){if(":"!==U(t,1))return;l+=2,f=++u}for(;p();){if(8===u)return;if(":"!==p()){for(e=n=0;n<4&&q(et,p());)e=16*e+T(p(),16),l++,n++;if("."===p()){if(0===n)return;if(l-=n,u>6)return;for(r=0;p();){if(o=null,r>0){if(!("."===p()&&r<4))return;l++}if(!q(X,p()))return;for(;q(X,p());){if(i=T(p(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!==++r&&4!==r||u++}if(4!==r)return;break}if(":"===p()){if(l++,!p())return}else if(p())return;c[u++]=e}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(a=u-f,u=7;0!==u&&a>0;)s=c[u],c[u--]=c[f+a-1],c[f+--a]=s;else if(8!==u)return;return c}(z(t,1,-1)),!e)return W;this.host=e}else if(this.isSpecial()){if(t=y(t),q(nt,t))return W;if(function(t){var e,n,r=D(t,".");if(""===r[r.length-1]){if(1===r.length)return!1;r.length--}return e=r[r.length-1],!!q(tt,e)||!!q(Q,e)&&(""===(n=z(e,2))||!!q(et,n))}(t)){if(e=function(t){var e,n,r,o,i,a,s,c=D(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return null;for(n=[],r=0;r1&&"0"===U(o,0)&&(i=q(Q,o)?16:8,o=z(o,8===i?1:2)),""===o)a=0;else{if(!q(10===i?tt:8===i?Z:et,o))return null;a=T(o,i)}N(n,a)}for(r=0;r=C(256,5-e))return null}else if(a>255)return null;for(s=_(n),r=0;r1&&""===a[0]&&(u+="/."),u+=t.cannotBeABaseURL?a[0]:a.length?"/"+B(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(t){var e=this.parse(t);if(e)throw new j(e);this.searchParams.update()},getOrigin:function(){var t=this.scheme,e=this.port;if("blob"===t)try{return new Dt(this.path[0]).origin}catch(t){return"null"}return"file"!==t&&this.isSpecial()?t+"://"+st(this.host)+(null!==e?":"+e:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(t){this.parse(b(t)+":",xt)},getUsername:function(){return this.username},setUsername:function(t){var e=d(b(t));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n1?arguments[1]:void 0,r=L(e,new Ft(t,!1,n));i||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},zt=Dt.prototype,Gt=function(t,e){return{get:function(){return O(this)[t]()},set:e&&function(t){return O(this)[e](t)},configurable:!0,enumerable:!0}};if(i&&(l(zt,"href",Gt("serialize","setHref")),l(zt,"origin",Gt("getOrigin")),l(zt,"protocol",Gt("getProtocol","setProtocol")),l(zt,"username",Gt("getUsername","setUsername")),l(zt,"password",Gt("getPassword","setPassword")),l(zt,"host",Gt("getHost","setHost")),l(zt,"hostname",Gt("getHostname","setHostname")),l(zt,"port",Gt("getPort","setPort")),l(zt,"pathname",Gt("getPathname","setPathname")),l(zt,"search",Gt("getSearch","setSearch")),l(zt,"searchParams",Gt("getSearchParams")),l(zt,"hash",Gt("getHash","setHash"))),f(zt,"toJSON",function(){return O(this).serialize()},{enumerable:!0}),f(zt,"toString",function(){return O(this).serialize()},{enumerable:!0}),R){var $t=R.createObjectURL,Vt=R.revokeObjectURL;$t&&f(Dt,"createObjectURL",c($t,R)),Vt&&f(Dt,"revokeObjectURL",c(Vt,R))}x(Dt,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:Dt})},3296:function(t,e,n){n(5806)},7208:function(t,e,n){var r=n(6518),o=n(9565);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};n(3418),n(3792),n(2010),n(9432),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(2762),n(3500),n(2953),n(3296),n(7208),n(8408);document.addEventListener("DOMContentLoaded",function(){var t=Array.from(document.querySelectorAll('[role="tab"]')),e=(Array.from(document.querySelectorAll('[role="tabpanel"]')),!1);t.forEach(function(n,r){n.addEventListener("click",function(t){!e||window.confirm(ctbpAdmin.i18n.unsavedChanges)||t.preventDefault()}),n.addEventListener("keydown",function(e){var n=null;"ArrowRight"===e.key?n=(r+1)%t.length:"ArrowLeft"===e.key&&(n=(r-1+t.length)%t.length),null!==n&&(e.preventDefault(),t[n].focus(),t[n].click())})}),document.querySelectorAll("input, select, textarea").forEach(function(t){t.addEventListener("change",function(){e=!0})}),document.querySelectorAll("form").forEach(function(t){t.addEventListener("submit",function(){e=!1})}),window.ctbpFetch=function(t,e,n,r,o){var i="GET"===t.toUpperCase(),a=ctbpAdmin.restUrl.replace(/\/$/,"")+e;i&&n&&Object.keys(n).length&&(a+="?"+new URLSearchParams(n).toString());var s={method:t.toUpperCase(),headers:{"X-WP-Nonce":ctbpAdmin.restNonce}};i||(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(n||{})),fetch(a,s).then(function(t){return t.json().then(function(e){return{ok:t.ok,json:e}})}).then(function(t){t.ok?"function"===typeof r&&r(t.json):"function"===typeof o&&o({message:t.json.message||ctbpAdmin.i18n.notImplemented})}).catch(function(){"function"===typeof o&&o({message:ctbpAdmin.i18n.notImplemented})})};var n=document.getElementById("ghrp-test-notification");n&&n.addEventListener("click",function(){var t=document.getElementById("ghrp-test-notification-result"),e=n.parentNode.querySelector(".ghrp-test-notification-spinner");e&&(e.style.display="inline-block",e.classList.add("is-active")),t&&(t.textContent=""),window.ctbpFetch("POST","/notifications/test",{},function(n){e&&(e.classList.remove("is-active"),e.style.display="none"),t&&(t.innerHTML=f(n.message||"Sent!")+" "+(n.message||"Sent!"))},function(n){if(e&&(e.classList.remove("is-active"),e.style.display="none"),t){var r=n&&n.message?n.message:"Failed to send test email.";t.innerHTML=l(r)+" "+r}})});var r=document.getElementById("ghrp-inline-edit");function o(){var t=document.querySelector(".wp-list-table tbody > .ghrp-repo-edit-row");if(t){var e=t.previousElementSibling,n=e?e.previousElementSibling:null,r=n?n.querySelector(".ghrp-edit-repo-btn"):null;n&&(n.style.display=""),e&&e.classList.contains("hidden")&&e.remove(),t.remove(),r&&r.focus()}}function i(t){if(o(),r){var e=t.dataset.repo||"",n=t.dataset.displayName||"",i=r.querySelector("tr").cloneNode(!0),a=i.querySelector(".inline-edit-legend");a&&(a.textContent=(ctbpAdmin.i18n.editLabel||"Edit:")+" "+n);var s={display_name:t.dataset.displayName||"",plugin_link:t.dataset.pluginLink||"",tags:t.dataset.tags||""};Object.keys(s).forEach(function(t){var n=i.querySelector('[data-field="'+t+'"]');n&&(n.value=s[t],n.name="repos["+e+"]["+t+"]")});var c=i.querySelector('[data-field="post_status"]');c&&(c.name="repos["+e+"][post_status]",c.value=t.dataset.postStatus||"draft");var u=i.querySelector(".ghrp-tpl-cat-hidden");u&&(u.name="repos["+e+"][categories][]");var p=[];try{p=JSON.parse(t.dataset.categories||"[]")}catch(t){p=[]}i.querySelectorAll('.ghrp-tpl-categories input[type="checkbox"]').forEach(function(t){t.name="repos["+e+"][categories][]",t.checked=-1!==p.indexOf(parseInt(t.value,10))});var h=i.querySelector(".ghrp-tpl-author");h&&(h.name="repos["+e+"][author]",h.value=t.dataset.author||"0");var v=i.querySelector('[data-field="paused"]');v&&(v.name="repos["+e+"][paused]",v.checked="1"===t.dataset.paused);var d=parseInt(t.dataset.featuredImage||"0",10),g=i.querySelector('[data-field="featured_image"]');g&&(g.name="repos["+e+"][featured_image]",g.value=d),function(t,e){var n=t.querySelector(".ghrp-select-image"),r=t.querySelector(".ghrp-remove-image"),o=t.querySelector(".ghrp-featured-image-preview"),i=t.querySelector('[data-field="featured_image"]');if(!n||!i)return;if(e>0&&o){o.innerHTML='';var a=o.querySelector("img"),s=wp.media.attachment(e);s.fetch().then(function(){var t=s.get("sizes")&&s.get("sizes").thumbnail?s.get("sizes").thumbnail.url:s.get("url");a&&(a.src=t)}),r&&(r.style.display="")}n.addEventListener("click",function(t){t.preventDefault();var e=wp.media({title:ctbpAdmin.i18n.selectImage||"Select Featured Image",button:{text:ctbpAdmin.i18n.useImage||"Use this image"},multiple:!1,library:{type:"image"}});e.on("select",function(){var t=e.state().get("selection").first().toJSON();if(i.value=t.id,o){var n=t.sizes&&t.sizes.thumbnail?t.sizes.thumbnail.url:t.url;o.innerHTML=''}r&&(r.style.display="")}),e.open()}),r&&r.addEventListener("click",function(t){t.preventDefault(),i.value="0",o&&(o.innerHTML=""),r.style.display="none"})}(i,d);var m=i.querySelector(".ghrp-cancel-edit");m&&m.addEventListener("click",o);var y=i.querySelector(".ghrp-plugin-link-input");y&&function(t){var e="";t.addEventListener("focus",function(){e=t.value}),t.addEventListener("blur",function(){var n=t.value.trim(),r=t.closest(".input-text-wrap").querySelector(".ghrp-plugin-link-status");if(r&&n!==e)if(n)if(function(t){return/^https?:\/\//i.test(t)||/[^\/\s]+\.[^\/\s]+/.test(t)}(n)){/^https?:\/\//i.test(n)||(n="https://"+n,t.value=n);try{new URL(n),r.innerHTML=f()}catch(t){r.innerHTML=l()}}else r.innerHTML='',window.ctbpFetch("GET","/wporg/validate",{value:n},function(t){r.innerHTML=t&&t.valid?f():l()},function(){r.innerHTML=l()});else r.innerHTML=""})}(y);var b=document.createElement("tr");b.className="hidden",t.style.display="none",t.parentNode.insertBefore(b,t.nextSibling),b.parentNode.insertBefore(i,b.nextSibling);var x=i.querySelector("input, select, textarea");x&&x.focus()}}document.querySelectorAll(".ghrp-edit-repo-btn").forEach(function(t){t.addEventListener("click",function(e){e.preventDefault();var n=t.closest("tr");n&&i(n)})});var a=document.getElementById("ghrp-remove-dialog"),s=document.getElementById("ghrp-remove-repo-input"),c=document.getElementById("ghrp-remove-cancel");document.querySelectorAll(".ghrp-remove-repo-btn").forEach(function(t){t.addEventListener("click",function(e){e.preventDefault();var n=t.dataset.repo;if(a&&s)s.value=n,a.showModal();else if(window.confirm(ctbpAdmin.i18n.confirmRemove)){var r=document.createElement("form");r.method="post",r.innerHTML='',document.body.appendChild(r),r.submit()}})}),c&&a&&c.addEventListener("click",function(){a.close()});var u=ctbpAdmin.i18n.pluginLinkHint||"Enter a valid URL or WordPress.org plugin slug";function f(t){return''+(t||ctbpAdmin.i18n.valid||"Valid")+""}function l(t){var e=t||u;return''+e+""}var p=document.getElementById("ghrp-conflict-dialog"),h=document.getElementById("ghrp-conflict-post-info"),v=document.getElementById("ghrp-conflict-confirm"),d=document.getElementById("ghrp-conflict-cancel");function g(t,e,n,r){var o=t.closest("td").querySelector(".ghrp-generate-spinner");o&&(o.style.display="none");var i=t.closest("td").querySelector(".ghrp-generate-status");if(i)if(e){var a=ctbpAdmin.i18n.editGeneratedPost||"Edit the generated post";i.innerHTML=e.edit_url?function(t,e){return''+e+""}(e.edit_url,a):f(ctbpAdmin.i18n.draftCreated||"Post created"),!1!==r&&function(t,e){var n=t.closest("tr");if(n&&e){var r=n.querySelector(".column-last_post");if(r){var o=e.tag?e.tag+" on "+e.date:e.date;r.innerHTML=''+document.createTextNode(o).textContent+"",r.style.transition="background-color 0.3s",r.style.backgroundColor="#dff0d8",setTimeout(function(){r.style.backgroundColor=""},1500)}}}(t,e)}else{var s=n||ctbpAdmin.i18n.notImplemented;i.innerHTML=l(s)}}function m(t){var e=t.closest("tr");e&&e.querySelectorAll(".row-actions a").forEach(function(t){t.dataset.ctbpHref=t.getAttribute("href"),t.removeAttribute("href"),t.style.pointerEvents="none",t.style.opacity="0.5"})}function y(t){var e=t.closest("tr");e&&e.querySelectorAll(".row-actions a").forEach(function(t){t.dataset.ctbpHref&&(t.setAttribute("href",t.dataset.ctbpHref),delete t.dataset.ctbpHref),t.style.pointerEvents="",t.style.opacity=""})}function b(t,e,n){p&&p.close(),t.focus(),t.disabled=!0,m(t);var r=t.closest("td").querySelector(".ghrp-generate-spinner");r&&(r.style.display="inline-block",r.classList.add("is-active")),window.ctbpFetch("POST","/releases/regenerate",{post_id:e},function(e){t.disabled=!1,y(t),g(t,e&&e.post,null,n)},function(e){t.disabled=!1,y(t),g(t,null,e&&e.message||null)})}var x=document.getElementById("ghrp-version-picker-dialog"),w=document.getElementById("ghrp-version-picker-select"),S=document.getElementById("ghrp-version-picker-confirm"),E=document.getElementById("ghrp-version-picker-cancel"),L=document.getElementById("ghrp-version-picker-conflict"),O=document.getElementById("ghrp-version-picker-conflict-text"),k=document.getElementById("ghrp-version-picker-backdate");function P(t,e){t.disabled=!0,m(t);var n=t.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="inline-block",n.classList.add("is-active"));var r=t.closest("td").querySelector(".ghrp-generate-status");r&&(r.innerHTML=''+ctbpAdmin.i18n.generating+""),window.ctbpFetch("POST","/releases/generate-draft",{repo:t.dataset.repo,tag:e||""},function(e){t.disabled=!1;var n=t.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="none");var r=!e||!1!==e.is_latest;if(e&&e.conflict){var o=function(){a(),b(t,s?s.id:0,r)},i=function(){a(),p&&p.close();var e=t.closest("td").querySelector(".ghrp-generate-status");e&&(e.innerHTML=""),y(t),t.focus()},a=function(){v&&v.removeEventListener("click",o),d&&d.removeEventListener("click",i)},s=e.post;h&&(h.textContent='"'+(s?s.title:"")+'" ('+(s?s.status:"")+")"),v&&v.addEventListener("click",o),d&&d.addEventListener("click",i),p?p.showModal():window.confirm(ctbpAdmin.i18n.regenerateConfirm||"A post already exists. Regenerate it?")&&b(t,s?s.id:0,r)}else y(t),g(t,e&&e.post,null,r)},function(e){t.disabled=!1,y(t),g(t,null,e&&e.message||null)})}function R(t,e,n){function r(){var t=w.options[w.selectedIndex];if(t){var e=t.value!==n,r="1"===t.dataset.hasPost;k&&(k.hidden=!e),L&&O&&(r?(O.textContent=ctbpAdmin.i18n.versionPickerConflict||"A post already exists for this release. Generating will create a new revision and keep the existing post date.",L.hidden=!1,S&&(S.textContent=ctbpAdmin.i18n.regenerate||"Regenerate")):(L.hidden=!0,S&&(S.textContent=ctbpAdmin.i18n.generatePost||"Generate post")))}}function o(){a();var e=w.value||"";x.close(),P(t,e)}function i(){a(),x.close();var e=t.closest("td").querySelector(".ghrp-generate-spinner");e&&(e.style.display="none");var n=t.closest("td").querySelector(".ghrp-generate-status");n&&(n.innerHTML=""),t.disabled=!1,y(t),t.focus()}function a(){S&&S.removeEventListener("click",o),E&&E.removeEventListener("click",i)}x&&w?(w.innerHTML="",e.forEach(function(t){var e=document.createElement("option");e.value=t.tag;var r=function(t){if(!t)return"";var e=new Date(t);return isNaN(e.getTime())?"":e.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}(t.published_at);e.textContent=t.tag+(r?" — "+r:"")+(t.has_post?" ("+(ctbpAdmin.i18n.postExists||"post exists")+")":""),e.dataset.hasPost=t.has_post?"1":"",e.dataset.postTitle=t.post_status&&t.post_status||"",e.dataset.postEditUrl=t.post_edit_url||"",e.dataset.published=t.published_at||"",t.tag===n&&(e.selected=!0),w.appendChild(e)}),r(),w.onchange=r,S&&S.addEventListener("click",o),E&&E.addEventListener("click",i),x.showModal()):P(t,"")}document.querySelectorAll(".ghrp-generate-draft").forEach(function(t){t.addEventListener("click",function(){t.disabled=!0,m(t);var e=t.closest("td").querySelector(".ghrp-generate-spinner");e&&(e.style.display="inline-block",e.classList.add("is-active"));var n=t.closest("td").querySelector(".ghrp-generate-status");n&&(n.innerHTML=""),window.ctbpFetch("GET","/releases/list",{repo:t.dataset.repo},function(e){var n=t.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="none");var r=e&&e.releases||[],o=e&&e.latest_tag||"";r.length<=1?P(t,""):(t.disabled=!1,y(t),R(t,r,o))},function(e){t.disabled=!1,y(t),g(t,null,e&&e.message||null)})})}),d&&p&&d.addEventListener("click",function(){p.close()})})}(); \ No newline at end of file +!function(){"use strict";var e={9306:function(e,t,n){var r=n(4901),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},5548:function(e,t,n){var r=n(3517),o=n(6823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a constructor")}},3506:function(e,t,n){var r=n(3925),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},6469:function(e,t,n){var r=n(8227),o=n(2360),i=n(4913).f,a=r("unscopables"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},7829:function(e,t,n){var r=n(8183).charAt;e.exports=function(e,t,n){return t+(n&&r(e,t).length||1)}},679:function(e,t,n){var r=n(1625),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},8551:function(e,t,n){var r=n(34),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},235:function(e,t,n){var r=n(9213).forEach,o=n(4598)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},7916:function(e,t,n){var r=n(6080),o=n(9565),i=n(8981),a=n(6319),s=n(4209),c=n(3517),u=n(6198),f=n(4659),l=n(4527),p=n(81),h=n(851),v=n(9539),d=Array;e.exports=function(e){var t=c(this),n=arguments.length,g=n>1?arguments[1]:void 0,m=void 0!==g;m&&(g=r(g,n>2?arguments[2]:void 0));var y,b,x,w,S,E,L=i(e),O=h(L),k=0;if(!O||this===d&&s(O))for(y=u(L),b=t?new this(y):d(y);y>k;k++)E=m?g(L[k],k):L[k],f(b,k,E);else for(b=t?new this:[],S=(w=p(L,O)).next;!(x=o(S,w)).done;k++){E=m?a(w,g,[x.value,k],!0):x.value;try{f(b,k,E)}catch(e){v(w,"throw",e)}}return l(b,k),b}},9617:function(e,t,n){var r=n(5397),o=n(5610),i=n(6198),a=function(e){return function(t,n,a){var s=r(t),c=i(s);if(0===c)return!e&&-1;var u,f=o(a,c);if(e&&n!==n){for(;c>f;)if((u=s[f++])!==u)return!0}else for(;c>f;f++)if((e||f in s)&&s[f]===n)return e||f||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},9213:function(e,t,n){var r=n(6080),o=n(7055),i=n(8981),a=n(6198),s=n(1469),c=n(4659),u=function(e){var t=1===e,n=2===e,u=3===e,f=4===e,l=6===e,p=7===e,h=5===e||l;return function(v,d,g){for(var m,y,b=i(v),x=o(b),w=a(x),S=r(d,g),E=0,L=0,O=t?s(v,w):n||p?s(v,0):void 0;w>E;E++)if((h||E in x)&&(y=S(m=x[E],E,b),e))if(t)c(O,E,y);else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:c(O,L++,m)}else switch(e){case 4:return!1;case 7:c(O,L++,m)}return l?-1:u||f?f:O}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},4598:function(e,t,n){var r=n(9039);e.exports=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})}},4527:function(e,t,n){var r=n(3724),o=n(4376),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!a(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},7680:function(e,t,n){var r=n(9504);e.exports=r([].slice)},4488:function(e,t,n){var r=n(7680),o=Math.floor,i=function(e,t){var n=e.length;if(n<8)for(var a,s,c=1;c0;)e[s]=e[--s];s!==c++&&(e[s]=a)}else for(var u=o(n/2),f=i(r(e,0,u),t),l=i(r(e,u),t),p=f.length,h=l.length,v=0,d=0;v0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},4215:function(e,t,n){var r=n(4576),o=n(2839),i=n(2195),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},6518:function(e,t,n){var r=n(4576),o=n(7347).f,i=n(6699),a=n(6840),s=n(9433),c=n(7740),u=n(2796);e.exports=function(e,t){var n,f,l,p,h,v=e.target,d=e.global,g=e.stat;if(n=d?r:g?r[v]||s(v,{}):r[v]&&r[v].prototype)for(f in t){if(p=t[f],l=e.dontCallGetSet?(h=o(n,f))&&h.value:n[f],!u(d?f:v+(g?".":"#")+f,e.forced)&&void 0!==l){if(typeof p==typeof l)continue;c(p,l)}(e.sham||l&&l.sham)&&i(p,"sham",!0),a(n,f,p,e)}}},9039:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},9228:function(e,t,n){n(7495);var r=n(9565),o=n(6840),i=n(7323),a=n(9039),s=n(8227),c=n(6699),u=s("species"),f=RegExp.prototype;e.exports=function(e,t,n,l){var p=s(e),h=!a(function(){var t={};return t[p]=function(){return 7},7!==""[e](t)}),v=h&&!a(function(){var t=!1,n=/a/;if("split"===e){var r={};r[u]=function(){return n},(n={constructor:r,flags:""})[p]=/./[p]}return n.exec=function(){return t=!0,null},n[p](""),!t});if(!h||!v||n){var d=/./[p],g=t(p,""[e],function(e,t,n,o,a){var s=t.exec;return s===i||s===f.exec?h&&!a?{done:!0,value:r(d,t,n,o)}:{done:!0,value:r(e,n,t,o)}:{done:!1}});o(String.prototype,e,g[0]),o(f,p,g[1])}l&&c(f[p],"sham",!0)}},8745:function(e,t,n){var r=n(616),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},6080:function(e,t,n){var r=n(7476),o=n(9306),i=n(616),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},616:function(e,t,n){var r=n(9039);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},9565:function(e,t,n){var r=n(616),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},350:function(e,t,n){var r=n(3724),o=n(9297),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),c=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},6706:function(e,t,n){var r=n(9504),o=n(9306);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},7476:function(e,t,n){var r=n(2195),o=n(9504);e.exports=function(e){if("Function"===r(e))return o(e)}},9504:function(e,t,n){var r=n(616),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},7751:function(e,t,n){var r=n(4576),o=n(4901);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},851:function(e,t,n){var r=n(6955),o=n(5966),i=n(4117),a=n(6269),s=n(8227)("iterator");e.exports=function(e){if(!i(e))return o(e,s)||o(e,"@@iterator")||a[r(e)]}},81:function(e,t,n){var r=n(9565),o=n(9306),i=n(8551),a=n(6823),s=n(851),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(o(n))return i(r(n,e));throw new c(a(e)+" is not iterable")}},5966:function(e,t,n){var r=n(9306),o=n(4117);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},2478:function(e,t,n){var r=n(9504),o=n(8981),i=Math.floor,a=r("".charAt),s=r("".replace),c=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,f=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,l,p){var h=n+e.length,v=r.length,d=f;return void 0!==l&&(l=o(l),d=u),s(p,d,function(o,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,h);case"<":u=l[c(s,1,-1)];break;default:var f=+s;if(0===f)return o;if(f>v){var p=i(f/10);return 0===p?o:p<=v?void 0===r[p-1]?a(s,1):r[p-1]+a(s,1):o}u=r[f-1]}return void 0===u?"":u})}},4576:function(e,t,n){var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(e,t,n){var r=n(9504),o=n(8981),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},421:function(e){e.exports={}},3138:function(e){e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},397:function(e,t,n){var r=n(7751);e.exports=r("document","documentElement")},5917:function(e,t,n){var r=n(3724),o=n(9039),i=n(4055);e.exports=!r&&!o(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},7055:function(e,t,n){var r=n(9504),o=n(9039),i=n(2195),a=Object,s=r("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===i(e)?s(e,""):a(e)}:a},3706:function(e,t,n){var r=n(9504),o=n(4901),i=n(7629),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},1181:function(e,t,n){var r,o,i,a=n(8622),s=n(4576),c=n(34),u=n(6699),f=n(9297),l=n(7629),p=n(6119),h=n(421),v="Object already initialized",d=s.TypeError,g=s.WeakMap;if(a||l.state){var m=l.state||(l.state=new g);m.get=m.get,m.has=m.has,m.set=m.set,r=function(e,t){if(m.has(e))throw new d(v);return t.facade=e,m.set(e,t),t},o=function(e){return m.get(e)||{}},i=function(e){return m.has(e)}}else{var y=p("state");h[y]=!0,r=function(e,t){if(f(e,y))throw new d(v);return t.facade=e,u(e,y,t),t},o=function(e){return f(e,y)?e[y]:{}},i=function(e){return f(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw new d("Incompatible receiver, "+e+" required");return n}}}},4209:function(e,t,n){var r=n(8227),o=n(6269),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},4376:function(e,t,n){var r=n(2195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},4901:function(e){var t="object"==typeof document&&document.all;e.exports="undefined"==typeof t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},3517:function(e,t,n){var r=n(9504),o=n(9039),i=n(4901),a=n(6955),s=n(7751),c=n(3706),u=function(){},f=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,p=r(l.exec),h=!l.test(u),v=function(e){if(!i(e))return!1;try{return f(u,[],e),!0}catch(e){return!1}},d=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!p(l,c(e))}catch(e){return!0}};d.sham=!0,e.exports=!f||o(function(){var e;return v(v.call)||!v(Object)||!v(function(){e=!0})||e})?d:v},2796:function(e,t,n){var r=n(9039),o=n(4901),i=/#|\.prototype\./,a=function(e,t){var n=c[s(e)];return n===f||n!==u&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",f=a.POLYFILL="P";e.exports=a},4117:function(e){e.exports=function(e){return null===e||void 0===e}},34:function(e,t,n){var r=n(4901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},3925:function(e,t,n){var r=n(34);e.exports=function(e){return r(e)||null===e}},6395:function(e){e.exports=!1},757:function(e,t,n){var r=n(7751),o=n(4901),i=n(1625),a=n(7040),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,s(e))}},2652:function(e,t,n){var r=n(6080),o=n(9565),i=n(8551),a=n(6823),s=n(4209),c=n(6198),u=n(1625),f=n(81),l=n(851),p=n(9539),h=TypeError,v=function(e,t){this.stopped=e,this.result=t},d=v.prototype;e.exports=function(e,t,n){var g,m,y,b,x,w,S,E=n&&n.that,L=!(!n||!n.AS_ENTRIES),O=!(!n||!n.IS_RECORD),k=!(!n||!n.IS_ITERATOR),P=!(!n||!n.INTERRUPTED),R=r(t,E),T=function(e){var t=g;return g=void 0,t&&p(t,"normal"),new v(!0,e)},j=function(e){return L?(i(e),P?R(e[0],e[1],T):R(e[0],e[1])):P?R(e,T):R(e)};if(O)g=e.iterator;else if(k)g=e;else{if(!(m=l(e)))throw new h(a(e)+" is not iterable");if(s(m)){for(y=0,b=c(e);b>y;y++)if((x=j(e[y]))&&u(d,x))return x;return new v(!1)}g=f(e,m)}for(w=O?e.next:g.next;!(S=o(w,g)).done;){var A=S.value;try{x=j(A)}catch(e){if(!g)throw e;p(g,"throw",e)}if("object"==typeof x&&x&&u(d,x))return x}return new v(!1)}},9539:function(e,t,n){var r=n(9565),o=n(8551),i=n(5966);e.exports=function(e,t,n){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw n;if(s)throw a;return o(a),n}},3994:function(e,t,n){var r=n(7657).IteratorPrototype,o=n(2360),i=n(6980),a=n(687),s=n(6269),c=function(){return this};e.exports=function(e,t,n,u){var f=t+" Iterator";return e.prototype=o(r,{next:i(+!u,n)}),a(e,f,!1,!0),s[f]=c,e}},1088:function(e,t,n){var r=n(6518),o=n(9565),i=n(6395),a=n(350),s=n(4901),c=n(3994),u=n(2787),f=n(2967),l=n(687),p=n(6699),h=n(6840),v=n(8227),d=n(6269),g=n(7657),m=a.PROPER,y=a.CONFIGURABLE,b=g.IteratorPrototype,x=g.BUGGY_SAFARI_ITERATORS,w=v("iterator"),S="keys",E="values",L="entries",O=function(){return this};e.exports=function(e,t,n,a,v,g,k){c(n,t,a);var P,R,T,j=function(e){if(e===v&&q)return q;if(!x&&e&&e in C)return C[e];switch(e){case S:case E:case L:return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",I=!1,C=e.prototype,U=C[w]||C["@@iterator"]||v&&C[v],q=!x&&U||j(v),B="Array"===t&&C.entries||U;if(B&&(P=u(B.call(new e)))!==Object.prototype&&P.next&&(i||u(P)===b||(f?f(P,b):s(P[w])||h(P,w,O)),l(P,A,!0,!0),i&&(d[A]=O)),m&&v===E&&U&&U.name!==E&&(!i&&y?p(C,"name",E):(I=!0,q=function(){return o(U,this)})),v)if(R={values:j(E),keys:g?q:j(S),entries:j(L)},k)for(T in R)(x||I||!(T in C))&&h(C,T,R[T]);else r({target:t,proto:!0,forced:x||I},R);return i&&!k||C[w]===q||h(C,w,q,{name:v}),d[t]=q,R}},7657:function(e,t,n){var r,o,i,a=n(9039),s=n(4901),c=n(34),u=n(2360),f=n(2787),l=n(6840),p=n(8227),h=n(6395),v=p("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=f(f(i)))!==Object.prototype&&(r=o):d=!0),!c(r)||a(function(){var e={};return r[v].call(e)!==e})?r={}:h&&(r=u(r)),s(r[v])||l(r,v,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},6269:function(e){e.exports={}},6198:function(e,t,n){var r=n(8014);e.exports=function(e){return r(e.length)}},283:function(e,t,n){var r=n(9504),o=n(9039),i=n(4901),a=n(9297),s=n(3724),c=n(350).CONFIGURABLE,u=n(3706),f=n(1181),l=f.enforce,p=f.get,h=String,v=Object.defineProperty,d=r("".slice),g=r("".replace),m=r([].join),y=s&&!o(function(){return 8!==v(function(){},"length",{value:8}).length}),b=String(String).split("String"),x=e.exports=function(e,t,n){"Symbol("===d(h(t),0,7)&&(t="["+g(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!a(e,"name")||c&&e.name!==t)&&(s?v(e,"name",{value:t,configurable:!0}):e.name=t),y&&n&&a(n,"arity")&&e.length!==n.arity&&v(e,"length",{value:n.arity});try{n&&a(n,"constructor")&&n.constructor?s&&v(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=l(e);return a(r,"source")||(r.source=m(b,"string"==typeof t?t:"")),e};Function.prototype.toString=x(function(){return i(this)&&p(this).source||u(this)},"toString")},741:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},1955:function(e,t,n){var r,o,i,a,s,c=n(4576),u=n(3389),f=n(6080),l=n(9225).set,p=n(8265),h=n(9544),v=n(4265),d=n(7860),g=n(6193),m=c.MutationObserver||c.WebKitMutationObserver,y=c.document,b=c.process,x=c.Promise,w=u("queueMicrotask");if(!w){var S=new p,E=function(){var e,t;for(g&&(e=b.domain)&&e.exit();t=S.get();)try{t()}catch(e){throw S.head&&r(),e}e&&e.enter()};h||g||d||!m||!y?!v&&x&&x.resolve?((a=x.resolve(void 0)).constructor=x,s=f(a.then,a),r=function(){s(E)}):g?r=function(){b.nextTick(E)}:(l=f(l,c),r=function(){l(E)}):(o=!0,i=y.createTextNode(""),new m(E).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),w=function(e){S.head||r(),S.add(e)}}e.exports=w},6043:function(e,t,n){var r=n(9306),o=TypeError,i=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw new o("Bad Promise constructor");t=e,n=r}),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},4213:function(e,t,n){var r=n(3724),o=n(9504),i=n(9565),a=n(9039),s=n(1072),c=n(3717),u=n(8773),f=n(8981),l=n(7055),p=Object.assign,h=Object.defineProperty,v=o([].concat);e.exports=!p||a(function(){if(r&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach(function(e){t[e]=e}),7!==p({},e)[n]||s(p({},t)).join("")!==o})?function(e,t){for(var n=f(e),o=arguments.length,a=1,p=c.f,h=u.f;o>a;)for(var d,g=l(arguments[a++]),m=p?v(s(g),p(g)):s(g),y=m.length,b=0;y>b;)d=m[b++],r&&!i(h,g,d)||(n[d]=g[d]);return n}:p},2360:function(e,t,n){var r,o=n(8551),i=n(6801),a=n(8727),s=n(421),c=n(397),u=n(4055),f=n(6119),l="prototype",p="script",h=f("IE_PROTO"),v=function(){},d=function(e){return"<"+p+">"+e+""},g=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}m="undefined"!=typeof document?document.domain&&r?g(r):function(){var e,t=u("iframe"),n="java"+p+":";return t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F}():g(r);for(var e=a.length;e--;)delete m[l][a[e]];return m()};s[h]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(v[l]=o(e),n=new v,v[l]=null,n[h]=e):n=m(),void 0===t?n:i.f(n,t)}},6801:function(e,t,n){var r=n(3724),o=n(8686),i=n(4913),a=n(8551),s=n(5397),c=n(1072);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=c(t),u=o.length,f=0;u>f;)i.f(e,n=o[f++],r[n]);return e}},4913:function(e,t,n){var r=n(3724),o=n(5917),i=n(8686),a=n(8551),s=n(6969),c=TypeError,u=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",h="writable";t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),"function"===typeof e&&"prototype"===t&&"value"in n&&h in n&&!n[h]){var r=f(e,t);r&&r[h]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:l in n?n[l]:r[l],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7347:function(e,t,n){var r=n(3724),o=n(9565),i=n(8773),a=n(6980),s=n(5397),c=n(6969),u=n(9297),f=n(5917),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=s(e),t=c(t),f)try{return l(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},8480:function(e,t,n){var r=n(1828),o=n(8727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},3717:function(e,t){t.f=Object.getOwnPropertySymbols},2787:function(e,t,n){var r=n(9297),o=n(4901),i=n(8981),a=n(6119),s=n(2211),c=a("IE_PROTO"),u=Object,f=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof u?f:null}},1625:function(e,t,n){var r=n(9504);e.exports=r({}.isPrototypeOf)},1828:function(e,t,n){var r=n(9504),o=n(9297),i=n(5397),a=n(9617).indexOf,s=n(421),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,f=[];for(n in r)!o(s,n)&&o(r,n)&&c(f,n);for(;t.length>u;)o(r,n=t[u++])&&(~a(f,n)||c(f,n));return f}},1072:function(e,t,n){var r=n(1828),o=n(8727);e.exports=Object.keys||function(e){return r(e,o)}},8773:function(e,t){var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2967:function(e,t,n){var r=n(6706),o=n(34),i=n(7750),a=n(3506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),a(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},3179:function(e,t,n){var r=n(2140),o=n(6955);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},4270:function(e,t,n){var r=n(9565),o=n(4901),i=n(34),a=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if("string"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a("Can't convert object to primitive value")}},5031:function(e,t,n){var r=n(7751),o=n(9504),i=n(8480),a=n(3717),s=n(8551),c=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(s(e)),n=a.f;return n?c(t,n(e)):t}},9167:function(e,t,n){var r=n(4576);e.exports=r},1103:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},916:function(e,t,n){var r=n(4576),o=n(550),i=n(4901),a=n(2796),s=n(3706),c=n(8227),u=n(4215),f=n(6395),l=n(9519),p=o&&o.prototype,h=c("species"),v=!1,d=i(r.PromiseRejectionEvent),g=a("Promise",function(){var e=s(o),t=e!==String(o);if(!t&&66===l)return!0;if(f&&(!p.catch||!p.finally))return!0;if(!l||l<51||!/native code/.test(e)){var n=new o(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((n.constructor={})[h]=r,!(v=n.then(function(){})instanceof r))return!0}return!t&&("BROWSER"===u||"DENO"===u)&&!d});e.exports={CONSTRUCTOR:g,REJECTION_EVENT:d,SUBCLASSING:v}},550:function(e,t,n){var r=n(4576);e.exports=r.Promise},3438:function(e,t,n){var r=n(8551),o=n(34),i=n(6043);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},537:function(e,t,n){var r=n(550),o=n(4428),i=n(916).CONSTRUCTOR;e.exports=i||!o(function(e){r.all(e).then(void 0,function(){})})},8265:function(e){var t=function(){this.head=null,this.tail=null};t.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},6682:function(e,t,n){var r=n(9565),o=n(8551),i=n(4901),a=n(2195),s=n(7323),c=TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var u=r(n,e,t);return null!==u&&o(u),u}if("RegExp"===a(e))return r(s,e,t);throw new c("RegExp#exec called on incompatible receiver")}},7323:function(e,t,n){var r=n(9565),o=n(9504),i=n(655),a=n(7979),s=n(8429),c=n(5745),u=n(2360),f=n(1181).get,l=n(3635),p=n(8814),h=c("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,d=v,g=o("".charAt),m=o("".indexOf),y=o("".replace),b=o("".slice),x=function(){var e=/a/,t=/b*/g;return r(v,e,"a"),r(v,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),w=s.BROKEN_CARET,S=void 0!==/()??/.exec("")[1],E=function(e,t){for(var n=e.groups=u(null),r=0;r0&&g(u,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==T&&"\r"!==T&&"\u2028"!==T&&"\u2029"!==T)&&(k="(?: (?:"+k+"))",R=" "+R,P++),n=new RegExp("^(?:"+k+")",O)}S&&(n=new RegExp("^"+k+"$(?!\\s)",O)),x&&(o=s.lastIndex);var j=r(v,L?n:s,R);return L?j?(j.input=u,j[0]=b(j[0],P),j.index=s.lastIndex,s.lastIndex+=j[0].length):s.lastIndex=0:x&&j&&(s.lastIndex=s.global?j.index+j[0].length:o),S&&j&&j.length>1&&r(h,j[0],n,function(){for(var e=1;eb)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},7750:function(e,t,n){var r=n(4117),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},3389:function(e,t,n){var r=n(4576),o=n(3724),i=Object.getOwnPropertyDescriptor;e.exports=function(e){if(!o)return r[e];var t=i(r,e);return t&&t.value}},7633:function(e,t,n){var r=n(7751),o=n(2106),i=n(8227),a=n(3724),s=i("species");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&o(t,s,{configurable:!0,get:function(){return this}})}},687:function(e,t,n){var r=n(4913).f,o=n(9297),i=n(8227)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},6119:function(e,t,n){var r=n(5745),o=n(3392),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},7629:function(e,t,n){var r=n(6395),o=n(4576),i=n(9433),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.versions=[])).push({version:"3.49.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(e,t,n){var r=n(7629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},2293:function(e,t,n){var r=n(8551),o=n(5548),i=n(4117),a=n(8227)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||i(n=r(s)[a])?t:o(n)}},8183:function(e,t,n){var r=n(9504),o=n(1291),i=n(655),a=n(7750),s=r("".charAt),c=r("".charCodeAt),u=r("".slice),f=function(e){return function(t,n){var r,f,l=i(a(t)),p=o(n),h=l.length;return p<0||p>=h?e?"":void 0:(r=c(l,p))<55296||r>56319||p+1===h||(f=c(l,p+1))<56320||f>57343?e?s(l,p):r:e?u(l,p,p+2):f-56320+(r-55296<<10)+65536}};e.exports={codeAt:f(!1),charAt:f(!0)}},6098:function(e,t,n){var r=n(9504),o=2147483647,i=/[^\0-\u007E]/,a=/[.\u3002\uFF0E\uFF61]/g,s="Overflow: input needs wider integers to process",c=RangeError,u=r(a.exec),f=Math.floor,l=String.fromCharCode,p=r("".charCodeAt),h=r([].join),v=r([].push),d=r("".replace),g=r("".split),m=r("".toLowerCase),y=function(e){return e+22+75*(e<26)},b=function(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;)e=f(e/35),r+=36;return f(r+36*e/(e+38))},x=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n=55296&&o<=56319&&n=a&&rf((o-u)/w))throw new c(s);for(u+=(x-a)*w,a=x,n=0;no)throw new c(s);if(r===a){for(var S=u,E=36;;){var L=E<=d?1:E>=d+26?26:E-d;if(S0?o(t,9007199254740991):0}},8981:function(e,t,n){var r=n(7750),o=Object;e.exports=function(e){return o(r(e))}},2777:function(e,t,n){var r=n(9565),o=n(34),i=n(757),a=n(5966),s=n(4270),c=n(8227),u=TypeError,f=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,c=a(e,f);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(e,t)}},6969:function(e,t,n){var r=n(2777),o=n(757);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},2140:function(e,t,n){var r={};r[n(8227)("toStringTag")]="z",e.exports="[object z]"===String(r)},655:function(e,t,n){var r=n(6955),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},6823:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},3392:function(e,t,n){var r=n(9504),o=0,i=Math.random(),a=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},7416:function(e,t,n){var r=n(9039),o=n(8227),i=n(3724),a=n(6395),s=o("iterator");e.exports=!r(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach(function(e,n){t.delete("b"),r+=n+e}),n.delete("a",2),n.delete("b",void 0),a&&(!e.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b"))||!t.size&&(a||!i)||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[s]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",void 0).host})},7040:function(e,t,n){var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(e,t,n){var r=n(3724),o=n(9039);e.exports=r&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},2812:function(e){var t=TypeError;e.exports=function(e,n){if(e=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)},"values");var d=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!f&&l&&"values"!==d.name)try{s(d,"name",{value:"values"})}catch(e){}},2010:function(e,t,n){var r=n(3724),o=n(350).EXISTS,i=n(9504),a=n(2106),s=Function.prototype,c=i(s.toString),u=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=i(u.exec);r&&!o&&a(s,"name",{configurable:!0,get:function(){try{return f(u,c(this))[1]}catch(e){return""}}})},9432:function(e,t,n){var r=n(6518),o=n(8981),i=n(1072);r({target:"Object",stat:!0,forced:n(9039)(function(){i(1)})},{keys:function(e){return i(o(e))}})},6099:function(e,t,n){var r=n(2140),o=n(6840),i=n(3179);r||o(Object.prototype,"toString",i,{unsafe:!0})},6499:function(e,t,n){var r=n(6518),o=n(9565),i=n(9306),a=n(6043),s=n(1103),c=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{all:function(e){var t=this,n=a.f(t),r=n.resolve,u=n.reject,f=s(function(){var n=i(t.resolve),a=[],s=0,f=1;c(e,function(e){var i=s++,c=!1;f++,o(n,t,e).then(function(e){c||(c=!0,a[i]=e,--f||r(a))},u)}),--f||r(a)});return f.error&&u(f.value),n.promise}})},2003:function(e,t,n){var r=n(6518),o=n(6395),i=n(916).CONSTRUCTOR,a=n(550),s=n(7751),c=n(4901),u=n(6840),f=a&&a.prototype;if(r({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&c(a)){var l=s("Promise").prototype.catch;f.catch!==l&&u(f,"catch",l,{unsafe:!0})}},436:function(e,t,n){var r,o,i,a,s=n(6518),c=n(6395),u=n(6193),f=n(4576),l=n(9167),p=n(9565),h=n(6840),v=n(2967),d=n(687),g=n(7633),m=n(9306),y=n(4901),b=n(34),x=n(679),w=n(2293),S=n(9225).set,E=n(1955),L=n(3138),O=n(1103),k=n(8265),P=n(1181),R=n(550),T=n(916),j=n(6043),A="Promise",I=T.CONSTRUCTOR,C=T.REJECTION_EVENT,U=T.SUBCLASSING,q=P.getterFor(A),B=P.set,M=R&&R.prototype,N=R,_=M,H=f.TypeError,F=f.document,D=f.process,z=j.f,G=z,$=!!(F&&F.createEvent&&f.dispatchEvent),V="unhandledrejection",W=function(e){var t;return!(!b(e)||!y(t=e.then))&&t},J=function(e,t){var n,r,o,i=t.value,a=1===t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&Z(t),t.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===e.promise?u(new H("Promise-chain cycle")):(r=W(n))?p(r,n,c,u):c(n)):u(i)}catch(e){f&&!o&&f.exit(),u(e)}},K=function(e,t){e.notified||(e.notified=!0,E(function(){for(var n,r=e.reactions;n=r.get();)J(n,e);e.notified=!1,t&&!e.rejection&&X(e)}))},Y=function(e,t,n){var r,o;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),f.dispatchEvent(r)):r={promise:t,reason:n},!C&&(o=f["on"+e])?o(r):e===V&&L("Unhandled promise rejection",n)},X=function(e){p(S,f,function(){var t,n=e.facade,r=e.value;if(Q(e)&&(t=O(function(){u?D.emit("unhandledRejection",r,n):Y(V,n,r)}),e.rejection=u||Q(e)?2:1,t.error))throw t.value})},Q=function(e){return 1!==e.rejection&&!e.parent},Z=function(e){p(S,f,function(){var t=e.facade;u?D.emit("rejectionHandled",t):Y("rejectionhandled",t,e.value)})},ee=function(e,t,n){return function(r){e(t,r,n)}},te=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,K(e,!0))},ne=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new H("Promise can't be resolved itself");var r=W(t);r?E(function(){var n={done:!1};try{p(r,t,ee(ne,n,e),ee(te,n,e))}catch(t){te(n,t,e)}}):(e.value=t,e.state=1,K(e,!1))}catch(t){te({done:!1},t,e)}}};if(I&&(_=(N=function(e){x(this,_),m(e),p(r,this);var t=q(this);try{e(ee(ne,t),ee(te,t))}catch(e){te(t,e)}}).prototype,(r=function(e){B(this,{type:A,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:null})}).prototype=h(_,"then",function(e,t){var n=q(this),r=z(w(this,N));return n.parent=!0,r.ok=!y(e)||e,r.fail=y(t)&&t,r.domain=u?D.domain:void 0,0===n.state?n.reactions.add(r):E(function(){J(r,n)}),r.promise}),o=function(){var e=new r,t=q(e);this.promise=e,this.resolve=ee(ne,t),this.reject=ee(te,t)},j.f=z=function(e){return e===N||e===i?new o(e):G(e)},!c&&y(R)&&M!==Object.prototype)){a=M.then,U||h(M,"then",function(e,t){var n=this;return new N(function(e,t){p(a,n,e,t)}).then(e,t)},{unsafe:!0});try{delete M.constructor}catch(e){}v&&v(M,_)}s({global:!0,constructor:!0,wrap:!0,forced:I},{Promise:N}),i=l.Promise,d(N,A,!1,!0),g(A)},3362:function(e,t,n){n(436),n(6499),n(2003),n(7743),n(1481),n(280)},7743:function(e,t,n){var r=n(6518),o=n(9565),i=n(9306),a=n(6043),s=n(1103),c=n(2652);r({target:"Promise",stat:!0,forced:n(537)},{race:function(e){var t=this,n=a.f(t),r=n.reject,u=s(function(){var a=i(t.resolve);c(e,function(e){o(a,t,e).then(n.resolve,r)})});return u.error&&r(u.value),n.promise}})},1481:function(e,t,n){var r=n(6518),o=n(6043);r({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(e){var t=o.f(this);return(0,t.reject)(e),t.promise}})},280:function(e,t,n){var r=n(6518),o=n(7751),i=n(6395),a=n(550),s=n(916).CONSTRUCTOR,c=n(3438),u=o("Promise"),f=i&&!s;r({target:"Promise",stat:!0,forced:i||s},{resolve:function(e){return c(f&&this===u?a:this,e)}})},7495:function(e,t,n){var r=n(6518),o=n(7323);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},8781:function(e,t,n){var r=n(350).PROPER,o=n(6840),i=n(8551),a=n(655),s=n(9039),c=n(1034),u="toString",f=RegExp.prototype,l=f[u],p=s(function(){return"/a/b"!==l.call({source:"a",flags:"b"})}),h=r&&l.name!==u;(p||h)&&o(f,u,function(){var e=i(this);return"/"+a(e.source)+"/"+a(c(e))},{unsafe:!0})},7337:function(e,t,n){var r=n(6518),o=n(9504),i=n(5610),a=RangeError,s=String.fromCharCode,c=String.fromCodePoint,u=o([].join);r({target:"String",stat:!0,arity:1,forced:!!c&&1!==c.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(i(t=+arguments[o],1114111)!==t)throw new a(t+" is not a valid code point");n[o++]=t<65536?s(t):s(55296+((t-=65536)>>10),t%1024+56320)}return u(n,"")}})},7764:function(e,t,n){var r=n(8183).charAt,o=n(655),i=n(1181),a=n(1088),s=n(2529),c="String Iterator",u=i.set,f=i.getterFor(c);a(String,"String",function(e){u(this,{type:c,string:o(e),index:0})},function(){var e,t=f(this),n=t.string,o=t.index;return o>=n.length?s(void 0,!0):(e=r(n,o),t.index+=e.length,s(e,!1))})},5440:function(e,t,n){var r=n(8745),o=n(9565),i=n(9504),a=n(9228),s=n(9039),c=n(8551),u=n(4901),f=n(34),l=n(1291),p=n(8014),h=n(655),v=n(7750),d=n(7829),g=n(5966),m=n(2478),y=n(1034),b=n(6682),x=n(8227)("replace"),w=Math.max,S=Math.min,E=i([].concat),L=i([].push),O=i("".indexOf),k=i("".slice),P=function(e){return void 0===e?e:String(e)},R="$0"==="a".replace(/./,"$0"),T=!!/./[x]&&""===/./[x]("a","$0");a("replace",function(e,t,n){var i=T?"$":"$0";return[function(e,n){var r=v(this),i=f(e)?g(e,x):void 0;return i?o(i,e,r,n):o(t,h(r),e,n)},function(e,o){var a=c(this),s=h(e),f=u(o);f||(o=h(o));var v=h(y(a));if("string"==typeof o&&!~O(o,i)&&!~O(o,"$<")&&!~O(v,"y")){var g=n(t,a,s,o);if(g.done)return g.value}var x,R=!!~O(v,"g");R&&(x=!!~O(v,"u")||!!~O(v,"v"),a.lastIndex=0);for(var T,j=[];null!==(T=b(a,s))&&(L(j,T),R);){""===h(T[0])&&(a.lastIndex=d(s,p(a.lastIndex),x))}for(var A="",I=0,C=0;C=I&&(A+=k(s,I,B)+U,I=B+q.length)}return A+k(s,I)}]},!!s(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})||!R||T)},2762:function(e,t,n){var r=n(6518),o=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},3500:function(e,t,n){var r=n(4576),o=n(7400),i=n(9296),a=n(235),s=n(6699),c=function(e){if(e&&e.forEach!==a)try{s(e,"forEach",a)}catch(t){e.forEach=a}};for(var u in o)o[u]&&c(r[u]&&r[u].prototype);c(i)},2953:function(e,t,n){var r=n(4576),o=n(7400),i=n(9296),a=n(3792),s=n(6699),c=n(687),u=n(8227)("iterator"),f=a.values,l=function(e,t){if(e){if(e[u]!==f)try{s(e,u,f)}catch(t){e[u]=f}if(c(e,t,!0),o[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var p in o)l(r[p]&&r[p].prototype,p);l(i,"DOMTokenList")},8406:function(e,t,n){n(3792),n(7337);var r=n(6518),o=n(4576),i=n(3389),a=n(7751),s=n(9565),c=n(9504),u=n(3724),f=n(7416),l=n(6840),p=n(2106),h=n(6279),v=n(687),d=n(3994),g=n(1181),m=n(679),y=n(4901),b=n(9297),x=n(6080),w=n(6955),S=n(8551),E=n(34),L=n(655),O=n(2360),k=n(6980),P=n(81),R=n(851),T=n(2529),j=n(2812),A=n(8227),I=n(4488),C=A("iterator"),U="URLSearchParams",q=U+"Iterator",B=g.set,M=g.getterFor(U),N=g.getterFor(q),_=i("fetch"),H=i("Request"),F=i("Headers"),D=H&&H.prototype,z=F&&F.prototype,G=o.TypeError,$=o.encodeURIComponent,V=String.fromCharCode,W=a("String","fromCodePoint"),J=parseInt,K=c("".charAt),Y=c([].join),X=c([].push),Q=c("".replace),Z=c([].shift),ee=c([].splice),te=c("".split),ne=c("".slice),re=c(/./.exec),oe=/\+/g,ie=/^[0-9a-f]+$/i,ae=function(e,t){var n=ne(e,t,t+2);return re(ie,n)?J(n,16):NaN},se=function(e){for(var t=0,n=128;n>0&&0!==(e&n);n>>=1)t++;return t},ce=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||t>1114111||t>=55296&&t<=57343||t<(n>3?65536:n>2?2048:n>1?128:0)?null:t},ue=function(e){for(var t=(e=Q(e,oe," ")).length,n="",r=0;rt){n+="%",r++;continue}var i=ae(e,r+1);if(i!==i){n+=o,r++;continue}r+=2;var a=se(i);if(0===a)o=V(i);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[i],c=1;ct||"%"!==K(e,r));){var u=ae(e,r+1);if(u!==u||u>191||u<128)break;if(1===c){if(224===i&&u<160)break;if(237===i&&u>159)break;if(240===i&&u<144)break;if(244===i&&u>143)break}X(s,u),r+=2,c++}if(s.length!==a){n+="�";continue}var f=ce(s);if(null===f){for(var l=0;l=t.length)return e.target=null,T(void 0,!0);var r=t[n];switch(e.kind){case"keys":return T(r.key,!1);case"values":return T(r.value,!1)}return T([r.key,r.value],!1)},!0),de=function(e){this.entries=[],this.url=null,void 0!==e&&(E(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===K(e,0)?ne(e,1):e:L(e)))};de.prototype={type:U,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,c,u=this.entries,f=R(e);if(f)for(n=(t=P(e,f)).next;!(r=s(n,t)).done;){if(i=(o=P(S(r.value))).next,(a=s(i,o)).done||(c=s(i,o)).done||!s(i,o).done)throw new G("Expected sequence with length 2");X(u,{key:L(a.value),value:L(c.value)})}else for(var l in e)b(e,l)&&X(u,{key:l,value:L(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,o=te(e,"&"),i=0;i0?arguments[0]:void 0));u||(this.size=e.entries.length)},me=ge.prototype;if(h(me,{append:function(e,t){var n=M(this);j(arguments.length,2),X(n.entries,{key:L(e),value:L(t)}),u||this.size++,n.updateURL()},delete:function(e){for(var t=M(this),n=j(arguments.length,1),r=t.entries,o=L(e),i=n<2?void 0:arguments[1],a=void 0===i?i:L(i),s=0;st.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=M(this).entries,r=x(e,arguments.length>1?arguments[1]:void 0),o=0;o1?xe(arguments[1]):{})}}),y(H)){var we=function(e){return m(this,D),new H(e,arguments.length>1?xe(arguments[1]):{})};D.constructor=we,we.prototype=D,r({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:we})}}e.exports={URLSearchParams:ge,getState:M}},8408:function(e,t,n){n(8406)},5806:function(e,t,n){n(7764);var r,o=n(6518),i=n(3724),a=n(7416),s=n(4576),c=n(6080),u=n(9504),f=n(6840),l=n(2106),p=n(679),h=n(9297),v=n(4213),d=n(7916),g=n(7680),m=n(8183).codeAt,y=n(6098),b=n(655),x=n(687),w=n(2812),S=n(8406),E=n(1181),L=E.set,O=E.getterFor("URL"),k=S.URLSearchParams,P=S.getState,R=s.URL,T=s.TypeError,j=s.encodeURIComponent,A=s.parseInt,I=Math.floor,C=Math.pow,U=u("".charAt),q=u(/./.exec),B=u([].join),M=u(1.1.toString),N=u([].pop),_=u([].push),H=u("".replace),F=u([].shift),D=u("".split),z=u("".slice),G=u("".toLowerCase),$=u([].unshift),V="Invalid scheme",W="Invalid host",J="Invalid port",K=/[a-z]/i,Y=/[\d+\-.a-z]/i,X=/\d/,Q=/^0x/i,Z=/^[0-7]+$/,ee=/^\d+$/,te=/^[\da-f]+$/i,ne=/[\0\t\n\r #%/:<>?@[\\\]^|]/,re=/[\0\t\n\r #/:<>?@[\\\]^|]/,oe=/^[\u0000-\u0020]+/,ie=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ae=/[\t\n\r]/g,se=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)$(t,e%256),e=I(e/256);return B(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n?r:t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=M(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},ce={},ue=v({},ce,{" ":1,'"':1,"#":1,"<":1,">":1}),fe=v({},ue,{"'":1}),le=v({},ce,{" ":1,'"':1,"<":1,">":1,"`":1}),pe=v({},le,{"#":1,"?":1,"{":1,"}":1,"^":1}),he=v({},pe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ve=function(e,t){var n=m(e,0);return n>=32&&n<127&&!h(t,e)?e:"'"===e&&h(t,e)?"%27":j(e)},de={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ge=function(e,t){var n;return 2===e.length&&q(K,U(e,0))&&(":"===(n=U(e,1))||!t&&"|"===n)},me=function(e){var t;return e.length>1&&ge(z(e,0,2))&&(2===e.length||"/"===(t=U(e,2))||"\\"===t||"?"===t||"#"===t)},ye=function(e){return"."===e||"%2e"===G(e)},be=function(e){return".."===(e=G(e))||"%2e."===e||".%2e"===e||"%2e%2e"===e},xe={},we={},Se={},Ee={},Le={},Oe={},ke={},Pe={},Re={},Te={},je={},Ae={},Ie={},Ce={},Ue={},qe={},Be={},Me={},Ne={},_e={},He={},Fe=function(e,t,n){var r,o,i,a=b(e);if(t){if(o=this.parse(a))throw new T(o);this.searchParams=null}else{if(void 0!==n&&(r=new Fe(n,!0)),o=this.parse(a,null,r))throw new T(o);(i=P(new k)).bindURL(this),this.searchParams=i}};Fe.prototype={type:"URL",parse:function(e,t,n){var o,i,a,s,c=this,u=t||xe,f=0,l="",p=!1,v=!1,m=!1;for(e=b(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=H(e,oe,""),e=H(e,ie,"$1")),e=H(e,ae,""),o=d(e);f<=o.length;){switch(i=o[f],u){case xe:if(!i||!q(K,i)){if(t)return V;u=Se;continue}l+=G(i),u=we;break;case we:if(i&&q(Y,i))l+=G(i);else{if(":"!==i){if(t)return V;l="",u=Se,f=0;continue}if(t&&(c.isSpecial()!==h(de,l)||"file"===l&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&""===c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&de[c.scheme]===c.port&&(c.port=null));l="","file"===c.scheme?u=Ce:c.isSpecial()&&n&&n.scheme===c.scheme?u=Ee:c.isSpecial()?u=Pe:"/"===o[f+1]?(u=Le,f++):(c.cannotBeABaseURL=!0,_(c.path,""),u=Ne)}break;case Se:if(!n||n.cannotBeABaseURL&&"#"!==i)return V;if(n.cannotBeABaseURL&&"#"===i){c.scheme=n.scheme,c.path=g(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,u=He;break}u="file"===n.scheme?Ce:Oe;continue;case Ee:if("/"!==i||"/"!==o[f+1]){u=Oe;continue}u=Re,f++;break;case Le:if("/"===i){u=Te;break}u=Me;continue;case Oe:if(c.scheme=n.scheme,i===r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query;else if("/"===i||"\\"===i&&c.isSpecial())u=ke;else if("?"===i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query="",u=_e;else{if("#"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.path.length&&c.path.length--,u=Me;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=g(n.path),c.query=n.query,c.fragment="",u=He}break;case ke:if(!c.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=Me;continue}u=Te}else u=Re;break;case Pe:if(u=Re,"/"!==i||"/"!==o[f+1])continue;f++;break;case Re:if("/"!==i&&"\\"!==i){u=Te;continue}break;case Te:if("@"===i){p&&(l="%40"+l),p=!0,a=d(l);for(var y=0;y65535)return J;c.port=c.isSpecial()&&S===de[c.scheme]?null:S,l=""}if(t)return;u=Be;continue}return J}l+=i;break;case Ce:if(c.scheme="file",c.host="","/"===i||"\\"===i)u=Ue;else{if(!n||"file"!==n.scheme){u=Me;continue}switch(i){case r:c.host=n.host,c.path=g(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=g(n.path),c.query="",u=_e;break;case"#":c.host=n.host,c.path=g(n.path),c.query=n.query,c.fragment="",u=He;break;default:c.host=n.host,me(B(g(o,f),""))||(c.path=g(n.path),c.shortenPath()),u=Me;continue}}break;case Ue:if("/"===i||"\\"===i){u=qe;break}n&&"file"===n.scheme&&(c.host=n.host,!me(B(g(o,f),""))&&ge(n.path[0],!0)&&_(c.path,n.path[0])),u=Me;continue;case qe:if(i===r||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&ge(l))u=Me;else if(""===l){if(c.host="",t)return;u=Be}else{if(s=c.parseHost(l))return s;if("localhost"===c.host&&(c.host=""),t)return;l="",u=Be}continue}l+=i;break;case Be:if(c.isSpecial()){if(u=Me,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==r&&(u=Me,"/"!==i))continue}else c.fragment="",u=He;else c.query="",u=_e;break;case Me:if(i===r||"/"===i||"\\"===i&&c.isSpecial()||!t&&("?"===i||"#"===i)){if(be(l)?(c.shortenPath(),"/"===i||"\\"===i&&c.isSpecial()||_(c.path,"")):ye(l)?"/"===i||"\\"===i&&c.isSpecial()||_(c.path,""):("file"===c.scheme&&!c.path.length&&ge(l)&&(null!==c.host&&""!==c.host&&(c.host=""),l=U(l,0)+":"),_(c.path,l)),l="","file"===c.scheme&&(i===r||"?"===i||"#"===i))for(;c.path.length>1&&""===c.path[0];)F(c.path);"?"===i?(c.query="",u=_e):"#"===i&&(c.fragment="",u=He)}else l+=ve(i,pe);break;case Ne:"?"===i?(c.query="",u=_e):"#"===i?(c.fragment="",u=He):i!==r&&(c.path[0]+=ve(i,ce));break;case _e:t||"#"!==i?i!==r&&(c.query+=ve(i,c.isSpecial()?fe:ue)):(c.fragment="",u=He);break;case He:i!==r&&(c.fragment+=ve(i,le))}f++}},parseHost:function(e){var t,n,r;if("["===U(e,0)){if("]"!==U(e,e.length-1))return W;if(t=function(e){var t,n,r,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,p=function(){return U(e,l)};if(":"===p()){if(":"!==U(e,1))return;l+=2,f=++u}for(;p();){if(8===u)return;if(":"!==p()){for(t=n=0;n<4&&q(te,p());)t=16*t+A(p(),16),l++,n++;if("."===p()){if(0===n)return;if(l-=n,u>6)return;for(r=0;p();){if(o=null,r>0){if(!("."===p()&&r<4))return;l++}if(!q(X,p()))return;for(;q(X,p());){if(i=A(p(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!==++r&&4!==r||u++}if(4!==r)return;break}if(":"===p()){if(l++,!p())return}else if(p())return;c[u++]=t}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(a=u-f,u=7;0!==u&&a>0;)s=c[u],c[u--]=c[f+a-1],c[f+--a]=s;else if(8!==u)return;return c}(z(e,1,-1)),!t)return W;this.host=t}else if(this.isSpecial()){if(e=y(e),q(ne,e))return W;if(function(e){var t,n,r=D(e,".");if(""===r[r.length-1]){if(1===r.length)return!1;r.length--}return t=r[r.length-1],!!q(ee,t)||!!q(Q,t)&&(""===(n=z(t,2))||!!q(te,n))}(e)){if(t=function(e){var t,n,r,o,i,a,s,c=D(e,".");if(c.length&&""===c[c.length-1]&&c.length--,(t=c.length)>4)return null;for(n=[],r=0;r1&&"0"===U(o,0)&&(i=q(Q,o)?16:8,o=z(o,8===i?1:2)),""===o)a=0;else{if(!q(10===i?ee:8===i?Z:te,o))return null;a=A(o,i)}_(n,a)}for(r=0;r=C(256,5-t))return null}else if(a>255)return null;for(s=N(n),r=0;r1&&""===a[0]&&(u+="/."),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+B(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw new T(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new De(this.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+se(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(b(e)+":",xe)},getUsername:function(){return this.username},setUsername:function(e){var t=d(b(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n1?arguments[1]:void 0,r=L(t,new Fe(e,!1,n));i||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},ze=De.prototype,Ge=function(e,t){return{get:function(){return O(this)[e]()},set:t&&function(e){return O(this)[t](e)},configurable:!0,enumerable:!0}};if(i&&(l(ze,"href",Ge("serialize","setHref")),l(ze,"origin",Ge("getOrigin")),l(ze,"protocol",Ge("getProtocol","setProtocol")),l(ze,"username",Ge("getUsername","setUsername")),l(ze,"password",Ge("getPassword","setPassword")),l(ze,"host",Ge("getHost","setHost")),l(ze,"hostname",Ge("getHostname","setHostname")),l(ze,"port",Ge("getPort","setPort")),l(ze,"pathname",Ge("getPathname","setPathname")),l(ze,"search",Ge("getSearch","setSearch")),l(ze,"searchParams",Ge("getSearchParams")),l(ze,"hash",Ge("getHash","setHash"))),f(ze,"toJSON",function(){return O(this).serialize()},{enumerable:!0}),f(ze,"toString",function(){return O(this).serialize()},{enumerable:!0}),R){var $e=R.createObjectURL,Ve=R.revokeObjectURL;$e&&f(De,"createObjectURL",c($e,R)),Ve&&f(De,"revokeObjectURL",c(Ve,R))}x(De,"URL"),o({global:!0,constructor:!0,forced:!a,sham:!i},{URL:De})},3296:function(e,t,n){n(5806)},7208:function(e,t,n){var r=n(6518),o=n(9565);r({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n(3418),n(3792),n(2010),n(9432),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(2762),n(3500),n(2953),n(3296),n(7208),n(8408);document.addEventListener("DOMContentLoaded",function(){var e=Array.from(document.querySelectorAll('[role="tab"]')),t=(Array.from(document.querySelectorAll('[role="tabpanel"]')),!1);e.forEach(function(n,r){n.addEventListener("click",function(e){!t||window.confirm(ctbpAdmin.i18n.unsavedChanges)||e.preventDefault()}),n.addEventListener("keydown",function(t){var n=null;"ArrowRight"===t.key?n=(r+1)%e.length:"ArrowLeft"===t.key&&(n=(r-1+e.length)%e.length),null!==n&&(t.preventDefault(),e[n].focus(),e[n].click())})}),document.querySelectorAll("input, select, textarea").forEach(function(e){e.addEventListener("change",function(){t=!0})}),document.querySelectorAll("form").forEach(function(e){e.addEventListener("submit",function(){t=!1})}),window.ctbpFetch=function(e,t,n,r,o){var i="GET"===e.toUpperCase(),a=ctbpAdmin.restUrl.replace(/\/$/,"")+t;i&&n&&Object.keys(n).length&&(a+="?"+new URLSearchParams(n).toString());var s={method:e.toUpperCase(),headers:{"X-WP-Nonce":ctbpAdmin.restNonce}};i||(s.headers["Content-Type"]="application/json",s.body=JSON.stringify(n||{})),fetch(a,s).then(function(e){return e.json().then(function(t){return{ok:e.ok,json:t}})}).then(function(e){e.ok?"function"===typeof r&&r(e.json):"function"===typeof o&&o({message:e.json.message||ctbpAdmin.i18n.notImplemented})}).catch(function(){"function"===typeof o&&o({message:ctbpAdmin.i18n.notImplemented})})};var n=document.getElementById("ghrp-test-notification");n&&n.addEventListener("click",function(){var e=document.getElementById("ghrp-test-notification-result"),t=n.parentNode.querySelector(".ghrp-test-notification-spinner");t&&(t.style.display="inline-block",t.classList.add("is-active")),e&&(e.textContent=""),window.ctbpFetch("POST","/notifications/test",{},function(n){t&&(t.classList.remove("is-active"),t.style.display="none"),e&&(e.innerHTML=l(n.message||"Sent!")+" "+(n.message||"Sent!"))},function(n){if(t&&(t.classList.remove("is-active"),t.style.display="none"),e){var r=n&&n.message?n.message:"Failed to send test email.";e.innerHTML=p(r)+" "+r}})});var r=document.getElementById("ghrp-refresh-repos");r&&r.addEventListener("click",function(){var e=document.getElementById("ghrp-refresh-repos-result"),t=r.parentNode.querySelector(".ghrp-refresh-repos-spinner");t&&(t.style.display="inline-block",t.classList.add("is-active")),e&&(e.textContent=""),window.ctbpFetch("POST","/repos/refresh",{},function(n){if(t&&(t.classList.remove("is-active"),t.style.display="none"),e){var r=n&&n.message?n.message:"Refreshed.";e.innerHTML=l(r)+" "+r}},function(n){if(t&&(t.classList.remove("is-active"),t.style.display="none"),e){var r=n&&n.message?n.message:"Failed to refresh repository list.";e.innerHTML=p(r)+" "+r}})});var o=document.getElementById("ghrp-inline-edit");function i(){var e=document.querySelector(".wp-list-table tbody > .ghrp-repo-edit-row");if(e){var t=e.previousElementSibling,n=t?t.previousElementSibling:null,r=n?n.querySelector(".ghrp-edit-repo-btn"):null;n&&(n.style.display=""),t&&t.classList.contains("hidden")&&t.remove(),e.remove(),r&&r.focus()}}function a(e){if(i(),o){var t=e.dataset.repo||"",n=e.dataset.displayName||"",r=o.querySelector("tr").cloneNode(!0),a=r.querySelector(".inline-edit-legend");a&&(a.textContent=(ctbpAdmin.i18n.editLabel||"Edit:")+" "+n);var s={display_name:e.dataset.displayName||"",plugin_link:e.dataset.pluginLink||"",tags:e.dataset.tags||""};Object.keys(s).forEach(function(e){var n=r.querySelector('[data-field="'+e+'"]');n&&(n.value=s[e],n.name="repos["+t+"]["+e+"]")});var c=r.querySelector('[data-field="post_status"]');c&&(c.name="repos["+t+"][post_status]",c.value=e.dataset.postStatus||"draft");var u=r.querySelector(".ghrp-tpl-cat-hidden");u&&(u.name="repos["+t+"][categories][]");var f=[];try{f=JSON.parse(e.dataset.categories||"[]")}catch(e){f=[]}r.querySelectorAll('.ghrp-tpl-categories input[type="checkbox"]').forEach(function(e){e.name="repos["+t+"][categories][]",e.checked=-1!==f.indexOf(parseInt(e.value,10))});var h=r.querySelector(".ghrp-tpl-author");h&&(h.name="repos["+t+"][author]",h.value=e.dataset.author||"0");var v=r.querySelector('[data-field="paused"]');v&&(v.name="repos["+t+"][paused]",v.checked="1"===e.dataset.paused);var d=parseInt(e.dataset.featuredImage||"0",10),g=r.querySelector('[data-field="featured_image"]');g&&(g.name="repos["+t+"][featured_image]",g.value=d),function(e,t){var n=e.querySelector(".ghrp-select-image"),r=e.querySelector(".ghrp-remove-image"),o=e.querySelector(".ghrp-featured-image-preview"),i=e.querySelector('[data-field="featured_image"]');if(!n||!i)return;if(t>0&&o){o.innerHTML='';var a=o.querySelector("img"),s=wp.media.attachment(t);s.fetch().then(function(){var e=s.get("sizes")&&s.get("sizes").thumbnail?s.get("sizes").thumbnail.url:s.get("url");a&&(a.src=e)}),r&&(r.style.display="")}n.addEventListener("click",function(e){e.preventDefault();var t=wp.media({title:ctbpAdmin.i18n.selectImage||"Select Featured Image",button:{text:ctbpAdmin.i18n.useImage||"Use this image"},multiple:!1,library:{type:"image"}});t.on("select",function(){var e=t.state().get("selection").first().toJSON();if(i.value=e.id,o){var n=e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url;o.innerHTML=''}r&&(r.style.display="")}),t.open()}),r&&r.addEventListener("click",function(e){e.preventDefault(),i.value="0",o&&(o.innerHTML=""),r.style.display="none"})}(r,d);var m=r.querySelector(".ghrp-cancel-edit");m&&m.addEventListener("click",i);var y=r.querySelector(".ghrp-plugin-link-input");y&&function(e){var t="";e.addEventListener("focus",function(){t=e.value}),e.addEventListener("blur",function(){var n=e.value.trim(),r=e.closest(".input-text-wrap").querySelector(".ghrp-plugin-link-status");if(r&&n!==t)if(n)if(function(e){return/^https?:\/\//i.test(e)||/[^\/\s]+\.[^\/\s]+/.test(e)}(n)){/^https?:\/\//i.test(n)||(n="https://"+n,e.value=n);try{new URL(n),r.innerHTML=l()}catch(e){r.innerHTML=p()}}else r.innerHTML='',window.ctbpFetch("GET","/wporg/validate",{value:n},function(e){r.innerHTML=e&&e.valid?l():p()},function(){r.innerHTML=p()});else r.innerHTML=""})}(y);var b=document.createElement("tr");b.className="hidden",e.style.display="none",e.parentNode.insertBefore(b,e.nextSibling),b.parentNode.insertBefore(r,b.nextSibling);var x=r.querySelector("input, select, textarea");x&&x.focus()}}document.querySelectorAll(".ghrp-edit-repo-btn").forEach(function(e){e.addEventListener("click",function(t){t.preventDefault();var n=e.closest("tr");n&&a(n)})});var s=document.getElementById("ghrp-remove-dialog"),c=document.getElementById("ghrp-remove-repo-input"),u=document.getElementById("ghrp-remove-cancel");document.querySelectorAll(".ghrp-remove-repo-btn").forEach(function(e){e.addEventListener("click",function(t){t.preventDefault();var n=e.dataset.repo;if(s&&c)c.value=n,s.showModal();else if(window.confirm(ctbpAdmin.i18n.confirmRemove)){var r=document.createElement("form");r.method="post",r.innerHTML='',document.body.appendChild(r),r.submit()}})}),u&&s&&u.addEventListener("click",function(){s.close()});var f=ctbpAdmin.i18n.pluginLinkHint||"Enter a valid URL or WordPress.org plugin slug";function l(e){return''+(e||ctbpAdmin.i18n.valid||"Valid")+""}function p(e){var t=e||f;return''+t+""}var h=document.getElementById("ghrp-conflict-dialog"),v=document.getElementById("ghrp-conflict-post-info"),d=document.getElementById("ghrp-conflict-confirm"),g=document.getElementById("ghrp-conflict-cancel");function m(e,t,n,r){var o=e.closest("td").querySelector(".ghrp-generate-spinner");o&&(o.style.display="none");var i=e.closest("td").querySelector(".ghrp-generate-status");if(i)if(t){var a=ctbpAdmin.i18n.editGeneratedPost||"Edit the generated post";i.innerHTML=t.edit_url?function(e,t){return''+t+""}(t.edit_url,a):l(ctbpAdmin.i18n.draftCreated||"Post created"),!1!==r&&function(e,t){var n=e.closest("tr");if(n&&t){var r=n.querySelector(".column-last_post");if(r){var o=t.tag?t.tag+" on "+t.date:t.date;r.innerHTML=''+document.createTextNode(o).textContent+"",r.style.transition="background-color 0.3s",r.style.backgroundColor="#dff0d8",setTimeout(function(){r.style.backgroundColor=""},1500)}}}(e,t)}else{var s=n||ctbpAdmin.i18n.notImplemented;i.innerHTML=p(s)}}function y(e){var t=e.closest("tr");t&&t.querySelectorAll(".row-actions a").forEach(function(e){e.dataset.ctbpHref=e.getAttribute("href"),e.removeAttribute("href"),e.style.pointerEvents="none",e.style.opacity="0.5"})}function b(e){var t=e.closest("tr");t&&t.querySelectorAll(".row-actions a").forEach(function(e){e.dataset.ctbpHref&&(e.setAttribute("href",e.dataset.ctbpHref),delete e.dataset.ctbpHref),e.style.pointerEvents="",e.style.opacity=""})}function x(e,t,n){h&&h.close(),e.focus(),e.disabled=!0,y(e);var r=e.closest("td").querySelector(".ghrp-generate-spinner");r&&(r.style.display="inline-block",r.classList.add("is-active")),window.ctbpFetch("POST","/releases/regenerate",{post_id:t},function(t){e.disabled=!1,b(e),m(e,t&&t.post,null,n)},function(t){e.disabled=!1,b(e),m(e,null,t&&t.message||null)})}var w=document.getElementById("ghrp-version-picker-dialog"),S=document.getElementById("ghrp-version-picker-select"),E=document.getElementById("ghrp-version-picker-confirm"),L=document.getElementById("ghrp-version-picker-cancel"),O=document.getElementById("ghrp-version-picker-conflict"),k=document.getElementById("ghrp-version-picker-conflict-text"),P=document.getElementById("ghrp-version-picker-backdate");function R(e,t){e.disabled=!0,y(e);var n=e.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="inline-block",n.classList.add("is-active"));var r=e.closest("td").querySelector(".ghrp-generate-status");r&&(r.innerHTML=''+ctbpAdmin.i18n.generating+""),window.ctbpFetch("POST","/releases/generate-draft",{repo:e.dataset.repo,tag:t||""},function(t){e.disabled=!1;var n=e.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="none");var r=!t||!1!==t.is_latest;if(t&&t.conflict){var o=function(){a(),x(e,s?s.id:0,r)},i=function(){a(),h&&h.close();var t=e.closest("td").querySelector(".ghrp-generate-status");t&&(t.innerHTML=""),b(e),e.focus()},a=function(){d&&d.removeEventListener("click",o),g&&g.removeEventListener("click",i)},s=t.post;v&&(v.textContent='"'+(s?s.title:"")+'" ('+(s?s.status:"")+")"),d&&d.addEventListener("click",o),g&&g.addEventListener("click",i),h?h.showModal():window.confirm(ctbpAdmin.i18n.regenerateConfirm||"A post already exists. Regenerate it?")&&x(e,s?s.id:0,r)}else b(e),m(e,t&&t.post,null,r)},function(t){e.disabled=!1,b(e),m(e,null,t&&t.message||null)})}function T(e,t,n){function r(){var e=S.options[S.selectedIndex];if(e){var t=e.value!==n,r="1"===e.dataset.hasPost;P&&(P.hidden=!t),O&&k&&(r?(k.textContent=ctbpAdmin.i18n.versionPickerConflict||"A post already exists for this release. Generating will create a new revision and keep the existing post date.",O.hidden=!1,E&&(E.textContent=ctbpAdmin.i18n.regenerate||"Regenerate")):(O.hidden=!0,E&&(E.textContent=ctbpAdmin.i18n.generatePost||"Generate post")))}}function o(){a();var t=S.value||"";w.close(),R(e,t)}function i(){a(),w.close();var t=e.closest("td").querySelector(".ghrp-generate-spinner");t&&(t.style.display="none");var n=e.closest("td").querySelector(".ghrp-generate-status");n&&(n.innerHTML=""),e.disabled=!1,b(e),e.focus()}function a(){E&&E.removeEventListener("click",o),L&&L.removeEventListener("click",i)}w&&S?(S.innerHTML="",t.forEach(function(e){var t=document.createElement("option");t.value=e.tag;var r=function(e){if(!e)return"";var t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}(e.published_at);t.textContent=e.tag+(r?" — "+r:"")+(e.has_post?" ("+(ctbpAdmin.i18n.postExists||"post exists")+")":""),t.dataset.hasPost=e.has_post?"1":"",t.dataset.postTitle=e.post_status&&e.post_status||"",t.dataset.postEditUrl=e.post_edit_url||"",t.dataset.published=e.published_at||"",e.tag===n&&(t.selected=!0),S.appendChild(t)}),r(),S.onchange=r,E&&E.addEventListener("click",o),L&&L.addEventListener("click",i),w.showModal()):R(e,"")}document.querySelectorAll(".ghrp-generate-draft").forEach(function(e){e.addEventListener("click",function(){e.disabled=!0,y(e);var t=e.closest("td").querySelector(".ghrp-generate-spinner");t&&(t.style.display="inline-block",t.classList.add("is-active"));var n=e.closest("td").querySelector(".ghrp-generate-status");n&&(n.innerHTML=""),window.ctbpFetch("GET","/releases/list",{repo:e.dataset.repo},function(t){var n=e.closest("td").querySelector(".ghrp-generate-spinner");n&&(n.style.display="none");var r=t&&t.releases||[],o=t&&t.latest_tag||"";r.length<=1?R(e,""):(e.disabled=!1,b(e),T(e,r,o))},function(t){e.disabled=!1,b(e),m(e,null,t&&t.message||null)})})}),g&&h&&g.addEventListener("click",function(){h.close()})})}(); \ No newline at end of file diff --git a/includes/classes/Admin/Admin_Page.php b/includes/classes/Admin/Admin_Page.php index 52bf9df..1d684ab 100644 --- a/includes/classes/Admin/Admin_Page.php +++ b/includes/classes/Admin/Admin_Page.php @@ -489,6 +489,16 @@ public function register_rest_routes(): void { ] ); + register_rest_route( + 'ghrp/v1', + '/repos/refresh', + [ + 'methods' => \WP_REST_Server::CREATABLE, + 'callback' => [ $this, 'rest_refresh_accessible_repos' ], + 'permission_callback' => [ $this, 'rest_permission_check' ], + ] + ); + register_rest_route( 'ghrp/v1', '/wporg/validate', @@ -979,6 +989,40 @@ public function rest_send_test_notification(): \WP_REST_Response|\WP_Error { ); } + /** + * REST handler: clears and re-fetches the cached list of repositories + * accessible to the configured PAT. + * + * @return \WP_REST_Response|\WP_Error + */ + public function rest_refresh_accessible_repos(): \WP_REST_Response|\WP_Error { + if ( 'none' === $this->global_settings->get_github_pat_source() ) { + return new \WP_Error( + 'ghrp_no_pat', + __( 'No Personal Access Token is configured.', 'github-release-posts' ), + [ 'status' => 400 ] + ); + } + + $result = ( new API_Client( $this->global_settings ) )->list_accessible_repos( true ); + + if ( is_wp_error( $result ) ) { + $result->add_data( [ 'status' => 502 ] ); + return $result; + } + + $count = count( $result ); + + return new \WP_REST_Response( + [ + 'count' => $count, + /* translators: %d: number of repositories */ + 'message' => sprintf( _n( '%d repository available.', '%d repositories available.', $count, 'github-release-posts' ), $count ), + ], + 200 + ); + } + /** * Builds a test notification entry from the most recent generated post, * or a placeholder if no posts exist yet. diff --git a/includes/classes/Admin/Settings_Page.php b/includes/classes/Admin/Settings_Page.php index b8bd37a..56b93ee 100644 --- a/includes/classes/Admin/Settings_Page.php +++ b/includes/classes/Admin/Settings_Page.php @@ -113,7 +113,10 @@ private function register_github_section(): void { * @return void */ public function render_github_pat_field(): void { - $masked_pat = $this->global_settings->get_masked_github_pat(); + $masked_pat = $this->global_settings->get_masked_github_pat(); + $source = $this->global_settings->get_github_pat_source(); + $externally_set = 'constant' === $source || 'env' === $source; + $refresh_disabled = 'none' === $source; ?> > -

- -

+ +

+ +

+ + + + 'owner/repo', 'owner' => ..., 'name' => ... ]` + * sorted alphabetically by owner, then by name. + * + * @param bool $force_refresh Bypass the transient cache when true. + * @return array|\WP_Error + */ + public function list_accessible_repos( bool $force_refresh = false ): array|\WP_Error { + $pat = $this->settings->get_github_pat(); + if ( '' === $pat ) { + return new \WP_Error( + 'github_no_pat', + __( 'A GitHub Personal Access Token is required to list accessible repositories.', 'github-release-posts' ) + ); + } + + $cache_key = Plugin_Constants::TRANSIENT_USER_REPOS_PREFIX . md5( $pat ); + + if ( ! $force_refresh ) { + $cached = get_transient( $cache_key ); + if ( is_array( $cached ) ) { + return $cached; + } + } + + $args = $this->build_request_args(); + $repos = []; + $page = 1; + $max_page = 10; // Safety cap: 1,000 repos. + + while ( $page <= $max_page ) { + $url = sprintf( + '%s/user/repos?per_page=100&sort=full_name&affiliation=owner,collaborator,organization_member&page=%d', + self::API_BASE, + $page + ); + + $response = wp_remote_get( $url, $args ); + if ( is_wp_error( $response ) ) { + return $response; + } + + $rate_limit = $this->handle_rate_limit( $response ); + if ( is_wp_error( $rate_limit ) ) { + return $rate_limit; + } + + $code = (int) wp_remote_retrieve_response_code( $response ); + if ( 401 === $code ) { + return new \WP_Error( + 'github_unauthorized', + __( 'GitHub rejected the Personal Access Token. Check that it is valid and has not expired.', 'github-release-posts' ) + ); + } + if ( 200 !== $code ) { + return new \WP_Error( + 'github_http_error', + sprintf( + /* translators: %d: HTTP status code */ + __( 'GitHub API returned HTTP %d.', 'github-release-posts' ), + $code + ) + ); + } + + $data = json_decode( wp_remote_retrieve_body( $response ), true ); + if ( ! is_array( $data ) ) { + return new \WP_Error( 'github_parse_error', __( 'Failed to parse GitHub API response.', 'github-release-posts' ) ); + } + + foreach ( $data as $entry ) { + if ( ! is_array( $entry ) ) { + continue; + } + if ( ! empty( $entry['archived'] ) ) { + continue; + } + + $full_name = (string) ( $entry['full_name'] ?? '' ); + $owner = (string) ( $entry['owner']['login'] ?? '' ); + $name = (string) ( $entry['name'] ?? '' ); + + if ( '' === $full_name || '' === $owner || '' === $name ) { + continue; + } + + $repos[] = [ + 'identifier' => $full_name, + 'owner' => $owner, + 'name' => $name, + ]; + } + + // Stop when the page returned fewer than the page size. + if ( count( $data ) < 100 ) { + break; + } + + ++$page; + } + + usort( + $repos, + static function ( $a, $b ) { + $cmp = strcasecmp( $a['owner'], $b['owner'] ); + return 0 !== $cmp ? $cmp : strcasecmp( $a['name'], $b['name'] ); + } + ); + + set_transient( $cache_key, $repos, 5 * MINUTE_IN_SECONDS ); + + return $repos; + } + + /** + * Deletes the cached accessible-repos list for the active PAT, if any. + * + * @return void + */ + public function clear_accessible_repos_cache(): void { + $pat = $this->settings->get_github_pat(); + if ( '' === $pat ) { + return; + } + delete_transient( Plugin_Constants::TRANSIENT_USER_REPOS_PREFIX . md5( $pat ) ); + } + /** * Normalises a repository identifier to `owner/repo` format. * diff --git a/includes/classes/Plugin_Constants.php b/includes/classes/Plugin_Constants.php index f2e181d..5377ef0 100644 --- a/includes/classes/Plugin_Constants.php +++ b/includes/classes/Plugin_Constants.php @@ -138,6 +138,18 @@ class Plugin_Constants { */ const TRANSIENT_RATE_LIMIT_REMAINING = 'ghrp_rate_limit_remaining'; + /** + * Prefix for the cached list of repositories accessible to the configured PAT. + * Full key: TRANSIENT_USER_REPOS_PREFIX . md5( PAT ) + */ + const TRANSIENT_USER_REPOS_PREFIX = 'ghrp_user_repos_'; + + /** + * Name of the env var / PHP constant that supplies the GitHub PAT + * outside of the WordPress database. + */ + const PAT_ENV_NAME = 'GITHUB_RELEASE_POSTS_PAT'; + // ------------------------------------------------------------------------- // Cron hook names // ------------------------------------------------------------------------- diff --git a/includes/classes/Settings/Global_Settings.php b/includes/classes/Settings/Global_Settings.php index 22d1291..b4d9027 100644 --- a/includes/classes/Settings/Global_Settings.php +++ b/includes/classes/Settings/Global_Settings.php @@ -223,18 +223,66 @@ public function get_check_frequency(): string { /** * Returns the decrypted GitHub Personal Access Token, or empty string if not set. * + * Resolution order: + * 1. PHP constant `GITHUB_RELEASE_POSTS_PAT` (Plugin_Constants::PAT_ENV_NAME). + * 2. Environment variable of the same name. + * 3. Encrypted value from the WordPress database. + * * Never call this method from within the admin UI display path. * * @return string Plaintext PAT, or empty string. */ public function get_github_pat(): string { + if ( defined( Plugin_Constants::PAT_ENV_NAME ) ) { + $value = (string) constant( Plugin_Constants::PAT_ENV_NAME ); + if ( '' !== $value ) { + return $value; + } + } + + $env_value = getenv( Plugin_Constants::PAT_ENV_NAME ); + if ( false !== $env_value && '' !== $env_value ) { + return (string) $env_value; + } + $encrypted = (string) get_option( Plugin_Constants::OPTION_GITHUB_PAT, '' ); return '' !== $encrypted ? $this->decrypt( $encrypted ) : ''; } + /** + * Returns the source of the active PAT. + * + * - 'constant' — supplied by the PHP constant `GITHUB_RELEASE_POSTS_PAT`. + * - 'env' — supplied by an environment variable of the same name. + * - 'db' — supplied by the encrypted wp_options value. + * - 'none' — no PAT is configured. + * + * @return string One of: 'constant', 'env', 'db', 'none'. + */ + public function get_github_pat_source(): string { + if ( defined( Plugin_Constants::PAT_ENV_NAME ) && '' !== (string) constant( Plugin_Constants::PAT_ENV_NAME ) ) { + return 'constant'; + } + + $env_value = getenv( Plugin_Constants::PAT_ENV_NAME ); + if ( false !== $env_value && '' !== $env_value ) { + return 'env'; + } + + if ( '' !== (string) get_option( Plugin_Constants::OPTION_GITHUB_PAT, '' ) ) { + return 'db'; + } + + return 'none'; + } + /** * Saves (or clears) the GitHub PAT. Encrypts non-empty values at rest. * + * No-op (returns true) when the active PAT is supplied by the constant or + * environment variable — the database value is intentionally bypassed in + * those modes, so writes here would be silently shadowed. + * * Pass the masked placeholder to leave the existing value unchanged. * Pass an empty string to remove the stored PAT. * @@ -242,6 +290,11 @@ public function get_github_pat(): string { * @return bool Whether the option was updated. */ public function save_github_pat( string $pat ): bool { + $source = $this->get_github_pat_source(); + if ( 'constant' === $source || 'env' === $source ) { + return true; // Externally managed. + } + if ( self::MASKED_PLACEHOLDER === $pat ) { return true; // No change. } @@ -254,15 +307,15 @@ public function save_github_pat( string $pat ): bool { } /** - * Returns the masked placeholder if a GitHub PAT is stored, empty string otherwise. + * Returns the masked placeholder if a GitHub PAT is configured by any source, + * empty string otherwise. * * Used to populate the admin UI field without exposing the actual token. * * @return string Masked placeholder or empty string. */ public function get_masked_github_pat(): string { - $stored = (string) get_option( Plugin_Constants::OPTION_GITHUB_PAT, '' ); - return '' !== $stored ? self::MASKED_PLACEHOLDER : ''; + return 'none' === $this->get_github_pat_source() ? '' : self::MASKED_PLACEHOLDER; } // ------------------------------------------------------------------------- diff --git a/includes/classes/Settings/Repository_Settings.php b/includes/classes/Settings/Repository_Settings.php index f1af006..ba50de7 100644 --- a/includes/classes/Settings/Repository_Settings.php +++ b/includes/classes/Settings/Repository_Settings.php @@ -173,9 +173,10 @@ public function add_repository( string $input ): array { ]; } - // Derive display name from repo slug. + // Use the raw repo slug as the display name. + // Owners can edit it later via the inline editor. $repo_parts = explode( '/', $identifier ); - $display_name = $this->derive_display_name( end( $repo_parts ) ); + $display_name = end( $repo_parts ); $repos[] = [ 'identifier' => $identifier, diff --git a/includes/templates/tab-repositories.php b/includes/templates/tab-repositories.php index 0aa1861..cd90ddd 100644 --- a/includes/templates/tab-repositories.php +++ b/includes/templates/tab-repositories.php @@ -17,6 +17,8 @@ // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template included from admin-page.php. use Jakemgold\GitHubReleasePosts\Admin\Repository_List_Table; +use Jakemgold\GitHubReleasePosts\GitHub\API_Client; +use Jakemgold\GitHubReleasePosts\Settings\Global_Settings; use Jakemgold\GitHubReleasePosts\Settings\Repository_Settings; $repo_settings = new Repository_Settings(); @@ -29,6 +31,34 @@ foreach ( $repos as $i => $repo ) { $repos[ $i ]['_index'] = $i; } + +// Determine whether a PAT is configured and, if so, fetch the +// repository list available to it. +$ghrp_global_settings = new Global_Settings(); +$ghrp_pat_configured = 'none' !== $ghrp_global_settings->get_github_pat_source(); +$ghrp_repo_list = null; +$ghrp_repo_list_error = ''; + +if ( $ghrp_pat_configured ) { + $ghrp_result = ( new API_Client( $ghrp_global_settings ) )->list_accessible_repos(); + + if ( is_wp_error( $ghrp_result ) ) { + $ghrp_repo_list_error = $ghrp_result->get_error_message(); + } + + if ( is_array( $ghrp_result ) ) { + // Filter out repositories that are already being tracked. + $ghrp_tracked = array_column( $repos, 'identifier' ); + $ghrp_repo_list = array_values( + array_filter( + $ghrp_result, + static function ( $r ) use ( $ghrp_tracked ) { + return ! in_array( $r['identifier'], $ghrp_tracked, true ); + } + ) + ); + } +} ?> @@ -53,26 +83,100 @@ ?> + ' . esc_html__( 'Settings', 'github-release-posts' ) . ''; + $ghrp_grouped_options = []; + + // Input mode names: dropdown, fallback-empty, fallback-error, fallback-no-pat. + $ghrp_input_mode = 'fallback-no-pat'; + if ( $ghrp_pat_configured && is_array( $ghrp_repo_list ) && ! empty( $ghrp_repo_list ) ) { + $ghrp_input_mode = 'dropdown'; + foreach ( $ghrp_repo_list as $r ) { + $ghrp_grouped_options[ $r['owner'] ][] = $r; + } + } elseif ( $ghrp_pat_configured && is_array( $ghrp_repo_list ) ) { + $ghrp_input_mode = 'fallback-empty'; + } elseif ( $ghrp_pat_configured && '' !== $ghrp_repo_list_error ) { + $ghrp_input_mode = 'fallback-error'; + } + ?>