!function(e,t){if("object"!=typeof window[e])return;var r=window[e];const i="secondlog";if("optout"!=r.getPeachId()){var a=function(e){this.init(e)};(a.prototype={constant:{},property:{ready:!1,displayAbtestCardId:t+"",sendData:{},flagPrevent:{}},init:function(e){this.core=e,this.property.ready=!0,this.property.displayAbtestCardId=this.property.displayAbtestCardId.replace(/,/g,"")},isReady:function(){return!!this.property.ready}}).sendLog=async function(){if(!this.isReady())throw new Error("Disable send second log script");var e=null;this.core.getDevice()==this.core.constant.DEVICE_TYPE_PC||this.core.getDevice()==this.core.constant.DEVICE_TYPE_TABLET?e="PC":this.core.getDevice()==this.core.constant.DEVICE_TYPE_SMARTPHONE&&(e="スマートフォン"),this.core.getCanGetGaClientId()&&""===this.core.getGaClientId()&&(await this.core.wait(1500,"wait for GA ClientID"),""===this.core.getGaClientId()&&this.core.logging("GA ClientID get has timed out"));var t={access_source:this.core.getSessionReferrer(),age:r.validateObjectType(r.getUserCard().age,"number")&&0!=r.getUserCard().age?r.getUserCard().age:"",area:r.validateObjectType(r.getUserCard().placePref,"string")&&""!=r.getUserCard().placePref?r.getUserCard().placePref:"",carrot_id:"",cef:this.core.validateObjectType(this.core.getCookieStatus(),"object")&&this.core.validateObjectType(this.core.getCookieStatus().cookieWriteEnabled,"number")&&1==this.core.getCookieStatus().cookieWriteEnabled?1:0,client_status:0,cv:0,cookie:this.core.validateObjectType(this.core.getCookieStatus(),"object")&&this.core.validateObjectType(this.core.getCookieStatus().cookieWriteEnabled,"number")&&1==this.core.getCookieStatus().cookieWriteEnabled?document.cookie:"",created_at:"",dc_action:"getInfo/",device:e,etag:"",interest_t7:"",jid:this.core.getJuicerId(),ml_type:r.validateObjectType(r.getUserCard().mlType,"number")&&0!=r.getUserCard().mlType?r.getUserCard().mlType:"",lbc_ip:r.validateObjectType(r.getUserCard().lbcIp,"string")&&""!=r.getUserCard().lbcIp?r.getUserCard().lbcIp:"",org_name:r.validateObjectType(r.getUserCard().orgNameNormalize,"string")&&""!=r.getUserCard().orgNameNormalize?r.getUserCard().orgNameNormalize:"",org_name_org:r.validateObjectType(r.getUserCard().orgName,"string")&&""!=r.getUserCard().orgName?r.getUserCard().orgName:"",peach_id:this.core.getPeachId(),piaid:this.core.getPageInActionId(),referer:this.core.getReferrer(),scid:"",sid:this.core.getSiteId(),sesid:this.core.getSessionId(),sex:this.core.validateObjectType(this.core.getUserCard().sex,"number")&&this.core.validateObjectType(this.core.constant.SEX_TYPE_DATA[this.core.getUserCard().sex],"string")?this.core.getUserCard().sex:0,status:"",temperature:null,tcid:this.core.getTdClientId(),tgid:this.core.getTdGlobalId(),timestamp:""!=this.core.getTime()&&0!=this.core.getTime()?Math.floor(this.core.getTime()/1e3):"",title:this.core.getTitle(),ua:this.core.getUserAgent(),uid:this.core.getUserId(),url:this.core.getUrl(),place:r.validateObjectType(r.getUserCard().placePref,"string")&&""!=r.getUserCard().placePref?r.getUserCard().placePref:"",place_city:r.validateObjectType(r.getUserCard().placeCity,"string")&&""!=r.getUserCard().placeCity?r.getUserCard().placeCity:"",place_city_id:r.validateObjectType(r.getUserCard().placeCityId,"string")||r.validateObjectType(r.getUserCard().placeCityId,"number")?r.getUserCard().placeCityId:"",place_pref:r.validateObjectType(r.getUserCard().placePref,"string")&&""!=r.getUserCard().placePref?r.getUserCard().placePref:"",place_pref_id:r.validateObjectType(r.getUserCard().placePrefId,"string")||r.validateObjectType(r.getUserCard().placePrefId,"number")?r.getUserCard().placePrefId:"",txt1:"",txt2:"",visit:0,weather:null,wid:this.core.getSiteId(),vts:""!=this.core.getTime()&&0!=this.core.getTime()?Math.floor(this.core.getTime()/1e3):"",im_uid:this.core.getImuid(),ga_clientid:this.core.getGaClientId()};t.men=1==t.sex?1:0,t.woman=2==t.sex?1:0,t.gender=this.core.validateObjectType(this.core.getUserCard().sex,"number")&&this.core.validateObjectType(this.core.constant.SEX_TYPE_DATA[this.core.getUserCard().sex],"string")?this.core.constant.SEX_TYPE_DATA[this.core.getUserCard().sex]:"",t.pc="PC"==t.device?1:0,t.sp="スマートフォン"==t.device?1:0,t.use_ip_api=this.core.validateObjectType(this.core.getUserCard().ipInfoResource,"string")&&this.core.getUserCard().ipInfoResource.toLowerCase().match(/^(dokodokojp|landscape|)$/)?this.core.getUserCard().ipInfoResource.toLowerCase():"",t.jduf=0,this.core.getDevice()==this.core.constant.DEVICE_TYPE_PC&&(t.jduf=1),this.core.getDevice()==this.core.constant.DEVICE_TYPE_TABLET&&(t.jduf=2),this.core.getDevice()==this.core.constant.DEVICE_TYPE_SMARTPHONE&&(t.jduf=3);var a={id:"",pageInfoId:"",testType:"",displayCardData:{}};this.core.validateObjectType(this.core.getConfig().abtestInfo,"object")&&(this.core.validateObjectType(this.core.getConfig().abtestInfo.id,"number")||this.core.validateObjectType(this.core.getConfig().abtestInfo.id,"string"))&&(a.id=this.core.getConfig().abtestInfo.id),this.core.validateObjectType(this.core.getConfig().abtestInfo,"object")&&(this.core.validateObjectType(this.core.getConfig().abtestInfo.pageInfoId,"number")||this.core.validateObjectType(this.core.getConfig().abtestInfo.pageInfoId,"string"))&&(a.pageInfoId=this.core.getConfig().abtestInfo.pageInfoId),this.core.validateObjectType(this.core.getConfig().abtestInfo,"object")&&(this.core.validateObjectType(this.core.getConfig().abtestInfo.testType,"number")||this.core.validateObjectType(this.core.getConfig().abtestInfo.testType,"string"))&&(a.testType=this.core.getConfig().abtestInfo.testType),this.core.validateObjectType(this.core.getConfig().abtestInfo,"object")&&this.core.validateObjectType(this.core.getConfig().abtestInfo.cards,"object")&&this.core.validateObjectType(this.core.getConfig().abtestInfo.cards[this.property.displayAbtestCardId],"object")&&(a.displayCardData=this.core.getConfig().abtestInfo.cards[this.property.displayAbtestCardId]),t.log_type=""!=a.id?"ab":"tran",t.action_type="view",t.testid=a.id,t.pid=a.pageInfoId,t.acid=0!=this.property.displayAbtestCardId?this.property.displayAbtestCardId:"",t.test_type=a.testType,t.image=1==a.testType&&this.core.validateObjectType(a.displayCardData.value,"string")?a.displayCardData.value:"",t.link=this.core.validateObjectType(a.displayCardData.urlRef,"string")?a.displayCardData.urlRef:"",t.interest_id=this.core.validateObjectType(this.core.getInterestCategoryDefault().categoryId,"number")||this.core.validateObjectType(this.core.getInterestCategoryDefault().categoryId,"string")?this.core.getInterestCategoryDefault().categoryId:"",t.interest_action_score=this.core.validateObjectType(this.core.getInterestCategoryDefault().score,"number")||this.core.validateObjectType(this.core.getInterestCategoryDefault().score,"string")?this.core.getInterestCategoryDefault().score:0,t.site_category_id_n4=this.core.validateObjectType(this.core.getInterestCategoryDefault().categoryId,"number")||this.core.validateObjectType(this.core.getInterestCategoryDefault().categoryId,"string")?this.core.getInterestCategoryDefault().categoryId:"";try{var s=this.core.factoryTresureDataSdkInstance({host:this.core.getTdData().host,database:this.core.getTdData().database,writeKey:this.core.getTdData().apikey});s.set(this.core.constant.TD_TABLE_SECOND_LOG,t),s.trackPageview(this.core.constant.TD_TABLE_SECOND_LOG,(function(){r.logging("complete send second log :: "+r.constant.TD_TABLE_SECOND_LOG)}))}catch(e){this.core.errorReport(e,i),this.core.logging(e),this.property.ready}return this},r.executeAsync((function(){try{new a(r).sendLog().catch((function(e){r.errorReport(e,i),r.logging(e)}))}catch(e){r.errorReport(e,i),r.logging(e)}}))}else r.logging("Tracking is disabled")}("__kit__plOjbscKzGs=","0");