PageSourceSearch

https://cdn.naimei.com.tw/_next/static/chunks/pages/tags/[id]/relations-d004a482e108ffe6.js

js naimei.com.tw collected 2026-10-08 07:21:48 UTC 9,879 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3426],{40472:function(n,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tags/[id]/relations",function(){return a(94804)}])},41172:function(n,e,a){"use strict";var l,t,i,r,s,o,d;a.r(e);let u=(d={alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"neighbors",plural:!0,selections:o=[l={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"oid",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},s={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},i={alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{argumentDefinitions:[{defaultValue:!1,kind:"LocalArgument",name:"includeFeed"}],kind:"Fragment",metadata:null,name:"CnTagInfoRelationTab_tag",selections:[l,t,i,r,s,{condition:"includeFeed",kind:"Condition",passingValue:!1,selections:[{alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"children",plural:!0,selections:o,storageKey:null},d,{alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"parents",plural:!0,selections:[d,l,t,r,s,i],storageKey:null}]}],type:"Tag",abstractKey:null});u.hash="21991f6a837d63e567c938958c62ae3a",e.default=u},80232:function(n,e,a){"use strict";var l,t,i,r,s,o,d,u,c,g;a.r(e);let p=(l=[{defaultValue:null,kind:"LocalArgument",name:"id"}],t=[{kind:"Variable",name:"id",variableName:"id"}],s={alias:null,args:null,kind:"ScalarField",name:"isFollowed",storageKey:null},g={alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"neighbors",plural:!0,selections:c=[i={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},u={alias:null,args:null,kind:"ScalarField",name:"oid",storageKey:null},o={alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},r={alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},d={alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null}],storageKey:null},{fragment:{argumentDefinitions:l,kind:"Fragment",metadata:null,name:"relations_tagsIdPageQuery",selections:[{alias:null,args:t,concreteType:"Tag",kind:"LinkedField",name:"tag",plural:!1,selections:[i,r,s,{args:null,kind:"FragmentSpread",name:"useCnTagInfoHeadData_tag"},{args:null,kind:"FragmentSpread",name:"CnTagInfoRelationTab_tag"}],storageKey:null}],type:"Query",abstractKey:null},kind:"Request",operation:{argumentDefinitions:l,kind:"Operation",name:"relations_tagsIdPageQuery",selections:[{alias:null,args:t,concreteType:"Tag",kind:"LinkedField",name:"tag",plural:!1,selections:[i,r,s,o,d,u,{alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"children",plural:!0,selections:c,storageKey:null},g,{alias:null,args:null,concreteType:"Tag",kind:"LinkedField",name:"parents",plural:!0,selections:[g,i,u,o,r,d],storageKey:null}],storageKey:null}]},params:{cacheID:"d9142f14c2eb23dbda948f04d67c1179",id:null,metadata:{},name:"relations_tagsIdPageQuery",operationKind:"query",text:"query relations_tagsIdPageQuery(\n  $id: ID!\n) {\n  tag(id: $id) {\n    id\n    name\n    isFollowed\n    ...useCnTagInfoHeadData_tag\n    ...CnTagInfoRelationTab_tag\n  }\n}\n\nfragment CnTagInfoRelationTab_tag on Tag {\n  id\n  oid\n  type\n  description\n  name\n  children {\n    id\n    oid\n    description\n    name\n    type\n  }\n  neighbors {\n    id\n    oid\n    description\n    name\n    type\n  }\n  parents {\n    neighbors {\n      id\n      oid\n      description\n      name\n      type\n    }\n    id\n    oid\n    description\n    name\n    type\n  }\n}\n\nfragment useCnTagInfoHeadData_tag on Tag {\n  id\n  description\n  name\n  type\n  isFollowed\n}\n"}});p.hash="5079898910533ba5191fb7e64f204f22",e.default=p},81254:function(n,e,a){"use strict";a.r(e);let l={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"useCnTagInfoHeadData_tag",selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"description",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"type",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isFollowed",storageKey:null}],type:"Tag",abstractKey:null};l.hash="09c38208c909d3987c1c6b270a3d6977",e.default=l},26753:function(n,e,a){"use strict";a.d(e,{Z:function(){return b}});var l=a(35944),t=a(86138),i=a(64474),r=a(10335),s=a(64730),o=a(45317),d=a(64039),u=a(64194),c=a(2301),g=a(53145),p=a(88747),m=a(21485),f=a(93043),h=a(56912),Z=a(90642),y=a(26881),k=a(58918),b=(0,a(67294).forwardRef)(function(n,e){let{description:a,disabled:b,id:v,isFollowed:F,isSearchable:T,name:_,onFollowClick:K,onSearchInputChange:w,onTabChange:C,onUnfollowClick:S,tab:I="feed",tabs:P=["feed"],...x}=n,R=(0,s.Z)();return(0,l.BX)(u.Z,{ref:e,square:!0,...x,children:[(0,l.tZ)(c.Z,{title:(0,l.BX)(g.Z,{direction:"row",alignItems:"end",spacing:1,paddingBottom:1,children:[T?(0,l.tZ)(i.Z,{value:{oid:(0,r.A)("Tag",null!=v?v:""),id:null!=v?v:"",name:_,type:"type"},sx:{width:R?"66%":"45%"},renderInput:n=>(0,l.tZ)(p.Z,{...n,size:"small",variant:"standard",InputProps:{...n.InputProps,sx:{typography:"h1",fontWeight:"bold"}},inputProps:{...n.inputProps,style:{...n.inputProps.style,paddingBottom:0}},label:void 0}),onChange:(n,e)=>{e&&(null==w||w(e.oid))}}):(0,l.tZ)(m.Z,{variant:"h1",component:"span",children:_}),(K||S)&&(0,l.tZ)(f.Z,{disabled:b,variant:F?"contained":"outlined",size:"small",disableElevation:!0,color:"secondary",startIcon:(0,l.tZ)(d.Z,{}),onClick:F?S:K,children:F?"已追蹤":"追蹤"})]}),subheader:a&&""!==a?a:"-"}),(0,l.tZ)(h.Z,{}
1),(0,l.tZ)(Z.Z,{display:"flex",children:(0,l.tZ)(y.Z,{value:I,variant:"scrollable",scrollButtons:"auto",sx:{marginRight:"auto"},onChange:C,allowScrollButtonsMobile:!0,children:P.map(n=>{switch(n){case"feed":return v?(0,l.tZ)(k.Z,{value:n,label:"動態",component:t.Z,href:"".concat((0,o.yw)(v)),passHref:!0},n):(0,l.tZ)(k.Z,{value:n,label:"動態"},n);case"smartsearch":return v?(0,l.tZ)(k.Z,{value:n,label:"便利搜",component:t.Z,href:"".concat((0,o.yw)(v),"/smartsearch"),passHref:!0},n):(0,l.tZ)(k.Z,{value:n,label:"便利搜"},n);case"relations":return v?(0,l.tZ)(k.Z,{value:n,label:"關聯",component:t.Z,href:"".concat((0,o.yw)(v),"/relations"),passHref:!0},n):(0,l.tZ)(k.Z,{value:n,label:"關聯"},n);case"graph":return v?(0,l.tZ)(k.Z,{value:n,label:"圖像化關聯",component:t.Z,href:"".concat((0,o.yw)(v),"/graph"),passHref:!0},n):(0,l.tZ)(k.Z,{value:n,label:"圖像化關聯"},n);case"sunburst":return v?(0,l.tZ)(k.Z,{value:n,label:"散射圖",component:t.Z,href:"".concat((0,o.yw)(v),"/sunburst"),passHref:!0},n):(0,l.tZ)(k.Z,{value:n,label:"散射圖"},n);default:return null}})})})]})})},30260:function(n,e,a){"use strict";a.d(e,{Z:function(){return h}});var l=a(35944),t=a(26753),i=a(82729),r=a(54745),s=a(42449),o=a(38741),d=a(70917),u=a(11163),c=a(67294),g=a(63190);let p=n=>{let{tagRef:e}=n;return{tag:(0,g.Jc)(a(81254),e)}};function m(){let n=(0,i._)(["\n        margin-bottom: ",";\n    "]);return m=function(){return n},n}var f=n=>{let{id:e,initialTab:a,tagRef:l}=n,{tag:t}=p({tagRef:l}),i=(0,o.u)(),g=(0,u.useRouter)(),{session:f}=(0,r.Eu)(),{followTag:h,unfollowTag:Z}=(0,s.Ax)(),[y,k]=(0,c.useState)(a),b=["feed","smartsearch","relations",..."location"===t.type?["graph"]:[],"sunburst"];return{handleFollowClick:f?()=>{h(t.id)}:void 0,handleSearchInputChange:n=>{g.push(g.pathname.replace("[id]",n))},handleTabChange:(n,e)=>{k(e)},handleUnfollowClick:f?()=>{Z(t.id)}:void 0,id:e,rootCss:(0,d.iv)(m(),i.spacing(2)),tab:y,tabs:b,tag:t}},h=n=>{var e;let{handleFollowClick:a,handleSearchInputChange:i,handleTabChange:r,handleUnfollowClick:s,id:o,rootCss:d,tab:u,tabs:c,tag:g}=f(n);return(0,l.tZ)(t.Z,{id:o,name:g.name,description:null!==(e=g.description)&&void 0!==e?e:void 0,isFollowed:g.isFollowed,isSearchable:!0,tab:u,tabs:c,css:d,onFollowClick:a,onSearchInputChange:i,onTabChange:r,onUnfollowClick:s})}},16034:function(n,e,a){"use strict";a.d(e,{Z:function(){return p}});var l=a(35944),t=a(90642),i=a(79482),r=a(53145),s=a(56912),o=a(39693),d=a.n(o),u=a(75472),c=a.n(u),g=a(63190),p=n=>{var e;let{id:o,onSubTagClick:u,tagRef:p}=n,m=(0,g.Jc)(a(41172),p),f=n=>n.id===o,h=n=>null!=m&&!!m.parents&&m.parents.some(e=>n.id===e.id),Z=n=>(0,l.tZ)(t.Z,{children:(0,l.tZ)(t.Z,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",m:-.5},children:c()(d()(n),"id","asc").map(n=>(0,l.tZ)(t.Z,{sx:{m:.5},onClick:()=>{u(n.oid)},children:(0,l.tZ)(i.Z,{label:n.name,color:f(n)?"primary":h(n)?"secondary":void 0})},n.id))})});return(0,l.BX)(r.Z,{spacing:1,children:[(0,l.tZ)(s.Z,{children:"母層標籤"}),m.parents&&m.parents.length>0&&Z([...m.parents,...m.parents.flatMap(n=>n.neighbors)]),(0,l.tZ)(s.Z,{children:"同層標籤"}),Z([...null!==(e=m.neighbors)&&void 0!==e?e:[],m]),(0,l.tZ)(s.Z,{children:"子層標籤"}),m.children&&m.children.length>0&&Z(m.children)]})}},94804:function(n,e,a){"use strict";a.r(e),a.d(e,{__N_SSP:function(){return h}});var l=a(82729),t=a(35944),i=a(88489),r=a(97104),s=a(70917),o=a(11163),d=a(63190),u=a(76766),c=a(30260),g=a(16034),p=a(58841);function m(){let n=(0,l._)(["\n                    padding: ",";\n                "]);return m=function(){return n},n}let f=a(80232);var h=!0;e.default=n=>{let{id:e}=n,a=(0,o.useRouter)(),{data:l}=(0,d.aM)(f,{id:e}),h=null==l?void 0:l.tag;return h?(0,t.BX)(i.Z,{maxWidth:"sm",disableGutters:!0,children:[(0,t.tZ)(u.Z,{title:(null==h?void 0:h.name)?"#".concat(null==h?void 0:h.name):void 0}),(0,t.tZ)(c.Z,{id:e,initialTab:"relations",tagRef:h}),(0,t.tZ)(r.Z,{css:(0,s.iv)(m(),p.Z.spacing(2)),children:(0,t.tZ)(g.Z,{id:e,onSubTagClick:n=>{a.push("/tags/".concat(n,"/relations"))},tagRef:h})})]}):null}}},function(n){n.O(0,[5192,1859,2449,2888,9774,179],function(){return n(n.s=40472)}),_N_E=n.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.