HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/AppData/Local/Microsoft/OneDrive/26.168.0830.0006/WebAssets/static/platform/ids.js
(function(){window.ViewLib||(window.ViewLib={});var u="lid:",i=null;function f(n){var t=/^([a-z][a-z0-9+.-]*:\/\/[^/]+)/i.exec(n||"");return t?t[1]:""}function h(){try{return window.ViewLib&&window.ViewLib.SQL&&window.ViewLib.SQL.named?window.ViewLib.SQL.named("endpoint_list_url").then(function(n){var t=n&&n.length>0&&n[0].value;return t?f(t):""}).catch(function(){return""}):Promise.resolve("")}catch{return Promise.resolve("")}}function p(n){return new Promise(function(t){var e=window.chrome&&window.chrome.webview||window.top&&window.top.chrome&&window.top.chrome.webview;if(!e){t("");return}var r="spo-auth-"+Date.now()+"-"+Math.random().toString(36).slice(2,8),g=setTimeout(function(){e.removeEventListener("message",c),t("")},1e4);function c(o){!o.data||o.data.id!==r||o.data.type!=="result"||(clearTimeout(g),e.removeEventListener("message",c),t(o.data.data&&o.data.data.result==="token"&&o.data.data.token||""))}e.addEventListener("message",c),e.postMessage({type:"command",id:r,data:{command:"authenticate",resource:n}})})}function v(){return p("https://graph.microsoft.com/.default").then(function(n){return n?fetch("https://graph.microsoft.com/v1.0/me/drive?$select=webUrl",{headers:{Authorization:"Bearer "+n}}).then(function(t){return t&&t.ok?t.json():null}).then(function(t){return t&&t.webUrl?f(t.webUrl):""}).catch(function(){return""}):""})}function l(){try{return!!(window.ViewLib&&window.ViewLib.ECS&&window.ViewLib.ECS.isBusinessAccount&&window.ViewLib.ECS.isBusinessAccount())}catch{return!1}}function s(){if(!l())return"";try{if(window.top&&window.top.__od4SpoHost)return window.top.__od4SpoHost}catch{}try{return window.__od4SpoHost||""}catch{}return""}var a={download:{host:"https://my.microsoftpersonalcontent.com",resource:"https://my.microsoftpersonalcontent.com"},dash:{host:"https://onedrive.live.com",resource:"onedrive.readwrite"}};function I(){try{var n=window.ViewLib&&window.ViewLib.ECS;if(n&&typeof n.isKillswitchSafe=="function")return!!n.isKillswitchSafe(7377)}catch{}return!1}function w(){try{var n=window.ViewLib&&window.ViewLib.ECS;if(n&&typeof n.oneUpLocalIdContentFallbackSafe=="function")return!!n.oneUpLocalIdContentFallbackSafe()}catch{}return!1}function _(n){try{return new URL(String(n)).host}catch{return""}}function d(n){if(n==null)return"";var t=String(n).trim();return t==="null"?"":t}window.ViewLib.Ids={parseDriveId:function(n){if(typeof n!="string")return null;var t=n.indexOf("!");return t>0?n.slice(0,t).toLowerCase():null},driveIdOf:function(n){return n?typeof n.driveId=="string"&&n.driveId?n.driveId:this.parseDriveId(n.driveItemId||n.id):null},cloudDriveItemIdOf:function(n){if(!n)return null;var t=n.videoContentDriveItemId||n.driveItemId||n.id;if(typeof t!="string"||!t.trim()||/^\d+$/.test(t))return null;var e=t.toLowerCase();return e.indexOf("lid:")===0||e.indexOf("localid_")===0||e.indexOf("fsid_")===0||e.indexOf("temp!")===0?null:t},decodedDriveId:function(n){if(!n)return null;var t=this.parseDriveId(n.driveItemId||n.id);if(t)return t;var e=n.driveId;return typeof e=="string"&&e&&e.indexOf("!")<0?e.toLowerCase():null},isBusinessAccount:function(){return l()},ensureContentHost:function(){if(!this.isBusinessAccount())return Promise.resolve("");var n=s();return n?Promise.resolve(n):i||(i=h().then(function(t){return t||v()}).then(function(t){if(t){try{window.__od4SpoHost=t}catch{}try{window.top&&(window.top.__od4SpoHost=t)}catch{}}return i=null,t}).catch(function(){return i=null,""}),i)},spoHostPending:function(){if(!this.isBusinessAccount()||s())return!1;try{this.ensureContentHost()}catch{}return!0},spoHost:function(n){if(this.spoHostPending())return null;var t=s();if(t)return t;var e=a[n];return e?e.host:""},spoContentBase:function(n,t){if(this.spoHostPending())return null;var e=s();if(e)return e;var r=a[t];return(r?r.host:"")+"/personal/"+n},spoResource:function(n){var t=a[n];return this.spoAuthResource(t?t.resource:"")},spoAuthResource:function(n){var t=s();return t?t+"/.default":n},contentDriveId:function(n){return n?this.isBusinessAccount()?typeof n.driveId=="string"&&n.driveId?n.driveId:null:this.decodedDriveId(n):null},spoDashSitesBase:function(n){if(!this.spoDashSitesEligible(n))return null;var t=this.spoHost("dash");if(!t)return null;var e=_(t);return e?t+"/_api/v2.1/sites/"+encodeURIComponent(e)+","+encodeURIComponent(d(n.siteId))+"/items/"+encodeURIComponent(d(n.listItemUniqueId))+"/driveItem":null},spoDashSitesEligible:function(n){return!n||!I()?!1:!!(d(n.siteId)&&d(n.listItemUniqueId))},isLocalOnlyId:function(n){return typeof n=="string"&&n.indexOf(u)===0},stripLocalPrefix:function(n){return typeof n!="string"?n:n.indexOf(u)===0?n.slice(u.length):n},localContentRefOf:function(n){return!n||!w()||n.localId===null||n.localId===void 0||n.localId===""?null:{driveId:"local",itemId:"LocalId_"+n.localId,local:!0}},nucleusContentRefOf:function(n){if(!n)return null;var t=n.driveItemId;if(!t){var e=typeof n.id=="number"||typeof n.id=="string"&&/^\d+$/.test(n.id);t=e&&w()?null:n.id}if(typeof t=="string"){if(t.indexOf(u)===0)return{driveId:"local",itemId:"LocalId_"+t.slice(u.length),local:!0};if(t.indexOf("LocalId_")===0)return{driveId:"local",itemId:t,local:!0}}var r=this.driveIdOf(n);return r&&t?{driveId:r,itemId:t,local:!1}:this.localContentRefOf(n)}}})();