Ce script ne devrait pas être installé directement. C'est une librairie créée pour d'autres scripts. Elle doit être inclus avec la commande // @require https://update.greasyfork.org/scripts/396832/775086/Redux-saga.js
// ==UserScript==
// @name Redux-saga
// @namespace eisen-stein
// @version 1.0.0
// @description Redux-saga bundled
// ==/UserScript==
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["redux-saga"]=t():n["redux-saga"]=t()}(window,(function(){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="",e(e.s=4)}([function(n,t,e){"use strict";(function(n,r){var o,c=e(1);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:r;var u=Object(c.a)(o);t.a=u}).call(this,e(2),e(3)(n))},function(n,t,e){"use strict";function r(n){var t,e=n.Symbol;return"function"==typeof e?e.observable?t=e.observable:(t=e("observable"),e.observable=t):t="@@observable",t}e.d(t,"a",(function(){return r}))},function(n,t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"==typeof window&&(e=window)}n.exports=e},function(n,t){n.exports=function(n){if(!n.webpackPolyfill){var t=Object.create(n);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(n,t,e){"use strict";e.r(t);var r=function(n){return"@@redux-saga/"+n},o=r("CANCEL_PROMISE"),c=r("CHANNEL_END"),u=r("IO"),a=r("MATCH"),i=r("MULTICAST"),f=r("SAGA_ACTION"),l=r("SELF_CANCELLATION"),s=r("TASK"),d=r("TASK_CANCEL"),v=r("TERMINATE"),p=r("LOCATION");function h(){return(h=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}var y=function(n){return null==n},g=function(n){return null!=n},b=function(n){return"function"==typeof n},m=function(n){return"string"==typeof n},E=Array.isArray,S=function(n){return n&&b(n.then)},j=function(n){return n&&b(n.next)&&b(n.throw)},O=function(n){return Boolean(n)&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype};var x=function(n){return function(){return n}}(!0),w=function(){};var k=function(n){return n};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var A=function(n,t){h(n,t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach((function(e){n[e]=t[e]}))};function C(n,t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}function T(n){var t=!1;return function(){t||(t=!0,n())}}var N=function(n){throw n},M=function(n){return{value:n,done:!0}};function R(n,t,e){void 0===t&&(t=N),void 0===e&&(e="iterator");var r={meta:{name:e},next:n,throw:t,return:M,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(r[Symbol.iterator]=function(){return r}),r}function P(n,t){var e=t.sagaStack;console.error(n),console.error(e)}var L=function(n){return Array.apply(null,new Array(n))},_=function(n){return function(t){return n(Object.defineProperty(t,f,{value:!0}))}},I=function(n){return n===v},D=function(n){return n===d},F=function(n){return I(n)||D(n)};function K(n,t){var e=Object.keys(n),r=e.length;var o,c=0,u=E(n)?L(r):{},a={};return e.forEach((function(n){var e=function(e,a){o||(a||F(e)?(t.cancel(),t(e,a)):(u[n]=e,++c===r&&(o=!0,t(u))))};e.cancel=w,a[n]=e})),t.cancel=function(){o||(o=!0,e.forEach((function(n){return a[n].cancel()})))},a}function H(n){return{name:n.name||"anonymous",location:q(n)}}function q(n){return n[p]}var z={isEmpty:x,put:w,take:w};function U(n,t){void 0===n&&(n=10);var e=new Array(n),r=0,o=0,c=0,u=function(t){e[o]=t,o=(o+1)%n,r++},a=function(){if(0!=r){var t=e[c];return e[c]=null,r--,c=(c+1)%n,t}},i=function(){for(var n=[];r;)n.push(a());return n};return{isEmpty:function(){return 0==r},put:function(a){var f;if(r<n)u(a);else switch(t){case 1:throw new Error("Channel's Buffer overflow!");case 3:e[o]=a,c=o=(o+1)%n;break;case 4:f=2*n,e=i(),r=e.length,o=e.length,c=0,e.length=f,n=f,u(a)}},take:a,flush:i}}var B=function(){return z},G=function(n){return U(n,4)},X=Object.freeze({__proto__:null,none:B,fixed:function(n){return U(n,1)},dropping:function(n){return U(n,2)},sliding:function(n){return U(n,3)},expanding:G}),J=function(n,t){var e;return(e={})[u]=!0,e.combinator=!1,e.type=n,e.payload=t,e},Q=function(n){return J("FORK",h({},n.payload,{detached:!0}))};e(0);var V=function(){return Math.random().toString(36).substring(7).split("").join(".")};V(),V();function W(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return 0===t.length?function(n){return n}:1===t.length?t[0]:t.reduce((function(n,t){return function(){return n(t.apply(void 0,arguments))}}))}function Y(){var n={};return n.promise=new Promise((function(t,e){n.resolve=t,n.reject=e})),n}var Z=Y,$=[],nn=0;function tn(n){try{on(),n()}finally{cn()}}function en(n){$.push(n),nn||(on(),un())}function rn(n){try{return on(),n()}finally{un()}}function on(){nn++}function cn(){nn--}function un(){var n;for(cn();!nn&&void 0!==(n=$.shift());)tn(n)}var an=function(n){return function(t){return n.some((function(n){return vn(n)(t)}))}},fn=function(n){return function(t){return n(t)}},ln=function(n){return function(t){return t.type===String(n)}},sn=function(n){return function(t){return t.type===n}},dn=function(){return x};function vn(n){var t,e="*"===n?dn:m(n)?ln:E(n)?an:b(t=n)&&t.hasOwnProperty("toString")?ln:b(n)?fn:O(n)?sn:null;if(null===e)throw new Error("invalid pattern: "+n);return e(n)}var pn={type:c},hn=function(n){return n&&n.type===c};function yn(n){void 0===n&&(n=G());var t=!1,e=[];return{take:function(r){t&&n.isEmpty()?r(pn):n.isEmpty()?(e.push(r),r.cancel=function(){C(e,r)}):r(n.take())},put:function(r){if(!t){if(0===e.length)return n.put(r);e.shift()(r)}},flush:function(e){t&&n.isEmpty()?e(pn):e(n.flush())},close:function(){if(!t){t=!0;var n=e;e=[];for(var r=0,o=n.length;r<o;r++){(0,n[r])(pn)}}}}}function gn(n,t){void 0===t&&(t=B());var e,r=!1,o=yn(t),c=function(){r||(r=!0,b(e)&&e(),o.close())};return e=T(e=n((function(n){hn(n)?c():o.put(n)}))),r&&e(),{take:o.take,flush:o.flush,close:c}}function bn(){var n,t=!1,e=[],r=e;var o=function(){r===e&&(r=e.slice())},c=function(){t=!0;var n=e=r;r=[],n.forEach((function(n){n(pn)}))};return(n={})[i]=!0,n.put=function(n){if(!t)if(hn(n))c();else for(var o=e=r,u=0,i=o.length;u<i;u++){var f=o[u];f[a](n)&&(f.cancel(),f(n))}},n.take=function(n,e){void 0===e&&(e=dn),t?n(pn):(n[a]=e,o(),r.push(n),n.cancel=T((function(){o(),C(r,n)})))},n.close=c,n}function mn(){var n=bn(),t=n.put;return n.put=function(n){n[f]?t(n):en((function(){t(n)}))},n}function En(n,t){var e=n[o];b(e)&&(t.cancel=e),n.then(t,(function(n){t(n,!0)}))}var Sn,jn=0,On=function(){return++jn};function xn(n){n.isRunning()&&n.cancel()}var wn=((Sn={}).TAKE=function(n,t,e){var r=t.channel,o=void 0===r?n.channel:r,c=t.pattern,u=t.maybe,a=function(n){n instanceof Error?e(n,!0):!hn(n)||u?e(n):e(v)};try{o.take(a,g(c)?vn(c):null)}catch(n){return void e(n,!0)}e.cancel=a.cancel},Sn.PUT=function(n,t,e){var r=t.channel,o=t.action,c=t.resolve;en((function(){var t;try{t=(r?r.put:n.dispatch)(o)}catch(n){return void e(n,!0)}c&&S(t)?En(t,e):e(t)}))},Sn.ALL=function(n,t,e,r){var o=r.digestEffect,c=jn,u=Object.keys(t);if(0!==u.length){var a=K(t,e);u.forEach((function(n){o(t[n],c,a[n],n)}))}else e(E(t)?[]:{})},Sn.RACE=function(n,t,e,r){var o=r.digestEffect,c=jn,u=Object.keys(t),a=E(t)?L(u.length):{},i={},f=!1;u.forEach((function(n){var t=function(t,r){f||(r||F(t)?(e.cancel(),e(t,r)):(e.cancel(),f=!0,a[n]=t,e(a)))};t.cancel=w,i[n]=t})),e.cancel=function(){f||(f=!0,u.forEach((function(n){return i[n].cancel()})))},u.forEach((function(n){f||o(t[n],c,i[n],n)}))},Sn.CALL=function(n,t,e,r){var o=t.context,c=t.fn,u=t.args,a=r.task;try{var i=c.apply(o,u);if(S(i))return void En(i,e);if(j(i))return void Pn(n,i,a.context,jn,H(c),!1,e);e(i)}catch(n){e(n,!0)}},Sn.CPS=function(n,t,e){var r=t.context,o=t.fn,c=t.args;try{var u=function(n,t){y(n)?e(t):e(n,!0)};o.apply(r,c.concat(u)),u.cancel&&(e.cancel=u.cancel)}catch(n){e(n,!0)}},Sn.FORK=function(n,t,e,r){var o=t.context,c=t.fn,u=t.args,a=t.detached,i=r.task,f=function(n){var t=n.context,e=n.fn,r=n.args;try{var o=e.apply(t,r);if(j(o))return o;var c=!1;return R((function(n){return c?{value:n,done:!0}:(c=!0,{value:o,done:!S(o)})}))}catch(n){return R((function(){throw n}))}}({context:o,fn:c,args:u}),l=function(n,t){return n.isSagaIterator?{name:n.meta.name}:H(t)}(f,c);rn((function(){var t=Pn(n,f,i.context,jn,l,a,void 0);a?e(t):t.isRunning()?(i.queue.addTask(t),e(t)):t.isAborted()?i.queue.abort(t.error()):e(t)}))},Sn.JOIN=function(n,t,e,r){var o=r.task,c=function(n,t){if(n.isRunning()){var e={task:o,cb:t};t.cancel=function(){n.isRunning()&&C(n.joiners,e)},n.joiners.push(e)}else n.isAborted()?t(n.error(),!0):t(n.result())};if(E(t)){if(0===t.length)return void e([]);var u=K(t,e);t.forEach((function(n,t){c(n,u[t])}))}else c(t,e)},Sn.CANCEL=function(n,t,e,r){var o=r.task;t===l?xn(o):E(t)?t.forEach(xn):xn(t),e()},Sn.SELECT=function(n,t,e){var r=t.selector,o=t.args;try{e(r.apply(void 0,[n.getState()].concat(o)))}catch(n){e(n,!0)}},Sn.ACTION_CHANNEL=function(n,t,e){var r=t.pattern,o=yn(t.buffer),c=vn(r),u=function t(e){hn(e)||n.channel.take(t,c),o.put(e)},a=o.close;o.close=function(){u.cancel(),a()},n.channel.take(u,c),e(o)},Sn.CANCELLED=function(n,t,e,r){e(r.task.isCancelled())},Sn.FLUSH=function(n,t,e){t.flush(e)},Sn.GET_CONTEXT=function(n,t,e,r){e(r.task.context[t])},Sn.SET_CONTEXT=function(n,t,e,r){var o=r.task;A(o.context,t),e()},Sn);function kn(n,t){return n+"?"+t}function An(n){var t=n.name,e=n.location;return e?t+" "+kn(e.fileName,e.lineNumber):t}var Cn=null,Tn=[],Nn=function(){Cn=null,Tn.length=0},Mn=function(){var n,t,e,r,o,c,u,a=Tn[0],i=Tn.slice(1),f=a.crashedEffect?(n=a.crashedEffect,(t=q(n))?t.code+" "+kn(t.fileName,t.lineNumber):""):null;return["The above error occurred in task "+An(a.meta)+(f?" \n when executing effect "+f:"")].concat(i.map((function(n){return" created by "+An(n.meta)})),[(e=Tn,r=function(n){return n.cancelledTasks},o=e,u=(c=[]).concat.apply(c,o.map(r)),u.length?["Tasks cancelled due to error:"].concat(u).join("\n"):"")]).join("\n")};function Rn(n,t,e,r,o,c,u){var a;void 0===u&&(u=w);var i,f,l=0,v=null,p=[],h=Object.create(e),y=function(n,t,e){var r,o=[],c=!1;function u(n){t(),i(),e(n,!0)}function a(t){o.push(t),t.cont=function(a,i){c||(C(o,t),t.cont=w,i?u(a):(t===n&&(r=a),o.length||(c=!0,e(r))))}}function i(){c||(c=!0,o.forEach((function(n){n.cont=w,n.cancel()})),o=[])}return a(n),{addTask:a,cancelAll:i,abort:u,getTasks:function(){return o}}}(t,(function(){p.push.apply(p,y.getTasks().map((function(n){return n.meta.name})))}),g);function g(t,e){if(e){if(l=2,(c={meta:o,cancelledTasks:p}).crashedEffect=Cn,Tn.push(c),b.isRoot){var r=Mn();Nn(),n.onError(t,{sagaStack:r})}f=t,v&&v.reject(t)}else t===d?l=1:1!==l&&(l=3),i=t,v&&v.resolve(t);var c;b.cont(t,e),b.joiners.forEach((function(n){n.cb(t,e)})),b.joiners=null}var b=((a={})[s]=!0,a.id=r,a.meta=o,a.isRoot=c,a.context=h,a.joiners=[],a.queue=y,a.cancel=function(){0===l&&(l=1,y.cancelAll(),g(d,!1))},a.cont=u,a.end=g,a.setContext=function(n){A(h,n)},a.toPromise=function(){return v?v.promise:(v=Z(),2===l?v.reject(f):0!==l&&v.resolve(i),v.promise)},a.isRunning=function(){return 0===l},a.isCancelled=function(){return 1===l||0===l&&1===t.status},a.isAborted=function(){return 2===l},a.result=function(){return i},a.error=function(){return f},a);return b}function Pn(n,t,e,r,o,c,a){var i=n.finalizeRunEffect((function(t,e,r){if(S(t))En(t,r);else if(j(t))Pn(n,t,l.context,e,o,!1,r);else if(t&&t[u]){(0,wn[t.type])(n,t.payload,r,s)}else r(t)}));v.cancel=w;var f={meta:o,cancel:function(){0===f.status&&(f.status=1,v(d))},status:0},l=Rn(n,f,e,r,o,c,a),s={task:l,digestEffect:p};return a&&(a.cancel=l.cancel),v(),l;function v(n,e){try{var o;e?(o=t.throw(n),Nn()):D(n)?(f.status=1,v.cancel(),o=b(t.return)?t.return(d):{done:!0,value:d}):o=I(n)?b(t.return)?t.return():{done:!0}:t.next(n),o.done?(1!==f.status&&(f.status=3),f.cont(o.value)):p(o.value,r,v)}catch(n){if(1===f.status)throw n;f.status=2,f.cont(n,!0)}}function p(t,e,r,o){void 0===o&&(o="");var c,u=On();function a(e,o){c||(c=!0,r.cancel=w,n.sagaMonitor&&(o?n.sagaMonitor.effectRejected(u,e):n.sagaMonitor.effectResolved(u,e)),o&&function(n){Cn=n}(t),r(e,o))}n.sagaMonitor&&n.sagaMonitor.effectTriggered({effectId:u,parentEffectId:e,label:o,effect:t}),a.cancel=w,r.cancel=function(){c||(c=!0,a.cancel(),a.cancel=w,n.sagaMonitor&&n.sagaMonitor.effectCancelled(u))},i(t,u,a)}}function Ln(n,t){var e=n.channel,r=void 0===e?mn():e,o=n.dispatch,c=n.getState,u=n.context,a=void 0===u?{}:u,i=n.sagaMonitor,f=n.effectMiddlewares,l=n.onError,s=void 0===l?P:l;for(var d=arguments.length,v=new Array(d>2?d-2:0),p=2;p<d;p++)v[p-2]=arguments[p];var h=t.apply(void 0,v);var y,g=On();if(i&&(i.rootSagaStarted=i.rootSagaStarted||w,i.effectTriggered=i.effectTriggered||w,i.effectResolved=i.effectResolved||w,i.effectRejected=i.effectRejected||w,i.effectCancelled=i.effectCancelled||w,i.actionDispatched=i.actionDispatched||w,i.rootSagaStarted({effectId:g,saga:t,args:v})),f){var b=W.apply(void 0,f);y=function(n){return function(t,e,r){return b((function(t){return n(t,e,r)}))(t)}}}else y=k;var m={channel:r,dispatch:_(o),getState:c,sagaMonitor:i,onError:s,finalizeRunEffect:y};return rn((function(){var n=Pn(m,h,a,g,H(t),!0,void 0);return i&&i.effectResolved(g,n),n}))}var _n=function(n){var t,e=void 0===n?{}:n,r=e.context,o=void 0===r?{}:r,c=e.channel,u=void 0===c?mn():c,a=e.sagaMonitor,i=function(n,t){if(null==n)return{};var e,r,o={},c=Object.keys(n);for(r=0;r<c.length;r++)e=c[r],t.indexOf(e)>=0||(o[e]=n[e]);return o}(e,["context","channel","sagaMonitor"]);function f(n){var e=n.getState,r=n.dispatch;return t=Ln.bind(null,h({},i,{context:o,channel:u,dispatch:r,getState:e,sagaMonitor:a})),function(n){return function(t){a&&a.actionDispatched&&a.actionDispatched(t);var e=n(t);return u.put(t),e}}}return f.run=function(){return t.apply(void 0,arguments)},f.setContext=function(n){A(o,n)},f};e.d(t,"default",(function(){return _n})),e.d(t,"buffers",(function(){return X})),e.d(t,"detach",(function(){return Q})),e.d(t,"END",(function(){return pn})),e.d(t,"channel",(function(){return yn})),e.d(t,"eventChannel",(function(){return gn})),e.d(t,"isEnd",(function(){return hn})),e.d(t,"multicastChannel",(function(){return bn})),e.d(t,"runSaga",(function(){return Ln})),e.d(t,"stdChannel",(function(){return mn}))}])}));