Bundle redoc-alpha renderer
This commit is contained in:
1 parent
47de6f2f6f
commit
c225f66fb7
6 files changed
+118
-2
No files matched your search
@@ -117,3 +117,11 @@ class ReDocRenderer(_UIRenderer):
|
||||
"""
|
||||
template = 'drf-yasg/redoc.html'
|
||||
format = 'redoc'
|
||||
|
||||
|
||||
class ReDocAlphaRenderer(_UIRenderer):
|
||||
"""Renders a ReDoc web interface for schema browisng.
|
||||
Also requires :class:`.OpenAPIRenderer` as an available renderer on the same view.
|
||||
"""
|
||||
template = 'drf-yasg/redoc-alpha.html'
|
||||
format = 'redoc'
|
||||
@@ -0,0 +1,76 @@
|
||||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["null","esprima"],t):"object"==typeof exports?exports.Redoc=t(require("null"),function(){try{return require("esprima")}catch(e){}}()):e.Redoc=t(e.null,e.esprima)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}({"./node_modules/autolinker/dist/Autolinker.js":function(e,t,n){var r,o;!function(n,i){r=[],void 0!==(o=function(){return n.Autolinker=i()}.apply(t,r))&&(e.exports=o)}(this,function(){/*!
|
||||
* Autolinker.js
|
||||
* 0.15.3
|
||||
*
|
||||
* Copyright(c) 2015 Gregory Jacobs <greg@greg-jacobs.com>
|
||||
* MIT Licensed. http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* https://github.com/gregjacobs/Autolinker.js
|
||||
*/
|
||||
var e=function(t){e.Util.assign(this,t)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser(),n=t.parse(e),r=0,o=[],i=0,s=n.length;i<s;i++){var a=n[i],l=a.getType(),c=a.getText();if("element"===l)"a"===a.getTagName()&&(a.isClosing()?r=Math.max(r-1,0):r++),o.push(c);else if("entity"===l)o.push(c);else if(0===r){var u=this.linkifyStr(c);o.push(u)}else o.push(c)}return o.join("")},linkifyStr:function(e){return this.getMatchParser().replace(e,this.createMatchReturnVal,this)},createMatchReturnVal:function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this,this,t)),"string"==typeof n?n:!1===n?t.getMatchedText():n instanceof e.HtmlTag?n.toString():this.getTagBuilder().build(t).toString()},getHtmlParser:function(){var t=this.htmlParser;return t||(t=this.htmlParser=new e.htmlParser.HtmlParser),t},getMatchParser:function(){var t=this.matchParser;return t||(t=this.matchParser=new e.matchParser.MatchParser({urls:this.urls,email:this.email,twitter:this.twitter,stripPrefix:this.stripPrefix})),t},getTagBuilder:function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new e.AnchorTagBuilder({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t}},e.link=function(t,n){return new e(n).link(t)},e.match={},e.htmlParser={},e.matchParser={},e.Util={abstractMethod:function(){throw"abstract"},assign:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},extend:function(t,n){var r=t.prototype,o=function(){};o.prototype=r;var i;i=n.hasOwnProperty("constructor")?n.constructor:function(){r.constructor.apply(this,arguments)};var s=i.prototype=new o;return s.constructor=i,s.superclass=r,delete n.constructor,e.Util.assign(s,n),i},ellipsis:function(e,t,n){return e.length>t&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},splitAndCapture:function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var n,r=[],o=0;n=t.exec(e);)r.push(e.substring(o,n.index)),r.push(n[0]),o=n.index+n[0].length;return r.push(e.substring(o)),r}},e.HtmlTag=e.Util.extend(Object,{whitespaceRegex:/\s+/,constructor:function(t){e.Util.assign(this,t),this.innerHtml=this.innerHtml||this.innerHTML},setTagName:function(e){return this.tagName=e,this},getTagName:function(){return this.tagName||""},setAttr:function(e,t){return this.getAttrs()[e]=t,this},getAttr:function(e){return this.getAttrs()[e]},setAttrs:function(t){var n=this.getAttrs();return e.Util.assign(n,t),this},getAttrs:function(){return this.attrs||(this.attrs={})},setClass:function(e){return this.setAttr("class",e)},addClass:function(t){for(var n,r=this.getClass(),o=this.whitespaceRegex,i=e.Util.indexOf,s=r?r.split(o):[],a=t.split(o);n=a.shift();)-1===i(s,n)&&s.push(n);return this.getAttrs().class=s.join(" "),this},removeClass:function(t){for(var n,r=this.getClass(),o=this.whitespaceRegex,i=e.Util.indexOf,s=r?r.split(o):[],a=t.split(o);s.length&&(n=a.shift());){var l=i(s,n);-1!==l&&s.splice(l,1)}return this.getAttrs().class=s.join(" "),this},getClass:function(){return this.getAttrs().class||""},hasClass:function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},setInnerHtml:function(e){return this.innerHtml=e,this},getInnerHtml:function(){return this.innerHtml||""},toString:function(){var e=this.getTagName(),t=this.buildAttrsStr();return t=t?" "+t:"",["<",e,t,">",this.getInnerHtml(),"</",e,">"].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){return new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())})},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z][0-9a-zA-Z:]*/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,r=t.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",r,"|",n.source+")",")*",">",")","|","(?:","<(/)?","("+e.source+")","(?:","\\s+",r,")*","\\s*/?",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,o=0,i=[];null!==(t=r.exec(e));){var s=t[0],a=t[1]||t[3]Line truncated
|
||||
Copyright (c) 2016 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var s in r)i.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}var i={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},"./node_modules/co/index.js":function(e,t){function n(e){var t=this,n=p.call(arguments,1);return new Promise(function(o,i){function s(t){var n;try{n=e.next(t)}catch(e){return i(e)}c(n)}function l(t){var n;try{n=e.throw(t)}catch(e){return i(e)}c(n)}function c(e){if(e.done)return o(e.value);var n=r.call(t,e.value);return n&&a(n)?n.then(s,l):l(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(t,n)),!e||"function"!=typeof e.next)return o(e);s()})}function r(e){return e?a(e)?e:c(e)||l(e)?n.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?i.call(this,e):u(e)?s.call(this,e):e:e}function o(e){var t=this;return new Promise(function(n,r){e.call(t,function(e,t){if(e)return r(e);arguments.length>2&&(t=p.call(arguments,1)),n(t)})})}function i(e){return Promise.all(e.map(r,this))}function s(e){for(var t=new e.constructor,n=Object.keys(e),o=[],i=0;i<n.length;i++){var s=n[i],l=r.call(this,e[s]);l&&a(l)?function(e,n){t[n]=void 0,o.push(e.then(function(e){t[n]=e}))}(l,s):t[s]=e[s]}return Promise.all(o).then(function(){return t})}function a(e){return"function"==typeof e.then}function l(e){return"function"==typeof e.next&&"function"==typeof e.throw}function c(e){var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||l(t.prototype))}function u(e){return Object==e.constructor}var p=Array.prototype.slice;e.exports=n.default=n.co=n,n.wrap=function(e){function t(){return n.call(this,e.apply(this,arguments))}return t.__generatorFunction__=e,t}},"./node_modules/core-js/es6/map.js":function(e,t,n){n("./node_modules/core-js/modules/es6.object.to-string.js"),n("./node_modules/core-js/modules/es6.string.iterator.js"),n("./node_modules/core-js/modules/web.dom.iterable.js"),n("./node_modules/core-js/modules/es6.map.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Map},"./node_modules/core-js/es6/promise.js":function(e,t,n){n("./node_modules/core-js/modules/es6.object.to-string.js"),n("./node_modules/core-js/modules/es6.string.iterator.js"),n("./node_modules/core-js/modules/web.dom.iterable.js"),n("./node_modules/core-js/modules/es6.promise.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Promise},"./node_modules/core-js/es6/set.js":function(e,t,n){n("./node_modules/core-js/modules/es6.object.to-string.js"),n("./node_modules/core-js/modules/es6.string.iterator.js"),n("./node_modules/core-js/modules/web.dom.iterable.js"),n("./node_modules/core-js/modules/es6.set.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Set},"./node_modules/core-js/es6/symbol.js":function(e,t,n){n("./node_modules/core-js/modules/es6.symbol.js"),n("./node_modules/core-js/modules/es6.object.to-string.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Symbol},"./node_modules/core-js/fn/array/find.js":function(e,t,n){n("./node_modules/core-js/modules/es6.array.find.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Array.find},"./node_modules/core-js/fn/object/assign.js":function(e,t,n){n("./node_modules/core-js/modules/es6.object.assign.js"),e.exports=n("./node_modules/core-js/modules/_core.js").Object.assign},"./node_modules/core-js/fn/string/ends-with.js":function(e,t,n){n("./node_modules/core-js/modules/es6.string.ends-with.js"),e.exports=n("./node_modules/core-js/modules/_core.js").String.endsWith},"./node_modules/core-js/fn/string/starts-with.js":function(e,t,n){n("./node_modules/core-js/modules/es6.string.starts-with.js"),e.exports=n("./node_modules/core-js/modules/_core.js").String.startsWith},"./node_modules/core-js/modules/_a-function.js":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"./node_modules/core-js/modules/_add-to-unscopables.js":function(e,t,n){var r=n("./node_modules/core-js/modules/_wks.js")("unscopables"),o=Array.prototype;void 0==o[r]&&n("./node_modules/core-js/modules/_hide.js")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"./node_modules/core-js/modules/_an-instance.js":function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},"./node_modules/core-js/modules/_an-object.js":function(e,t,n){var r=n("./node_modules/core-js/modules/_is-object.js");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},"./node_modules/core-js/modules/_array-includes.js":function(e,t,n){var r=n("./node_modules/core-js/modules/_to-iobject.js"),o=nLine truncated
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
var o=n("./node_modules/isobject/index.js");e.exports=function(e){var t,n;return!1!==r(e)&&("function"==typeof(t=e.constructor)&&(n=t.prototype,!1!==r(n)&&!1!==n.hasOwnProperty("isPrototypeOf")))}},"./node_modules/isarray/index.js":function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},"./node_modules/isobject/index.js":function(e,t,n){"use strict";/*!
|
||||
* isobject <https://github.com/jonschlinkert/isobject>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},"./node_modules/js-yaml/index.js":function(e,t,n){"use strict";var r=n("./node_modules/js-yaml/lib/js-yaml.js");e.exports=r},"./node_modules/js-yaml/lib/js-yaml.js":function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var o=n("./node_modules/js-yaml/lib/js-yaml/loader.js"),i=n("./node_modules/js-yaml/lib/js-yaml/dumper.js");e.exports.Type=n("./node_modules/js-yaml/lib/js-yaml/type.js"),e.exports.Schema=n("./node_modules/js-yaml/lib/js-yaml/schema.js"),e.exports.FAILSAFE_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"),e.exports.JSON_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/json.js"),e.exports.CORE_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/core.js"),e.exports.DEFAULT_SAFE_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"),e.exports.DEFAULT_FULL_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/default_full.js"),e.exports.load=o.load,e.exports.loadAll=o.loadAll,e.exports.safeLoad=o.safeLoad,e.exports.safeLoadAll=o.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n("./node_modules/js-yaml/lib/js-yaml/exception.js"),e.exports.MINIMAL_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/failsafe.js"),e.exports.SAFE_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/default_safe.js"),e.exports.DEFAULT_SCHEMA=n("./node_modules/js-yaml/lib/js-yaml/schema/default_full.js"),e.exports.scan=r("scan"),e.exports.parse=r("parse"),e.exports.compose=r("compose"),e.exports.addConstructor=r("addConstructor")},"./node_modules/js-yaml/lib/js-yaml/common.js":function(e,t,n){"use strict";function r(e){return void 0===e||null===e}function o(e){return"object"==typeof e&&null!==e}function i(e){return Array.isArray(e)?e:r(e)?[]:[e]}function s(e,t){var n,r,o,i;if(t)for(i=Object.keys(t),n=0,r=i.length;n<r;n+=1)o=i[n],e[o]=t[o];return e}function a(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r}function l(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}e.exports.isNothing=r,e.exports.isObject=o,e.exports.toArray=i,e.exports.repeat=a,e.exports.isNegativeZero=l,e.exports.extend=s},"./node_modules/js-yaml/lib/js-yaml/dumper.js":function(e,t,n){"use strict";function r(e,t){var n,r,o,i,s,a,l;if(null===t)return{};for(n={},r=Object.keys(t),o=0,i=r.length;o<i;o+=1)s=r[o],a=String(t[s]),"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&N.call(l.styleAliases,a)&&(a=l.styleAliases[a]),n[s]=a;return n}function o(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else{if(!(e<=4294967295))throw new P("code point within a string may not be greater than 0xFFFFFFFF");n="U",r=8}return"\\"+n+T.repeat("0",r-t.length)+t}function i(e){this.schema=e.schema||R,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=T.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function s(e,t){for(var n,r=T.repeat(" ",t),o=0,i=-1,s="",a=e.length;o<a;)i=e.indexOf("\n",o),-1===i?(n=e.slice(o),o=a):(n=e.slice(o,i+1),o=i+1),n.length&&"\n"!==n&&(s+=r),s+=n;return s}function a(e,t){return"\n"+T.repeat(" ",e.indent*t)}function l(e,t){var n,r,o;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(o=e.implicitTypes[n],o.resolve(t))return!0;return!1}function c(e){return e===U||e===L}function u(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function p(e){return u(e)&&65279!==e&&e!==Y&&e!==J&&e!==Q&&e!==te&&e!==re&&e!==G&&e!==q}function d(e){return u(e)&&65279!==e&&!c(e)&&e!==V&&e!==Z&&e!==G&&e!==Y&&e!==J&&e!==Q&&e!==te&&e!==re&&e!==q&&e!==H&&e!==$&&e!==F&&e!==ne&&e!==X&&e!==W&&e!==B&&e!==z&&e!==K&&e!==ee}function f(e,t,n,r,o){var i,s,a=!1,l=!1,f=-1!==r,h=-1,m=d(e.charCodeAt(0))&&!c(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(s=e.charCodeAt(i),!u(s))return ue;m=m&&p(s)}else{for(i=0;i<e.length;i++){if((s=e.charCodeAt(i))===D)a=!0,f&&(l=l||i-h-1>r&&" "!==e[h+1],h=i);else if(!u(s))return ue;m=m&&p(s)}l=l||f&&i-h-1>r&&" "!==e[h+1]}return a||l?" "===e[0]&&n>9?ue:l?ce:le:m&&!o(e)?se:ae}function h(e,t,n,r){e.dump=function(){function o(t){return l(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&-1!==ie.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(f(t,c,e.indent,a,o)){case se:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case le:return"|"+m(t,e.indent)+g(s(t,i));case ce:reLine truncated
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
var Gt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Xt=function(){function e(e){void 0===e&&(e="Atom@"+_e()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Hn.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){nt(this)},e.prototype.reportChanged=function(){et(),rt(this),tt()},e.prototype.toString=function(){return this.name},e}(),Zt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+_e()),void 0===n&&(n=Mn),void 0===r&&(r=Mn);var o=e.call(this,t)||this;return o.name=t,o.onBecomeObservedHandler=n,o.onBecomeUnobservedHandler=r,o.isPendingUnobservation=!1,o.isBeingTracked=!1,o}return r(t,e),t.prototype.reportObserved=function(){return et(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),tt(),!!Un.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Xt),Kt=De("Atom",Xt),Jt={spyReportEnd:!0},Qt="__$$iterating",en=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),tn=0,nn=function(){function e(){}return e}();!function(e,t){void 0!==Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}(nn,Array.prototype),Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach(function(e){Object.defineProperty(nn.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})});var rn=function(){function e(e,t,n,r){this.array=n,this.owned=r,this.values=[],this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Xt(e||"ObservableArray@"+_e()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer?e.map(this.dehancer):e},e.prototype.intercept=function(e){return i(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),l(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>tn&&_(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var r=this;ct(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=[]),o(this)){var a=s(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!a)return Rn;t=a.removedCount,n=a.added}n=n.map(function(e){return r.enhancer(e,void 0)});var l=n.length-t;this.updateArrayLength(i,l);var c=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,c),this.dehanceValues(c)},e.prototype.spliceItemsIntoValues=function(e,t,n){if(n.length<1e4)return(o=this.values).splice.apply(o,[e,t].concat(n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r;var o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&u(),o=a(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&d(i),this.atom.reportChanged(),o&&c(this,i),r&&f()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&u(),o=a(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&d(i),this.atom.reportChanged(),o&&c(this,i),r&&f()},e}(),on=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableArray@"+_e()),void 0===o&&(o=!1);var i=e.call(this)||this,s=new rn(r,n,i,o);return Re(i,"$mobx",s),t&&t.length&&i.spliceWithArray(0,0,t),en&&Object.defineProperty(s.array,"0",sn),i}return r(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.proLine truncated
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
var Z=n("./node_modules/base64-js/index.js"),K=n("./node_modules/ieee754/index.js"),J=n("./node_modules/isarray/index.js");t.Buffer=i,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return s(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return l(null,e,t,n)},i.allocUnsafe=function(e){return c(null,e)},i.allocUnsafeSlow=function(e){return c(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,s=Math.min(n,r);o<s;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},i.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(e,t){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=i.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!i.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},i.byteLength=g,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},i.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):b.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var s=o-r,a=n-t,l=Math.min(s,a),c=this.slice(r,o),u=e.slice(t,n),p=0;p<l;++p)if(c[p]!==u[p]){s=c[p],a=u[p];break}return s<a?-1:a<s?1:0},i.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},i.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},i.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},i.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return j(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(i.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=i.prototype;else{var o=t-e;r=new i(o,void 0);for(var s=0;s<o;++s)r[s]=this[s+e]}return r},i.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[Line truncated
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/
|
||||
var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var u in n)i.call(n,u)&&(l[u]=n[u]);if(o){a=o(n);for(var p=0;p<a.length;p++)s.call(n,a[p])&&(l[a[p]]=n[a[p]])}}return l}},"./node_modules/ono/lib/ono.js":function(e,t,n){"use strict";function r(t){return function(n,r,a,l){var c=[],u="";"string"==typeof n?(c=g.call(arguments),n=r=void 0):"string"==typeof r?(c=g.call(arguments,1),r=void 0):"string"==typeof a&&(c=g.call(arguments,2)),c.length>0&&(u=e.exports.formatter.apply(null,c)),n&&n.message&&(u+=(u?" \n":"")+n.message);var p=new t(u);return o(p,n),i(p),s(p,r),p}}function o(e,t){c(e,t),s(e,t)}function i(e){e.toJSON=a,e.inspect=l}function s(e,t){if(t&&"object"==typeof t)for(var n=Object.keys(t),r=0;r<n.length;r++){var o=n[r];if(!(b.indexOf(o)>=0))try{e[o]=t[o]}catch(e){}}}function a(){var e={},t=Object.keys(this);t=t.concat(y);for(var n=0;n<t.length;n++){var r=t[n],o=this[r],i=typeof o;"undefined"!==i&&"function"!==i&&(e[r]=o)}return e}function l(){return JSON.stringify(this,null,2).replace(/\\n/g,"\n")}function c(e,t){d(e)?t?f(e,t):h(e):e.stack=t?u(e.stack,t.stack):p(e.stack)}function u(e,t){return e=p(e),e&&t?e+"\n\n"+t:e||t}function p(e){if(e){var t=e.split("\n");if(t.length<2)return e;for(var n=0;n<t.length;n++){if(t[n].indexOf("onoFactory")>=0)return t.splice(n,1),t.join("\n")}return e}}function d(e){if(!v)return!1;var t=Object.getOwnPropertyDescriptor(e,"stack");return!!t&&"function"==typeof t.get}function f(e,t){var n=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return u(n.get.apply(e),t.stack)},enumerable:!1,configurable:!0})}function h(e){var t=Object.getOwnPropertyDescriptor(e,"stack");Object.defineProperty(e,"stack",{get:function(){return p(t.get.apply(e))},enumerable:!1,configurable:!0})}var m=n("./node_modules/format-util/format.js"),g=Array.prototype.slice,b=["name","message","stack"],y=["name","message","description","number","code","fileName","lineNumber","columnNumber","sourceURL","line","column","stack"];e.exports=r(Error),e.exports.error=r(Error),e.exports.eval=r(EvalError),e.exports.range=r(RangeError),e.exports.reference=r(ReferenceError),e.exports.syntax=r(SyntaxError),e.exports.type=r(TypeError),e.exports.uri=r(URIError),e.exports.formatter=m;var v=function(){return!(!Object.getOwnPropertyDescriptor||!Object.defineProperty||"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent))}()},"./node_modules/openapi-sampler/dist/openapi-sampler.js":function(e,t,n){var r,r;!function(t){e.exports=t()}(function(){return function e(t,n,o){function i(a,l){if(!n[a]){if(!t[a]){var c="function"==typeof r&&r;if(!l&&c)return r(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=n[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return i(n||e)},p,p.exports,e,t,n,o)}return n[a].exports}for(var s="function"==typeof r&&r,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,t,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;t.exports=function(e,t,n){if("[object Function]"!==o.call(t))throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var s=0;s<i;s++)t.call(n,e[s],s,e);else for(var a in e)r.call(e,a)&&t.call(n,e[a],a,e)}},{}],2:[function(e,t,n){"use strict";function r(e,t,n){if(3===arguments.length)return r.set(e,t,n);if(2===arguments.length)return r.get(e,t);var o=r.bind(r,e);for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i].bind(o,e));return o}var o=e("foreach");t.exports=r,r.get=function(e,t){for(var n=Array.isArray(t)?t:r.parse(t),o=0;o<n.length;++o){var i=n[o];if(!("object"==typeof e&&i in e))throw new Error("Invalid reference token: "+i);e=e[i]}return e},r.set=function(e,t,n){for(var o=Array.isArray(t)?t:r.parse(t),i=o[0],s=0;s<o.length-1;++s){var a=o[s];"-"===a&&Array.isArray(e)&&(a=e.length),i=o[s+1],a in e||(i.match(/^(\d+|-)$/)?e[a]=[]:e[a]={}),e=e[a]}return"-"===i&&Array.isArray(e)&&(i=e.length),e[i]=n,this},r.remove=function(e,t){var n=Array.isArray(t)?t:r.parse(t),o=n[n.length-1];if(void 0===o)throw new Error('Invalid JSON pointer for remove: "'+t+'"');var i=r.get(e,n.slice(0,-1));if(Array.isArray(i)){var s=+o;if(""===o&&isNaN(s))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(i,s,1)}else delete i[o]},r.dict=function(e,t){var n={};return r.walk(e,function(e,t){n[t]=e},t),n},r.walk=funcLine truncated
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var vn=n("./node_modules/react/index.js"),_n=n("./node_modules/fbjs/lib/ExecutionEnvironment.js"),jn=n("./node_modules/object-assign/index.js"),wn=n("./node_modules/fbjs/lib/emptyFunction.js"),xn=n("./node_modules/fbjs/lib/EventListener.js"),kn=n("./node_modules/fbjs/lib/getActiveElement.js"),An=n("./node_modules/fbjs/lib/shallowEqual.js"),On=n("./node_modules/fbjs/lib/containsNode.js"),Cn=n("./node_modules/fbjs/lib/focusNode.js"),En=n("./node_modules/fbjs/lib/emptyObject.js");vn||r("227");var Sn={children:!0,dangerouslySetInnerHTML:!0,defaultValue:!0,defaultChecked:!0,innerHTML:!0,suppressContentEditableWarning:!0,suppressHydrationWarning:!0,style:!0},Tn={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,HAS_STRING_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=Tn,n=e.Properties||{},i=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{};e=e.DOMMutationMethods||{};for(var a in n){Pn.hasOwnProperty(a)&&r("48",a);var l=a.toLowerCase(),c=n[a];l={attributeName:l,attributeNamespace:null,propertyName:a,mutationMethod:null,mustUseProperty:o(c,t.MUST_USE_PROPERTY),hasBooleanValue:o(c,t.HAS_BOOLEAN_VALUE),hasNumericValue:o(c,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:o(c,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:o(c,t.HAS_OVERLOADED_BOOLEAN_VALUE),hasStringBooleanValue:o(c,t.HAS_STRING_BOOLEAN_VALUE)},1>=l.hasBooleanValue+l.hasNumericValue+l.hasOverloadedBooleanValue||r("50",a),s.hasOwnProperty(a)&&(l.attributeName=s[a]),i.hasOwnProperty(a)&&(l.attributeNamespace=i[a]),e.hasOwnProperty(a)&&(l.mutationMethod=e[a]),Pn[a]=l}}},Pn={},Rn=Tn,In=Rn.MUST_USE_PROPERTY,Mn=Rn.HAS_BOOLEAN_VALUE,Nn=Rn.HAS_NUMERIC_VALUE,Ln=Rn.HAS_POSITIVE_NUMERIC_VALUE,Dn=Rn.HAS_OVERLOADED_BOOLEAN_VALUE,Un=Rn.HAS_STRING_BOOLEAN_VALUE,Fn={Properties:{allowFullScreen:Mn,async:Mn,autoFocus:Mn,autoPlay:Mn,capture:Dn,checked:In|Mn,cols:Ln,contentEditable:Un,controls:Mn,default:Mn,defer:Mn,disabled:Mn,download:Dn,draggable:Un,formNoValidate:Mn,hidden:Mn,loop:Mn,multiple:In|Mn,muted:In|Mn,noValidate:Mn,open:Mn,playsInline:Mn,readOnly:Mn,required:Mn,reversed:Mn,rows:Ln,rowSpan:Nn,scoped:Mn,seamless:Mn,selected:In|Mn,size:Ln,start:Nn,span:Ln,spellCheck:Un,style:0,tabIndex:0,itemScope:Mn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Un},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Bn=Rn.HAS_STRING_BOOLEAN_VALUE,qn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},zn={Properties:{autoReverse:Bn,externalResourcesRequired:Bn,preserveAlpha:Bn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:qn.xlink,xlinkArcrole:qn.xlink,xlinkHref:qn.xlink,xlinkRole:qn.xlink,xlinkShow:qn.xlink,xlinkTitle:qn.xlink,xlinkType:qn.xlink,xmlBase:qn.xml,xmlLang:qn.xml,xmlSpace:qn.xml}},Hn=/[\-\:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(Hn,a);zn.Properties[t]=0,zn.DOMAttributeNames[t]=e}),Rn.injectDOMPropertyConfig(Fn),Rn.injectDOMPropertyConfig(zn);var Wn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!=typeof e.invokeGuardedCallback&&r("197"),l=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,s,a,c){l.apply(Wn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,s,a,l){if(Wn.invokeGuardedCallback.applyLine truncated
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
var y=n("./node_modules/object-assign/index.js"),v=n("./node_modules/fbjs/lib/emptyObject.js"),_=n("./node_modules/fbjs/lib/emptyFunction.js"),j="function"==typeof Symbol&&Symbol.for,w=j?Symbol.for("react.element"):60103,x=j?Symbol.for("react.call"):60104,k=j?Symbol.for("react.return"):60105,A=j?Symbol.for("react.portal"):60106,O=j?Symbol.for("react.fragment"):60107,C="function"==typeof Symbol&&Symbol.iterator,E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},s.prototype=o.prototype;var S=i.prototype=new s;S.constructor=i,y(S,o.prototype),S.isPureReactComponent=!0;var T=a.prototype=new s;T.constructor=a,y(T,o.prototype),T.unstable_isAsyncReactComponent=!0,T.render=function(){return this.props.children};var P={current:null},R=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,N=[],L={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return b(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=p(null,null,t,n),null==e||f(e,"",m,t),d(t)},count:function(e){return null==e?0:f(e,"",_.thatReturnsNull,null)},toArray:function(e){var t=[];return b(e,t,null,_.thatReturnsArgument),t},only:function(e){return c(e)||r("143"),e}},Component:o,PureComponent:i,unstable_AsyncComponent:a,Fragment:O,createElement:l,cloneElement:function(e,t,n){var r=y({},e.props),o=e.key,i=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,s=P.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)R.call(t,l)&&!I.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==a?a[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:w,type:e.type,key:o,ref:i,props:r,_owner:s}},createFactory:function(e){var t=l.bind(null,e);return t.type=e,t},isValidElement:c,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:P,assign:y}},D=Object.freeze({default:L}),U=D&&L||D;e.exports=U.default?U.default:U},"./node_modules/react/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react/cjs/react.production.min.js")},"./node_modules/readable-stream/lib/_stream_duplex.js":function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);c.call(this,e),u.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",o)}function o(){this.allowHalfOpen||this._writableState.ended||s(i,this)}function i(e){e.end()}var s=n("./node_modules/process-nextick-args/index.js"),a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var l=n("./node_modules/core-util-is/lib/util.js");l.inherits=n("./node_modules/inherits/inherits_browser.js");var c=n("./node_modules/readable-stream/lib/_stream_readable.js"),u=n("./node_modules/readable-stream/lib/_stream_writable.js");l.inherits(r,c);for(var p=a(u.prototype),d=0;d<p.length;d++){var f=p[d];r.prototype[f]||(r.prototype[f]=u.prototype[f])}Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),s(t,e)}},"./node_modules/readable-stream/lib/_stream_passthrough.js":function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);o.call(this,e)}e.exports=r;var o=n("./node_modules/readable-stream/lib/_stream_transform.js"),i=n("./node_modules/core-util-is/lib/util.js");i.inherits=n("./node_modules/inherits/inherits_browser.js"),i.inherits(r,o),r.prototype._transform=function(e,t,n){n(null,e)}},"./node_modules/readable-stream/lib/_stream_readable.js":function(e,t,n){"use strict";(function(t,r){function o(e){return D.from(e)}function i(e){return D.isBuffer(e)||e instanceof U}function s(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?M(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function a(e,t){I=I||n("./node_modules/readable-stream/lib/_stream_duplex.js"),e=e||{},this.objectMode=!!e.objectMode,t instanceof I&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new H,this.length=0,this.pipes=null,this.pipesCount=0,this.flowingLine truncated
|
||||
* Stickyfill -- `position: sticky` polyfill
|
||||
* v. 1.1.1 | https://github.com/wilddeer/stickyfill
|
||||
* Copyright Oleg Korsunsky | http://wd.dizaina.net/
|
||||
*
|
||||
* MIT License
|
||||
*/
|
||||
e.exports=function(e,t){function n(){k=S=A=O=C=E=L}function r(e,t){for(key in t)t.hasOwnProperty(key)&&(e[key]=t[key])}function o(e){return parseFloat(e)||0}function i(){P={top:t.pageYOffset,left:t.pageXOffset}}function s(){if(t.pageXOffset!=P.left)return i(),void A();t.pageYOffset!=P.top&&(i(),l())}function a(e){setTimeout(function(){t.pageYOffset!=P.top&&(P.top=t.pageYOffset,l())},0)}function l(){for(var e=I.length-1;e>=0;e--)c(I[e])}function c(e){if(e.inited){var t=P.top<=e.limit.start?0:P.top>=e.limit.end?2:1;e.mode!=t&&m(e,t)}}function u(){for(var e=I.length-1;e>=0;e--)if(I[e].inited){var t=Math.abs(v(I[e].clone)-I[e].docOffsetTop),n=Math.abs(I[e].parent.node.offsetHeight-I[e].parent.height);if(t>=2||n>=2)return!1}return!0}function p(e){isNaN(parseFloat(e.computed.top))||e.isCell||(e.inited=!0,e.clone||g(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),c(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=v(e.clone))}function d(e){var t=!0;e.clone&&b(e),r(e.node.style,e.css);for(var n=I.length-1;n>=0;n--)if(I[n].node!==e.node&&I[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function f(){for(var e=I.length-1;e>=0;e--)p(I[e])}function h(){for(var e=I.length-1;e>=0;e--)d(I[e])}function m(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}function g(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}function b(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}function y(e){var t=getComputedStyle(e),n=e.parentNode,r=getComputedStyle(n),i=e.style.position;e.style.position="relative";var s={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat},a={top:o(t.top),marginBottom:o(t.marginBottom),paddingLeft:o(t.paddingLeft),paddingRight:o(t.paddingRight),borderLeftWidth:o(t.borderLeftWidth),borderRightWidth:o(t.borderRightWidth)};e.style.position=i;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},c=_(e),u=_(n),p={node:n,css:{position:n.style.position},computed:{position:r.position},numeric:{borderLeftWidth:o(r.borderLeftWidth),borderRightWidth:o(r.borderRightWidth),borderTopWidth:o(r.borderTopWidth),borderBottomWidth:o(r.borderBottomWidth)}};return{node:e,box:{left:c.win.left,right:N.clientWidth-c.win.right},offset:{top:c.win.top-u.win.top-p.numeric.borderTopWidth,left:c.win.left-u.win.left-p.numeric.borderLeftWidth,right:-c.win.right+u.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==t.display,computed:s,numeric:a,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-a.top,end:u.doc.top+n.offsetHeight-p.numeric.borderBottomWidth-e.offsetHeight-a.top-a.marginBottom}}}function v(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function _(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function j(){R=setInterval(function(){!u()&&A()},500)}function w(){clearInterval(R)}function x(){M&&(document[D]?w():j())}function k(){M||(i(),f(),t.addEventListener("scroll",s),t.addEventListener("wheel",a),t.addEventListener("resize",A),t.addEventListener("orientationchange",A),e.addEventListener(U,x),j(),M=!0)}function A(){if(M){h();for(var e=I.length-1;e>=0;e--)I[e]=y(I[e].node);f()}}function O(){t.removeEventListener("scroll",s),t.removeEventListener("wheel",a),t.removeEventListener("resize",A),t.removeEventListener("orientationchange",A),e.removeEventListener(U,x),w(),M=!1}function C(){O(),h()}function E(){for(C();I.length;)I.pop()}function S(e){for(var t=I.length-1;t>=0;t--)if(I[t].node===e)return;var n=y(e);I.push(n),M?p(n):k()}function T(e){for(var t=I.length-1;t>=0;t--)I[t].node===e&&(d(I[t]),I.splice(t,1))}e||(e=document),t||(t=window);var P,R,I=[],M=!1,N=e.documentElement,L=function(){},D="hidden",U="visibilitychange";void 0!==eLine truncated
|
||||
//# sourceMappingURL=redoc.standalone.js.map
|
||||
@@ -0,0 +1,26 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
{% if not request.version %}
|
||||
span.api-info-version {
|
||||
display: none;
|
||||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script id="redoc-settings" type="application/json">{{ redoc_settings | safe }}</script>
|
||||
|
||||
<script src="{% static 'drf-yasg/redoc-init.js' %}"> </script>
|
||||
<script src="{% static 'drf-yasg/redoc-alpha/redoc.standalone.js' %}"> </script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,12 +12,14 @@ from rest_framework.views import APIView
|
||||
|
||||
from .app_settings import swagger_settings
|
||||
from .generators import OpenAPISchemaGenerator
|
||||
from .renderers import OpenAPIRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer
|
||||
from .renderers import OpenAPIRenderer, ReDocRenderer, SwaggerJSONRenderer, SwaggerUIRenderer, SwaggerYAMLRenderer, \
|
||||
ReDocAlphaRenderer
|
||||
|
||||
SPEC_RENDERERS = (SwaggerYAMLRenderer, SwaggerJSONRenderer, OpenAPIRenderer)
|
||||
UI_RENDERERS = {
|
||||
'swagger': (SwaggerUIRenderer, ReDocRenderer),
|
||||
'redoc': (ReDocRenderer, SwaggerUIRenderer),
|
||||
'redoc-alpha': (ReDocAlphaRenderer, ReDocRenderer, SwaggerUIRenderer)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user