PageSourceSearch

https://cclgroup-be.onrender.com/admin/MarketplacePage-Dz_9Jb5l-CGyJFdf8.js

js cclgroup-be.onrender.com collected 2026-10-03 11:40:48 UTC 34,061 bytes, 18 lines download raw bytes

vendor: 15,376 bytes, line 1
1import{u as O,bo as ge,g as Me,aN as st,cc as at,r as H,j as r,L as ne,P as le,cq as Q,F as k,B as M,iE as rt,aQ as ye,bD as it,e as Ue,iN as nt,aM as lt,Y as ot,o as Ae,ba as ct,T as z,d as Xe,iO as ut,ag as ht,ah as dt,aq as $e,S as Ee,ar as gt,iP as Le,bP as ke,bY as pt,Q as Oe,l as pe,b0 as ft,b1 as mt,iB as vt,b6 as Ce,c4 as xt,iQ as yt,c as $t,da as Pt,iR as jt,bC as bt,_ as St,bg as Ne,b5 as wt,bx as Ie}from"./strapi-iHlbOEtk.js";import{c as oe,l as Rt,r as fe,a as Qe,s as Ze,d as Ke,p as Je,i as Et}from"./lt-D1CJiNHQ.js";const Ct=oe,Mt=(t,e,s)=>Ct(t,e,s)>0;var Tt=Mt;const At=oe,Lt=(t,e,s)=>At(t,e,s)===0;var kt=Lt;const Ot=oe,Nt=(t,e,s)=>Ot(t,e,s)!==0;var It=Nt;const Ft=oe,_t=(t,e,s)=>Ft(t,e,s)>=0;var Dt=_t;const Gt=oe,Bt=(t,e,s)=>Gt(t,e,s)<=0;var Yt=Bt;const zt=kt,qt=It,Vt=Tt,Ht=Dt,Wt=Rt,Ut=Yt,Xt=(t,e,s,a)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof s=="object"&&(s=s.version),t===s;case"!==":return typeof t=="object"&&(t=t.version),typeof s=="object"&&(s=s.version),t!==s;case"":case"=":case"==":return zt(t,s,a);case"!=":return qt(t,s,a);case">":return Vt(t,s,a);case">=":return Ht(t,s,a);case"<":return Wt(t,s,a);case"<=":return Ut(t,s,a);default:throw new TypeError(`Invalid operator: ${e}`)}};var Qt=Xt;const{safeRe:ks,t:Os}=fe;var Pe,Fe;function Zt(){return Fe||(Fe=1,Pe=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),Pe}var Kt=$;$.Node=W;$.create=$;function $(t){var e=this;if(e instanceof $||(e=new $),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var s=0,a=arguments.length;s<a;s++)e.push(arguments[s]);return e}$.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,s=t.prev;return e&&(e.prev=s),s&&(s.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=s),t.list.length--,t.next=null,t.prev=null,t.list=null,e};$.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};$.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};$.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)es(this,arguments[t]);return this.length};$.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)ts(this,arguments[t]);return this.length};$.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};$.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};$.prototype.forEach=function(t,e){e=e||this;for(var s=this.head,a=0;s!==null;a++)t.call(e,s.value,a,this),s=s.next};$.prototype.forEachReverse=function(t,e){e=e||this;for(var s=this.tail,a=this.length-1;s!==null;a--)t.call(e,s.value,a,this),s=s.prev};$.prototype.get=function(t){for(var e=0,s=this.head;s!==null&&e<t;e++)s=s.next;if(e===t&&s!==null)return s.value};$.prototype.getReverse=function(t){for(var e=0,s=this.tail;s!==null&&e<t;e++)s=s.prev;if(e===t&&s!==null)return s.value};$.prototype.map=function(t,e){e=e||this;for(var s=new $,a=this.head;a!==null;)s.push(t.call(e,a.value,this)),a=a.next;return s};$.prototype.mapReverse=function(t,e){e=e||this;for(var s=new $,a=this.tail;a!==null;)s.push(t.call(e,a.value,this)),a=a.prev;return s};$.prototype.reduce=function(t,e){var s,a=this.head;if(arguments.length>1)s=e;else if(this.head)a=this.head.next,s=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;a!==null;i++)s=t(s,a.value,i),a=a.next;return s};$.prototype.reduceReverse=function(t,e){var s,a=this.tail;if(arguments.length>1)s=e;else if(this.tail)a=this.tail.prev,s=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;a!==null;i--)s=t(s,a.value,i),a=a.prev;return s};$.prototype.toArray=function(){for(var t=new Array(this.length),e=0,s=this.head;s!==null;e++)t[e]=s.value,s=s.next;return t};$.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,s=this.tail;s!==null;e++)t[e]=s.value,s=s.prev;return t};$.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var s=new $;if(e<t||e<0)return s;t<0&&(t=0),e>this.length&&(e=this.length);for(var a=0,i=this.head;i!==null&&a<t;a++)i=i.next;for(;i!==null&&a<e;a++,i=i.next)s.push(i.value);return s};$.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var s=new $;if(e<t||e<0)return s;t<0&&(t=0),e>this.length&&(e=this.length);for(var a=this.length,i=this.tail;i!==null&&a>e;a--)i=i.prev;for(;i!==null&&a>t;a--,i=i.prev)s.push(i.value);return s};$.prototype.splice=function(t,e,...s){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var a=0,i=this.head;i!==null&&a<t;a++)i=i.next;for(var l=[],a=0;i&&a<e;a++)l.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var a=0;a<s.length;a++)i=Jt(this,i,s[a]);return l};$.prototype.reverse=function(){for(var t=this.head,e=this.tail,s=t;s!==null;s=s.prev){var a=s.prev;s.prev=s.next,s.next=a}return this.head=e,this.tail=t,this};function Jt(t,e,s){var a=e===t.head?new W(s,null,e,t):new W(s,e,e.next,t);return a.next===null&&(t.tail=a),a.prev===null&&(t.head=a),t.length++,a}function es(t,e){t.tail=new W(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function ts(t,e){t.head=new W(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function W(t,e,s,a){if(!(this instanceof W))return new W(t,e,s,a);this.list=a,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,s?(s.prev=this,this.next=s):this.next=null}try{Zt()($)}catch{}const ss=Kt,q=Symbol("max"),D=Symbol("length"),Z=Symbol("lengthCalculator"),ie=Symbol("allowStale"),V=Symbol("maxAge"),_=Symbol("dispose"),_e=Symbol("noDisposeOnSet"),E=Symbol("lruList"),L=Symbol("cache"),et=Symbol("updateAgeOnGet"),je=()=>1;class as{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[q]=e.max||1/0;const s=e.length||je;if(this[Z]=typeof s!="function"?je:s,this[ie]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[V]=e.maxAge||0,this[_]=e.dispose,this[_e]=e.noDisposeOnSet||!1,this[et]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[q]=e||1/0,re(this)}get max(){return this[q]}set allowStale(e){this[ie]=!!e}get allowStale(){return this[ie]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[V]=e,re(this)}get maxAge(){return this[V]}set lengthCalculator(e){typeof e!="function"&&(e=je),e!==this[Z]&&(this[Z]=e,this[D]=0,this[E].forEach(s=>{s.length=this[Z](s.value,s.key),this[D]+=s.length})),re(this)}get lengthCalculator(){return this[Z]}get length(){return this[D]}get itemCount(){return this[E].length}rforEach(e,s){s=s||this;for(let a=this[E].tail;a!==null;){const i=a.prev;De(this,e,a,s),a=i}}forEach(e,s){s=s||this;for(let a=this[E].head;a!==null;){const i=a.next;De(this,e,a,s),a=i}}keys(){return this[E].toArray().map(e=>e.key)}values(){return this[E].toArray().map(e=>e.value)}reset(){this[_]&&this[E]&&this[E].length&&this[E].forEach(e=>this[_](e.key,e.value)),this[L]=new Map,this[E]=new ss,this[D]=0}dump(){return this[E].map(e=>he(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[E]}set(e,s,a){if(a=a||this[V],a&&typeof a!="number")throw new TypeError("maxAge must be a number");const i=a?Date.now():0,l=this[Z](s,e);if(this[L].has(e)){if(l>this[q])return J(this,this[L].get(e)),!1;const u=this[L].get(e).value;return this[_]&&(this[_e]||this[_](e,u.value)),u.now=i,u.maxAge=a,u.value=s,this[D]+=l-u.length,u.length=l,this.get(e),re(this),!0}const c=new rs(e,s,l,i,a);return c.length>this[q]?(this[_]&&this[_](e,s),!1):(this[D]+=c.length,this[E].unshift(c),this[L].set(e,this[E].head),re(this),!0)}has(e){if(!this[L].has(e))return!1;const s=this[L].get(e).value;return!he(this,s)}get(e){return be(this,e,!0)}peek(e){return be(this,e,!1)}pop(){const e=this[E].tail;return e?(J(this,e),e.value):null}del(e){J(this,this[L].get(e))}load(e){this.reset();const s=Date.now();for(let a=e.length-1;a>=0;a--){const i=e[a],l=i.e||0;if(l===0)this.set(i.k,i.v);else{const c=l-s;c>0&&this.set(i.k,i.v,c)}}}prune(){this[L].forEach((e,s)=>be(this,s,!1))}}const be=(t,e,s)=>{const a=t[L].get(e);if(a){const i=a.value;if(he(t,i)){if(J(t,a),!t[ie])return}else s&&(t[et]&&(a.value.now=Date.now()),t[E].unshiftNode(a));return i.value}},he=(t,e)=>{if(!e||!e.maxAge&&!t[V])return!1;const s=Date.now()-e.now;return e.maxAge?s>e.maxAge:t[V]&&s>t[V]},re=t=>{if(t[D]>t[q])for(let e=t[E].tail;t[D]>t[q]&&e!==null;){const s=e.prev;J(t,e),e=s}},J=(t,e)=>{if(e){const s=e.value;t[_]&&t[_](s.key,s.value),t[D]-=s.length,t[L].delete(s.key),t[E].removeNode(e)}};class rs{constructor(e,s,a,i,l){this.key=e,this.value=s,this.length=a,this.now=i,this.maxAge=l||0}}const De=(t,e,s,a)=>{let i=s.value;he(t,i)&&(J(t,s),t[ie]||(i=void 0)),i&&e.call(a,i.value,i.key,t)};var is=as,Se,Ge;function N(){if(Ge)return Se;Ge=1;class t{constructor(n,f){if(f=a(f),n instanceof t)return n.loose===!!f.loose&&n.includePrerelease===!!f.includePrerelease?n:new t(n.raw,f);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.format(),this;if(this.options=f,this.loose=!!f.loose,this.includePrerelease=!!f.includePrerelease,this.raw=n.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(g=>this.parseRange(g.trim())).filter(g=>g.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const g=this.set[0];if(this.set=this.set.filter(p=>!F(p[0])),this.set.length===0)this.set=[g];else if(this.set.length>1){for(const p of this.set)if(p.length===1&&B(p[0])){this.set=[p];break}}}this.format()}format(){return this.range=this.set.map(n=>n.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(n){const g=((this.options.includePrerelease&&b)|(this.options.loose&&G))+":"+n,p=s.get(g);if(p)return p;const d=this.options.loose,x=d?m[u.HYPHENRANGELOOSE]:m[u.HYPHENRANGE];n=n.replace(x,A(this.options.includePrerelease)),l("hyphen replace",n),n=n.replace(m[u.COMPARATORTRIM],R),l("comparator trim",n),n=n.replace(m[u.TILDETRIM],h),l("tilde trim",n),n=n.replace(m[u.CARETTRIM],v),l("caret trim",n);let P=n.split(" ").map(S=>X(S,this.options)).join(" ").split(/\s+/).map(S=>C(S,this.options));d&&(P=P.filter(S=>(l("loose invalid filter",S,this.options),!!S.match(m[u.COMPARATORLOOSE])))),l("range list",P);const y=new Map,j=P.map(S=>new i(S,this.options));for(const S of j){if(F(S))return[S];y.set(S.value,S)}y.size>1&&y.has("")&&y.delete("");const T=[...y.values()];return s.set(g,T),T}intersects(n,f){if(!(n instanceof t))throw new TypeError("a Range is required");return this.set.some(g=>U(g,f)&&n.set.some(p=>U(p,f)&&g.every(d=>p.every(x=>d.intersects(x,f)))))}test(n){if(!n)return!1;if(typeof n=="string")try{n=new c(n,this.options)}catch{return!1}for(let f=0;f<this.set.length;f++)if(xe(this.set[f],n,this.options))return!0;return!1}}Se=t;const e=is,s=new e({max:1e3}),a=Je,i=me(),l=Ke,c=Ze,{safeRe:m,t:u,comparatorTrimReplace:R,tildeTrimReplace:h,caretTrimReplace:v}=fe,{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:G}=Qe,F=o=>o.value==="<0.0.0-0",B=o=>o.value==="",U=(o,n)=>{let f=!0;const g=o.slice();let p=g.pop();for(;f&&g.length;)f=g.every(d=>p.intersects(d,n)),p=g.pop();return f},X=(o,n)=>(l("comp",o,n),o=Y(o,n),l("caret",o),o=ee(o,n),l("tildes",o),o=se(o,n),l("xrange",o),o=ce(o,n),l("stars",o),o),w=o=>!o||o.toLowerCase()==="x"||o==="*",ee=(o,n)=>o.trim().split(/\s+/).map(f=>te(f,n)).join(" "),te=(o,n)=>{const f=n.loose?m[u.TILDELOOSE]:m[u.TILDE];return o.replace(f,(g,p,d,x,P)=>{l("tilde",o,g,p,d,x,P);let y;return w(p)?y="":w(d)?y=`>=${p}.0.0 <${+p+1}.0.0-0`:w(x)?y=`>=${p}.${d}.0 <${p}.${+d+1}.0-0`:P?(l("replaceTilde pr",P),y=`>=${p}.${d}.${x}-${P} <${p}.${+d+1}.0-0`):y=`>=${p}.${d}.${x} <${p}.${+d+1}.0-0`,l("tilde return",y),y})},Y=(o,n)=>o.trim().split(/\s+/).map(f=>I(f,n)).join(" "),I=(o,n)=>{l("caret",o,n);const f=n.loose?m[u.CARETLOOSE]:m[u.CARET],g=n.includePrerelease?"-0":"";return o.replace(f,(p,d,x,P,y)=>{l("caret",o,p,d,x,P,y);let j;return w(d)?j="":w(x)?j=`>=${d}.0.0${g} <${+d+1}.0.0-0`:w(P)?d==="0"?j=`>=${d}.${x}.0${g} <${d}.${+x+1}.0-0`:j=`>=${d}.${x}.0${g} <${+d+1}.0.0-0`:y?(l("replaceCaret pr",y),d==="0"?x==="0"?j=`>=${d}.${x}.${P}-${y} <${d}.${x}.${+P+1}-0`:j=`>=${d}.${x}.${P}-${y} <${d}.${+x+1}.0-0`:j=`>=${d}.${x}.${P}-${y} <${+d+1}.0.0-0`):(l("no pr"),d==="0"?x==="0"?j=`>=${d}.${x}.${P}${g} <${d}.${x}.${+P+1}-0`:j=`>=${d}.${x}.${P}${g} <${d}.${+x+1}.0-0`:j=`>=${d}.${x}.${P} <${+d+1}.0.0-0`),l("caret return",j),j})},se=(o,n)=>(l("replaceXRanges",o,n),o.split(/\s+/).map(f=>ve(f,n)).join(" ")),ve=(o,n)=>{o=o.trim();const f=n.loose?m[u.XRANGELOOSE]:m[u.XRANGE];return o.replace(f,(g,p,d,x,P,y)=>{l("xRange",o,g,p,d,x,P,y);const j=w(d),T=j||w(x),S=T||w(P),ae=S;return p==="="&&ae&&(p=""),y=n.includePrerelease?"-0":"",j?p===">"||p==="<"?g="<0.0.0-0":g="*":p&&ae?(T&&(x=0),P=0,p===">"?(p=">=",T?(d=+d+1,x=0,P=0):(x=+x+1,P=0)):p==="<="&&(p="<",T?d=+d+1:x=+x+1),p==="<"&&(y="-0"),g=`${p+d}.${x}.${P}${y}`):T?g=`>=${d}.0.0${y} <${+d+1}.0.0-0`:S&&(g=`>=${d}.${x}.0${y} <${d}.${+x+1}.0-0`),l("xRange return",g),g})},ce=(o,n)=>(l("replaceStars",o,n),o.trim().replace(m[u.STAR],"")),C=(o,n)=>(l("replaceGTE0",o,n),o.trim().replace(m[n.includePrerelease?u.GTE0PRE:u.GTE0],"")),A=o=>(n,f,g,p,d,x,P,y,j,T,S,ae,Ts)=>(w(g)?f="":w(p)?f=`>=${g}.0.0${o?"-0":""}`:w(d)?f=`>=${g}.${p}.0${o?"-0":""}`:x?f=`>=${f}`:f=`>=${f}${o?"-0":""}`,w(j)?y="":w(T)?y=`<${+j+1}.0.0-0`:w(S)?y=`<${j}.${+T+1}.0-0`:ae?y=`<=${j}.${T}.${S}-${ae}`:o?y=`<${j}.${T}.${+S+1}-0`:y=`<=${y}`,`${f} ${y}`.trim()),xe=(o,n,f)=>{for(let g=0;g<o.length;g++)if(!o[g].test(n))return!1;if(n.prerelease.length&&!f.includePrerelease){for(let g=0;g<o.length;g++)if(l(o[g].semver),o[g].semver!==i.ANY&&o[g].semver.prerelease.length>0){const p=o[g].semver;if(p.major===n.major&&p.minor===n.minor&&p.patch===n.patch)return!0}return!1}return!0};return Se}var we,Be;function me(){if(Be)return we;Be=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(h,v){if(v=s(v),h instanceof e){if(h.loose===!!v.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),c("comparator",h,v),this.options=v,this.loose=!!v.loose,this.parse(h),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(h){const v=this.options.loose?a[i.COMPARATORLOOSE]:a[i.COMPARATOR],b=h.match(v);if(!b)throw new TypeError(`Invalid comparator: ${h}`);this.operator=b[1]!==void 0?b[1]:"",this.operator==="="&&(this.operator=""),b[2]?this.semver=new m(b[2],this.options.loose):this.semver=t}toString(){return this.value}test(h){if(c("Comparator.test",h,this.options.loose),this.semver===t||h===t)return!0;
1if(typeof h=="string")try{h=new m(h,this.options)}catch{return!1}return l(h,this.operator,this.semver,this.options)}intersects(h,v){if(!(h instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(h.value,v).test(this.value):h.operator===""?h.value===""?!0:new u(this.value,v).test(h.semver):(v=s(v),v.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!v.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||l(this.semver,"<",h.semver,v)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||l(this.semver,">",h.semver,v)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}we=e;const s=Je,{safeRe:a,t:i}=fe,l=Qt,c=Ke,m=Ze,u=N();return we}const ns=N(),ls=(t,e,s)=>{try{e=new ns(e,s)}catch{return!1}return e.test(t)};var os=ls;N();N();N();N();const cs=N(),us=(t,e)=>{try{return new cs(t,e).range||"*"}catch{return null}};var hs=us;const ds=me(),{ANY:Ns}=ds;N();N();N();const Te=me(),{ANY:Is}=Te;new Te(">=0.0.0-0");new Te(">=0.0.0");const Re=fe,Ye=Qe,ze=Et;me();N();const gs=os,ps=hs;var de={satisfies:gs,validRange:ps,re:Re.re,src:Re.src,tokens:Re.t,SEMVER_SPEC_VERSION:Ye.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ye.RELEASE_TYPES,compareIdentifiers:ze.compareIdentifiers,rcompareIdentifiers:ze.rcompareIdentifiers};function fs(t,e){const[s,a]=H.useState(t);return H.useEffect(()=>{const i=setTimeout(()=>{a(t)},e);return()=>{clearTimeout(i)}},[t,e]),s}const ms=({handleSelectClear:t,handleSelectChange:e,npmPackageType:s,possibleCategories:a,possibleCollections:i,query:l})=>{const{formatMessage:c}=O(),m=(u,R)=>{const h={[R]:(l[R]??[]).filter(v=>v!==u)};e(h)};return r.jsxs($e.Root,{children:[r.jsx($e.Trigger,{children:r.jsx(Ee,{variant:"tertiary",startIcon:r.jsx(gt,{}),children:c({id:"app.utils.filters",defaultMessage:"Filters"})})}),r.jsx($e.Content,{sideOffset:4,children:r.jsxs(k,{padding:3,direction:"column",alignItems:"stretch",gap:1,children:[r.jsx(qe,{message:c({id:"admin.pages.MarketPlacePage.filters.collections",defaultMessage:"Collections"}),value:l?.collections||[],onChange:u=>{e({collections:u})},onClear:()=>t("collections"),possibleFilters:i,customizeContent:u=>c({id:"admin.pages.MarketPlacePage.filters.collectionsSelected",defaultMessage:"{count, plural, =0 {No collections} one {# collection} other {# collections}} selected"},{count:u?.length??0})}),s==="plugin"&&r.jsx(qe,{message:c({id:"admin.pages.MarketPlacePage.filters.categories",defaultMessage:"Categories"}),value:l?.categories||[],onChange:u=>{e({categories:u})},onClear:()=>t("categories"),possibleFilters:a,customizeContent:u=>c({id:"admin.pages.MarketPlacePage.filters.categoriesSelected",defaultMessage:"{count, plural, =0 {No categories} one {# category} other {# categories}} selected"},{count:u?.length??0})})]})}),l.collections?.map(u=>r.jsx(M,{padding:1,children:r.jsx(Le,{icon:r.jsx(ke,{}),onClick:()=>m(u,"collections"),children:u})},u)),s==="plugin"&&l.categories?.map(u=>r.jsx(M,{padding:1,children:r.jsx(Le,{icon:r.jsx(ke,{}),onClick:()=>m(u,"categories"),children:u})},u))]})},qe=({message:t,value:e,onChange:s,possibleFilters:a,onClear:i,customizeContent:l})=>r.jsx(ft,{"data-testid":`${t}-button`,"aria-label":t,placeholder:t,onChange:s,onClear:i,value:e,customizeContent:l,children:Object.entries(a).map(([c,m])=>r.jsx(mt,{"data-testid":`${c}-${m}`,value:c,children:`${c} (${m})`},c))}),vs=pe(z)`
2  display: -webkit-box;
3  -webkit-box-orient: vertical;
4  -webkit-line-clamp: 2;
5  overflow: hidden;
6`,xs=({npmPackage:t,isInstalled:e,useYarn:s,isInDevelopmentMode:a,npmPackageType:i,strapiAppVersion:l})=>{const{attributes:c}=t,{formatMessage:m}=O(),{trackUsage:u}=ge(),R=s?`yarn add ${c.npmPackageName}`:`npm install ${c.npmPackageName}`,h=m({id:"admin.pages.MarketPlacePage.plugin.tooltip.madeByStrapi",defaultMessage:"Made by Strapi"}),v=`https://market.strapi.io/${vt.plural(i)}/${c.slug}`,b=de.validRange(c.strapiVersion),G=b?de.satisfies(l??"",b):!1;return r.jsxs(k,{direction:"column",justifyContent:"space-between",paddingTop:4,paddingRight:4,paddingBottom:4,paddingLeft:4,hasRadius:!0,background:"neutral0",shadow:"tableShadow",height:"100%",alignItems:"normal","data-testid":"npm-package-card",children:[r.jsxs(M,{children:[r.jsxs(k,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[r.jsx(M,{tag:"img",src:c.logo.url,alt:`${c.name} logo`,hasRadius:!0,width:11,height:11}),r.jsx(Ps,{githubStars:c.githubStars,npmDownloads:c.npmDownloads,npmPackageType:i})]}),r.jsx(M,{paddingTop:4,children:r.jsx(z,{tag:"h3",variant:"delta",children:r.jsxs(k,{alignItems:"center",gap:c.validated&&!c.madeByStrapi?2:1,children:[c.name,c.validated&&!c.madeByStrapi&&r.jsx(Ce,{description:m({id:"admin.pages.MarketPlacePage.plugin.tooltip.verified",defaultMessage:"Plugin verified by Stra
6pi"}),children:r.jsx(xt,{fill:"success600"})}),c.madeByStrapi&&r.jsx(Ce,{description:h,children:r.jsx(M,{tag:"img",src:yt,alt:h,width:6,height:"auto"})})]})})}),r.jsx(M,{paddingTop:2,children:r.jsx(vs,{tag:"p",variant:"omega",textColor:"neutral600",children:c.description})})]}),r.jsxs(k,{gap:2,style:{alignSelf:"flex-end"},paddingTop:6,children:[r.jsx(Xe,{size:"S",href:v,isExternal:!0,endIcon:r.jsx(Ue,{}),"aria-label":m({id:"admin.pages.MarketPlacePage.plugin.info.label",defaultMessage:"Learn more about {pluginName}"},{pluginName:c.name}),variant:"tertiary",onClick:()=>u("didPluginLearnMore"),children:m({id:"admin.pages.MarketPlacePage.plugin.info.text",defaultMessage:"More"})}),r.jsx(ys,{isInstalled:e,isInDevelopmentMode:a,isCompatible:G,commandToCopy:R,strapiAppVersion:l,strapiPeerDepVersion:c.strapiVersion,pluginName:c.name})]})]})},ys=({isInstalled:t,isInDevelopmentMode:e,isCompatible:s,commandToCopy:a,strapiAppVersion:i,strapiPeerDepVersion:l,pluginName:c})=>{const{toggleNotification:m}=Me(),{formatMessage:u}=O(),{trackUsage:R}=ge(),{copy:h}=bt(),v=async()=>{await h(a)&&(R("willInstallPlugin"),m({type:"success",message:u({id:"admin.pages.MarketPlacePage.plugin.copy.success"})}))};return t?r.jsxs(k,{gap:2,paddingLeft:4,children:[r.jsx(St,{width:"1.2rem",height:"1.2rem",color:"success600"}),r.jsx(z,{variant:"omega",textColor:"success600",fontWeight:"bold",children:u({id:"admin.pages.MarketPlacePage.plugin.installed",defaultMessage:"Installed"})})]}):e&&s!==!1?r.jsx($s,{strapiAppVersion:i,strapiPeerDepVersion:l,handleCopy:v,pluginName:c}):null},$s=({strapiPeerDepVersion:t,strapiAppVersion:e,handleCopy:s,pluginName:a})=>{const{formatMessage:i}=O(),l=de.validRange(t),c=de.satisfies(e??"",l??""),m=i({id:"admin.pages.MarketPlacePage.plugin.copy",defaultMessage:"Copy install command"});return e&&(!l||!c)?r.jsx(Ce,{"data-testid":`tooltip-${a}`,label:i({id:"admin.pages.MarketPlacePage.plugin.version",defaultMessage:'Update your Strapi version: "{strapiAppVersion}" to: "{versionRange}"'},{strapiAppVersion:e,versionRange:l}),children:r.jsx("span",{children:r.jsx(Ee,{size:"S",startIcon:r.jsx(Ne,{}),variant:"secondary",onClick:s,disabled:!c,children:m})})}):r.jsx(Ee,{size:"S",startIcon:r.jsx(Ne,{}),variant:"secondary",onClick:s,children:m})},Ps=({githubStars:t=0,npmDownloads:e=0,npmPackageType:s})=>{const{formatMessage:a}=O();return r.jsxs(k,{gap:1,children:[!!t&&r.jsxs(r.Fragment,{children:[r.jsx($t,{height:"1.2rem",width:"1.2rem","aria-hidden":!0}),r.jsx(Pt,{height:"1.2rem",width:"1.2rem",fill:"warning500","aria-hidden":!0}),r.jsx("p",{"aria-label":a({id:`admin.pages.MarketPlacePage.${s}.githubStars`,defaultMessage:"This {package} was starred {starsCount} on GitHub"},{starsCount:t,package:s}),children:r.jsx(z,{variant:"pi",textColor:"neutral800",children:t})}),r.jsx(js,{})]}),r.jsx(jt,{height:"1.2rem",width:"1.2rem","aria-hidden":!0}),r.jsx("p",{"aria-label":a({id:`admin.pages.MarketPlacePage.${s}.downloads`,defaultMessage:"This {package} has {downloadsCount} weekly downloads"},{downloadsCount:e,package:s}),children:r.jsx(z,{variant:"pi",textColor:"neutral800",children:e})})]})},js=pe(wt)`
7  width: 1.2rem;
8  transform: rotate(90deg);
9`,Ve=({status:t,npmPackages:e=[],installedPackageNames:s=[],useYarn:a,isInDevelopmentMode:i,npmPackageType:l,strapiAppVersion:c,debouncedSearch:m})=>{const{formatMessage:u}=O();if(t==="error")return r.jsx(le.Error,{});if(t==="loading")return r.jsx(le.Loading,{});const R=u({id:"admin.pages.MarketPlacePage.search.empty",defaultMessage:'No result for "{target}"'},{target:m});return e.length===0?r.jsxs(M,{position:"relative",children:[r.jsx(ne.Grid,{size:"M",children:Array(12).fill(null).map((h,v)=>r.jsx(bs,{height:"234px",hasRadius:!0},v))}),r.jsx(M,{position:"absolute",top:11,width:"100%",children:r.jsxs(k,{alignItems:"center",justifyContent:"center",direction:"column",children:[r.jsx(pt,{width:"160px",height:"88px"}),r.jsx(M,{paddingTop:6,children:r.jsx(z,{variant:"delta",tag:"p",textColor:"neutral600",children:R})})]})})]}):r.jsx(Oe.Root,{gap:4,children:e.map(h=>r.jsx(Oe.Item,{col:4,s:6,xs:12,style:{height:"100%"},direction:"column",alignItems:"stretch",children:r.jsx(xs,{npmPackage:h,isInstalled:s.includes(h.attributes.npmPackageName),useYarn:a,isInDevelopmentMode:i,npmPackageType:l,strapiAppVersion:c})},h.id))})},bs=pe(M)`
10  background: ${({theme:t})=>`linear-gradient(180deg, rgba(234, 234, 239, 0) 0%, ${t.colors.neutral150} 100%)`};
11  opacity: 0.33;
12`,tt=({isOnline:t,npmPackageType:e="plugin"})=>{const{formatMessage:s}=O(),{trackUsage:a}=ge(),i=e==="provider"?"didSubmitProvider":"didSubmitPlugin";return r.jsx(ne.Header,{title:s({id:"global.marketplace",defaultMessage:"Marketplace"}),subtitle:s({id:"admin.pages.MarketPlacePage.subtitle",defaultMessage:"Get more out of Strapi"}),primaryAction:t&&r.jsx(Xe,{startIcon:r.jsx(ut,{}),variant:"tertiary",href:`https://market.strapi.io/submit-${e}`,onClick:()=>a(i),isExternal:!0,children:s({id:`admin.pages.MarketPlacePage.submit.${e}.link`,defaultMessage:`Submit ${e}`})})})},Ss=()=>{const{formatMessage:t}=O();return r.jsx(ne.Root,{children:r.jsxs(ct,{children:[r.jsx(tt,{}),r.jsxs(k,{width:"100%",direction:"column",alignItems:"center",justifyContent:"center",paddingTop:"12rem",children:[r.jsx(M,{paddingBottom:2,children:r.jsx(z,{textColor:"neutral700",variant:"alpha",children:t({id:"admin.pages.MarketPlacePage.offline.title",defaultMessage:"You are offline"})})}),r.jsx(M,{paddingBottom:6,children:r.jsx(z,{textColor:"neutral700",variant:"epsilon",children:t({id:"admin.pages.MarketPlacePage.offline.subt
12itle",defaultMessage:"You need to be connected to the Internet to access Strapi Market."})})}),r.jsxs("svg",{width:"88",height:"88",viewBox:"0 0 88 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[r.jsx("rect",{x:".5",y:".5",width:"87",height:"87",rx:"43.5",fill:"#F0F0FF"}),r.jsx("path",{d:"M34 39.3h-4c-2.6 0-4.7 1-6.6 2.8a9 9 0 0 0-2.7 6.6 9 9 0 0 0 2.7 6.6A9 9 0 0 0 30 58h22.8L34 39.3Zm-11-11 3-3 39 39-3 3-4.7-4.6H30a13.8 13.8 0 0 1-14-14c0-3.8 1.3-7 4-9.7 2.6-2.7 5.7-4.2 9.5-4.3L23 28.2Zm38.2 11.1c3 .2 5.5 1.5 7.6 3.7A11 11 0 0 1 72 51c0 4-1.6 7.2-5 9.5l-3.3-3.4a6.5 6.5 0 0 0 3.6-6.1c0-1.9-.7-3.5-2-5-1.5-1.3-3.1-2-5-2h-3.5v-1.2c0-3.6-1.2-6.6-3.7-9a13 13 0 0 0-15-2.3L34.6 28a17 17 0 0 1 20.3 1.5c3.5 2.7 5.5 6 6.3 10Z",fill:"#4945FF"}),r.jsx("rect",{x:".5",y:".5",width:"87",height:"87",rx:"43.5",stroke:"#D9D8FF"})]})]})]})})},He={"name:asc":{selected:{id:"admin.pages.MarketPlacePage.sort.alphabetical.selected",defaultMessage:"Sort by alphabetical order"},option:{id:"admin.pages.MarketPlacePage.sort.alphabetical",defaultMessage:"Alphabetical order"}},"submissionDate:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.newest.selected",defaultMessage:"Sort by newest"},option:{id:"admin.pages.MarketPlacePage.sort.newest",defaultMessage:"Newest"}},"githubStars:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.githubStars.selected",defaultMessage:"Sort by GitHub stars"},option:{id:"admin.pages.MarketPlacePage.sort.githubStars",defaultMessage:"Number of GitHub stars"}},"npmDownloads:desc":{selected:{id:"admin.pages.MarketPlacePage.sort.npmDownloads.selected",defaultMessage:"Sort by npm downloads"},option:{id:"admin.pages.MarketPlacePage.sort.npmDownloads",defaultMessage:"Number of downloads"}}},ws=({sortQuery:t,handleSelectChange:e})=>{const{formatMessage:s}=O();return r.jsx(Rs,{children:r.jsx(ht,{value:t,customizeContent:()=>s(He[t].selected),onChange:a=>{e({sort:a})},"aria-label":s({id:"admin.pages.MarketPlacePage.sort.label",defaultMessage:"Sort by"}),size:"S",children:Object.entries(He).map(([a,i])=>r.jsx(dt,{value:a,children:s(i.option)},a))})})},Rs=pe(M)`
13  font-weight: ${({theme:t})=>t.fontWeights.semiBold};
14
15  span {
16    font-size: ${({theme:t})=>t.fontSizes[1]};
17  }
18`,We="https://market-api.strapi.io";function Es({npmPackageType:t,debouncedSearch:e,query:s,tabQuery:a,strapiVersion:i}){const{notifyStatus:l}=ot(),{formatMessage:c}=O(),{toggleNotification:m}=Me(),u=c({id:"global.marketplace",defaultMessage:"Marketplace"}),R=()=>{l(c({id:"app.utils.notify.data-loaded",defaultMessage:"The {target} has loaded"},{target:u}))},h={page:s?.page||1,pageSize:s?.pageSize||24},v={...a.plugin,pagination:h,search:e,version:i},{data:b,status:G}=Ae(["marketplace","plugins",v],async()=>{try{const Y=Ie.stringify(v),I=await fetch(`${We}/plugins?${Y}`);if(!I.ok)throw new Error("Failed to fetch marketplace plugins.");return await I.json()}catch{}return null},{onSuccess(){R()},onError(){m({type:"danger",message:c({id:"notification.error",defaultMessage:"An error occured"})})}}),F={...a.provider,pagination:h,search:e,version:i},{data:B,status:U}=Ae(["marketplace","providers",F],async()=>{const Y=Ie.stringify(F),I=await fetch(`${We}/providers?${Y}`);if(!I.ok)throw new Error("Failed to fetch marketplace providers.");return await I.json()},{onSuccess(){R()},onError(){m({type:"danger",message:c({id:"notification.error",defaultMessage:"An error occured"})})}}),X=t==="plugin"?b:B,w=X?.meta.collections??{},ee=b?.meta.categories??{},{pagination:te}=X?.meta??{};return{pluginsResponse:b,providersResponse:B,pluginsStatus:G,providersStatus:U,possibleCollections:w,possibleCategories:ee,pagination:te}}const Cs=()=>{const t=typeof navigator<"u"&&typeof navigator.onLine=="boolean"?navigator.onLine:!0,[e,s]=H.useState(t),a=()=>s(!0),i=()=>s(!1);return H.useEffect(()=>(window.addEventListener("online",a),window.addEventListener("offline",i),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}),[]),e},K="plugin",ue="provider",Ms=()=>{const{formatMessage:t}=O(),{trackUsage:e}=ge(),{toggleNotification:s}=Me(),[{query:a},i]=st(),l=fs(a?.search,500)||"",{autoReload:c,dependencies:m,useYarn:u,strapiVersion:R}=at("MarketplacePage",C=>
18C),h=Cs(),v=a?.npmPackageType||K,[b,G]=H.useState({plugin:v===K?{...a}:{},provider:v===ue?{...a}:{}});H.useEffect(()=>{e("didGoToMarketplace")},[e]),H.useEffect(()=>{c||s({type:"info",message:t({id:"admin.pages.MarketPlacePage.production",defaultMessage:"Manage plugins from the development environment"})})},[s,c,t]);const{pluginsResponse:F,providersResponse:B,pluginsStatus:U,providersStatus:X,possibleCollections:w,possibleCategories:ee,pagination:te}=Es({npmPackageType:v,debouncedSearch:l,query:a,tabQuery:b,strapiVersion:R});if(!h)return r.jsx(Ss,{});const Y=C=>{const A=C===K||C===ue?C:K,xe=b[A]&&Object.keys(b[A]).length;i(xe?{...b[A],search:a?.search||"",npmPackageType:A,page:1}:{npmPackageType:A,collections:[],categories:[],sort:"name:asc",page:1,search:a?.search||""})},I=C=>{i({...C,page:1}),G(A=>({...A,[v]:{...A[v],...C}}))},se=C=>{i({[C]:[],page:void 0},"remove"),G(A=>({...A,[v]:{}}))},ve=({sort:C})=>I({sort:C}),ce=Object.keys(m??{});return r.jsx(ne.Root,{children:r.jsxs(le.Main,{children:[r.jsx(le.Title,{children:t({id:"admin.pages.MarketPlacePage.head",defaultMessage:"Marketplace - Plugins"})}),r.jsx(tt,{isOnline:h,npmPackageType:v}),r.jsx(ne.Content,{children:r.jsxs(Q.Root,{variant:"simple",onValueChange:Y,value:v,children:[r.jsxs(k,{justifyContent:"space-between",paddingBottom:4,children:[r.jsxs(Q.List,{"aria-label":t({id:"admin.pages.MarketPlacePage.tab-group.label",defaultMessage:"Plugins and Providers for Strapi"}),children:[r.jsxs(Q.Trigger,{value:K,children:[t({id:"admin.pages.MarketPlacePage.plugins",defaultMessage:"Plugins"})," ",F?`(${F.meta.pagination.total})`:"..."]}),r.jsxs(Q.Trigger,{value:ue,children:[t({id:"admin.pages.MarketPlacePage.providers",defaultMessage:"Providers"})," ",B?`(${B.meta.pagination.total})`:"..."]})]}),r.jsx(M,{width:"25%",children:r.jsx(rt,{name:"searchbar",onClear:()=>i({search:"",page:1}),value:a?.search,onChange:C=>i({search:C.target.value,page:1}),clearLabel:t({id:"admin.pages.MarketPlacePage.search.clear",defaultMessage:"Clear the search"}),placeholder:t({id:"admin.pages.MarketPlacePage.search.placeholder",defaultMessage:"Search"}),children:t({id:"admin.pages.MarketPlacePage.search.placeholder",defaultMessage:"Search"})})})]}),r.jsxs(k,{paddingBottom:4,gap:2,children:[r.jsx(ws,{sortQuery:a?.sort||"name:asc",handleSelectChange:ve}),r.jsx(ms,{npmPackageType:v,possibleCollections:w,possibleCategories:ee,query:a||{},handleSelectChange:I,handleSelectClear:se})]}),r.jsx(Q.Content,{value:K,children:r.jsx(Ve,{npmPackages:F?.data,status:U,installedPackageNames:ce,useYarn:u,isInDevelopmentMode:c,npmPackageType:"plugin",strapiAppVersion:R,debouncedSearch:l})}),r.jsx(Q.Content,{value:ue,children:r.jsx(Ve,{npmPackages:B?.data,status:X,installedPackageNames:ce,useYarn:u,isInDevelopmentMode:c,npmPackageType:"provider",debouncedSearch:l})}),r.jsxs(ye.Root,{...te,defaultPageSize:24,children:[r.jsx(ye.PageSize,{options:["12","24","50","100"]}),r.jsx(ye.Links,{})]}),r.jsx(M,{paddingTop:8,children:r.jsx("a",{href:"https://strapi.canny.io/plugin-requests",target:"_blank",rel:"noopener noreferrer nofollow",style:{textDecoration:"none"},onClick:()=>e("didMissMarketplacePlugin"),children:r.jsx(it,{title:t({id:"admin.pages.MarketPlacePage.missingPlugin.title",defaultMessage:"Documentation"}),subtitle:t({id:"admin.pages.MarketPlacePage.missingPlugin.description",defaultMessage:"Tell us what plugin you are looking for and we'll let our community plugin developers know in case they are in search for inspiration!"}),icon:r.jsx(nt,{}),iconBackground:"alternative100",endAction:r.jsx(Ue,{fill:"neutral600",width:"1.2rem",height:"1.2rem",style:{marginLeft:"0.8rem"}})})})})]})})]})})},Fs=()=>{const t=lt(e=>e.admin_app.permissions.marketplace?.main);return r.jsx(le.Protect,{permissions:t,children:r.jsx(Ms,{})})};export{Ms as MarketplacePage,Fs as ProtectedMarketplacePage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.