1
0
forked from osmarks/potatOS
potatOS/copy-cat/require.js

4 lines
17 KiB
JavaScript
Raw Permalink Normal View History

2023-11-12 14:57:16 +00:00
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.
* Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
*/var requirejs,require,define;!function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!!("undefined"!=typeof window&&"undefined"!=typeof navigator&&window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(t,n){return n||""}function isFunction(t){return"[object Function]"===ostring.call(t)}function isArray(t){return"[object Array]"===ostring.call(t)}function each(t,n){if(t){var r;for(r=0;r<t.length&&!(t[r]&&n(t[r],r,t));r+=1);}}function eachReverse(t,n){if(t){var r;for(r=t.length-1;r>-1&&!(t[r]&&n(t[r],r,t));r-=1);}}function hasProp(t,n){return hasOwn.call(t,n)}function getOwn(t,n){return hasProp(t,n)&&t[n]}function eachProp(t,n){var r;for(r in t)if(hasProp(t,r)&&n(t[r],r))break}function mixin(t,n,r,o){return n&&eachProp(n,function(n,a){(r||!hasProp(t,a))&&(!o||"object"!=typeof n||!n||isArray(n)||isFunction(n)||n instanceof RegExp?t[a]=n:(t[a]||(t[a]={}),mixin(t[a],n,r,o)))}),t}function bind(t,n){return function(){return n.apply(t,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(t){throw t}function getGlobal(t){if(!t)return t;var n=global;return each(t.split("."),function(t){n=n[t]}),n}function makeError(t,n,r,o){var a=Error(n+"\nhttps://requirejs.org/docs/errors.html#"+t);return a.requireType=t,a.requireModules=o,r&&(a.originalError=r),a}if(void 0===define){if(void 0!==requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}void 0===require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(t,n,r,o){var a,u,d=defContextName;return isArray(t)||"string"==typeof t||(u=t,isArray(n)?(t=n,n=r,r=o):t=[]),u&&u.context&&(d=u.context),(a=getOwn(contexts,d))||(a=contexts[d]=req.s.newContext(d)),u&&a.configure(u),a.require(t,n,r)},req.config=function(t){return req(t)},req.nextTick=void 0!==setTimeout?function(t){setTimeout(t,4)}:function(t){t()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(t){req[t]=function(){var n=contexts[defContextName];return n.require[t].apply(n,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],(baseElement=document.getElementsByTagName("base")[0])&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(t,n,r){var o=t.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return o.type=t.scriptType||"text/javascript",o.charset="utf-8",o.async=!0,o},req.load=function(t,n,r){var o,a=t&&t.config||{};if(isBrowser)return(o=req.createNode(a,n,r)).setAttribute("data-requirecontext",t.contextName),o.setAttribute("data-requiremodule",n),!o.attachEvent||o.attachEvent.toString&&0>o.attachEvent.toString().indexOf("[native code")||isOpera?(o.addEventListener("load",t.onScriptLoad,!1),o.addEventListener("error",t.onScriptError,!1)):(useInteractive=!0,o.attachEvent("onreadystatechange",t.onScriptLoad)),o.src=r,a.onNodeCreated&&a.onNodeCreated(o,a,n,r),currentlyAddingScript=o,baseElement?head.insertBefore(o,baseElement):head.appendChild(o),currentlyAddingScript=null,o;if(isWebWorker)try{setTimeout(function(){},0),importScripts(r),t.completeLoad(n)}catch(o){t.onError(makeError("importscripts","importScripts failed for "+n+" at "+r,o,[n]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(t){if(head||(head=t.parentNode),dataMain=t.getAttribut