PageSourceSearch

https://www.hbrtaiwan.com/_nuxt/DKtaK_TX.js

js hbrtaiwan.com collected 2026-09-24 08:55:38 UTC 9,618 bytes, 1 lines download raw bytes

1import{_ as z,u as F,J as H,f as w,l as x,y as A,o as m,w as V,d as k,z as L,g as d,a as t,t as $,h as j,H as E,I as D,av as G,c as g,b as P,M as O,C as q,B as J,v as Q,as as W,x as K,j as T,F as U,r as X,Q as Y,P as Z,O as ee}from"./ZjLcrLUj.js";import{B}from"./D6-U3Q6q.js";import{_ as te}from"./xCSoiS7F.js";import{D as se,b as oe}from"./D70OWDLV.js";import{a as ae}from"./19x6Zq2q.js";import{t as le}from"./BrVTkNzt.js";import{g as ne}from"./DE0fykHM.js";function re(i){return new URL(window.location.href)}const ie={class:"share-modal flex flex-col w-[348px] bg-white rounded-xs border-1 border-[#dddddd]"},ce={class:"share-header p-4 w-full flex-shrink-0 flex justify-between items-center gap-3 border-b border-[#dddddd]"},de=["title"],ue={class:"share-body p-4 flex flex-col gap-4"},me={class:"url-section relative"},pe={class:"flex"},fe=["value"],ge={key:0,class:"copy-success-message inline-block absolute top-full right-0 text-sm text-gray-500 mt-2"},he={class:"flex flex-row gap-4 p-3 pl-0 pt-2"},ve={__name:"ShareModal",props:{modelValue:{type:Boolean,default:!1},shareUrl:{type:String,default:""},shareTitle:{type:String,default:""},utmCampaign:{type:String,default:se}},emits:["update:modelValue"],setup(i,{emit:e}){const l=i,_=e,c=F(),C=re(),{ga_articleToolShareClick:S}=H(),h=w({get:()=>l.modelValue,set:u=>_("update:modelValue",u)});x("facebook");const f=x(!1);let y=null;const p=w(()=>l.shareUrl?l.shareUrl:`${C.origin}${c.fullPath}`),b=w(()=>l.shareTitle||"分享"),I=async()=>{S({method:"gc_article_tool_copy",button:"copy_list"});try{await navigator.clipboard.writeText(p.value),f.value=!0,y&&clearTimeout(y),y=setTimeout(()=>{f.value=!1},3e3)}catch(u){ae().write({level:"warn",type:"share",name:"copy_failed",message:le(u)})}},v=u=>{if(!["facebook","linkedin","line"].includes(u))return;const s=oe({platform:u,url:p.value,title:l.shareTitle||"",tracking:{utmCampaign:l.utmCampaign}});window.open(s,"_blank","width=600,height=400")},N=()=>{h.value=!1};return(u,s)=>{const a=j,n=te,o=O;return m(),A(o,null,{default:V(()=>[k(n,{modelValue:d(h),"onUpdate:modelValue":s[3]||(s[3]=r=>L(h)?h.value=r:null)},{default:V(()=>[t("div",ie,[t("div",ce,[t("span",{class:"min-w-0 flex-1 truncate text-base font-medium",title:d(b)},"分享:"+$(d(b)),9,de),k(a,{class:"icon-icon-times shrink-0 cursor-pointer hover:transform-y-[-1px] transition-transform duration-300 block text-black",onClick:E(N,["stop"])})]),t("div",ue,[t("div",me,[s[5]||(s[5]=t("label",{class:"block text-sm font-medium mb-2 text-gray-700"},"URL",-1)),t("div",pe,[t("input",{value:d(p),type:"text",readonly:"",class:"flex-1 p-2 border border-gray-300 border-r-0 rounded text-sm bg-gray-50"},null,8,fe),t("button",{onClick:I,class:"copy-link-btn flex items-center gap-2 px-4 py-2 bg-hbrRed text-white rounded text-sm hover:bg-gray-700 transition-colors"},s[4]||(s[4]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),t("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})],-1),D(" 複製連結 ")]))]),k(G,{name:"fade"},{default:V(()=>[d(f)?(m(),g("div",ge," 已複製 ")):P("",!0)]),_:1})]),t("div",he,[t("button",{class:"social-share-btn cursor-pointer flex items-center justify-center w-10 h-10 bg-black rounded hover:opacity-80 transition-opacity",title:"分享到 Facebook",onClick:s[0]||(s[0]=r=>v("facebook"))},s[6]||(s[6]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"white"},[t("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})],-1)])),t("button",{class:"social-share-btn cursor-pointer flex items-center justify-center w-10 h-10 bg-black rounded hover:opacity-80 transition-opacity",title:"分享到 LinkedIn",onClick:s[1]||(s[1]=r=>v("linkedin"))},s[7]||(s[7]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"white"},[t("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})],-1)])),t("button",{class:"social-share-btn cursor-pointer flex items-center justify-center w-10 h-10 bg-black rounded hover:opacity-80 transition-opacity",title:"分享到 LINE",onClick:s[2]||(s[2]=r=>v("line"))},s[8]||(s[8]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"white"},[t("path",{d:"M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63H17.61v1.125h1.755c.349 0 .63.283.63.63 0 .344-.281.629-.63.629h-2.386c-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63h2.386c.346 0 .627.285.627.63 0 .349-.281.63-.63.63H17.61v1.125h1.755zm-3.855 3.016c0 .27-.174.51-.432.596-.064.021-.133.031-.199.031-.211 0-.391-.09-.51-.25l-2.443-3.317v2.94c0 .344-.279.629-.631.629-.346 0-.626-.285-.626-.629V8.108c0-.27.173-.51.43-.595.06-.023.136-.033.194-.033.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.771zm-5.741 0c0 .344-.282.629-.631.629-.345 0-.627-.285-.627-.629V8.108c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.771zm-2.466.629H4.917c-.345 0-.63-.285-.63-.629V8.108c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.141h1.756c.348 0 .629.283.629.63 0 .344-.282.629-.629.629M24 10.314C24 4.943 18.615.572 12 .572S0 4.943 0 10.314c0 4.811 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.301.079.766.058 1.08l-.164 1.02
1c-.045.301-.24 1.186 1.049.645 1.291-.539 6.916-4.078 9.436-6.975C23.176 14.393 24 12.458 24 10.314"})],-1)]))])])])]),_:1},8,["modelValue"])]),_:1})}}},ye=z(ve,[["__scopeId","data-v-d16a01c8"]]),we=["onClick"],xe={class:"icon flex justify-start items-center"},be=["src","alt"],ke={key:0,class:"date"},_e={__name:"ActionButton",props:{date:{type:String,default:null},postId:{type:String||void 0,default:null},templateSlug:{type:String,default:null},templateEName:{type:String,default:null},gtmArticleSource:{type:Object,default:null},classNo:{type:String,default:null},title:{type:String,default:null},url:{type:String,default:null},extendClasse:{type:String,default:null},containerClass:{type:String,default:""}},setup(i){const e=i,l=q(),_=w(()=>{const a=typeof l.name=="string"?l.name:"";return!["magazine-contents","self-learning-lesson-id-title","self-learning","corp-learning","corp-learning-lesson-id-title","special-issue","special-issue-contents","book-contents"].includes(a)&&e.templateEName!="paper"}),c=J(),C=()=>{const a=typeof l.name=="string"?l.name:"",n=a.includes("self-learning")||a.includes("corp-learning"),o=l.params.lesson,r=o==null?"":`${o}`,M=e.gtmArticleSource?Z(e.gtmArticleSource):{postId:e.postId,publishedDate:e.date,title:e.title,template:{templateEName:e.templateEName,templateSlug:e.templateSlug},classNo:e.classNo||r,classCategory:e.templateSlug},R=n?{isClassesPage:!0,articleId:`${e.classNo||r||e.postId||""}`,classNo:e.classNo||r,articleType:a.includes("self-learning")?"self-learning":"corp-learning"}:{articleId:`${e.postId||""}`};return ee(M,R)},S=x([{name:"收藏",id:"favorite",iconSize:24,icon:"mdi-bookmark-plus-outline",img:"/img/bookmark.svg",activeComponent:B},{name:"分享",id:"share",iconSize:24,icon:"mdi-share-variant-outline",img:"/img/shareIcon.svg"}]),h=w(()=>{if(!e.url)return"";const a=e.url.startsWith("/")?e.url:`/${e.url}`;return`${window.location.origin}${a}`}),f=async()=>{const a=e.postId,n=e.classNo||l.params.lesson;if(!a&&!n)return;const o=await ne({postId:a,classNo:n,category:e.templateSlug});v.value=Array.isArray(o)?o.some(r=>r.infavorite===!0):!1},y=async()=>{if(!c.isLoggedIn){window.location.href=Y();return}await f(),c.favoritePop=!0,c.favoritePostId=e.postId,c.favoriteCategory=e.templateSlug,c.favoriteClassNo=e.classNo||l.params.lesson,c.favoritePlaylistScope=null,c.favoriteGtmContext=C()},p=x(!1),b=()=>{p.value=!0},I=a=>{({favorite:y,share:b})[a]()},v=x(!1);Q(async()=>{await f()});const{favoritePop:N,favoritePostId:u,favoriteClassNo:s}=W(c);return K(N,async(a,n)=>{if(n===!0&&a===!1){const o=e.classNo||l.params.lesson,r=e.postId&&u.value===e.postId,M=o&&s.value===o;(r||M)&&await f()}c.newFavoriteFolder={name:"",description:""}}),(a,n)=>(m(),g(U,null,[(m(),g("div",{key:`favorite-${i.postId}`,class:T(["action flex justify-start items-center gap-2 md:gap-6",i.containerClass])},[(m(!0),g(U,null,X(d(S),o=>(m(),g("div",{key:`action-item-${i.postId}-${o.id}`,class:"action-item flex justify-center items-center",onClick:r=>I(o.id)},[t("div",xe,[o.name==="收藏"&&d(v)?(m(),A(B,{key:0})):(m(),g("img",{key:1,src:o.img,alt:`${o.name} Icon`},null,8,be))]),t("div",{class:T(["text",i.extendClasse])},$(o.name),3)],8,we))),128)),d(_)&&i.date?(m(),g("span",ke,$(i.date),1)):P("",!0)],2)),k(ye,{modelValue:d(p),"onUpdate:modelValue":n[0]||(n[0]=o=>L(p)?p.value=o:null),"share-url":d(h),"share-title":i.title},null,8,["modelValue","share-url","share-title"])],64))}},Te=z(_e,[["__scopeId","data-v-741b7cf7"]]);export{Te as _};

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.