티스토리 수익 글 보기

티스토리 수익 글 보기

var mt=Object.defineProperty;var yt=(t,e,r)=>e in t?mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var s=(t,e,r)=>(yt(t,typeof e!=”symbol”?e+””:e,r),r);function Ke(){import.meta.url,import(“_”).catch(()=>1),async function*(){}().next()}class X{constructor(e){s(this,”newInstance”,()=>(window.TiaraTracker.initTracker(),window.TiaraTracker.getInstance()));s(this,”setCustomProps”,e=>(this.TiaraInstance.customProps(e),this.customProps=e,this));s(this,”setSection”,e=>(this.TiaraInstance.setSection(e),this.section=e,this));s(this,”setPage”,e=>(this.TiaraInstance.setPage(e),this.page=e,this));s(this,”setUrl”,e=>(this.TiaraInstance.setUrl(e),this.url=e,this));s(this,”setReferrer”,e=>(this.TiaraInstance.setReferrer(e),this.referrer=e,this));s(this,”setPageMeta”,e=>(this.TiaraInstance.pageMeta(e),this.pageMeta=e,this));s(this,”setTitle”,e=>(this.TiaraInstance.setTitle(e),this.title=e,this));s(this,”setKakaoAppKey”,e=>(this.TiaraInstance.setKakaoAppKey(e),this.kakaoAppKey=e,this));s(this,”setAppUserId”,e=>e===”null”?this:(this.TiaraInstance.setAppUserId(e),this.appUserId=e,this));s(this,”start”,e=>(this.TiaraInstance.trackPage(e),this.TiaraInstance.setAutoClick(!0),this.TiaraInstance.track(),this));var n,i;this.TiaraInstance=this.newInstance(),this.svcDomain=e;const r=(i=(n=window.T)==null?void 0:n.config)==null?void 0:i.PHASE;this.TiaraInstance.init({svcDomain:e,adTrackId:!1,enableAlwaysHttpPost:!1,disableSendLegacy:!0,enableHash:!0,disableQuery:!1,trackDomain:””,deployment:r===”local”?”dev”:r===”prod”?”production”:r,autoClick:!1,kakaoAppKey:””,appUserId:””})}}class vt{constructor(){s(this,”get”,()=>this.value);s(this,”setId”,e=>(this.value.id=e,this));s(this,”setType”,e=>(this.value.type=e,this));s(this,”setName”,e=>(this.value.name=e,this));s(this,”setCategory”,e=>(this.value.category=e,this));s(this,”setCategoryId”,e=>(this.value.category_id=e,this));s(this,”setAuthor”,e=>(this.value.author=e,this));s(this,”setAuthorId”,e=>(this.value.author_id=e,this));s(this,”setImage”,e=>(this.value.image=e,this));s(this,”setPlink”,e=>(this.value.plink=e,this));s(this,”setTags”,e=>(e&&Array.isArray(e)&&(this.value.tags=e.join(“,”)),this));s(this,”getValue”,()=>this.value);this.value={}}}class dt{constructor(){s(this,”getMetaByData”,()=>{var r;const e=new vt;return e.setId(this.key).setName(this.key).setType((r=this.entry)==null?void 0:r.entryType),this.hasEntry&&e.setCategory(this.entry.serviceCategoryName).setCategoryId(this.entry.serviceCategoryId).setAuthor(this.entry.author).setAuthorId(this.entry.author).setPlink(this.entry.plink).setImage(this.entry.image).setName(this.entry.entryTitle).setTags(this.entry.tags),e.getValue()});const{tiara:e}=window;this.svcDomain=e.svcDomain,this.section=e.section,this.page=e.page,this.trackPage=e.trackPage,this.customProps=e.customProps,this.entry=e.entry,this.kakaoAppKey=e.kakaoAppKey,this.appUserId=e.appUserId,this.key=e.key,this.hasEntry=!!(Object.prototype.hasOwnProperty.call(e,”entry”)&&e.entry),this.meta=this.getMetaByData()}}const wt=(t,e)=>Object.keys(t).every(r=>e.includes(r));function Z(){return window.tiara.page===”글뷰”}function tt(){return window.tiara.page===”블로그홈”}function St(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,”default”)?t.default:t}var et={exports:{}},rt={exports:{}},$t=void 0,nt=function(t){return t!==$t&&t!==null},It=nt,bt={object:!0,function:!0,undefined:!0},Tt=function(t){return It(t)?hasOwnProperty.call(bt,typeof t):!1},kt=Tt,Pt=function(t){if(!kt(t))return!1;try{return t.constructor?t.constructor.prototype===t:!1}catch(e){return!1}},Dt=Pt,_t=function(t){if(typeof t!=”function”||!hasOwnProperty.call(t,”length”))return!1;try{if(typeof t.length!=”number”||typeof t.call!=”function”||typeof t.apply!=”function”)return!1}catch(e){return!1}return!Dt(t)},Ot=_t,Mt=/^\s*class[\s{/}]/,jt=Function.prototype.toString,Et=function(t){return!(!Ot(t)||Mt.test(jt.call(t)))},At=function(){var t=Object.assign,e;return typeof t!=”function”?!1:(e={foo:”raz”},t(e,{bar:”dwa”},{trzy:”trzy”}),e.foo+e.bar+e.trzy===”razdwatrzy”)},k,U;function xt(){return U||(U=1,k=function(){try{return Object.keys(“primitive”),!0}catch(t){return!1}}),k}var Ct=function(){},Ut=Ct(),I=function(t){return t!==Ut&&t!==null},P,N;function Nt(){if(N)return P;N=1;var t=I,e=Object.keys;return P=function(r){return e(t(r)?Object(r):r)},P}var D,q;function qt(){return q||(q=1,D=xt()()?Object.keys:Nt()),D}var Ft=I,b=function(t){if(!Ft(t))throw new TypeError(“Cannot use null or undefined”);return t},_,F;function Rt(){if(F)return _;F=1;var t=qt(),e=b,r=Math.max;return _=function(n,i){var u,c,g=r(arguments.length,2),x;for(n=Object(e(n)),x=function(C){try{n[C]=i[C]}catch(pt){u||(u=pt)}},c=1;c-1},M}var Gt=Bt()?String.prototype.contains:Qt(),S=nt,V=Et,it=Vt,at=Yt,y=Gt,Jt=rt.exports=function(t,e){var r,n,i,u,c;return arguments.length<2||typeof t!="string"?(u=e,e=t,t=null):u=arguments[2],S(t)?(r=y.call(t,"c"),n=y.call(t,"e"),i=y.call(t,"w")):(r=i=!0,n=!1),c={value:e,configurable:r,enumerable:n,writable:i},u?it(at(u),c):c};Jt.gs=function(t,e,r){var n,i,u,c;return typeof t!="string"?(u=r,r=e,e=t,t=null):u=arguments[3],S(e)?V(e)?S(r)?V(r)||(u=r,r=void 0):r=void 0:(u=e,e=r=void 0):e=void 0,S(t)?(n=y.call(t,"c"),i=y.call(t,"e")):(n=!0,i=!1),c={get:e,set:r,configurable:n,enumerable:i},u?it(at(u),c):c};var Wt=rt.exports,Xt=function(){var t=Math.sign;return typeof t!="function"?!1:t(10)===1&&t(-20)===-1},j,H;function Zt(){return H||(H=1,j=function(t){return t=Number(t),isNaN(t)||t===0?t:t>0?1:-1}),j}var te=Xt()?Math.sign:Zt(),ee=te,re=Math.abs,ne=Math.floor,T=function(t){return isNaN(t)?0:(t=Number(t),t===0||!isFinite(t)?t:ee(t)*ne(re(t)))},K=”foo”,ie=function(){return typeof K.repeat!=”function”?!1:K.repeat(2)===”foofoo”},E,L;function ae(){if(L)return E;L=1;var t=b,e=T;return E=function(r){var n=String(t(this)),i;if(r=e(r),r<0)throw new RangeError("Count must be >= 0″);if(!isFinite(r))throw new RangeError(“Count must be < ∞");for(i="";r;)r%2&&(i+=n),r>1&&(n+=n),r>>=1;return i},E}var se=ie()?String.prototype.repeat:ae(),oe=T,ue=b,ce=se,le=Math.abs,fe=Math.max,he=function(t){var e=String(ue(this)),r=e.length,n=arguments[1];return n=isNaN(n)?1:oe(n),t=ce.call(String(t),le(n)),n>=0?t.slice(0,fe(0,n-r))+e:e+(r+n>=0?””:t.slice(n+r))},ge=T,pe=Math.max,st=function(t){return pe(0,ge(t))},me=he,z=st,ye=Number.prototype.toFixed,ve=function(t){var e;return t=z(t),e=z(arguments[1]),me.call(e?ye.call(this,e):this,”0″,t+(e?1+e:0))},ot=Object.prototype.toString,de=ot.call(new Date),we=function(t){return t&&!isNaN(t)&&(t instanceof Date||ot.call(t)===de)||!1},Se=we,$e=function(t){if(!Se(t))throw new TypeError(t+” is not valid Date object”);return t},Ie=Date.prototype.getMonth,be=function(){switch(Ie.call(this)){case 1:return this.getFullYear()%4?28:29;case 3:case 5:case 8:case 10:return 30;default:return 31}},Te=Date.prototype.getTime,ke=function(){return new Date(Te.call(this))},Pe=Date.prototype.setHours,ut=function(){return Pe.call(this,0,0,0,0),this},De=ut,ct=function(){return De.call(this).setDate(1),this},_e=ct,Oe=function(){return _e.call(this).setMonth(0),this},Me=function(t){return typeof t==”function”},je=Me,Y=b,Ee=Function.prototype.call,Ae=function(t){return t=Object(Y(t)),function(e){var r=this;return Y(r),e=String(e),e.replace(/%([a-zA-Z]+)|\\([\u0000-\uffff])/g,function(n,i,u){var c,g;if(u)return u;for(c=i;c&&!(g=t[c]);)c=c.slice(0,-1);return g?(je(g)&&(g=Ee.call(g,r)),g+i.slice(c.length)):n})}},o=Wt,h=ve,B=$e,xe=be,p=ke,Q=ut,v=ct,G=Oe,d=T,Ce=st,lt=I,a=Math.abs,ft,J,W,$,m;ft=Ae({y:function(){return String(a(this.year))},m:function(){return h.call(a(this.month),2)},d:function(){return h.call(a(this.day),2)},H:function(){return h.call(a(this.hour),2)},M:function(){return h.call(a(this.minute),2)},S:function(){return h.call(a(this.second),2)},L:function(){return h.call(a(this.millisecond),3)},ms:function(){return String(a(this.months))},ds:function(){return String(a(this.days))},Hs:function(){return String(a(this.hours))},Ms:function(){return String(a(this.minutes))},Ss:function(){return String(a(this.seconds))},Ls:function(){return String(a(this.milliseconds))},sign:function(){return this.to=t.from-Q.call(p.call(t.from)),i;return e>r?(i=e-r,n||–i,t.sign*i):e===r&&n?0:(i=n?e:e-1,i+=xe.call(t.from)-t.from.getDate(),t.sign*i)}),month:o.gs(function(){var t=m(this);return t.sign*((12-t.from.getMonth()+t.to.getMonth())%12-(t.from-v.call(p.call(t.from))>t.to-v.call(p.call(t.to))))}),year:o.gs(W=function(){var t=m(this);return t.sign*(t.to.getFullYear()-t.from.getFullYear()-(t.from-G.call(p.call(t.from))>t.to-G.call(p.call(t.to))))}),milliseconds:o.gs(J,null),seconds:o.gs(function(){return d(this.valueOf()/1e3)}),minutes:o.gs(function(){return d(this.valueOf()/(1e3*60))}),hours:o.gs(function(){return d(this.valueOf()/(1e3*60*60))}),days:o.gs(function(){return d(this.valueOf()/(1e3*60*60*24))}),months:o.gs(function(){var t=m(this);return t.sign*((t.to.getFullYear()-t.from.getFullYear())*12+t.to.getMonth()-t.from.getMonth()-(t.from-v.call(p.call(t.from))>t.to-v.call(p.call(t.to))))}),years:o.gs(W),_resolveSign:o(function(t){return t&&this.to=0)&&(e=a(r=this.year)+”y”+(e?” “:””)+e),this._resolveSign(r)+e))}),_toStringDefault:o(function(t){var e=””,r;return t–<=0&&(e+="."+h.call(a(r=this.millisecond),3)),!this.seconds&&t<0?this._resolveSign(r)+e:(t--<=0&&(r=this.second,e=(this.minutes?h.call(a(r),2):a(r))+e),!this.minutes&&t<0?this._resolveSign(r)+e:(t--<=0&&(r=this.minute,e=(this.hours||e?h.call(a(r),2):a(r))+(e?":":"")+e),!this.hours&&t<0?this._resolveSign(r)+e:(t--<=0&&(e=h.call(a(r=this.hour),2)+(e?":":"")+e),this._toStringDefaultDate(t,e,r))))}),_toString1:o(function(t){var e=[],r;return t--<=0&&e.unshift(a(r=this.millisecond)+"ms"),!this.seconds&&t<0?this._resolveSign(r)+e.join(" "):(t--<=0&&e.unshift(a(r=this.second)+"s"),!this.minutes&&t<0?this._resolveSign(r)+e.join(" "):(t--<=0&&e.unshift(a(r=this.minute)+"m"),!this.hours&&t<0?this._resolveSign(r)+e.join(" "):(t--<=0&&e.unshift(a(r=this.hour)+"h"),!this.days&&t<0?this._resolveSign(r)+e.join(" "):(t--<=0&&e.unshift(a(r=this.day)+"d"),!this.months&&t<0?this._resolveSign(r)+e.join(" "):(t--<=0&&e.unshift(a(r=this.month)+"m"),!this.years&&t<0?this._resolveSign(r)+e.join(" "):(e.unshift(a(r=this.year)+"y"),this._resolveSign(r)+e.join(" ")))))))}),toString:o(function(t){var e;return lt(t)||(t=0),isNaN(t)?ft.call(this,t):(t=Number(t),e=Ce(arguments[1]),t===1?this._toString1(e):this._toStringDefault(e))})});var Ue=et.exports;const Ne=St(Ue);class qe extends X{constructor(r){super(r);s(this,"setUsage",r=>(this.TiaraInstance.usage(r),this));s(this,”start”,()=>{Z()?this.TiaraInstance.trackUsage(“글 상세뷰 완독률”):tt()?this.TiaraInstance.trackUsage(“블로그홈_체류시간”):this.TiaraInstance.trackUsage(),this.TiaraInstance.track()})}}let f,w,l,A;function Fe(){A=new Date,l=new dt,Re(),window.addEventListener(“changeStateEvent”,gt)}function Re(){f=new X(l.svcDomain),!Object.prototype.hasOwnProperty.call(l,”page”)||!l.page?l.page=”default”:l.page=l.page.replace(“/”,”_”),f.setSection(l.section).setPage(l.page||”default”).setCustomProps(l.customProps).setPageMeta(l.meta).setTitle(document.title).setKakaoAppKey(l.kakaoAppKey).setAppUserId(l.appUserId).start(l.trackPage)}function ht(){if(!f||!Z()&&!tt())return;const t=new Ne(A,new Date).milliseconds,{scrollHeight:e}=document.documentElement,r=document.documentElement.clientHeight,n=window.scrollY,i=n+r;w=new qe(l.svcDomain),w.setSection(f.section).setPage(f.page).setCustomProps(f.customProps).setPageMeta(f.pageMeta).setReferrer(f.referrer).setUsage({duration:t,scroll_bottom:””.concat(i),scroll_height:””.concat(e),scroll_inner_height:””.concat(r),scroll_percent:””.concat(Math.round(i/e*100)),scroll_top:””.concat(n)}),f.url&&w.setUrl(f.url),w.start()}function gt(t){if(t.detail&&wt(t.detail,[“url”,”prevLocation”,”currentLocation”])){A=new Date;const{url:e,prevLocation:r,currentLocation:n}=t.detail;r&&Object.prototype.hasOwnProperty.call(r,”pathname”)&&f.setReferrer(“”.concat(e).concat(r.pathname)),n&&Object.prototype.hasOwnProperty.call(n,”pathname”)&&f.setPage(n.pathname.replace(“/”,””)).setUrl(“”.concat(e).concat(n.pathname)),f.start(l.trackPage),ht()}}function Ve(){ht(),window.removeEventListener(“changeStateEvent”,gt)}window.addEventListener(“load”,Fe);window.addEventListener(“beforeunload”,Ve);export{Ke as __vite_legacy_guard};