Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bumped version and compiled dist versions

  • Loading branch information...
commit b0023eda9d474c71ac62110c6bb3e80a9ce1e643 1 parent efd3726
John Hann authored
27 README.md
Source Rendered
... ... @@ -1,8 +1,6 @@
1 1 curl (cujo resource loader)
2 2 =====================
3 3
4   -version 0.6.1
5   -
6 4 Check out the newly updated [wiki](https://github.com/cujojs/curl/wiki)!
7 5
8 6 See the [wiki](https://github.com/cujojs/curl/wiki) for information about using
@@ -22,13 +20,16 @@ Helpful link for updating submodules:
22 20 What's New?
23 21 =======
24 22
  23 +* 0.6.2
  24 + * curl no longer repeatedly downloads modules that don't return any value
  25 + (bug introduced in 0.6 refactor) fixes issue #63
25 26 * 0.6.1
26 27 * better CommonJS modules compatibility and circular dependency checking
27 28 * fixes an issue in which curl.js could attempt to download the same module
28 29 file twice if the module is required using relative paths from
29 30 different locations
30 31 * 0.6
31   - * works with underscore fork at [amdjs](https://github.com/amdjs/underscore)
  32 + * works with underscore fork at [amdjs](https://github.com/amdjs/underscore)
32 33 * tested and works with dojo 1.7.1 (using curl/shim/dojo16 as a preload)
33 34 * allows normal, non-AMD js files to return values to AMD modules (!exports
34 35 option)
@@ -136,10 +137,10 @@ How to get support
136 137
137 138 1. Go to the issues section of the curl repo (https://github.com/cujojs/curl/issues)
138 139 and search for an answer to your question or problem.
139   -2. If no answer exists, file a new ticket! Somebody will typically respond within a
  140 +2. If no answer exists, file a new ticket! Somebody will typically respond within a
140 141 few hours.
141 142
142   -It's that easy.
  143 +It's that easy.
143 144
144 145 ----------------------------------------
145 146
@@ -383,7 +384,7 @@ If there are no dependencies between two files, loading them sequentially is
383 384 a waste of time. These files could be loaded and executed in parallel (i.e
384 385 at the same time).
385 386
386   -An asynchronous loader does just that: it loads javascript files (and
  387 +An asynchronous loader does just that: it loads javascript files (and
387 388 other types of files) in parallel whenever possible.
388 389
389 390 curl.js has lots of company. Other async loaders include LABjs, Steal.js,
@@ -397,8 +398,8 @@ What is AMD?
397 398 ============
398 399
399 400 Asynchronous Module Definition is the CommonJS proposed standard for
400   -javascript modules that can be loaded by asynchronous loaders. It defines
401   -a simple API that developers can use to write their javascript modules so
  401 +javascript modules that can be loaded by asynchronous loaders. It defines
  402 +a simple API that developers can use to write their javascript modules so
402 403 that they may be loaded by any AMD-compliant loader.
403 404
404 405 [CommonJS AMD Proposal](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition)
@@ -413,7 +414,7 @@ Ultimately, both proposals (AMD and Modules 1.1) are in preparation for an
413 414 official [javascript modules](http://wiki.ecmascript.org/doku.php?id=harmony:modules)
414 415 specification and eventual implementation in browsers.
415 416
416   -If you don't want to wait for official javascript modules, then don't. The future
  417 +If you don't want to wait for official javascript modules, then don't. The future
417 418 is now. AMD works now -- and it's awesome.
418 419
419 420 AMD's API focuses on one globally-available function: `define()` and some
@@ -422,7 +423,7 @@ CommonJS-inspired variables, `require()`, `exports`, and `module`.
422 423 loaded before running a set of code. This code resides in a callback function
423 424 that is executed asynchronously, i.e. it runs later, not in the current
424 425 "thread". Specifically, it executes when all of the dependencies are loaded
425   -and ready.
  426 +and ready.
426 427
427 428 The proposal does not mandate that `require()` be specified globally. In fact,
428 429 at a global level, the concerns of a loader are about application bootstrapping
@@ -454,8 +455,8 @@ RequireJS <http://requirejs.org/>
454 455 backdraft loader <http://bdframework.org/bdLoad>
455 456
456 457 The beauty of AMD loaders is their ability to remove the drudgery of manually
457   -managing dependencies. Since all dependencies are listed within the
458   -modules, the loader will ensure that everything is loaded into the browser --
  458 +managing dependencies. Since all dependencies are listed within the
  459 +modules, the loader will ensure that everything is loaded into the browser --
459 460 and in the right order.
460 461
461 462 ----------------------------------------
@@ -578,7 +579,7 @@ By default, curl.js will look in the same folder as the current document's locat
578 579 For instance, if your web page is located at `http://my-domain/apps/myApp.html`,
579 580 curl.js will look for the JsonRest module at `http://my-domain/apps/dojo/store/JsonRest.js`.
580 581
581   -You can tell curl.js to find modules in other locations by specifying a baseUrl or
  582 +You can tell curl.js to find modules in other locations by specifying a baseUrl or
582 583 individual paths for each of your libraries. For example, if you specify a baseUrl of
583 584 `/resources/` and the following paths:
584 585
34 dist/curl-for-dojo1.6/curl.js
... ... @@ -1,19 +1,19 @@
1 1 /*
2 2 MIT License (c) copyright B Cavalier & J Hann */
3   -var o=!0,t=!1;
4   -(function(i){function l(){}function s(a,b){return 0==Q.call(a).indexOf("[object "+b)}function h(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function A(a,b){var c,e,d;e=1;a=a.replace(R,function(a,b,c){c&&e++;d=o;return""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function z(a){var b=a.indexOf("!");return{K:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function B(){}function C(a){B.prototype=a;a=new B;B.prototype=L;return a}function u(){function a(a,b,
5   -c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,k){a=c?function(a){a&&a(k)}:function(a,b){b&&b(k)};d=l;b(c?0:1,k);b=l;e=m};this.W=function(b,c,e){a(b,c,e)};this.h=function(a){c.$=a;d(o,a)};this.c=function(a){c.Z=a;d(t,a)};this.q=function(a){b(2,a)}}function q(a,b,c,e){a instanceof u?a.W(b,c,e):b(a)}function w(a,b,c){return function(){var e;0<=--a&&b&&(e=b.apply(m,arguments));0==a&&c&&c(e);return e}}function v(){function a(b,e,d){var f;f=
6   -j.e(g,m,[].concat(b));this.then=b=function(a,b){q(f,function(b){a&&a.apply(m,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);q(d,function(){j.i(f)})}var b=[].slice.call(arguments);s(b[0],"Object")&&(g=j.C(b.shift()),j.t(g));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==m)if(E!==m)E={A:"Multiple anonymous defines in url"};else if(!(b=j.T()))E=a;if(b!=m){var c=r[b];c||(c=j.k(b,g).d,c=r[b]=j.v(c,b));c instanceof u&&(c.Y=t,j.w(c,a))}}
7   -var g=i.curl,x=i.document,F=x&&(x.head||x.getElementsByTagName("head")[0]),y={},p={},M={},G={},L={},Q=L.toString,m,N={loaded:1,interactive:M,complete:1},r={},I=t,E,S=/\?/,O=/^\/|^[^:]+:\/\//,R=/(?:^|\/)(\.)(\.?)\/?/g,T=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,U=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,j;j={e:function(a,b,c,e){function d(a){return A(a,k.m)}function f(b,c){var e,f,n,g;e=c&&function(a){c.apply(m,a)};if(s(b,"String")){f=d(b);n=r[f];g=n instanceof u&&n.a;if(!(f in r))throw Error("Module not resolved: "+
8   -f);if(e)throw Error("require(id, callback) not allowed");return g||n}q(j.i(j.e(a,k.id,b)),e)}var k;k=new u;k.m=k.id=b||"";k.G=e;k.z=c;k.j=f;f.toUrl=function(b){return j.k(d(b),a).url};k.X=d;return k},v:function(a,b,c,e){var d,f,k,H;d=j.e(a,b,m,c);d.m=e==m?b:e;f=d.h;k=w(1,function(a){d.n=a;try{H=j.o(d)}catch(b){d.c(b)}});d.h=function(a){k(a);r[d.id]=H;f(H)};d.B=function(a){d.a&&(k(a),d.q(p))};return d},M:function(a,b,c,e){a=j.e(a,b,m,c);a.m=e;return a},S:function(a){return a.j},D:function(a){return a.a||
9   -(a.a={})},R:function(a){var b=a.p;b||(b=a.p={id:a.id,uri:j.F(a),exports:j.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=j.u(a.j.toUrl(a.id)))},C:function(a){function b(b,c){var d,f,g,n,m;for(m in b){g=b[m];n=a;f=z(h(g.id||g.name||m));d=f.K;if(f=f.g)n=e[f],n||(n=e[f]=C(a),n.f=C(a.f),n.b=[]),delete b[m];if(c){f=g;var K=void 0,p=void 0,K=f.path=h(f.path||f.location||""),p=f.main||"main";f.d=f.config;f.H="."==p.charAt(0)?h(A(p,K)):h(K)+"/"+p}else f={path:h(g)};f.L=d.split("/").length;
10   -d?(n.f[d]=f,n.b.push(d)):n.s=j.J(g,a)}}function c(a){var b=a.f;a.V=RegExp("^("+a.b.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var e;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};e=a.plugins=a.plugins||{};a.b=[];b(a.paths,t);b(a.packages,o);for(var d in e){var f=e[d].b;f&&(e[d].b=f.concat(a.b),c(e[d]))}c(a);return a},t:function(a){var b;(b=a.preloads)&&0<b.length&&q(I,function(){I=j.i(j.e(a,m,b,o))})},k:function(a,b,
11   -c){var e,d,f;e=b.f;c&&b.I&&0>a.indexOf("/")&&!(a in e)&&(a=h(b.I)+"/"+a);c=O.test(a)?a:a.replace(b.V,function(b){d=e[b]||{};f=d.d;return d.H&&b==a?d.H:d.path||""});return{path:c,d:f||g,url:j.J(c,b)}},J:function(a,b){var c=b.s;return c&&!O.test(a)?h(c)+"/"+a:a},u:function(a){return a+(S.test(a)?"":".js")},U:function(a,b,c){var e=x.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||i.event;if("load"==c.type||N[e.readyState])delete G[a.id],e.onload=e.onreadystatechange=e.onerror=
12   -"",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.charset="utf-8";e.async=o;e.src=a.url;G[a.id]=e;F.insertBefore(e,F.firstChild)},N:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(T,"").replace(U,function(a,d,f){f?c=c==f?m:c:c||b.push(d);return a});return b},Q:function(a){var b,c,e,d,f,k;f=a.length;e=a[f-1];d=s(e,"Function")?e.length:-1;2==f?s(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=a[0],c=a[1]);!c&&0<d&&(k=o,c=["require","exports","module"].slice(0,
13   -d).concat(j.N(e)));return{id:b,n:c||[],r:0<=d?e:function(){return e},l:k}},o:function(a){var b;b=a.r.apply(a.l?a.a:m,a.n);b===m&&a.a&&(b=a.p?a.a=a.p.a:a.a);return b},w:function(a,b){q(a.G||I,function(){a.r=b.r;a.l=b.l;a.z=b.n;j.i(a)})},i:function(a){function b(a,b,c){k[b]=a;c&&i(a,b)}function c(b,c){var e,d,f,k;e=w(1,function(a){d(a);l(a,c)});d=w(1,function(a){i(a,c)});f=j.O(b,a);(k=f instanceof u&&f.a)&&d(k);q(f,e,a.c,a.a&&function(a){f.a&&(a==y?d(f.a):a==p&&e(f.a))})}function e(){a.h(k)}var d,f,
14   -k,g,h,i,l;k=[];f=a.z;g=f.length;0==f.length&&e();i=w(g,b,function(){a.B&&a.B(k)});l=w(g,b,e);for(d=0;d<g;d++)h=f[d],h in J?(l(J[h](a),d,o),a.a&&a.q(y)):h?c(h,d):l(m,d,o);return a},P:function(a){j.F(a);j.U(a,function(){var b=E;E=m;a.Y!==t&&(!b||b.A?a.c(Error((b&&b.A||"define() missing or duplicated: url").replace("url",a.url))):j.w(a,b))},a.c);return a},O:function(a,b){var c,e,d,f,k,h,p,l,i,n;c=b.X;e=b.G;d=z(a);h=d.K;f=c(d.g||h);p=j.k(f,g,!!d.g);if(d.g)k=f;else if(k=p.d.moduleLoader)h=f,f=k,p=j.k(k,
15   -g);l=r[f];l||(l=r[f]=j.v(p.d,f,e,d.g?p.path:m),l.url=j.u(p.url),j.P(l));f==k&&(i=new u,n=g.plugins[k]||g,q(l,function(a){var b,d,f;f=a.dynamic;h="normalize"in a?a.normalize(h,c,n)||"":c(h);d=k+"!"+h;b=r[d];if(!b){b=j.M(n,d,e,h);f||(r[d]=b);var g=function(a){b.h(a);f||(r[d]=a)};g.resolve=g;g.reject=b.c;a.load(h,b.j,g,n)}i!=b&&q(b,i.h,i.c,i.q)},i.c));return i||l},T:function(){var a;if(!s(i.opera,"Opera"))for(var b in G)if(N[G[b].readyState]==M){a=b;break}return a}};J={require:j.S,exports:j.D,module:j.R};
16   -if(!s(g,"Function")){g=j.C(g||{});j.t(g);var P;(g.apiContext||i)[g.apiName||"curl"]=v;r.curl=v;P=i.define=function(){var a=j.Q(arguments);D(a)};v.version="0.6.1";P.amd={plugins:o,jQuery:o,curl:"0.6.1"};r["curl/_privileged"]={core:j,cache:r,cfg:g,_define:D,_curl:v,Promise:u}}})(this);
17   -(function(i,l){function s(){if(!l.body)return t;y||(y=l.createTextNode(""));try{return l.body.removeChild(l.body.appendChild(y)),y=F,o}catch(g){return t}}function h(){var h;h=B[l[z]]&&s();if(!q&&h){q=o;for(clearTimeout(x);D=g.pop();)D();u&&(l[z]="complete");for(var i;i=C.shift();)i()}return h}function A(){h();q||(x=setTimeout(A,w))}var z="readyState",B={loaded:1,interactive:1,complete:1},C=[],u=l&&"string"!=typeof l[z],q=t,w=10,v,D,g=[],x,F,y;v="addEventListener"in i?function(g,i){g.addEventListener(i,
18   -h,t);return function(){g.removeEventListener(i,h,t)}}:function(g,i){g.attachEvent("on"+i,h);return function(){g.detachEvent(i,h)}};l&&!h()&&(g=[v(i,"load"),v(l,"readystatechange"),v(i,"DOMContentLoaded")],x=setTimeout(A,w));define("curl/domReady",function(){function g(h){q?h():C.push(h)}g.then=g;g.amd=o;return g})})(this,this.document);
19   -define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(i,l){function s(h){h.ready||(h.ready=function(h){l(h)});h.nameToUrl||(h.nameToUrl=function(i,l){return h.toUrl(i+(l||""))})}var h=i.core.o;s(i._curl);i.core.o=function(i){s(i.j);return h(i)};return o});define("domReady",["curl/domReady"],function(i){return{load:function(l,s,h){i(h)}}});
  3 +var p=!0,t=!1;
  4 +(function(g){function l(){}function s(a,b){return 0==P.call(a).indexOf("[object "+b)}function k(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function A(a,b){var c,f,d;f=1;a=a.replace(Q,function(a,b,c){c&&f++;d=p;return""});return d?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function z(a){var b=a.indexOf("!");return{K:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function B(){}function C(a){B.prototype=a;a=new B;B.prototype=K;return a}function u(){function a(a,b,
  5 +c){f.push([a,b,c])}function b(a,b){for(var c,d=0;c=f[d++];)(c=c[a])&&c(b)}var c,f,d;c=this;f=[];d=function(c,j){a=c?function(a){a&&a(j)}:function(a,b){b&&b(j)};d=l;b(c?0:1,j);b=l;f=m};this.W=function(b,c,f){a(b,c,f)};this.h=function(a){c.$=a;d(p,a)};this.c=function(a){c.Z=a;d(t,a)};this.q=function(a){b(2,a)}}function q(a,b,c,f){a instanceof u?a.W(b,c,f):b(a)}function w(a,b,c){return function(){var f;0<=--a&&b&&(f=b.apply(m,arguments));0==a&&c&&c(f);return f}}function v(){function a(b,f,d){var e;e=
  6 +i.e(h,m,[].concat(b));this.then=b=function(a,b){q(e,function(b){a&&a.apply(m,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,e)};f&&b(f);q(d,function(){i.i(e)})}var b=[].slice.call(arguments);s(b[0],"Object")&&(h=i.C(b.shift()),i.t(h));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==m)if(E!==m)E={A:"Multiple anonymous defines in url"};else if(!(b=i.T()))E=a;if(b!=m){var c=o[b];b in o||(c=i.k(b,h).d,c=o[b]=i.v(c,b));c instanceof u&&(c.Y=t,i.w(c,
  7 +a))}}var h=g.curl,x=g.document,F=x&&(x.head||x.getElementsByTagName("head")[0]),y={},r={},L={},G={},K={},P=K.toString,m,M={loaded:1,interactive:L,complete:1},o={},I=t,E,R=/\?/,N=/^\/|^[^:]+:\/\//,Q=/(?:^|\/)(\.)(\.?)\/?/g,S=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,T=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,i;i={e:function(a,b,c,f){function d(a){return A(a,j.m)}function e(b,c){var f,e,n,h;f=c&&function(a){c.apply(m,a)};if(s(b,"String")){e=d(b);n=o[e];h=n instanceof u&&n.a;if(!(e in
  8 +o))throw Error("Module not resolved: "+e);if(f)throw Error("require(id, callback) not allowed");return h||n}q(i.i(i.e(a,j.id,b)),f)}var j;j=new u;j.m=j.id=b||"";j.G=f;j.z=c;j.j=e;e.toUrl=function(b){return i.k(d(b),a).url};j.X=d;return j},v:function(a,b,c,f){var d,e,j,H;d=i.e(a,b,m,c);d.m=f==m?b:f;e=d.h;j=w(1,function(a){d.n=a;try{H=i.o(d)}catch(b){d.c(b)}});d.h=function(a){j(a);o[d.id]=H;e(H)};d.B=function(a){d.a&&(j(a),d.q(r))};return d},M:function(a,b,c,f){a=i.e(a,b,m,c);a.m=f;return a},S:function(a){return a.j},
  9 +D:function(a){return a.a||(a.a={})},R:function(a){var b=a.p;b||(b=a.p={id:a.id,uri:i.F(a),exports:i.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=i.u(a.j.toUrl(a.id)))},C:function(a){function b(b,c){var d,e,h,n,m;for(m in b){h=b[m];n=a;e=z(k(h.id||h.name||m));d=e.K;if(e=e.g)n=f[e],n||(n=f[e]=C(a),n.f=C(a.f),n.b=[]),delete b[m];if(c){e=h;var r=void 0,g=void 0,r=e.path=k(e.path||e.location||""),g=e.main||"main";e.d=e.config;e.H="."==g.charAt(0)?k(A(g,r)):k(r)+"/"+g}else e={path:k(h)};
  10 +e.L=d.split("/").length;d?(n.f[d]=e,n.b.push(d)):n.s=i.J(h,a)}}function c(a){var b=a.f;a.V=RegExp("^("+a.b.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var f;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};f=a.plugins=a.plugins||{};a.b=[];b(a.paths,t);b(a.packages,p);for(var d in f){var e=f[d].b;e&&(f[d].b=e.concat(a.b),c(f[d]))}c(a);return a},t:function(a){var b;(b=a.preloads)&&0<b.length&&q(I,function(){I=i.i(i.e(a,m,
  11 +b,p))})},k:function(a,b,c){var f,d,e;f=b.f;c&&b.I&&0>a.indexOf("/")&&!(a in f)&&(a=k(b.I)+"/"+a);c=N.test(a)?a:a.replace(b.V,function(b){d=f[b]||{};e=d.d;return d.H&&b==a?d.H:d.path||""});return{path:c,d:e||h,url:i.J(c,b)}},J:function(a,b){var c=b.s;return c&&!N.test(a)?k(c)+"/"+a:a},u:function(a){return a+(R.test(a)?"":".js")},U:function(a,b,c){var f=x.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||g.event;if("load"==c.type||M[f.readyState])delete G[a.id],f.onload=f.onreadystatechange=
  12 +f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.charset="utf-8";f.async=p;f.src=a.url;G[a.id]=f;F.insertBefore(f,F.firstChild)},N:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(S,"").replace(T,function(a,d,e){e?c=c==e?m:c:c||b.push(d);return a});return b},Q:function(a){var b,c,f,d,e,j;e=a.length;f=a[e-1];d=s(f,"Function")?f.length:-1;2==e?s(a[0],"Array")?c=a[0]:b=a[0]:3==e&&(b=a[0],c=a[1]);!c&&0<d&&(j=p,c=["require","exports",
  13 +"module"].slice(0,d).concat(i.N(f)));return{id:b,n:c||[],r:0<=d?f:function(){return f},l:j}},o:function(a){var b;b=a.r.apply(a.l?a.a:m,a.n);b===m&&a.a&&(b=a.p?a.a=a.p.a:a.a);return b},w:function(a,b){q(a.G||I,function(){a.r=b.r;a.l=b.l;a.z=b.n;i.i(a)})},i:function(a){function b(a,b,c){j[b]=a;c&&k(a,b)}function c(b,c){var f,d,e,j;f=w(1,function(a){d(a);l(a,c)});d=w(1,function(a){k(a,c)});e=i.O(b,a);(j=e instanceof u&&e.a)&&d(j);q(e,f,a.c,a.a&&function(a){e.a&&(a==y?d(e.a):a==r&&f(e.a))})}function f(){a.h(j)}
  14 +var d,e,j,h,g,k,l;j=[];e=a.z;h=e.length;0==e.length&&f();k=w(h,b,function(){a.B&&a.B(j)});l=w(h,b,f);for(d=0;d<h;d++)g=e[d],g in J?(l(J[g](a),d,p),a.a&&a.q(y)):g?c(g,d):l(m,d,p);return a},P:function(a){i.F(a);i.U(a,function(){var b=E;E=m;a.Y!==t&&(!b||b.A?a.c(Error((b&&b.A||"define() missing or duplicated: url").replace("url",a.url))):i.w(a,b))},a.c);return a},O:function(a,b){var c,f,d,e,j,g,k,r,l,n;c=b.X;f=b.G;d=z(a);g=d.K;e=c(d.g||g);k=i.k(e,h,!!d.g);if(d.g)j=e;else if(j=k.d.moduleLoader)g=e,e=
  15 +j,k=i.k(j,h);r=o[e];e in o||(r=o[e]=i.v(k.d,e,f,d.g?k.path:m),r.url=i.u(k.url),i.P(r));e==j&&(l=new u,n=h.plugins[j]||h,q(r,function(a){var b,d,e;e=a.dynamic;g="normalize"in a?a.normalize(g,c,n)||"":c(g);d=j+"!"+g;b=o[d];if(!(d in o)){b=i.M(n,d,f,g);e||(o[d]=b);var h=function(a){b.h(a);e||(o[d]=a)};h.resolve=h;h.reject=b.c;a.load(g,b.j,h,n)}l!=b&&q(b,l.h,l.c,l.q)},l.c));return l||r},T:function(){var a;if(!s(g.opera,"Opera"))for(var b in G)if(M[G[b].readyState]==L){a=b;break}return a}};J={require:i.S,
  16 +exports:i.D,module:i.R};if(!s(h,"Function")){h=i.C(h||{});i.t(h);var O;(h.apiContext||g)[h.apiName||"curl"]=v;o.curl=v;O=g.define=function(){var a=i.Q(arguments);D(a)};v.version="0.6.2";O.amd={plugins:p,jQuery:p,curl:"0.6.2"};o["curl/_privileged"]={core:i,cache:o,cfg:h,_define:D,_curl:v,Promise:u}}})(this);
  17 +(function(g,l){function s(){if(!l.body)return t;y||(y=l.createTextNode(""));try{return l.body.removeChild(l.body.appendChild(y)),y=F,p}catch(h){return t}}function k(){var g;g=B[l[z]]&&s();if(!q&&g){q=p;for(clearTimeout(x);D=h.pop();)D();u&&(l[z]="complete");for(var k;k=C.shift();)k()}return g}function A(){k();q||(x=setTimeout(A,w))}var z="readyState",B={loaded:1,interactive:1,complete:1},C=[],u=l&&"string"!=typeof l[z],q=t,w=10,v,D,h=[],x,F,y;v="addEventListener"in g?function(g,h){g.addEventListener(h,
  18 +k,t);return function(){g.removeEventListener(h,k,t)}}:function(g,h){g.attachEvent("on"+h,k);return function(){g.detachEvent(h,k)}};l&&!k()&&(h=[v(g,"load"),v(l,"readystatechange"),v(g,"DOMContentLoaded")],x=setTimeout(A,w));define("curl/domReady",function(){function g(h){q?h():C.push(h)}g.then=g;g.amd=p;return g})})(this,this.document);
  19 +define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(g,l){function s(g){g.ready||(g.ready=function(g){l(g)});g.nameToUrl||(g.nameToUrl=function(k,l){return g.toUrl(k+(l||""))})}var k=g.core.o;s(g._curl);g.core.o=function(g){s(g.j);return k(g)};return p});define("domReady",["curl/domReady"],function(g){return{load:function(l,s,k){g(k)}}});
28 dist/curl-for-jQuery/curl.js
... ... @@ -1,22 +1,22 @@
1 1 /*
2 2 MIT License (c) copyright B Cavalier & J Hann */
3 3 var s=!0,z=!1;
4   -(function(q){function d(){}function t(a,b){return 0==N.call(a).indexOf("[object "+b)}function l(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function h(a,b){var f,g,e;g=1;a=a.replace(O,function(a,b,f){f&&g++;e=s;return""});return e?(f=b.split("/"),f.splice(f.length-g,g),f.concat(a||[]).join("/")):a}function A(a){var b=a.indexOf("!");return{L:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function B(){}function v(a){B.prototype=a;a=new B;B.prototype=i;return a}function y(){function a(a,b,
5   -f){g.push([a,b,f])}function b(a,b){for(var f,e=0;f=g[e++];)(f=f[a])&&f(b)}var f,g,e;f=this;g=[];e=function(f,c){a=f?function(a){a&&a(c)}:function(a,b){b&&b(c)};e=d;b(f?0:1,c);b=d;g=r};this.Z=function(b,f,g){a(b,f,g)};this.h=function(a){f.r=a;e(s,a)};this.c=function(a){f.ca=a;e(z,a)};this.o=function(a){b(2,a)}}function o(a,b,f,g){a instanceof y?a.Z(b,f,g):b(a)}function C(a,b,f){return function(){var g;0<=--a&&b&&(g=b.apply(r,arguments));0==a&&f&&f(g);return g}}function w(){function a(b,g,e){var n;
6   -n=k.e(c,r,[].concat(b));this.then=b=function(a,b){o(n,function(b){a&&a.apply(r,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,f){return new a(b,f,n)};g&&b(g);o(e,function(){k.i(n)})}var b=[].slice.call(arguments);t(b[0],"Object")&&(c=k.C(b.shift()),k.t(c));return new a(b[0],b[1])}function F(a){var b=a.id;if(b==r)if(G!==r)G={A:"Multiple anonymous defines in url"};else if(!(b=k.V()))G=a;if(b!=r){var f=x[b];f||(f=k.j(b,c).d,f=x[b]=k.v(f,b));f instanceof y&&(f.ba=z,k.w(f,
7   -a))}}var c=q.curl,m=q.document,E=m&&(m.head||m.getElementsByTagName("head")[0]),D={},j={},p={},H={},i={},N=i.toString,r,K={loaded:1,interactive:p,complete:1},x={},I=z,G,P=/\?/,L=/^\/|^[^:]+:\/\//,O=/(?:^|\/)(\.)(\.?)\/?/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,k;k={e:function(a,b,f,g){function e(a){return h(a,u.l)}function c(b,f){var g,n,d,j;g=f&&function(a){f.apply(r,a)};if(t(b,"String")){n=e(b);d=x[n];j=d instanceof y&&d.a;if(!(n in
8   -x))throw Error("Module not resolved: "+n);if(g)throw Error("require(id, callback) not allowed");return j||d}o(k.i(k.e(a,u.id,b)),g)}var u;u=new y;u.l=u.id=b||"";u.G=g;u.z=f;u.p=c;c.toUrl=function(b){return k.j(e(b),a).url};u.aa=e;return u},v:function(a,b,f,g){var e,c,u,d;e=k.e(a,b,r,f);e.l=g==r?b:g;c=e.h;u=C(1,function(a){e.m=a;try{d=k.O(e)}catch(b){e.c(b)}});e.h=function(a){u(a);x[e.id]=d;c(d)};e.B=function(a){e.a&&(u(a),e.o(j))};return e},N:function(a,b,f,g){a=k.e(a,b,r,f);a.l=g;return a},U:function(a){return a.p},
9   -D:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:k.F(a),exports:k.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=k.u(a.p.toUrl(a.id)))},C:function(a){function b(b,f){var c,e,n,d,j;for(j in b){n=b[j];d=a;e=A(l(n.id||n.name||j));c=e.L;if(e=e.g)d=g[e],d||(d=g[e]=v(a),d.f=v(a.f),d.b=[]),delete b[j];if(f){e=n;var i=void 0,m=void 0,i=e.path=l(e.path||e.location||""),m=e.main||"main";e.d=e.config;e.H="."==m.charAt(0)?l(h(m,i)):l(i)+"/"+m}else e={path:l(n)};
  4 +(function(q){function d(){}function t(a,b){return 0==N.call(a).indexOf("[object "+b)}function l(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function h(a,b){var f,g,e;g=1;a=a.replace(O,function(a,b,f){f&&g++;e=s;return""});return e?(f=b.split("/"),f.splice(f.length-g,g),f.concat(a||[]).join("/")):a}function A(a){var b=a.indexOf("!");return{L:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function B(){}function w(a){B.prototype=a;a=new B;B.prototype=i;return a}function y(){function a(a,b,
  5 +f){g.push([a,b,f])}function b(a,b){for(var f,e=0;f=g[e++];)(f=f[a])&&f(b)}var f,g,e;f=this;g=[];e=function(f,c){a=f?function(a){a&&a(c)}:function(a,b){b&&b(c)};e=d;b(f?0:1,c);b=d;g=r};this.Z=function(b,f,g){a(b,f,g)};this.h=function(a){f.r=a;e(s,a)};this.c=function(a){f.ca=a;e(z,a)};this.o=function(a){b(2,a)}}function o(a,b,f,g){a instanceof y?a.Z(b,f,g):b(a)}function C(a,b,f){return function(){var g;0<=--a&&b&&(g=b.apply(r,arguments));0==a&&f&&f(g);return g}}function x(){function a(b,g,e){var n;
  6 +n=k.e(c,r,[].concat(b));this.then=b=function(a,b){o(n,function(b){a&&a.apply(r,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,f){return new a(b,f,n)};g&&b(g);o(e,function(){k.i(n)})}var b=[].slice.call(arguments);t(b[0],"Object")&&(c=k.C(b.shift()),k.t(c));return new a(b[0],b[1])}function F(a){var b=a.id;if(b==r)if(G!==r)G={A:"Multiple anonymous defines in url"};else if(!(b=k.V()))G=a;if(b!=r){var f=u[b];b in u||(f=k.j(b,c).d,f=u[b]=k.v(f,b));f instanceof y&&(f.ba=z,k.w(f,
  7 +a))}}var c=q.curl,m=q.document,E=m&&(m.head||m.getElementsByTagName("head")[0]),D={},j={},p={},H={},i={},N=i.toString,r,K={loaded:1,interactive:p,complete:1},u={},I=z,G,P=/\?/,L=/^\/|^[^:]+:\/\//,O=/(?:^|\/)(\.)(\.?)\/?/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,k;k={e:function(a,b,f,g){function e(a){return h(a,v.l)}function c(b,f){var g,n,d,j;g=f&&function(a){f.apply(r,a)};if(t(b,"String")){n=e(b);d=u[n];j=d instanceof y&&d.a;if(!(n in
  8 +u))throw Error("Module not resolved: "+n);if(g)throw Error("require(id, callback) not allowed");return j||d}o(k.i(k.e(a,v.id,b)),g)}var v;v=new y;v.l=v.id=b||"";v.G=g;v.z=f;v.p=c;c.toUrl=function(b){return k.j(e(b),a).url};v.aa=e;return v},v:function(a,b,f,g){var e,c,v,d;e=k.e(a,b,r,f);e.l=g==r?b:g;c=e.h;v=C(1,function(a){e.m=a;try{d=k.O(e)}catch(b){e.c(b)}});e.h=function(a){v(a);u[e.id]=d;c(d)};e.B=function(a){e.a&&(v(a),e.o(j))};return e},N:function(a,b,f,g){a=k.e(a,b,r,f);a.l=g;return a},U:function(a){return a.p},
  9 +D:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:k.F(a),exports:k.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=k.u(a.p.toUrl(a.id)))},C:function(a){function b(b,f){var c,e,n,d,j;for(j in b){n=b[j];d=a;e=A(l(n.id||n.name||j));c=e.L;if(e=e.g)d=g[e],d||(d=g[e]=w(a),d.f=w(a.f),d.b=[]),delete b[j];if(f){e=n;var i=void 0,m=void 0,i=e.path=l(e.path||e.location||""),m=e.main||"main";e.d=e.config;e.H="."==m.charAt(0)?l(h(m,i)):l(i)+"/"+m}else e={path:l(n)};
10 10 e.M=c.split("/").length;c?(d.f[c]=e,d.b.push(c)):d.s=k.K(n,a)}}function f(a){var b=a.f;a.Y=RegExp("^("+a.b.sort(function(a,f){return b[a].M<b[f].M}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var g;a.s=a.baseUrl||"";a.J="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};g=a.plugins=a.plugins||{};a.b=[];b(a.paths,z);b(a.packages,s);for(var c in g){var n=g[c].b;n&&(g[c].b=n.concat(a.b),f(g[c]))}f(a);return a},t:function(a){var b;(b=a.preloads)&&0<b.length&&o(I,function(){I=k.i(k.e(a,r,
11 11 b,s))})},j:function(a,b,f){var g,e,d;g=b.f;f&&b.J&&0>a.indexOf("/")&&!(a in g)&&(a=l(b.J)+"/"+a);f=L.test(a)?a:a.replace(b.Y,function(b){e=g[b]||{};d=e.d;return e.H&&b==a?e.H:e.path||""});return{path:f,d:d||c,url:k.K(f,b)}},K:function(a,b){var f=b.s;return f&&!L.test(a)?l(f)+"/"+a:a},u:function(a){return a+(P.test(a)?"":".js")},W:function(a,b,f){var c=m.createElement("script");c.onload=c.onreadystatechange=function(f){f=f||q.event;if("load"==f.type||K[c.readyState])delete H[a.id],c.onload=c.onreadystatechange=
12 12 c.onerror="",b()};c.onerror=function(){f(Error("Syntax or http error: "+a.url))};c.charset="utf-8";c.async=s;c.src=a.url;H[a.id]=c;E.insertBefore(c,E.firstChild)},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(Q,"").replace(R,function(a,e,d){d?c=c==d?r:c:c||b.push(e);return a});return b},S:function(a){var b,c,g,e,d,j;d=a.length;g=a[d-1];e=t(g,"Function")?g.length:-1;2==d?t(a[0],"Array")?c=a[0]:b=a[0]:3==d&&(b=a[0],c=a[1]);!c&&0<e&&(j=s,c=["require","exports",
13   -"module"].slice(0,e).concat(k.P(g)));return{id:b,m:c||[],q:0<=e?g:function(){return g},k:j}},O:function(a){var b;b=a.q.apply(a.k?a.a:r,a.m);b===r&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},w:function(a,b){o(a.G||I,function(){a.q=b.q;a.k=b.k;a.z=b.m;k.i(a)})},i:function(a){function b(a,b,c){i[b]=a;c&&l(a,b)}function c(b,e){var f,d,g,i;f=C(1,function(a){d(a);p(a,e)});d=C(1,function(a){l(a,e)});g=k.Q(b,a);(i=g instanceof y&&g.a)&&d(i);o(g,f,a.c,a.a&&function(a){g.a&&(a==D?d(g.a):a==j&&f(g.a))})}function d(){a.h(i)}
  13 +"module"].slice(0,e).concat(k.P(g)));return{id:b,m:c||[],q:0<=e?g:function(){return g},k:j}},O:function(a){var b;b=a.q.apply(a.k?a.a:r,a.m);b===r&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},w:function(a,b){o(a.G||I,function(){a.q=b.q;a.k=b.k;a.z=b.m;k.i(a)})},i:function(a){function b(a,b,c){i[b]=a;c&&l(a,b)}function c(b,e){var f,d,g,n;f=C(1,function(a){d(a);p(a,e)});d=C(1,function(a){l(a,e)});g=k.Q(b,a);(n=g instanceof y&&g.a)&&d(n);o(g,f,a.c,a.a&&function(a){g.a&&(a==D?d(g.a):a==j&&f(g.a))})}function d(){a.h(i)}
14 14 var e,n,i,m,h,l,p;i=[];n=a.z;m=n.length;0==n.length&&d();l=C(m,b,function(){a.B&&a.B(i)});p=C(m,b,d);for(e=0;e<m;e++)h=n[e],h in J?(p(J[h](a),e,s),a.a&&a.o(D)):h?c(h,e):p(r,e,s);return a},R:function(a){k.F(a);k.W(a,function(){var b=G;G=r;a.ba!==z&&(!b||b.A?a.c(Error((b&&b.A||"define() missing or duplicated: url").replace("url",a.url))):k.w(a,b))},a.c);return a},Q:function(a,b){var f,d,e,j,i,m,h,p,l,E;f=b.aa;d=b.G;e=A(a);m=e.L;j=f(e.g||m);h=k.j(j,c,!!e.g);if(e.g)i=j;else if(i=h.d.moduleLoader)m=j,
15   -j=i,h=k.j(i,c);p=x[j];p||(p=x[j]=k.v(h.d,j,d,e.g?h.path:r),p.url=k.u(h.url),k.R(p));j==i&&(l=new y,E=c.plugins[i]||c,o(p,function(a){var b,c,e;e=a.dynamic;m="normalize"in a?a.normalize(m,f,E)||"":f(m);c=i+"!"+m;b=x[c];if(!b){b=k.N(E,c,d,m);e||(x[c]=b);var j=function(a){b.h(a);e||(x[c]=a)};j.resolve=j;j.reject=b.c;a.load(m,b.p,j,E)}l!=b&&o(b,l.h,l.c,l.o)},l.c));return l||p},V:function(){var a;if(!t(q.opera,"Opera"))for(var b in H)if(K[H[b].readyState]==p){a=b;break}return a}};J={require:k.U,exports:k.D,
16   -module:k.T};if(!t(c,"Function")){c=k.C(c||{});k.t(c);var M;(c.apiContext||q)[c.apiName||"curl"]=w;x.curl=w;M=q.define=function(){var a=k.S(arguments);F(a)};w.version="0.6.1";M.amd={plugins:s,jQuery:s,curl:"0.6.1"};x["curl/_privileged"]={core:k,cache:x,cfg:c,_define:F,_curl:w,Promise:y}}})(this);
17   -(function(q,d){function t(){if(!d.body)return z;D||(D=d.createTextNode(""));try{return d.body.removeChild(d.body.appendChild(D)),D=E,s}catch(c){return z}}function l(){var j;j=B[d[A]]&&t();if(!o&&j){o=s;for(clearTimeout(m);F=c.pop();)F();y&&(d[A]="complete");for(var h;h=v.shift();)h()}return j}function h(){l();o||(m=setTimeout(h,C))}var A="readyState",B={loaded:1,interactive:1,complete:1},v=[],y=d&&"string"!=typeof d[A],o=z,C=10,w,F,c=[],m,E,D;w="addEventListener"in q?function(c,d){c.addEventListener(d,
18   -l,z);return function(){c.removeEventListener(d,l,z)}}:function(c,d){c.attachEvent("on"+d,l);return function(){c.detachEvent(d,l)}};d&&!l()&&(c=[w(q,"load"),w(d,"readystatechange"),w(q,"DOMContentLoaded")],m=setTimeout(h,C));define("curl/domReady",function(){function c(d){o?d():v.push(d)}c.then=c;c.amd=s;return c})})(this,this.document);
  15 +j=i,h=k.j(i,c);p=u[j];j in u||(p=u[j]=k.v(h.d,j,d,e.g?h.path:r),p.url=k.u(h.url),k.R(p));j==i&&(l=new y,E=c.plugins[i]||c,o(p,function(a){var b,c,e;e=a.dynamic;m="normalize"in a?a.normalize(m,f,E)||"":f(m);c=i+"!"+m;b=u[c];if(!(c in u)){b=k.N(E,c,d,m);e||(u[c]=b);var j=function(a){b.h(a);e||(u[c]=a)};j.resolve=j;j.reject=b.c;a.load(m,b.p,j,E)}l!=b&&o(b,l.h,l.c,l.o)},l.c));return l||p},V:function(){var a;if(!t(q.opera,"Opera"))for(var b in H)if(K[H[b].readyState]==p){a=b;break}return a}};J={require:k.U,
  16 +exports:k.D,module:k.T};if(!t(c,"Function")){c=k.C(c||{});k.t(c);var M;(c.apiContext||q)[c.apiName||"curl"]=x;u.curl=x;M=q.define=function(){var a=k.S(arguments);F(a)};x.version="0.6.2";M.amd={plugins:s,jQuery:s,curl:"0.6.2"};u["curl/_privileged"]={core:k,cache:u,cfg:c,_define:F,_curl:x,Promise:y}}})(this);
  17 +(function(q,d){function t(){if(!d.body)return z;D||(D=d.createTextNode(""));try{return d.body.removeChild(d.body.appendChild(D)),D=E,s}catch(c){return z}}function l(){var j;j=B[d[A]]&&t();if(!o&&j){o=s;for(clearTimeout(m);F=c.pop();)F();y&&(d[A]="complete");for(var h;h=w.shift();)h()}return j}function h(){l();o||(m=setTimeout(h,C))}var A="readyState",B={loaded:1,interactive:1,complete:1},w=[],y=d&&"string"!=typeof d[A],o=z,C=10,x,F,c=[],m,E,D;x="addEventListener"in q?function(c,d){c.addEventListener(d,
  18 +l,z);return function(){c.removeEventListener(d,l,z)}}:function(c,d){c.attachEvent("on"+d,l);return function(){c.detachEvent(d,l)}};d&&!l()&&(c=[x(q,"load"),x(d,"readystatechange"),x(q,"DOMContentLoaded")],m=setTimeout(h,C));define("curl/domReady",function(){function c(d){o?d():w.push(d)}c.then=c;c.amd=s;return c})})(this,this.document);
19 19 (function(q,d){function t(c,m,l){function D(d){d=d||q.event;if("load"==d.type||y[i.readyState])i.onload=i[o]=i.onerror="",c.a&&(c.r=h(c.a)),!c.a||c.r?m(i):j()}function j(){i.onload=i[o]=i.onerror="";l&&l(Error("Script error or http error: "+c.url))}function p(){i.onload&&y[i.readyState]?D({}):i.onload&&t<new Date?j():setTimeout(p,10)}var t,i;t=(new Date).valueOf()+1E3*(c.$||300);i=d.createElement("script");l&&c.a&&setTimeout(p,10);i.type=c.I||"text/javascript";i.onload=i[o]=D;i.onerror=j;i.charset=
20   -c.charset||"utf-8";i.async=!c.X;i.src=c.url;C.insertBefore(i,C.firstChild)}function l(c,d){t(c,function(){var h=B.shift();w=0<B.length;h&&l.apply(null,h);d.resolve(c.r||s)},function(c){d.reject(c)})}function h(c){try{return eval("global."+c)}catch(d){return F}}var A={},B=[],v=d&&d.createElement("script").async==s,y={loaded:1,interactive:1,complete:1},o="onreadystatechange",C=d&&(d.head||d.getElementsByTagName("head")[0]),w,F;define("js",{dynamic:s,load:function(c,d,h,o){var j,p,q,i;j=0<c.indexOf("!order");
21   -p=c.indexOf("!exports=");q=0<p&&c.substr(p+9);i="prefetch"in o?o.prefetch:s;c=j||0<p?c.substr(0,c.indexOf("!")):c;c in A?h(A[c]):(A[c]=F,d={name:c,url:d.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".js":c),X:j,a:q,$:o.timeout},o={resolve:function(d){A[c]=d;(h.resolve||h)(d)},reject:h.reject||function(c){throw c;}},j&&!v&&w?(B.push([d,o]),i&&(d.I="text/cache",t(d,function(c){c.parentNode.removeChild(c)},z),d.I="")):(w=w||j,l(d,o)))}})})(this,this.document);
22   -(function(q){var d=q.document,t=/^\/\//,l;d&&(l=d.head||(d.head=d.getElementsByTagName("head")[0]));define("link",{load:function(h,q,B,v){h=q.toUrl(h.lastIndexOf(".")<=h.lastIndexOf("/")?h+".css":h);v=h=(v="fixSchemalessUrls"in v?v.fixSchemalessUrls:d.location.protocol)?h.replace(t,v+"//"):h;h=d.createElement("link");h.rel="stylesheet";h.type="text/css";h.href=v;l.appendChild(h);B(h.sheet||h.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(q){return{load:function(d,t,l){q(l)}}});
  20 +c.charset||"utf-8";i.async=!c.X;i.src=c.url;C.insertBefore(i,C.firstChild)}function l(c,d){t(c,function(){var h=B.shift();x=0<B.length;h&&l.apply(null,h);d.resolve(c.r||s)},function(c){d.reject(c)})}function h(c){try{return eval("global."+c)}catch(d){return F}}var A={},B=[],w=d&&d.createElement("script").async==s,y={loaded:1,interactive:1,complete:1},o="onreadystatechange",C=d&&(d.head||d.getElementsByTagName("head")[0]),x,F;define("js",{dynamic:s,load:function(c,d,h,o){var j,p,q,i;j=0<c.indexOf("!order");
  21 +p=c.indexOf("!exports=");q=0<p&&c.substr(p+9);i="prefetch"in o?o.prefetch:s;c=j||0<p?c.substr(0,c.indexOf("!")):c;c in A?h(A[c]):(A[c]=F,d={name:c,url:d.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".js":c),X:j,a:q,$:o.timeout},o={resolve:function(d){A[c]=d;(h.resolve||h)(d)},reject:h.reject||function(c){throw c;}},j&&!w&&x?(B.push([d,o]),i&&(d.I="text/cache",t(d,function(c){c.parentNode.removeChild(c)},z),d.I="")):(x=x||j,l(d,o)))}})})(this,this.document);
  22 +(function(q){var d=q.document,t=/^\/\//,l;d&&(l=d.head||(d.head=d.getElementsByTagName("head")[0]));define("link",{load:function(h,q,B,w){h=q.toUrl(h.lastIndexOf(".")<=h.lastIndexOf("/")?h+".css":h);w=h=(w="fixSchemalessUrls"in w?w.fixSchemalessUrls:d.location.protocol)?h.replace(t,w+"//"):h;h=d.createElement("link");h.rel="stylesheet";h.type="text/css";h.href=w;l.appendChild(h);B(h.sheet||h.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(q){return{load:function(d,t,l){q(l)}}});
48 dist/curl-kitchen-sink/curl.js
... ... @@ -1,33 +1,33 @@
1 1 /*
2 2 MIT License (c) copyright B Cavalier & J Hann */
3 3 var v=!0,A=!1;
4   -(function(f){function e(){}function l(a,d){return 0==G.call(a).indexOf("[object "+d)}function h(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function c(a,d){var j,t,g;t=1;a=a.replace(N,function(a,d,j){j&&t++;g=v;return""});return g?(j=d.split("/"),j.splice(j.length-t,t),j.concat(a||[]).join("/")):a}function p(a){var d=a.indexOf("!");return{P:a.substr(d+1),h:0<=d&&a.substr(0,d)}}function x(){}function q(a){x.prototype=a;a=new x;x.prototype=k;return a}function w(){function a(a,d,
5   -j){t.push([a,d,j])}function d(a,d){for(var j,g=0;j=t[g++];)(j=j[a])&&j(d)}var j,t,g;j=this;t=[];g=function(j,b){a=j?function(a){a&&a(b)}:function(a,d){d&&d(b)};g=e;d(j?0:1,b);d=e;t=u};this.u=function(d,g,t){a(d,g,t);return j};this.c=function(a){j.t=a;g(v,a)};this.b=function(a){j.ha=a;g(A,a)};this.r=function(a){d(2,a)}}function o(a,d,j,t){a instanceof w?a.u(d,j,t):d(a)}function y(a,d,j){return function(){var t;0<=--a&&d&&(t=d.apply(u,arguments));0==a&&j&&j(t);return t}}function r(){function a(d,t,
6   -g){var i;i=n.f(b,u,[].concat(d));this.then=d=function(a,d){o(i,function(d){a&&a.apply(u,d)},function(a){if(d)d(a);else throw a;});return this};this.next=function(d,j){return new a(d,j,i)};t&&d(t);o(g,function(){n.j(i)})}var d=[].slice.call(arguments);l(d[0],"Object")&&(b=n.G(d.shift()),n.w(b));return new a(d[0],d[1])}function B(a){var d=a.id;if(d==u)if(m!==u)m={D:"Multiple anonymous defines in url"};else if(!(d=n.Y()))m=a;if(d!=u){var j=s[d];j||(j=n.l(d,b).e,j=s[d]=n.A(j,d));j instanceof w&&(j.da=
7   -A,n.B(j,a))}}var b=f.curl,C=f.document,E=C&&(C.head||C.getElementsByTagName("head")[0]),D={},I={},J={},H={},k={},G=k.toString,u,F={loaded:1,interactive:J,complete:1},s={},i=A,m,z=/\?/,L=/^\/|^[^:]+:\/\//,N=/(?:^|\/)(\.)(\.?)\/?/g,O=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,P=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,K,n;n={f:function(a,d,j,t){function g(a){return c(a,b.n)}function i(d,j){var t,m,c,p;t=j&&function(a){j.apply(u,a)};if(l(d,"String")){m=g(d);c=s[m];p=c instanceof w&&c.a;
8   -if(!(m in s))throw Error("Module not resolved: "+m);if(t)throw Error("require(id, callback) not allowed");return p||c}o(n.j(n.f(a,b.id,d)),t)}var b;b=new w;b.n=b.id=d||"";b.K=t;b.C=j;b.k=i;i.toUrl=function(d){return n.l(g(d),a).url};b.ca=g;return b},A:function(a,d,j,b){var g,i,m,c;g=n.f(a,d,u,j);g.n=b==u?d:b;i=g.c;m=y(1,function(a){g.o=a;try{c=n.p(g)}catch(d){g.b(d)}});g.c=function(a){m(a);s[g.id]=c;i(c)};g.F=function(a){g.a&&(m(a),g.r(I))};return g},R:function(a,d,j,b){a=n.f(a,d,u,j);a.n=b;return a},
9   -X:function(a){return a.k},I:function(a){return a.a||(a.a={})},W:function(a){var d=a.q;d||(d=a.q={id:a.id,uri:n.J(a),exports:n.I(a)},d.a=d.exports);return d},J:function(a){return a.url||(a.url=n.z(a.k.toUrl(a.id)))},G:function(a){function d(d,j){var i,g,m,e,k;for(k in d){m=d[k];e=a;g=p(h(m.id||m.name||k));i=g.P;if(g=g.h)e=b[g],e||(e=b[g]=q(a),e.g=q(a.g),e.d=[]),delete d[k];if(j){g=m;var z=void 0,f=void 0,z=g.path=h(g.path||g.location||""),f=g.main||"main";g.e=g.config;g.L="."==f.charAt(0)?h(c(f,z)):
10   -h(z)+"/"+f}else g={path:h(m)};g.Q=i.split("/").length;i?(e.g[i]=g,e.d.push(i)):e.v=n.O(m,a)}}function j(a){var d=a.g;a.aa=RegExp("^("+a.d.sort(function(a,b){return d[a].Q<d[b].Q}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.d}var b;a.v=a.baseUrl||"";a.N="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};b=a.plugins=a.plugins||{};a.d=[];d(a.paths,A);d(a.packages,v);for(var i in b){var m=b[i].d;m&&(b[i].d=m.concat(a.d),j(b[i]))}j(a);return a},w:function(a){var d;(d=a.preloads)&&0<d.length&&
11   -o(i,function(){i=n.j(n.f(a,u,d,v))})},l:function(a,d,j){var i,g,m;i=d.g;j&&d.N&&0>a.indexOf("/")&&!(a in i)&&(a=h(d.N)+"/"+a);j=L.test(a)?a:a.replace(d.aa,function(d){g=i[d]||{};m=g.e;return g.L&&d==a?g.L:g.path||""});return{path:j,e:m||b,url:n.O(j,d)}},O:function(a,d){var b=d.v;return b&&!L.test(a)?h(b)+"/"+a:a},z:function(a){return a+(z.test(a)?"":".js")},Z:function(a,d,b){var i=C.createElement("script");i.onload=i.onreadystatechange=function(b){b=b||f.event;if("load"==b.type||F[i.readyState])delete H[a.id],
  4 +(function(f){function e(){}function l(a,d){return 0==G.call(a).indexOf("[object "+d)}function h(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function c(a,d){var j,t,g;t=1;a=a.replace(N,function(a,d,j){j&&t++;g=v;return""});return g?(j=d.split("/"),j.splice(j.length-t,t),j.concat(a||[]).join("/")):a}function p(a){var d=a.indexOf("!");return{P:a.substr(d+1),h:0<=d&&a.substr(0,d)}}function x(){}function r(a){x.prototype=a;a=new x;x.prototype=k;return a}function w(){function a(a,d,
  5 +j){t.push([a,d,j])}function d(a,d){for(var j,g=0;j=t[g++];)(j=j[a])&&j(d)}var j,t,g;j=this;t=[];g=function(j,b){a=j?function(a){a&&a(b)}:function(a,d){d&&d(b)};g=e;d(j?0:1,b);d=e;t=u};this.u=function(d,g,t){a(d,g,t);return j};this.c=function(a){j.t=a;g(v,a)};this.b=function(a){j.ha=a;g(A,a)};this.r=function(a){d(2,a)}}function o(a,d,j,t){a instanceof w?a.u(d,j,t):d(a)}function y(a,d,j){return function(){var t;0<=--a&&d&&(t=d.apply(u,arguments));0==a&&j&&j(t);return t}}function s(){function a(d,t,
  6 +g){var i;i=n.f(b,u,[].concat(d));this.then=d=function(a,d){o(i,function(d){a&&a.apply(u,d)},function(a){if(d)d(a);else throw a;});return this};this.next=function(d,j){return new a(d,j,i)};t&&d(t);o(g,function(){n.j(i)})}var d=[].slice.call(arguments);l(d[0],"Object")&&(b=n.G(d.shift()),n.w(b));return new a(d[0],d[1])}function B(a){var d=a.id;if(d==u)if(m!==u)m={D:"Multiple anonymous defines in url"};else if(!(d=n.Y()))m=a;if(d!=u){var j=q[d];d in q||(j=n.l(d,b).e,j=q[d]=n.A(j,d));j instanceof w&&
  7 +(j.da=A,n.B(j,a))}}var b=f.curl,C=f.document,E=C&&(C.head||C.getElementsByTagName("head")[0]),D={},I={},J={},H={},k={},G=k.toString,u,F={loaded:1,interactive:J,complete:1},q={},i=A,m,z=/\?/,L=/^\/|^[^:]+:\/\//,N=/(?:^|\/)(\.)(\.?)\/?/g,O=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,P=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,K,n;n={f:function(a,d,j,t){function g(a){return c(a,b.n)}function i(d,j){var t,m,c,p;t=j&&function(a){j.apply(u,a)};if(l(d,"String")){m=g(d);c=q[m];p=c instanceof
  8 +w&&c.a;if(!(m in q))throw Error("Module not resolved: "+m);if(t)throw Error("require(id, callback) not allowed");return p||c}o(n.j(n.f(a,b.id,d)),t)}var b;b=new w;b.n=b.id=d||"";b.K=t;b.C=j;b.k=i;i.toUrl=function(d){return n.l(g(d),a).url};b.ca=g;return b},A:function(a,d,j,b){var g,i,m,c;g=n.f(a,d,u,j);g.n=b==u?d:b;i=g.c;m=y(1,function(a){g.o=a;try{c=n.p(g)}catch(d){g.b(d)}});g.c=function(a){m(a);q[g.id]=c;i(c)};g.F=function(a){g.a&&(m(a),g.r(I))};return g},R:function(a,d,j,b){a=n.f(a,d,u,j);a.n=
  9 +b;return a},X:function(a){return a.k},I:function(a){return a.a||(a.a={})},W:function(a){var d=a.q;d||(d=a.q={id:a.id,uri:n.J(a),exports:n.I(a)},d.a=d.exports);return d},J:function(a){return a.url||(a.url=n.z(a.k.toUrl(a.id)))},G:function(a){function d(d,j){var i,g,m,e,k;for(k in d){m=d[k];e=a;g=p(h(m.id||m.name||k));i=g.P;if(g=g.h)e=b[g],e||(e=b[g]=r(a),e.g=r(a.g),e.d=[]),delete d[k];if(j){g=m;var z=void 0,f=void 0,z=g.path=h(g.path||g.location||""),f=g.main||"main";g.e=g.config;g.L="."==f.charAt(0)?
  10 +h(c(f,z)):h(z)+"/"+f}else g={path:h(m)};g.Q=i.split("/").length;i?(e.g[i]=g,e.d.push(i)):e.v=n.O(m,a)}}function j(a){var d=a.g;a.aa=RegExp("^("+a.d.sort(function(a,b){return d[a].Q<d[b].Q}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.d}var b;a.v=a.baseUrl||"";a.N="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};b=a.plugins=a.plugins||{};a.d=[];d(a.paths,A);d(a.packages,v);for(var i in b){var m=b[i].d;m&&(b[i].d=m.concat(a.d),j(b[i]))}j(a);return a},w:function(a){var d;(d=a.preloads)&&
  11 +0<d.length&&o(i,function(){i=n.j(n.f(a,u,d,v))})},l:function(a,d,j){var i,g,m;i=d.g;j&&d.N&&0>a.indexOf("/")&&!(a in i)&&(a=h(d.N)+"/"+a);j=L.test(a)?a:a.replace(d.aa,function(d){g=i[d]||{};m=g.e;return g.L&&d==a?g.L:g.path||""});return{path:j,e:m||b,url:n.O(j,d)}},O:function(a,d){var b=d.v;return b&&!L.test(a)?h(b)+"/"+a:a},z:function(a){return a+(z.test(a)?"":".js")},Z:function(a,d,b){var i=C.createElement("script");i.onload=i.onreadystatechange=function(b){b=b||f.event;if("load"==b.type||F[i.readyState])delete H[a.id],
12 12 i.onload=i.onreadystatechange=i.onerror="",d()};i.onerror=function(){b(Error("Syntax or http error: "+a.url))};i.charset="utf-8";i.async=v;i.src=a.url;H[a.id]=i;E.insertBefore(i,E.firstChild)},H:function(a){var d=[],b;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(O,"").replace(P,function(a,i,m){m?b=b==m?u:b:b||d.push(i);return a});return d},V:function(a){var d,b,i,g,m,c;m=a.length;i=a[m-1];g=l(i,"Function")?i.length:-1;2==m?l(a[0],"Array")?b=a[0]:d=a[0]:3==m&&(d=a[0],b=a[1]);
13 13 !b&&0<g&&(c=v,b=["require","exports","module"].slice(0,g).concat(n.H(i)));return{id:d,o:b||[],s:0<=g?i:function(){return i},m:c}},p:function(a){var d;d=a.s.apply(a.m?a.a:u,a.o);d===u&&a.a&&(d=a.q?a.a=a.q.a:a.a);return d},B:function(a,d){o(a.K||i,function(){a.s=d.s;a.m=d.m;a.C=d.o;n.j(a)})},j:function(a){function d(a,d,b){c[d]=a;b&&k(a,d)}function b(d,i){var m,g,j,c;m=y(1,function(a){g(a);z(a,i)});g=y(1,function(a){k(a,i)});j=n.T(d,a);(c=j instanceof w&&j.a)&&g(c);o(j,m,a.b,a.a&&function(a){j.a&&(a==
14 14 D?g(j.a):a==I&&m(j.a))})}function i(){a.c(c)}var g,m,c,e,p,k,z;c=[];m=a.C;e=m.length;0==m.length&&i();k=y(e,d,function(){a.F&&a.F(c)});z=y(e,d,i);for(g=0;g<e;g++)p=m[g],p in K?(z(K[p](a),g,v),a.a&&a.r(D)):p?b(p,g):z(u,g,v);return a},U:function(a){n.J(a);n.Z(a,function(){var d=m;m=u;a.da!==A&&(!d||d.D?a.b(Error((d&&d.D||"define() missing or duplicated: url").replace("url",a.url))):n.B(a,d))},a.b);return a},T:function(a,d){var i,m,g,c,e,k,z,f,h,l;i=d.ca;m=d.K;g=p(a);k=g.P;c=i(g.h||k);z=n.l(c,b,!!g.h);
15   -if(g.h)e=c;else if(e=z.e.moduleLoader)k=c,c=e,z=n.l(e,b);f=s[c];f||(f=s[c]=n.A(z.e,c,m,g.h?z.path:u),f.url=n.z(z.url),n.U(f));c==e&&(h=new w,l=b.plugins[e]||b,o(f,function(a){var d,b,g;g=a.dynamic;k="normalize"in a?a.normalize(k,i,l)||"":i(k);b=e+"!"+k;d=s[b];if(!d){d=n.R(l,b,m,k);g||(s[b]=d);var c=function(a){d.c(a);g||(s[b]=a)};c.resolve=c;c.reject=d.b;a.load(k,d.k,c,l)}h!=d&&o(d,h.c,h.b,h.r)},h.b));return h||f},Y:function(){var a;if(!l(f.opera,"Opera"))for(var d in H)if(F[H[d].readyState]==J){a=
16   -d;break}return a}};K={require:n.X,exports:n.I,module:n.W};if(!l(b,"Function")){b=n.G(b||{});n.w(b);var M;(b.apiContext||f)[b.apiName||"curl"]=r;s.curl=r;M=f.define=function(){var a=n.V(arguments);B(a)};r.version="0.6.1";M.amd={plugins:v,jQuery:v,curl:"0.6.1"};s["curl/_privileged"]={core:n,cache:s,cfg:b,_define:B,_curl:r,Promise:w}}})(this);
17   -(function(f,e){function l(){if(!e.body)return A;D||(D=e.createTextNode(""));try{return e.body.removeChild(e.body.appendChild(D)),D=E,v}catch(b){return A}}function h(){var c;c=x[e[p]]&&l();if(!o&&c){o=v;for(clearTimeout(C);B=b.pop();)B();w&&(e[p]="complete");for(var f;f=q.shift();)f()}return c}function c(){h();o||(C=setTimeout(c,y))}var p="readyState",x={loaded:1,interactive:1,complete:1},q=[],w=e&&"string"!=typeof e[p],o=A,y=10,r,B,b=[],C,E,D;r="addEventListener"in f?function(b,c){b.addEventListener(c,
18   -h,A);return function(){b.removeEventListener(c,h,A)}}:function(b,c){b.attachEvent("on"+c,h);return function(){b.detachEvent(c,h)}};e&&!h()&&(b=[r(f,"load"),r(e,"readystatechange"),r(f,"DOMContentLoaded")],C=setTimeout(c,y));define("curl/domReady",function(){function b(c){o?c():q.push(c)}b.then=b;b.amd=v;return b})})(this,this.document);
  15 +if(g.h)e=c;else if(e=z.e.moduleLoader)k=c,c=e,z=n.l(e,b);f=q[c];c in q||(f=q[c]=n.A(z.e,c,m,g.h?z.path:u),f.url=n.z(z.url),n.U(f));c==e&&(h=new w,l=b.plugins[e]||b,o(f,function(a){var d,b,g;g=a.dynamic;k="normalize"in a?a.normalize(k,i,l)||"":i(k);b=e+"!"+k;d=q[b];if(!(b in q)){d=n.R(l,b,m,k);g||(q[b]=d);var c=function(a){d.c(a);g||(q[b]=a)};c.resolve=c;c.reject=d.b;a.load(k,d.k,c,l)}h!=d&&o(d,h.c,h.b,h.r)},h.b));return h||f},Y:function(){var a;if(!l(f.opera,"Opera"))for(var d in H)if(F[H[d].readyState]==
  16 +J){a=d;break}return a}};K={require:n.X,exports:n.I,module:n.W};if(!l(b,"Function")){b=n.G(b||{});n.w(b);var M;(b.apiContext||f)[b.apiName||"curl"]=s;q.curl=s;M=f.define=function(){var a=n.V(arguments);B(a)};s.version="0.6.2";M.amd={plugins:v,jQuery:v,curl:"0.6.2"};q["curl/_privileged"]={core:n,cache:q,cfg:b,_define:B,_curl:s,Promise:w}}})(this);
  17 +(function(f,e){function l(){if(!e.body)return A;D||(D=e.createTextNode(""));try{return e.body.removeChild(e.body.appendChild(D)),D=E,v}catch(b){return A}}function h(){var c;c=x[e[p]]&&l();if(!o&&c){o=v;for(clearTimeout(C);B=b.pop();)B();w&&(e[p]="complete");for(var f;f=r.shift();)f()}return c}function c(){h();o||(C=setTimeout(c,y))}var p="readyState",x={loaded:1,interactive:1,complete:1},r=[],w=e&&"string"!=typeof e[p],o=A,y=10,s,B,b=[],C,E,D;s="addEventListener"in f?function(b,c){b.addEventListener(c,
  18 +h,A);return function(){b.removeEventListener(c,h,A)}}:function(b,c){b.attachEvent("on"+c,h);return function(){b.detachEvent(c,h)}};e&&!h()&&(b=[s(f,"load"),s(e,"readystatechange"),s(f,"DOMContentLoaded")],C=setTimeout(c,y));define("curl/domReady",function(){function b(c){o?c():r.push(c)}b.then=b;b.amd=v;return b})})(this,this.document);
19 19 define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(f,e){function l(c){c.ready||(c.ready=function(c){e(c)});c.nameToUrl||(c.nameToUrl=function(e,f){return c.toUrl(e+(f||""))})}var h=f.core.p;l(f._curl);f.core.p=function(c){l(c.k);return h(c)};return v});
20   -(function(f,e){function l(b,p,h){function l(e){e=e||f.event;if("load"==e.type||w[k.readyState])k.onload=k[o]=k.onerror="",b.a&&(b.t=c(b.a)),!b.a||b.t?p(k):q()}function q(){k.onload=k[o]=k.onerror="";h&&h(Error("Script error or http error: "+b.url))}function x(){k.onload&&w[k.readyState]?l({}):k.onload&&r<new Date?q():setTimeout(x,10)}var r,k;r=(new Date).valueOf()+1E3*(b.ba||300);k=e.createElement("script");h&&b.a&&setTimeout(x,10);k.type=b.M||"text/javascript";k.onload=k[o]=l;k.onerror=q;k.charset=
21   -b.charset||"utf-8";k.async=!b.$;k.src=b.url;y.insertBefore(k,y.firstChild)}function h(b,c){l(b,function(){var e=x.shift();r=0<x.length;e&&h.apply(null,e);c.resolve(b.t||v)},function(b){c.reject(b)})}function c(b){try{return eval("global."+b)}catch(c){return B}}var p={},x=[],q=e&&e.createElement("script").async==v,w={loaded:1,interactive:1,complete:1},o="onreadystatechange",y=e&&(e.head||e.getElementsByTagName("head")[0]),r,B;define("js",{dynamic:v,load:function(b,c,e,f){var o,w,y,k;o=0<b.indexOf("!order");
22   -w=b.indexOf("!exports=");y=0<w&&b.substr(w+9);k="prefetch"in f?f.prefetch:v;b=o||0<w?b.substr(0,b.indexOf("!")):b;b in p?e(p[b]):(p[b]=B,c={name:b,url:c.toUrl(b.lastIndexOf(".")<=b.lastIndexOf("/")?b+".js":b),$:o,a:y,ba:f.timeout},f={resolve:function(c){p[b]=c;(e.resolve||e)(c)},reject:e.reject||function(b){throw b;}},o&&!q&&r?(x.push([c,f]),k&&(c.M="text/cache",l(c,function(b){b.parentNode.removeChild(b)},A),c.M="")):(r=r||o,h(c,f)))}})})(this,this.document);
  20 +(function(f,e){function l(b,p,h){function l(e){e=e||f.event;if("load"==e.type||w[k.readyState])k.onload=k[o]=k.onerror="",b.a&&(b.t=c(b.a)),!b.a||b.t?p(k):r()}function r(){k.onload=k[o]=k.onerror="";h&&h(Error("Script error or http error: "+b.url))}function x(){k.onload&&w[k.readyState]?l({}):k.onload&&s<new Date?r():setTimeout(x,10)}var s,k;s=(new Date).valueOf()+1E3*(b.ba||300);k=e.createElement("script");h&&b.a&&setTimeout(x,10);k.type=b.M||"text/javascript";k.onload=k[o]=l;k.onerror=r;k.charset=
  21 +b.charset||"utf-8";k.async=!b.$;k.src=b.url;y.insertBefore(k,y.firstChild)}function h(b,c){l(b,function(){var e=x.shift();s=0<x.length;e&&h.apply(null,e);c.resolve(b.t||v)},function(b){c.reject(b)})}function c(b){try{return eval("global."+b)}catch(c){return B}}var p={},x=[],r=e&&e.createElement("script").async==v,w={loaded:1,interactive:1,complete:1},o="onreadystatechange",y=e&&(e.head||e.getElementsByTagName("head")[0]),s,B;define("js",{dynamic:v,load:function(b,c,e,f){var o,w,y,k;o=0<b.indexOf("!order");
  22 +w=b.indexOf("!exports=");y=0<w&&b.substr(w+9);k="prefetch"in f?f.prefetch:v;b=o||0<w?b.substr(0,b.indexOf("!")):b;b in p?e(p[b]):(p[b]=B,c={name:b,url:c.toUrl(b.lastIndexOf(".")<=b.lastIndexOf("/")?b+".js":b),$:o,a:y,ba:f.timeout},f={resolve:function(c){p[b]=c;(e.resolve||e)(c)},reject:e.reject||function(b){throw b;}},o&&!r&&s?(x.push([c,f]),k&&(c.M="text/cache",l(c,function(b){b.parentNode.removeChild(b)},A),c.M="")):(s=s||o,h(c,f)))}})})(this,this.document);
23 23 define("text",function(){function f(){if("undefined"!==typeof XMLHttpRequest)f=function(){return new XMLHttpRequest};else for(var c=f=function(){throw Error("getXhr(): XMLHttpRequest not available");};0<h.length&&f===c;)(function(c){try{new ActiveXObject(c),f=function(){return new ActiveXObject(c)}}catch(e){}})(h.shift());return f()}function e(c,e,h){var l=f();l.open("GET",c,v);l.onreadystatechange=function(){4===l.readyState&&(400>l.status?e(l.responseText):h(Error("fetchText() failed. status: "+
24   -l.statusText)))};l.send(null)}function l(c){throw c;}var h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];return{load:function(c,f,h){var q=h.c||h,h=h.b||l;e(f.toUrl(c),q,h)},"plugin-builder":"./builder/text"}});define("async",function(){return{load:function(f,e,l){function h(c){"function"==typeof l.c?l.c(c):l(c)}function c(c){"function"==typeof l.b&&l.b(c)}e([f],function(e){"function"==typeof e.u?e.u(function(c){0==arguments.length&&(c=e);h(c)},c):h(e)})},analyze:function(f,e,l){l(f)}}});
25   -(function(f){function e(b,c){var e=b.link;e[r]=e[B]=function(){if(!e.readyState||"complete"==e.readyState)I["event-link-onload"]=v,q(b),c()}}function l(b){for(var b=b.split("!"),c,e=1;c=b[e++];)c=c.split("=",2),b[c[0]]=2==c.length?c[1]:v;return b}function h(c){if(document.createStyleSheet&&(u||(u=document.createStyleSheet()),30<=document.styleSheets.length)){var e,f,k,h=0;k=u;u=null;for(f=document.getElementsByTagName("link");e=f[h];)e.getAttribute("_curl_movable")?(k.addImport(e.href),e.parentNode&&
  24 +l.statusText)))};l.send(null)}function l(c){throw c;}var h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];return{load:function(c,f,h){var r=h.c||h,h=h.b||l;e(f.toUrl(c),r,h)},"plugin-builder":"./builder/text"}});define("async",function(){return{load:function(f,e,l){function h(c){"function"==typeof l.c?l.c(c):l(c)}function c(c){"function"==typeof l.b&&l.b(c)}e([f],function(e){"function"==typeof e.u?e.u(function(c){0==arguments.length&&(c=e);h(c)},c):h(e)})},analyze:function(f,e,l){l(f)}}});
  25 +(function(f){function e(b,c){var e=b.link;e[s]=e[B]=function(){if(!e.readyState||"complete"==e.readyState)I["event-link-onload"]=v,r(b),c()}}function l(b){for(var b=b.split("!"),c,e=1;c=b[e++];)c=c.split("=",2),b[c[0]]=2==c.length?c[1]:v;return b}function h(c){if(document.createStyleSheet&&(u||(u=document.createStyleSheet()),30<=document.styleSheets.length)){var e,f,k,h=0;k=u;u=null;for(f=document.getElementsByTagName("link");e=f[h];)e.getAttribute("_curl_movable")?(k.addImport(e.href),e.parentNode&&
26 26 e.parentNode.removeChild(e)):h++}c=c[b]("link");c.rel="stylesheet";c.type="text/css";c.setAttribute("_curl_movable",v);return c}function c(c){var e,f,h=A;try{if(e=c.sheet||c.styleSheet,(h=(f=e.cssRules||e.rules)?0<f.length:f!==E)&&"[object Chrome]"=={}.toString.call(window.fa))e.insertRule("#_cssx_load_test{margin-top:-5px;}",0),F||(F=k[b]("div"),F.id="_cssx_load_test",G.appendChild(F)),h="-5px"==k.defaultView.getComputedStyle(F,null).marginTop,e.deleteRule(0)}catch(l){h=1E3==l.code||l.message.match(/security|denied/i)}return h}
27   -function p(b,e){c(b.link)?(q(b),e()):C||setTimeout(function(){p(b,e)},b.ea)}function x(b,c){function f(){h||(h=v,c())}var h;e(b,f);I["event-link-onload"]||p(b,f)}function q(b){b=b.link;b[r]=b[B]=null}function w(b,c){return b.replace(H,function(b,e){var i=e;J.test(i)||(i=c+i);return'url("'+i+'")'})}function o(b){clearTimeout(o.S);o.i?o.i.push(b):(o.i=[b],s=k.createStyleSheet?k.createStyleSheet():G.appendChild(k.createElement("style")));o.S=setTimeout(function(){var b,c;b=s;s=E;c=o.i.join("\n");o.i=
28   -E;c=c.replace(/.+charset[^;]+;/g,"");"cssText"in b?b.cssText=c:b.appendChild(k.createTextNode(c))},0);return s}function y(b){return{cssRules:function(){return b.cssRules||b.rules},insertRule:b.insertRule||function(c,e){var f=c.split(/\{|\}/g);b.addRule(f[0],f[1],e);return e},deleteRule:b.deleteRule||function(c){b.removeRule(c);return c},sheet:function(){return b}}}var r="onreadystatechange",B="onload",b="createElement",C=A,E,D={},I={},J=/^\/|^[^:]*:\/\//,H=/url\s*\(['"]?([^'"\)]*)['"]?\)/g,k=f.document,
29   -G;k&&(G=k.head||(k.head=k.getElementsByTagName("head")[0]));var u,F,s;define("css",{normalize:function(b,c){var e,f;if(!b)return b;e=b.split(",");f=[];for(var h=0,k=e.length;h<k;h++)f.push(c(e[h]));return f.join(",")},load:function(b,c,e,f){function p(){0==--u&&setTimeout(function(){e(y(a.sheet||a.styleSheet))},0)}var q=(b||"").split(","),u=q.length;if(b)for(var r=q.length-1,n;0<=r;r--,n=v){var b=q[r],b=l(b),s=b.shift(),s=c.toUrl(s.lastIndexOf(".")<=s.lastIndexOf("/")?s+".css":s),a=h(k),d={link:a,
30   -url:s,ea:f.cssWatchPeriod||50};("nowait"in b?"false"!=b.nowait:f.cssDeferLoad)?e(y(a.sheet||a.styleSheet)):x(d,p);a.href=s;n?G.insertBefore(a,D[n].previousSibling):G.appendChild(a);D[s]=a}else e({translateUrls:function(a,b){var d;d=c.toUrl(b);d=d.substr(0,d.lastIndexOf("/")+1);return w(a,d)},injectStyle:function(a){return o(a)},proxySheet:function(a){a.sheet&&(a=a.sheet);return y(a)}})},"plugin-builder":"./builder/css"})})(this);
31   -(function(f){var e=f.document,l=/^\/\//,h;e&&(h=e.head||(e.head=e.getElementsByTagName("head")[0]));define("link",{load:function(c,f,x,q){c=f.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".css":c);q=c=(q="fixSchemalessUrls"in q?q.fixSchemalessUrls:e.location.protocol)?c.replace(l,q+"//"):c;c=e.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=q;h.appendChild(c);x(c.sheet||c.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(f){return{load:function(e,l,h){f(h)}}});
32   -(function(f,e){define("curl/loader/cjsm11",function(){function f(c,h){f="text"in c?function(c,e){c.text=e}:function(c,f){c.appendChild(e.createTextNode(f))};f(c,h)}var h,c;c=eval;h=e&&(e.head||e.getElementsByTagName("head")[0]);return{load:function(p,x,q,w){x(["text!"+p+".js","curl/_privileged"],function(o,y){var r;r=y.core.H(o);x(r,function(){o="define('"+p+"',['require','exports','module'],function(require,exports,module){"+o+"\n});\n";if(w.ga){var r=o,b=e.createElement("script");f(b,r);b.charset=
33   -"utf-8";h.insertBefore(b,h.firstChild)}else c(o);q(x(p))})})}}})})(this,this.document);
  27 +function p(b,e){c(b.link)?(r(b),e()):C||setTimeout(function(){p(b,e)},b.ea)}function x(b,c){function f(){h||(h=v,c())}var h;e(b,f);I["event-link-onload"]||p(b,f)}function r(b){b=b.link;b[s]=b[B]=null}function w(b,c){return b.replace(H,function(b,e){var i=e;J.test(i)||(i=c+i);return'url("'+i+'")'})}function o(b){clearTimeout(o.S);o.i?o.i.push(b):(o.i=[b],q=k.createStyleSheet?k.createStyleSheet():G.appendChild(k.createElement("style")));o.S=setTimeout(function(){var b,c;b=q;q=E;c=o.i.join("\n");o.i=
  28 +E;c=c.replace(/.+charset[^;]+;/g,"");"cssText"in b?b.cssText=c:b.appendChild(k.createTextNode(c))},0);return q}function y(b){return{cssRules:function(){return b.cssRules||b.rules},insertRule:b.insertRule||function(c,e){var f=c.split(/\{|\}/g);b.addRule(f[0],f[1],e);return e},deleteRule:b.deleteRule||function(c){b.removeRule(c);return c},sheet:function(){return b}}}var s="onreadystatechange",B="onload",b="createElement",C=A,E,D={},I={},J=/^\/|^[^:]*:\/\//,H=/url\s*\(['"]?([^'"\)]*)['"]?\)/g,k=f.document,
  29 +G;k&&(G=k.head||(k.head=k.getElementsByTagName("head")[0]));var u,F,q;define("css",{normalize:function(b,c){var e,f;if(!b)return b;e=b.split(",");f=[];for(var h=0,k=e.length;h<k;h++)f.push(c(e[h]));return f.join(",")},load:function(b,c,e,f){function p(){0==--u&&setTimeout(function(){e(y(a.sheet||a.styleSheet))},0)}var r=(b||"").split(","),u=r.length;if(b)for(var s=r.length-1,n;0<=s;s--,n=v){var b=r[s],b=l(b),q=b.shift(),q=c.toUrl(q.lastIndexOf(".")<=q.lastIndexOf("/")?q+".css":q),a=h(k),d={link:a,
  30 +url:q,ea:f.cssWatchPeriod||50};("nowait"in b?"false"!=b.nowait:f.cssDeferLoad)?e(y(a.sheet||a.styleSheet)):x(d,p);a.href=q;n?G.insertBefore(a,D[n].previousSibling):G.appendChild(a);D[q]=a}else e({translateUrls:function(a,b){var d;d=c.toUrl(b);d=d.substr(0,d.lastIndexOf("/")+1);return w(a,d)},injectStyle:function(a){return o(a)},proxySheet:function(a){a.sheet&&(a=a.sheet);return y(a)}})},"plugin-builder":"./builder/css"})})(this);
  31 +(function(f){var e=f.document,l=/^\/\//,h;e&&(h=e.head||(e.head=e.getElementsByTagName("head")[0]));define("link",{load:function(c,f,x,r){c=f.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".css":c);r=c=(r="fixSchemalessUrls"in r?r.fixSchemalessUrls:e.location.protocol)?c.replace(l,r+"//"):c;c=e.createElement("link");c.rel="stylesheet";c.type="text/css";c.href=r;h.appendChild(c);x(c.sheet||c.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(f){return{load:function(e,l,h){f(h)}}});
  32 +(function(f,e){define("curl/loader/cjsm11",function(){function f(c,h){f="text"in c?function(c,e){c.text=e}:function(c,f){c.appendChild(e.createTextNode(f))};f(c,h)}var h,c;c=eval;h=e&&(e.head||e.getElementsByTagName("head")[0]);return{load:function(p,x,r,w){x(["text!"+p+".js","curl/_privileged"],function(o,y){var s;s=y.core.H(o);x(s,function(){o="define('"+p+"',['require','exports','module'],function(require,exports,module){"+o+"\n});\n";if(w.ga){var s=o,b=e.createElement("script");f(b,s);b.charset=
  33 +"utf-8";h.insertBefore(b,h.firstChild)}else c(o);r(x(p))})})}}})})(this,this.document);
40 dist/curl-with-js-and-domReady/curl.js
... ... @@ -1,22 +1,22 @@
1 1 /*
2 2 MIT License (c) copyright B Cavalier & J Hann */
3   -var r=!0,y=!1;
4   -(function(s){function h(){}function w(a,b){return 0==N.call(a).indexOf("[object "+b)}function k(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function E(a,b){var f,g,d;g=1;a=a.replace(O,function(a,b,f){f&&g++;d=r;return""});return d?(f=b.split("/"),f.splice(f.length-g,g),f.concat(a||[]).join("/")):a}function z(a){var b=a.indexOf("!");return{L:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function C(){}function F(a){C.prototype=a;a=new C;C.prototype=e;return a}function x(){function a(a,b,
5   -f){g.push([a,b,f])}function b(a,b){for(var f,d=0;f=g[d++];)(f=f[a])&&f(b)}var f,g,d;f=this;g=[];d=function(f,c){a=f?function(a){a&&a(c)}:function(a,b){b&&b(c)};d=h;b(f?0:1,c);b=h;g=q};this.Z=function(b,f,g){a(b,f,g)};this.h=function(a){f.r=a;d(r,a)};this.c=function(a){f.ca=a;d(y,a)};this.o=function(a){b(2,a)}}function o(a,b,f,g){a instanceof x?a.Z(b,f,g):b(a)}function A(a,b,f){return function(){var g;0<=--a&&b&&(g=b.apply(q,arguments));0==a&&f&&f(g);return g}}function t(){function a(b,g,d){var m;
6   -m=j.e(c,q,[].concat(b));this.then=b=function(a,b){o(m,function(b){a&&a.apply(q,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,f){return new a(b,f,m)};g&&b(g);o(d,function(){j.i(m)})}var b=[].slice.call(arguments);w(b[0],"Object")&&(c=j.C(b.shift()),j.t(c));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==q)if(G!==q)G={A:"Multiple anonymous defines in url"};else if(!(b=j.V()))G=a;if(b!=q){var f=v[b];f||(f=j.j(b,c).d,f=v[b]=j.v(f,b));f instanceof x&&(f.ba=y,j.w(f,
7   -a))}}var c=s.curl,n=s.document,p=n&&(n.head||n.getElementsByTagName("head")[0]),B={},l={},i={},H={},e={},N=e.toString,q,K={loaded:1,interactive:i,complete:1},v={},I=y,G,P=/\?/,L=/^\/|^[^:]+:\/\//,O=/(?:^|\/)(\.)(\.?)\/?/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,j;j={e:function(a,b,f,g){function d(a){return E(a,u.l)}function c(b,f){var g,m,l,e;g=f&&function(a){f.apply(q,a)};if(w(b,"String")){m=d(b);l=v[m];e=l instanceof x&&l.a;if(!(m in
8   -v))throw Error("Module not resolved: "+m);if(g)throw Error("require(id, callback) not allowed");return e||l}o(j.i(j.e(a,u.id,b)),g)}var u;u=new x;u.l=u.id=b||"";u.G=g;u.z=f;u.p=c;c.toUrl=function(b){return j.j(d(b),a).url};u.aa=d;return u},v:function(a,b,f,g){var d,c,u,e;d=j.e(a,b,q,f);d.l=g==q?b:g;c=d.h;u=A(1,function(a){d.m=a;try{e=j.O(d)}catch(b){d.c(b)}});d.h=function(a){u(a);v[d.id]=e;c(e)};d.B=function(a){d.a&&(u(a),d.o(l))};return d},N:function(a,b,f,g){a=j.e(a,b,q,f);a.l=g;return a},U:function(a){return a.p},
9   -D:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:j.F(a),exports:j.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=j.u(a.p.toUrl(a.id)))},C:function(a){function b(b,f){var c,d,m,e,l;for(l in b){m=b[l];e=a;d=z(k(m.id||m.name||l));c=d.L;if(d=d.g)e=g[d],e||(e=g[d]=F(a),e.f=F(a.f),e.b=[]),delete b[l];if(f){d=m;var n=void 0,i=void 0,n=d.path=k(d.path||d.location||""),i=d.main||"main";d.d=d.config;d.H="."==i.charAt(0)?k(E(i,n)):k(n)+"/"+i}else d={path:k(m)};
10   -d.M=c.split("/").length;c?(e.f[c]=d,e.b.push(c)):e.s=j.K(m,a)}}function f(a){var b=a.f;a.Y=RegExp("^("+a.b.sort(function(a,f){return b[a].M<b[f].M}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var g;a.s=a.baseUrl||"";a.J="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};g=a.plugins=a.plugins||{};a.b=[];b(a.paths,y);b(a.packages,r);for(var c in g){var m=g[c].b;m&&(g[c].b=m.concat(a.b),f(g[c]))}f(a);return a},t:function(a){var b;(b=a.preloads)&&0<b.length&&o(I,function(){I=j.i(j.e(a,q,
11   -b,r))})},j:function(a,b,f){var g,d,m;g=b.f;f&&b.J&&0>a.indexOf("/")&&!(a in g)&&(a=k(b.J)+"/"+a);f=L.test(a)?a:a.replace(b.Y,function(b){d=g[b]||{};m=d.d;return d.H&&b==a?d.H:d.path||""});return{path:f,d:m||c,url:j.K(f,b)}},K:function(a,b){var f=b.s;return f&&!L.test(a)?k(f)+"/"+a:a},u:function(a){return a+(P.test(a)?"":".js")},W:function(a,b,f){var c=n.createElement("script");c.onload=c.onreadystatechange=function(f){f=f||s.event;if("load"==f.type||K[c.readyState])delete H[a.id],c.onload=c.onreadystatechange=
12   -c.onerror="",b()};c.onerror=function(){f(Error("Syntax or http error: "+a.url))};c.charset="utf-8";c.async=r;c.src=a.url;H[a.id]=c;p.insertBefore(c,p.firstChild)},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(Q,"").replace(R,function(a,d,m){m?c=c==m?q:c:c||b.push(d);return a});return b},S:function(a){var b,c,g,d,m,e;m=a.length;g=a[m-1];d=w(g,"Function")?g.length:-1;2==m?w(a[0],"Array")?c=a[0]:b=a[0]:3==m&&(b=a[0],c=a[1]);!c&&0<d&&(e=r,c=["require","exports",
13   -"module"].slice(0,d).concat(j.P(g)));return{id:b,m:c||[],q:0<=d?g:function(){return g},k:e}},O:function(a){var b;b=a.q.apply(a.k?a.a:q,a.m);b===q&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},w:function(a,b){o(a.G||I,function(){a.q=b.q;a.k=b.k;a.z=b.m;j.i(a)})},i:function(a){function b(a,b,c){i[b]=a;c&&k(a,b)}function c(b,d){var f,g,e,m;f=A(1,function(a){g(a);p(a,d)});g=A(1,function(a){k(a,d)});e=j.Q(b,a);(m=e instanceof x&&e.a)&&g(m);o(e,f,a.c,a.a&&function(a){e.a&&(a==B?g(e.a):a==l&&f(e.a))})}function g(){a.h(i)}
14   -var d,e,i,n,h,k,p;i=[];e=a.z;n=e.length;0==e.length&&g();k=A(n,b,function(){a.B&&a.B(i)});p=A(n,b,g);for(d=0;d<n;d++)h=e[d],h in J?(p(J[h](a),d,r),a.a&&a.o(B)):h?c(h,d):p(q,d,r);return a},R:function(a){j.F(a);j.W(a,function(){var b=G;G=q;a.ba!==y&&(!b||b.A?a.c(Error((b&&b.A||"define() missing or duplicated: url").replace("url",a.url))):j.w(a,b))},a.c);return a},Q:function(a,b){var f,g,d,e,l,i,n,h,k,p;f=b.aa;g=b.G;d=z(a);i=d.L;e=f(d.g||i);n=j.j(e,c,!!d.g);if(d.g)l=e;else if(l=n.d.moduleLoader)i=e,
15   -e=l,n=j.j(l,c);h=v[e];h||(h=v[e]=j.v(n.d,e,g,d.g?n.path:q),h.url=j.u(n.url),j.R(h));e==l&&(k=new x,p=c.plugins[l]||c,o(h,function(a){var b,c,d;d=a.dynamic;i="normalize"in a?a.normalize(i,f,p)||"":f(i);c=l+"!"+i;b=v[c];if(!b){b=j.N(p,c,g,i);d||(v[c]=b);var e=function(a){b.h(a);d||(v[c]=a)};e.resolve=e;e.reject=b.c;a.load(i,b.p,e,p)}k!=b&&o(b,k.h,k.c,k.o)},k.c));return k||h},V:function(){var a;if(!w(s.opera,"Opera"))for(var b in H)if(K[H[b].readyState]==i){a=b;break}return a}};J={require:j.U,exports:j.D,
16   -module:j.T};if(!w(c,"Function")){c=j.C(c||{});j.t(c);var M;(c.apiContext||s)[c.apiName||"curl"]=t;v.curl=t;M=s.define=function(){var a=j.S(arguments);D(a)};t.version="0.6.1";M.amd={plugins:r,jQuery:r,curl:"0.6.1"};v["curl/_privileged"]={core:j,cache:v,cfg:c,_define:D,_curl:t,Promise:x}}})(this);
17   -(function(s,h){function w(){if(!h.body)return y;B||(B=h.createTextNode(""));try{return h.body.removeChild(h.body.appendChild(B)),B=p,r}catch(c){return y}}function k(){var l;l=C[h[z]]&&w();if(!o&&l){o=r;for(clearTimeout(n);D=c.pop();)D();x&&(h[z]="complete");for(var i;i=F.shift();)i()}return l}function E(){k();o||(n=setTimeout(E,A))}var z="readyState",C={loaded:1,interactive:1,complete:1},F=[],x=h&&"string"!=typeof h[z],o=y,A=10,t,D,c=[],n,p,B;t="addEventListener"in s?function(c,i){c.addEventListener(i,
18   -k,y);return function(){c.removeEventListener(i,k,y)}}:function(c,i){c.attachEvent("on"+i,k);return function(){c.detachEvent(i,k)}};h&&!k()&&(c=[t(s,"load"),t(h,"readystatechange"),t(s,"DOMContentLoaded")],n=setTimeout(E,A));define("curl/domReady",function(){function c(i){o?i():F.push(i)}c.then=c;c.amd=r;return c})})(this,this.document);
19   -(function(s,h){function w(c,n,k){function B(i){i=i||s.event;if("load"==i.type||x[e.readyState])e.onload=e[o]=e.onerror="",c.a&&(c.r=E(c.a)),!c.a||c.r?n(e):l()}function l(){e.onload=e[o]=e.onerror="";k&&k(Error("Script error or http error: "+c.url))}function i(){e.onload&&x[e.readyState]?B({}):e.onload&&t<new Date?l():setTimeout(i,10)}var t,e;t=(new Date).valueOf()+1E3*(c.$||300);e=h.createElement("script");k&&c.a&&setTimeout(i,10);e.type=c.I||"text/javascript";e.onload=e[o]=B;e.onerror=l;e.charset=
20   -c.charset||"utf-8";e.async=!c.X;e.src=c.url;A.insertBefore(e,A.firstChild)}function k(c,n){w(c,function(){var h=C.shift();t=0<C.length;h&&k.apply(null,h);n.resolve(c.r||r)},function(c){n.reject(c)})}function E(c){try{return eval("global."+c)}catch(h){return D}}var z={},C=[],F=h&&h.createElement("script").async==r,x={loaded:1,interactive:1,complete:1},o="onreadystatechange",A=h&&(h.head||h.getElementsByTagName("head")[0]),t,D;define("js",{dynamic:r,load:function(c,h,p,o){var l,i,s,e;l=0<c.indexOf("!order");
21   -i=c.indexOf("!exports=");s=0<i&&c.substr(i+9);e="prefetch"in o?o.prefetch:r;c=l||0<i?c.substr(0,c.indexOf("!")):c;c in z?p(z[c]):(z[c]=D,h={name:c,url:h.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".js":c),X:l,a:s,$:o.timeout},o={resolve:function(e){z[c]=e;(p.resolve||p)(e)},reject:p.reject||function(c){throw c;}},l&&!F&&t?(C.push([h,o]),e&&(h.I="text/cache",w(h,function(c){c.parentNode.removeChild(c)},y),h.I="")):(t=t||l,k(h,o)))}})})(this,this.document);
22   -define("domReady",["curl/domReady"],function(s){return{load:function(h,w,k){s(k)}}});
  3 +var q=!0,y=!1;
  4 +(function(r){function i(){}function w(a,b){return 0==N.call(a).indexOf("[object "+b)}function l(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function E(a,b){var f,g,d;g=1;a=a.replace(O,function(a,b,f){f&&g++;d=q;return""});return d?(f=b.split("/"),f.splice(f.length-g,g),f.concat(a||[]).join("/")):a}function z(a){var b=a.indexOf("!");return{L:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function C(){}function F(a){C.prototype=a;a=new C;C.prototype=e;return a}function x(){function a(a,b,
  5 +f){g.push([a,b,f])}function b(a,b){for(var f,d=0;f=g[d++];)(f=f[a])&&f(b)}var f,g,d;f=this;g=[];d=function(f,c){a=f?function(a){a&&a(c)}:function(a,b){b&&b(c)};d=i;b(f?0:1,c);b=i;g=p};this.Z=function(b,f,g){a(b,f,g)};this.h=function(a){f.r=a;d(q,a)};this.c=function(a){f.ca=a;d(y,a)};this.o=function(a){b(2,a)}}function o(a,b,f,g){a instanceof x?a.Z(b,f,g):b(a)}function A(a,b,f){return function(){var g;0<=--a&&b&&(g=b.apply(p,arguments));0==a&&f&&f(g);return g}}function s(){function a(b,g,d){var n;
  6 +n=j.e(c,p,[].concat(b));this.then=b=function(a,b){o(n,function(b){a&&a.apply(p,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,f){return new a(b,f,n)};g&&b(g);o(d,function(){j.i(n)})}var b=[].slice.call(arguments);w(b[0],"Object")&&(c=j.C(b.shift()),j.t(c));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==p)if(G!==p)G={A:"Multiple anonymous defines in url"};else if(!(b=j.V()))G=a;if(b!=p){var f=t[b];b in t||(f=j.j(b,c).d,f=t[b]=j.v(f,b));f instanceof x&&(f.ba=y,j.w(f,
  7 +a))}}var c=r.curl,k=r.document,v=k&&(k.head||k.getElementsByTagName("head")[0]),B={},m={},h={},H={},e={},N=e.toString,p,K={loaded:1,interactive:h,complete:1},t={},I=y,G,P=/\?/,L=/^\/|^[^:]+:\/\//,O=/(?:^|\/)(\.)(\.?)\/?/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,J,j;j={e:function(a,b,f,g){function d(a){return E(a,u.l)}function c(b,f){var g,n,m,e;g=f&&function(a){f.apply(p,a)};if(w(b,"String")){n=d(b);m=t[n];e=m instanceof x&&m.a;if(!(n in
  8 +t))throw Error("Module not resolved: "+n);if(g)throw Error("require(id, callback) not allowed");return e||m}o(j.i(j.e(a,u.id,b)),g)}var u;u=new x;u.l=u.id=b||"";u.G=g;u.z=f;u.p=c;c.toUrl=function(b){return j.j(d(b),a).url};u.aa=d;return u},v:function(a,b,f,g){var d,c,u,e;d=j.e(a,b,p,f);d.l=g==p?b:g;c=d.h;u=A(1,function(a){d.m=a;try{e=j.O(d)}catch(b){d.c(b)}});d.h=function(a){u(a);t[d.id]=e;c(e)};d.B=function(a){d.a&&(u(a),d.o(m))};return d},N:function(a,b,f,g){a=j.e(a,b,p,f);a.l=g;return a},U:function(a){return a.p},
  9 +D:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:j.F(a),exports:j.D(a)},b.a=b.exports);return b},F:function(a){return a.url||(a.url=j.u(a.p.toUrl(a.id)))},C:function(a){function b(b,f){var c,d,n,e,m;for(m in b){n=b[m];e=a;d=z(l(n.id||n.name||m));c=d.L;if(d=d.g)e=g[d],e||(e=g[d]=F(a),e.f=F(a.f),e.b=[]),delete b[m];if(f){d=n;var k=void 0,h=void 0,k=d.path=l(d.path||d.location||""),h=d.main||"main";d.d=d.config;d.H="."==h.charAt(0)?l(E(h,k)):l(k)+"/"+h}else d={path:l(n)};
  10 +d.M=c.split("/").length;c?(e.f[c]=d,e.b.push(c)):e.s=j.K(n,a)}}function f(a){var b=a.f;a.Y=RegExp("^("+a.b.sort(function(a,f){return b[a].M<b[f].M}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var g;a.s=a.baseUrl||"";a.J="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};g=a.plugins=a.plugins||{};a.b=[];b(a.paths,y);b(a.packages,q);for(var c in g){var n=g[c].b;n&&(g[c].b=n.concat(a.b),f(g[c]))}f(a);return a},t:function(a){var b;(b=a.preloads)&&0<b.length&&o(I,function(){I=j.i(j.e(a,p,
  11 +b,q))})},j:function(a,b,f){var g,d,n;g=b.f;f&&b.J&&0>a.indexOf("/")&&!(a in g)&&(a=l(b.J)+"/"+a);f=L.test(a)?a:a.replace(b.Y,function(b){d=g[b]||{};n=d.d;return d.H&&b==a?d.H:d.path||""});return{path:f,d:n||c,url:j.K(f,b)}},K:function(a,b){var f=b.s;return f&&!L.test(a)?l(f)+"/"+a:a},u:function(a){return a+(P.test(a)?"":".js")},W:function(a,b,f){var c=k.createElement("script");c.onload=c.onreadystatechange=function(f){f=f||r.event;if("load"==f.type||K[c.readyState])delete H[a.id],c.onload=c.onreadystatechange=
  12 +c.onerror="",b()};c.onerror=function(){f(Error("Syntax or http error: "+a.url))};c.charset="utf-8";c.async=q;c.src=a.url;H[a.id]=c;v.insertBefore(c,v.firstChild)},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(Q,"").replace(R,function(a,d,n){n?c=c==n?p:c:c||b.push(d);return a});return b},S:function(a){var b,c,g,d,n,e;n=a.length;g=a[n-1];d=w(g,"Function")?g.length:-1;2==n?w(a[0],"Array")?c=a[0]:b=a[0]:3==n&&(b=a[0],c=a[1]);!c&&0<d&&(e=q,c=["require","exports",
  13 +"module"].slice(0,d).concat(j.P(g)));return{id:b,m:c||[],q:0<=d?g:function(){return g},k:e}},O:function(a){var b;b=a.q.apply(a.k?a.a:p,a.m);b===p&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},w:function(a,b){o(a.G||I,function(){a.q=b.q;a.k=b.k;a.z=b.m;j.i(a)})},i:function(a){function b(a,b,c){h[b]=a;c&&l(a,b)}function c(b,d){var f,g,e,n;f=A(1,function(a){g(a);v(a,d)});g=A(1,function(a){l(a,d)});e=j.Q(b,a);(n=e instanceof x&&e.a)&&g(n);o(e,f,a.c,a.a&&function(a){e.a&&(a==B?g(e.a):a==m&&f(e.a))})}function g(){a.h(h)}
  14 +var d,e,h,k,i,l,v;h=[];e=a.z;k=e.length;0==e.length&&g();l=A(k,b,function(){a.B&&a.B(h)});v=A(k,b,g);for(d=0;d<k;d++)i=e[d],i in J?(v(J[i](a),d,q),a.a&&a.o(B)):i?c(i,d):v(p,d,q);return a},R:function(a){j.F(a);j.W(a,function(){var b=G;G=p;a.ba!==y&&(!b||b.A?a.c(Error((b&&b.A||"define() missing or duplicated: url").replace("url",a.url))):j.w(a,b))},a.c);return a},Q:function(a,b){var f,g,d,e,m,h,k,i,l,v;f=b.aa;g=b.G;d=z(a);h=d.L;e=f(d.g||h);k=j.j(e,c,!!d.g);if(d.g)m=e;else if(m=k.d.moduleLoader)h=e,
  15 +e=m,k=j.j(m,c);i=t[e];e in t||(i=t[e]=j.v(k.d,e,g,d.g?k.path:p),i.url=j.u(k.url),j.R(i));e==m&&(l=new x,v=c.plugins[m]||c,o(i,function(a){var b,c,d;d=a.dynamic;h="normalize"in a?a.normalize(h,f,v)||"":f(h);c=m+"!"+h;b=t[c];if(!(c in t)){b=j.N(v,c,g,h);d||(t[c]=b);var e=function(a){b.h(a);d||(t[c]=a)};e.resolve=e;e.reject=b.c;a.load(h,b.p,e,v)}l!=b&&o(b,l.h,l.c,l.o)},l.c));return l||i},V:function(){var a;if(!w(r.opera,"Opera"))for(var b in H)if(K[H[b].readyState]==h){a=b;break}return a}};J={require:j.U,
  16 +exports:j.D,module:j.T};if(!w(c,"Function")){c=j.C(c||{});j.t(c);var M;(c.apiContext||r)[c.apiName||"curl"]=s;t.curl=s;M=r.define=function(){var a=j.S(arguments);D(a)};s.version="0.6.2";M.amd={plugins:q,jQuery:q,curl:"0.6.2"};t["curl/_privileged"]={core:j,cache:t,cfg:c,_define:D,_curl:s,Promise:x}}})(this);
  17 +(function(r,i){function w(){if(!i.body)return y;B||(B=i.createTextNode(""));try{return i.body.removeChild(i.body.appendChild(B)),B=v,q}catch(c){return y}}function l(){var m;m=C[i[z]]&&w();if(!o&&m){o=q;for(clearTimeout(k);D=c.pop();)D();x&&(i[z]="complete");for(var h;h=F.shift();)h()}return m}function E(){l();o||(k=setTimeout(E,A))}var z="readyState",C={loaded:1,interactive:1,complete:1},F=[],x=i&&"string"!=typeof i[z],o=y,A=10,s,D,c=[],k,v,B;s="addEventListener"in r?function(c,h){c.addEventListener(h,
  18 +l,y);return function(){c.removeEventListener(h,l,y)}}:function(c,h){c.attachEvent("on"+h,l);return function(){c.detachEvent(h,l)}};i&&!l()&&(c=[s(r,"load"),s(i,"readystatechange"),s(r,"DOMContentLoaded")],k=setTimeout(E,A));define("curl/domReady",function(){function c(h){o?h():F.push(h)}c.then=c;c.amd=q;return c})})(this,this.document);
  19 +(function(r,i){function w(c,k,l){function B(h){h=h||r.event;if("load"==h.type||x[e.readyState])e.onload=e[o]=e.onerror="",c.a&&(c.r=E(c.a)),!c.a||c.r?k(e):m()}function m(){e.onload=e[o]=e.onerror="";l&&l(Error("Script error or http error: "+c.url))}function h(){e.onload&&x[e.readyState]?B({}):e.onload&&s<new Date?m():setTimeout(h,10)}var s,e;s=(new Date).valueOf()+1E3*(c.$||300);e=i.createElement("script");l&&c.a&&setTimeout(h,10);e.type=c.I||"text/javascript";e.onload=e[o]=B;e.onerror=m;e.charset=
  20 +c.charset||"utf-8";e.async=!c.X;e.src=c.url;A.insertBefore(e,A.firstChild)}function l(c,k){w(c,function(){var i=C.shift();s=0<C.length;i&&l.apply(null,i);k.resolve(c.r||q)},function(c){k.reject(c)})}function E(c){try{return eval("global."+c)}catch(k){return D}}var z={},C=[],F=i&&i.createElement("script").async==q,x={loaded:1,interactive:1,complete:1},o="onreadystatechange",A=i&&(i.head||i.getElementsByTagName("head")[0]),s,D;define("js",{dynamic:q,load:function(c,k,i,o){var m,h,r,e;m=0<c.indexOf("!order");
  21 +h=c.indexOf("!exports=");r=0<h&&c.substr(h+9);e="prefetch"in o?o.prefetch:q;c=m||0<h?c.substr(0,c.indexOf("!")):c;c in z?i(z[c]):(z[c]=D,k={name:c,url:k.toUrl(c.lastIndexOf(".")<=c.lastIndexOf("/")?c+".js":c),X:m,a:r,$:o.timeout},o={resolve:function(e){z[c]=e;(i.resolve||i)(e)},reject:i.reject||function(c){throw c;}},m&&!F&&s?(C.push([k,o]),e&&(k.I="text/cache",w(k,function(c){c.parentNode.removeChild(c)},y),k.I="")):(s=s||m,l(k,o)))}})})(this,this.document);
  22 +define("domReady",["curl/domReady"],function(r){return{load:function(i,w,l){r(l)}}});
28 dist/curl/curl.js
... ... @@ -1,16 +1,16 @@
1 1 /*
2 2 MIT License (c) copyright B Cavalier & J Hann */
3   -var q=!0;
4   -(function(t){function E(){}function u(a,b){return 0==S.call(a).indexOf("[object "+b)}function n(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function F(a,b){var c,e,d;e=1;a=a.replace(T,function(a,b,c){c&&e++;d=q;return""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function G(a){var b=a.indexOf("!");return{J:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function A(){}function H(a){A.prototype=a;a=new A;A.prototype=I;return a}function s(){function a(a,b,
5   -c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,h){a=c?function(a){a&&a(h)}:function(a,b){b&&b(h)};d=E;b(c?0:1,h);b=E;e=j};this.W=function(b,c,e){a(b,c,e)};this.h=function(a){c.$=a;d(q,a)};this.c=function(a){c.Z=a;d(!1,a)};this.o=function(a){b(2,a)}}function r(a,b,c,e){a instanceof s?a.W(b,c,e):b(a)}function v(a,b,c){return function(){var e;0<=--a&&b&&(e=b.apply(j,arguments));0==a&&c&&c(e);return e}}function x(){function a(b,e,d){var f;
6   -f=g.e(i,j,[].concat(b));this.then=b=function(a,b){r(f,function(b){a&&a.apply(j,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);r(d,function(){g.i(f)})}var b=[].slice.call(arguments);u(b[0],"Object")&&(i=g.B(b.shift()),g.s(i));return new a(b[0],b[1])}function J(a){var b=a.id;if(b==j)if(w!==j)w={z:"Multiple anonymous defines in url"};else if(!(b=g.T()))w=a;if(b!=j){var c=k[b];c||(c=g.j(b,i).d,c=k[b]=g.u(c,b));c instanceof s&&(c.Y=!1,g.v(c,
7   -a))}}var i=t.curl,y=t.document,K=y&&(y.head||y.getElementsByTagName("head")[0]),L={},M={},N={},z={},I={},S=I.toString,j,O={loaded:1,interactive:N,complete:1},k={},B=!1,w,U=/\?/,P=/^\/|^[^:]+:\/\//,T=/(?:^|\/)(\.)(\.?)\/?/g,V=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,W=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,C,g;g={e:function(a,b,c,e){function d(a){return F(a,h.l)}function f(b,c){var e,f,m,Q;e=c&&function(a){c.apply(j,a)};if(u(b,"String")){f=d(b);m=k[f];Q=m instanceof s&&m.a;if(!(f in
8   -k))throw Error("Module not resolved: "+f);if(e)throw Error("require(id, callback) not allowed");return Q||m}r(g.i(g.e(a,h.id,b)),e)}var h;h=new s;h.l=h.id=b||"";h.F=e;h.w=c;h.p=f;f.toUrl=function(b){return g.j(d(b),a).url};h.X=d;return h},u:function(a,b,c,e){var d,f,h,o;d=g.e(a,b,j,c);d.l=e==j?b:e;f=d.h;h=v(1,function(a){d.m=a;try{o=g.M(d)}catch(b){d.c(b)}});d.h=function(a){h(a);k[d.id]=o;f(o)};d.A=function(a){d.a&&(h(a),d.o(M))};return d},L:function(a,b,c,e){a=g.e(a,b,j,c);a.l=e;return a},S:function(a){return a.p},
9   -C:function(a){return a.a||(a.a={})},R:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:g.D(a),exports:g.C(a)},b.a=b.exports);return b},D:function(a){return a.url||(a.url=g.t(a.p.toUrl(a.id)))},B:function(a){function b(b,c){var d,f,l,m,j;for(j in b){l=b[j];m=a;f=G(n(l.id||l.name||j));d=f.J;if(f=f.g)m=e[f],m||(m=e[f]=H(a),m.f=H(a.f),m.b=[]),delete b[j];if(c){f=l;var D=void 0,i=void 0,D=f.path=n(f.path||f.location||""),i=f.main||"main";f.d=f.config;f.G="."==i.charAt(0)?n(F(i,D)):n(D)+"/"+i}else f={path:n(l)};
10   -f.K=d.split("/").length;d?(m.f[d]=f,m.b.push(d)):m.r=g.I(l,a)}}function c(a){var b=a.f;a.V=RegExp("^("+a.b.sort(function(a,c){return b[a].K<b[c].K}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var e;a.r=a.baseUrl||"";a.H="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};e=a.plugins=a.plugins||{};a.b=[];b(a.paths,!1);b(a.packages,q);for(var d in e){var f=e[d].b;f&&(e[d].b=f.concat(a.b),c(e[d]))}c(a);return a},s:function(a){var b;(b=a.preloads)&&0<b.length&&r(B,function(){B=g.i(g.e(a,j,
11   -b,q))})},j:function(a,b,c){var e,d,f;e=b.f;c&&b.H&&0>a.indexOf("/")&&!(a in e)&&(a=n(b.H)+"/"+a);c=P.test(a)?a:a.replace(b.V,function(b){d=e[b]||{};f=d.d;return d.G&&b==a?d.G:d.path||""});return{path:c,d:f||i,url:g.I(c,b)}},I:function(a,b){var c=b.r;return c&&!P.test(a)?n(c)+"/"+a:a},t:function(a){return a+(U.test(a)?"":".js")},U:function(a,b,c){var e=y.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||t.event;if("load"==c.type||O[e.readyState])delete z[a.id],e.onload=e.onreadystatechange=
12   -e.onerror="",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.charset="utf-8";e.async=q;e.src=a.url;z[a.id]=e;K.insertBefore(e,K.firstChild)},N:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(V,"").replace(W,function(a,d,f){f?c=c==f?j:c:c||b.push(d);return a});return b},Q:function(a){var b,c,e,d,f,h;f=a.length;e=a[f-1];d=u(e,"Function")?e.length:-1;2==f?u(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=a[0],c=a[1]);!c&&0<d&&(h=q,c=["require","exports",
13   -"module"].slice(0,d).concat(g.N(e)));return{id:b,m:c||[],q:0<=d?e:function(){return e},k:h}},M:function(a){var b;b=a.q.apply(a.k?a.a:j,a.m);b===j&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){r(a.F||B,function(){a.q=b.q;a.k=b.k;a.w=b.m;g.i(a)})},i:function(a){function b(a,b,c){h[b]=a;c&&p(a,b)}function c(b,c){var e,d,f,h;e=v(1,function(a){d(a);l(a,c)});d=v(1,function(a){p(a,c)});f=g.O(b,a);(h=f instanceof s&&f.a)&&d(h);r(f,e,a.c,a.a&&function(a){f.a&&(a==L?d(f.a):a==M&&e(f.a))})}function e(){a.h(h)}
14   -var d,f,h,i,k,p,l;h=[];f=a.w;i=f.length;0==f.length&&e();p=v(i,b,function(){a.A&&a.A(h)});l=v(i,b,e);for(d=0;d<i;d++)k=f[d],k in C?(l(C[k](a),d,q),a.a&&a.o(L)):k?c(k,d):l(j,d,q);return a},P:function(a){g.D(a);g.U(a,function(){var b=w;w=j;!1!==a.Y&&(!b||b.z?a.c(Error((b&&b.z||"define() missing or duplicated: url").replace("url",a.url))):g.v(a,b))},a.c);return a},O:function(a,b){var c,e,d,f,h,o,n,p,l,m;c=b.X;e=b.F;d=G(a);o=d.J;f=c(d.g||o);n=g.j(f,i,!!d.g);if(d.g)h=f;else if(h=n.d.moduleLoader)o=f,f=
15   -h,n=g.j(h,i);p=k[f];p||(p=k[f]=g.u(n.d,f,e,d.g?n.path:j),p.url=g.t(n.url),g.P(p));f==h&&(l=new s,m=i.plugins[h]||i,r(p,function(a){var b,d,f;f=a.dynamic;o="normalize"in a?a.normalize(o,c,m)||"":c(o);d=h+"!"+o;b=k[d];if(!b){b=g.L(m,d,e,o);f||(k[d]=b);var i=function(a){b.h(a);f||(k[d]=a)};i.resolve=i;i.reject=b.c;a.load(o,b.p,i,m)}l!=b&&r(b,l.h,l.c,l.o)},l.c));return l||p},T:function(){var a;if(!u(t.opera,"Opera"))for(var b in z)if(O[z[b].readyState]==N){a=b;break}return a}};C={require:g.S,exports:g.C,
16   -module:g.R};if(!u(i,"Function")){i=g.B(i||{});g.s(i);var R;(i.apiContext||t)[i.apiName||"curl"]=x;k.curl=x;R=t.define=function(){var a=g.Q(arguments);J(a)};x.version="0.6.1";R.amd={plugins:q,jQuery:q,curl:"0.6.1"};k["curl/_privileged"]={core:g,cache:k,cfg:i,_define:J,_curl:x,Promise:s}}})(this);
  3 +var p=!0;
  4 +(function(t){function E(){}function u(a,b){return 0==S.call(a).indexOf("[object "+b)}function n(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function F(a,b){var c,f,d;f=1;a=a.replace(T,function(a,b,c){c&&f++;d=p;return""});return d?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function G(a){var b=a.indexOf("!");return{J:a.substr(b+1),g:0<=b&&a.substr(0,b)}}function A(){}function H(a){A.prototype=a;a=new A;A.prototype=I;return a}function s(){function a(a,b,
  5 +c){f.push([a,b,c])}function b(a,b){for(var c,d=0;c=f[d++];)(c=c[a])&&c(b)}var c,f,d;c=this;f=[];d=function(c,h){a=c?function(a){a&&a(h)}:function(a,b){b&&b(h)};d=E;b(c?0:1,h);b=E;f=j};this.W=function(b,c,f){a(b,c,f)};this.h=function(a){c.$=a;d(p,a)};this.c=function(a){c.Z=a;d(!1,a)};this.o=function(a){b(2,a)}}function r(a,b,c,f){a instanceof s?a.W(b,c,f):b(a)}function v(a,b,c){return function(){var f;0<=--a&&b&&(f=b.apply(j,arguments));0==a&&c&&c(f);return f}}function x(){function a(b,f,d){var e;
  6 +e=g.e(i,j,[].concat(b));this.then=b=function(a,b){r(e,function(b){a&&a.apply(j,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,e)};f&&b(f);r(d,function(){g.i(e)})}var b=[].slice.call(arguments);u(b[0],"Object")&&(i=g.B(b.shift()),g.s(i));return new a(b[0],b[1])}function J(a){var b=a.id;if(b==j)if(w!==j)w={z:"Multiple anonymous defines in url"};else if(!(b=g.T()))w=a;if(b!=j){var c=k[b];b in k||(c=g.j(b,i).d,c=k[b]=g.u(c,b));c instanceof s&&(c.Y=!1,g.v(c,
  7 +a))}}var i=t.curl,y=t.document,K=y&&(y.head||y.getElementsByTagName("head")[0]),L={},M={},N={},z={},I={},S=I.toString,j,O={loaded:1,interactive:N,complete:1},k={},B=!1,w,U=/\?/,P=/^\/|^[^:]+:\/\//,T=/(?:^|\/)(\.)(\.?)\/?/g,V=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,W=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,C,g;g={e:function(a,b,c,f){function d(a){return F(a,h.l)}function e(b,c){var f,e,m,Q;f=c&&function(a){c.apply(j,a)};if(u(b,"String")){e=d(b);m=k[e];Q=m instanceof s&&m.a;if(!(e in
  8 +k))throw Error("Module not resolved: "+e);if(f)throw Error("require(id, callback) not allowed");return Q||m}r(g.i(g.e(a,h.id,b)),f)}var h;h=new s;h.l=h.id=b||"";h.F=f;h.w=c;h.p=e;e.toUrl=function(b){return g.j(d(b),a).url};h.X=d;return h},u:function(a,b,c,f){var d,e,h,o;d=g.e(a,b,j,c);d.l=f==j?b:f;e=d.h;h=v(1,function(a){d.m=a;try{o=g.M(d)}catch(b){d.c(b)}});d.h=function(a){h(a);k[d.id]=o;e(o)};d.A=function(a){d.a&&(h(a),d.o(M))};return d},L:function(a,b,c,f){a=g.e(a,b,j,c);a.l=f;return a},S:function(a){return a.p},
  9 +C:function(a){return a.a||(a.a={})},R:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:g.D(a),exports:g.C(a)},b.a=b.exports);return b},D:function(a){return a.url||(a.url=g.t(a.p.toUrl(a.id)))},B:function(a){function b(b,c){var d,e,l,m,j;for(j in b){l=b[j];m=a;e=G(n(l.id||l.name||j));d=e.J;if(e=e.g)m=f[e],m||(m=f[e]=H(a),m.f=H(a.f),m.b=[]),delete b[j];if(c){e=l;var D=void 0,i=void 0,D=e.path=n(e.path||e.location||""),i=e.main||"main";e.d=e.config;e.G="."==i.charAt(0)?n(F(i,D)):n(D)+"/"+i}else e={path:n(l)};
  10 +e.K=d.split("/").length;d?(m.f[d]=e,m.b.push(d)):m.r=g.I(l,a)}}function c(a){var b=a.f;a.V=RegExp("^("+a.b.sort(function(a,c){return b[a].K<b[c].K}).join("|").replace(/\//g,"\\/")+")(?=\\/|$)");delete a.b}var f;a.r=a.baseUrl||"";a.H="pluginPath"in a?a.pluginPath:"curl/plugin";a.f={};f=a.plugins=a.plugins||{};a.b=[];b(a.paths,!1);b(a.packages,p);for(var d in f){var e=f[d].b;e&&(f[d].b=e.concat(a.b),c(f[d]))}c(a);return a},s:function(a){var b;(b=a.preloads)&&0<b.length&&r(B,function(){B=g.i(g.e(a,j,
  11 +b,p))})},j:function(a,b,c){var f,d,e;f=b.f;c&&b.H&&0>a.indexOf("/")&&!(a in f)&&(a=n(b.H)+"/"+a);c=P.test(a)?a:a.replace(b.V,function(b){d=f[b]||{};e=d.d;return d.G&&b==a?d.G:d.path||""});return{path:c,d:e||i,url:g.I(c,b)}},I:function(a,b){var c=b.r;return c&&!P.test(a)?n(c)+"/"+a:a},t:function(a){return a+(U.test(a)?"":".js")},U:function(a,b,c){var f=y.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||t.event;if("load"==c.type||O[f.readyState])delete z[a.id],f.onload=f.onreadystatechange=
  12 +f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.charset="utf-8";f.async=p;f.src=a.url;z[a.id]=f;K.insertBefore(f,K.firstChild)},N:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(V,"").replace(W,function(a,d,e){e?c=c==e?j:c:c||b.push(d);return a});return b},Q:function(a){var b,c,f,d,e,h;e=a.length;f=a[e-1];d=u(f,"Function")?f.length:-1;2==e?u(a[0],"Array")?c=a[0]:b=a[0]:3==e&&(b=a[0],c=a[1]);!c&&0<d&&(h=p,c=["require","exports",
  13 +"module"].slice(0,d).concat(g.N(f)));return{id:b,m:c||[],q:0<=d?f:function(){return f},k:h}},M:function(a){var b;b=a.q.apply(a.k?a.a:j,a.m);b===j&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){r(a.F||B,function(){a.q=b.q;a.k=b.k;a.w=b.m;g.i(a)})},i:function(a){function b(a,b,c){h[b]=a;c&&q(a,b)}function c(b,c){var f,d,e,h;f=v(1,function(a){d(a);l(a,c)});d=v(1,function(a){q(a,c)});e=g.O(b,a);(h=e instanceof s&&e.a)&&d(h);r(e,f,a.c,a.a&&function(a){e.a&&(a==L?d(e.a):a==M&&f(e.a))})}function f(){a.h(h)}
  14 +var d,e,h,i,k,q,l;h=[];e=a.w;i=e.length;0==e.length&&f();q=v(i,b,function(){a.A&&a.A(h)});l=v(i,b,f);for(d=0;d<i;d++)k=e[d],k in C?(l(C[k](a),d,p),a.a&&a.o(L)):k?c(k,d):l(j,d,p);return a},P:function(a){g.D(a);g.U(a,function(){var b=w;w=j;!1!==a.Y&&(!b||b.z?a.c(Error((b&&b.z||"define() missing or duplicated: url").replace("url",a.url))):g.v(a,b))},a.c);return a},O:function(a,b){var c,f,d,e,h,o,n,q,l,m;c=b.X;f=b.F;d=G(a);o=d.J;e=c(d.g||o);n=g.j(e,i,!!d.g);if(d.g)h=e;else if(h=n.d.moduleLoader)o=e,e=
  15 +h,n=g.j(h,i);q=k[e];e in k||(q=k[e]=g.u(n.d,e,f,d.g?n.path:j),q.url=g.t(n.url),g.P(q));e==h&&(l=new s,m=i.plugins[h]||i,r(q,function(a){var b,d,e;e=a.dynamic;o="normalize"in a?a.normalize(o,c,m)||"":c(o);d=h+"!"+o;b=k[d];if(!(d in k)){b=g.L(m,d,f,o);e||(k[d]=b);var i=function(a){b.h(a);e||(k[d]=a)};i.resolve=i;i.reject=b.c;a.load(o,b.p,i,m)}l!=b&&r(b,l.h,l.c,l.o)},l.c));return l||q},T:function(){var a;if(!u(t.opera,"Opera"))for(var b in z)if(O[z[b].readyState]==N){a=b;break}return a}};C={require:g.S,
  16 +exports:g.C,module:g.R};if(!u(i,"Function")){i=g.B(i||{});g.s(i);var R;(i.apiContext||t)[i.apiName||"curl"]=x;k.curl=x;R=t.define=function(){var a=g.Q(arguments);J(a)};x.version="0.6.2";R.amd={plugins:p,jQuery:p,curl:"0.6.2"};k["curl/_privileged"]={core:g,cache:k,cfg:i,_define:J,_curl:x,Promise:s}}})(this);
4 src/curl.js
@@ -9,12 +9,12 @@
9 9 * Licensed under the MIT License at:
10 10 * http://www.opensource.org/licenses/mit-license.php
11 11 *
12   - * @version 0.6.1
  12 + * @version 0.6.2
13 13 */
14 14 (function (global) {
15 15
16 16 var
17   - version = '0.6.1',
  17 + version = '0.6.2',
18 18 userCfg = global['curl'],
19 19 doc = global.document,
20 20 head = doc && (doc['head'] || doc.getElementsByTagName('head')[0]),

0 comments on commit b0023ed

Please sign in to comment.
Something went wrong with that request. Please try again.