praxis 0.16.1 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +0 -1
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/CHANGELOG.md +41 -0
- data/CONTRIBUTING.md +3 -0
- data/lib/api_browser/Gruntfile.js +20 -4
- data/lib/api_browser/app/bower_components/angular-mocks/.bower.json +6 -6
- data/lib/api_browser/app/bower_components/angular-mocks/README.md +11 -5
- data/lib/api_browser/app/bower_components/angular-mocks/angular-mocks.js +475 -216
- data/lib/api_browser/app/bower_components/angular-mocks/bower.json +2 -2
- data/lib/api_browser/app/bower_components/angular-mocks/ngAnimateMock.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/ngMock.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/ngMockE2E.js +2 -0
- data/lib/api_browser/app/bower_components/angular-mocks/package.json +1 -1
- data/lib/api_browser/app/bower_components/angular-sanitize/.bower.json +8 -8
- data/lib/api_browser/app/bower_components/angular-sanitize/README.md +19 -5
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.js +186 -127
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.min.js +12 -10
- data/lib/api_browser/app/bower_components/angular-sanitize/angular-sanitize.min.js.map +3 -3
- data/lib/api_browser/app/bower_components/angular-sanitize/bower.json +3 -2
- data/lib/api_browser/app/bower_components/angular-sanitize/index.js +2 -0
- data/lib/api_browser/app/bower_components/angular-sanitize/package.json +26 -0
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/.bower.json +15 -8
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/bower.json +11 -3
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-csp.css +6 -0
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.js +1177 -453
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap-tpls.min.js +4 -4
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap.js +1066 -404
- data/lib/api_browser/app/bower_components/angular-ui-bootstrap-bower/ui-bootstrap.min.js +3 -3
- data/lib/api_browser/app/bower_components/angular-ui-router/.bower.json +5 -6
- data/lib/api_browser/app/bower_components/angular-ui-router/CHANGELOG.md +208 -3
- data/lib/api_browser/app/bower_components/angular-ui-router/CONTRIBUTING.md +65 -0
- data/lib/api_browser/app/bower_components/angular-ui-router/LICENSE +1 -1
- data/lib/api_browser/app/bower_components/angular-ui-router/README.md +36 -71
- data/lib/api_browser/app/bower_components/angular-ui-router/api/angular-ui-router.d.ts +126 -0
- data/lib/api_browser/app/bower_components/angular-ui-router/bower.json +1 -1
- data/lib/api_browser/app/bower_components/angular-ui-router/release/angular-ui-router.js +1902 -755
- data/lib/api_browser/app/bower_components/angular-ui-router/release/angular-ui-router.min.js +2 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/common.js +69 -23
- data/lib/api_browser/app/bower_components/angular-ui-router/src/resolve.js +15 -5
- data/lib/api_browser/app/bower_components/angular-ui-router/src/state.js +556 -295
- data/lib/api_browser/app/bower_components/angular-ui-router/src/stateDirectives.js +101 -42
- data/lib/api_browser/app/bower_components/angular-ui-router/src/stateFilters.js +6 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/templateFactory.js +2 -2
- data/lib/api_browser/app/bower_components/angular-ui-router/src/urlMatcherFactory.js +822 -97
- data/lib/api_browser/app/bower_components/angular-ui-router/src/urlRouter.js +274 -120
- data/lib/api_browser/app/bower_components/angular-ui-router/src/viewDirective.js +33 -20
- data/lib/api_browser/app/bower_components/angular-ui-router/src/viewScroll.js +1 -1
- data/lib/api_browser/app/bower_components/angular/.bower.json +5 -5
- data/lib/api_browser/app/bower_components/angular/README.md +2 -5
- data/lib/api_browser/app/bower_components/angular/angular-csp.css +5 -8
- data/lib/api_browser/app/bower_components/angular/angular.js +12975 -6996
- data/lib/api_browser/app/bower_components/angular/angular.min.js +285 -213
- data/lib/api_browser/app/bower_components/angular/angular.min.js.gzip +0 -0
- data/lib/api_browser/app/bower_components/angular/angular.min.js.map +3 -3
- data/lib/api_browser/app/bower_components/angular/bower.json +1 -1
- data/lib/api_browser/app/bower_components/angular/index.js +2 -0
- data/lib/api_browser/app/bower_components/angular/package.json +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/.bower.json +31 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/CHANGELOG.md +108 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/CONTRIBUTING.md +55 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/README.md +147 -206
- data/lib/api_browser/app/bower_components/bootstrap-sass/bower.json +19 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.eot +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.svg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.ttf +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{dist/fonts → vendor/assets/fonts/bootstrap}/glyphicons-halflings-regular.woff +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/vendor/assets/javascripts/bootstrap.js +12 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/affix.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/alert.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/button.js +11 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/carousel.js +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/collapse.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/dropdown.js +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/modal.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/popover.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/scrollspy.js +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/tab.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/tooltip.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{js → vendor/assets/javascripts/bootstrap}/transition.js +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap.scss +1 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_alerts.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_badges.scss +6 -6
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_breadcrumbs.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_button-groups.scss +7 -33
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_buttons.scss +2 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_carousel.scss +1 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_close.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_code.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_component-animations.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_dropdowns.scss +3 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_forms.scss +11 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_glyphicons.scss +5 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_grid.scss +12 -26
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_input-groups.scss +1 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_jumbotron.scss +8 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_labels.scss +6 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_list-group.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_media.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_mixins.scss +38 -51
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_modals.scss +2 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_navbar.scss +41 -53
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_navs.scss +0 -20
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_normalize.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_pager.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_pagination.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_panels.scss +11 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_popovers.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_print.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_progress-bars.scss +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_responsive-utilities.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_scaffolding.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_tables.scss +5 -18
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_theme.scss +2 -2
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_thumbnails.scss +9 -3
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_tooltip.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_type.scss +54 -52
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_utilities.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_variables.scss +20 -11
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/_wells.scss +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/{lib → vendor/assets/stylesheets/bootstrap}/bootstrap.scss +0 -0
- data/lib/api_browser/app/bower_components/lodash/.bower.json +9 -13
- data/lib/api_browser/app/bower_components/lodash/LICENSE.txt +3 -3
- data/lib/api_browser/app/bower_components/lodash/bower.json +4 -7
- data/lib/api_browser/app/bower_components/lodash/lodash.js +12235 -0
- data/lib/api_browser/app/bower_components/lodash/lodash.min.js +98 -0
- data/lib/api_browser/app/index.html +0 -1
- data/lib/api_browser/app/js/app.js +2 -5
- data/lib/api_browser/app/js/controllers/action.js +21 -37
- data/lib/api_browser/app/js/controllers/controller.js +23 -1
- data/lib/api_browser/app/js/controllers/menu.js +46 -14
- data/lib/api_browser/app/js/controllers/type.js +2 -9
- data/lib/api_browser/app/js/directives/attribute_description.js +15 -5
- data/lib/api_browser/app/js/directives/attribute_table.js +6 -6
- data/lib/api_browser/app/js/directives/fixed_if_fits.js +20 -0
- data/lib/api_browser/app/js/directives/no_container.js +6 -6
- data/lib/api_browser/app/js/directives/type_placeholder.js +21 -0
- data/lib/api_browser/app/js/factories/Configuration.js +13 -0
- data/lib/api_browser/app/js/factories/Documentation.js +0 -3
- data/lib/api_browser/app/js/factories/normalize_attributes.js +19 -0
- data/lib/api_browser/app/js/factories/template_for.js +113 -0
- data/lib/api_browser/app/sass/modules/_body.scss +26 -4
- data/lib/api_browser/app/sass/modules/_sidebar.scss +68 -1
- data/lib/api_browser/app/sass/praxis.scss +1 -5
- data/lib/api_browser/app/sass/variables/_bootstrap-variables.scss +13 -4
- data/lib/api_browser/app/views/action.html +13 -17
- data/lib/api_browser/app/views/controller.html +32 -4
- data/lib/api_browser/app/views/directives/attribute_description.html +1 -1
- data/lib/api_browser/app/views/directives/attribute_description/{_default.html → default.html} +0 -0
- data/lib/api_browser/app/views/directives/attribute_description/example.html +13 -0
- data/lib/api_browser/app/views/directives/attribute_description/headers.html +8 -0
- data/lib/api_browser/app/views/directives/attribute_description/member_options.html +4 -0
- data/lib/api_browser/app/views/directives/attribute_description/values.html +14 -0
- data/lib/api_browser/app/views/directives/attribute_table.html +2 -2
- data/lib/api_browser/app/views/home.html +1 -3
- data/lib/api_browser/app/views/layout.html +3 -36
- data/lib/api_browser/app/views/menu.html +45 -0
- data/lib/api_browser/app/views/navbar.html +1 -1
- data/lib/api_browser/app/views/type.html +2 -2
- data/lib/api_browser/app/views/type/{_details.html → details.html} +6 -6
- data/lib/api_browser/app/views/types/embedded/default.html +10 -0
- data/lib/api_browser/app/views/types/embedded/links.html +11 -0
- data/lib/api_browser/app/views/types/embedded/struct.html +2 -0
- data/lib/api_browser/app/views/types/label/link.html +1 -0
- data/lib/api_browser/app/views/types/label/primitive.html +1 -0
- data/lib/api_browser/app/views/types/label/primitive_collection.html +1 -0
- data/lib/api_browser/app/views/types/label/type.html +1 -0
- data/lib/api_browser/app/views/types/label/type_collection.html +1 -0
- data/lib/api_browser/app/views/{directives/request_body/_default.html → types/standalone/default.html} +1 -1
- data/lib/api_browser/app/views/types/standalone/struct.html +1 -0
- data/lib/api_browser/bower.json +9 -9
- data/lib/api_browser/package.json +1 -1
- data/lib/praxis.rb +10 -4
- data/lib/praxis/action_definition.rb +16 -4
- data/lib/praxis/action_definition/headers_dsl_compiler.rb +5 -2
- data/lib/praxis/api_definition.rb +3 -1
- data/lib/praxis/api_general_info.rb +49 -5
- data/lib/praxis/application.rb +12 -4
- data/lib/praxis/bootloader.rb +1 -0
- data/lib/praxis/bootloader_stages/environment.rb +2 -0
- data/lib/praxis/bootloader_stages/routing.rb +1 -1
- data/lib/praxis/bootloader_stages/subgroup_loader.rb +1 -0
- data/lib/praxis/exceptions/validation.rb +7 -0
- data/lib/praxis/handlers/plain.rb +16 -0
- data/lib/praxis/handlers/xml.rb +4 -4
- data/lib/praxis/links.rb +13 -3
- data/lib/praxis/media_type_identifier.rb +3 -0
- data/lib/praxis/multipart/parser.rb +41 -48
- data/lib/praxis/multipart/part.rb +196 -3
- data/lib/praxis/request.rb +14 -11
- data/lib/praxis/request_stages/request_stage.rb +4 -0
- data/lib/praxis/request_stages/response.rb +10 -9
- data/lib/praxis/request_stages/validate.rb +1 -7
- data/lib/praxis/request_stages/validate_params_and_headers.rb +30 -5
- data/lib/praxis/request_stages/validate_payload.rb +14 -5
- data/lib/praxis/resource_definition.rb +117 -15
- data/lib/praxis/response.rb +6 -5
- data/lib/praxis/response_definition.rb +51 -5
- data/lib/praxis/responses/http.rb +5 -0
- data/lib/praxis/responses/multipart_ok.rb +51 -0
- data/lib/praxis/responses/validation_error.rb +7 -7
- data/lib/praxis/restful_doc_generator.rb +9 -4
- data/lib/praxis/route.rb +3 -2
- data/lib/praxis/router.rb +26 -16
- data/lib/praxis/router/rack.rb +51 -0
- data/lib/praxis/router/simple.rb +146 -0
- data/lib/praxis/routing_config.rb +2 -2
- data/lib/praxis/trait.rb +1 -1
- data/lib/praxis/types/fuzzy_hash.rb +49 -0
- data/lib/praxis/types/media_type_common.rb +1 -1
- data/lib/praxis/types/multipart.rb +47 -12
- data/lib/praxis/types/multipart_array.rb +320 -0
- data/lib/praxis/types/multipart_array/part_definition.rb +52 -0
- data/lib/praxis/validation_handler.rb +10 -0
- data/lib/praxis/version.rb +2 -2
- data/praxis.gemspec +3 -3
- data/spec/api_browser/directives/type_placeholder_spec.js +134 -0
- data/spec/api_browser/factories/normalize_attributes_spec.js +97 -0
- data/spec/api_browser/factories/template_for_spec.js +67 -0
- data/spec/functional_spec.rb +111 -45
- data/spec/praxis/action_definition_spec.rb +31 -7
- data/spec/praxis/api_definition_spec.rb +2 -2
- data/spec/praxis/api_general_info_spec.rb +25 -0
- data/spec/praxis/application_spec.rb +24 -11
- data/spec/praxis/handlers/xml_spec.rb +55 -33
- data/spec/praxis/links_spec.rb +18 -1
- data/spec/praxis/media_type_collection_spec.rb +1 -1
- data/spec/praxis/media_type_spec.rb +2 -2
- data/spec/praxis/multipart/parser_spec.rb +21 -13
- data/spec/praxis/plugins/praxis_mapper_plugin_spec.rb +1 -1
- data/spec/praxis/request_spec.rb +52 -24
- data/spec/praxis/{request_stages_action_spec.rb → request_stages/action_spec.rb} +1 -1
- data/spec/praxis/{request_stage_spec.rb → request_stages/request_stage_spec.rb} +0 -0
- data/spec/praxis/{request_stages_validate_spec.rb → request_stages/validate_spec.rb} +1 -1
- data/spec/praxis/resource_definition_spec.rb +30 -4
- data/spec/praxis/response_definition_spec.rb +60 -19
- data/spec/praxis/response_spec.rb +2 -2
- data/spec/praxis/responses/validation_error_spec.rb +33 -16
- data/spec/praxis/route_spec.rb +4 -2
- data/spec/praxis/router_spec.rb +28 -12
- data/spec/praxis/routing_config_spec.rb +11 -5
- data/spec/praxis/types/collection_spec.rb +1 -1
- data/spec/praxis/types/fuzzy_hash_spec.rb +20 -0
- data/spec/praxis/types/multipart_array/part_definition_spec.rb +5 -0
- data/spec/praxis/types/multipart_array_spec.rb +334 -0
- data/spec/praxis/types/multipart_spec.rb +14 -5
- data/spec/spec_app/app/controllers/instances.rb +20 -10
- data/spec/spec_app/app/controllers/volumes.rb +8 -4
- data/spec/spec_app/app/responses/bulk_response.rb +0 -6
- data/spec/spec_app/config/environment.rb +13 -0
- data/spec/spec_app/design/api.rb +7 -10
- data/spec/spec_app/design/media_types/instance.rb +3 -1
- data/spec/spec_app/design/resources/instances.rb +50 -41
- data/spec/spec_app/design/resources/volume_snapshots.rb +39 -0
- data/spec/spec_app/design/resources/volumes.rb +11 -6
- data/spec/spec_helper.rb +3 -1
- metadata +125 -218
- data/lib/api_browser/app/bower_components/angular-ui-router/src/compat.js +0 -146
- data/lib/api_browser/app/bower_components/bootstrap-sass/CNAME +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/DOCS-LICENSE +0 -319
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gemfile +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gemfile.lock +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/Gruntfile.js +0 -244
- data/lib/api_browser/app/bower_components/bootstrap-sass/LICENSE +0 -176
- data/lib/api_browser/app/bower_components/bootstrap-sass/LICENSE-MIT +0 -21
- data/lib/api_browser/app/bower_components/bootstrap-sass/Rakefile +0 -44
- data/lib/api_browser/app/bower_components/bootstrap-sass/_config.yml +0 -25
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/ads.html +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/footer.html +0 -34
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/header.html +0 -42
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-about.html +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-components.html +0 -137
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-css.html +0 -99
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-customize.html +0 -40
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-getting-started.html +0 -44
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-javascript.html +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/nav-main.html +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/old-bs-docs.html +0 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/_includes/social-buttons.html +0 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/_layouts/default.html +0 -79
- data/lib/api_browser/app/bower_components/bootstrap-sass/_layouts/home.html +0 -47
- data/lib/api_browser/app/bower_components/bootstrap-sass/about.html +0 -93
- data/lib/api_browser/app/bower_components/bootstrap-sass/browserstack.json +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/components.html +0 -3689
- data/lib/api_browser/app/bower_components/bootstrap-sass/composer.json +0 -28
- data/lib/api_browser/app/bower_components/bootstrap-sass/css.html +0 -2674
- data/lib/api_browser/app/bower_components/bootstrap-sass/customize.html +0 -1715
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap-theme.css +0 -427
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap-theme.min.css +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap.css +0 -6350
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/css/bootstrap.min.css +0 -1
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/js/bootstrap.js +0 -2002
- data/lib/api_browser/app/bower_components/bootstrap-sass/dist/js/bootstrap.min.js +0 -9
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/css/docs.css +0 -1195
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/css/pygments-manni.css +0 -66
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/ico/favicon.png +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/application.js +0 -103
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/customizer.js +0 -332
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/filesaver.js +0 -169
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/holder.js +0 -404
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/ie8-responsive-file-warning.js +0 -12
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/jszip.js +0 -1467
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/less.js +0 -9
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/raw-files.js +0 -3
- data/lib/api_browser/app/bower_components/bootstrap-sass/docs-assets/js/uglify.js +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/carousel/carousel.css +0 -148
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/carousel/index.html +0 -206
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/grid/grid.css +0 -28
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/grid/index.html +0 -148
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron-narrow/index.html +0 -82
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron-narrow/jumbotron-narrow.css +0 -79
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron/index.html +0 -99
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/jumbotron/jumbotron.css +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/justified-nav/index.html +0 -83
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/justified-nav/justified-nav.css +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-fixed-top/index.html +0 -91
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-fixed-top/navbar-fixed-top.css +0 -4
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-static-top/index.html +0 -92
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar-static-top/navbar-static-top.css +0 -7
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar/index.html +0 -88
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/navbar/navbar.css +0 -8
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/non-responsive/index.html +0 -101
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/non-responsive/non-responsive.css +0 -116
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/index.html +0 -130
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/offcanvas.css +0 -50
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/offcanvas/offcanvas.js +0 -5
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/carousel.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/grid.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/jumbotron-narrow.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/jumbotron.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/justified-nav.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar-fixed.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar-static.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/navbar.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/non-responsive.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/offcanvas.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sign-in.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/starter-template.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sticky-footer-navbar.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/sticky-footer.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/screenshots/theme.jpg +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/signin/index.html +0 -50
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/signin/signin.css +0 -40
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/starter-template/index.html +0 -68
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/starter-template/starter-template.css +0 -7
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer-navbar/index.html +0 -91
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer-navbar/sticky-footer-navbar.css +0 -45
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer/index.html +0 -55
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/sticky-footer/sticky-footer.css +0 -38
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/theme/index.html +0 -384
- data/lib/api_browser/app/bower_components/bootstrap-sass/examples/theme/theme.css +0 -14
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.svg +0 -229
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/api_browser/app/bower_components/bootstrap-sass/getting-started.html +0 -1021
- data/lib/api_browser/app/bower_components/bootstrap-sass/index.html +0 -16
- data/lib/api_browser/app/bower_components/bootstrap-sass/javascript.html +0 -1983
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/index.html +0 -52
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/affix.js +0 -25
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/alert.js +0 -62
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/button.js +0 -116
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/carousel.js +0 -87
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/collapse.js +0 -164
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/dropdown.js +0 -219
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/modal.js +0 -196
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/phantom.js +0 -69
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/popover.js +0 -133
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/scrollspy.js +0 -37
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/tab.js +0 -86
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/tooltip.js +0 -437
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/unit/transition.js +0 -13
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/jquery.js +0 -6
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/qunit.css +0 -232
- data/lib/api_browser/app/bower_components/bootstrap-sass/js/tests/vendor/qunit.js +0 -1510
- data/lib/api_browser/app/bower_components/bootstrap-sass/package.json +0 -40
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.compat.js +0 -7157
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.compat.min.js +0 -61
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.js +0 -6785
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.min.js +0 -56
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.underscore.js +0 -4979
- data/lib/api_browser/app/bower_components/lodash/dist/lodash.underscore.min.js +0 -39
- data/lib/api_browser/app/js/directives/attribute_table_row.js +0 -17
- data/lib/api_browser/app/js/directives/request_body.js +0 -25
- data/lib/api_browser/app/js/directives/request_headers.js +0 -17
- data/lib/api_browser/app/js/directives/request_parameters.js +0 -17
- data/lib/api_browser/app/js/directives/type_label.js +0 -52
- data/lib/api_browser/app/js/factories/PayloadTemplates.js +0 -10
- data/lib/api_browser/app/js/factories/TemplateProvider.js +0 -45
- data/lib/api_browser/app/js/factories/TypeTemplates.js +0 -11
- data/lib/api_browser/app/views/directives/attribute_description/_example.html +0 -13
- data/lib/api_browser/app/views/directives/attribute_description/_headers.html +0 -8
- data/lib/api_browser/app/views/directives/attribute_table_row/_default.html +0 -10
- data/lib/api_browser/app/views/directives/attribute_table_row/_links.html +0 -11
- data/lib/api_browser/app/views/directives/attribute_table_row/_struct.html +0 -2
- data/lib/api_browser/app/views/directives/request_body/_struct.html +0 -1
- data/lib/api_browser/app/views/resource/_actions.html +0 -27
@@ -1,169 +0,0 @@
|
|
1
|
-
/* Blob.js
|
2
|
-
* A Blob implementation.
|
3
|
-
* 2013-06-20
|
4
|
-
*
|
5
|
-
* By Eli Grey, http://eligrey.com
|
6
|
-
* By Devin Samarin, https://github.com/eboyjr
|
7
|
-
* License: X11/MIT
|
8
|
-
* See LICENSE.md
|
9
|
-
*/
|
10
|
-
|
11
|
-
/*global self, unescape */
|
12
|
-
/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,
|
13
|
-
plusplus: true */
|
14
|
-
|
15
|
-
/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */
|
16
|
-
|
17
|
-
if (typeof Blob !== "function" || typeof URL === "undefined")
|
18
|
-
if (typeof Blob === "function" && typeof webkitURL !== "undefined") self.URL = webkitURL;
|
19
|
-
else var Blob = (function (view) {
|
20
|
-
"use strict";
|
21
|
-
|
22
|
-
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) {
|
23
|
-
var
|
24
|
-
get_class = function(object) {
|
25
|
-
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
|
26
|
-
}
|
27
|
-
, FakeBlobBuilder = function BlobBuilder() {
|
28
|
-
this.data = [];
|
29
|
-
}
|
30
|
-
, FakeBlob = function Blob(data, type, encoding) {
|
31
|
-
this.data = data;
|
32
|
-
this.size = data.length;
|
33
|
-
this.type = type;
|
34
|
-
this.encoding = encoding;
|
35
|
-
}
|
36
|
-
, FBB_proto = FakeBlobBuilder.prototype
|
37
|
-
, FB_proto = FakeBlob.prototype
|
38
|
-
, FileReaderSync = view.FileReaderSync
|
39
|
-
, FileException = function(type) {
|
40
|
-
this.code = this[this.name = type];
|
41
|
-
}
|
42
|
-
, file_ex_codes = (
|
43
|
-
"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR "
|
44
|
-
+ "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR"
|
45
|
-
).split(" ")
|
46
|
-
, file_ex_code = file_ex_codes.length
|
47
|
-
, real_URL = view.URL || view.webkitURL || view
|
48
|
-
, real_create_object_URL = real_URL.createObjectURL
|
49
|
-
, real_revoke_object_URL = real_URL.revokeObjectURL
|
50
|
-
, URL = real_URL
|
51
|
-
, btoa = view.btoa
|
52
|
-
, atob = view.atob
|
53
|
-
|
54
|
-
, ArrayBuffer = view.ArrayBuffer
|
55
|
-
, Uint8Array = view.Uint8Array
|
56
|
-
;
|
57
|
-
FakeBlob.fake = FB_proto.fake = true;
|
58
|
-
while (file_ex_code--) {
|
59
|
-
FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;
|
60
|
-
}
|
61
|
-
if (!real_URL.createObjectURL) {
|
62
|
-
URL = view.URL = {};
|
63
|
-
}
|
64
|
-
URL.createObjectURL = function(blob) {
|
65
|
-
var
|
66
|
-
type = blob.type
|
67
|
-
, data_URI_header
|
68
|
-
;
|
69
|
-
if (type === null) {
|
70
|
-
type = "application/octet-stream";
|
71
|
-
}
|
72
|
-
if (blob instanceof FakeBlob) {
|
73
|
-
data_URI_header = "data:" + type;
|
74
|
-
if (blob.encoding === "base64") {
|
75
|
-
return data_URI_header + ";base64," + blob.data;
|
76
|
-
} else if (blob.encoding === "URI") {
|
77
|
-
return data_URI_header + "," + decodeURIComponent(blob.data);
|
78
|
-
} if (btoa) {
|
79
|
-
return data_URI_header + ";base64," + btoa(blob.data);
|
80
|
-
} else {
|
81
|
-
return data_URI_header + "," + encodeURIComponent(blob.data);
|
82
|
-
}
|
83
|
-
} else if (real_create_object_URL) {
|
84
|
-
return real_create_object_URL.call(real_URL, blob);
|
85
|
-
}
|
86
|
-
};
|
87
|
-
URL.revokeObjectURL = function(object_URL) {
|
88
|
-
if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) {
|
89
|
-
real_revoke_object_URL.call(real_URL, object_URL);
|
90
|
-
}
|
91
|
-
};
|
92
|
-
FBB_proto.append = function(data/*, endings*/) {
|
93
|
-
var bb = this.data;
|
94
|
-
// decode data to a binary string
|
95
|
-
if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
|
96
|
-
var
|
97
|
-
str = ""
|
98
|
-
, buf = new Uint8Array(data)
|
99
|
-
, i = 0
|
100
|
-
, buf_len = buf.length
|
101
|
-
;
|
102
|
-
for (; i < buf_len; i++) {
|
103
|
-
str += String.fromCharCode(buf[i]);
|
104
|
-
}
|
105
|
-
bb.push(str);
|
106
|
-
} else if (get_class(data) === "Blob" || get_class(data) === "File") {
|
107
|
-
if (FileReaderSync) {
|
108
|
-
var fr = new FileReaderSync;
|
109
|
-
bb.push(fr.readAsBinaryString(data));
|
110
|
-
} else {
|
111
|
-
// async FileReader won't work as BlobBuilder is sync
|
112
|
-
throw new FileException("NOT_READABLE_ERR");
|
113
|
-
}
|
114
|
-
} else if (data instanceof FakeBlob) {
|
115
|
-
if (data.encoding === "base64" && atob) {
|
116
|
-
bb.push(atob(data.data));
|
117
|
-
} else if (data.encoding === "URI") {
|
118
|
-
bb.push(decodeURIComponent(data.data));
|
119
|
-
} else if (data.encoding === "raw") {
|
120
|
-
bb.push(data.data);
|
121
|
-
}
|
122
|
-
} else {
|
123
|
-
if (typeof data !== "string") {
|
124
|
-
data += ""; // convert unsupported types to strings
|
125
|
-
}
|
126
|
-
// decode UTF-16 to binary string
|
127
|
-
bb.push(unescape(encodeURIComponent(data)));
|
128
|
-
}
|
129
|
-
};
|
130
|
-
FBB_proto.getBlob = function(type) {
|
131
|
-
if (!arguments.length) {
|
132
|
-
type = null;
|
133
|
-
}
|
134
|
-
return new FakeBlob(this.data.join(""), type, "raw");
|
135
|
-
};
|
136
|
-
FBB_proto.toString = function() {
|
137
|
-
return "[object BlobBuilder]";
|
138
|
-
};
|
139
|
-
FB_proto.slice = function(start, end, type) {
|
140
|
-
var args = arguments.length;
|
141
|
-
if (args < 3) {
|
142
|
-
type = null;
|
143
|
-
}
|
144
|
-
return new FakeBlob(
|
145
|
-
this.data.slice(start, args > 1 ? end : this.data.length)
|
146
|
-
, type
|
147
|
-
, this.encoding
|
148
|
-
);
|
149
|
-
};
|
150
|
-
FB_proto.toString = function() {
|
151
|
-
return "[object Blob]";
|
152
|
-
};
|
153
|
-
return FakeBlobBuilder;
|
154
|
-
}(view));
|
155
|
-
|
156
|
-
return function Blob(blobParts, options) {
|
157
|
-
var type = options ? (options.type || "") : "";
|
158
|
-
var builder = new BlobBuilder();
|
159
|
-
if (blobParts) {
|
160
|
-
for (var i = 0, len = blobParts.length; i < len; i++) {
|
161
|
-
builder.append(blobParts[i]);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
return builder.getBlob(type);
|
165
|
-
};
|
166
|
-
}(self));
|
167
|
-
|
168
|
-
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
|
169
|
-
var saveAs=saveAs||(navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator))||(function(h){"use strict";var r=h.document,l=function(){return h.URL||h.webkitURL||h},e=h.URL||h.webkitURL||h,n=r.createElementNS("http://www.w3.org/1999/xhtml","a"),g=!h.externalHost&&"download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}if(w){w.location.href=x}else{window.open(x,"_blank")}v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;j(n);v.readyState=v.DONE;A();return}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;h.addEventListener("unload",i,false);return a}(self));
|
@@ -1,404 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
|
3
|
-
Holder - 2.1 - client side image placeholders
|
4
|
-
(c) 2012-2013 Ivan Malopinsky / http://imsky.co
|
5
|
-
|
6
|
-
Provided under the MIT License.
|
7
|
-
Commercial use requires attribution.
|
8
|
-
|
9
|
-
*/
|
10
|
-
|
11
|
-
var Holder = Holder || {};
|
12
|
-
(function (app, win) {
|
13
|
-
|
14
|
-
var preempted = false,
|
15
|
-
fallback = false,
|
16
|
-
canvas = document.createElement('canvas');
|
17
|
-
|
18
|
-
if (!canvas.getContext) {
|
19
|
-
fallback = true;
|
20
|
-
} else {
|
21
|
-
if (canvas.toDataURL("image/png")
|
22
|
-
.indexOf("data:image/png") < 0) {
|
23
|
-
//Android doesn't support data URI
|
24
|
-
fallback = true;
|
25
|
-
} else {
|
26
|
-
var ctx = canvas.getContext("2d");
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
var dpr = 1, bsr = 1;
|
31
|
-
|
32
|
-
if(!fallback){
|
33
|
-
dpr = window.devicePixelRatio || 1,
|
34
|
-
bsr = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.msBackingStorePixelRatio || ctx.oBackingStorePixelRatio || ctx.backingStorePixelRatio || 1;
|
35
|
-
}
|
36
|
-
|
37
|
-
var ratio = dpr / bsr;
|
38
|
-
|
39
|
-
//getElementsByClassName polyfill
|
40
|
-
document.getElementsByClassName||(document.getElementsByClassName=function(e){var t=document,n,r,i,s=[];if(t.querySelectorAll)return t.querySelectorAll("."+e);if(t.evaluate){r=".//*[contains(concat(' ', @class, ' '), ' "+e+" ')]",n=t.evaluate(r,t,null,0,null);while(i=n.iterateNext())s.push(i)}else{n=t.getElementsByTagName("*"),r=new RegExp("(^|\\s)"+e+"(\\s|$)");for(i=0;i<n.length;i++)r.test(n[i].className)&&s.push(n[i])}return s})
|
41
|
-
|
42
|
-
//getComputedStyle polyfill
|
43
|
-
window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this})
|
44
|
-
|
45
|
-
//http://javascript.nwbox.com/ContentLoaded by Diego Perini with modifications
|
46
|
-
function contentLoaded(n,t){var l="complete",s="readystatechange",u=!1,h=u,c=!0,i=n.document,a=i.documentElement,e=i.addEventListener?"addEventListener":"attachEvent",v=i.addEventListener?"removeEventListener":"detachEvent",f=i.addEventListener?"":"on",r=function(e){(e.type!=s||i.readyState==l)&&((e.type=="load"?n:i)[v](f+e.type,r,u),!h&&(h=!0)&&t.call(n,null))},o=function(){try{a.doScroll("left")}catch(n){setTimeout(o,50);return}r("poll")};if(i.readyState==l)t.call(n,"lazy");else{if(i.createEventObject&&a.doScroll){try{c=!n.frameElement}catch(y){}c&&o()}i[e](f+"DOMContentLoaded",r,u),i[e](f+s,r,u),n[e](f+"load",r,u)}}
|
47
|
-
|
48
|
-
//https://gist.github.com/991057 by Jed Schmidt with modifications
|
49
|
-
function selector(a){
|
50
|
-
a=a.match(/^(\W)?(.*)/);var b=document["getElement"+(a[1]?a[1]=="#"?"ById":"sByClassName":"sByTagName")](a[2]);
|
51
|
-
var ret=[]; b!==null&&(b.length?ret=b:b.length===0?ret=b:ret=[b]); return ret;
|
52
|
-
}
|
53
|
-
|
54
|
-
//shallow object property extend
|
55
|
-
function extend(a,b){var c={};for(var d in a)c[d]=a[d];for(var e in b)c[e]=b[e];return c}
|
56
|
-
|
57
|
-
//hasOwnProperty polyfill
|
58
|
-
if (!Object.prototype.hasOwnProperty)
|
59
|
-
/*jshint -W001, -W103 */
|
60
|
-
Object.prototype.hasOwnProperty = function(prop) {
|
61
|
-
var proto = this.__proto__ || this.constructor.prototype;
|
62
|
-
return (prop in this) && (!(prop in proto) || proto[prop] !== this[prop]);
|
63
|
-
}
|
64
|
-
/*jshint +W001, +W103 */
|
65
|
-
|
66
|
-
function text_size(width, height, template) {
|
67
|
-
height = parseInt(height, 10);
|
68
|
-
width = parseInt(width, 10);
|
69
|
-
var bigSide = Math.max(height, width)
|
70
|
-
var smallSide = Math.min(height, width)
|
71
|
-
var scale = 1 / 12;
|
72
|
-
var newHeight = Math.min(smallSide * 0.75, 0.75 * bigSide * scale);
|
73
|
-
return {
|
74
|
-
height: Math.round(Math.max(template.size, newHeight))
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
function draw(ctx, dimensions, template, ratio, literal) {
|
79
|
-
var ts = text_size(dimensions.width, dimensions.height, template);
|
80
|
-
var text_height = ts.height;
|
81
|
-
var width = dimensions.width * ratio,
|
82
|
-
height = dimensions.height * ratio;
|
83
|
-
var font = template.font ? template.font : "sans-serif";
|
84
|
-
canvas.width = width;
|
85
|
-
canvas.height = height;
|
86
|
-
ctx.textAlign = "center";
|
87
|
-
ctx.textBaseline = "middle";
|
88
|
-
ctx.fillStyle = template.background;
|
89
|
-
ctx.fillRect(0, 0, width, height);
|
90
|
-
ctx.fillStyle = template.foreground;
|
91
|
-
ctx.font = "bold " + text_height + "px " + font;
|
92
|
-
var text = template.text ? template.text : (Math.floor(dimensions.width) + "x" + Math.floor(dimensions.height));
|
93
|
-
if (literal) {
|
94
|
-
text = template.literalText;
|
95
|
-
}
|
96
|
-
var text_width = ctx.measureText(text).width;
|
97
|
-
if (text_width / width >= 0.75) {
|
98
|
-
text_height = Math.floor(text_height * 0.75 * (width / text_width));
|
99
|
-
}
|
100
|
-
//Resetting font size if necessary
|
101
|
-
ctx.font = "bold " + (text_height * ratio) + "px " + font;
|
102
|
-
ctx.fillText(text, (width / 2), (height / 2), width);
|
103
|
-
return canvas.toDataURL("image/png");
|
104
|
-
}
|
105
|
-
|
106
|
-
function render(mode, el, holder, src) {
|
107
|
-
var dimensions = holder.dimensions,
|
108
|
-
theme = holder.theme,
|
109
|
-
text = holder.text ? decodeURIComponent(holder.text) : holder.text;
|
110
|
-
var dimensions_caption = dimensions.width + "x" + dimensions.height;
|
111
|
-
theme = (text ? extend(theme, {
|
112
|
-
text: text
|
113
|
-
}) : theme);
|
114
|
-
theme = (holder.font ? extend(theme, {
|
115
|
-
font: holder.font
|
116
|
-
}) : theme);
|
117
|
-
el.setAttribute("data-src", src);
|
118
|
-
theme.literalText = dimensions_caption;
|
119
|
-
holder.originalTheme = holder.theme;
|
120
|
-
holder.theme = theme;
|
121
|
-
|
122
|
-
if (mode == "image") {
|
123
|
-
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
|
124
|
-
if (fallback || !holder.auto) {
|
125
|
-
el.style.width = dimensions.width + "px";
|
126
|
-
el.style.height = dimensions.height + "px";
|
127
|
-
}
|
128
|
-
if (fallback) {
|
129
|
-
el.style.backgroundColor = theme.background;
|
130
|
-
} else {
|
131
|
-
el.setAttribute("src", draw(ctx, dimensions, theme, ratio));
|
132
|
-
}
|
133
|
-
} else if (mode == "background") {
|
134
|
-
if (!fallback) {
|
135
|
-
el.style.backgroundImage = "url(" + draw(ctx, dimensions, theme, ratio) + ")";
|
136
|
-
el.style.backgroundSize = dimensions.width + "px " + dimensions.height + "px";
|
137
|
-
}
|
138
|
-
} else if (mode == "fluid") {
|
139
|
-
el.setAttribute("alt", text ? text : theme.text ? theme.text + " [" + dimensions_caption + "]" : dimensions_caption);
|
140
|
-
if (dimensions.height.slice(-1) == "%") {
|
141
|
-
el.style.height = dimensions.height
|
142
|
-
} else {
|
143
|
-
el.style.height = dimensions.height + "px"
|
144
|
-
}
|
145
|
-
if (dimensions.width.slice(-1) == "%") {
|
146
|
-
el.style.width = dimensions.width
|
147
|
-
} else {
|
148
|
-
el.style.width = dimensions.width + "px"
|
149
|
-
}
|
150
|
-
if (el.style.display == "inline" || el.style.display === "") {
|
151
|
-
el.style.display = "block";
|
152
|
-
}
|
153
|
-
if (fallback) {
|
154
|
-
el.style.backgroundColor = theme.background;
|
155
|
-
} else {
|
156
|
-
el.holderData = holder;
|
157
|
-
fluid_images.push(el);
|
158
|
-
fluid_update(el);
|
159
|
-
}
|
160
|
-
}
|
161
|
-
}
|
162
|
-
|
163
|
-
function fluid_update(element) {
|
164
|
-
var images;
|
165
|
-
if (element.nodeType == null) {
|
166
|
-
images = fluid_images;
|
167
|
-
} else {
|
168
|
-
images = [element]
|
169
|
-
}
|
170
|
-
for (var i in images) {
|
171
|
-
var el = images[i]
|
172
|
-
if (el.holderData) {
|
173
|
-
var holder = el.holderData;
|
174
|
-
el.setAttribute("src", draw(ctx, {
|
175
|
-
height: el.clientHeight,
|
176
|
-
width: el.clientWidth
|
177
|
-
}, holder.theme, ratio, !! holder.literal));
|
178
|
-
}
|
179
|
-
}
|
180
|
-
}
|
181
|
-
|
182
|
-
function parse_flags(flags, options) {
|
183
|
-
var ret = {
|
184
|
-
theme: settings.themes.gray
|
185
|
-
};
|
186
|
-
var render = false;
|
187
|
-
for (sl = flags.length, j = 0; j < sl; j++) {
|
188
|
-
var flag = flags[j];
|
189
|
-
if (app.flags.dimensions.match(flag)) {
|
190
|
-
render = true;
|
191
|
-
ret.dimensions = app.flags.dimensions.output(flag);
|
192
|
-
} else if (app.flags.fluid.match(flag)) {
|
193
|
-
render = true;
|
194
|
-
ret.dimensions = app.flags.fluid.output(flag);
|
195
|
-
ret.fluid = true;
|
196
|
-
} else if (app.flags.literal.match(flag)) {
|
197
|
-
ret.literal = true;
|
198
|
-
} else if (app.flags.colors.match(flag)) {
|
199
|
-
ret.theme = app.flags.colors.output(flag);
|
200
|
-
} else if (options.themes[flag]) {
|
201
|
-
//If a theme is specified, it will override custom colors
|
202
|
-
ret.theme = options.themes[flag];
|
203
|
-
} else if (app.flags.font.match(flag)) {
|
204
|
-
ret.font = app.flags.font.output(flag);
|
205
|
-
} else if (app.flags.auto.match(flag)) {
|
206
|
-
ret.auto = true;
|
207
|
-
} else if (app.flags.text.match(flag)) {
|
208
|
-
ret.text = app.flags.text.output(flag);
|
209
|
-
}
|
210
|
-
}
|
211
|
-
return render ? ret : false;
|
212
|
-
}
|
213
|
-
var fluid_images = [];
|
214
|
-
var settings = {
|
215
|
-
domain: "holder.js",
|
216
|
-
images: "img",
|
217
|
-
bgnodes: ".holderjs",
|
218
|
-
themes: {
|
219
|
-
"gray": {
|
220
|
-
background: "#eee",
|
221
|
-
foreground: "#aaa",
|
222
|
-
size: 12
|
223
|
-
},
|
224
|
-
"social": {
|
225
|
-
background: "#3a5a97",
|
226
|
-
foreground: "#fff",
|
227
|
-
size: 12
|
228
|
-
},
|
229
|
-
"industrial": {
|
230
|
-
background: "#434A52",
|
231
|
-
foreground: "#C2F200",
|
232
|
-
size: 12
|
233
|
-
}
|
234
|
-
},
|
235
|
-
stylesheet: ""
|
236
|
-
};
|
237
|
-
app.flags = {
|
238
|
-
dimensions: {
|
239
|
-
regex: /^(\d+)x(\d+)$/,
|
240
|
-
output: function (val) {
|
241
|
-
var exec = this.regex.exec(val);
|
242
|
-
return {
|
243
|
-
width: +exec[1],
|
244
|
-
height: +exec[2]
|
245
|
-
}
|
246
|
-
}
|
247
|
-
},
|
248
|
-
fluid: {
|
249
|
-
regex: /^([0-9%]+)x([0-9%]+)$/,
|
250
|
-
output: function (val) {
|
251
|
-
var exec = this.regex.exec(val);
|
252
|
-
return {
|
253
|
-
width: exec[1],
|
254
|
-
height: exec[2]
|
255
|
-
}
|
256
|
-
}
|
257
|
-
},
|
258
|
-
colors: {
|
259
|
-
regex: /#([0-9a-f]{3,})\:#([0-9a-f]{3,})/i,
|
260
|
-
output: function (val) {
|
261
|
-
var exec = this.regex.exec(val);
|
262
|
-
return {
|
263
|
-
size: settings.themes.gray.size,
|
264
|
-
foreground: "#" + exec[2],
|
265
|
-
background: "#" + exec[1]
|
266
|
-
}
|
267
|
-
}
|
268
|
-
},
|
269
|
-
text: {
|
270
|
-
regex: /text\:(.*)/,
|
271
|
-
output: function (val) {
|
272
|
-
return this.regex.exec(val)[1];
|
273
|
-
}
|
274
|
-
},
|
275
|
-
font: {
|
276
|
-
regex: /font\:(.*)/,
|
277
|
-
output: function (val) {
|
278
|
-
return this.regex.exec(val)[1];
|
279
|
-
}
|
280
|
-
},
|
281
|
-
auto: {
|
282
|
-
regex: /^auto$/
|
283
|
-
},
|
284
|
-
literal: {
|
285
|
-
regex: /^literal$/
|
286
|
-
}
|
287
|
-
}
|
288
|
-
for (var flag in app.flags) {
|
289
|
-
if (!app.flags.hasOwnProperty(flag)) continue;
|
290
|
-
app.flags[flag].match = function (val) {
|
291
|
-
return val.match(this.regex)
|
292
|
-
}
|
293
|
-
}
|
294
|
-
app.add_theme = function (name, theme) {
|
295
|
-
name != null && theme != null && (settings.themes[name] = theme);
|
296
|
-
return app;
|
297
|
-
};
|
298
|
-
app.add_image = function (src, el) {
|
299
|
-
var node = selector(el);
|
300
|
-
if (node.length) {
|
301
|
-
for (var i = 0, l = node.length; i < l; i++) {
|
302
|
-
var img = document.createElement("img")
|
303
|
-
img.setAttribute("data-src", src);
|
304
|
-
node[i].appendChild(img);
|
305
|
-
}
|
306
|
-
}
|
307
|
-
return app;
|
308
|
-
};
|
309
|
-
app.run = function (o) {
|
310
|
-
var options = extend(settings, o),
|
311
|
-
images = [],
|
312
|
-
imageNodes = [],
|
313
|
-
bgnodes = [];
|
314
|
-
if (typeof (options.images) == "string") {
|
315
|
-
imageNodes = selector(options.images);
|
316
|
-
} else if (window.NodeList && options.images instanceof window.NodeList) {
|
317
|
-
imageNodes = options.images;
|
318
|
-
} else if (window.Node && options.images instanceof window.Node) {
|
319
|
-
imageNodes = [options.images];
|
320
|
-
}
|
321
|
-
if (typeof (options.bgnodes) == "string") {
|
322
|
-
bgnodes = selector(options.bgnodes);
|
323
|
-
} else if (window.NodeList && options.elements instanceof window.NodeList) {
|
324
|
-
bgnodes = options.bgnodes;
|
325
|
-
} else if (window.Node && options.bgnodes instanceof window.Node) {
|
326
|
-
bgnodes = [options.bgnodes];
|
327
|
-
}
|
328
|
-
preempted = true;
|
329
|
-
for (i = 0, l = imageNodes.length; i < l; i++) images.push(imageNodes[i]);
|
330
|
-
var holdercss = document.getElementById("holderjs-style");
|
331
|
-
if (!holdercss) {
|
332
|
-
holdercss = document.createElement("style");
|
333
|
-
holdercss.setAttribute("id", "holderjs-style");
|
334
|
-
holdercss.type = "text/css";
|
335
|
-
document.getElementsByTagName("head")[0].appendChild(holdercss);
|
336
|
-
}
|
337
|
-
if (!options.nocss) {
|
338
|
-
if (holdercss.styleSheet) {
|
339
|
-
holdercss.styleSheet.cssText += options.stylesheet;
|
340
|
-
} else {
|
341
|
-
holdercss.appendChild(document.createTextNode(options.stylesheet));
|
342
|
-
}
|
343
|
-
}
|
344
|
-
var cssregex = new RegExp(options.domain + "\/(.*?)\"?\\)");
|
345
|
-
for (var l = bgnodes.length, i = 0; i < l; i++) {
|
346
|
-
var src = window.getComputedStyle(bgnodes[i], null)
|
347
|
-
.getPropertyValue("background-image");
|
348
|
-
var flags = src.match(cssregex);
|
349
|
-
var bgsrc = bgnodes[i].getAttribute("data-background-src");
|
350
|
-
if (flags) {
|
351
|
-
var holder = parse_flags(flags[1].split("/"), options);
|
352
|
-
if (holder) {
|
353
|
-
render("background", bgnodes[i], holder, src);
|
354
|
-
}
|
355
|
-
} else if (bgsrc != null) {
|
356
|
-
var holder = parse_flags(bgsrc.substr(bgsrc.lastIndexOf(options.domain) + options.domain.length + 1)
|
357
|
-
.split("/"), options);
|
358
|
-
if (holder) {
|
359
|
-
render("background", bgnodes[i], holder, src);
|
360
|
-
}
|
361
|
-
}
|
362
|
-
}
|
363
|
-
for (l = images.length, i = 0; i < l; i++) {
|
364
|
-
var attr_data_src, attr_src;
|
365
|
-
attr_src = attr_data_src = src = null;
|
366
|
-
try {
|
367
|
-
attr_src = images[i].getAttribute("src");
|
368
|
-
attr_datasrc = images[i].getAttribute("data-src");
|
369
|
-
} catch (e) {}
|
370
|
-
if (attr_datasrc == null && !! attr_src && attr_src.indexOf(options.domain) >= 0) {
|
371
|
-
src = attr_src;
|
372
|
-
} else if ( !! attr_datasrc && attr_datasrc.indexOf(options.domain) >= 0) {
|
373
|
-
src = attr_datasrc;
|
374
|
-
}
|
375
|
-
if (src) {
|
376
|
-
var holder = parse_flags(src.substr(src.lastIndexOf(options.domain) + options.domain.length + 1)
|
377
|
-
.split("/"), options);
|
378
|
-
if (holder) {
|
379
|
-
if (holder.fluid) {
|
380
|
-
render("fluid", images[i], holder, src)
|
381
|
-
} else {
|
382
|
-
render("image", images[i], holder, src);
|
383
|
-
}
|
384
|
-
}
|
385
|
-
}
|
386
|
-
}
|
387
|
-
return app;
|
388
|
-
};
|
389
|
-
contentLoaded(win, function () {
|
390
|
-
if (window.addEventListener) {
|
391
|
-
window.addEventListener("resize", fluid_update, false);
|
392
|
-
window.addEventListener("orientationchange", fluid_update, false);
|
393
|
-
} else {
|
394
|
-
window.attachEvent("onresize", fluid_update)
|
395
|
-
}
|
396
|
-
preempted || app.run();
|
397
|
-
});
|
398
|
-
if (typeof define === "function" && define.amd) {
|
399
|
-
define([], function () {
|
400
|
-
return app;
|
401
|
-
});
|
402
|
-
}
|
403
|
-
|
404
|
-
})(Holder, window);
|