PageSourceSearch

https://cdn.siroko.com/front_build/4134.b3d540aec70a.js

js siroko.com collected 2026-10-02 04:54:24 UTC 16,010 bytes, 2 lines download raw bytes

vendor: 4,130 bytes, lines 1-2
1/*! For license information please see 4134.b3d540aec70a.js.LICENSE.txt */
2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[4134],{4134:(t,e,r)=>{r.r(e),r.d(e,{default:()=>w});r(52675),r(89463),r(66412),r(2259),r(45700),r(78125),r(28706),r(51629),r(23418),r(64346),r(23792),r(94490),r(34782),r(15086),r(60739),r(89572),r(23288),r(94170),r(62010),r(4731),r(60479),r(2892),r(9868),r(59904),r(84185),r(40875),r(10287),r(26099),r(3362),r(60825),r(27495),r(38781),r(47764),r(23500),r(62953);var n=r(76234),o=r(40430),i=r(31768);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return c}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function s(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function x(){}var E={};l(E,c,(function(){return this}));var S=Object.getPrototypeOf,P=S&&S(S(M([])));P&&P!==r&&n.call(P,c)&&(E=P);var O=x.prototype=b.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,c,u){var s=p(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}
vendor: 5,238 bytes, line 2
2for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=_(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?m:d,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function _(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,_(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=x,o(O,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(L.prototype),l(L.prototype,u,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),l(O,s,"Generator"),l(O,c,(function(){return this})),l(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=M,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function p(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
2(t,"string");return"symbol"==a(e)?e:e+""}function y(t,e,r){return e=v(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],v(t).constructor):e.apply(t,r))}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function v(t){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},v(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},b=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),y(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),r=e,(n=[{key:"connect",value:function(){return g(this,void 0,void 0,f().mark((function t(){var e,r,n,a=this;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.fetchPaymentMethods();case 2:return t.t0=t.sent,t.t1=this.handleError.bind(this),t.t2=function(t,e,r){return g(a,void 0,void 0,f().mark((function e(){return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,i.mr)();case 3:r.resolve(t),e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(0),e.next=10,r.reject();case 10:return e.prev=10,e.finish(10);case 12:case"end":return e.stop()}}),e,null,[[0,6,10,12]])})))},t.t3={value:100*this.totalValue,currency:this.currencyValue},t.t4={storedCard:{hideCVC:!0,showPayButton:!0,showBrandIcon:!0,showBrandsUnderCardNumber:!0},googlepay:{buttonType:"plain",buttonRadius:2}},this.configuration={environment:"test",clientKey:"test_CNEQGZ7V3FCKPKCMW67VIVY3KM6DLOS4",paymentMethodsResponse:t.t0,onError:t.t1,beforeSubmit:t.t2,amount:t.t3,showPayButton:!0,paymentMethodsConfiguration:t.t4},t.next=10,(0,o.A)(this.configuration);case 10:e=t.sent,window.ApplePaySession&&ApplePaySession.canMakePayments()&&e.create("applepay",{showPayButton:!0,onAuthorized:this.handlePaymentAuthorized.bind(this)}).mount(this.applepayTarget),this.isGooglePayAvailable()&&(r={buttonColor:"white",buttonType:"short",buttonSizeMode:"fill",buttonRadius:2,merchantName:"Siroko",gatewayMerchantId:"SIROKOECOM",merchantId:"TEST",onClick:this.createOrder.bind(this),onAuthorized:this.handlePaymentAuthorized.bind(this),isExpress:!0,transactionInfo:{displayItems:[{label:"Subtotal",type:"SUBTOTAL",price:this.subtotalValue.toFixed(2)},{label:"Shipping",type:"LINE_ITEM",price:this.shippingValue.toFixed(2)}],countryCode:this.countryValue,currencyCode:this.currencyValue,totalPriceStatus:"FINAL",totalPrice:this.totalValue.toFixed(2),totalPriceLabel:"Total"}},e.create("googlepay",r).mount(this.googlepayTarget)),console.log(e.paymentMethodsResponse),console.log(e.paymentMethodsResponse.storedPaymentMethods),e.paymentMethodsResponse.storedPaymentMethods.length>0&&(n=e.paymentMethodsResponse.storedPaymentMethods[0],e.create("card",n).mount(this.storedcardsTarget));case 16:case"end":return t.stop()}}),t,this)})))}},{key:"isGooglePayAvailable",value:function(){return(this.configuration.paymentMethodsResponse.paymentMethods||[]).some((function(t){return"googlepay"===t.type}))}},{key:"fetchPaymentMethods",value:function(){return g(this,void 0,void 0,f().mark((function t(){var e;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/api/payment-methods",{method:"GET"});case 2:if((e=t.sent).ok){t.next=5;break}throw new Error("Failed to fetch payment methods");case 5:return t.abrupt("return",e.json());case 6:case"end":return t.stop()}}),t)})))}},{key:"createOrder",value:function(t,e){return g(this,void 0,void 0,f().mark((function r(){var n,o,i,a,s,l,h,p,y,d,v,m,g,b;return f().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.prev=0,(o=new FormData).append("payment_method","paypal_express"),o.append("selectedAddressId",this.shippingAddressIdValue||""),o.append("customerId",this.customerIdValue||""),(i=document.querySelector("input.js-shipping-option:checked"))&&console.log(i.value),a=null==i?void 0:i.value,o.append("shippingZoneModeRelationshipId",a||this.shippingModeIdValue),(s=document.querySelector("#my-wallet"))&&o.append("redeem_wallet",s.value),l=u(o.entries());try{for(l.s();!(h=l.n()).done;)p=c(h.value,2),y=p[0],d=p[1],console.log("".concat(y,": ").concat(d))}catch(t){l.e(t)}finally{l.f()}return r.next=15,fetch("/express/payment",{method:"POST",body:o});case 15:return v=r.sent,r.next=18,v.json();case 18:if(m=r.sent,this.successUrl=m.successUrl,m.id){r.next=25;break}throw g=null===(n=m.details)||void 0===n?void 0:n[0],b=g?"".concat(g.issue," ").concat(g.description," (").concat(m.debug_id,")"):"Unexpected error occurred, please try again.",e(b),new Error(b);case 25:return t(),r.abrupt("return",m.id);case 29:throw r.prev=29,r.t0=r.catch(0),console.error("Error creating order:",r.t0),r.t0;case 33:case"end":return r.stop()}}),r,this,[[0,29]])}
2)))}},{key:"handlePayment",value:function(t,e){alert("Procesando pago..."),fetch("/api/initiate-payment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.data)}).then((function(t){return t.json()})).then((function(t){t.action?e.handleAction(t.action):console.log("Pago completado:",t)})).catch((function(t){return console.error("Error en el pago:",t)}))}},{key:"handleError",value:function(t){console.error("Error con el componente de pago:",t)}},{key:"handlePaymentAuthorized",value:function(t,e){window.location.href=this.successUrl,t()}}])&&h(r.prototype,n),a&&h(r,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,a}(n.Controller);b.targets=["applepay","googlepay","amazonpay","storedcards"],b.values={subtotal:Number,shipping:Number,total:Number,country:String,currency:String,customerId:String,shippingAddressId:String,shippingModeId:String};const w=b}}]);

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