PageSourceSearch

https://assets.mubu.com/DailyNotesContainer-456e391ccee1bc1c.js

js mubu.com collected 2026-09-25 19:06:15 UTC 11,666 bytes, 2 lines download raw bytes

1"use strict";(self.rspackChunkweb_app=self.rspackChunkweb_app||[]).push([[975],{85126(e,t,r){r.r(t),r.d(t,{default:()=>L});var n,l,o,a=r(22155),i=r(10043),s=r(62934),u=r(61079),d=r(47132),c=r(46849),p=r(5535),f=r.n(p),y=r(52023),m=r(51202),v=r(9514),g=r(20777),h=r(65782);function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var b=r(57339),w=r(76424),D=r(65316),S=r(40126),T=r(60675),N=r(12787),_=r(44347),x=r(94928);let E=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=(0,i.wA)(),t=(0,s.g)().docId,r=(0,_.Ay)(),n=null==r?void 0:r.noAutoDoc,l=(0,a.useRef)(0),o=(0,x.A)(x.J.AUTO_CREATE).reqDailyNotesDocList,u=(0,w.A)(t=>{t&&e((0,D.VC)((0,s.tW)(T.wA.DailyNotes,{docId:t})+window.location.search))}),d=(0,w.A)(e=>e.find(e=>{let t=new Date().getFullYear();return new RegExp("^\\s*".concat(t,"\\s*å¹´$")).test(e.name)})),c=(0,w.A)(async()=>{try{var e;l.current++;let r=await o.runAsync();if((null==r?void 0:r.code)===S.vi.NetworkError){b.Toast.error(null==r?void 0:r.msg),(0,N.Cp)(r);return}if((null==r?void 0:r.code)!==0)return;let a=r.data;if((null==a||null==(e=a.docs)?void 0:e.length)===0&&null!=a&&a.folderId){l.current<3&&c();return}if(!n&&!t){let e=d(null==a?void 0:a.docs);e?u(null==e?void 0:e.id):l.current<3&&c()}}catch(e){(0,N.Cp)(e),console.log("\uD83D\uDE80 liu123 ~ error:",e)}});return(0,a.useEffect)(()=>{var e,r;let n=window.location.search.includes("noAutoDoc=1");if(t)return;let l=null==(e=o.data)?void 0:e.data;if(n&&null!=l&&l.docs)return;if(!(null!=l&&l.docs)||(null==l||null==(r=l.docs)?void 0:r.length)===0)return void c();let a=d(null==l?void 0:l.docs);a&&u(null==a?void 0:a.id)},[n,window.location.pathname]),{reqDailyNotesDocList:o}};var I=r(17631),C=r(19847);function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var k=r(48103),j=r(99278),M=r(81872),U=r(1716),V=r(39353),z=r(142),W=r(31952),J=r(20769),P=r(9322),Y=r(65778),B=r(14705);r(35238);var R=r(72508),Z=r(51604),$=r(56851);function F(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}let G=(0,$.default)(b.Container)(n||(n=F(["\n  position: relative;\n  overflow: scroll;\n  height: 100%;\n  flex: 1;\n  padding: 0 82px;\n  background: ",";\n  user-select: none;\n"])),e=>
1e.theme.pageBackground);function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,l,o,a,i=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){u=!0,l=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw l}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return K(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(e,t):void 0}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}$.default.div(l||(l=F(["\n  position: fixed;\n  z-index: ",";\n  right: 30px;\n  bottom: 26px;\n  width: 40px;\n  height: 40px;\n  border-radius: 50%;\n  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n"])),e=>e.zIndex),$.default.div(o||(o=F(["\n  position: sticky;\n  z-index: 1;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 41px;\n  background-color: ",";\n"])),e=>
1e.theme.pageBackground);let q=a.memo(function(){let e=(0,y.Ob)(),t=e.isHomeTab,r=e.isQuickAccessTab;(0,U.Y)();let n=(0,i.wA)(),l=H((0,y.Yy)(e=>[e.folders.viewType,e.folders.dailyNotesList,e.appState.ready,e.storage.uiWidth]),4),o=l[0],u=l[1],d=l[2],c=l[3],p=(0,g.A)({url:v.A.GetPromotion,method:"get"}).net,f=async()=>{let e=await p();e&&0==e.code&&(n(P.A.updatePromotion("info",{title:e.data.title,extraDesc:e.data.extraDesc,content:e.data.content,expire:e.data.expire,popUpWindowsType:e.data.popUpWindowsType,sidebarType:e.data.sidebarType})),0==e.data.popUpWindowsType&&localStorage.getItem("promotion_sn")!==e.data.promotionSn&&(localStorage.setItem("promotion_sn",e.data.promotionSn),n(R.A.setUserBenefitsModalVisible({visible:!0}))),1==e.data.popUpWindowsType&&localStorage.getItem("promotion_sn")!==e.data.promotionSn&&(localStorage.setItem("promotion_sn",e.data.promotionSn),n(R.A.setMembershipModalVisible({visible:!0,page:"promotion_activity"}))))};(0,a.useEffect)(()=>{t&&window.location.pathname==T.wA.AppContainer&&f()},[t]);let m=(0,a.useMemo)(()=>({margin:"".concat("list"===o?"responsive_width"===c?"0 0 0 -8px":"0 auto":"0 -13px"),padding:"0 49px",maxWidth:"list"==o?"responsive_width"===c?"100%":"970px":"100%"}),[o,c]),h=(0,a.useMemo)(()=>r?"quickVisitZone":"myDocumentZone",[r]),A=(0,a.useRef)(null),w=H((0,a.useState)(82),2),S=w[0],N=w[1],_=(0,a.useCallback)((0,z.A)(e=>{let t=e.width;t>1110&&82!==S?N(82):t<857&&42!==S?N(42):N(Math.min(.15810276679841898*(t-857)+42,82))},100),[]),x=(0,a.useCallback)(e=>{_(e)},[_]),E=e=>{n((0,D.VC)((0,s.tW)(T.wA.DailyNotes,{docId:e})))};return a.createElement(J.t$,{onResize:x,disableHeight:!0},e=>{let t=e.width;return a.createElement(G,{ref:A,style:{width:t-3.5,padding:"0 16px"}},a.createElement(W.m,null,a.createElement("title",null,"我的文档 - 幕布")),a.createElement(Z.A,{viewType:o}),d&&u.length?a.createElement("div",null,a.createElement(B.lZ,{isDailyNotes:!0,isQuickVisit:r,customOpenDoc:E,style:m,viewType:o,droppableId:h,list:(0,Y.N)(u),canDraggable:!1,canOnlyCombine:!1,canDragAndDrop:!1,folderContainer:A})):a.createElement("div",{style:{maxWidth:"list"===o&&"responsive_width"!==c?"970px":"100%",margin:"0 auto"}},Array(6).fill(0).map((e,t)=>a.createElement(b.Skeleton,{key:t,type:"list"}))))})}),L=()=>{var e,t;let r,n,l,o,p,b,w,D,T,N,_,x,z=(0,s.g)().docId,W=(0,j.Ay)((0,h.d)(["autoOpenPage"])).autoOpenPage,J=(0,i.wA)();E(),r=(0,C.A)((0,h.d)(["daily_note_template"])).daily_note_template,l=(n=function(e){if(Array.isArray(e))return e}(e=(0,y.Yy)(e=>[e.doc.outliner,e.modal.dailyNotesTemplateModal.nodeId]))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,l,o,a=[],i=!0,s=!1;try{l=(t=t.call(e)).next,!1;for(;!(i=(r=l.call(t)).done)&&(a.push(r.value),2!==a.length);i=!0);}catch(e){s=!0,n=e}finally{try{if(!i&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(s)throw n}}return a}}(e)||function(e){if(e){if("string"==typeof e)return O(e,2);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?O(e,2):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],o=n[1],p=(0,m.A)((0,h.d)(["setDailyNotesTemplateData"])).setDailyNotesTemplateData,b=(0,g.A)({url:v.A.TemplateView_V3,method:"post"}).net,(0,I.A)(()=>{var e;null!=r&&r.template_id||(p([]),null==l||null==(e=l.config)||e.setConfig(d.zc.DailyNotesTemplateData,void 0))},[null==r?void 0:r.template_id,l]),(0,c.A)(()=>b({data:{uuid:r.template_id}}),{ready:!!(null!=r&&r.template_id),refreshDeps:[null==r?void 0:r.template_id],onSuccess:e=>{var t,r,n,a,i,s;if((null==e?void 0:e.code)===S.vi.Success)try{let i=JSON.parse(null!=(t=null==(r=e.data)?void 0:r.mainDefinition)?t:"{}"),s=null!=(n=null==i?void 0:i.nodes)?n:[];if(p(s),!l)return;o&&(null==(a=l.getService("DailyNotesService"))||a.addTemplateToExistingNode(o,s)),l.config.setConfig(d.zc.DailyNotesTemplateData,s)}catch(e){console.error(e),p([]),null==l||null==(i=l.config)||i.setConfig(d.zc.DailyNotesTemplateData,void 0)}else p([]),null==l||null==(s=l.config)||s.setConfig(d.zc.DailyNotesTemplateData,void 0)}}),w=(function(e){if(Array.isArray(e))return e}(t=(0,y.Yy)(e=>[e.doc.outliner]))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,l,o,a=[],i=!0,s=!1;try{l=(t=t.call(e)).next,!1;for(;!(i=(r=l.call(t)).done)&&(a.push(r.value),1!==a.length);i=!0);}catch(e){s=!0,n=e}
1finally{try{if(!i&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(s)throw n}}return a}}(t)||function(e){if(e){if("string"==typeof e)return A(e,1);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,1):void 0}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],T=(D=(0,m.A)((0,h.d)(["setFirstCreateDailyNotes","firstCreateDailyNotes"]))).setFirstCreateDailyNotes,N=D.firstCreateDailyNotes,_=(0,g.A)({url:v.A.TemplateView_V3,method:"post"}).net,x=(0,c.A)(()=>_({data:{uuid:"1SJV7ygrzZ9"}}),{ready:N,refreshDeps:[N]}),(0,a.useEffect)(()=>{var e,t,r,n,l;let o;if(!w||w.destroyed||!N||x.loading)return;try{o=null==w?void 0:w.getService("DailyNotesService")}catch(e){console.error("\uD83D\uDE80 liu123 ~ error:",e);return}if(!o)return;let a=o.getNodeToDailyNoteDateTypeMap().dateMap.get(f()().startOf("day").valueOf());if(!a)return;let i=JSON.parse(null!=(e=null==(t=x.data)||null==(r=t.data)?void 0:r.mainDefinition)?e:"{}"),s=null!=(n=null==i?void 0:i.nodes)?n:[];a.children.forEach(e=>{w.getService("Command").execute(d.bp.Delete,e.id)}),null==(l=o)||l.addTemplateToExistingNode(a.id,s),T(!1)},[w,N,x.loading]);let P=(0,U.Y)();return((0,a.useEffect)(()=>(J(k.pE.setBreadCrumb([{id:"dailyNotesTab",label:"今日速记"}])),J(k.pE.setBarActiveTab("dailyNotes")),J(k._K.setIsDailyNotes(!0)),J(V.A.updateAppTarget(void 0)),P({scene:"dailynotes_page_view",sceneVal:{default_page_setting:W}}),()=>{J(k._K.setIsDailyNotes(!1)),J(k.fF.setDailyNotesTemplateModalVisible({visible:!1,nodeId:void 0}))}),[]),z)?a.createElement(u.t,null,a.createElement(M.A,{docId:z,readOnly:!1,needHeader:!0,isDailyNotes:!0})):a.createElement(q,null)}},19847(e,t,r){r.d(t,{A:()=>y});var n=r(44135),l=r(75686),o=r(20823),a=r(9514),i=r(40126),s=r(6173);let u=null,d=0,c=null,p={getItem:async()=>{try{let e=await (0,s.A)({url:a.A.GetUserSetting,method:"get",data:{}});if(console.log("GetUserSetting: res",e),(null==e?void 0:e.code)===i.vi.Success&&e.data)return u=e.data,JSON.stringify({state:e.data});return null}catch(e){return console.error("获取用户设置异常:",e),null}},setItem:async(e,t)=>(c&&clearTimeout(c),new Promise(e=>{c=setTimeout(async()=>{try{let r=JSON.parse(t).state,n=((e,t)=>{if(!e)return t;let r={};for(let n of Object.keys(t)){let l=e[n],a=t[n];(0,o.A)(l,a)||(r[n]=a)}return r})(u,r);if(0===Object.keys(n).length)return void e();let l=++d,c=await (0,s.A)({url:a.A.GetUserSetting,method:"post",data:n});l===d?(null==c?void 0:c.code)!==i.vi.Success?console.error("保存用户设置失败:",c):u=r:console.log("忽略过期的请求响应,版本号:",l),e()}catch(t){console.error("保存用户设置异常:",t),e()}},500)})),removeItem:async()=>{c&&(clearTimeout(c),c=null),u=null,d=0}},f={daily_note_template:{}},y=(0,n.vt)()((0,l.Zr)((e,t)=>({...f,setDailyNotesTemplate:r=>{e({daily_note_template:{...t().daily_note_template,...r}})}}),{name:"user-setting-storage",storage:(0,l.KU)(()=>p),version:1}))}}]);
2//# sourceMappingURL=DailyNotesContainer-456e391ccee1bc1c.js.map

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.