var __awaiter=this&&this.__awaiter||function(e,r,t,n){function a(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?t(e.value):a(e.value).then(i,s)}c((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(r){return c([e,r])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(t)try{if(n=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:t.label++;return{value:i[1],done:false};case 5:t.label++;a=i[1];i=[0];continue;case 7:i=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){t=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){t.label=i[1];break}if(i[0]===6&&t.label<o[1]){t.label=o[1];o=i;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(i);break}if(o[2])t.ops.pop();t.trys.pop();continue}i=r.call(e,t)}catch(e){i=[6,e];a=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,r){for(var t=0,n=r.length,a=e.length;t<n;t++,a++)e[a]=r[t];return e};import{a as Connection}from"./Item-f4cbd6f4.js";function open(e,r,t){return __awaiter(this,void 0,void 0,(function(){var t,n;return __generator(this,(function(a){switch(a.label){case 0:n=e;switch(n){case"authorization":return[3,1];case"verification":return[3,3];case"settlement":return[3,5];case"merchant":return[3,7];case"card":return[3,9];case"contact":return[3,11];case"customer":return[3,13];case"order":return[3,15];case"log":return[3,17];case"me":return[3,19]}return[3,21];case 1:return[4,import("./Authorization-422ef77e.js")];case 2:t=new(a.sent().Authorization)(r);return[3,21];case 3:return[4,import("./Verification-6875d5fd.js")];case 4:t=new(a.sent().Verification)(r);return[3,21];case 5:return[4,import("./Settlement-0a6dfd69.js")];case 6:t=new(a.sent().Settlement)(r);return[3,21];case 7:return[4,import("./Merchant-cee69257.js")];case 8:t=new(a.sent().Merchant)(r);return[3,21];case 9:return[4,import("./Card-91e9d033.js")];case 10:t=new(a.sent().Card)(r);return[3,21];case 11:return[4,import("./Contact-57f6ed73.js")];case 12:t=new(a.sent().Contact)(r);return[3,21];case 13:return[4,import("./Customer-4111111d.js")];case 14:t=new(a.sent().Customer)(r);return[3,21];case 15:return[4,import("./Order-eb27c503.js")];case 16:t=new(a.sent().Order)(r);return[3,21];case 17:return[4,import("./Log-8f0ed1a6.js")];case 18:t=new(a.sent().Log)(r);return[3,21];case 19:return[4,import("./Me-5ff07213.js")];case 20:t=new(a.sent().Me)(r);return[3,21];case 21:return[2,t]}}))}))}var Client;(function(e){var r;(function(e){e.acquirer=["authorization","merchant","verification","settlement"];e.card=["card"];e.log=["log"];e.psp=["order","customer","me","contact"];e.values=__spreadArray(__spreadArray(__spreadArray(__spreadArray([],e.acquirer),e.card),e.log),e.psp);function r(r){return typeof r=="string"&&e.values.includes(r)}e.is=r;e.open=open})(r=e.Subset||(e.Subset={}));function t(e,t){var n=[];for(var a=2;a<arguments.length;a++){n[a-2]=arguments[a]}return __awaiter(this,void 0,void 0,(function(){var a,o,i;var s=this;return __generator(this,(function(c){switch(c.label){case 0:a=Connection.open(e,t);i=(o=Object).fromEntries;return[4,Promise.all(n.map((function(t){return __awaiter(s,void 0,void 0,(function(){var n;return __generator(this,(function(o){switch(o.label){case 0:n=[t];return[4,r.open(t,a,e)];case 1:return[2,n.concat([o.sent()])]}}))}))})))];case 1:return[2,i.apply(o,[c.sent()])]}}))}))}e.open=t})(Client||(Client={}));export{Client as C};