@upstash/redis 1.31.6 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;var Ne=Object.defineProperty;var Le=(s,n)=>{for(var t in n)Ne(s,t,{get:n[t],enumerable:!0})};var ze={};Le(ze,{UpstashError:()=>u,UrlError:()=>Oe});var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}},Oe=class extends Error{constructor(n){super(`Upstash Redis client was passed an invalid URL. You should pass the URL together with https. Received: "${n}". `),this.name="UrlError"}};var Me=class{constructor(n){if(this.options={backend:_optionalChain([n, 'access', _2 => _2.options, 'optionalAccess', _3 => _3.backend]),agent:n.agent,responseEncoding:_nullishCoalesce(n.responseEncoding, () => ("base64")),cache:n.cache,signal:n.signal,keepAlive:_nullishCoalesce(n.keepAlive, () => (!0))},this.baseUrl=n.baseUrl.replace(/\/$/,""),!/^https?:\/\/[^\s/$.?#].[^\s]*$/.test(this.baseUrl))throw new Oe(this.baseUrl);this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),typeof _optionalChain([n, 'optionalAccess', _4 => _4.retry])=="boolean"&&_optionalChain([n, 'optionalAccess', _5 => _5.retry])===!1?this.retry={attempts:1,backoff:()=>0}:this.retry={attempts:_nullishCoalesce(_optionalChain([n, 'optionalAccess', _6 => _6.retry, 'optionalAccess', _7 => _7.retries]), () => (5)),backoff:_nullishCoalesce(_optionalChain([n, 'optionalAccess', _8 => _8.retry, 'optionalAccess', _9 => _9.backoff]), () => ((o=>Math.exp(o)*50)))}}mergeTelemetry(n){function t(o,m,r){return r&&(o[m]?o[m]=[o[m],r].join(","):o[m]=r),o}this.headers=t(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=t(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=t(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:_optionalChain([this, 'access', _10 => _10.options, 'optionalAccess', _11 => _11.agent]),signal:this.options.signal,backend:_optionalChain([this, 'access', _12 => _12.options, 'optionalAccess', _13 => _13.backend])},o=null,m=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,..._nullishCoalesce(n.path, () => ([]))].join("/"),t);break}catch(i){if(_optionalChain([this, 'access', _14 => _14.options, 'access', _15 => _15.signal, 'optionalAccess', _16 => _16.aborted])){let p=new Blob([JSON.stringify({result:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))})]),d={status:200,statusText:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))};o=new Response(p,d);break}m=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw _nullishCoalesce(m, () => (new Error("Exhausted all retries")));let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);return _optionalChain([this, 'access', _17 => _17.options, 'optionalAccess', _18 => _18.responseEncoding])==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:ke(i),error:p})):{result:ke(r.result),error:r.error}:r}};function ve(s){let n="";try{let t=atob(s),o=t.length,m=new Uint8Array(o);for(let r=0;r<o;r++)m[r]=t.charCodeAt(r);n=new TextDecoder().decode(m)}catch (e2){n=s}return n}function ke(s){let n;switch(typeof s){case"undefined":return s;case"number":{n=s;break}case"object":{Array.isArray(s)?n=s.map(t=>typeof t=="string"?ve(t):Array.isArray(t)?t.map(ke):t):n=null;break}case"string":{n=s==="OK"?"OK":ve(s);break}default:break}return n}function Se(s,n){let t=s;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new Re(t)),new Proxy(t,{get:(o,m)=>m==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:m==="json"?Se(o,!0):m in o&&!(m in o.autoPipelineExecutor.pipeline)?o[m]:(n?typeof o.autoPipelineExecutor.pipeline.json[m]=="function":typeof o.autoPipelineExecutor.pipeline[m]=="function")?(...i)=>o.autoPipelineExecutor.withAutoPipeline(p=>{n?p.json[m](...i):p[m](...i)}):o.autoPipelineExecutor.pipeline[m]})}var Re= (_class =class{__init() {this.pipelinePromises=new WeakMap}__init2() {this.activePipeline=null}__init3() {this.indexInCurrentPipeline=0}__init4() {this.pipelineCounter=0}constructor(n){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=this.activePipeline||this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){return await Promise.resolve(),await Promise.resolve()}}, _class);function Pe(s){let n=Array.isArray(s)?s.map(t=>{try{return Pe(t)}catch (e3){return t}}):JSON.parse(s);return typeof n=="number"&&n.toString()!==s?s:n}function Ee(s){try{return Pe(s)}catch (e4){return s}}function h(s){return[s[0],...Ee(s.slice(1))]}var Ge=s=>{switch(typeof s){case"string":case"number":case"boolean":return s;default:return JSON.stringify(s)}},e=class{constructor(n,t){if(this.serialize=Ge,this.deserialize=typeof _optionalChain([t, 'optionalAccess', _19 => _19.automaticDeserialization])>"u"||t.automaticDeserialization?_nullishCoalesce(_optionalChain([t, 'optionalAccess', _20 => _20.deserialize]), () => (Ee)):o=>o,this.command=n.map(o=>this.serialize(o)),_optionalChain([t, 'optionalAccess', _21 => _21.latencyLogging])){let o=this.exec.bind(this);this.exec=async m=>{let r=performance.now(),a=await o(m),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command});if(o)throw new u(o);if(typeof t>"u")throw new Error("Request did not return a result");return this.deserialize(t)}};var g=class extends e{constructor(n,t){super(["append",...n],t)}};var x=class extends e{constructor([n,t,o],m){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,m)}};var f=class{constructor(n,t,o,m=r=>r.exec(this.client)){this.client=t;this.opts=o;this.execOperation=m;this.command=["bitfield",...n]}chain(...n){return this.command.push(...n),this}get(...n){return this.chain("get",...n)}set(...n){return this.chain("set",...n)}incrby(...n){return this.chain("incrby",...n)}overflow(n){return this.chain("overflow",n)}exec(){let n=new e(this.command,this.opts);return this.execOperation(n)}};var y=class extends e{constructor(n,t){super(["bitop",...n],t)}};var b=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var T=class extends e{constructor([n,t,o],m){super(["COPY",n,t,..._optionalChain([o, 'optionalAccess', _22 => _22.replace])?["REPLACE"]:[]],{...m,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var O=class extends e{constructor(n){super(["dbsize"],n)}};var w=class extends e{constructor(n,t){super(["decr",...n],t)}};var D=class extends e{constructor(n,t){super(["decrby",...n],t)}};var A=class extends e{constructor(n,t){super(["del",...n],t)}};var k=class extends e{constructor(n,t){super(["echo",...n],t)}};var R=class extends e{constructor([n,t,o],m){super(["eval",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],m)}};var S=class extends e{constructor([n,t,o],m){super(["evalsha",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],m)}};var E=class extends e{constructor(n,t){super(["exists",...n],t)}};var M=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var v=class extends e{constructor(n,t){super(["expireat",...n],t)}};var P=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var I=class extends e{constructor([n],t){let o=["flushdb"];_optionalChain([n, 'optionalAccess', _23 => _23.async])&&o.push("async"),super(o,t)}};var N=class extends e{constructor([n,t,...o],m){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,m)}};var L=class extends e{constructor([n,t,o,m="M"],r){super(["GEODIST",n,t,o,m],r)}};var z=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...m],t)}};var G=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...m],{deserialize:r=>Ke(r),...t})}};function Ke(s){let n=[];for(let t of s)!_optionalChain([t, 'optionalAccess', _24 => _24[0]])||!_optionalChain([t, 'optionalAccess', _25 => _25[1]])||n.push({lng:parseFloat(t[0]),lat:parseFloat(t[1])});return n}var K=class extends e{constructor([n,t,o,m,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(m),_optionalChain([r, 'optionalAccess', _26 => _26.count])&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!_optionalChain([r, 'optionalAccess', _27 => _27.withCoord])&&!_optionalChain([r, 'optionalAccess', _28 => _28.withDist])&&!_optionalChain([r, 'optionalAccess', _29 => _29.withHash])?d.map(c=>{try{return{member:JSON.parse(c)}}catch (e5){return{member:c}}}):d.map(c=>{let De=1,C={};try{C.member=JSON.parse(c[0])}catch (e6){C.member=c[0]}return r.withDist&&(C.dist=parseFloat(c[De++])),r.withHash&&(C.hash=c[De++].toString()),r.withCoord&&(C.coord={long:parseFloat(c[De][0]),lat:parseFloat(c[De][1])}),C});super([...i,..._optionalChain([r, 'optionalAccess', _30 => _30.withCoord])?["WITHCOORD"]:[],..._optionalChain([r, 'optionalAccess', _31 => _31.withDist])?["WITHDIST"]:[],..._optionalChain([r, 'optionalAccess', _32 => _32.withHash])?["WITHHASH"]:[]],{deserialize:p,...a})}};var X=class extends e{constructor([n,t,o,m,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(m.type==="BYRADIUS"||m.type==="byradius")&&p.push(m.type,m.radius,m.radiusType),(m.type==="BYBOX"||m.type==="bybox")&&p.push(m.type,m.rect.width,m.rect.height,m.rectType),p.push(r),_optionalChain([a, 'optionalAccess', _33 => _33.count])&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,..._optionalChain([a, 'optionalAccess', _34 => _34.storeDist])?["STOREDIST"]:[]],i)}};var U=class extends e{constructor(n,t){super(["get",...n],t)}};var J=class extends e{constructor(n,t){super(["getbit",...n],t)}};var B=class extends e{constructor(n,t){super(["getdel",...n],t)}};var Z=class extends e{constructor(n,t){super(["getrange",...n],t)}};var H=class extends e{constructor(n,t){super(["getset",...n],t)}};var F=class extends e{constructor(n,t){super(["hdel",...n],t)}};var $=class extends e{constructor(n,t){super(["hexists",...n],t)}};var q=class extends e{constructor(n,t){super(["hget",...n],t)}};function Xe(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o))?n[t]=o:n[t]=JSON.parse(o)}catch (e7){n[t]=o}}return n}var j=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Xe(o),...t})}};var Y=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var V=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var _=class extends e{constructor([n],t){super(["hkeys",n],t)}};var W=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Ue(s,n){if(n.length===0||n.every(o=>o===null))return null;let t={};for(let o=0;o<s.length;o++)try{t[s[o]]=JSON.parse(n[o])}catch (e8){t[s[o]]=n[o]}return t}var Q=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:m=>Ue(t,m),...o})}};var nn=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};function Je(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{n[t]=JSON.parse(o)}catch (e9){n[t]=o}}return n}var tn=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?m=>Je(m):_optionalChain([t, 'optionalAccess', _35 => _35.deserialize]),...t})}};var en=class extends e{constructor([n,t,o],m){let r=["hscan",n,t];_optionalChain([o, 'optionalAccess', _36 => _36.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _37 => _37.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var on=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};var sn=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var mn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var rn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var an=class extends e{constructor(n,t){super(["incr",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrby",...n],t)}};var dn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],_nullishCoalesce(n[1], () => ("$"))],t)}};var Cn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var gn=class extends e{constructor(n,t){let o=_nullishCoalesce(n[1], () => ("$")),m=_nullishCoalesce(n[2], () => (0)),r=_nullishCoalesce(n[3], () => (0));super(["JSON.ARRTRIM",n[0],o,m,r],t)}};var xn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var fn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var yn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var bn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var Tn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var On=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var wn=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var kn=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var Rn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var Sn=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var En=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var vn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var Pn=class extends e{constructor(n,t){super(["keys",...n],t)}};var In=class extends e{constructor(n,t){super(["lindex",...n],t)}};var Nn=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Ln=class extends e{constructor(n,t){super(["llen",...n],t)}};var zn=class extends e{constructor(n,t){super(["lmove",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,m,r,a]=n;super(["LMPOP",o,...m,r,...a?["COUNT",a]:[]],t)}};var Kn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Xn=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof _optionalChain([n, 'access', _38 => _38[2], 'optionalAccess', _39 => _39.rank])=="number"&&o.push("rank",n[2].rank),typeof _optionalChain([n, 'access', _40 => _40[2], 'optionalAccess', _41 => _41.count])=="number"&&o.push("count",n[2].count),typeof _optionalChain([n, 'access', _42 => _42[2], 'optionalAccess', _43 => _43.maxLen])=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Un=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Jn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Hn=class extends e{constructor(n,t){super(["lset",...n],t)}};var Fn=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var $n=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var qn=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,m])=>[o,m])],t)}};var jn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flatMap(o=>o)],t)}};var Yn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var _n=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var Wn=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var nt=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var tt=class extends e{constructor(n,t){let o=["ping"];typeof n<"u"&&typeof n[0]<"u"&&o.push(n[0]),super(o,t)}};var et=class extends e{constructor(n,t){super(["psetex",...n],t)}};var ot=class extends e{constructor(n,t){super(["pttl",...n],t)}};var st=class extends e{constructor(n,t){super(["publish",...n],t)}};var mt=class extends e{constructor(n){super(["randomkey"],n)}};var rt=class extends e{constructor(n,t){super(["rename",...n],t)}};var at=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var it=class extends e{constructor(n,t){super(["rpop",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpush",...n],t)}};var dt=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var ct=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ut=class extends e{constructor([n,t],o){let m=["scan",n];_optionalChain([t, 'optionalAccess', _44 => _44.match])&&m.push("match",t.match),typeof _optionalChain([t, 'optionalAccess', _45 => _45.count])=="number"&&m.push("count",t.count),_optionalChain([t, 'optionalAccess', _46 => _46.type])&&t.type.length>0&&m.push("type",t.type),super(m,{deserialize:h,...o})}};var ht=class extends e{constructor(n,t){super(["scard",...n],t)}};var lt=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var Ct=class extends e{constructor([n],t){let o=["script","flush"];_optionalChain([n, 'optionalAccess', _47 => _47.sync])?o.push("sync"):_optionalChain([n, 'optionalAccess', _48 => _48.async])&&o.push("async"),super(o,t)}};var gt=class extends e{constructor(n,t){super(["script","load",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var ft=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var yt=class extends e{constructor([n,t,o],m){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,m)}};var bt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var Tt=class extends e{constructor(n,t){super(["setex",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setnx",...n],t)}};var wt=class extends e{constructor(n,t){super(["setrange",...n],t)}};var Dt=class extends e{constructor(n,t){super(["sinter",...n],t)}};var At=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var kt=class extends e{constructor(n,t){super(["sismember",...n],t)}};var Rt=class extends e{constructor(n,t){super(["smembers",...n],t)}};var St=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var Et=class extends e{constructor(n,t){super(["smove",...n],t)}};var Mt=class extends e{constructor([n,t],o){let m=["spop",n];typeof t=="number"&&m.push(t),super(m,o)}};var vt=class extends e{constructor([n,t],o){let m=["srandmember",n];typeof t=="number"&&m.push(t),super(m,o)}};var Pt=class extends e{constructor(n,t){super(["srem",...n],t)}};var It=class extends e{constructor([n,t,o],m){let r=["sscan",n,t];_optionalChain([o, 'optionalAccess', _49 => _49.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _50 => _50.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var Nt=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Lt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var zt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var Gt=class extends e{constructor(n){super(["time"],n)}};var Kt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Xt=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Ut=class extends e{constructor(n,t){super(["type",...n],t)}};var Jt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Bt=class extends e{constructor([n,t,o],m){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],m)}};var Zt=class extends e{constructor([n,t,o,m],r){let a=["XADD",n];m&&(m.nomkStream&&a.push("NOMKSTREAM"),m.trim&&(a.push(m.trim.type,m.trim.comparison,m.trim.threshold),typeof m.trim.limit<"u"&&a.push("LIMIT",m.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Ht=class extends e{constructor([n,t,o,m,r,a],i){let p=[];_optionalChain([a, 'optionalAccess', _51 => _51.count])&&p.push("COUNT",a.count),_optionalChain([a, 'optionalAccess', _52 => _52.justId])&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,m,r,...p],i)}};var Ft=class extends e{constructor([n,t,o,m,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];_optionalChain([a, 'optionalAccess', _53 => _53.idleMS])&&d.push("IDLE",a.idleMS),_optionalChain([a, 'optionalAccess', _54 => _54.idleMS])&&d.push("TIME",a.timeMS),_optionalChain([a, 'optionalAccess', _55 => _55.retryCount])&&d.push("RETRYCOUNT",_optionalChain([a, 'optionalAccess', _56 => _56.retryCount])),_optionalChain([a, 'optionalAccess', _57 => _57.force])&&d.push("FORCE"),_optionalChain([a, 'optionalAccess', _58 => _58.justId])&&d.push("JUSTID"),_optionalChain([a, 'optionalAccess', _59 => _59.lastId])&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,m,...p,...d],i)}};var $t=class extends e{constructor([n,t],o){let m=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...m],o)}};var qt=class extends e{constructor([n,t],o){let m=["XGROUP"];switch(t.type){case"CREATE":m.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&m.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break;case"CREATECONSUMER":m.push("CREATECONSUMER",n,t.group,t.consumer);break;case"DELCONSUMER":m.push("DELCONSUMER",n,t.group,t.consumer);break;case"DESTROY":m.push("DESTROY",n,t.group);break;case"SETID":m.push("SETID",n,t.group,t.id),t.options&&t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break;default:throw new Error("Invalid XGROUP")}super(m,o)}};var jt=class extends e{constructor([n,t],o){let m=[];t.type==="CONSUMERS"?m.push("CONSUMERS",n,t.group):m.push("GROUPS",n),super(["XINFO",...m],o)}};var Yt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Vt=class extends e{constructor([n,t,o,m,r,a],i){let p=typeof _optionalChain([a, 'optionalAccess', _60 => _60.consumer])<"u"?Array.isArray(a.consumer)?[...a.consumer]:[a.consumer]:[];super(["XPENDING",n,t,..._optionalChain([a, 'optionalAccess', _61 => _61.idleTime])?["IDLE",a.idleTime]:[],o,m,r,...p],i)}};function Be(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch (e10){n[o][r]=a}}}return n}var _t=class extends e{constructor([n,t,o,m],r){let a=["XRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Be(i),...r})}};var Ze="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",Wt=class extends e{constructor([n,t,o],m){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Ze);let r=[];typeof _optionalChain([o, 'optionalAccess', _62 => _62.count])=="number"&&r.push("COUNT",o.count),typeof _optionalChain([o, 'optionalAccess', _63 => _63.blockMS])=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],m)}};var He="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",Qt=class extends e{constructor([n,t,o,m,r],a){if(Array.isArray(o)&&Array.isArray(m)&&o.length!==m.length)throw new Error(He);let i=[];typeof _optionalChain([r, 'optionalAccess', _64 => _64.count])=="number"&&i.push("COUNT",r.count),typeof _optionalChain([r, 'optionalAccess', _65 => _65.blockMS])=="number"&&i.push("BLOCK",r.blockMS),typeof _optionalChain([r, 'optionalAccess', _66 => _66.NOACK])=="boolean"&&_optionalChain([r, 'optionalAccess', _67 => _67.NOACK])&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(m)?[...m]:[m]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var ne=class extends e{constructor([n,t,o,m],r){let a=["XREVRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Fe(i),...r})}};function Fe(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch (e11){n[o][r]=a}}}return n}var te=class extends e{constructor([n,t],o){let{limit:m,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...m?["LIMIT",m]:[]],o)}};var l=class extends e{constructor([n,t,...o],m){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,m)}};var ee=class extends e{constructor(n,t){super(["zcard",...n],t)}};var oe=class extends e{constructor(n,t){super(["zcount",...n],t)}};var se=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var me=class extends e{constructor([n,t,o,m],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var re=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var ae=class extends e{constructor([n,t],o){let m=["zpopmax",n];typeof t=="number"&&m.push(t),super(m,o)}};var ie=class extends e{constructor([n,t],o){let m=["zpopmin",n];typeof t=="number"&&m.push(t),super(m,o)}};var pe=class extends e{constructor([n,t,o,m],r){let a=["zrange",n,t,o];_optionalChain([m, 'optionalAccess', _68 => _68.byScore])&&a.push("byscore"),_optionalChain([m, 'optionalAccess', _69 => _69.byLex])&&a.push("bylex"),_optionalChain([m, 'optionalAccess', _70 => _70.rev])&&a.push("rev"),typeof _optionalChain([m, 'optionalAccess', _71 => _71.count])<"u"&&typeof _optionalChain([m, 'optionalAccess', _72 => _72.offset])<"u"&&a.push("limit",m.offset,m.count),_optionalChain([m, 'optionalAccess', _73 => _73.withScores])&&a.push("withscores"),super(a,r)}};var de=class extends e{constructor(n,t){super(["zrank",...n],t)}};var ce=class extends e{constructor(n,t){super(["zrem",...n],t)}};var ue=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var he=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var Ce=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var ge=class extends e{constructor([n,t,o],m){let r=["zscan",n,t];_optionalChain([o, 'optionalAccess', _74 => _74.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _75 => _75.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var xe=class extends e{constructor(n,t){super(["zscore",...n],t)}};var fe=class extends e{constructor([n,t,o],m){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),_optionalChain([o, 'optionalAccess', _76 => _76.withScores])&&r.push("withscores")),super(r,m)}};var ye=class extends e{constructor([n,t,o,m],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var be=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var Te=class extends e{constructor(n,t){let[o,m]=n;super(["zmscore",o,...m],t)}};var we= (_class2 =class{constructor(n){;_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this);_class2.prototype.__init27.call(this);_class2.prototype.__init28.call(this);_class2.prototype.__init29.call(this);_class2.prototype.__init30.call(this);_class2.prototype.__init31.call(this);_class2.prototype.__init32.call(this);_class2.prototype.__init33.call(this);_class2.prototype.__init34.call(this);_class2.prototype.__init35.call(this);_class2.prototype.__init36.call(this);_class2.prototype.__init37.call(this);_class2.prototype.__init38.call(this);_class2.prototype.__init39.call(this);_class2.prototype.__init40.call(this);_class2.prototype.__init41.call(this);_class2.prototype.__init42.call(this);_class2.prototype.__init43.call(this);_class2.prototype.__init44.call(this);_class2.prototype.__init45.call(this);_class2.prototype.__init46.call(this);_class2.prototype.__init47.call(this);_class2.prototype.__init48.call(this);_class2.prototype.__init49.call(this);_class2.prototype.__init50.call(this);_class2.prototype.__init51.call(this);_class2.prototype.__init52.call(this);_class2.prototype.__init53.call(this);_class2.prototype.__init54.call(this);_class2.prototype.__init55.call(this);_class2.prototype.__init56.call(this);_class2.prototype.__init57.call(this);_class2.prototype.__init58.call(this);_class2.prototype.__init59.call(this);_class2.prototype.__init60.call(this);_class2.prototype.__init61.call(this);_class2.prototype.__init62.call(this);_class2.prototype.__init63.call(this);_class2.prototype.__init64.call(this);_class2.prototype.__init65.call(this);_class2.prototype.__init66.call(this);_class2.prototype.__init67.call(this);_class2.prototype.__init68.call(this);_class2.prototype.__init69.call(this);_class2.prototype.__init70.call(this);_class2.prototype.__init71.call(this);_class2.prototype.__init72.call(this);_class2.prototype.__init73.call(this);_class2.prototype.__init74.call(this);_class2.prototype.__init75.call(this);_class2.prototype.__init76.call(this);_class2.prototype.__init77.call(this);_class2.prototype.__init78.call(this);_class2.prototype.__init79.call(this);_class2.prototype.__init80.call(this);_class2.prototype.__init81.call(this);_class2.prototype.__init82.call(this);_class2.prototype.__init83.call(this);_class2.prototype.__init84.call(this);_class2.prototype.__init85.call(this);_class2.prototype.__init86.call(this);_class2.prototype.__init87.call(this);_class2.prototype.__init88.call(this);_class2.prototype.__init89.call(this);_class2.prototype.__init90.call(this);_class2.prototype.__init91.call(this);_class2.prototype.__init92.call(this);_class2.prototype.__init93.call(this);_class2.prototype.__init94.call(this);_class2.prototype.__init95.call(this);_class2.prototype.__init96.call(this);_class2.prototype.__init97.call(this);_class2.prototype.__init98.call(this);_class2.prototype.__init99.call(this);_class2.prototype.__init100.call(this);_class2.prototype.__init101.call(this);_class2.prototype.__init102.call(this);_class2.prototype.__init103.call(this);_class2.prototype.__init104.call(this);_class2.prototype.__init105.call(this);_class2.prototype.__init106.call(this);_class2.prototype.__init107.call(this);_class2.prototype.__init108.call(this);_class2.prototype.__init109.call(this);_class2.prototype.__init110.call(this);_class2.prototype.__init111.call(this);_class2.prototype.__init112.call(this);_class2.prototype.__init113.call(this);_class2.prototype.__init114.call(this);_class2.prototype.__init115.call(this);_class2.prototype.__init116.call(this);_class2.prototype.__init117.call(this);_class2.prototype.__init118.call(this);_class2.prototype.__init119.call(this);_class2.prototype.__init120.call(this);_class2.prototype.__init121.call(this);_class2.prototype.__init122.call(this);_class2.prototype.__init123.call(this);_class2.prototype.__init124.call(this);_class2.prototype.__init125.call(this);_class2.prototype.__init126.call(this);_class2.prototype.__init127.call(this);_class2.prototype.__init128.call(this);_class2.prototype.__init129.call(this);_class2.prototype.__init130.call(this);_class2.prototype.__init131.call(this);_class2.prototype.__init132.call(this);_class2.prototype.__init133.call(this);_class2.prototype.__init134.call(this);_class2.prototype.__init135.call(this);_class2.prototype.__init136.call(this);_class2.prototype.__init137.call(this);_class2.prototype.__init138.call(this);_class2.prototype.__init139.call(this);_class2.prototype.__init140.call(this);_class2.prototype.__init141.call(this);_class2.prototype.__init142.call(this);_class2.prototype.__init143.call(this);_class2.prototype.__init144.call(this);_class2.prototype.__init145.call(this);_class2.prototype.__init146.call(this);_class2.prototype.__init147.call(this);_class2.prototype.__init148.call(this);_class2.prototype.__init149.call(this);_class2.prototype.__init150.call(this);_class2.prototype.__init151.call(this);_class2.prototype.__init152.call(this);if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=_nullishCoalesce(n.multiExec, () => (!1)),_optionalChain([this, 'access', _77 => _77.commandOptions, 'optionalAccess', _78 => _78.latencyLogging])){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),m=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),m}}}__init5() {this.exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:m},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(m)})}}length(){return this.commands.length}chain(n){return this.commands.push(n),this}__init6() {this.append=(...n)=>this.chain(new g(n,this.commandOptions))}__init7() {this.bitcount=(...n)=>this.chain(new x(n,this.commandOptions))}__init8() {this.bitfield=(...n)=>new f(n,this.client,this.commandOptions,this.chain.bind(this))}__init9() {this.bitop=(n,t,o,...m)=>this.chain(new y([n,t,o,...m],this.commandOptions))}__init10() {this.bitpos=(...n)=>this.chain(new b(n,this.commandOptions))}__init11() {this.copy=(...n)=>this.chain(new T(n,this.commandOptions))}__init12() {this.zdiffstore=(...n)=>this.chain(new be(n,this.commandOptions))}__init13() {this.dbsize=()=>this.chain(new O(this.commandOptions))}__init14() {this.decr=(...n)=>this.chain(new w(n,this.commandOptions))}__init15() {this.decrby=(...n)=>this.chain(new D(n,this.commandOptions))}__init16() {this.del=(...n)=>this.chain(new A(n,this.commandOptions))}__init17() {this.echo=(...n)=>this.chain(new k(n,this.commandOptions))}__init18() {this.eval=(...n)=>this.chain(new R(n,this.commandOptions))}__init19() {this.evalsha=(...n)=>this.chain(new S(n,this.commandOptions))}__init20() {this.exists=(...n)=>this.chain(new E(n,this.commandOptions))}__init21() {this.expire=(...n)=>this.chain(new M(n,this.commandOptions))}__init22() {this.expireat=(...n)=>this.chain(new v(n,this.commandOptions))}__init23() {this.flushall=n=>this.chain(new P(n,this.commandOptions))}__init24() {this.flushdb=(...n)=>this.chain(new I(n,this.commandOptions))}__init25() {this.geoadd=(...n)=>this.chain(new N(n,this.commandOptions))}__init26() {this.geodist=(...n)=>this.chain(new L(n,this.commandOptions))}__init27() {this.geopos=(...n)=>this.chain(new G(n,this.commandOptions))}__init28() {this.geohash=(...n)=>this.chain(new z(n,this.commandOptions))}__init29() {this.geosearch=(...n)=>this.chain(new K(n,this.commandOptions))}__init30() {this.geosearchstore=(...n)=>this.chain(new X(n,this.commandOptions))}__init31() {this.get=(...n)=>this.chain(new U(n,this.commandOptions))}__init32() {this.getbit=(...n)=>this.chain(new J(n,this.commandOptions))}__init33() {this.getdel=(...n)=>this.chain(new B(n,this.commandOptions))}__init34() {this.getrange=(...n)=>this.chain(new Z(n,this.commandOptions))}__init35() {this.getset=(n,t)=>this.chain(new H([n,t],this.commandOptions))}__init36() {this.hdel=(...n)=>this.chain(new F(n,this.commandOptions))}__init37() {this.hexists=(...n)=>this.chain(new $(n,this.commandOptions))}__init38() {this.hget=(...n)=>this.chain(new q(n,this.commandOptions))}__init39() {this.hgetall=(...n)=>this.chain(new j(n,this.commandOptions))}__init40() {this.hincrby=(...n)=>this.chain(new Y(n,this.commandOptions))}__init41() {this.hincrbyfloat=(...n)=>this.chain(new V(n,this.commandOptions))}__init42() {this.hkeys=(...n)=>this.chain(new _(n,this.commandOptions))}__init43() {this.hlen=(...n)=>this.chain(new W(n,this.commandOptions))}__init44() {this.hmget=(...n)=>this.chain(new Q(n,this.commandOptions))}__init45() {this.hmset=(n,t)=>this.chain(new nn([n,t],this.commandOptions))}__init46() {this.hrandfield=(n,t,o)=>this.chain(new tn([n,t,o],this.commandOptions))}__init47() {this.hscan=(...n)=>this.chain(new en(n,this.commandOptions))}__init48() {this.hset=(n,t)=>this.chain(new on([n,t],this.commandOptions))}__init49() {this.hsetnx=(n,t,o)=>this.chain(new sn([n,t,o],this.commandOptions))}__init50() {this.hstrlen=(...n)=>this.chain(new mn(n,this.commandOptions))}__init51() {this.hvals=(...n)=>this.chain(new rn(n,this.commandOptions))}__init52() {this.incr=(...n)=>this.chain(new an(n,this.commandOptions))}__init53() {this.incrby=(...n)=>this.chain(new pn(n,this.commandOptions))}__init54() {this.incrbyfloat=(...n)=>this.chain(new dn(n,this.commandOptions))}__init55() {this.keys=(...n)=>this.chain(new Pn(n,this.commandOptions))}__init56() {this.lindex=(...n)=>this.chain(new In(n,this.commandOptions))}__init57() {this.linsert=(n,t,o,m)=>this.chain(new Nn([n,t,o,m],this.commandOptions))}__init58() {this.llen=(...n)=>this.chain(new Ln(n,this.commandOptions))}__init59() {this.lmove=(...n)=>this.chain(new zn(n,this.commandOptions))}__init60() {this.lpop=(...n)=>this.chain(new Kn(n,this.commandOptions))}__init61() {this.lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions))}__init62() {this.lpos=(...n)=>this.chain(new Xn(n,this.commandOptions))}__init63() {this.lpush=(n,...t)=>this.chain(new Un([n,...t],this.commandOptions))}__init64() {this.lpushx=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions))}__init65() {this.lrange=(...n)=>this.chain(new Bn(n,this.commandOptions))}__init66() {this.lrem=(n,t,o)=>this.chain(new Zn([n,t,o],this.commandOptions))}__init67() {this.lset=(n,t,o)=>this.chain(new Hn([n,t,o],this.commandOptions))}__init68() {this.ltrim=(...n)=>this.chain(new Fn(n,this.commandOptions))}__init69() {this.mget=(...n)=>this.chain(new $n(n,this.commandOptions))}__init70() {this.mset=n=>this.chain(new qn([n],this.commandOptions))}__init71() {this.msetnx=n=>this.chain(new jn([n],this.commandOptions))}__init72() {this.persist=(...n)=>this.chain(new Yn(n,this.commandOptions))}__init73() {this.pexpire=(...n)=>this.chain(new Vn(n,this.commandOptions))}__init74() {this.pexpireat=(...n)=>this.chain(new _n(n,this.commandOptions))}__init75() {this.pfadd=(...n)=>this.chain(new Wn(n,this.commandOptions))}__init76() {this.pfcount=(...n)=>this.chain(new Qn(n,this.commandOptions))}__init77() {this.pfmerge=(...n)=>this.chain(new nt(n,this.commandOptions))}__init78() {this.ping=n=>this.chain(new tt(n,this.commandOptions))}__init79() {this.psetex=(n,t,o)=>this.chain(new et([n,t,o],this.commandOptions))}__init80() {this.pttl=(...n)=>this.chain(new ot(n,this.commandOptions))}__init81() {this.publish=(...n)=>this.chain(new st(n,this.commandOptions))}__init82() {this.randomkey=()=>this.chain(new mt(this.commandOptions))}__init83() {this.rename=(...n)=>this.chain(new rt(n,this.commandOptions))}__init84() {this.renamenx=(...n)=>this.chain(new at(n,this.commandOptions))}__init85() {this.rpop=(...n)=>this.chain(new it(n,this.commandOptions))}__init86() {this.rpush=(n,...t)=>this.chain(new pt([n,...t],this.commandOptions))}__init87() {this.rpushx=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions))}__init88() {this.sadd=(n,...t)=>this.chain(new ct([n,...t],this.commandOptions))}__init89() {this.scan=(...n)=>this.chain(new ut(n,this.commandOptions))}__init90() {this.scard=(...n)=>this.chain(new ht(n,this.commandOptions))}__init91() {this.scriptExists=(...n)=>this.chain(new lt(n,this.commandOptions))}__init92() {this.scriptFlush=(...n)=>this.chain(new Ct(n,this.commandOptions))}__init93() {this.scriptLoad=(...n)=>this.chain(new gt(n,this.commandOptions))}__init94() {this.sdiff=(...n)=>this.chain(new xt(n,this.commandOptions))}__init95() {this.sdiffstore=(...n)=>this.chain(new ft(n,this.commandOptions))}__init96() {this.set=(n,t,o)=>this.chain(new yt([n,t,o],this.commandOptions))}__init97() {this.setbit=(...n)=>this.chain(new bt(n,this.commandOptions))}__init98() {this.setex=(n,t,o)=>this.chain(new Tt([n,t,o],this.commandOptions))}__init99() {this.setnx=(n,t)=>this.chain(new Ot([n,t],this.commandOptions))}__init100() {this.setrange=(...n)=>this.chain(new wt(n,this.commandOptions))}__init101() {this.sinter=(...n)=>this.chain(new Dt(n,this.commandOptions))}__init102() {this.sinterstore=(...n)=>this.chain(new At(n,this.commandOptions))}__init103() {this.sismember=(n,t)=>this.chain(new kt([n,t],this.commandOptions))}__init104() {this.smembers=(...n)=>this.chain(new Rt(n,this.commandOptions))}__init105() {this.smismember=(n,t)=>this.chain(new St([n,t],this.commandOptions))}__init106() {this.smove=(n,t,o)=>this.chain(new Et([n,t,o],this.commandOptions))}__init107() {this.spop=(...n)=>this.chain(new Mt(n,this.commandOptions))}__init108() {this.srandmember=(...n)=>this.chain(new vt(n,this.commandOptions))}__init109() {this.srem=(n,...t)=>this.chain(new Pt([n,...t],this.commandOptions))}__init110() {this.sscan=(...n)=>this.chain(new It(n,this.commandOptions))}__init111() {this.strlen=(...n)=>this.chain(new Nt(n,this.commandOptions))}__init112() {this.sunion=(...n)=>this.chain(new Lt(n,this.commandOptions))}__init113() {this.sunionstore=(...n)=>this.chain(new zt(n,this.commandOptions))}__init114() {this.time=()=>this.chain(new Gt(this.commandOptions))}__init115() {this.touch=(...n)=>this.chain(new Kt(n,this.commandOptions))}__init116() {this.ttl=(...n)=>this.chain(new Xt(n,this.commandOptions))}__init117() {this.type=(...n)=>this.chain(new Ut(n,this.commandOptions))}__init118() {this.unlink=(...n)=>this.chain(new Jt(n,this.commandOptions))}__init119() {this.zadd=(...n)=>"score"in n[1]?this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions))}__init120() {this.xadd=(...n)=>this.chain(new Zt(n,this.commandOptions))}__init121() {this.xack=(...n)=>this.chain(new Bt(n,this.commandOptions))}__init122() {this.xdel=(...n)=>this.chain(new $t(n,this.commandOptions))}__init123() {this.xgroup=(...n)=>this.chain(new qt(n,this.commandOptions))}__init124() {this.xread=(...n)=>this.chain(new Wt(n,this.commandOptions))}__init125() {this.xreadgroup=(...n)=>this.chain(new Qt(n,this.commandOptions))}__init126() {this.xinfo=(...n)=>this.chain(new jt(n,this.commandOptions))}__init127() {this.xlen=(...n)=>this.chain(new Yt(n,this.commandOptions))}__init128() {this.xpending=(...n)=>this.chain(new Vt(n,this.commandOptions))}__init129() {this.xclaim=(...n)=>this.chain(new Ft(n,this.commandOptions))}__init130() {this.xautoclaim=(...n)=>this.chain(new Ht(n,this.commandOptions))}__init131() {this.xtrim=(...n)=>this.chain(new te(n,this.commandOptions))}__init132() {this.xrange=(...n)=>this.chain(new _t(n,this.commandOptions))}__init133() {this.xrevrange=(...n)=>this.chain(new ne(n,this.commandOptions))}__init134() {this.zcard=(...n)=>this.chain(new ee(n,this.commandOptions))}__init135() {this.zcount=(...n)=>this.chain(new oe(n,this.commandOptions))}__init136() {this.zincrby=(n,t,o)=>this.chain(new se([n,t,o],this.commandOptions))}__init137() {this.zinterstore=(...n)=>this.chain(new me(n,this.commandOptions))}__init138() {this.zlexcount=(...n)=>this.chain(new re(n,this.commandOptions))}__init139() {this.zmscore=(...n)=>this.chain(new Te(n,this.commandOptions))}__init140() {this.zpopmax=(...n)=>this.chain(new ae(n,this.commandOptions))}__init141() {this.zpopmin=(...n)=>this.chain(new ie(n,this.commandOptions))}__init142() {this.zrange=(...n)=>this.chain(new pe(n,this.commandOptions))}__init143() {this.zrank=(n,t)=>this.chain(new de([n,t],this.commandOptions))}__init144() {this.zrem=(n,...t)=>this.chain(new ce([n,...t],this.commandOptions))}__init145() {this.zremrangebylex=(...n)=>this.chain(new ue(n,this.commandOptions))}__init146() {this.zremrangebyrank=(...n)=>this.chain(new he(n,this.commandOptions))}__init147() {this.zremrangebyscore=(...n)=>this.chain(new le(n,this.commandOptions))}__init148() {this.zrevrank=(n,t)=>this.chain(new Ce([n,t],this.commandOptions))}__init149() {this.zscan=(...n)=>this.chain(new ge(n,this.commandOptions))}__init150() {this.zscore=(n,t)=>this.chain(new xe([n,t],this.commandOptions))}__init151() {this.zunionstore=(...n)=>this.chain(new ye(n,this.commandOptions))}__init152() {this.zunion=(...n)=>this.chain(new fe(n,this.commandOptions))}get json(){return{arrappend:(...n)=>this.chain(new cn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new un(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new hn(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new Cn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new gn(n,this.commandOptions)),clear:(...n)=>this.chain(new xn(n,this.commandOptions)),del:(...n)=>this.chain(new fn(n,this.commandOptions)),forget:(...n)=>this.chain(new yn(n,this.commandOptions)),get:(...n)=>this.chain(new bn(n,this.commandOptions)),mget:(...n)=>this.chain(new Tn(n,this.commandOptions)),numincrby:(...n)=>this.chain(new On(n,this.commandOptions)),nummultby:(...n)=>this.chain(new wn(n,this.commandOptions)),objkeys:(...n)=>this.chain(new Dn(n,this.commandOptions)),objlen:(...n)=>this.chain(new An(n,this.commandOptions)),resp:(...n)=>this.chain(new kn(n,this.commandOptions)),set:(...n)=>this.chain(new Rn(n,this.commandOptions)),strappend:(...n)=>this.chain(new Sn(n,this.commandOptions)),strlen:(...n)=>this.chain(new En(n,this.commandOptions)),toggle:(...n)=>this.chain(new Mn(n,this.commandOptions)),type:(...n)=>this.chain(new vn(n,this.commandOptions))}}}, _class2);var _enchexjs = require('crypto-js/enc-hex.js'); var _enchexjs2 = _interopRequireDefault(_enchexjs);var _sha1js = require('crypto-js/sha1.js'); var _sha1js2 = _interopRequireDefault(_sha1js);var Ae=class{constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async m=>{if(m instanceof Error&&m.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw m})}digest(n){return _enchexjs2.default.stringify(_sha1js2.default.call(void 0, n))}};var Ie= (_class3 =class{constructor(n,t){;_class3.prototype.__init153.call(this);_class3.prototype.__init154.call(this);_class3.prototype.__init155.call(this);_class3.prototype.__init156.call(this);_class3.prototype.__init157.call(this);_class3.prototype.__init158.call(this);_class3.prototype.__init159.call(this);_class3.prototype.__init160.call(this);_class3.prototype.__init161.call(this);_class3.prototype.__init162.call(this);_class3.prototype.__init163.call(this);_class3.prototype.__init164.call(this);_class3.prototype.__init165.call(this);_class3.prototype.__init166.call(this);_class3.prototype.__init167.call(this);_class3.prototype.__init168.call(this);_class3.prototype.__init169.call(this);_class3.prototype.__init170.call(this);_class3.prototype.__init171.call(this);_class3.prototype.__init172.call(this);_class3.prototype.__init173.call(this);_class3.prototype.__init174.call(this);_class3.prototype.__init175.call(this);_class3.prototype.__init176.call(this);_class3.prototype.__init177.call(this);_class3.prototype.__init178.call(this);_class3.prototype.__init179.call(this);_class3.prototype.__init180.call(this);_class3.prototype.__init181.call(this);_class3.prototype.__init182.call(this);_class3.prototype.__init183.call(this);_class3.prototype.__init184.call(this);_class3.prototype.__init185.call(this);_class3.prototype.__init186.call(this);_class3.prototype.__init187.call(this);_class3.prototype.__init188.call(this);_class3.prototype.__init189.call(this);_class3.prototype.__init190.call(this);_class3.prototype.__init191.call(this);_class3.prototype.__init192.call(this);_class3.prototype.__init193.call(this);_class3.prototype.__init194.call(this);_class3.prototype.__init195.call(this);_class3.prototype.__init196.call(this);_class3.prototype.__init197.call(this);_class3.prototype.__init198.call(this);_class3.prototype.__init199.call(this);_class3.prototype.__init200.call(this);_class3.prototype.__init201.call(this);_class3.prototype.__init202.call(this);_class3.prototype.__init203.call(this);_class3.prototype.__init204.call(this);_class3.prototype.__init205.call(this);_class3.prototype.__init206.call(this);_class3.prototype.__init207.call(this);_class3.prototype.__init208.call(this);_class3.prototype.__init209.call(this);_class3.prototype.__init210.call(this);_class3.prototype.__init211.call(this);_class3.prototype.__init212.call(this);_class3.prototype.__init213.call(this);_class3.prototype.__init214.call(this);_class3.prototype.__init215.call(this);_class3.prototype.__init216.call(this);_class3.prototype.__init217.call(this);_class3.prototype.__init218.call(this);_class3.prototype.__init219.call(this);_class3.prototype.__init220.call(this);_class3.prototype.__init221.call(this);_class3.prototype.__init222.call(this);_class3.prototype.__init223.call(this);_class3.prototype.__init224.call(this);_class3.prototype.__init225.call(this);_class3.prototype.__init226.call(this);_class3.prototype.__init227.call(this);_class3.prototype.__init228.call(this);_class3.prototype.__init229.call(this);_class3.prototype.__init230.call(this);_class3.prototype.__init231.call(this);_class3.prototype.__init232.call(this);_class3.prototype.__init233.call(this);_class3.prototype.__init234.call(this);_class3.prototype.__init235.call(this);_class3.prototype.__init236.call(this);_class3.prototype.__init237.call(this);_class3.prototype.__init238.call(this);_class3.prototype.__init239.call(this);_class3.prototype.__init240.call(this);_class3.prototype.__init241.call(this);_class3.prototype.__init242.call(this);_class3.prototype.__init243.call(this);_class3.prototype.__init244.call(this);_class3.prototype.__init245.call(this);_class3.prototype.__init246.call(this);_class3.prototype.__init247.call(this);_class3.prototype.__init248.call(this);_class3.prototype.__init249.call(this);_class3.prototype.__init250.call(this);_class3.prototype.__init251.call(this);_class3.prototype.__init252.call(this);_class3.prototype.__init253.call(this);_class3.prototype.__init254.call(this);_class3.prototype.__init255.call(this);_class3.prototype.__init256.call(this);_class3.prototype.__init257.call(this);_class3.prototype.__init258.call(this);_class3.prototype.__init259.call(this);_class3.prototype.__init260.call(this);_class3.prototype.__init261.call(this);_class3.prototype.__init262.call(this);_class3.prototype.__init263.call(this);_class3.prototype.__init264.call(this);_class3.prototype.__init265.call(this);_class3.prototype.__init266.call(this);_class3.prototype.__init267.call(this);_class3.prototype.__init268.call(this);_class3.prototype.__init269.call(this);_class3.prototype.__init270.call(this);_class3.prototype.__init271.call(this);_class3.prototype.__init272.call(this);_class3.prototype.__init273.call(this);_class3.prototype.__init274.call(this);_class3.prototype.__init275.call(this);_class3.prototype.__init276.call(this);_class3.prototype.__init277.call(this);_class3.prototype.__init278.call(this);_class3.prototype.__init279.call(this);_class3.prototype.__init280.call(this);_class3.prototype.__init281.call(this);_class3.prototype.__init282.call(this);_class3.prototype.__init283.call(this);_class3.prototype.__init284.call(this);_class3.prototype.__init285.call(this);_class3.prototype.__init286.call(this);_class3.prototype.__init287.call(this);_class3.prototype.__init288.call(this);_class3.prototype.__init289.call(this);_class3.prototype.__init290.call(this);_class3.prototype.__init291.call(this);_class3.prototype.__init292.call(this);_class3.prototype.__init293.call(this);_class3.prototype.__init294.call(this);_class3.prototype.__init295.call(this);_class3.prototype.__init296.call(this);_class3.prototype.__init297.call(this);_class3.prototype.__init298.call(this);_class3.prototype.__init299.call(this);_class3.prototype.__init300.call(this);_class3.prototype.__init301.call(this);_class3.prototype.__init302.call(this);_class3.prototype.__init303.call(this);_class3.prototype.__init304.call(this);this.client=n,this.opts=t,this.enableTelemetry=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _79 => _79.enableTelemetry]), () => (!0)),this.enableAutoPipelining=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _80 => _80.enableAutoPipelining]), () => (!1))}get json(){return{arrappend:(...n)=>new cn(n,this.opts).exec(this.client),arrindex:(...n)=>new un(n,this.opts).exec(this.client),arrinsert:(...n)=>new hn(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new Cn(n,this.opts).exec(this.client),arrtrim:(...n)=>new gn(n,this.opts).exec(this.client),clear:(...n)=>new xn(n,this.opts).exec(this.client),del:(...n)=>new fn(n,this.opts).exec(this.client),forget:(...n)=>new yn(n,this.opts).exec(this.client),get:(...n)=>new bn(n,this.opts).exec(this.client),mget:(...n)=>new Tn(n,this.opts).exec(this.client),numincrby:(...n)=>new On(n,this.opts).exec(this.client),nummultby:(...n)=>new wn(n,this.opts).exec(this.client),objkeys:(...n)=>new Dn(n,this.opts).exec(this.client),objlen:(...n)=>new An(n,this.opts).exec(this.client),resp:(...n)=>new kn(n,this.opts).exec(this.client),set:(...n)=>new Rn(n,this.opts).exec(this.client),strappend:(...n)=>new Sn(n,this.opts).exec(this.client),strlen:(...n)=>new En(n,this.opts).exec(this.client),toggle:(...n)=>new Mn(n,this.opts).exec(this.client),type:(...n)=>new vn(n,this.opts).exec(this.client)}}__init153() {this.use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)}}__init154() {this.addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch (e13){}}}createScript(n){return new Ae(this,n)}__init155() {this.pipeline=()=>new we({client:this.client,commandOptions:this.opts,multiExec:!1})}__init156() {this.autoPipeline=()=>Se(this)}__init157() {this.multi=()=>new we({client:this.client,commandOptions:this.opts,multiExec:!0})}__init158() {this.bitfield=(...n)=>new f(n,this.client,this.opts)}__init159() {this.append=(...n)=>new g(n,this.opts).exec(this.client)}__init160() {this.bitcount=(...n)=>new x(n,this.opts).exec(this.client)}__init161() {this.bitop=(n,t,o,...m)=>new y([n,t,o,...m],this.opts).exec(this.client)}__init162() {this.bitpos=(...n)=>new b(n,this.opts).exec(this.client)}__init163() {this.copy=(...n)=>new T(n,this.opts).exec(this.client)}__init164() {this.dbsize=()=>new O(this.opts).exec(this.client)}__init165() {this.decr=(...n)=>new w(n,this.opts).exec(this.client)}__init166() {this.decrby=(...n)=>new D(n,this.opts).exec(this.client)}__init167() {this.del=(...n)=>new A(n,this.opts).exec(this.client)}__init168() {this.echo=(...n)=>new k(n,this.opts).exec(this.client)}__init169() {this.eval=(...n)=>new R(n,this.opts).exec(this.client)}__init170() {this.evalsha=(...n)=>new S(n,this.opts).exec(this.client)}__init171() {this.exists=(...n)=>new E(n,this.opts).exec(this.client)}__init172() {this.expire=(...n)=>new M(n,this.opts).exec(this.client)}__init173() {this.expireat=(...n)=>new v(n,this.opts).exec(this.client)}__init174() {this.flushall=n=>new P(n,this.opts).exec(this.client)}__init175() {this.flushdb=(...n)=>new I(n,this.opts).exec(this.client)}__init176() {this.geoadd=(...n)=>new N(n,this.opts).exec(this.client)}__init177() {this.geopos=(...n)=>new G(n,this.opts).exec(this.client)}__init178() {this.geodist=(...n)=>new L(n,this.opts).exec(this.client)}__init179() {this.geohash=(...n)=>new z(n,this.opts).exec(this.client)}__init180() {this.geosearch=(...n)=>new K(n,this.opts).exec(this.client)}__init181() {this.geosearchstore=(...n)=>new X(n,this.opts).exec(this.client)}__init182() {this.get=(...n)=>new U(n,this.opts).exec(this.client)}__init183() {this.getbit=(...n)=>new J(n,this.opts).exec(this.client)}__init184() {this.getdel=(...n)=>new B(n,this.opts).exec(this.client)}__init185() {this.getrange=(...n)=>new Z(n,this.opts).exec(this.client)}__init186() {this.getset=(n,t)=>new H([n,t],this.opts).exec(this.client)}__init187() {this.hdel=(...n)=>new F(n,this.opts).exec(this.client)}__init188() {this.hexists=(...n)=>new $(n,this.opts).exec(this.client)}__init189() {this.hget=(...n)=>new q(n,this.opts).exec(this.client)}__init190() {this.hgetall=(...n)=>new j(n,this.opts).exec(this.client)}__init191() {this.hincrby=(...n)=>new Y(n,this.opts).exec(this.client)}__init192() {this.hincrbyfloat=(...n)=>new V(n,this.opts).exec(this.client)}__init193() {this.hkeys=(...n)=>new _(n,this.opts).exec(this.client)}__init194() {this.hlen=(...n)=>new W(n,this.opts).exec(this.client)}__init195() {this.hmget=(...n)=>new Q(n,this.opts).exec(this.client)}__init196() {this.hmset=(n,t)=>new nn([n,t],this.opts).exec(this.client)}__init197() {this.hrandfield=(n,t,o)=>new tn([n,t,o],this.opts).exec(this.client)}__init198() {this.hscan=(...n)=>new en(n,this.opts).exec(this.client)}__init199() {this.hset=(n,t)=>new on([n,t],this.opts).exec(this.client)}__init200() {this.hsetnx=(n,t,o)=>new sn([n,t,o],this.opts).exec(this.client)}__init201() {this.hstrlen=(...n)=>new mn(n,this.opts).exec(this.client)}__init202() {this.hvals=(...n)=>new rn(n,this.opts).exec(this.client)}__init203() {this.incr=(...n)=>new an(n,this.opts).exec(this.client)}__init204() {this.incrby=(...n)=>new pn(n,this.opts).exec(this.client)}__init205() {this.incrbyfloat=(...n)=>new dn(n,this.opts).exec(this.client)}__init206() {this.keys=(...n)=>new Pn(n,this.opts).exec(this.client)}__init207() {this.lindex=(...n)=>new In(n,this.opts).exec(this.client)}__init208() {this.linsert=(n,t,o,m)=>new Nn([n,t,o,m],this.opts).exec(this.client)}__init209() {this.llen=(...n)=>new Ln(n,this.opts).exec(this.client)}__init210() {this.lmove=(...n)=>new zn(n,this.opts).exec(this.client)}__init211() {this.lpop=(...n)=>new Kn(n,this.opts).exec(this.client)}__init212() {this.lmpop=(...n)=>new Gn(n,this.opts).exec(this.client)}__init213() {this.lpos=(...n)=>new Xn(n,this.opts).exec(this.client)}__init214() {this.lpush=(n,...t)=>new Un([n,...t],this.opts).exec(this.client)}__init215() {this.lpushx=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client)}__init216() {this.lrange=(...n)=>new Bn(n,this.opts).exec(this.client)}__init217() {this.lrem=(n,t,o)=>new Zn([n,t,o],this.opts).exec(this.client)}__init218() {this.lset=(n,t,o)=>new Hn([n,t,o],this.opts).exec(this.client)}__init219() {this.ltrim=(...n)=>new Fn(n,this.opts).exec(this.client)}__init220() {this.mget=(...n)=>new $n(n,this.opts).exec(this.client)}__init221() {this.mset=n=>new qn([n],this.opts).exec(this.client)}__init222() {this.msetnx=n=>new jn([n],this.opts).exec(this.client)}__init223() {this.persist=(...n)=>new Yn(n,this.opts).exec(this.client)}__init224() {this.pexpire=(...n)=>new Vn(n,this.opts).exec(this.client)}__init225() {this.pexpireat=(...n)=>new _n(n,this.opts).exec(this.client)}__init226() {this.pfadd=(...n)=>new Wn(n,this.opts).exec(this.client)}__init227() {this.pfcount=(...n)=>new Qn(n,this.opts).exec(this.client)}__init228() {this.pfmerge=(...n)=>new nt(n,this.opts).exec(this.client)}__init229() {this.ping=n=>new tt(n,this.opts).exec(this.client)}__init230() {this.psetex=(n,t,o)=>new et([n,t,o],this.opts).exec(this.client)}__init231() {this.pttl=(...n)=>new ot(n,this.opts).exec(this.client)}__init232() {this.publish=(...n)=>new st(n,this.opts).exec(this.client)}__init233() {this.randomkey=()=>new mt().exec(this.client)}__init234() {this.rename=(...n)=>new rt(n,this.opts).exec(this.client)}__init235() {this.renamenx=(...n)=>new at(n,this.opts).exec(this.client)}__init236() {this.rpop=(...n)=>new it(n,this.opts).exec(this.client)}__init237() {this.rpush=(n,...t)=>new pt([n,...t],this.opts).exec(this.client)}__init238() {this.rpushx=(n,...t)=>new dt([n,...t],this.opts).exec(this.client)}__init239() {this.sadd=(n,...t)=>new ct([n,...t],this.opts).exec(this.client)}__init240() {this.scan=(...n)=>new ut(n,this.opts).exec(this.client)}__init241() {this.scard=(...n)=>new ht(n,this.opts).exec(this.client)}__init242() {this.scriptExists=(...n)=>new lt(n,this.opts).exec(this.client)}__init243() {this.scriptFlush=(...n)=>new Ct(n,this.opts).exec(this.client)}__init244() {this.scriptLoad=(...n)=>new gt(n,this.opts).exec(this.client)}__init245() {this.sdiff=(...n)=>new xt(n,this.opts).exec(this.client)}__init246() {this.sdiffstore=(...n)=>new ft(n,this.opts).exec(this.client)}__init247() {this.set=(n,t,o)=>new yt([n,t,o],this.opts).exec(this.client)}__init248() {this.setbit=(...n)=>new bt(n,this.opts).exec(this.client)}__init249() {this.setex=(n,t,o)=>new Tt([n,t,o],this.opts).exec(this.client)}__init250() {this.setnx=(n,t)=>new Ot([n,t],this.opts).exec(this.client)}__init251() {this.setrange=(...n)=>new wt(n,this.opts).exec(this.client)}__init252() {this.sinter=(...n)=>new Dt(n,this.opts).exec(this.client)}__init253() {this.sinterstore=(...n)=>new At(n,this.opts).exec(this.client)}__init254() {this.sismember=(n,t)=>new kt([n,t],this.opts).exec(this.client)}__init255() {this.smismember=(n,t)=>new St([n,t],this.opts).exec(this.client)}__init256() {this.smembers=(...n)=>new Rt(n,this.opts).exec(this.client)}__init257() {this.smove=(n,t,o)=>new Et([n,t,o],this.opts).exec(this.client)}__init258() {this.spop=(...n)=>new Mt(n,this.opts).exec(this.client)}__init259() {this.srandmember=(...n)=>new vt(n,this.opts).exec(this.client)}__init260() {this.srem=(n,...t)=>new Pt([n,...t],this.opts).exec(this.client)}__init261() {this.sscan=(...n)=>new It(n,this.opts).exec(this.client)}__init262() {this.strlen=(...n)=>new Nt(n,this.opts).exec(this.client)}__init263() {this.sunion=(...n)=>new Lt(n,this.opts).exec(this.client)}__init264() {this.sunionstore=(...n)=>new zt(n,this.opts).exec(this.client)}__init265() {this.time=()=>new Gt().exec(this.client)}__init266() {this.touch=(...n)=>new Kt(n,this.opts).exec(this.client)}__init267() {this.ttl=(...n)=>new Xt(n,this.opts).exec(this.client)}__init268() {this.type=(...n)=>new Ut(n,this.opts).exec(this.client)}__init269() {this.unlink=(...n)=>new Jt(n,this.opts).exec(this.client)}__init270() {this.xadd=(...n)=>new Zt(n,this.opts).exec(this.client)}__init271() {this.xack=(...n)=>new Bt(n,this.opts).exec(this.client)}__init272() {this.xdel=(...n)=>new $t(n,this.opts).exec(this.client)}__init273() {this.xgroup=(...n)=>new qt(n,this.opts).exec(this.client)}__init274() {this.xread=(...n)=>new Wt(n,this.opts).exec(this.client)}__init275() {this.xreadgroup=(...n)=>new Qt(n,this.opts).exec(this.client)}__init276() {this.xinfo=(...n)=>new jt(n,this.opts).exec(this.client)}__init277() {this.xlen=(...n)=>new Yt(n,this.opts).exec(this.client)}__init278() {this.xpending=(...n)=>new Vt(n,this.opts).exec(this.client)}__init279() {this.xclaim=(...n)=>new Ft(n,this.opts).exec(this.client)}__init280() {this.xautoclaim=(...n)=>new Ht(n,this.opts).exec(this.client)}__init281() {this.xtrim=(...n)=>new te(n,this.opts).exec(this.client)}__init282() {this.xrange=(...n)=>new _t(n,this.opts).exec(this.client)}__init283() {this.xrevrange=(...n)=>new ne(n,this.opts).exec(this.client)}__init284() {this.zadd=(...n)=>"score"in n[1]?new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client)}__init285() {this.zcard=(...n)=>new ee(n,this.opts).exec(this.client)}__init286() {this.zcount=(...n)=>new oe(n,this.opts).exec(this.client)}__init287() {this.zdiffstore=(...n)=>new be(n,this.opts).exec(this.client)}__init288() {this.zincrby=(n,t,o)=>new se([n,t,o],this.opts).exec(this.client)}__init289() {this.zinterstore=(...n)=>new me(n,this.opts).exec(this.client)}__init290() {this.zlexcount=(...n)=>new re(n,this.opts).exec(this.client)}__init291() {this.zmscore=(...n)=>new Te(n,this.opts).exec(this.client)}__init292() {this.zpopmax=(...n)=>new ae(n,this.opts).exec(this.client)}__init293() {this.zpopmin=(...n)=>new ie(n,this.opts).exec(this.client)}__init294() {this.zrange=(...n)=>new pe(n,this.opts).exec(this.client)}__init295() {this.zrank=(n,t)=>new de([n,t],this.opts).exec(this.client)}__init296() {this.zrem=(n,...t)=>new ce([n,...t],this.opts).exec(this.client)}__init297() {this.zremrangebylex=(...n)=>new ue(n,this.opts).exec(this.client)}__init298() {this.zremrangebyrank=(...n)=>new he(n,this.opts).exec(this.client)}__init299() {this.zremrangebyscore=(...n)=>new le(n,this.opts).exec(this.client)}__init300() {this.zrevrank=(n,t)=>new Ce([n,t],this.opts).exec(this.client)}__init301() {this.zscan=(...n)=>new ge(n,this.opts).exec(this.client)}__init302() {this.zscore=(n,t)=>new xe([n,t],this.opts).exec(this.client)}__init303() {this.zunion=(...n)=>new fe(n,this.opts).exec(this.client)}__init304() {this.zunionstore=(...n)=>new ye(n,this.opts).exec(this.client)}}, _class3);var tg="v1.32.0";exports.a = ze; exports.b = Me; exports.c = Ie; exports.d = tg;
@@ -0,0 +1 @@
1
+ var Ne=Object.defineProperty;var Le=(s,n)=>{for(var t in n)Ne(s,t,{get:n[t],enumerable:!0})};var ze={};Le(ze,{UpstashError:()=>u,UrlError:()=>Oe});var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}},Oe=class extends Error{constructor(n){super(`Upstash Redis client was passed an invalid URL. You should pass the URL together with https. Received: "${n}". `),this.name="UrlError"}};var Me=class{baseUrl;headers;options;retry;constructor(n){if(this.options={backend:n.options?.backend,agent:n.agent,responseEncoding:n.responseEncoding??"base64",cache:n.cache,signal:n.signal,keepAlive:n.keepAlive??!0},this.baseUrl=n.baseUrl.replace(/\/$/,""),!/^https?:\/\/[^\s/$.?#].[^\s]*$/.test(this.baseUrl))throw new Oe(this.baseUrl);this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),typeof n?.retry=="boolean"&&n?.retry===!1?this.retry={attempts:1,backoff:()=>0}:this.retry={attempts:n?.retry?.retries??5,backoff:n?.retry?.backoff??(o=>Math.exp(o)*50)}}mergeTelemetry(n){function t(o,m,r){return r&&(o[m]?o[m]=[o[m],r].join(","):o[m]=r),o}this.headers=t(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=t(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=t(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:this.options?.agent,signal:this.options.signal,backend:this.options?.backend},o=null,m=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,...n.path??[]].join("/"),t);break}catch(i){if(this.options.signal?.aborted){let p=new Blob([JSON.stringify({result:this.options.signal.reason??"Aborted"})]),d={status:200,statusText:this.options.signal.reason??"Aborted"};o=new Response(p,d);break}m=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw m??new Error("Exhausted all retries");let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);return this.options?.responseEncoding==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:ke(i),error:p})):{result:ke(r.result),error:r.error}:r}};function ve(s){let n="";try{let t=atob(s),o=t.length,m=new Uint8Array(o);for(let r=0;r<o;r++)m[r]=t.charCodeAt(r);n=new TextDecoder().decode(m)}catch{n=s}return n}function ke(s){let n;switch(typeof s){case"undefined":return s;case"number":{n=s;break}case"object":{Array.isArray(s)?n=s.map(t=>typeof t=="string"?ve(t):Array.isArray(t)?t.map(ke):t):n=null;break}case"string":{n=s==="OK"?"OK":ve(s);break}default:break}return n}function Se(s,n){let t=s;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new Re(t)),new Proxy(t,{get:(o,m)=>m==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:m==="json"?Se(o,!0):m in o&&!(m in o.autoPipelineExecutor.pipeline)?o[m]:(n?typeof o.autoPipelineExecutor.pipeline.json[m]=="function":typeof o.autoPipelineExecutor.pipeline[m]=="function")?(...i)=>o.autoPipelineExecutor.withAutoPipeline(p=>{n?p.json[m](...i):p[m](...i)}):o.autoPipelineExecutor.pipeline[m]})}var Re=class{pipelinePromises=new WeakMap;activePipeline=null;indexInCurrentPipeline=0;redis;pipeline;pipelineCounter=0;constructor(n){this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=this.activePipeline||this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){return await Promise.resolve(),await Promise.resolve()}};function Pe(s){let n=Array.isArray(s)?s.map(t=>{try{return Pe(t)}catch{return t}}):JSON.parse(s);return typeof n=="number"&&n.toString()!==s?s:n}function Ee(s){try{return Pe(s)}catch{return s}}function h(s){return[s[0],...Ee(s.slice(1))]}var Ge=s=>{switch(typeof s){case"string":case"number":case"boolean":return s;default:return JSON.stringify(s)}},e=class{command;serialize;deserialize;constructor(n,t){if(this.serialize=Ge,this.deserialize=typeof t?.automaticDeserialization>"u"||t.automaticDeserialization?t?.deserialize??Ee:o=>o,this.command=n.map(o=>this.serialize(o)),t?.latencyLogging){let o=this.exec.bind(this);this.exec=async m=>{let r=performance.now(),a=await o(m),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command});if(o)throw new u(o);if(typeof t>"u")throw new Error("Request did not return a result");return this.deserialize(t)}};var g=class extends e{constructor(n,t){super(["append",...n],t)}};var x=class extends e{constructor([n,t,o],m){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,m)}};var f=class{constructor(n,t,o,m=r=>r.exec(this.client)){this.client=t;this.opts=o;this.execOperation=m;this.command=["bitfield",...n]}command;chain(...n){return this.command.push(...n),this}get(...n){return this.chain("get",...n)}set(...n){return this.chain("set",...n)}incrby(...n){return this.chain("incrby",...n)}overflow(n){return this.chain("overflow",n)}exec(){let n=new e(this.command,this.opts);return this.execOperation(n)}};var y=class extends e{constructor(n,t){super(["bitop",...n],t)}};var b=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var T=class extends e{constructor([n,t,o],m){super(["COPY",n,t,...o?.replace?["REPLACE"]:[]],{...m,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var O=class extends e{constructor(n){super(["dbsize"],n)}};var w=class extends e{constructor(n,t){super(["decr",...n],t)}};var D=class extends e{constructor(n,t){super(["decrby",...n],t)}};var A=class extends e{constructor(n,t){super(["del",...n],t)}};var k=class extends e{constructor(n,t){super(["echo",...n],t)}};var R=class extends e{constructor([n,t,o],m){super(["eval",n,t.length,...t,...o??[]],m)}};var S=class extends e{constructor([n,t,o],m){super(["evalsha",n,t.length,...t,...o??[]],m)}};var E=class extends e{constructor(n,t){super(["exists",...n],t)}};var M=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var v=class extends e{constructor(n,t){super(["expireat",...n],t)}};var P=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var I=class extends e{constructor([n],t){let o=["flushdb"];n?.async&&o.push("async"),super(o,t)}};var N=class extends e{constructor([n,t,...o],m){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,m)}};var L=class extends e{constructor([n,t,o,m="M"],r){super(["GEODIST",n,t,o,m],r)}};var z=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...m],t)}};var G=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...m],{deserialize:r=>Ke(r),...t})}};function Ke(s){let n=[];for(let t of s)!t?.[0]||!t?.[1]||n.push({lng:parseFloat(t[0]),lat:parseFloat(t[1])});return n}var K=class extends e{constructor([n,t,o,m,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(m),r?.count&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!r?.withCoord&&!r?.withDist&&!r?.withHash?d.map(c=>{try{return{member:JSON.parse(c)}}catch{return{member:c}}}):d.map(c=>{let De=1,C={};try{C.member=JSON.parse(c[0])}catch{C.member=c[0]}return r.withDist&&(C.dist=parseFloat(c[De++])),r.withHash&&(C.hash=c[De++].toString()),r.withCoord&&(C.coord={long:parseFloat(c[De][0]),lat:parseFloat(c[De][1])}),C});super([...i,...r?.withCoord?["WITHCOORD"]:[],...r?.withDist?["WITHDIST"]:[],...r?.withHash?["WITHHASH"]:[]],{deserialize:p,...a})}};var X=class extends e{constructor([n,t,o,m,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(m.type==="BYRADIUS"||m.type==="byradius")&&p.push(m.type,m.radius,m.radiusType),(m.type==="BYBOX"||m.type==="bybox")&&p.push(m.type,m.rect.width,m.rect.height,m.rectType),p.push(r),a?.count&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,...a?.storeDist?["STOREDIST"]:[]],i)}};var U=class extends e{constructor(n,t){super(["get",...n],t)}};var J=class extends e{constructor(n,t){super(["getbit",...n],t)}};var B=class extends e{constructor(n,t){super(["getdel",...n],t)}};var Z=class extends e{constructor(n,t){super(["getrange",...n],t)}};var H=class extends e{constructor(n,t){super(["getset",...n],t)}};var F=class extends e{constructor(n,t){super(["hdel",...n],t)}};var $=class extends e{constructor(n,t){super(["hexists",...n],t)}};var q=class extends e{constructor(n,t){super(["hget",...n],t)}};function Xe(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o))?n[t]=o:n[t]=JSON.parse(o)}catch{n[t]=o}}return n}var j=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Xe(o),...t})}};var Y=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var V=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var _=class extends e{constructor([n],t){super(["hkeys",n],t)}};var W=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Ue(s,n){if(n.length===0||n.every(o=>o===null))return null;let t={};for(let o=0;o<s.length;o++)try{t[s[o]]=JSON.parse(n[o])}catch{t[s[o]]=n[o]}return t}var Q=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:m=>Ue(t,m),...o})}};var nn=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};function Je(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{n[t]=JSON.parse(o)}catch{n[t]=o}}return n}var tn=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?m=>Je(m):t?.deserialize,...t})}};var en=class extends e{constructor([n,t,o],m){let r=["hscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var on=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};var sn=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var mn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var rn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var an=class extends e{constructor(n,t){super(["incr",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrby",...n],t)}};var dn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],n[1]??"$"],t)}};var Cn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var gn=class extends e{constructor(n,t){let o=n[1]??"$",m=n[2]??0,r=n[3]??0;super(["JSON.ARRTRIM",n[0],o,m,r],t)}};var xn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var fn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var yn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var bn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var Tn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var On=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var wn=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var kn=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var Rn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var Sn=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var En=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var vn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var Pn=class extends e{constructor(n,t){super(["keys",...n],t)}};var In=class extends e{constructor(n,t){super(["lindex",...n],t)}};var Nn=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Ln=class extends e{constructor(n,t){super(["llen",...n],t)}};var zn=class extends e{constructor(n,t){super(["lmove",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,m,r,a]=n;super(["LMPOP",o,...m,r,...a?["COUNT",a]:[]],t)}};var Kn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Xn=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof n[2]?.rank=="number"&&o.push("rank",n[2].rank),typeof n[2]?.count=="number"&&o.push("count",n[2].count),typeof n[2]?.maxLen=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Un=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Jn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Hn=class extends e{constructor(n,t){super(["lset",...n],t)}};var Fn=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var $n=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var qn=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,m])=>[o,m])],t)}};var jn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flatMap(o=>o)],t)}};var Yn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var _n=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var Wn=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var nt=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var tt=class extends e{constructor(n,t){let o=["ping"];typeof n<"u"&&typeof n[0]<"u"&&o.push(n[0]),super(o,t)}};var et=class extends e{constructor(n,t){super(["psetex",...n],t)}};var ot=class extends e{constructor(n,t){super(["pttl",...n],t)}};var st=class extends e{constructor(n,t){super(["publish",...n],t)}};var mt=class extends e{constructor(n){super(["randomkey"],n)}};var rt=class extends e{constructor(n,t){super(["rename",...n],t)}};var at=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var it=class extends e{constructor(n,t){super(["rpop",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpush",...n],t)}};var dt=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var ct=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ut=class extends e{constructor([n,t],o){let m=["scan",n];t?.match&&m.push("match",t.match),typeof t?.count=="number"&&m.push("count",t.count),t?.type&&t.type.length>0&&m.push("type",t.type),super(m,{deserialize:h,...o})}};var ht=class extends e{constructor(n,t){super(["scard",...n],t)}};var lt=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var Ct=class extends e{constructor([n],t){let o=["script","flush"];n?.sync?o.push("sync"):n?.async&&o.push("async"),super(o,t)}};var gt=class extends e{constructor(n,t){super(["script","load",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var ft=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var yt=class extends e{constructor([n,t,o],m){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,m)}};var bt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var Tt=class extends e{constructor(n,t){super(["setex",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setnx",...n],t)}};var wt=class extends e{constructor(n,t){super(["setrange",...n],t)}};var Dt=class extends e{constructor(n,t){super(["sinter",...n],t)}};var At=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var kt=class extends e{constructor(n,t){super(["sismember",...n],t)}};var Rt=class extends e{constructor(n,t){super(["smembers",...n],t)}};var St=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var Et=class extends e{constructor(n,t){super(["smove",...n],t)}};var Mt=class extends e{constructor([n,t],o){let m=["spop",n];typeof t=="number"&&m.push(t),super(m,o)}};var vt=class extends e{constructor([n,t],o){let m=["srandmember",n];typeof t=="number"&&m.push(t),super(m,o)}};var Pt=class extends e{constructor(n,t){super(["srem",...n],t)}};var It=class extends e{constructor([n,t,o],m){let r=["sscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var Nt=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Lt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var zt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var Gt=class extends e{constructor(n){super(["time"],n)}};var Kt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Xt=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Ut=class extends e{constructor(n,t){super(["type",...n],t)}};var Jt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Bt=class extends e{constructor([n,t,o],m){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],m)}};var Zt=class extends e{constructor([n,t,o,m],r){let a=["XADD",n];m&&(m.nomkStream&&a.push("NOMKSTREAM"),m.trim&&(a.push(m.trim.type,m.trim.comparison,m.trim.threshold),typeof m.trim.limit<"u"&&a.push("LIMIT",m.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Ht=class extends e{constructor([n,t,o,m,r,a],i){let p=[];a?.count&&p.push("COUNT",a.count),a?.justId&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,m,r,...p],i)}};var Ft=class extends e{constructor([n,t,o,m,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];a?.idleMS&&d.push("IDLE",a.idleMS),a?.idleMS&&d.push("TIME",a.timeMS),a?.retryCount&&d.push("RETRYCOUNT",a?.retryCount),a?.force&&d.push("FORCE"),a?.justId&&d.push("JUSTID"),a?.lastId&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,m,...p,...d],i)}};var $t=class extends e{constructor([n,t],o){let m=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...m],o)}};var qt=class extends e{constructor([n,t],o){let m=["XGROUP"];switch(t.type){case"CREATE":m.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&m.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break;case"CREATECONSUMER":m.push("CREATECONSUMER",n,t.group,t.consumer);break;case"DELCONSUMER":m.push("DELCONSUMER",n,t.group,t.consumer);break;case"DESTROY":m.push("DESTROY",n,t.group);break;case"SETID":m.push("SETID",n,t.group,t.id),t.options&&t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break;default:throw new Error("Invalid XGROUP")}super(m,o)}};var jt=class extends e{constructor([n,t],o){let m=[];t.type==="CONSUMERS"?m.push("CONSUMERS",n,t.group):m.push("GROUPS",n),super(["XINFO",...m],o)}};var Yt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Vt=class extends e{constructor([n,t,o,m,r,a],i){let p=typeof a?.consumer<"u"?Array.isArray(a.consumer)?[...a.consumer]:[a.consumer]:[];super(["XPENDING",n,t,...a?.idleTime?["IDLE",a.idleTime]:[],o,m,r,...p],i)}};function Be(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var _t=class extends e{constructor([n,t,o,m],r){let a=["XRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Be(i),...r})}};var Ze="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",Wt=class extends e{constructor([n,t,o],m){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Ze);let r=[];typeof o?.count=="number"&&r.push("COUNT",o.count),typeof o?.blockMS=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],m)}};var He="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",Qt=class extends e{constructor([n,t,o,m,r],a){if(Array.isArray(o)&&Array.isArray(m)&&o.length!==m.length)throw new Error(He);let i=[];typeof r?.count=="number"&&i.push("COUNT",r.count),typeof r?.blockMS=="number"&&i.push("BLOCK",r.blockMS),typeof r?.NOACK=="boolean"&&r?.NOACK&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(m)?[...m]:[m]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var ne=class extends e{constructor([n,t,o,m],r){let a=["XREVRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Fe(i),...r})}};function Fe(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var te=class extends e{constructor([n,t],o){let{limit:m,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...m?["LIMIT",m]:[]],o)}};var l=class extends e{constructor([n,t,...o],m){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,m)}};var ee=class extends e{constructor(n,t){super(["zcard",...n],t)}};var oe=class extends e{constructor(n,t){super(["zcount",...n],t)}};var se=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var me=class extends e{constructor([n,t,o,m],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var re=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var ae=class extends e{constructor([n,t],o){let m=["zpopmax",n];typeof t=="number"&&m.push(t),super(m,o)}};var ie=class extends e{constructor([n,t],o){let m=["zpopmin",n];typeof t=="number"&&m.push(t),super(m,o)}};var pe=class extends e{constructor([n,t,o,m],r){let a=["zrange",n,t,o];m?.byScore&&a.push("byscore"),m?.byLex&&a.push("bylex"),m?.rev&&a.push("rev"),typeof m?.count<"u"&&typeof m?.offset<"u"&&a.push("limit",m.offset,m.count),m?.withScores&&a.push("withscores"),super(a,r)}};var de=class extends e{constructor(n,t){super(["zrank",...n],t)}};var ce=class extends e{constructor(n,t){super(["zrem",...n],t)}};var ue=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var he=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var Ce=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var ge=class extends e{constructor([n,t,o],m){let r=["zscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...m})}};var xe=class extends e{constructor(n,t){super(["zscore",...n],t)}};var fe=class extends e{constructor([n,t,o],m){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),o?.withScores&&r.push("withscores")),super(r,m)}};var ye=class extends e{constructor([n,t,o,m],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var be=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var Te=class extends e{constructor(n,t){let[o,m]=n;super(["zmscore",o,...m],t)}};var we=class{client;commands;commandOptions;multiExec;constructor(n){if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=n.multiExec??!1,this.commandOptions?.latencyLogging){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),m=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),m}}}exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:m},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(m)})};length(){return this.commands.length}chain(n){return this.commands.push(n),this}append=(...n)=>this.chain(new g(n,this.commandOptions));bitcount=(...n)=>this.chain(new x(n,this.commandOptions));bitfield=(...n)=>new f(n,this.client,this.commandOptions,this.chain.bind(this));bitop=(n,t,o,...m)=>this.chain(new y([n,t,o,...m],this.commandOptions));bitpos=(...n)=>this.chain(new b(n,this.commandOptions));copy=(...n)=>this.chain(new T(n,this.commandOptions));zdiffstore=(...n)=>this.chain(new be(n,this.commandOptions));dbsize=()=>this.chain(new O(this.commandOptions));decr=(...n)=>this.chain(new w(n,this.commandOptions));decrby=(...n)=>this.chain(new D(n,this.commandOptions));del=(...n)=>this.chain(new A(n,this.commandOptions));echo=(...n)=>this.chain(new k(n,this.commandOptions));eval=(...n)=>this.chain(new R(n,this.commandOptions));evalsha=(...n)=>this.chain(new S(n,this.commandOptions));exists=(...n)=>this.chain(new E(n,this.commandOptions));expire=(...n)=>this.chain(new M(n,this.commandOptions));expireat=(...n)=>this.chain(new v(n,this.commandOptions));flushall=n=>this.chain(new P(n,this.commandOptions));flushdb=(...n)=>this.chain(new I(n,this.commandOptions));geoadd=(...n)=>this.chain(new N(n,this.commandOptions));geodist=(...n)=>this.chain(new L(n,this.commandOptions));geopos=(...n)=>this.chain(new G(n,this.commandOptions));geohash=(...n)=>this.chain(new z(n,this.commandOptions));geosearch=(...n)=>this.chain(new K(n,this.commandOptions));geosearchstore=(...n)=>this.chain(new X(n,this.commandOptions));get=(...n)=>this.chain(new U(n,this.commandOptions));getbit=(...n)=>this.chain(new J(n,this.commandOptions));getdel=(...n)=>this.chain(new B(n,this.commandOptions));getrange=(...n)=>this.chain(new Z(n,this.commandOptions));getset=(n,t)=>this.chain(new H([n,t],this.commandOptions));hdel=(...n)=>this.chain(new F(n,this.commandOptions));hexists=(...n)=>this.chain(new $(n,this.commandOptions));hget=(...n)=>this.chain(new q(n,this.commandOptions));hgetall=(...n)=>this.chain(new j(n,this.commandOptions));hincrby=(...n)=>this.chain(new Y(n,this.commandOptions));hincrbyfloat=(...n)=>this.chain(new V(n,this.commandOptions));hkeys=(...n)=>this.chain(new _(n,this.commandOptions));hlen=(...n)=>this.chain(new W(n,this.commandOptions));hmget=(...n)=>this.chain(new Q(n,this.commandOptions));hmset=(n,t)=>this.chain(new nn([n,t],this.commandOptions));hrandfield=(n,t,o)=>this.chain(new tn([n,t,o],this.commandOptions));hscan=(...n)=>this.chain(new en(n,this.commandOptions));hset=(n,t)=>this.chain(new on([n,t],this.commandOptions));hsetnx=(n,t,o)=>this.chain(new sn([n,t,o],this.commandOptions));hstrlen=(...n)=>this.chain(new mn(n,this.commandOptions));hvals=(...n)=>this.chain(new rn(n,this.commandOptions));incr=(...n)=>this.chain(new an(n,this.commandOptions));incrby=(...n)=>this.chain(new pn(n,this.commandOptions));incrbyfloat=(...n)=>this.chain(new dn(n,this.commandOptions));keys=(...n)=>this.chain(new Pn(n,this.commandOptions));lindex=(...n)=>this.chain(new In(n,this.commandOptions));linsert=(n,t,o,m)=>this.chain(new Nn([n,t,o,m],this.commandOptions));llen=(...n)=>this.chain(new Ln(n,this.commandOptions));lmove=(...n)=>this.chain(new zn(n,this.commandOptions));lpop=(...n)=>this.chain(new Kn(n,this.commandOptions));lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions));lpos=(...n)=>this.chain(new Xn(n,this.commandOptions));lpush=(n,...t)=>this.chain(new Un([n,...t],this.commandOptions));lpushx=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions));lrange=(...n)=>this.chain(new Bn(n,this.commandOptions));lrem=(n,t,o)=>this.chain(new Zn([n,t,o],this.commandOptions));lset=(n,t,o)=>this.chain(new Hn([n,t,o],this.commandOptions));ltrim=(...n)=>this.chain(new Fn(n,this.commandOptions));mget=(...n)=>this.chain(new $n(n,this.commandOptions));mset=n=>this.chain(new qn([n],this.commandOptions));msetnx=n=>this.chain(new jn([n],this.commandOptions));persist=(...n)=>this.chain(new Yn(n,this.commandOptions));pexpire=(...n)=>this.chain(new Vn(n,this.commandOptions));pexpireat=(...n)=>this.chain(new _n(n,this.commandOptions));pfadd=(...n)=>this.chain(new Wn(n,this.commandOptions));pfcount=(...n)=>this.chain(new Qn(n,this.commandOptions));pfmerge=(...n)=>this.chain(new nt(n,this.commandOptions));ping=n=>this.chain(new tt(n,this.commandOptions));psetex=(n,t,o)=>this.chain(new et([n,t,o],this.commandOptions));pttl=(...n)=>this.chain(new ot(n,this.commandOptions));publish=(...n)=>this.chain(new st(n,this.commandOptions));randomkey=()=>this.chain(new mt(this.commandOptions));rename=(...n)=>this.chain(new rt(n,this.commandOptions));renamenx=(...n)=>this.chain(new at(n,this.commandOptions));rpop=(...n)=>this.chain(new it(n,this.commandOptions));rpush=(n,...t)=>this.chain(new pt([n,...t],this.commandOptions));rpushx=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions));sadd=(n,...t)=>this.chain(new ct([n,...t],this.commandOptions));scan=(...n)=>this.chain(new ut(n,this.commandOptions));scard=(...n)=>this.chain(new ht(n,this.commandOptions));scriptExists=(...n)=>this.chain(new lt(n,this.commandOptions));scriptFlush=(...n)=>this.chain(new Ct(n,this.commandOptions));scriptLoad=(...n)=>this.chain(new gt(n,this.commandOptions));sdiff=(...n)=>this.chain(new xt(n,this.commandOptions));sdiffstore=(...n)=>this.chain(new ft(n,this.commandOptions));set=(n,t,o)=>this.chain(new yt([n,t,o],this.commandOptions));setbit=(...n)=>this.chain(new bt(n,this.commandOptions));setex=(n,t,o)=>this.chain(new Tt([n,t,o],this.commandOptions));setnx=(n,t)=>this.chain(new Ot([n,t],this.commandOptions));setrange=(...n)=>this.chain(new wt(n,this.commandOptions));sinter=(...n)=>this.chain(new Dt(n,this.commandOptions));sinterstore=(...n)=>this.chain(new At(n,this.commandOptions));sismember=(n,t)=>this.chain(new kt([n,t],this.commandOptions));smembers=(...n)=>this.chain(new Rt(n,this.commandOptions));smismember=(n,t)=>this.chain(new St([n,t],this.commandOptions));smove=(n,t,o)=>this.chain(new Et([n,t,o],this.commandOptions));spop=(...n)=>this.chain(new Mt(n,this.commandOptions));srandmember=(...n)=>this.chain(new vt(n,this.commandOptions));srem=(n,...t)=>this.chain(new Pt([n,...t],this.commandOptions));sscan=(...n)=>this.chain(new It(n,this.commandOptions));strlen=(...n)=>this.chain(new Nt(n,this.commandOptions));sunion=(...n)=>this.chain(new Lt(n,this.commandOptions));sunionstore=(...n)=>this.chain(new zt(n,this.commandOptions));time=()=>this.chain(new Gt(this.commandOptions));touch=(...n)=>this.chain(new Kt(n,this.commandOptions));ttl=(...n)=>this.chain(new Xt(n,this.commandOptions));type=(...n)=>this.chain(new Ut(n,this.commandOptions));unlink=(...n)=>this.chain(new Jt(n,this.commandOptions));zadd=(...n)=>"score"in n[1]?this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions));xadd=(...n)=>this.chain(new Zt(n,this.commandOptions));xack=(...n)=>this.chain(new Bt(n,this.commandOptions));xdel=(...n)=>this.chain(new $t(n,this.commandOptions));xgroup=(...n)=>this.chain(new qt(n,this.commandOptions));xread=(...n)=>this.chain(new Wt(n,this.commandOptions));xreadgroup=(...n)=>this.chain(new Qt(n,this.commandOptions));xinfo=(...n)=>this.chain(new jt(n,this.commandOptions));xlen=(...n)=>this.chain(new Yt(n,this.commandOptions));xpending=(...n)=>this.chain(new Vt(n,this.commandOptions));xclaim=(...n)=>this.chain(new Ft(n,this.commandOptions));xautoclaim=(...n)=>this.chain(new Ht(n,this.commandOptions));xtrim=(...n)=>this.chain(new te(n,this.commandOptions));xrange=(...n)=>this.chain(new _t(n,this.commandOptions));xrevrange=(...n)=>this.chain(new ne(n,this.commandOptions));zcard=(...n)=>this.chain(new ee(n,this.commandOptions));zcount=(...n)=>this.chain(new oe(n,this.commandOptions));zincrby=(n,t,o)=>this.chain(new se([n,t,o],this.commandOptions));zinterstore=(...n)=>this.chain(new me(n,this.commandOptions));zlexcount=(...n)=>this.chain(new re(n,this.commandOptions));zmscore=(...n)=>this.chain(new Te(n,this.commandOptions));zpopmax=(...n)=>this.chain(new ae(n,this.commandOptions));zpopmin=(...n)=>this.chain(new ie(n,this.commandOptions));zrange=(...n)=>this.chain(new pe(n,this.commandOptions));zrank=(n,t)=>this.chain(new de([n,t],this.commandOptions));zrem=(n,...t)=>this.chain(new ce([n,...t],this.commandOptions));zremrangebylex=(...n)=>this.chain(new ue(n,this.commandOptions));zremrangebyrank=(...n)=>this.chain(new he(n,this.commandOptions));zremrangebyscore=(...n)=>this.chain(new le(n,this.commandOptions));zrevrank=(n,t)=>this.chain(new Ce([n,t],this.commandOptions));zscan=(...n)=>this.chain(new ge(n,this.commandOptions));zscore=(n,t)=>this.chain(new xe([n,t],this.commandOptions));zunionstore=(...n)=>this.chain(new ye(n,this.commandOptions));zunion=(...n)=>this.chain(new fe(n,this.commandOptions));get json(){return{arrappend:(...n)=>this.chain(new cn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new un(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new hn(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new Cn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new gn(n,this.commandOptions)),clear:(...n)=>this.chain(new xn(n,this.commandOptions)),del:(...n)=>this.chain(new fn(n,this.commandOptions)),forget:(...n)=>this.chain(new yn(n,this.commandOptions)),get:(...n)=>this.chain(new bn(n,this.commandOptions)),mget:(...n)=>this.chain(new Tn(n,this.commandOptions)),numincrby:(...n)=>this.chain(new On(n,this.commandOptions)),nummultby:(...n)=>this.chain(new wn(n,this.commandOptions)),objkeys:(...n)=>this.chain(new Dn(n,this.commandOptions)),objlen:(...n)=>this.chain(new An(n,this.commandOptions)),resp:(...n)=>this.chain(new kn(n,this.commandOptions)),set:(...n)=>this.chain(new Rn(n,this.commandOptions)),strappend:(...n)=>this.chain(new Sn(n,this.commandOptions)),strlen:(...n)=>this.chain(new En(n,this.commandOptions)),toggle:(...n)=>this.chain(new Mn(n,this.commandOptions)),type:(...n)=>this.chain(new vn(n,this.commandOptions))}}};import $e from"crypto-js/enc-hex.js";import qe from"crypto-js/sha1.js";var Ae=class{script;sha1;redis;constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async m=>{if(m instanceof Error&&m.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw m})}digest(n){return $e.stringify(qe(n))}};var Ie=class{client;opts;enableTelemetry;enableAutoPipelining;constructor(n,t){this.client=n,this.opts=t,this.enableTelemetry=t?.enableTelemetry??!0,this.enableAutoPipelining=t?.enableAutoPipelining??!1}get json(){return{arrappend:(...n)=>new cn(n,this.opts).exec(this.client),arrindex:(...n)=>new un(n,this.opts).exec(this.client),arrinsert:(...n)=>new hn(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new Cn(n,this.opts).exec(this.client),arrtrim:(...n)=>new gn(n,this.opts).exec(this.client),clear:(...n)=>new xn(n,this.opts).exec(this.client),del:(...n)=>new fn(n,this.opts).exec(this.client),forget:(...n)=>new yn(n,this.opts).exec(this.client),get:(...n)=>new bn(n,this.opts).exec(this.client),mget:(...n)=>new Tn(n,this.opts).exec(this.client),numincrby:(...n)=>new On(n,this.opts).exec(this.client),nummultby:(...n)=>new wn(n,this.opts).exec(this.client),objkeys:(...n)=>new Dn(n,this.opts).exec(this.client),objlen:(...n)=>new An(n,this.opts).exec(this.client),resp:(...n)=>new kn(n,this.opts).exec(this.client),set:(...n)=>new Rn(n,this.opts).exec(this.client),strappend:(...n)=>new Sn(n,this.opts).exec(this.client),strlen:(...n)=>new En(n,this.opts).exec(this.client),toggle:(...n)=>new Mn(n,this.opts).exec(this.client),type:(...n)=>new vn(n,this.opts).exec(this.client)}}use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)};addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch{}};createScript(n){return new Ae(this,n)}pipeline=()=>new we({client:this.client,commandOptions:this.opts,multiExec:!1});autoPipeline=()=>Se(this);multi=()=>new we({client:this.client,commandOptions:this.opts,multiExec:!0});bitfield=(...n)=>new f(n,this.client,this.opts);append=(...n)=>new g(n,this.opts).exec(this.client);bitcount=(...n)=>new x(n,this.opts).exec(this.client);bitop=(n,t,o,...m)=>new y([n,t,o,...m],this.opts).exec(this.client);bitpos=(...n)=>new b(n,this.opts).exec(this.client);copy=(...n)=>new T(n,this.opts).exec(this.client);dbsize=()=>new O(this.opts).exec(this.client);decr=(...n)=>new w(n,this.opts).exec(this.client);decrby=(...n)=>new D(n,this.opts).exec(this.client);del=(...n)=>new A(n,this.opts).exec(this.client);echo=(...n)=>new k(n,this.opts).exec(this.client);eval=(...n)=>new R(n,this.opts).exec(this.client);evalsha=(...n)=>new S(n,this.opts).exec(this.client);exists=(...n)=>new E(n,this.opts).exec(this.client);expire=(...n)=>new M(n,this.opts).exec(this.client);expireat=(...n)=>new v(n,this.opts).exec(this.client);flushall=n=>new P(n,this.opts).exec(this.client);flushdb=(...n)=>new I(n,this.opts).exec(this.client);geoadd=(...n)=>new N(n,this.opts).exec(this.client);geopos=(...n)=>new G(n,this.opts).exec(this.client);geodist=(...n)=>new L(n,this.opts).exec(this.client);geohash=(...n)=>new z(n,this.opts).exec(this.client);geosearch=(...n)=>new K(n,this.opts).exec(this.client);geosearchstore=(...n)=>new X(n,this.opts).exec(this.client);get=(...n)=>new U(n,this.opts).exec(this.client);getbit=(...n)=>new J(n,this.opts).exec(this.client);getdel=(...n)=>new B(n,this.opts).exec(this.client);getrange=(...n)=>new Z(n,this.opts).exec(this.client);getset=(n,t)=>new H([n,t],this.opts).exec(this.client);hdel=(...n)=>new F(n,this.opts).exec(this.client);hexists=(...n)=>new $(n,this.opts).exec(this.client);hget=(...n)=>new q(n,this.opts).exec(this.client);hgetall=(...n)=>new j(n,this.opts).exec(this.client);hincrby=(...n)=>new Y(n,this.opts).exec(this.client);hincrbyfloat=(...n)=>new V(n,this.opts).exec(this.client);hkeys=(...n)=>new _(n,this.opts).exec(this.client);hlen=(...n)=>new W(n,this.opts).exec(this.client);hmget=(...n)=>new Q(n,this.opts).exec(this.client);hmset=(n,t)=>new nn([n,t],this.opts).exec(this.client);hrandfield=(n,t,o)=>new tn([n,t,o],this.opts).exec(this.client);hscan=(...n)=>new en(n,this.opts).exec(this.client);hset=(n,t)=>new on([n,t],this.opts).exec(this.client);hsetnx=(n,t,o)=>new sn([n,t,o],this.opts).exec(this.client);hstrlen=(...n)=>new mn(n,this.opts).exec(this.client);hvals=(...n)=>new rn(n,this.opts).exec(this.client);incr=(...n)=>new an(n,this.opts).exec(this.client);incrby=(...n)=>new pn(n,this.opts).exec(this.client);incrbyfloat=(...n)=>new dn(n,this.opts).exec(this.client);keys=(...n)=>new Pn(n,this.opts).exec(this.client);lindex=(...n)=>new In(n,this.opts).exec(this.client);linsert=(n,t,o,m)=>new Nn([n,t,o,m],this.opts).exec(this.client);llen=(...n)=>new Ln(n,this.opts).exec(this.client);lmove=(...n)=>new zn(n,this.opts).exec(this.client);lpop=(...n)=>new Kn(n,this.opts).exec(this.client);lmpop=(...n)=>new Gn(n,this.opts).exec(this.client);lpos=(...n)=>new Xn(n,this.opts).exec(this.client);lpush=(n,...t)=>new Un([n,...t],this.opts).exec(this.client);lpushx=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client);lrange=(...n)=>new Bn(n,this.opts).exec(this.client);lrem=(n,t,o)=>new Zn([n,t,o],this.opts).exec(this.client);lset=(n,t,o)=>new Hn([n,t,o],this.opts).exec(this.client);ltrim=(...n)=>new Fn(n,this.opts).exec(this.client);mget=(...n)=>new $n(n,this.opts).exec(this.client);mset=n=>new qn([n],this.opts).exec(this.client);msetnx=n=>new jn([n],this.opts).exec(this.client);persist=(...n)=>new Yn(n,this.opts).exec(this.client);pexpire=(...n)=>new Vn(n,this.opts).exec(this.client);pexpireat=(...n)=>new _n(n,this.opts).exec(this.client);pfadd=(...n)=>new Wn(n,this.opts).exec(this.client);pfcount=(...n)=>new Qn(n,this.opts).exec(this.client);pfmerge=(...n)=>new nt(n,this.opts).exec(this.client);ping=n=>new tt(n,this.opts).exec(this.client);psetex=(n,t,o)=>new et([n,t,o],this.opts).exec(this.client);pttl=(...n)=>new ot(n,this.opts).exec(this.client);publish=(...n)=>new st(n,this.opts).exec(this.client);randomkey=()=>new mt().exec(this.client);rename=(...n)=>new rt(n,this.opts).exec(this.client);renamenx=(...n)=>new at(n,this.opts).exec(this.client);rpop=(...n)=>new it(n,this.opts).exec(this.client);rpush=(n,...t)=>new pt([n,...t],this.opts).exec(this.client);rpushx=(n,...t)=>new dt([n,...t],this.opts).exec(this.client);sadd=(n,...t)=>new ct([n,...t],this.opts).exec(this.client);scan=(...n)=>new ut(n,this.opts).exec(this.client);scard=(...n)=>new ht(n,this.opts).exec(this.client);scriptExists=(...n)=>new lt(n,this.opts).exec(this.client);scriptFlush=(...n)=>new Ct(n,this.opts).exec(this.client);scriptLoad=(...n)=>new gt(n,this.opts).exec(this.client);sdiff=(...n)=>new xt(n,this.opts).exec(this.client);sdiffstore=(...n)=>new ft(n,this.opts).exec(this.client);set=(n,t,o)=>new yt([n,t,o],this.opts).exec(this.client);setbit=(...n)=>new bt(n,this.opts).exec(this.client);setex=(n,t,o)=>new Tt([n,t,o],this.opts).exec(this.client);setnx=(n,t)=>new Ot([n,t],this.opts).exec(this.client);setrange=(...n)=>new wt(n,this.opts).exec(this.client);sinter=(...n)=>new Dt(n,this.opts).exec(this.client);sinterstore=(...n)=>new At(n,this.opts).exec(this.client);sismember=(n,t)=>new kt([n,t],this.opts).exec(this.client);smismember=(n,t)=>new St([n,t],this.opts).exec(this.client);smembers=(...n)=>new Rt(n,this.opts).exec(this.client);smove=(n,t,o)=>new Et([n,t,o],this.opts).exec(this.client);spop=(...n)=>new Mt(n,this.opts).exec(this.client);srandmember=(...n)=>new vt(n,this.opts).exec(this.client);srem=(n,...t)=>new Pt([n,...t],this.opts).exec(this.client);sscan=(...n)=>new It(n,this.opts).exec(this.client);strlen=(...n)=>new Nt(n,this.opts).exec(this.client);sunion=(...n)=>new Lt(n,this.opts).exec(this.client);sunionstore=(...n)=>new zt(n,this.opts).exec(this.client);time=()=>new Gt().exec(this.client);touch=(...n)=>new Kt(n,this.opts).exec(this.client);ttl=(...n)=>new Xt(n,this.opts).exec(this.client);type=(...n)=>new Ut(n,this.opts).exec(this.client);unlink=(...n)=>new Jt(n,this.opts).exec(this.client);xadd=(...n)=>new Zt(n,this.opts).exec(this.client);xack=(...n)=>new Bt(n,this.opts).exec(this.client);xdel=(...n)=>new $t(n,this.opts).exec(this.client);xgroup=(...n)=>new qt(n,this.opts).exec(this.client);xread=(...n)=>new Wt(n,this.opts).exec(this.client);xreadgroup=(...n)=>new Qt(n,this.opts).exec(this.client);xinfo=(...n)=>new jt(n,this.opts).exec(this.client);xlen=(...n)=>new Yt(n,this.opts).exec(this.client);xpending=(...n)=>new Vt(n,this.opts).exec(this.client);xclaim=(...n)=>new Ft(n,this.opts).exec(this.client);xautoclaim=(...n)=>new Ht(n,this.opts).exec(this.client);xtrim=(...n)=>new te(n,this.opts).exec(this.client);xrange=(...n)=>new _t(n,this.opts).exec(this.client);xrevrange=(...n)=>new ne(n,this.opts).exec(this.client);zadd=(...n)=>"score"in n[1]?new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client);zcard=(...n)=>new ee(n,this.opts).exec(this.client);zcount=(...n)=>new oe(n,this.opts).exec(this.client);zdiffstore=(...n)=>new be(n,this.opts).exec(this.client);zincrby=(n,t,o)=>new se([n,t,o],this.opts).exec(this.client);zinterstore=(...n)=>new me(n,this.opts).exec(this.client);zlexcount=(...n)=>new re(n,this.opts).exec(this.client);zmscore=(...n)=>new Te(n,this.opts).exec(this.client);zpopmax=(...n)=>new ae(n,this.opts).exec(this.client);zpopmin=(...n)=>new ie(n,this.opts).exec(this.client);zrange=(...n)=>new pe(n,this.opts).exec(this.client);zrank=(n,t)=>new de([n,t],this.opts).exec(this.client);zrem=(n,...t)=>new ce([n,...t],this.opts).exec(this.client);zremrangebylex=(...n)=>new ue(n,this.opts).exec(this.client);zremrangebyrank=(...n)=>new he(n,this.opts).exec(this.client);zremrangebyscore=(...n)=>new le(n,this.opts).exec(this.client);zrevrank=(n,t)=>new Ce([n,t],this.opts).exec(this.client);zscan=(...n)=>new ge(n,this.opts).exec(this.client);zscore=(n,t)=>new xe([n,t],this.opts).exec(this.client);zunion=(...n)=>new fe(n,this.opts).exec(this.client);zunionstore=(...n)=>new ye(n,this.opts).exec(this.client)};var tg="v1.32.0";export{ze as a,Me as b,Ie as c,tg as d};
package/cloudflare.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, c as Requester, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, c as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, c as Requester, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, c as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkC3VPBW4Tjs = require('./chunk-C3VPBW4T.js');var a=class l extends _chunkC3VPBW4Tjs.b{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new (0, _chunkC3VPBW4Tjs.a)({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive});if(super(r,{enableTelemetry:!_optionalChain([t, 'optionalAccess', _ => _.UPSTASH_DISABLE_TELEMETRY]),automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${_chunkC3VPBW4Tjs.c}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.UPSTASH_REDIS_REST_URL]), () => (UPSTASH_REDIS_REST_URL)),n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _3 => _3.UPSTASH_REDIS_REST_TOKEN]), () => (UPSTASH_REDIS_REST_TOKEN));if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};exports.Redis = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk4DQNQAF7js = require('./chunk-4DQNQAF7.js');var a=class l extends _chunk4DQNQAF7js.c{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new (0, _chunk4DQNQAF7js.b)({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive});if(super(r,{enableTelemetry:!_optionalChain([t, 'optionalAccess', _ => _.UPSTASH_DISABLE_TELEMETRY]),automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${_chunk4DQNQAF7js.d}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.UPSTASH_REDIS_REST_URL]), () => (UPSTASH_REDIS_REST_URL)),n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _3 => _3.UPSTASH_REDIS_REST_TOKEN]), () => (UPSTASH_REDIS_REST_TOKEN));if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};exports.Redis = a; exports.errors = _chunk4DQNQAF7js.a;
package/cloudflare.mjs CHANGED
@@ -1 +1 @@
1
- import{a as i,b as s,c as o}from"./chunk-2DN6UAHL.mjs";var a=class l extends s{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new i({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive});if(super(r,{enableTelemetry:!t?.UPSTASH_DISABLE_TELEMETRY,automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${o}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=e?.UPSTASH_REDIS_REST_URL??UPSTASH_REDIS_REST_URL,n=e?.UPSTASH_REDIS_REST_TOKEN??UPSTASH_REDIS_REST_TOKEN;if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};export{a as Redis};
1
+ import{a as p,b as s,c as i,d as o}from"./chunk-DFUAPYBG.mjs";var a=class l extends i{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new s({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive});if(super(r,{enableTelemetry:!t?.UPSTASH_DISABLE_TELEMETRY,automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${o}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=e?.UPSTASH_REDIS_REST_URL??UPSTASH_REDIS_REST_URL,n=e?.UPSTASH_REDIS_REST_TOKEN??UPSTASH_REDIS_REST_TOKEN;if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};export{a as Redis,p as errors};
package/fastly.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, c as Requester, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, c as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/fastly.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, c as Requester, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, c as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/fastly.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkC3VPBW4Tjs = require('./chunk-C3VPBW4T.js');var i=class extends _chunkC3VPBW4Tjs.b{constructor(e){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new (0, _chunkC3VPBW4Tjs.a)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${_chunkC3VPBW4Tjs.c}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};exports.Redis = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4DQNQAF7js = require('./chunk-4DQNQAF7.js');var i=class extends _chunk4DQNQAF7js.c{constructor(e){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new (0, _chunk4DQNQAF7js.b)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${_chunk4DQNQAF7js.d}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};exports.Redis = i; exports.errors = _chunk4DQNQAF7js.a;
package/fastly.mjs CHANGED
@@ -1 +1 @@
1
- import{a as t,b as s,c as r}from"./chunk-2DN6UAHL.mjs";var i=class extends s{constructor(e){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new t({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${r}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};export{i as Redis};
1
+ import{a as o,b as t,c as r,d as s}from"./chunk-DFUAPYBG.mjs";var i=class extends r{constructor(e){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new t({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${s}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};export{i as Redis,o as errors};
package/nodejs.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/nodejs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-9faf292c.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, Q as HLenCommand, S as HMGetCommand, T as HMSetCommand, V as HRandFieldCommand, W as HScanCommand, X as HSetCommand, Y as HSetNXCommand, Z as HStrLenCommand, _ as HValsCommand, a0 as IncrByCommand, a1 as IncrByFloatCommand, $ as IncrCommand, a2 as JsonArrAppendCommand, a3 as JsonArrIndexCommand, a4 as JsonArrInsertCommand, a5 as JsonArrLenCommand, a6 as JsonArrPopCommand, a7 as JsonArrTrimCommand, a8 as JsonClearCommand, a9 as JsonDelCommand, aa as JsonForgetCommand, ab as JsonGetCommand, ac as JsonMGetCommand, ad as JsonNumIncrByCommand, ae as JsonNumMultByCommand, af as JsonObjKeysCommand, ag as JsonObjLenCommand, ah as JsonRespCommand, ai as JsonSetCommand, aj as JsonStrAppendCommand, ak as JsonStrLenCommand, al as JsonToggleCommand, am as JsonTypeCommand, an as KeysCommand, ao as LIndexCommand, ap as LInsertCommand, aq as LLenCommand, ar as LMoveCommand, as as LPopCommand, at as LPushCommand, au as LPushXCommand, av as LRangeCommand, aw as LRemCommand, ax as LSetCommand, ay as LTrimCommand, az as MGetCommand, aA as MSetCommand, aB as MSetNXCommand, aE as PExpireAtCommand, aD as PExpireCommand, aG as PSetEXCommand, aH as PTtlCommand, aC as PersistCommand, aF as PingCommand, P as Pipeline, aI as PublishCommand, aM as RPopCommand, aN as RPushCommand, aO as RPushXCommand, aJ as RandomKeyCommand, aK as RenameCommand, aL as RenameNXCommand, aP as SAddCommand, aS as SCardCommand, aW as SDiffCommand, aX as SDiffStoreCommand, b2 as SInterCommand, b3 as SInterStoreCommand, b4 as SIsMemberCommand, b6 as SMIsMemberCommand, b5 as SMembersCommand, b7 as SMoveCommand, b8 as SPopCommand, b9 as SRandMemberCommand, ba as SRemCommand, bb as SScanCommand, bd as SUnionCommand, be as SUnionStoreCommand, aQ as ScanCommand, aR as ScanCommandOptions, bn as ScoreMember, aT as ScriptExistsCommand, aU as ScriptFlushCommand, aV as ScriptLoadCommand, a_ as SetBitCommand, aY as SetCommand, aZ as SetCommandOptions, a$ as SetExCommand, b0 as SetNxCommand, b1 as SetRangeCommand, bc as StrLenCommand, bf as TimeCommand, bg as TouchCommand, bh as TtlCommand, bi as Type, bj as TypeCommand, bk as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bl as XAddCommand, bm as XRangeCommand, bp as ZAddCommand, bo as ZAddCommandOptions, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-9faf292c.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1, c as Requester } from './zmscore-80635339.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-80635339.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/nodejs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkC3VPBW4Tjs = require('./chunk-C3VPBW4T.js');typeof atob>"u"&&(global.atob=t=>Buffer.from(t,"base64").toString("utf-8"));var a=class t extends _chunkC3VPBW4Tjs.b{constructor(e){if("request"in e){super(e);return}if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new (0, _chunkC3VPBW4Tjs.a)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:e.cache||"no-store",signal:e.signal,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${_chunkC3VPBW4Tjs.c}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(typeof _optionalChain([process, 'optionalAccess', _ => _.env])>"u")throw new Error('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=_optionalChain([process, 'optionalAccess', _2 => _2.env, 'access', _3 => _3.UPSTASH_REDIS_REST_URL]);if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let o=_optionalChain([process, 'optionalAccess', _4 => _4.env, 'access', _5 => _5.UPSTASH_REDIS_REST_TOKEN]);if(!o)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new t({...e,url:n,token:o})}};exports.Redis = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunk4DQNQAF7js = require('./chunk-4DQNQAF7.js');typeof atob>"u"&&(global.atob=o=>Buffer.from(o,"base64").toString("utf-8"));var a=class o extends _chunk4DQNQAF7js.c{constructor(e){if("request"in e){super(e);return}if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new (0, _chunk4DQNQAF7js.b)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:e.cache||"no-store",signal:e.signal,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${_chunk4DQNQAF7js.d}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(typeof _optionalChain([process, 'optionalAccess', _ => _.env])>"u")throw new Error('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=_optionalChain([process, 'optionalAccess', _2 => _2.env, 'access', _3 => _3.UPSTASH_REDIS_REST_URL]);if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let t=_optionalChain([process, 'optionalAccess', _4 => _4.env, 'access', _5 => _5.UPSTASH_REDIS_REST_TOKEN]);if(!t)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new o({...e,url:n,token:t})}};exports.Redis = a; exports.errors = _chunk4DQNQAF7js.a;
package/nodejs.mjs CHANGED
@@ -1 +1 @@
1
- import{a as s,b as i,c as r}from"./chunk-2DN6UAHL.mjs";typeof atob>"u"&&(global.atob=t=>Buffer.from(t,"base64").toString("utf-8"));var a=class t extends i{constructor(e){if("request"in e){super(e);return}if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new s({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:e.cache||"no-store",signal:e.signal,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${r}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(typeof process?.env>"u")throw new Error('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=process?.env.UPSTASH_REDIS_REST_URL;if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let o=process?.env.UPSTASH_REDIS_REST_TOKEN;if(!o)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new t({...e,url:n,token:o})}};export{a as Redis};
1
+ import{a as l,b as s,c as i,d as r}from"./chunk-DFUAPYBG.mjs";typeof atob>"u"&&(global.atob=o=>Buffer.from(o,"base64").toString("utf-8"));var a=class o extends i{constructor(e){if("request"in e){super(e);return}if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let n=new s({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:e.cache||"no-store",signal:e.signal,keepAlive:e.keepAlive});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${r}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(typeof process?.env>"u")throw new Error('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=process?.env.UPSTASH_REDIS_REST_URL;if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let t=process?.env.UPSTASH_REDIS_REST_TOKEN;if(!t)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new o({...e,url:n,token:t})}};export{a as Redis,l as errors};
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v1.31.6","main":"./nodejs.js","module":"./nodejs.mjs","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node.js":"./node.js","./node.mjs":"./node.mjs","./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":"./cloudflare.js","./cloudflare.mjs":"./cloudflare.mjs","./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":"./fastly.js","./fastly.mjs":"./fastly.mjs"},"types":"./nodejs.d.ts","description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./**"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test pkg --coverage --timeout 20000","fmt":"bunx @biomejs/biome check --apply ./pkg"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","typesVersions":{"*":{"nodejs":["./nodejs.d.ts"],"cloudflare":["./cloudflare.d.ts"],"fastly":["./fastly.d.ts"]}},"devDependencies":{"@biomejs/biome":"latest","@types/crypto-js":"^4.1.3","bun-types":"1.0.33","husky":"^8.0.3","tsup":"^7.2.0","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}
1
+ {"name":"@upstash/redis","version":"v1.32.0","main":"./nodejs.js","module":"./nodejs.mjs","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node.js":"./node.js","./node.mjs":"./node.mjs","./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":"./cloudflare.js","./cloudflare.mjs":"./cloudflare.mjs","./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":"./fastly.js","./fastly.mjs":"./fastly.mjs"},"types":"./nodejs.d.ts","description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./**"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test pkg --coverage --timeout 20000","fmt":"bunx @biomejs/biome check --apply ./pkg"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","typesVersions":{"*":{"nodejs":["./nodejs.d.ts"],"cloudflare":["./cloudflare.d.ts"],"fastly":["./fastly.d.ts"]}},"devDependencies":{"@biomejs/biome":"latest","@types/crypto-js":"^4.1.3","bun-types":"1.0.33","husky":"^8.0.3","tsup":"^7.2.0","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}
@@ -267,6 +267,28 @@ declare class BitCountCommand extends Command<number, number> {
267
267
  constructor(cmd: [key: string, start: number, end: number], opts?: CommandOptions<number, number>);
268
268
  }
269
269
 
270
+ type SubCommandArgs<TRest extends unknown[] = []> = [
271
+ encoding: string,
272
+ offset: number | string,
273
+ ...TRest
274
+ ];
275
+ /**
276
+ * @see https://redis.io/commands/bitfield
277
+ */
278
+ declare class BitFieldCommand<T = Promise<number[]>> {
279
+ private client;
280
+ private opts?;
281
+ private execOperation;
282
+ private command;
283
+ constructor(args: [key: string], client: Requester, opts?: CommandOptions<number[], number[]> | undefined, execOperation?: (command: Command<number[], number[]>) => T);
284
+ private chain;
285
+ get(...args: SubCommandArgs): this;
286
+ set(...args: SubCommandArgs<[value: number]>): this;
287
+ incrby(...args: SubCommandArgs<[increment: number]>): this;
288
+ overflow(overflow: "WRAP" | "SAT" | "FAIL"): this;
289
+ exec(): T;
290
+ }
291
+
270
292
  /**
271
293
  * @see https://redis.io/commands/bitop
272
294
  */
@@ -1647,6 +1669,23 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1647
1669
  * @see https://redis.io/commands/bitcount
1648
1670
  */
1649
1671
  bitcount: (key: string, start: number, end: number) => Pipeline<[...TCommands, Command<any, number>]>;
1672
+ /**
1673
+ * Returns an instance that can be used to execute `BITFIELD` commands on one key.
1674
+ *
1675
+ * @example
1676
+ * ```typescript
1677
+ * redis.set("mykey", 0);
1678
+ * const result = await redis.pipeline()
1679
+ * .bitfield("mykey")
1680
+ * .set("u4", 0, 16)
1681
+ * .incr("u4", "#1", 1)
1682
+ * .exec();
1683
+ * console.log(result); // [[0, 1]]
1684
+ * ```
1685
+ *
1686
+ * @see https://redis.io/commands/bitfield
1687
+ */
1688
+ bitfield: (key: string) => BitFieldCommand<Pipeline<[...TCommands, Command<any, number[]>]>>;
1650
1689
  /**
1651
1690
  * @see https://redis.io/commands/bitop
1652
1691
  */
@@ -2666,6 +2705,22 @@ declare class Redis {
2666
2705
  * @see {@link Pipeline}
2667
2706
  */
2668
2707
  multi: () => Pipeline<[]>;
2708
+ /**
2709
+ * Returns an instance that can be used to execute `BITFIELD` commands on one key.
2710
+ *
2711
+ * @example
2712
+ * ```typescript
2713
+ * redis.set("mykey", 0);
2714
+ * const result = await redis.bitfield("mykey")
2715
+ * .set("u4", 0, 16)
2716
+ * .incr("u4", "#1", 1)
2717
+ * .exec();
2718
+ * console.log(result); // [0, 1]
2719
+ * ```
2720
+ *
2721
+ * @see https://redis.io/commands/bitfield
2722
+ */
2723
+ bitfield: (key: string) => BitFieldCommand<Promise<number[]>>;
2669
2724
  /**
2670
2725
  * @see https://redis.io/commands/append
2671
2726
  */
@@ -3425,6 +3480,27 @@ declare class Redis {
3425
3480
  zunionstore: (destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions | undefined) => Promise<number>;
3426
3481
  }
3427
3482
 
3483
+ /**
3484
+ * Result of a bad request to upstash
3485
+ */
3486
+ declare class UpstashError extends Error {
3487
+ constructor(message: string);
3488
+ }
3489
+ declare class UrlError extends Error {
3490
+ constructor(url: string);
3491
+ }
3492
+
3493
+ type error_UpstashError = UpstashError;
3494
+ declare const error_UpstashError: typeof UpstashError;
3495
+ type error_UrlError = UrlError;
3496
+ declare const error_UrlError: typeof UrlError;
3497
+ declare namespace error {
3498
+ export {
3499
+ error_UpstashError as UpstashError,
3500
+ error_UrlError as UrlError,
3501
+ };
3502
+ }
3503
+
3428
3504
  /**
3429
3505
  * @see https://redis.io/commands/zdiffstore
3430
3506
  */
@@ -3439,4 +3515,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3439
3515
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3440
3516
  }
3441
3517
 
3442
- export { IncrCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetSetCommand as H, HDelCommand as I, HExistsCommand as J, HGetCommand as K, HGetAllCommand as L, HIncrByCommand as M, HIncrByFloatCommand as N, HKeysCommand as O, Pipeline as P, HLenCommand as Q, RedisOptions as R, HMGetCommand as S, HMSetCommand as T, UpstashRequest as U, HRandFieldCommand as V, HScanCommand as W, HSetCommand as X, HSetNXCommand as Y, HStrLenCommand as Z, HValsCommand as _, RequesterConfig as a, SetExCommand as a$, IncrByCommand as a0, IncrByFloatCommand as a1, JsonArrAppendCommand as a2, JsonArrIndexCommand as a3, JsonArrInsertCommand as a4, JsonArrLenCommand as a5, JsonArrPopCommand as a6, JsonArrTrimCommand as a7, JsonClearCommand as a8, JsonDelCommand as a9, MSetCommand as aA, MSetNXCommand as aB, PersistCommand as aC, PExpireCommand as aD, PExpireAtCommand as aE, PingCommand as aF, PSetEXCommand as aG, PTtlCommand as aH, PublishCommand as aI, RandomKeyCommand as aJ, RenameCommand as aK, RenameNXCommand as aL, RPopCommand as aM, RPushCommand as aN, RPushXCommand as aO, SAddCommand as aP, ScanCommand as aQ, ScanCommandOptions as aR, SCardCommand as aS, ScriptExistsCommand as aT, ScriptFlushCommand as aU, ScriptLoadCommand as aV, SDiffCommand as aW, SDiffStoreCommand as aX, SetCommand as aY, SetCommandOptions as aZ, SetBitCommand as a_, JsonForgetCommand as aa, JsonGetCommand as ab, JsonMGetCommand as ac, JsonNumIncrByCommand as ad, JsonNumMultByCommand as ae, JsonObjKeysCommand as af, JsonObjLenCommand as ag, JsonRespCommand as ah, JsonSetCommand as ai, JsonStrAppendCommand as aj, JsonStrLenCommand as ak, JsonToggleCommand as al, JsonTypeCommand as am, KeysCommand as an, LIndexCommand as ao, LInsertCommand as ap, LLenCommand as aq, LMoveCommand as ar, LPopCommand as as, LPushCommand as at, LPushXCommand as au, LRangeCommand as av, LRemCommand as aw, LSetCommand as ax, LTrimCommand as ay, MGetCommand as az, Redis as b, SetNxCommand as b0, SetRangeCommand as b1, SInterCommand as b2, SInterStoreCommand as b3, SIsMemberCommand as b4, SMembersCommand as b5, SMIsMemberCommand as b6, SMoveCommand as b7, SPopCommand as b8, SRandMemberCommand as b9, ZRangeCommand as bA, ZRangeCommandOptions as bB, ZRankCommand as bC, ZRemCommand as bD, ZRemRangeByLexCommand as bE, ZRemRangeByRankCommand as bF, ZRemRangeByScoreCommand as bG, ZRevRankCommand as bH, ZScanCommand as bI, ZScoreCommand as bJ, ZUnionCommand as bK, ZUnionCommandOptions as bL, ZUnionStoreCommand as bM, ZUnionStoreCommandOptions as bN, SRemCommand as ba, SScanCommand as bb, StrLenCommand as bc, SUnionCommand as bd, SUnionStoreCommand as be, TimeCommand as bf, TouchCommand as bg, TtlCommand as bh, Type as bi, TypeCommand as bj, UnlinkCommand as bk, XAddCommand as bl, XRangeCommand as bm, ScoreMember as bn, ZAddCommandOptions as bo, ZAddCommand as bp, ZCardCommand as bq, ZCountCommand as br, ZDiffStoreCommand as bs, ZIncrByCommand as bt, ZInterStoreCommand as bu, ZInterStoreCommandOptions as bv, ZLexCountCommand as bw, ZMScoreCommand as bx, ZPopMaxCommand as by, ZPopMinCommand as bz, Requester as c, UpstashResponse as d, BitOpCommand as e, BitPosCommand as f, DecrCommand as g, DecrByCommand as h, DelCommand as i, EvalCommand as j, EvalshaCommand as k, ExistsCommand as l, ExpireCommand as m, ExpireAtCommand as n, FlushDBCommand as o, GeoAddCommandOptions as p, GeoMember as q, GeoDistCommand as r, GeoHashCommand as s, GeoPosCommand as t, GeoSearchCommand as u, GeoSearchStoreCommand as v, GetCommand as w, GetBitCommand as x, GetDelCommand as y, GetRangeCommand as z };
3518
+ export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, RedisOptions as R, HLenCommand as S, HMGetCommand as T, UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, ScoreMember as bo, ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, Requester as c, UpstashResponse as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, GeoAddCommandOptions as q, GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };
@@ -1 +0,0 @@
1
- var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}};var Se=class{baseUrl;headers;options;retry;constructor(n){this.options={backend:n.options?.backend,agent:n.agent,responseEncoding:n.responseEncoding??"base64",cache:n.cache,signal:n.signal,keepAlive:n.keepAlive??!0},this.baseUrl=n.baseUrl.replace(/\/$/,""),this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),typeof n?.retry=="boolean"&&n?.retry===!1?this.retry={attempts:1,backoff:()=>0}:this.retry={attempts:n?.retry?.retries??5,backoff:n?.retry?.backoff??(t=>Math.exp(t)*50)}}mergeTelemetry(n){function t(o,m,r){return r&&(o[m]?o[m]=[o[m],r].join(","):o[m]=r),o}this.headers=t(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=t(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=t(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:this.options?.agent,signal:this.options.signal,backend:this.options?.backend},o=null,m=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,...n.path??[]].join("/"),t);break}catch(i){if(this.options.signal?.aborted){let p=new Blob([JSON.stringify({result:this.options.signal.reason??"Aborted"})]),d={status:200,statusText:this.options.signal.reason??"Aborted"};o=new Response(p,d);break}m=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw m??new Error("Exhausted all retries");let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);return this.options?.responseEncoding==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:De(i),error:p})):{result:De(r.result),error:r.error}:r}};function Ee(s){let n="";try{let t=atob(s),o=t.length,m=new Uint8Array(o);for(let r=0;r<o;r++)m[r]=t.charCodeAt(r);n=new TextDecoder().decode(m)}catch{n=s}return n}function De(s){let n;switch(typeof s){case"undefined":return s;case"number":{n=s;break}case"object":{Array.isArray(s)?n=s.map(t=>typeof t=="string"?Ee(t):Array.isArray(t)?t.map(De):t):n=null;break}case"string":{n=s==="OK"?"OK":Ee(s);break}default:break}return n}function Me(s){let n=Array.isArray(s)?s.map(t=>{try{return Me(t)}catch{return t}}):JSON.parse(s);return typeof n=="number"&&n.toString()!==s?s:n}function Ae(s){try{return Me(s)}catch{return s}}function l(s){return[s[0],...Ae(s.slice(1))]}var Pe=s=>{switch(typeof s){case"string":case"number":case"boolean":return s;default:return JSON.stringify(s)}},e=class{command;serialize;deserialize;constructor(n,t){if(this.serialize=Pe,this.deserialize=typeof t?.automaticDeserialization>"u"||t.automaticDeserialization?t?.deserialize??Ae:o=>o,this.command=n.map(o=>this.serialize(o)),t?.latencyLogging){let o=this.exec.bind(this);this.exec=async m=>{let r=performance.now(),a=await o(m),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command});if(o)throw new u(o);if(typeof t>"u")throw new Error("Request did not return a result");return this.deserialize(t)}};var g=class extends e{constructor(n,t){super(["append",...n],t)}};var x=class extends e{constructor([n,t,o],m){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,m)}};var f=class extends e{constructor(n,t){super(["bitop",...n],t)}};var y=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var b=class extends e{constructor([n,t,o],m){super(["COPY",n,t,...o?.replace?["REPLACE"]:[]],{...m,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var T=class extends e{constructor(n){super(["dbsize"],n)}};var O=class extends e{constructor(n,t){super(["decr",...n],t)}};var w=class extends e{constructor(n,t){super(["decrby",...n],t)}};var D=class extends e{constructor(n,t){super(["del",...n],t)}};var A=class extends e{constructor(n,t){super(["echo",...n],t)}};var k=class extends e{constructor([n,t,o],m){super(["eval",n,t.length,...t,...o??[]],m)}};var R=class extends e{constructor([n,t,o],m){super(["evalsha",n,t.length,...t,...o??[]],m)}};var S=class extends e{constructor(n,t){super(["exists",...n],t)}};var E=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var M=class extends e{constructor(n,t){super(["expireat",...n],t)}};var v=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var P=class extends e{constructor([n],t){let o=["flushdb"];n?.async&&o.push("async"),super(o,t)}};var I=class extends e{constructor([n,t,...o],m){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,m)}};var N=class extends e{constructor([n,t,o,m="M"],r){super(["GEODIST",n,t,o,m],r)}};var L=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...m],t)}};var z=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...m],{deserialize:r=>Ie(r),...t})}};function Ie(s){let n=[];for(let t of s)!t?.[0]||!t?.[1]||n.push({lng:parseFloat(t[0]),lat:parseFloat(t[1])});return n}var G=class extends e{constructor([n,t,o,m,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(m),r?.count&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!r?.withCoord&&!r?.withDist&&!r?.withHash?d.map(c=>{try{return{member:JSON.parse(c)}}catch{return{member:c}}}):d.map(c=>{let Oe=1,C={};try{C.member=JSON.parse(c[0])}catch{C.member=c[0]}return r.withDist&&(C.dist=parseFloat(c[Oe++])),r.withHash&&(C.hash=c[Oe++].toString()),r.withCoord&&(C.coord={long:parseFloat(c[Oe][0]),lat:parseFloat(c[Oe][1])}),C});super([...i,...r?.withCoord?["WITHCOORD"]:[],...r?.withDist?["WITHDIST"]:[],...r?.withHash?["WITHHASH"]:[]],{deserialize:p,...a})}};var K=class extends e{constructor([n,t,o,m,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(m.type==="BYRADIUS"||m.type==="byradius")&&p.push(m.type,m.radius,m.radiusType),(m.type==="BYBOX"||m.type==="bybox")&&p.push(m.type,m.rect.width,m.rect.height,m.rectType),p.push(r),a?.count&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,...a?.storeDist?["STOREDIST"]:[]],i)}};var X=class extends e{constructor(n,t){super(["get",...n],t)}};var J=class extends e{constructor(n,t){super(["getbit",...n],t)}};var U=class extends e{constructor(n,t){super(["getdel",...n],t)}};var Z=class extends e{constructor(n,t){super(["getrange",...n],t)}};var B=class extends e{constructor(n,t){super(["getset",...n],t)}};var H=class extends e{constructor(n,t){super(["hdel",...n],t)}};var F=class extends e{constructor(n,t){super(["hexists",...n],t)}};var $=class extends e{constructor(n,t){super(["hget",...n],t)}};function Ne(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o))?n[t]=o:n[t]=JSON.parse(o)}catch{n[t]=o}}return n}var q=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Ne(o),...t})}};var j=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var Y=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var V=class extends e{constructor([n],t){super(["hkeys",n],t)}};var _=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Le(s,n){if(n.length===0||n.every(o=>o===null))return null;let t={};for(let o=0;o<s.length;o++)try{t[s[o]]=JSON.parse(n[o])}catch{t[s[o]]=n[o]}return t}var W=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:m=>Le(t,m),...o})}};var Q=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};function ze(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{n[t]=JSON.parse(o)}catch{n[t]=o}}return n}var nn=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?m=>ze(m):t?.deserialize,...t})}};var tn=class extends e{constructor([n,t,o],m){let r=["hscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var en=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};var on=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var sn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var mn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var rn=class extends e{constructor(n,t){super(["incr",...n],t)}};var an=class extends e{constructor(n,t){super(["incrby",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var dn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],n[1]??"$"],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var Cn=class extends e{constructor(n,t){let o=n[1]??"$",m=n[2]??0,r=n[3]??0;super(["JSON.ARRTRIM",n[0],o,m,r],t)}};var gn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var xn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var fn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var yn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var bn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var Tn=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var On=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var wn=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var kn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var Rn=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var Sn=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var En=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var vn=class extends e{constructor(n,t){super(["keys",...n],t)}};var Pn=class extends e{constructor(n,t){super(["lindex",...n],t)}};var In=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Nn=class extends e{constructor(n,t){super(["llen",...n],t)}};var Ln=class extends e{constructor(n,t){super(["lmove",...n],t)}};var zn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,m,r,a]=n;super(["LMPOP",o,...m,r,...a?["COUNT",a]:[]],t)}};var Kn=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof n[2]?.rank=="number"&&o.push("rank",n[2].rank),typeof n[2]?.count=="number"&&o.push("count",n[2].count),typeof n[2]?.maxLen=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Xn=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Jn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Un=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lset",...n],t)}};var Hn=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var Fn=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var $n=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,m])=>[o,m])],t)}};var qn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flatMap(o=>o)],t)}};var jn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Yn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var _n=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var Wn=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var nt=class extends e{constructor(n,t){let o=["ping"];typeof n<"u"&&typeof n[0]<"u"&&o.push(n[0]),super(o,t)}};var tt=class extends e{constructor(n,t){super(["psetex",...n],t)}};var et=class extends e{constructor(n,t){super(["pttl",...n],t)}};var ot=class extends e{constructor(n,t){super(["publish",...n],t)}};var st=class extends e{constructor(n){super(["randomkey"],n)}};var mt=class extends e{constructor(n,t){super(["rename",...n],t)}};var rt=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var at=class extends e{constructor(n,t){super(["rpop",...n],t)}};var it=class extends e{constructor(n,t){super(["rpush",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var dt=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ct=class extends e{constructor([n,t],o){let m=["scan",n];t?.match&&m.push("match",t.match),typeof t?.count=="number"&&m.push("count",t.count),t?.type&&t.type.length>0&&m.push("type",t.type),super(m,{deserialize:l,...o})}};var ut=class extends e{constructor(n,t){super(["scard",...n],t)}};var lt=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var ht=class extends e{constructor([n],t){let o=["script","flush"];n?.sync?o.push("sync"):n?.async&&o.push("async"),super(o,t)}};var Ct=class extends e{constructor(n,t){super(["script","load",...n],t)}};var gt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var ft=class extends e{constructor([n,t,o],m){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,m)}};var yt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var bt=class extends e{constructor(n,t){super(["setex",...n],t)}};var Tt=class extends e{constructor(n,t){super(["setnx",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setrange",...n],t)}};var wt=class extends e{constructor(n,t){super(["sinter",...n],t)}};var Dt=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var At=class extends e{constructor(n,t){super(["sismember",...n],t)}};var kt=class extends e{constructor(n,t){super(["smembers",...n],t)}};var Rt=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var St=class extends e{constructor(n,t){super(["smove",...n],t)}};var Et=class extends e{constructor([n,t],o){let m=["spop",n];typeof t=="number"&&m.push(t),super(m,o)}};var Mt=class extends e{constructor([n,t],o){let m=["srandmember",n];typeof t=="number"&&m.push(t),super(m,o)}};var vt=class extends e{constructor(n,t){super(["srem",...n],t)}};var Pt=class extends e{constructor([n,t,o],m){let r=["sscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var It=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Nt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var Lt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var zt=class extends e{constructor(n){super(["time"],n)}};var Gt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Kt=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Xt=class extends e{constructor(n,t){super(["type",...n],t)}};var Jt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Ut=class extends e{constructor([n,t,o],m){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],m)}};var Zt=class extends e{constructor([n,t,o,m],r){let a=["XADD",n];m&&(m.nomkStream&&a.push("NOMKSTREAM"),m.trim&&(a.push(m.trim.type,m.trim.comparison,m.trim.threshold),typeof m.trim.limit<"u"&&a.push("LIMIT",m.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Bt=class extends e{constructor([n,t,o,m,r,a],i){let p=[];a?.count&&p.push("COUNT",a.count),a?.justId&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,m,r,...p],i)}};var Ht=class extends e{constructor([n,t,o,m,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];a?.idleMS&&d.push("IDLE",a.idleMS),a?.idleMS&&d.push("TIME",a.timeMS),a?.retryCount&&d.push("RETRYCOUNT",a?.retryCount),a?.force&&d.push("FORCE"),a?.justId&&d.push("JUSTID"),a?.lastId&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,m,...p,...d],i)}};var Ft=class extends e{constructor([n,t],o){let m=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...m],o)}};var $t=class extends e{constructor([n,t],o){let m=["XGROUP"];switch(t.type){case"CREATE":m.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&m.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break;case"CREATECONSUMER":m.push("CREATECONSUMER",n,t.group,t.consumer);break;case"DELCONSUMER":m.push("DELCONSUMER",n,t.group,t.consumer);break;case"DESTROY":m.push("DESTROY",n,t.group);break;case"SETID":m.push("SETID",n,t.group,t.id),t.options&&t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break;default:throw new Error("Invalid XGROUP")}super(m,o)}};var qt=class extends e{constructor([n,t],o){let m=[];t.type==="CONSUMERS"?m.push("CONSUMERS",n,t.group):m.push("GROUPS",n),super(["XINFO",...m],o)}};var jt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Yt=class extends e{constructor([n,t,o,m,r,a],i){let p=typeof a?.consumer<"u"?Array.isArray(a.consumer)?[...a.consumer]:[a.consumer]:[];super(["XPENDING",n,t,...a?.idleTime?["IDLE",a.idleTime]:[],o,m,r,...p],i)}};function Ge(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var Vt=class extends e{constructor([n,t,o,m],r){let a=["XRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Ge(i),...r})}};var Ke="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",_t=class extends e{constructor([n,t,o],m){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Ke);let r=[];typeof o?.count=="number"&&r.push("COUNT",o.count),typeof o?.blockMS=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],m)}};var Xe="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",Wt=class extends e{constructor([n,t,o,m,r],a){if(Array.isArray(o)&&Array.isArray(m)&&o.length!==m.length)throw new Error(Xe);let i=[];typeof r?.count=="number"&&i.push("COUNT",r.count),typeof r?.blockMS=="number"&&i.push("BLOCK",r.blockMS),typeof r?.NOACK=="boolean"&&r?.NOACK&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(m)?[...m]:[m]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var Qt=class extends e{constructor([n,t,o,m],r){let a=["XREVRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Je(i),...r})}};function Je(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var ne=class extends e{constructor([n,t],o){let{limit:m,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...m?["LIMIT",m]:[]],o)}};var h=class extends e{constructor([n,t,...o],m){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,m)}};var te=class extends e{constructor(n,t){super(["zcard",...n],t)}};var ee=class extends e{constructor(n,t){super(["zcount",...n],t)}};var oe=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var se=class extends e{constructor([n,t,o,m],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var me=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var re=class extends e{constructor([n,t],o){let m=["zpopmax",n];typeof t=="number"&&m.push(t),super(m,o)}};var ae=class extends e{constructor([n,t],o){let m=["zpopmin",n];typeof t=="number"&&m.push(t),super(m,o)}};var ie=class extends e{constructor([n,t,o,m],r){let a=["zrange",n,t,o];m?.byScore&&a.push("byscore"),m?.byLex&&a.push("bylex"),m?.rev&&a.push("rev"),typeof m?.count<"u"&&typeof m?.offset<"u"&&a.push("limit",m.offset,m.count),m?.withScores&&a.push("withscores"),super(a,r)}};var pe=class extends e{constructor(n,t){super(["zrank",...n],t)}};var de=class extends e{constructor(n,t){super(["zrem",...n],t)}};var ce=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var ue=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var he=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var Ce=class extends e{constructor([n,t,o],m){let r=["zscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var ge=class extends e{constructor(n,t){super(["zscore",...n],t)}};var xe=class extends e{constructor([n,t,o],m){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),o?.withScores&&r.push("withscores")),super(r,m)}};var fe=class extends e{constructor([n,t,o,m],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var ye=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var be=class extends e{constructor(n,t){let[o,m]=n;super(["zmscore",o,...m],t)}};var Te=class{client;commands;commandOptions;multiExec;constructor(n){if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=n.multiExec??!1,this.commandOptions?.latencyLogging){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),m=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),m}}}exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:m},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(m)})};length(){return this.commands.length}chain(n){return this.commands.push(n),this}append=(...n)=>this.chain(new g(n,this.commandOptions));bitcount=(...n)=>this.chain(new x(n,this.commandOptions));bitop=(n,t,o,...m)=>this.chain(new f([n,t,o,...m],this.commandOptions));bitpos=(...n)=>this.chain(new y(n,this.commandOptions));copy=(...n)=>this.chain(new b(n,this.commandOptions));zdiffstore=(...n)=>this.chain(new ye(n,this.commandOptions));dbsize=()=>this.chain(new T(this.commandOptions));decr=(...n)=>this.chain(new O(n,this.commandOptions));decrby=(...n)=>this.chain(new w(n,this.commandOptions));del=(...n)=>this.chain(new D(n,this.commandOptions));echo=(...n)=>this.chain(new A(n,this.commandOptions));eval=(...n)=>this.chain(new k(n,this.commandOptions));evalsha=(...n)=>this.chain(new R(n,this.commandOptions));exists=(...n)=>this.chain(new S(n,this.commandOptions));expire=(...n)=>this.chain(new E(n,this.commandOptions));expireat=(...n)=>this.chain(new M(n,this.commandOptions));flushall=n=>this.chain(new v(n,this.commandOptions));flushdb=(...n)=>this.chain(new P(n,this.commandOptions));geoadd=(...n)=>this.chain(new I(n,this.commandOptions));geodist=(...n)=>this.chain(new N(n,this.commandOptions));geopos=(...n)=>this.chain(new z(n,this.commandOptions));geohash=(...n)=>this.chain(new L(n,this.commandOptions));geosearch=(...n)=>this.chain(new G(n,this.commandOptions));geosearchstore=(...n)=>this.chain(new K(n,this.commandOptions));get=(...n)=>this.chain(new X(n,this.commandOptions));getbit=(...n)=>this.chain(new J(n,this.commandOptions));getdel=(...n)=>this.chain(new U(n,this.commandOptions));getrange=(...n)=>this.chain(new Z(n,this.commandOptions));getset=(n,t)=>this.chain(new B([n,t],this.commandOptions));hdel=(...n)=>this.chain(new H(n,this.commandOptions));hexists=(...n)=>this.chain(new F(n,this.commandOptions));hget=(...n)=>this.chain(new $(n,this.commandOptions));hgetall=(...n)=>this.chain(new q(n,this.commandOptions));hincrby=(...n)=>this.chain(new j(n,this.commandOptions));hincrbyfloat=(...n)=>this.chain(new Y(n,this.commandOptions));hkeys=(...n)=>this.chain(new V(n,this.commandOptions));hlen=(...n)=>this.chain(new _(n,this.commandOptions));hmget=(...n)=>this.chain(new W(n,this.commandOptions));hmset=(n,t)=>this.chain(new Q([n,t],this.commandOptions));hrandfield=(n,t,o)=>this.chain(new nn([n,t,o],this.commandOptions));hscan=(...n)=>this.chain(new tn(n,this.commandOptions));hset=(n,t)=>this.chain(new en([n,t],this.commandOptions));hsetnx=(n,t,o)=>this.chain(new on([n,t,o],this.commandOptions));hstrlen=(...n)=>this.chain(new sn(n,this.commandOptions));hvals=(...n)=>this.chain(new mn(n,this.commandOptions));incr=(...n)=>this.chain(new rn(n,this.commandOptions));incrby=(...n)=>this.chain(new an(n,this.commandOptions));incrbyfloat=(...n)=>this.chain(new pn(n,this.commandOptions));keys=(...n)=>this.chain(new vn(n,this.commandOptions));lindex=(...n)=>this.chain(new Pn(n,this.commandOptions));linsert=(n,t,o,m)=>this.chain(new In([n,t,o,m],this.commandOptions));llen=(...n)=>this.chain(new Nn(n,this.commandOptions));lmove=(...n)=>this.chain(new Ln(n,this.commandOptions));lpop=(...n)=>this.chain(new zn(n,this.commandOptions));lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions));lpos=(...n)=>this.chain(new Kn(n,this.commandOptions));lpush=(n,...t)=>this.chain(new Xn([n,...t],this.commandOptions));lpushx=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions));lrange=(...n)=>this.chain(new Un(n,this.commandOptions));lrem=(n,t,o)=>this.chain(new Zn([n,t,o],this.commandOptions));lset=(n,t,o)=>this.chain(new Bn([n,t,o],this.commandOptions));ltrim=(...n)=>this.chain(new Hn(n,this.commandOptions));mget=(...n)=>this.chain(new Fn(n,this.commandOptions));mset=n=>this.chain(new $n([n],this.commandOptions));msetnx=n=>this.chain(new qn([n],this.commandOptions));persist=(...n)=>this.chain(new jn(n,this.commandOptions));pexpire=(...n)=>this.chain(new Yn(n,this.commandOptions));pexpireat=(...n)=>this.chain(new Vn(n,this.commandOptions));pfadd=(...n)=>this.chain(new _n(n,this.commandOptions));pfcount=(...n)=>this.chain(new Wn(n,this.commandOptions));pfmerge=(...n)=>this.chain(new Qn(n,this.commandOptions));ping=n=>this.chain(new nt(n,this.commandOptions));psetex=(n,t,o)=>this.chain(new tt([n,t,o],this.commandOptions));pttl=(...n)=>this.chain(new et(n,this.commandOptions));publish=(...n)=>this.chain(new ot(n,this.commandOptions));randomkey=()=>this.chain(new st(this.commandOptions));rename=(...n)=>this.chain(new mt(n,this.commandOptions));renamenx=(...n)=>this.chain(new rt(n,this.commandOptions));rpop=(...n)=>this.chain(new at(n,this.commandOptions));rpush=(n,...t)=>this.chain(new it([n,...t],this.commandOptions));rpushx=(n,...t)=>this.chain(new pt([n,...t],this.commandOptions));sadd=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions));scan=(...n)=>this.chain(new ct(n,this.commandOptions));scard=(...n)=>this.chain(new ut(n,this.commandOptions));scriptExists=(...n)=>this.chain(new lt(n,this.commandOptions));scriptFlush=(...n)=>this.chain(new ht(n,this.commandOptions));scriptLoad=(...n)=>this.chain(new Ct(n,this.commandOptions));sdiff=(...n)=>this.chain(new gt(n,this.commandOptions));sdiffstore=(...n)=>this.chain(new xt(n,this.commandOptions));set=(n,t,o)=>this.chain(new ft([n,t,o],this.commandOptions));setbit=(...n)=>this.chain(new yt(n,this.commandOptions));setex=(n,t,o)=>this.chain(new bt([n,t,o],this.commandOptions));setnx=(n,t)=>this.chain(new Tt([n,t],this.commandOptions));setrange=(...n)=>this.chain(new Ot(n,this.commandOptions));sinter=(...n)=>this.chain(new wt(n,this.commandOptions));sinterstore=(...n)=>this.chain(new Dt(n,this.commandOptions));sismember=(n,t)=>this.chain(new At([n,t],this.commandOptions));smembers=(...n)=>this.chain(new kt(n,this.commandOptions));smismember=(n,t)=>this.chain(new Rt([n,t],this.commandOptions));smove=(n,t,o)=>this.chain(new St([n,t,o],this.commandOptions));spop=(...n)=>this.chain(new Et(n,this.commandOptions));srandmember=(...n)=>this.chain(new Mt(n,this.commandOptions));srem=(n,...t)=>this.chain(new vt([n,...t],this.commandOptions));sscan=(...n)=>this.chain(new Pt(n,this.commandOptions));strlen=(...n)=>this.chain(new It(n,this.commandOptions));sunion=(...n)=>this.chain(new Nt(n,this.commandOptions));sunionstore=(...n)=>this.chain(new Lt(n,this.commandOptions));time=()=>this.chain(new zt(this.commandOptions));touch=(...n)=>this.chain(new Gt(n,this.commandOptions));ttl=(...n)=>this.chain(new Kt(n,this.commandOptions));type=(...n)=>this.chain(new Xt(n,this.commandOptions));unlink=(...n)=>this.chain(new Jt(n,this.commandOptions));zadd=(...n)=>"score"in n[1]?this.chain(new h([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new h([n[0],n[1],...n.slice(2)],this.commandOptions));xadd=(...n)=>this.chain(new Zt(n,this.commandOptions));xack=(...n)=>this.chain(new Ut(n,this.commandOptions));xdel=(...n)=>this.chain(new Ft(n,this.commandOptions));xgroup=(...n)=>this.chain(new $t(n,this.commandOptions));xread=(...n)=>this.chain(new _t(n,this.commandOptions));xreadgroup=(...n)=>this.chain(new Wt(n,this.commandOptions));xinfo=(...n)=>this.chain(new qt(n,this.commandOptions));xlen=(...n)=>this.chain(new jt(n,this.commandOptions));xpending=(...n)=>this.chain(new Yt(n,this.commandOptions));xclaim=(...n)=>this.chain(new Ht(n,this.commandOptions));xautoclaim=(...n)=>this.chain(new Bt(n,this.commandOptions));xtrim=(...n)=>this.chain(new ne(n,this.commandOptions));xrange=(...n)=>this.chain(new Vt(n,this.commandOptions));xrevrange=(...n)=>this.chain(new Qt(n,this.commandOptions));zcard=(...n)=>this.chain(new te(n,this.commandOptions));zcount=(...n)=>this.chain(new ee(n,this.commandOptions));zincrby=(n,t,o)=>this.chain(new oe([n,t,o],this.commandOptions));zinterstore=(...n)=>this.chain(new se(n,this.commandOptions));zlexcount=(...n)=>this.chain(new me(n,this.commandOptions));zmscore=(...n)=>this.chain(new be(n,this.commandOptions));zpopmax=(...n)=>this.chain(new re(n,this.commandOptions));zpopmin=(...n)=>this.chain(new ae(n,this.commandOptions));zrange=(...n)=>this.chain(new ie(n,this.commandOptions));zrank=(n,t)=>this.chain(new pe([n,t],this.commandOptions));zrem=(n,...t)=>this.chain(new de([n,...t],this.commandOptions));zremrangebylex=(...n)=>this.chain(new ce(n,this.commandOptions));zremrangebyrank=(...n)=>this.chain(new ue(n,this.commandOptions));zremrangebyscore=(...n)=>this.chain(new le(n,this.commandOptions));zrevrank=(n,t)=>this.chain(new he([n,t],this.commandOptions));zscan=(...n)=>this.chain(new Ce(n,this.commandOptions));zscore=(n,t)=>this.chain(new ge([n,t],this.commandOptions));zunionstore=(...n)=>this.chain(new fe(n,this.commandOptions));zunion=(...n)=>this.chain(new xe(n,this.commandOptions));get json(){return{arrappend:(...n)=>this.chain(new dn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new cn(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new un(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new hn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new Cn(n,this.commandOptions)),clear:(...n)=>this.chain(new gn(n,this.commandOptions)),del:(...n)=>this.chain(new xn(n,this.commandOptions)),forget:(...n)=>this.chain(new fn(n,this.commandOptions)),get:(...n)=>this.chain(new yn(n,this.commandOptions)),mget:(...n)=>this.chain(new bn(n,this.commandOptions)),numincrby:(...n)=>this.chain(new Tn(n,this.commandOptions)),nummultby:(...n)=>this.chain(new On(n,this.commandOptions)),objkeys:(...n)=>this.chain(new wn(n,this.commandOptions)),objlen:(...n)=>this.chain(new Dn(n,this.commandOptions)),resp:(...n)=>this.chain(new An(n,this.commandOptions)),set:(...n)=>this.chain(new kn(n,this.commandOptions)),strappend:(...n)=>this.chain(new Rn(n,this.commandOptions)),strlen:(...n)=>this.chain(new Sn(n,this.commandOptions)),toggle:(...n)=>this.chain(new En(n,this.commandOptions)),type:(...n)=>this.chain(new Mn(n,this.commandOptions))}}};import Ue from"crypto-js/enc-hex.js";import Ze from"crypto-js/sha1.js";var we=class{script;sha1;redis;constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async m=>{if(m instanceof Error&&m.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw m})}digest(n){return Ue.stringify(Ze(n))}};function Re(s,n){let t=s;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new ke(t)),new Proxy(t,{get:(o,m)=>m==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:m==="json"?Re(o,!0):m in o&&!(m in o.autoPipelineExecutor.pipeline)?o[m]:typeof o.autoPipelineExecutor.pipeline[m]=="function"?(...a)=>o.autoPipelineExecutor.withAutoPipeline(i=>{n?i.json[m](...a):i[m](...a)}):o.autoPipelineExecutor.pipeline[m]})}var ke=class{pipelinePromises=new WeakMap;activePipeline=null;indexInCurrentPipeline=0;redis;pipeline;pipelineCounter=0;constructor(n){this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=this.activePipeline||this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){return await Promise.resolve(),await Promise.resolve()}};var ve=class{client;opts;enableTelemetry;enableAutoPipelining;constructor(n,t){this.client=n,this.opts=t,this.enableTelemetry=t?.enableTelemetry??!0,this.enableAutoPipelining=t?.enableAutoPipelining??!1}get json(){return{arrappend:(...n)=>new dn(n,this.opts).exec(this.client),arrindex:(...n)=>new cn(n,this.opts).exec(this.client),arrinsert:(...n)=>new un(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new hn(n,this.opts).exec(this.client),arrtrim:(...n)=>new Cn(n,this.opts).exec(this.client),clear:(...n)=>new gn(n,this.opts).exec(this.client),del:(...n)=>new xn(n,this.opts).exec(this.client),forget:(...n)=>new fn(n,this.opts).exec(this.client),get:(...n)=>new yn(n,this.opts).exec(this.client),mget:(...n)=>new bn(n,this.opts).exec(this.client),numincrby:(...n)=>new Tn(n,this.opts).exec(this.client),nummultby:(...n)=>new On(n,this.opts).exec(this.client),objkeys:(...n)=>new wn(n,this.opts).exec(this.client),objlen:(...n)=>new Dn(n,this.opts).exec(this.client),resp:(...n)=>new An(n,this.opts).exec(this.client),set:(...n)=>new kn(n,this.opts).exec(this.client),strappend:(...n)=>new Rn(n,this.opts).exec(this.client),strlen:(...n)=>new Sn(n,this.opts).exec(this.client),toggle:(...n)=>new En(n,this.opts).exec(this.client),type:(...n)=>new Mn(n,this.opts).exec(this.client)}}use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)};addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch{}};createScript(n){return new we(this,n)}pipeline=()=>new Te({client:this.client,commandOptions:this.opts,multiExec:!1});autoPipeline=()=>Re(this);multi=()=>new Te({client:this.client,commandOptions:this.opts,multiExec:!0});append=(...n)=>new g(n,this.opts).exec(this.client);bitcount=(...n)=>new x(n,this.opts).exec(this.client);bitop=(n,t,o,...m)=>new f([n,t,o,...m],this.opts).exec(this.client);bitpos=(...n)=>new y(n,this.opts).exec(this.client);copy=(...n)=>new b(n,this.opts).exec(this.client);dbsize=()=>new T(this.opts).exec(this.client);decr=(...n)=>new O(n,this.opts).exec(this.client);decrby=(...n)=>new w(n,this.opts).exec(this.client);del=(...n)=>new D(n,this.opts).exec(this.client);echo=(...n)=>new A(n,this.opts).exec(this.client);eval=(...n)=>new k(n,this.opts).exec(this.client);evalsha=(...n)=>new R(n,this.opts).exec(this.client);exists=(...n)=>new S(n,this.opts).exec(this.client);expire=(...n)=>new E(n,this.opts).exec(this.client);expireat=(...n)=>new M(n,this.opts).exec(this.client);flushall=n=>new v(n,this.opts).exec(this.client);flushdb=(...n)=>new P(n,this.opts).exec(this.client);geoadd=(...n)=>new I(n,this.opts).exec(this.client);geopos=(...n)=>new z(n,this.opts).exec(this.client);geodist=(...n)=>new N(n,this.opts).exec(this.client);geohash=(...n)=>new L(n,this.opts).exec(this.client);geosearch=(...n)=>new G(n,this.opts).exec(this.client);geosearchstore=(...n)=>new K(n,this.opts).exec(this.client);get=(...n)=>new X(n,this.opts).exec(this.client);getbit=(...n)=>new J(n,this.opts).exec(this.client);getdel=(...n)=>new U(n,this.opts).exec(this.client);getrange=(...n)=>new Z(n,this.opts).exec(this.client);getset=(n,t)=>new B([n,t],this.opts).exec(this.client);hdel=(...n)=>new H(n,this.opts).exec(this.client);hexists=(...n)=>new F(n,this.opts).exec(this.client);hget=(...n)=>new $(n,this.opts).exec(this.client);hgetall=(...n)=>new q(n,this.opts).exec(this.client);hincrby=(...n)=>new j(n,this.opts).exec(this.client);hincrbyfloat=(...n)=>new Y(n,this.opts).exec(this.client);hkeys=(...n)=>new V(n,this.opts).exec(this.client);hlen=(...n)=>new _(n,this.opts).exec(this.client);hmget=(...n)=>new W(n,this.opts).exec(this.client);hmset=(n,t)=>new Q([n,t],this.opts).exec(this.client);hrandfield=(n,t,o)=>new nn([n,t,o],this.opts).exec(this.client);hscan=(...n)=>new tn(n,this.opts).exec(this.client);hset=(n,t)=>new en([n,t],this.opts).exec(this.client);hsetnx=(n,t,o)=>new on([n,t,o],this.opts).exec(this.client);hstrlen=(...n)=>new sn(n,this.opts).exec(this.client);hvals=(...n)=>new mn(n,this.opts).exec(this.client);incr=(...n)=>new rn(n,this.opts).exec(this.client);incrby=(...n)=>new an(n,this.opts).exec(this.client);incrbyfloat=(...n)=>new pn(n,this.opts).exec(this.client);keys=(...n)=>new vn(n,this.opts).exec(this.client);lindex=(...n)=>new Pn(n,this.opts).exec(this.client);linsert=(n,t,o,m)=>new In([n,t,o,m],this.opts).exec(this.client);llen=(...n)=>new Nn(n,this.opts).exec(this.client);lmove=(...n)=>new Ln(n,this.opts).exec(this.client);lpop=(...n)=>new zn(n,this.opts).exec(this.client);lmpop=(...n)=>new Gn(n,this.opts).exec(this.client);lpos=(...n)=>new Kn(n,this.opts).exec(this.client);lpush=(n,...t)=>new Xn([n,...t],this.opts).exec(this.client);lpushx=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client);lrange=(...n)=>new Un(n,this.opts).exec(this.client);lrem=(n,t,o)=>new Zn([n,t,o],this.opts).exec(this.client);lset=(n,t,o)=>new Bn([n,t,o],this.opts).exec(this.client);ltrim=(...n)=>new Hn(n,this.opts).exec(this.client);mget=(...n)=>new Fn(n,this.opts).exec(this.client);mset=n=>new $n([n],this.opts).exec(this.client);msetnx=n=>new qn([n],this.opts).exec(this.client);persist=(...n)=>new jn(n,this.opts).exec(this.client);pexpire=(...n)=>new Yn(n,this.opts).exec(this.client);pexpireat=(...n)=>new Vn(n,this.opts).exec(this.client);pfadd=(...n)=>new _n(n,this.opts).exec(this.client);pfcount=(...n)=>new Wn(n,this.opts).exec(this.client);pfmerge=(...n)=>new Qn(n,this.opts).exec(this.client);ping=n=>new nt(n,this.opts).exec(this.client);psetex=(n,t,o)=>new tt([n,t,o],this.opts).exec(this.client);pttl=(...n)=>new et(n,this.opts).exec(this.client);publish=(...n)=>new ot(n,this.opts).exec(this.client);randomkey=()=>new st().exec(this.client);rename=(...n)=>new mt(n,this.opts).exec(this.client);renamenx=(...n)=>new rt(n,this.opts).exec(this.client);rpop=(...n)=>new at(n,this.opts).exec(this.client);rpush=(n,...t)=>new it([n,...t],this.opts).exec(this.client);rpushx=(n,...t)=>new pt([n,...t],this.opts).exec(this.client);sadd=(n,...t)=>new dt([n,...t],this.opts).exec(this.client);scan=(...n)=>new ct(n,this.opts).exec(this.client);scard=(...n)=>new ut(n,this.opts).exec(this.client);scriptExists=(...n)=>new lt(n,this.opts).exec(this.client);scriptFlush=(...n)=>new ht(n,this.opts).exec(this.client);scriptLoad=(...n)=>new Ct(n,this.opts).exec(this.client);sdiff=(...n)=>new gt(n,this.opts).exec(this.client);sdiffstore=(...n)=>new xt(n,this.opts).exec(this.client);set=(n,t,o)=>new ft([n,t,o],this.opts).exec(this.client);setbit=(...n)=>new yt(n,this.opts).exec(this.client);setex=(n,t,o)=>new bt([n,t,o],this.opts).exec(this.client);setnx=(n,t)=>new Tt([n,t],this.opts).exec(this.client);setrange=(...n)=>new Ot(n,this.opts).exec(this.client);sinter=(...n)=>new wt(n,this.opts).exec(this.client);sinterstore=(...n)=>new Dt(n,this.opts).exec(this.client);sismember=(n,t)=>new At([n,t],this.opts).exec(this.client);smismember=(n,t)=>new Rt([n,t],this.opts).exec(this.client);smembers=(...n)=>new kt(n,this.opts).exec(this.client);smove=(n,t,o)=>new St([n,t,o],this.opts).exec(this.client);spop=(...n)=>new Et(n,this.opts).exec(this.client);srandmember=(...n)=>new Mt(n,this.opts).exec(this.client);srem=(n,...t)=>new vt([n,...t],this.opts).exec(this.client);sscan=(...n)=>new Pt(n,this.opts).exec(this.client);strlen=(...n)=>new It(n,this.opts).exec(this.client);sunion=(...n)=>new Nt(n,this.opts).exec(this.client);sunionstore=(...n)=>new Lt(n,this.opts).exec(this.client);time=()=>new zt().exec(this.client);touch=(...n)=>new Gt(n,this.opts).exec(this.client);ttl=(...n)=>new Kt(n,this.opts).exec(this.client);type=(...n)=>new Xt(n,this.opts).exec(this.client);unlink=(...n)=>new Jt(n,this.opts).exec(this.client);xadd=(...n)=>new Zt(n,this.opts).exec(this.client);xack=(...n)=>new Ut(n,this.opts).exec(this.client);xdel=(...n)=>new Ft(n,this.opts).exec(this.client);xgroup=(...n)=>new $t(n,this.opts).exec(this.client);xread=(...n)=>new _t(n,this.opts).exec(this.client);xreadgroup=(...n)=>new Wt(n,this.opts).exec(this.client);xinfo=(...n)=>new qt(n,this.opts).exec(this.client);xlen=(...n)=>new jt(n,this.opts).exec(this.client);xpending=(...n)=>new Yt(n,this.opts).exec(this.client);xclaim=(...n)=>new Ht(n,this.opts).exec(this.client);xautoclaim=(...n)=>new Bt(n,this.opts).exec(this.client);xtrim=(...n)=>new ne(n,this.opts).exec(this.client);xrange=(...n)=>new Vt(n,this.opts).exec(this.client);xrevrange=(...n)=>new Qt(n,this.opts).exec(this.client);zadd=(...n)=>"score"in n[1]?new h([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new h([n[0],n[1],...n.slice(2)],this.opts).exec(this.client);zcard=(...n)=>new te(n,this.opts).exec(this.client);zcount=(...n)=>new ee(n,this.opts).exec(this.client);zdiffstore=(...n)=>new ye(n,this.opts).exec(this.client);zincrby=(n,t,o)=>new oe([n,t,o],this.opts).exec(this.client);zinterstore=(...n)=>new se(n,this.opts).exec(this.client);zlexcount=(...n)=>new me(n,this.opts).exec(this.client);zmscore=(...n)=>new be(n,this.opts).exec(this.client);zpopmax=(...n)=>new re(n,this.opts).exec(this.client);zpopmin=(...n)=>new ae(n,this.opts).exec(this.client);zrange=(...n)=>new ie(n,this.opts).exec(this.client);zrank=(n,t)=>new pe([n,t],this.opts).exec(this.client);zrem=(n,...t)=>new de([n,...t],this.opts).exec(this.client);zremrangebylex=(...n)=>new ce(n,this.opts).exec(this.client);zremrangebyrank=(...n)=>new ue(n,this.opts).exec(this.client);zremrangebyscore=(...n)=>new le(n,this.opts).exec(this.client);zrevrank=(n,t)=>new he([n,t],this.opts).exec(this.client);zscan=(...n)=>new Ce(n,this.opts).exec(this.client);zscore=(n,t)=>new ge([n,t],this.opts).exec(this.client);zunion=(...n)=>new xe(n,this.opts).exec(this.client);zunionstore=(...n)=>new fe(n,this.opts).exec(this.client)};var qC="v1.31.6";export{Se as a,ve as b,qC as c};
package/chunk-C3VPBW4T.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3;var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}};var Se=class{constructor(n){this.options={backend:_optionalChain([n, 'access', _2 => _2.options, 'optionalAccess', _3 => _3.backend]),agent:n.agent,responseEncoding:_nullishCoalesce(n.responseEncoding, () => ("base64")),cache:n.cache,signal:n.signal,keepAlive:_nullishCoalesce(n.keepAlive, () => (!0))},this.baseUrl=n.baseUrl.replace(/\/$/,""),this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),typeof _optionalChain([n, 'optionalAccess', _4 => _4.retry])=="boolean"&&_optionalChain([n, 'optionalAccess', _5 => _5.retry])===!1?this.retry={attempts:1,backoff:()=>0}:this.retry={attempts:_nullishCoalesce(_optionalChain([n, 'optionalAccess', _6 => _6.retry, 'optionalAccess', _7 => _7.retries]), () => (5)),backoff:_nullishCoalesce(_optionalChain([n, 'optionalAccess', _8 => _8.retry, 'optionalAccess', _9 => _9.backoff]), () => ((t=>Math.exp(t)*50)))}}mergeTelemetry(n){function t(o,m,r){return r&&(o[m]?o[m]=[o[m],r].join(","):o[m]=r),o}this.headers=t(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=t(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=t(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:_optionalChain([this, 'access', _10 => _10.options, 'optionalAccess', _11 => _11.agent]),signal:this.options.signal,backend:_optionalChain([this, 'access', _12 => _12.options, 'optionalAccess', _13 => _13.backend])},o=null,m=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,..._nullishCoalesce(n.path, () => ([]))].join("/"),t);break}catch(i){if(_optionalChain([this, 'access', _14 => _14.options, 'access', _15 => _15.signal, 'optionalAccess', _16 => _16.aborted])){let p=new Blob([JSON.stringify({result:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))})]),d={status:200,statusText:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))};o=new Response(p,d);break}m=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw _nullishCoalesce(m, () => (new Error("Exhausted all retries")));let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);return _optionalChain([this, 'access', _17 => _17.options, 'optionalAccess', _18 => _18.responseEncoding])==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:De(i),error:p})):{result:De(r.result),error:r.error}:r}};function Ee(s){let n="";try{let t=atob(s),o=t.length,m=new Uint8Array(o);for(let r=0;r<o;r++)m[r]=t.charCodeAt(r);n=new TextDecoder().decode(m)}catch (e2){n=s}return n}function De(s){let n;switch(typeof s){case"undefined":return s;case"number":{n=s;break}case"object":{Array.isArray(s)?n=s.map(t=>typeof t=="string"?Ee(t):Array.isArray(t)?t.map(De):t):n=null;break}case"string":{n=s==="OK"?"OK":Ee(s);break}default:break}return n}function Me(s){let n=Array.isArray(s)?s.map(t=>{try{return Me(t)}catch (e3){return t}}):JSON.parse(s);return typeof n=="number"&&n.toString()!==s?s:n}function Ae(s){try{return Me(s)}catch (e4){return s}}function l(s){return[s[0],...Ae(s.slice(1))]}var Pe=s=>{switch(typeof s){case"string":case"number":case"boolean":return s;default:return JSON.stringify(s)}},e=class{constructor(n,t){if(this.serialize=Pe,this.deserialize=typeof _optionalChain([t, 'optionalAccess', _19 => _19.automaticDeserialization])>"u"||t.automaticDeserialization?_nullishCoalesce(_optionalChain([t, 'optionalAccess', _20 => _20.deserialize]), () => (Ae)):o=>o,this.command=n.map(o=>this.serialize(o)),_optionalChain([t, 'optionalAccess', _21 => _21.latencyLogging])){let o=this.exec.bind(this);this.exec=async m=>{let r=performance.now(),a=await o(m),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command});if(o)throw new u(o);if(typeof t>"u")throw new Error("Request did not return a result");return this.deserialize(t)}};var g=class extends e{constructor(n,t){super(["append",...n],t)}};var x=class extends e{constructor([n,t,o],m){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,m)}};var f=class extends e{constructor(n,t){super(["bitop",...n],t)}};var y=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var b=class extends e{constructor([n,t,o],m){super(["COPY",n,t,..._optionalChain([o, 'optionalAccess', _22 => _22.replace])?["REPLACE"]:[]],{...m,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var T=class extends e{constructor(n){super(["dbsize"],n)}};var O=class extends e{constructor(n,t){super(["decr",...n],t)}};var w=class extends e{constructor(n,t){super(["decrby",...n],t)}};var D=class extends e{constructor(n,t){super(["del",...n],t)}};var A=class extends e{constructor(n,t){super(["echo",...n],t)}};var k=class extends e{constructor([n,t,o],m){super(["eval",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],m)}};var R=class extends e{constructor([n,t,o],m){super(["evalsha",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],m)}};var S=class extends e{constructor(n,t){super(["exists",...n],t)}};var E=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var M=class extends e{constructor(n,t){super(["expireat",...n],t)}};var v=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var P=class extends e{constructor([n],t){let o=["flushdb"];_optionalChain([n, 'optionalAccess', _23 => _23.async])&&o.push("async"),super(o,t)}};var I=class extends e{constructor([n,t,...o],m){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,m)}};var N=class extends e{constructor([n,t,o,m="M"],r){super(["GEODIST",n,t,o,m],r)}};var L=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...m],t)}};var z=class extends e{constructor(n,t){let[o]=n,m=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...m],{deserialize:r=>Ie(r),...t})}};function Ie(s){let n=[];for(let t of s)!_optionalChain([t, 'optionalAccess', _24 => _24[0]])||!_optionalChain([t, 'optionalAccess', _25 => _25[1]])||n.push({lng:parseFloat(t[0]),lat:parseFloat(t[1])});return n}var G=class extends e{constructor([n,t,o,m,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(m),_optionalChain([r, 'optionalAccess', _26 => _26.count])&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!_optionalChain([r, 'optionalAccess', _27 => _27.withCoord])&&!_optionalChain([r, 'optionalAccess', _28 => _28.withDist])&&!_optionalChain([r, 'optionalAccess', _29 => _29.withHash])?d.map(c=>{try{return{member:JSON.parse(c)}}catch (e5){return{member:c}}}):d.map(c=>{let Oe=1,C={};try{C.member=JSON.parse(c[0])}catch (e6){C.member=c[0]}return r.withDist&&(C.dist=parseFloat(c[Oe++])),r.withHash&&(C.hash=c[Oe++].toString()),r.withCoord&&(C.coord={long:parseFloat(c[Oe][0]),lat:parseFloat(c[Oe][1])}),C});super([...i,..._optionalChain([r, 'optionalAccess', _30 => _30.withCoord])?["WITHCOORD"]:[],..._optionalChain([r, 'optionalAccess', _31 => _31.withDist])?["WITHDIST"]:[],..._optionalChain([r, 'optionalAccess', _32 => _32.withHash])?["WITHHASH"]:[]],{deserialize:p,...a})}};var K=class extends e{constructor([n,t,o,m,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(m.type==="BYRADIUS"||m.type==="byradius")&&p.push(m.type,m.radius,m.radiusType),(m.type==="BYBOX"||m.type==="bybox")&&p.push(m.type,m.rect.width,m.rect.height,m.rectType),p.push(r),_optionalChain([a, 'optionalAccess', _33 => _33.count])&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,..._optionalChain([a, 'optionalAccess', _34 => _34.storeDist])?["STOREDIST"]:[]],i)}};var X=class extends e{constructor(n,t){super(["get",...n],t)}};var J=class extends e{constructor(n,t){super(["getbit",...n],t)}};var U=class extends e{constructor(n,t){super(["getdel",...n],t)}};var Z=class extends e{constructor(n,t){super(["getrange",...n],t)}};var B=class extends e{constructor(n,t){super(["getset",...n],t)}};var H=class extends e{constructor(n,t){super(["hdel",...n],t)}};var F=class extends e{constructor(n,t){super(["hexists",...n],t)}};var $=class extends e{constructor(n,t){super(["hget",...n],t)}};function Ne(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o))?n[t]=o:n[t]=JSON.parse(o)}catch (e7){n[t]=o}}return n}var q=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Ne(o),...t})}};var j=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var Y=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var V=class extends e{constructor([n],t){super(["hkeys",n],t)}};var _=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Le(s,n){if(n.length===0||n.every(o=>o===null))return null;let t={};for(let o=0;o<s.length;o++)try{t[s[o]]=JSON.parse(n[o])}catch (e8){t[s[o]]=n[o]}return t}var W=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:m=>Le(t,m),...o})}};var Q=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};function ze(s){if(s.length===0)return null;let n={};for(;s.length>=2;){let t=s.shift(),o=s.shift();try{n[t]=JSON.parse(o)}catch (e9){n[t]=o}}return n}var nn=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?m=>ze(m):_optionalChain([t, 'optionalAccess', _35 => _35.deserialize]),...t})}};var tn=class extends e{constructor([n,t,o],m){let r=["hscan",n,t];_optionalChain([o, 'optionalAccess', _36 => _36.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _37 => _37.count])=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var en=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([m,r])=>[m,r])],o)}};var on=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var sn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var mn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var rn=class extends e{constructor(n,t){super(["incr",...n],t)}};var an=class extends e{constructor(n,t){super(["incrby",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var dn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],_nullishCoalesce(n[1], () => ("$"))],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var Cn=class extends e{constructor(n,t){let o=_nullishCoalesce(n[1], () => ("$")),m=_nullishCoalesce(n[2], () => (0)),r=_nullishCoalesce(n[3], () => (0));super(["JSON.ARRTRIM",n[0],o,m,r],t)}};var gn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var xn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var fn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var yn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var bn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var Tn=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var On=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var wn=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var kn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var Rn=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var Sn=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var En=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var vn=class extends e{constructor(n,t){super(["keys",...n],t)}};var Pn=class extends e{constructor(n,t){super(["lindex",...n],t)}};var In=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Nn=class extends e{constructor(n,t){super(["llen",...n],t)}};var Ln=class extends e{constructor(n,t){super(["lmove",...n],t)}};var zn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,m,r,a]=n;super(["LMPOP",o,...m,r,...a?["COUNT",a]:[]],t)}};var Kn=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof _optionalChain([n, 'access', _38 => _38[2], 'optionalAccess', _39 => _39.rank])=="number"&&o.push("rank",n[2].rank),typeof _optionalChain([n, 'access', _40 => _40[2], 'optionalAccess', _41 => _41.count])=="number"&&o.push("count",n[2].count),typeof _optionalChain([n, 'access', _42 => _42[2], 'optionalAccess', _43 => _43.maxLen])=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Xn=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Jn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Un=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lset",...n],t)}};var Hn=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var Fn=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var $n=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,m])=>[o,m])],t)}};var qn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flatMap(o=>o)],t)}};var jn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Yn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var _n=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var Wn=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var nt=class extends e{constructor(n,t){let o=["ping"];typeof n<"u"&&typeof n[0]<"u"&&o.push(n[0]),super(o,t)}};var tt=class extends e{constructor(n,t){super(["psetex",...n],t)}};var et=class extends e{constructor(n,t){super(["pttl",...n],t)}};var ot=class extends e{constructor(n,t){super(["publish",...n],t)}};var st=class extends e{constructor(n){super(["randomkey"],n)}};var mt=class extends e{constructor(n,t){super(["rename",...n],t)}};var rt=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var at=class extends e{constructor(n,t){super(["rpop",...n],t)}};var it=class extends e{constructor(n,t){super(["rpush",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var dt=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ct=class extends e{constructor([n,t],o){let m=["scan",n];_optionalChain([t, 'optionalAccess', _44 => _44.match])&&m.push("match",t.match),typeof _optionalChain([t, 'optionalAccess', _45 => _45.count])=="number"&&m.push("count",t.count),_optionalChain([t, 'optionalAccess', _46 => _46.type])&&t.type.length>0&&m.push("type",t.type),super(m,{deserialize:l,...o})}};var ut=class extends e{constructor(n,t){super(["scard",...n],t)}};var lt=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var ht=class extends e{constructor([n],t){let o=["script","flush"];_optionalChain([n, 'optionalAccess', _47 => _47.sync])?o.push("sync"):_optionalChain([n, 'optionalAccess', _48 => _48.async])&&o.push("async"),super(o,t)}};var Ct=class extends e{constructor(n,t){super(["script","load",...n],t)}};var gt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var ft=class extends e{constructor([n,t,o],m){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,m)}};var yt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var bt=class extends e{constructor(n,t){super(["setex",...n],t)}};var Tt=class extends e{constructor(n,t){super(["setnx",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setrange",...n],t)}};var wt=class extends e{constructor(n,t){super(["sinter",...n],t)}};var Dt=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var At=class extends e{constructor(n,t){super(["sismember",...n],t)}};var kt=class extends e{constructor(n,t){super(["smembers",...n],t)}};var Rt=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var St=class extends e{constructor(n,t){super(["smove",...n],t)}};var Et=class extends e{constructor([n,t],o){let m=["spop",n];typeof t=="number"&&m.push(t),super(m,o)}};var Mt=class extends e{constructor([n,t],o){let m=["srandmember",n];typeof t=="number"&&m.push(t),super(m,o)}};var vt=class extends e{constructor(n,t){super(["srem",...n],t)}};var Pt=class extends e{constructor([n,t,o],m){let r=["sscan",n,t];_optionalChain([o, 'optionalAccess', _49 => _49.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _50 => _50.count])=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var It=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Nt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var Lt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var zt=class extends e{constructor(n){super(["time"],n)}};var Gt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Kt=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Xt=class extends e{constructor(n,t){super(["type",...n],t)}};var Jt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Ut=class extends e{constructor([n,t,o],m){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],m)}};var Zt=class extends e{constructor([n,t,o,m],r){let a=["XADD",n];m&&(m.nomkStream&&a.push("NOMKSTREAM"),m.trim&&(a.push(m.trim.type,m.trim.comparison,m.trim.threshold),typeof m.trim.limit<"u"&&a.push("LIMIT",m.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Bt=class extends e{constructor([n,t,o,m,r,a],i){let p=[];_optionalChain([a, 'optionalAccess', _51 => _51.count])&&p.push("COUNT",a.count),_optionalChain([a, 'optionalAccess', _52 => _52.justId])&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,m,r,...p],i)}};var Ht=class extends e{constructor([n,t,o,m,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];_optionalChain([a, 'optionalAccess', _53 => _53.idleMS])&&d.push("IDLE",a.idleMS),_optionalChain([a, 'optionalAccess', _54 => _54.idleMS])&&d.push("TIME",a.timeMS),_optionalChain([a, 'optionalAccess', _55 => _55.retryCount])&&d.push("RETRYCOUNT",_optionalChain([a, 'optionalAccess', _56 => _56.retryCount])),_optionalChain([a, 'optionalAccess', _57 => _57.force])&&d.push("FORCE"),_optionalChain([a, 'optionalAccess', _58 => _58.justId])&&d.push("JUSTID"),_optionalChain([a, 'optionalAccess', _59 => _59.lastId])&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,m,...p,...d],i)}};var Ft=class extends e{constructor([n,t],o){let m=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...m],o)}};var $t=class extends e{constructor([n,t],o){let m=["XGROUP"];switch(t.type){case"CREATE":m.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&m.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break;case"CREATECONSUMER":m.push("CREATECONSUMER",n,t.group,t.consumer);break;case"DELCONSUMER":m.push("DELCONSUMER",n,t.group,t.consumer);break;case"DESTROY":m.push("DESTROY",n,t.group);break;case"SETID":m.push("SETID",n,t.group,t.id),t.options&&t.options.ENTRIESREAD!==void 0&&m.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break;default:throw new Error("Invalid XGROUP")}super(m,o)}};var qt=class extends e{constructor([n,t],o){let m=[];t.type==="CONSUMERS"?m.push("CONSUMERS",n,t.group):m.push("GROUPS",n),super(["XINFO",...m],o)}};var jt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Yt=class extends e{constructor([n,t,o,m,r,a],i){let p=typeof _optionalChain([a, 'optionalAccess', _60 => _60.consumer])<"u"?Array.isArray(a.consumer)?[...a.consumer]:[a.consumer]:[];super(["XPENDING",n,t,..._optionalChain([a, 'optionalAccess', _61 => _61.idleTime])?["IDLE",a.idleTime]:[],o,m,r,...p],i)}};function Ge(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch (e10){n[o][r]=a}}}return n}var Vt=class extends e{constructor([n,t,o,m],r){let a=["XRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Ge(i),...r})}};var Ke="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",_t=class extends e{constructor([n,t,o],m){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Ke);let r=[];typeof _optionalChain([o, 'optionalAccess', _62 => _62.count])=="number"&&r.push("COUNT",o.count),typeof _optionalChain([o, 'optionalAccess', _63 => _63.blockMS])=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],m)}};var Xe="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",Wt=class extends e{constructor([n,t,o,m,r],a){if(Array.isArray(o)&&Array.isArray(m)&&o.length!==m.length)throw new Error(Xe);let i=[];typeof _optionalChain([r, 'optionalAccess', _64 => _64.count])=="number"&&i.push("COUNT",r.count),typeof _optionalChain([r, 'optionalAccess', _65 => _65.blockMS])=="number"&&i.push("BLOCK",r.blockMS),typeof _optionalChain([r, 'optionalAccess', _66 => _66.NOACK])=="boolean"&&_optionalChain([r, 'optionalAccess', _67 => _67.NOACK])&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(m)?[...m]:[m]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var Qt=class extends e{constructor([n,t,o,m],r){let a=["XREVRANGE",n,t,o];typeof m=="number"&&a.push("COUNT",m),super(a,{deserialize:i=>Je(i),...r})}};function Je(s){let n={};for(let t of s)for(;t.length>=2;){let o=t.shift(),m=t.shift();for((o in n)||(n[o]={});m.length>=2;){let r=m.shift(),a=m.shift();try{n[o][r]=JSON.parse(a)}catch (e11){n[o][r]=a}}}return n}var ne=class extends e{constructor([n,t],o){let{limit:m,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...m?["LIMIT",m]:[]],o)}};var h=class extends e{constructor([n,t,...o],m){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,m)}};var te=class extends e{constructor(n,t){super(["zcard",...n],t)}};var ee=class extends e{constructor(n,t){super(["zcount",...n],t)}};var oe=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var se=class extends e{constructor([n,t,o,m],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var me=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var re=class extends e{constructor([n,t],o){let m=["zpopmax",n];typeof t=="number"&&m.push(t),super(m,o)}};var ae=class extends e{constructor([n,t],o){let m=["zpopmin",n];typeof t=="number"&&m.push(t),super(m,o)}};var ie=class extends e{constructor([n,t,o,m],r){let a=["zrange",n,t,o];_optionalChain([m, 'optionalAccess', _68 => _68.byScore])&&a.push("byscore"),_optionalChain([m, 'optionalAccess', _69 => _69.byLex])&&a.push("bylex"),_optionalChain([m, 'optionalAccess', _70 => _70.rev])&&a.push("rev"),typeof _optionalChain([m, 'optionalAccess', _71 => _71.count])<"u"&&typeof _optionalChain([m, 'optionalAccess', _72 => _72.offset])<"u"&&a.push("limit",m.offset,m.count),_optionalChain([m, 'optionalAccess', _73 => _73.withScores])&&a.push("withscores"),super(a,r)}};var pe=class extends e{constructor(n,t){super(["zrank",...n],t)}};var de=class extends e{constructor(n,t){super(["zrem",...n],t)}};var ce=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var ue=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var he=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var Ce=class extends e{constructor([n,t,o],m){let r=["zscan",n,t];_optionalChain([o, 'optionalAccess', _74 => _74.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _75 => _75.count])=="number"&&r.push("count",o.count),super(r,{deserialize:l,...m})}};var ge=class extends e{constructor(n,t){super(["zscore",...n],t)}};var xe=class extends e{constructor([n,t,o],m){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),_optionalChain([o, 'optionalAccess', _76 => _76.withScores])&&r.push("withscores")),super(r,m)}};var fe=class extends e{constructor([n,t,o,m],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),m&&("weights"in m&&m.weights?a.push("weights",...m.weights):"weight"in m&&typeof m.weight=="number"&&a.push("weights",m.weight),"aggregate"in m&&a.push("aggregate",m.aggregate)),super(a,r)}};var ye=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var be=class extends e{constructor(n,t){let[o,m]=n;super(["zmscore",o,...m],t)}};var Te= (_class =class{constructor(n){;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);_class.prototype.__init11.call(this);_class.prototype.__init12.call(this);_class.prototype.__init13.call(this);_class.prototype.__init14.call(this);_class.prototype.__init15.call(this);_class.prototype.__init16.call(this);_class.prototype.__init17.call(this);_class.prototype.__init18.call(this);_class.prototype.__init19.call(this);_class.prototype.__init20.call(this);_class.prototype.__init21.call(this);_class.prototype.__init22.call(this);_class.prototype.__init23.call(this);_class.prototype.__init24.call(this);_class.prototype.__init25.call(this);_class.prototype.__init26.call(this);_class.prototype.__init27.call(this);_class.prototype.__init28.call(this);_class.prototype.__init29.call(this);_class.prototype.__init30.call(this);_class.prototype.__init31.call(this);_class.prototype.__init32.call(this);_class.prototype.__init33.call(this);_class.prototype.__init34.call(this);_class.prototype.__init35.call(this);_class.prototype.__init36.call(this);_class.prototype.__init37.call(this);_class.prototype.__init38.call(this);_class.prototype.__init39.call(this);_class.prototype.__init40.call(this);_class.prototype.__init41.call(this);_class.prototype.__init42.call(this);_class.prototype.__init43.call(this);_class.prototype.__init44.call(this);_class.prototype.__init45.call(this);_class.prototype.__init46.call(this);_class.prototype.__init47.call(this);_class.prototype.__init48.call(this);_class.prototype.__init49.call(this);_class.prototype.__init50.call(this);_class.prototype.__init51.call(this);_class.prototype.__init52.call(this);_class.prototype.__init53.call(this);_class.prototype.__init54.call(this);_class.prototype.__init55.call(this);_class.prototype.__init56.call(this);_class.prototype.__init57.call(this);_class.prototype.__init58.call(this);_class.prototype.__init59.call(this);_class.prototype.__init60.call(this);_class.prototype.__init61.call(this);_class.prototype.__init62.call(this);_class.prototype.__init63.call(this);_class.prototype.__init64.call(this);_class.prototype.__init65.call(this);_class.prototype.__init66.call(this);_class.prototype.__init67.call(this);_class.prototype.__init68.call(this);_class.prototype.__init69.call(this);_class.prototype.__init70.call(this);_class.prototype.__init71.call(this);_class.prototype.__init72.call(this);_class.prototype.__init73.call(this);_class.prototype.__init74.call(this);_class.prototype.__init75.call(this);_class.prototype.__init76.call(this);_class.prototype.__init77.call(this);_class.prototype.__init78.call(this);_class.prototype.__init79.call(this);_class.prototype.__init80.call(this);_class.prototype.__init81.call(this);_class.prototype.__init82.call(this);_class.prototype.__init83.call(this);_class.prototype.__init84.call(this);_class.prototype.__init85.call(this);_class.prototype.__init86.call(this);_class.prototype.__init87.call(this);_class.prototype.__init88.call(this);_class.prototype.__init89.call(this);_class.prototype.__init90.call(this);_class.prototype.__init91.call(this);_class.prototype.__init92.call(this);_class.prototype.__init93.call(this);_class.prototype.__init94.call(this);_class.prototype.__init95.call(this);_class.prototype.__init96.call(this);_class.prototype.__init97.call(this);_class.prototype.__init98.call(this);_class.prototype.__init99.call(this);_class.prototype.__init100.call(this);_class.prototype.__init101.call(this);_class.prototype.__init102.call(this);_class.prototype.__init103.call(this);_class.prototype.__init104.call(this);_class.prototype.__init105.call(this);_class.prototype.__init106.call(this);_class.prototype.__init107.call(this);_class.prototype.__init108.call(this);_class.prototype.__init109.call(this);_class.prototype.__init110.call(this);_class.prototype.__init111.call(this);_class.prototype.__init112.call(this);_class.prototype.__init113.call(this);_class.prototype.__init114.call(this);_class.prototype.__init115.call(this);_class.prototype.__init116.call(this);_class.prototype.__init117.call(this);_class.prototype.__init118.call(this);_class.prototype.__init119.call(this);_class.prototype.__init120.call(this);_class.prototype.__init121.call(this);_class.prototype.__init122.call(this);_class.prototype.__init123.call(this);_class.prototype.__init124.call(this);_class.prototype.__init125.call(this);_class.prototype.__init126.call(this);_class.prototype.__init127.call(this);_class.prototype.__init128.call(this);_class.prototype.__init129.call(this);_class.prototype.__init130.call(this);_class.prototype.__init131.call(this);_class.prototype.__init132.call(this);_class.prototype.__init133.call(this);_class.prototype.__init134.call(this);_class.prototype.__init135.call(this);_class.prototype.__init136.call(this);_class.prototype.__init137.call(this);_class.prototype.__init138.call(this);_class.prototype.__init139.call(this);_class.prototype.__init140.call(this);_class.prototype.__init141.call(this);_class.prototype.__init142.call(this);_class.prototype.__init143.call(this);_class.prototype.__init144.call(this);_class.prototype.__init145.call(this);_class.prototype.__init146.call(this);_class.prototype.__init147.call(this);if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=_nullishCoalesce(n.multiExec, () => (!1)),_optionalChain([this, 'access', _77 => _77.commandOptions, 'optionalAccess', _78 => _78.latencyLogging])){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),m=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),m}}}__init() {this.exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:m},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(m)})}}length(){return this.commands.length}chain(n){return this.commands.push(n),this}__init2() {this.append=(...n)=>this.chain(new g(n,this.commandOptions))}__init3() {this.bitcount=(...n)=>this.chain(new x(n,this.commandOptions))}__init4() {this.bitop=(n,t,o,...m)=>this.chain(new f([n,t,o,...m],this.commandOptions))}__init5() {this.bitpos=(...n)=>this.chain(new y(n,this.commandOptions))}__init6() {this.copy=(...n)=>this.chain(new b(n,this.commandOptions))}__init7() {this.zdiffstore=(...n)=>this.chain(new ye(n,this.commandOptions))}__init8() {this.dbsize=()=>this.chain(new T(this.commandOptions))}__init9() {this.decr=(...n)=>this.chain(new O(n,this.commandOptions))}__init10() {this.decrby=(...n)=>this.chain(new w(n,this.commandOptions))}__init11() {this.del=(...n)=>this.chain(new D(n,this.commandOptions))}__init12() {this.echo=(...n)=>this.chain(new A(n,this.commandOptions))}__init13() {this.eval=(...n)=>this.chain(new k(n,this.commandOptions))}__init14() {this.evalsha=(...n)=>this.chain(new R(n,this.commandOptions))}__init15() {this.exists=(...n)=>this.chain(new S(n,this.commandOptions))}__init16() {this.expire=(...n)=>this.chain(new E(n,this.commandOptions))}__init17() {this.expireat=(...n)=>this.chain(new M(n,this.commandOptions))}__init18() {this.flushall=n=>this.chain(new v(n,this.commandOptions))}__init19() {this.flushdb=(...n)=>this.chain(new P(n,this.commandOptions))}__init20() {this.geoadd=(...n)=>this.chain(new I(n,this.commandOptions))}__init21() {this.geodist=(...n)=>this.chain(new N(n,this.commandOptions))}__init22() {this.geopos=(...n)=>this.chain(new z(n,this.commandOptions))}__init23() {this.geohash=(...n)=>this.chain(new L(n,this.commandOptions))}__init24() {this.geosearch=(...n)=>this.chain(new G(n,this.commandOptions))}__init25() {this.geosearchstore=(...n)=>this.chain(new K(n,this.commandOptions))}__init26() {this.get=(...n)=>this.chain(new X(n,this.commandOptions))}__init27() {this.getbit=(...n)=>this.chain(new J(n,this.commandOptions))}__init28() {this.getdel=(...n)=>this.chain(new U(n,this.commandOptions))}__init29() {this.getrange=(...n)=>this.chain(new Z(n,this.commandOptions))}__init30() {this.getset=(n,t)=>this.chain(new B([n,t],this.commandOptions))}__init31() {this.hdel=(...n)=>this.chain(new H(n,this.commandOptions))}__init32() {this.hexists=(...n)=>this.chain(new F(n,this.commandOptions))}__init33() {this.hget=(...n)=>this.chain(new $(n,this.commandOptions))}__init34() {this.hgetall=(...n)=>this.chain(new q(n,this.commandOptions))}__init35() {this.hincrby=(...n)=>this.chain(new j(n,this.commandOptions))}__init36() {this.hincrbyfloat=(...n)=>this.chain(new Y(n,this.commandOptions))}__init37() {this.hkeys=(...n)=>this.chain(new V(n,this.commandOptions))}__init38() {this.hlen=(...n)=>this.chain(new _(n,this.commandOptions))}__init39() {this.hmget=(...n)=>this.chain(new W(n,this.commandOptions))}__init40() {this.hmset=(n,t)=>this.chain(new Q([n,t],this.commandOptions))}__init41() {this.hrandfield=(n,t,o)=>this.chain(new nn([n,t,o],this.commandOptions))}__init42() {this.hscan=(...n)=>this.chain(new tn(n,this.commandOptions))}__init43() {this.hset=(n,t)=>this.chain(new en([n,t],this.commandOptions))}__init44() {this.hsetnx=(n,t,o)=>this.chain(new on([n,t,o],this.commandOptions))}__init45() {this.hstrlen=(...n)=>this.chain(new sn(n,this.commandOptions))}__init46() {this.hvals=(...n)=>this.chain(new mn(n,this.commandOptions))}__init47() {this.incr=(...n)=>this.chain(new rn(n,this.commandOptions))}__init48() {this.incrby=(...n)=>this.chain(new an(n,this.commandOptions))}__init49() {this.incrbyfloat=(...n)=>this.chain(new pn(n,this.commandOptions))}__init50() {this.keys=(...n)=>this.chain(new vn(n,this.commandOptions))}__init51() {this.lindex=(...n)=>this.chain(new Pn(n,this.commandOptions))}__init52() {this.linsert=(n,t,o,m)=>this.chain(new In([n,t,o,m],this.commandOptions))}__init53() {this.llen=(...n)=>this.chain(new Nn(n,this.commandOptions))}__init54() {this.lmove=(...n)=>this.chain(new Ln(n,this.commandOptions))}__init55() {this.lpop=(...n)=>this.chain(new zn(n,this.commandOptions))}__init56() {this.lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions))}__init57() {this.lpos=(...n)=>this.chain(new Kn(n,this.commandOptions))}__init58() {this.lpush=(n,...t)=>this.chain(new Xn([n,...t],this.commandOptions))}__init59() {this.lpushx=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions))}__init60() {this.lrange=(...n)=>this.chain(new Un(n,this.commandOptions))}__init61() {this.lrem=(n,t,o)=>this.chain(new Zn([n,t,o],this.commandOptions))}__init62() {this.lset=(n,t,o)=>this.chain(new Bn([n,t,o],this.commandOptions))}__init63() {this.ltrim=(...n)=>this.chain(new Hn(n,this.commandOptions))}__init64() {this.mget=(...n)=>this.chain(new Fn(n,this.commandOptions))}__init65() {this.mset=n=>this.chain(new $n([n],this.commandOptions))}__init66() {this.msetnx=n=>this.chain(new qn([n],this.commandOptions))}__init67() {this.persist=(...n)=>this.chain(new jn(n,this.commandOptions))}__init68() {this.pexpire=(...n)=>this.chain(new Yn(n,this.commandOptions))}__init69() {this.pexpireat=(...n)=>this.chain(new Vn(n,this.commandOptions))}__init70() {this.pfadd=(...n)=>this.chain(new _n(n,this.commandOptions))}__init71() {this.pfcount=(...n)=>this.chain(new Wn(n,this.commandOptions))}__init72() {this.pfmerge=(...n)=>this.chain(new Qn(n,this.commandOptions))}__init73() {this.ping=n=>this.chain(new nt(n,this.commandOptions))}__init74() {this.psetex=(n,t,o)=>this.chain(new tt([n,t,o],this.commandOptions))}__init75() {this.pttl=(...n)=>this.chain(new et(n,this.commandOptions))}__init76() {this.publish=(...n)=>this.chain(new ot(n,this.commandOptions))}__init77() {this.randomkey=()=>this.chain(new st(this.commandOptions))}__init78() {this.rename=(...n)=>this.chain(new mt(n,this.commandOptions))}__init79() {this.renamenx=(...n)=>this.chain(new rt(n,this.commandOptions))}__init80() {this.rpop=(...n)=>this.chain(new at(n,this.commandOptions))}__init81() {this.rpush=(n,...t)=>this.chain(new it([n,...t],this.commandOptions))}__init82() {this.rpushx=(n,...t)=>this.chain(new pt([n,...t],this.commandOptions))}__init83() {this.sadd=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions))}__init84() {this.scan=(...n)=>this.chain(new ct(n,this.commandOptions))}__init85() {this.scard=(...n)=>this.chain(new ut(n,this.commandOptions))}__init86() {this.scriptExists=(...n)=>this.chain(new lt(n,this.commandOptions))}__init87() {this.scriptFlush=(...n)=>this.chain(new ht(n,this.commandOptions))}__init88() {this.scriptLoad=(...n)=>this.chain(new Ct(n,this.commandOptions))}__init89() {this.sdiff=(...n)=>this.chain(new gt(n,this.commandOptions))}__init90() {this.sdiffstore=(...n)=>this.chain(new xt(n,this.commandOptions))}__init91() {this.set=(n,t,o)=>this.chain(new ft([n,t,o],this.commandOptions))}__init92() {this.setbit=(...n)=>this.chain(new yt(n,this.commandOptions))}__init93() {this.setex=(n,t,o)=>this.chain(new bt([n,t,o],this.commandOptions))}__init94() {this.setnx=(n,t)=>this.chain(new Tt([n,t],this.commandOptions))}__init95() {this.setrange=(...n)=>this.chain(new Ot(n,this.commandOptions))}__init96() {this.sinter=(...n)=>this.chain(new wt(n,this.commandOptions))}__init97() {this.sinterstore=(...n)=>this.chain(new Dt(n,this.commandOptions))}__init98() {this.sismember=(n,t)=>this.chain(new At([n,t],this.commandOptions))}__init99() {this.smembers=(...n)=>this.chain(new kt(n,this.commandOptions))}__init100() {this.smismember=(n,t)=>this.chain(new Rt([n,t],this.commandOptions))}__init101() {this.smove=(n,t,o)=>this.chain(new St([n,t,o],this.commandOptions))}__init102() {this.spop=(...n)=>this.chain(new Et(n,this.commandOptions))}__init103() {this.srandmember=(...n)=>this.chain(new Mt(n,this.commandOptions))}__init104() {this.srem=(n,...t)=>this.chain(new vt([n,...t],this.commandOptions))}__init105() {this.sscan=(...n)=>this.chain(new Pt(n,this.commandOptions))}__init106() {this.strlen=(...n)=>this.chain(new It(n,this.commandOptions))}__init107() {this.sunion=(...n)=>this.chain(new Nt(n,this.commandOptions))}__init108() {this.sunionstore=(...n)=>this.chain(new Lt(n,this.commandOptions))}__init109() {this.time=()=>this.chain(new zt(this.commandOptions))}__init110() {this.touch=(...n)=>this.chain(new Gt(n,this.commandOptions))}__init111() {this.ttl=(...n)=>this.chain(new Kt(n,this.commandOptions))}__init112() {this.type=(...n)=>this.chain(new Xt(n,this.commandOptions))}__init113() {this.unlink=(...n)=>this.chain(new Jt(n,this.commandOptions))}__init114() {this.zadd=(...n)=>"score"in n[1]?this.chain(new h([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new h([n[0],n[1],...n.slice(2)],this.commandOptions))}__init115() {this.xadd=(...n)=>this.chain(new Zt(n,this.commandOptions))}__init116() {this.xack=(...n)=>this.chain(new Ut(n,this.commandOptions))}__init117() {this.xdel=(...n)=>this.chain(new Ft(n,this.commandOptions))}__init118() {this.xgroup=(...n)=>this.chain(new $t(n,this.commandOptions))}__init119() {this.xread=(...n)=>this.chain(new _t(n,this.commandOptions))}__init120() {this.xreadgroup=(...n)=>this.chain(new Wt(n,this.commandOptions))}__init121() {this.xinfo=(...n)=>this.chain(new qt(n,this.commandOptions))}__init122() {this.xlen=(...n)=>this.chain(new jt(n,this.commandOptions))}__init123() {this.xpending=(...n)=>this.chain(new Yt(n,this.commandOptions))}__init124() {this.xclaim=(...n)=>this.chain(new Ht(n,this.commandOptions))}__init125() {this.xautoclaim=(...n)=>this.chain(new Bt(n,this.commandOptions))}__init126() {this.xtrim=(...n)=>this.chain(new ne(n,this.commandOptions))}__init127() {this.xrange=(...n)=>this.chain(new Vt(n,this.commandOptions))}__init128() {this.xrevrange=(...n)=>this.chain(new Qt(n,this.commandOptions))}__init129() {this.zcard=(...n)=>this.chain(new te(n,this.commandOptions))}__init130() {this.zcount=(...n)=>this.chain(new ee(n,this.commandOptions))}__init131() {this.zincrby=(n,t,o)=>this.chain(new oe([n,t,o],this.commandOptions))}__init132() {this.zinterstore=(...n)=>this.chain(new se(n,this.commandOptions))}__init133() {this.zlexcount=(...n)=>this.chain(new me(n,this.commandOptions))}__init134() {this.zmscore=(...n)=>this.chain(new be(n,this.commandOptions))}__init135() {this.zpopmax=(...n)=>this.chain(new re(n,this.commandOptions))}__init136() {this.zpopmin=(...n)=>this.chain(new ae(n,this.commandOptions))}__init137() {this.zrange=(...n)=>this.chain(new ie(n,this.commandOptions))}__init138() {this.zrank=(n,t)=>this.chain(new pe([n,t],this.commandOptions))}__init139() {this.zrem=(n,...t)=>this.chain(new de([n,...t],this.commandOptions))}__init140() {this.zremrangebylex=(...n)=>this.chain(new ce(n,this.commandOptions))}__init141() {this.zremrangebyrank=(...n)=>this.chain(new ue(n,this.commandOptions))}__init142() {this.zremrangebyscore=(...n)=>this.chain(new le(n,this.commandOptions))}__init143() {this.zrevrank=(n,t)=>this.chain(new he([n,t],this.commandOptions))}__init144() {this.zscan=(...n)=>this.chain(new Ce(n,this.commandOptions))}__init145() {this.zscore=(n,t)=>this.chain(new ge([n,t],this.commandOptions))}__init146() {this.zunionstore=(...n)=>this.chain(new fe(n,this.commandOptions))}__init147() {this.zunion=(...n)=>this.chain(new xe(n,this.commandOptions))}get json(){return{arrappend:(...n)=>this.chain(new dn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new cn(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new un(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new hn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new Cn(n,this.commandOptions)),clear:(...n)=>this.chain(new gn(n,this.commandOptions)),del:(...n)=>this.chain(new xn(n,this.commandOptions)),forget:(...n)=>this.chain(new fn(n,this.commandOptions)),get:(...n)=>this.chain(new yn(n,this.commandOptions)),mget:(...n)=>this.chain(new bn(n,this.commandOptions)),numincrby:(...n)=>this.chain(new Tn(n,this.commandOptions)),nummultby:(...n)=>this.chain(new On(n,this.commandOptions)),objkeys:(...n)=>this.chain(new wn(n,this.commandOptions)),objlen:(...n)=>this.chain(new Dn(n,this.commandOptions)),resp:(...n)=>this.chain(new An(n,this.commandOptions)),set:(...n)=>this.chain(new kn(n,this.commandOptions)),strappend:(...n)=>this.chain(new Rn(n,this.commandOptions)),strlen:(...n)=>this.chain(new Sn(n,this.commandOptions)),toggle:(...n)=>this.chain(new En(n,this.commandOptions)),type:(...n)=>this.chain(new Mn(n,this.commandOptions))}}}, _class);var _enchexjs = require('crypto-js/enc-hex.js'); var _enchexjs2 = _interopRequireDefault(_enchexjs);var _sha1js = require('crypto-js/sha1.js'); var _sha1js2 = _interopRequireDefault(_sha1js);var we=class{constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async m=>{if(m instanceof Error&&m.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw m})}digest(n){return _enchexjs2.default.stringify(_sha1js2.default.call(void 0, n))}};function Re(s,n){let t=s;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new ke(t)),new Proxy(t,{get:(o,m)=>m==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:m==="json"?Re(o,!0):m in o&&!(m in o.autoPipelineExecutor.pipeline)?o[m]:typeof o.autoPipelineExecutor.pipeline[m]=="function"?(...a)=>o.autoPipelineExecutor.withAutoPipeline(i=>{n?i.json[m](...a):i[m](...a)}):o.autoPipelineExecutor.pipeline[m]})}var ke= (_class2 =class{__init148() {this.pipelinePromises=new WeakMap}__init149() {this.activePipeline=null}__init150() {this.indexInCurrentPipeline=0}__init151() {this.pipelineCounter=0}constructor(n){;_class2.prototype.__init148.call(this);_class2.prototype.__init149.call(this);_class2.prototype.__init150.call(this);_class2.prototype.__init151.call(this);this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=this.activePipeline||this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){return await Promise.resolve(),await Promise.resolve()}}, _class2);var ve= (_class3 =class{constructor(n,t){;_class3.prototype.__init152.call(this);_class3.prototype.__init153.call(this);_class3.prototype.__init154.call(this);_class3.prototype.__init155.call(this);_class3.prototype.__init156.call(this);_class3.prototype.__init157.call(this);_class3.prototype.__init158.call(this);_class3.prototype.__init159.call(this);_class3.prototype.__init160.call(this);_class3.prototype.__init161.call(this);_class3.prototype.__init162.call(this);_class3.prototype.__init163.call(this);_class3.prototype.__init164.call(this);_class3.prototype.__init165.call(this);_class3.prototype.__init166.call(this);_class3.prototype.__init167.call(this);_class3.prototype.__init168.call(this);_class3.prototype.__init169.call(this);_class3.prototype.__init170.call(this);_class3.prototype.__init171.call(this);_class3.prototype.__init172.call(this);_class3.prototype.__init173.call(this);_class3.prototype.__init174.call(this);_class3.prototype.__init175.call(this);_class3.prototype.__init176.call(this);_class3.prototype.__init177.call(this);_class3.prototype.__init178.call(this);_class3.prototype.__init179.call(this);_class3.prototype.__init180.call(this);_class3.prototype.__init181.call(this);_class3.prototype.__init182.call(this);_class3.prototype.__init183.call(this);_class3.prototype.__init184.call(this);_class3.prototype.__init185.call(this);_class3.prototype.__init186.call(this);_class3.prototype.__init187.call(this);_class3.prototype.__init188.call(this);_class3.prototype.__init189.call(this);_class3.prototype.__init190.call(this);_class3.prototype.__init191.call(this);_class3.prototype.__init192.call(this);_class3.prototype.__init193.call(this);_class3.prototype.__init194.call(this);_class3.prototype.__init195.call(this);_class3.prototype.__init196.call(this);_class3.prototype.__init197.call(this);_class3.prototype.__init198.call(this);_class3.prototype.__init199.call(this);_class3.prototype.__init200.call(this);_class3.prototype.__init201.call(this);_class3.prototype.__init202.call(this);_class3.prototype.__init203.call(this);_class3.prototype.__init204.call(this);_class3.prototype.__init205.call(this);_class3.prototype.__init206.call(this);_class3.prototype.__init207.call(this);_class3.prototype.__init208.call(this);_class3.prototype.__init209.call(this);_class3.prototype.__init210.call(this);_class3.prototype.__init211.call(this);_class3.prototype.__init212.call(this);_class3.prototype.__init213.call(this);_class3.prototype.__init214.call(this);_class3.prototype.__init215.call(this);_class3.prototype.__init216.call(this);_class3.prototype.__init217.call(this);_class3.prototype.__init218.call(this);_class3.prototype.__init219.call(this);_class3.prototype.__init220.call(this);_class3.prototype.__init221.call(this);_class3.prototype.__init222.call(this);_class3.prototype.__init223.call(this);_class3.prototype.__init224.call(this);_class3.prototype.__init225.call(this);_class3.prototype.__init226.call(this);_class3.prototype.__init227.call(this);_class3.prototype.__init228.call(this);_class3.prototype.__init229.call(this);_class3.prototype.__init230.call(this);_class3.prototype.__init231.call(this);_class3.prototype.__init232.call(this);_class3.prototype.__init233.call(this);_class3.prototype.__init234.call(this);_class3.prototype.__init235.call(this);_class3.prototype.__init236.call(this);_class3.prototype.__init237.call(this);_class3.prototype.__init238.call(this);_class3.prototype.__init239.call(this);_class3.prototype.__init240.call(this);_class3.prototype.__init241.call(this);_class3.prototype.__init242.call(this);_class3.prototype.__init243.call(this);_class3.prototype.__init244.call(this);_class3.prototype.__init245.call(this);_class3.prototype.__init246.call(this);_class3.prototype.__init247.call(this);_class3.prototype.__init248.call(this);_class3.prototype.__init249.call(this);_class3.prototype.__init250.call(this);_class3.prototype.__init251.call(this);_class3.prototype.__init252.call(this);_class3.prototype.__init253.call(this);_class3.prototype.__init254.call(this);_class3.prototype.__init255.call(this);_class3.prototype.__init256.call(this);_class3.prototype.__init257.call(this);_class3.prototype.__init258.call(this);_class3.prototype.__init259.call(this);_class3.prototype.__init260.call(this);_class3.prototype.__init261.call(this);_class3.prototype.__init262.call(this);_class3.prototype.__init263.call(this);_class3.prototype.__init264.call(this);_class3.prototype.__init265.call(this);_class3.prototype.__init266.call(this);_class3.prototype.__init267.call(this);_class3.prototype.__init268.call(this);_class3.prototype.__init269.call(this);_class3.prototype.__init270.call(this);_class3.prototype.__init271.call(this);_class3.prototype.__init272.call(this);_class3.prototype.__init273.call(this);_class3.prototype.__init274.call(this);_class3.prototype.__init275.call(this);_class3.prototype.__init276.call(this);_class3.prototype.__init277.call(this);_class3.prototype.__init278.call(this);_class3.prototype.__init279.call(this);_class3.prototype.__init280.call(this);_class3.prototype.__init281.call(this);_class3.prototype.__init282.call(this);_class3.prototype.__init283.call(this);_class3.prototype.__init284.call(this);_class3.prototype.__init285.call(this);_class3.prototype.__init286.call(this);_class3.prototype.__init287.call(this);_class3.prototype.__init288.call(this);_class3.prototype.__init289.call(this);_class3.prototype.__init290.call(this);_class3.prototype.__init291.call(this);_class3.prototype.__init292.call(this);_class3.prototype.__init293.call(this);_class3.prototype.__init294.call(this);_class3.prototype.__init295.call(this);_class3.prototype.__init296.call(this);_class3.prototype.__init297.call(this);_class3.prototype.__init298.call(this);_class3.prototype.__init299.call(this);_class3.prototype.__init300.call(this);_class3.prototype.__init301.call(this);_class3.prototype.__init302.call(this);this.client=n,this.opts=t,this.enableTelemetry=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _79 => _79.enableTelemetry]), () => (!0)),this.enableAutoPipelining=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _80 => _80.enableAutoPipelining]), () => (!1))}get json(){return{arrappend:(...n)=>new dn(n,this.opts).exec(this.client),arrindex:(...n)=>new cn(n,this.opts).exec(this.client),arrinsert:(...n)=>new un(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new hn(n,this.opts).exec(this.client),arrtrim:(...n)=>new Cn(n,this.opts).exec(this.client),clear:(...n)=>new gn(n,this.opts).exec(this.client),del:(...n)=>new xn(n,this.opts).exec(this.client),forget:(...n)=>new fn(n,this.opts).exec(this.client),get:(...n)=>new yn(n,this.opts).exec(this.client),mget:(...n)=>new bn(n,this.opts).exec(this.client),numincrby:(...n)=>new Tn(n,this.opts).exec(this.client),nummultby:(...n)=>new On(n,this.opts).exec(this.client),objkeys:(...n)=>new wn(n,this.opts).exec(this.client),objlen:(...n)=>new Dn(n,this.opts).exec(this.client),resp:(...n)=>new An(n,this.opts).exec(this.client),set:(...n)=>new kn(n,this.opts).exec(this.client),strappend:(...n)=>new Rn(n,this.opts).exec(this.client),strlen:(...n)=>new Sn(n,this.opts).exec(this.client),toggle:(...n)=>new En(n,this.opts).exec(this.client),type:(...n)=>new Mn(n,this.opts).exec(this.client)}}__init152() {this.use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)}}__init153() {this.addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch (e13){}}}createScript(n){return new we(this,n)}__init154() {this.pipeline=()=>new Te({client:this.client,commandOptions:this.opts,multiExec:!1})}__init155() {this.autoPipeline=()=>Re(this)}__init156() {this.multi=()=>new Te({client:this.client,commandOptions:this.opts,multiExec:!0})}__init157() {this.append=(...n)=>new g(n,this.opts).exec(this.client)}__init158() {this.bitcount=(...n)=>new x(n,this.opts).exec(this.client)}__init159() {this.bitop=(n,t,o,...m)=>new f([n,t,o,...m],this.opts).exec(this.client)}__init160() {this.bitpos=(...n)=>new y(n,this.opts).exec(this.client)}__init161() {this.copy=(...n)=>new b(n,this.opts).exec(this.client)}__init162() {this.dbsize=()=>new T(this.opts).exec(this.client)}__init163() {this.decr=(...n)=>new O(n,this.opts).exec(this.client)}__init164() {this.decrby=(...n)=>new w(n,this.opts).exec(this.client)}__init165() {this.del=(...n)=>new D(n,this.opts).exec(this.client)}__init166() {this.echo=(...n)=>new A(n,this.opts).exec(this.client)}__init167() {this.eval=(...n)=>new k(n,this.opts).exec(this.client)}__init168() {this.evalsha=(...n)=>new R(n,this.opts).exec(this.client)}__init169() {this.exists=(...n)=>new S(n,this.opts).exec(this.client)}__init170() {this.expire=(...n)=>new E(n,this.opts).exec(this.client)}__init171() {this.expireat=(...n)=>new M(n,this.opts).exec(this.client)}__init172() {this.flushall=n=>new v(n,this.opts).exec(this.client)}__init173() {this.flushdb=(...n)=>new P(n,this.opts).exec(this.client)}__init174() {this.geoadd=(...n)=>new I(n,this.opts).exec(this.client)}__init175() {this.geopos=(...n)=>new z(n,this.opts).exec(this.client)}__init176() {this.geodist=(...n)=>new N(n,this.opts).exec(this.client)}__init177() {this.geohash=(...n)=>new L(n,this.opts).exec(this.client)}__init178() {this.geosearch=(...n)=>new G(n,this.opts).exec(this.client)}__init179() {this.geosearchstore=(...n)=>new K(n,this.opts).exec(this.client)}__init180() {this.get=(...n)=>new X(n,this.opts).exec(this.client)}__init181() {this.getbit=(...n)=>new J(n,this.opts).exec(this.client)}__init182() {this.getdel=(...n)=>new U(n,this.opts).exec(this.client)}__init183() {this.getrange=(...n)=>new Z(n,this.opts).exec(this.client)}__init184() {this.getset=(n,t)=>new B([n,t],this.opts).exec(this.client)}__init185() {this.hdel=(...n)=>new H(n,this.opts).exec(this.client)}__init186() {this.hexists=(...n)=>new F(n,this.opts).exec(this.client)}__init187() {this.hget=(...n)=>new $(n,this.opts).exec(this.client)}__init188() {this.hgetall=(...n)=>new q(n,this.opts).exec(this.client)}__init189() {this.hincrby=(...n)=>new j(n,this.opts).exec(this.client)}__init190() {this.hincrbyfloat=(...n)=>new Y(n,this.opts).exec(this.client)}__init191() {this.hkeys=(...n)=>new V(n,this.opts).exec(this.client)}__init192() {this.hlen=(...n)=>new _(n,this.opts).exec(this.client)}__init193() {this.hmget=(...n)=>new W(n,this.opts).exec(this.client)}__init194() {this.hmset=(n,t)=>new Q([n,t],this.opts).exec(this.client)}__init195() {this.hrandfield=(n,t,o)=>new nn([n,t,o],this.opts).exec(this.client)}__init196() {this.hscan=(...n)=>new tn(n,this.opts).exec(this.client)}__init197() {this.hset=(n,t)=>new en([n,t],this.opts).exec(this.client)}__init198() {this.hsetnx=(n,t,o)=>new on([n,t,o],this.opts).exec(this.client)}__init199() {this.hstrlen=(...n)=>new sn(n,this.opts).exec(this.client)}__init200() {this.hvals=(...n)=>new mn(n,this.opts).exec(this.client)}__init201() {this.incr=(...n)=>new rn(n,this.opts).exec(this.client)}__init202() {this.incrby=(...n)=>new an(n,this.opts).exec(this.client)}__init203() {this.incrbyfloat=(...n)=>new pn(n,this.opts).exec(this.client)}__init204() {this.keys=(...n)=>new vn(n,this.opts).exec(this.client)}__init205() {this.lindex=(...n)=>new Pn(n,this.opts).exec(this.client)}__init206() {this.linsert=(n,t,o,m)=>new In([n,t,o,m],this.opts).exec(this.client)}__init207() {this.llen=(...n)=>new Nn(n,this.opts).exec(this.client)}__init208() {this.lmove=(...n)=>new Ln(n,this.opts).exec(this.client)}__init209() {this.lpop=(...n)=>new zn(n,this.opts).exec(this.client)}__init210() {this.lmpop=(...n)=>new Gn(n,this.opts).exec(this.client)}__init211() {this.lpos=(...n)=>new Kn(n,this.opts).exec(this.client)}__init212() {this.lpush=(n,...t)=>new Xn([n,...t],this.opts).exec(this.client)}__init213() {this.lpushx=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client)}__init214() {this.lrange=(...n)=>new Un(n,this.opts).exec(this.client)}__init215() {this.lrem=(n,t,o)=>new Zn([n,t,o],this.opts).exec(this.client)}__init216() {this.lset=(n,t,o)=>new Bn([n,t,o],this.opts).exec(this.client)}__init217() {this.ltrim=(...n)=>new Hn(n,this.opts).exec(this.client)}__init218() {this.mget=(...n)=>new Fn(n,this.opts).exec(this.client)}__init219() {this.mset=n=>new $n([n],this.opts).exec(this.client)}__init220() {this.msetnx=n=>new qn([n],this.opts).exec(this.client)}__init221() {this.persist=(...n)=>new jn(n,this.opts).exec(this.client)}__init222() {this.pexpire=(...n)=>new Yn(n,this.opts).exec(this.client)}__init223() {this.pexpireat=(...n)=>new Vn(n,this.opts).exec(this.client)}__init224() {this.pfadd=(...n)=>new _n(n,this.opts).exec(this.client)}__init225() {this.pfcount=(...n)=>new Wn(n,this.opts).exec(this.client)}__init226() {this.pfmerge=(...n)=>new Qn(n,this.opts).exec(this.client)}__init227() {this.ping=n=>new nt(n,this.opts).exec(this.client)}__init228() {this.psetex=(n,t,o)=>new tt([n,t,o],this.opts).exec(this.client)}__init229() {this.pttl=(...n)=>new et(n,this.opts).exec(this.client)}__init230() {this.publish=(...n)=>new ot(n,this.opts).exec(this.client)}__init231() {this.randomkey=()=>new st().exec(this.client)}__init232() {this.rename=(...n)=>new mt(n,this.opts).exec(this.client)}__init233() {this.renamenx=(...n)=>new rt(n,this.opts).exec(this.client)}__init234() {this.rpop=(...n)=>new at(n,this.opts).exec(this.client)}__init235() {this.rpush=(n,...t)=>new it([n,...t],this.opts).exec(this.client)}__init236() {this.rpushx=(n,...t)=>new pt([n,...t],this.opts).exec(this.client)}__init237() {this.sadd=(n,...t)=>new dt([n,...t],this.opts).exec(this.client)}__init238() {this.scan=(...n)=>new ct(n,this.opts).exec(this.client)}__init239() {this.scard=(...n)=>new ut(n,this.opts).exec(this.client)}__init240() {this.scriptExists=(...n)=>new lt(n,this.opts).exec(this.client)}__init241() {this.scriptFlush=(...n)=>new ht(n,this.opts).exec(this.client)}__init242() {this.scriptLoad=(...n)=>new Ct(n,this.opts).exec(this.client)}__init243() {this.sdiff=(...n)=>new gt(n,this.opts).exec(this.client)}__init244() {this.sdiffstore=(...n)=>new xt(n,this.opts).exec(this.client)}__init245() {this.set=(n,t,o)=>new ft([n,t,o],this.opts).exec(this.client)}__init246() {this.setbit=(...n)=>new yt(n,this.opts).exec(this.client)}__init247() {this.setex=(n,t,o)=>new bt([n,t,o],this.opts).exec(this.client)}__init248() {this.setnx=(n,t)=>new Tt([n,t],this.opts).exec(this.client)}__init249() {this.setrange=(...n)=>new Ot(n,this.opts).exec(this.client)}__init250() {this.sinter=(...n)=>new wt(n,this.opts).exec(this.client)}__init251() {this.sinterstore=(...n)=>new Dt(n,this.opts).exec(this.client)}__init252() {this.sismember=(n,t)=>new At([n,t],this.opts).exec(this.client)}__init253() {this.smismember=(n,t)=>new Rt([n,t],this.opts).exec(this.client)}__init254() {this.smembers=(...n)=>new kt(n,this.opts).exec(this.client)}__init255() {this.smove=(n,t,o)=>new St([n,t,o],this.opts).exec(this.client)}__init256() {this.spop=(...n)=>new Et(n,this.opts).exec(this.client)}__init257() {this.srandmember=(...n)=>new Mt(n,this.opts).exec(this.client)}__init258() {this.srem=(n,...t)=>new vt([n,...t],this.opts).exec(this.client)}__init259() {this.sscan=(...n)=>new Pt(n,this.opts).exec(this.client)}__init260() {this.strlen=(...n)=>new It(n,this.opts).exec(this.client)}__init261() {this.sunion=(...n)=>new Nt(n,this.opts).exec(this.client)}__init262() {this.sunionstore=(...n)=>new Lt(n,this.opts).exec(this.client)}__init263() {this.time=()=>new zt().exec(this.client)}__init264() {this.touch=(...n)=>new Gt(n,this.opts).exec(this.client)}__init265() {this.ttl=(...n)=>new Kt(n,this.opts).exec(this.client)}__init266() {this.type=(...n)=>new Xt(n,this.opts).exec(this.client)}__init267() {this.unlink=(...n)=>new Jt(n,this.opts).exec(this.client)}__init268() {this.xadd=(...n)=>new Zt(n,this.opts).exec(this.client)}__init269() {this.xack=(...n)=>new Ut(n,this.opts).exec(this.client)}__init270() {this.xdel=(...n)=>new Ft(n,this.opts).exec(this.client)}__init271() {this.xgroup=(...n)=>new $t(n,this.opts).exec(this.client)}__init272() {this.xread=(...n)=>new _t(n,this.opts).exec(this.client)}__init273() {this.xreadgroup=(...n)=>new Wt(n,this.opts).exec(this.client)}__init274() {this.xinfo=(...n)=>new qt(n,this.opts).exec(this.client)}__init275() {this.xlen=(...n)=>new jt(n,this.opts).exec(this.client)}__init276() {this.xpending=(...n)=>new Yt(n,this.opts).exec(this.client)}__init277() {this.xclaim=(...n)=>new Ht(n,this.opts).exec(this.client)}__init278() {this.xautoclaim=(...n)=>new Bt(n,this.opts).exec(this.client)}__init279() {this.xtrim=(...n)=>new ne(n,this.opts).exec(this.client)}__init280() {this.xrange=(...n)=>new Vt(n,this.opts).exec(this.client)}__init281() {this.xrevrange=(...n)=>new Qt(n,this.opts).exec(this.client)}__init282() {this.zadd=(...n)=>"score"in n[1]?new h([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new h([n[0],n[1],...n.slice(2)],this.opts).exec(this.client)}__init283() {this.zcard=(...n)=>new te(n,this.opts).exec(this.client)}__init284() {this.zcount=(...n)=>new ee(n,this.opts).exec(this.client)}__init285() {this.zdiffstore=(...n)=>new ye(n,this.opts).exec(this.client)}__init286() {this.zincrby=(n,t,o)=>new oe([n,t,o],this.opts).exec(this.client)}__init287() {this.zinterstore=(...n)=>new se(n,this.opts).exec(this.client)}__init288() {this.zlexcount=(...n)=>new me(n,this.opts).exec(this.client)}__init289() {this.zmscore=(...n)=>new be(n,this.opts).exec(this.client)}__init290() {this.zpopmax=(...n)=>new re(n,this.opts).exec(this.client)}__init291() {this.zpopmin=(...n)=>new ae(n,this.opts).exec(this.client)}__init292() {this.zrange=(...n)=>new ie(n,this.opts).exec(this.client)}__init293() {this.zrank=(n,t)=>new pe([n,t],this.opts).exec(this.client)}__init294() {this.zrem=(n,...t)=>new de([n,...t],this.opts).exec(this.client)}__init295() {this.zremrangebylex=(...n)=>new ce(n,this.opts).exec(this.client)}__init296() {this.zremrangebyrank=(...n)=>new ue(n,this.opts).exec(this.client)}__init297() {this.zremrangebyscore=(...n)=>new le(n,this.opts).exec(this.client)}__init298() {this.zrevrank=(n,t)=>new he([n,t],this.opts).exec(this.client)}__init299() {this.zscan=(...n)=>new Ce(n,this.opts).exec(this.client)}__init300() {this.zscore=(n,t)=>new ge([n,t],this.opts).exec(this.client)}__init301() {this.zunion=(...n)=>new xe(n,this.opts).exec(this.client)}__init302() {this.zunionstore=(...n)=>new fe(n,this.opts).exec(this.client)}}, _class3);var qC="v1.31.6";exports.a = Se; exports.b = ve; exports.c = qC;