PageSourceSearch

https://www.top-selection.co.jp/wp-content/plugins/wp-only1-integr…goodbet-only1-custom-page.js?ver=1791284316

js top-selection.co.jp collected 2026-10-06 10:58:55 UTC 12,435 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e,t={264:(e,t,n)=>{var r=n(960),o=n(284),i=n(237),a=jQuery;a((function(){s.init()}));var s=function(){function e(){}return e.init=function(){i.GoodbetOnly1.listenToEvent(i.GoodbetOnly1.EVENT_CUSTOM_PAGE_READY,(function(){a("#goodbet-custom_loading").fadeOut()})),o.SetIframeHeight.init(),r.InterFramesApi.init()},e}()},237:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GoodbetOnly1=void 0;var n=jQuery;!function(e){e.EVENT_CUSTOM_PAGE_READY="custom-page-ready";var t=n(window);e.fireEvent=function(e,n){n?(JSON.stringify(n),t.trigger(e,n)):t.trigger(e)},e.listenToEvent=function(e,n){t.on(e,n)},e.unregisterEventListener=function(e,n){t.off(e,n)}}(t.GoodbetOnly1||(t.GoodbetOnly1={}))},960:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.InterFramesApi=void 0;var a=n(284),s=n(237),u=n(378),c=jQuery;!function(e){var t,n,l="form.cart",d=".single_add_to_cart_button",f=-32601,p="response-received",h=0,m=!1,g=!1,v=!1,_=null,b=!1,E="";function y(e,t){void 0===t&&(t="*");var n=document.getElementById("goodbet-custom_iframe");n instanceof HTMLIFrameElement?n.contentWindow.postMessage(e,t):console.error("InterFramesApi target is not HTMLIFrameElement object. Suspicious wrong implementation.")}function w(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(m)return[3,5];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,S({method:n.IS_RPC_READY})];case 2:return t.sent().result.isReady&&(m=!0,s.GoodbetOnly1.fireEvent(s.GoodbetOnly1.EVENT_CUSTOM_PAGE_READY),R()),[3,4];case 3:return e=t.sent(),console.error("Error on RPC handshake: "),function(e){e.data.error.code;_=e.data.error.code,v=!0}(e),[3,4];case 4:t.label=5;case 5:return[2]}}
1))}))}function O(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(g||!m)return[2];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,S({method:n.GET_CONSOLE_BOTTOM_ROW1_HEIGHT})];case 2:return e=t.sent(),a.SetIframeHeight.updateConsoleBottomRow1Height(Number(e.result.row1Height)),g=!0,[3,4];case 3:return t.sent(),console.warn("Error getting console bottom height in iframe. This is expected with SECOND."),[3,4];case 4:return[2]}}))}))}function S(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){return e.id=++h,t=new Promise((function(t,n){var o=p+"."+e.id;s.GoodbetOnly1.listenToEvent(o,(function(i,a){var u=a;(function(e){return null!==e&&"object"===r(e)&&"number"==typeof e.id})(u)&&u.id==e.id&&(s.GoodbetOnly1.unregisterEventListener(o,this),null!=u.error?n(new Error(u.error.message)):t(u))}))})),JSON.stringify(e),y(e),[2,t]}))}))}function T(e,t,n,r){void 0===r&&(r="*");var o={result:e,error:t,id:n};JSON.stringify(o),y(o,r)}function I(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r=""),o(this,void 0,void 0,(function(){return i(this,(function(o){return[2,new Promise((function(o,i){c.ajax({type:"POST",url:only1AjaxUrl,data:{action:"get_design_url",productId:e,designId:t,customText:n,previewType:r,nonce:only1AjaxNonce},success:function(e){o(e)},error:function(e){i(e),alert(e.responseText)}})}))]}))}))}function R(){c(l).find(d).prop("disabled",!1)}e.init=function(){return o(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e=document.getElementById("goodbet-custom_iframe"))&&e instanceof HTMLIFrameElement?(E=c("meta[name=wc-product-id]").attr("content"),(h=c(l)).find(d).prop("disabled",!0),h.on("submit",(function(e){return o(this,void 0,void 0,(function(){var t,r,o,a;return i(this,(function(i){switch(i.label){case 0:if(b)return b=!1,[2];if(t=c(document.activeElement),e.preventDefault(),(r=c(l)).remove("input[name='gbc-design']"),r.remove("input[name='gbc-price']"),v)return alert("カートに追加できませんでした。ページをリロードしてください。\n(code: "+_+")"),_=null,v=!1,[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,S({method:n.GET_CURRENT_DESIGN})];case 2:return function(e,t,n){void 0===n&&(n=null);var r=c(l),o=r.find(d);null===n||n===String(o.val())?null==e||e.length<=0?alert("デザインデータが正常に取得されずカートに追加できませんでした。ページをリロードしてやり直してください。"):isNaN(parseFloat(t))?alert("価格情報の取得でエラーが発生しカートに追加できませんでした。ページをリロードしてやり直してください。"):(r.append("<input type='hidden' name='gbc-design' value='"+e+"'>"),r.append("<input type='hidden' name='gbc-price' value='"+t+"'>"),b=!0,o.click()):alert("商品IDが正しくないためカートに追加できません。ページをリロードしてください。")}((o=i.sent()).result.design,o.result.price),[3,4];case 3:return a=i.sent(),console.warn("Error on RPC getCurrentDesign request"),alert(a.message),t.removeClass("loading disabled"),t.removeAttr("disabled"),[3,4];case 4:return[2]}}
1))}))})),window.addEventListener("message",(function(e){JSON.stringify(e.data),null!=e.data.method?function(e){e.data;var n,r,o,i,l,d=e.data;switch(e.data.method){case t.NOTIFY_GBC_READY:m=!0,O().finally((function(){s.GoodbetOnly1.fireEvent(s.GoodbetOnly1.EVENT_CUSTOM_PAGE_READY),R()}));break;case t.ADD_TO_CART:!function(e,t,n){var r={"add-to-cart":n,"gbc-design":e,"gbc-price":t},o=window.location.href.split(/[?#]/)[0];window.location.href=o+"?"+c.param(r)}((n=e.data.params).design,n.price,n.productId);break;case t.GO_TO_DESIGN:n=e.data.params,r=n.productId,o=n.designId,i=n.previewType,l=n.customText,I(r,o,i,l).then((function(e){return window.location.href=e})).catch((function(e){return alert(e.responseText)}));break;case t.GET_DESIGN_URL:!function(e){var t=String(e.params.productId),n=String(e.params.designId),r=null!=e.params.previewType?String(e.params.previewType):null,o=null!=e.params.customText?Object(e.params.customText):null;I(t,n,o,r).then((function(t){return T({designUrl:t},null,e.id)})).catch((function(e){return alert(e.responseText)}))}(d);break;case t.SET_IFRAME_HEIGHT:!function(e){a.SetIframeHeight.updateConsoleBottomRow1Height(Number(e.params.consoleBottomRow1Height)),g=!0}(d);break;case t.SAVE_DESIGN:!function(e){if(e.params&&e.params.designStr){var t=e.params.designStr.toString(),n="gbc_design_"+E,r=location.pathname.split("/",4).join("/");"http:"===location.protocol?u.set(n,t,{path:r}):u.set(n,t,{secure:!0,sameSite:"none",path:r})}else console.error("Invalid parameters in Inter-Frame API saveDesign method call.")}(d);break;default:var p="Frontend API method not found. Requested '"+e.data.method+"'. Don't handle methods outside of InterFramesApi class. Handle it from InterFramesApi.handleRequest.";console.error(p),T(null,{code:f,message:"メソッドが見つかりませんでした。"},d.id)}}(e):function(e){var t=e.data;JSON.stringify(t);var n=p+"."+t.id;s.GoodbetOnly1.fireEvent(n,t)}(e)})),[4,w()]):[2];case 1:return r.sent(),O(),[2]}var h}))}))},function(e){e.NOTIFY_GBC_READY="notifyGbcReady",e.ADD_TO_CART="addToCart",e.GO_TO_DESIGN="goToDesign",e.GET_DESIGN_URL="getDesignUrl",e.SET_IFRAME_HEIGHT="setIframeHeight",e.SAVE_DESIGN="saveDesign"}(t||(t={})),function(e){e.IS_RPC_READY="isRpcReady",e.GET_CURRENT_DESIGN="getCurrentDesign",e.GET_CONSOLE_BOTTOM_ROW1_HEIGHT="getConsoleBottomRow1Height"}(n||(n={}))}(t.InterFramesApi||(t.InterFramesApi={}))},284:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SetIframeHeight=void 0;var n=jQuery,r=function(){function e(){}return e.init=function(){var e=this;this.windowSize=this.getWindowSize(),e.setHeight(),window.addEventListener("orientationchange",(function(){e.windowSize=e.changeWindowSize(),e.setHeight()}))},e.updateConsoleBottomRow1Height=function(e){this.consoleBottomRow1Height=e,this.setHeight()},e.setHeight=function(){n(this.SEL_GBC_IFRAME).css("height",this.getIframeHeight(this.windowSize.outerWidth,this.windowSize.outerHeight))},e.getWindowSize=function(){return{outerWidth:window.outerWidth||0,outerHeight:window.outerHeight||0}},e.changeWindowSize=function(){return{outerWidth:this.windowSize.outerHeight,outerHeight:this.windowSize.outerWidth}},e.getIframeHeight=function(e,t){if(0!=e&&0!=t)return e>=992?opt.page_height:e+this.consoleBottomRow1Height+t*this.CONSOLE_BOTTOM_ROW2_HEIGHT_RATIO+"px"},e.SEL_GBC_IFRAME="iframe#goodbet-custom_iframe",e.CONSOLE_BOTTOM_ROW2_HEIGHT_RATIO=.06,e.consoleBottomRow1Height=130,e}();t.SetIframeHeight=r},378:function(e,t){var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),a=i.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));
1try{t[i[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(e){}}return t}function a(){return i(document.cookie)}function s(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}},296:()=>{}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(l=0;l<e.length;l++){for(var[n,o,i]=e[l],s=!0,u=0;u<n.length;u++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[u])))?n.splice(u--,1):(s=!1,i<a&&(a=i));if(s){e.splice(l--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={549:0,804:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,s,u]=n,c=0;if(a.some((t=>0!==e[t]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(u)var l=u(r)}for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[a[c]]=0;return r.O(l)},n=self.webpackChunkonly1_integration_woocommerce=self.webpackChunkonly1_integration_woocommerce||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),r.O(void 0,[804],(()=>r(264)));var o=r.O(void 0,[804],(()=>r(296)));o=r.O(o)})();

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.