21 lines
10 KiB
JavaScript
21 lines
10 KiB
JavaScript
(function(q){function A(f){this.name="TimeoutError";this.message=f||""}function B(f){this.name="RejectedError";this.message=f||""}function F(f,d,e,k){var c,a,b=[],g,h,r,l=function(a,c){f.length===b.push(n[a].exports)&&(c||k&&clearTimeout(g),d&&d(b))};k=k||v.timeout;for(r=0;h=f[r++];)if((c=n[h])&&1!==c.state)if(2===c.state)if(a=new B('Could resolve all dependencies; dependency "'+h+'" has been rejected.'),e)e(a);else throw a;else 3===c.state&&l(h,1);else(u[h]=u[h]||[]).push(l);k&&f.length<b.length&&
|
|
(g=setTimeout(function(){for(var g,c,d=0,h=0;g=f[d++];)for(h=0;c=b[h++];)g===c&&(b.splice(--h,1),f.splice(--d,1));a=new A("Load timeout of "+k+'ms exceeded for module(s) "'+f.join('", "')+'".');if(e)e(a);else throw a;},k))}function y(){var f=!1,d,e,k,c,a,b,g,h;if(arguments[0]!==C){for(d=0;(e=arguments[d++])&&(_type=(typeof e)[0]||(typeof e).slice(0,1));)"s"===_type?a?k=1:a=e:"f"===_type?g?h?k=1:h=e:g=e:"o"===_type&&(l.is(e,"array")?(b={requires:e},f=!0):b?g=e:b=e),k&&(c=new TypeError("define called with unrecognized signature; `"+
|
|
Array.prototype.join.call(arguments,", ")+"`."));b=b||{};a=a||b.UID;g=g||b.factory;h=h||b.onRejected}else(d=D.pop())?(a=arguments[1],b=d[0],g=d[1],h=d[2],f=d[3]):c=Error("Inconsistent naming queue");c||g||(b?(g=b,b={}):c=Error('Missing factory for module "'+a+'"'));!c&&n[a]&&(c=Error('Duplicate entry for module "'+a+'"'));if(c)if(h=h||arguments[2])h(c);else throw c;else a?(d=n[a]=b,d.UID=a,d.amdStyle=f,d.factory=g,d.state=1,d.requires=l.is(d.requires,"array")&&d.requires,d.inherits=l.is(d.inherits,
|
|
"array")&&d.inherits,d.compiles=l.is(d.compiles,"array")&&d.compiles,d.instances||(d.instances={instance1:{}})):D.unshift([b,g,h,f])}var n={},v={deepCopy:!0,baseUrl:"",namespace:"default",timeout:1E3,paths:{},shim:{}},l={},C={a:1},u={},D=[],z=Array.prototype.push;A.prototype=Error.prototype;B.prototype=Error.prototype;l.is=function(){var f=Object.prototype.hasOwnProperty,d=Object.prototype.toString,e={array:Array.isArray||function(a){return"[object Array]"==d.call(a)},arraylike:function(a){if(!a||
|
|
!a.length&&0!==a.length||e.window(a))return!1;var b=a.length;return 1===a.nodeType||e.array(a)||!e["function"](a)&&(0===b||"number"===typeof b&&0<b&&!l.is(a,"primitive")&&b-1 in a)},"boolean":function(a){return!0===a||!1===a},element:function(a){return!(!a||1!==a.nodeType)},finite:function(a){return isFinite(a)&&!isNaN(parseFloat(a))},integer:Number.isInteger||function(a){return"number"===typeof a&&e.finite(a)&&-9007199254740992<a&&9007199254740992>a&&Math.floor(a)===a},iterable:function(a){try{1 in
|
|
obj}catch(b){return!1}return!0},nan:function(a){return e.number(a)&&a!=+a},number:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},object:function(a){return a===Object(a)},primitive:function(a){return!0===a||!1===a||null==a||!!{string:1,number:1}[typeof a]},string:function(a){return"string"==typeof a||a instanceof String},undefined:function(a){return void 0===a},untyped:function(a){if(!a||a.nodeType||"[object Object]"!==d.call(a)||e.window(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&
|
|
!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}for(var g in a);return void 0===g||f.call(a,g)},window:function(a){return null!=a&&a==a.window},empty:function(a){if(a){if(l.is(a,"array"))return 0===a.length;for(var b in a)if(f.call(a,b))return!1}return!0}},k=0,c=["Arguments","Date","Function","RegExp"];for(;4>k;k++)e[c[k].toLowerCase()]=function(a){a="[object "+a+"]";return function(b){return d.call(b)==a}}(c[k]);e.args=e.arguments;e.bool=e["boolean"];e.plain=e.untyped;
|
|
return function(a,b){if(e["function"](b))return a===b(a);if(!e.string(b))return a===b;if((b=b.toLowerCase())&&e[b])return e[b](a);throw'Unknown type "'+b+'"';}}();l.each=function(){var f=Array.prototype.some;return function(d,e,k){var c,a;if(void 0===d)return obj;k=k||l;if(f&&d.some===f)return d.some(e,k),d;if(l.is(d,"array")||l.is(d,"arraylike")){c=0;for(a=d.length;c<a&&(void 0===d[c]||!e.call(k,d[c],c,d));c++);return d}for(c in d)if(d.hasOwnProperty(c)&&e.call(k,d[c],c,d))break;return d}}();l.merge=
|
|
function(f){var d,e,k,c,a,b=arguments.length,g=!1;f=arguments[0];var h=1,r,s,p=0;if(!0===f||!1===f)g=f,f=arguments[h],h++;l.is(arguments[b-1],"function")&&(a=arguments[b-1],b--);if(void 0===f)f={};else if(l.is(f,"primitive"))throw new TypeError("Cannot merge primitive data types: merge("+Array.prototype.join.call(arguments,", ")+")");s=l.is(f,"array");if(h<b)for(;h<=b;)if(c=arguments[h++]){s=s&&l.is(c,"array");for(k in c)e=f[k],d=c[k],void 0===d||d===f?s&&p--:(g&&d&&((r=l.is(d,"array"))||l.is(d,"untyped"))&&
|
|
(d=l.merge(g,e||(r?l.is(e,"array")?e:[]:l.is(e,"untyped")?e:{}),d,a)),a&&a(k,f,c)||(p&&(k=+k+p),f[k]=d));p=0}return f};l.subordinate=function(){function f(b){if(!b||b.data===c&&b.source&&(d===b.source||d.self&&d.self===b.source)){var h=a.shift();b=h[0];var h=h[1],f=h.length;f?1===f?b(h[0]):2===f?b(h[0],h[1]):3===f?b(h[0],h[1],h[2]):4===f?b(h[0],h[1],h[2],h[3]):b.apply(0,h):b()}}var d=window,e=Array.prototype.slice,k=d.postMessage,c="__fandango@"+Math.random().toString(36),a=[],b=function(){return k?
|
|
function(){k(c,"*")}:function(){setTimeout(f)}}();k&&(d.addEventListener?d.addEventListener("message",f,!1):d.attachEvent&&d.attachEvent("onmessage",f));return function(c){b(a.push([arguments[arguments.length-1],e.call(arguments).slice(0,-1)])-1)}}();var G=function(){var f={},d=[].slice,e=function(){return[]};return function(k,c){function a(a,c){return new b(a,c)}function b(a,b){var c=0,d=g(a,b),h=d.length;this.context=b||document;this.selector=a;for(this.length=h;c<h;c++)this[c]=d[c];return this}
|
|
var g,h,r,l;if(f[k])return f[k];for(l=c.length;h=c[--l];){h.selector&&(g=h.selector);if(source=h.prototype)if("function"===typeof source)source.call(b.prototype);else if(b.prototype.prototype)for(r in source)source.hasOwnProperty(r)&&(b.prototype[r]=source[r]);else b.prototype=source;if(source=h.utilities)if("function"===typeof source)source.utilities.call(a);else for(r in source)source.hasOwnProperty(r)&&(a[r]=source[r])}b.prototype.length=0;b.prototype.selector="";b.prototype.splice=d;b.prototype.fandango=
|
|
1;g||(g=e);return f[k]=a}}(),E=function(){function f(d,f,k,c){var a,b=n[d],g=l.is(b.factory,"function"),h=g?b.factory.length:0,r=b.amdStyle,s,p;c&&(a=G(b.compiles+"",c));for(p in b.instances)c=b.instances[p],c.context=void 0===c.context?b.context:c.context,c.deepCopy=void 0===c.deepCopy?b.deepCopy:c.deepCopy,c.namespace=void 0===c.namespace?b.namespace:c.namespace,s=[],r?s=f||[]:(a&&s.push(a),f&&s.push(f),h>s.length&&s.push(c.data?l.merge(c.deepCopy,{},c.data,b.data):b.data),h>s.length&&s.push(l.merge(c.deepCopy,
|
|
{},c,b))),c.exports=g?b.factory.apply(c.context,s)||{}:b.factory,void 0===b.exports&&(b.exports=k?c.exports?l.merge(!0,{},k,c.exports):k:c.exports);b.state=3;if(u[d])for(;u[d].length;)u[d].pop()(d)}return function e(k,c,a){var b,g;g=n[k];var h,r,s=[],p,q,t;b=[];var m;if(g){h=l.is(g.factory,"function")?g.factory.length:0;r=g.amdStyle;if(!c&&(g.requires||g.compiles||g.inherits)){g.requires&&z.apply(b,g.requires);g.inherits&&z.apply(b,g.inherits);g.compiles&&z.apply(b,g.compiles);for(c=0;m=b[c++];)if(n[m])if(3===
|
|
n[m].state)b.splice(--c,1);else if(2===n[m].state)throw Error('Could not instantiate "'+UID+'"; dependency "'+dependency+'" has been rejected.');if(0<b.length){l.subordinate(b,function(){e(k,!0)},x);return}}void 0===(b=g.deepCopy)&&(b=v.deepCopy);g=n[k]=l.merge(b,{},v,g);if(h&&g.requires)for(q=g.requires&&(r?[]:{}),c=0;m=g.requires[c++];)n[m]?r?q.push(n[m].exports):l.is(n[m].exports,"function")?q[m]=n[m].exports:l.merge(b,q[m]={},n[m].exports):s.push(m);if(g.inherits)for(t=g.inherits&&{},c=0;m=g.inherits[c++];)n[m]?
|
|
l.merge(b,t,n[m].exports):s.push(m);if(h&&g.compiles)for(p=g.compiles&&[],c=0;m=g.compiles[c++];)n[m]?p.push(n[m].exports):s.push(m);s.length?x(s,function(){},a):f(k,q,t,p)}else if(g=Error('Tried to invoke non-existent module "'+k+'"'),a)a(g);else throw g;}}();y.amd={};var x=function(){var f={},d=document.getElementsByTagName("head")[0],e="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),k=function(a){var b=document.createElement("script");b.setAttribute("id",a);b.type="text/javascript";
|
|
b.charset="utf-8";b.async=!0;return b},c=!(!(c=k())||!c.attachEvent||c.attachEvent.toString&&0>c.attachEvent.toString().indexOf("[native code")||e);buildUrl=function(){var a={"http://":1,"https://":1,"file://":1};return function(b){var c=b.toLowerCase(),d=c[0]||c.slice(0,1);"/"===d||"\\"===d||"h"===d&&(a[c.slice(0,7)]||a[c.slice(0,8)])||"f"===d&&a[c.slice(0,7)]||(b=v.baseUrl+b);".js"!==b.slice(-3)&&(b+=".js");return b}}();onErrorEvent=function(a,b,c,d){return function(e){f[b]=0;a.error=e||!0;d.parentElement.removeChild(d);
|
|
if(a.onError)a.onError(e,c,b)}};onLoadEvent=function(a,b,c,d,e){return function(){if((!e||"loaded"===d.readyState||"complete"===d.readyState)&&2===f[b]){f[b]=3;if(a.onPartial)a.onPartial(b,c,d);e?d.detachEvent("onreadystatechange",a.loadListener):(d.removeEventListener("load",a.loadListener),d.removeEventListener("error",a.errorListener));if(a.loaded.push(b)===a.paths.length&&a.onDone)a.onDone(a.load)}}};get=function(a){for(var b=0,g,h,e;!a.error&&(g=a.paths[b++]);)h=a.names[b-1],f[g]=2,e=k(g),c?
|
|
e.attachEvent("onreadystatechange",onLoadEvent(a,g,h,e,!0)):(a.loadListener=onLoadEvent(a,g,h,e),a.errorListener=onErrorEvent(a,g,h,e),e.addEventListener("load",a.loadListener,!1),e.addEventListener("error",a.errorListener,!1)),e.src=g,d.appendChild(e)};return function(a,b,c,d){var e=[],k=[],p={paths:[],names:[],loaded:[],error:null,loadListener:null,errorListener:null},u,t,m,w,x;p.onError=function(a,b,d){a instanceof Error||(a=Error('Could require "'+b+'"; an error occurred while trying to load "'+
|
|
d+'".'));if(c)c(a);else throw a;};for(x=0;t=a[x++];)if(n[t])if(3===n[t].state)k.push(n[t].exports);else{if(2===n[t].state)throw Error("require(): Rejected dependency. Cannot continue.");E(t,null,p.onError);e.push(t)}else f[u]||(u=buildUrl(v.paths[t]||t),p.paths.push(u),p.names.push(t)),e.push(t);e.length?(p.paths&&(p.onPartial=function(a,b,c){n[b]||((m=v.shim[b])?(w=l.is(m.exports,"function")?m.exports:function(){return q[m.exports]},y(b,w,p.onError)):y(C,b,p.onError));E(b,null,p.onError);d&&d(a,
|
|
c)},get(p)),F(e,function(a){b.apply(null,a)},p.onError)):b&&b.apply(null,k)}}();y("fandango",l);var H=q.fandango,I=q.define,J=q.require,w={fn:l,define:y,require:x,noConflict:function(f){q.define===y&&(q.define=I);q.require===x&&(q.require=J);f&&q.fandango===w&&(q.fandango=H);return w},defaults:function(f){return f?l.merge(v,f):v}};q.define||(q.define=w.define);q.require||(q.require=w.require);q.fandango=w})(this); |