commit 6164449dd3159f88c2f38265c1a676a191c6b3b3 Author: wuhui_zzw <1760308791@qq.com> Date: Tue Mar 12 11:11:46 2024 +0800 初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..88a0121 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/yz-front-dist/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..10b731c --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..7c4836f --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..c6baebe --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/shuizhi.iml b/.idea/shuizhi.iml new file mode 100644 index 0000000..8c67961 --- /dev/null +++ b/.idea/shuizhi.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..8dc8979 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/yunshop-front-master/.babelrc b/yunshop-front-master/.babelrc new file mode 100644 index 0000000..6ad5069 --- /dev/null +++ b/yunshop-front-master/.babelrc @@ -0,0 +1,11 @@ +{ + "plugins": [ + [ + "component", + { + "libraryName": "element-ui", + "styleLibraryName": "theme-chalk" + } + ] + ] +} diff --git a/yunshop-front-master/.browserslistrc b/yunshop-front-master/.browserslistrc new file mode 100644 index 0000000..cac3fac --- /dev/null +++ b/yunshop-front-master/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not ie <= 9 diff --git a/yunshop-front-master/.editorconfig b/yunshop-front-master/.editorconfig new file mode 100644 index 0000000..43e7ea3 --- /dev/null +++ b/yunshop-front-master/.editorconfig @@ -0,0 +1,14 @@ +# http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = false +trim_trailing_whitespace = true + +[*.md] +insert_final_newline = false +trim_trailing_whitespace = false diff --git a/yunshop-front-master/.env.development b/yunshop-front-master/.env.development new file mode 100644 index 0000000..9e26dad --- /dev/null +++ b/yunshop-front-master/.env.development @@ -0,0 +1,4 @@ +NODE_ENV='development' +# must start with VUE_APP_ +VUE_APP_ENV = 'development' + diff --git a/yunshop-front-master/.env.devtest b/yunshop-front-master/.env.devtest new file mode 100644 index 0000000..372e05d --- /dev/null +++ b/yunshop-front-master/.env.devtest @@ -0,0 +1,3 @@ +NODE_ENV='production' +# must start with VUE_APP_ +VUE_APP_ENV = 'devtest' \ No newline at end of file diff --git a/yunshop-front-master/.env.production b/yunshop-front-master/.env.production new file mode 100644 index 0000000..4b2d764 --- /dev/null +++ b/yunshop-front-master/.env.production @@ -0,0 +1,4 @@ +NODE_ENV='production' +# must start with VUE_APP_ +VUE_APP_ENV = 'production' + \ No newline at end of file diff --git a/yunshop-front-master/.env.staging b/yunshop-front-master/.env.staging new file mode 100644 index 0000000..92749e3 --- /dev/null +++ b/yunshop-front-master/.env.staging @@ -0,0 +1,4 @@ +NODE_ENV='production' +# must start with VUE_APP_ +VUE_APP_ENV = 'staging' + diff --git a/yunshop-front-master/.eslintignore b/yunshop-front-master/.eslintignore new file mode 100644 index 0000000..f78810c --- /dev/null +++ b/yunshop-front-master/.eslintignore @@ -0,0 +1,13 @@ +.vscode +.idea +dist +build +config +scripts +node_modules +public +.babelrc +!.*.js +package.json +sign_page.vue +sign_page_controller.js diff --git a/yunshop-front-master/.eslintrc.js b/yunshop-front-master/.eslintrc.js new file mode 100644 index 0000000..0f98897 --- /dev/null +++ b/yunshop-front-master/.eslintrc.js @@ -0,0 +1,66 @@ +module.exports = { + "env": { + "browser": true, + "es6": true, + "node": true, + "es2021": true + }, + "extends": [ + "eslint:recommended", + "plugin:vue/essential" + ], + "parserOptions": { + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": [ + "vue" + ], + "rules": { + "indent": ["error", 2], + "comma-dangle": "off", + "function-paren-newline": "off", + "global-require": "off", + "import/no-dynamic-require": "off", + "no-inner-declarations": "off", + // New rules + "class-methods-use-this": "off", + "import/extensions": "off", + "import/prefer-default-export": "off", + // render不规范 + "react/display-name": "off", + "react/prop-types": "off", + "require-atomic-updates": "off", + // 数组统一空格 [1, 2, 3, ...] + "array-bracket-spacing": 2, + // prettier 中默认函数名不加空格,类似 function add() {},而eslint中默认为function add () {} + "space-before-function-paren": 0, + //禁止在使用new构造一个实例后不赋值 + "no-new": 0, + "no-unused-vars": [2, { + // 允许声明未使用变量 + "vars": "all", + // 参数不检查 + "args": "none" + }], + // 语句强制分号结尾 + "semi": [2, "always"], + //空行最多不能超过10行 + "no-multiple-empty-lines": [0, { "max": 10 }], + "no-useless-escape": 0, //正则中多余的斜杠 + "no-prototype-builtins": 0, + "no-sparse-arrays": 0, + //关闭禁止混用tab和空格 + // "no-mixed-spaces-and-tabs": [0], + // "no-self-assign": 0, // 自我分配 + "no-undef": 0,//不能有未定义的变量 + "vue/no-parsing-error": [2, { + "x-invalid-end-tag": false, //忽略某些不常规的闭合标签报错 + "invalid-first-character-of-tag-name": false, //忽略 template 中的三元运算符使用小于号(<)时报错 + }], + "vue/no-use-v-if-with-v-for": ["error", { + "allowUsingIterationVar": true //v-if和v-for混用 + }], + + } +}; diff --git a/yunshop-front-master/.gitignore b/yunshop-front-master/.gitignore new file mode 100644 index 0000000..ff1b5ec --- /dev/null +++ b/yunshop-front-master/.gitignore @@ -0,0 +1,17 @@ +.DS_Store +node_modules/ +/dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +package-lock.json +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +.cache/ +*.tmp diff --git a/yunshop-front-master/.postcssrc.js b/yunshop-front-master/.postcssrc.js new file mode 100644 index 0000000..8869b1c --- /dev/null +++ b/yunshop-front-master/.postcssrc.js @@ -0,0 +1,8 @@ +// https://github.com/michael-ciniawsky/postcss-load-config +module.exports = { + plugins: { + autoprefixer: { + overrideBrowserslist: ['Android 4.1', 'iOS 7.1', '> 1%', 'last 2 versions', 'not ie <= 9'] + }, + } +} diff --git a/yunshop-front-master/.prettierignore b/yunshop-front-master/.prettierignore new file mode 100644 index 0000000..f78810c --- /dev/null +++ b/yunshop-front-master/.prettierignore @@ -0,0 +1,13 @@ +.vscode +.idea +dist +build +config +scripts +node_modules +public +.babelrc +!.*.js +package.json +sign_page.vue +sign_page_controller.js diff --git a/yunshop-front-master/.prettierrc b/yunshop-front-master/.prettierrc new file mode 100644 index 0000000..9769d03 --- /dev/null +++ b/yunshop-front-master/.prettierrc @@ -0,0 +1,23 @@ +{ + "printWidth": 200, + "tabWidth": 2, + "singleQuote": false, + "trailingComma": "none", + "semi": true, + "wrap_line_length": 200, + "wrap_attributes": "auto", + "proseWrap": "always", + "arrowParens": "avoid", + "bracketSpacing": true, + "jsxBracketSameLine": true, + "useTabs": false, + "overrides": [ + { + "files": ".prettierrc", + "options": { + "parser": "json" + } + } + ], + "endOfLine": "auto" +} diff --git a/yunshop-front-master/.stylelintrc.js b/yunshop-front-master/.stylelintrc.js new file mode 100644 index 0000000..a02ca2e --- /dev/null +++ b/yunshop-front-master/.stylelintrc.js @@ -0,0 +1,22 @@ +module.exports = { + processors: [], + plugins: [], + extends: "stylelint-config-standard", // 这是官方推荐的方式 + rules: { + "indentation": 2, + "block-no-empty": true, + // 字体文件相关 + "font-family-no-missing-generic-family-keyword": null, + // 空的样式文件 + "no-empty-source": null, + // 计算属性 calc() + "function-calc-no-invalid": null, + // 禁止低优先级的选择器出现在高优先级的选择器之后 + "no-descending-specificity": null, + // 禁止重复选择器 + "no-duplicate-selectors": null, + // 在单行声明块中限制声明的数量 + "declaration-block-single-line-max-declarations": null, + "declaration-block-no-shorthand-property-overrides": null + } +}; diff --git a/yunshop-front-master/README.md b/yunshop-front-master/README.md new file mode 100644 index 0000000..adb6c9f --- /dev/null +++ b/yunshop-front-master/README.md @@ -0,0 +1,158 @@ +## 项目简介 + +基于 vue.js 的前端开发环境,用于前后端分离后的单页应用开发,可以在开发时使用 ES2015、scss 等最新语言特性。项目包含: + +- 基础库: `vue.js`、`vue-router`、`vuex`、`whatwg-fetch` +- 编译/打包工具:`webpack`、`babel`、`node-sass`、`vue-cli` +- 本地服务器:`express` + +## 目录结构 + + ├── README.md 项目介绍 + ├── index.html 入口页面 + ├── vue.config.js webpack配置文件 + ├── mock mock数据目录 + │   └── hello.js + ├── package.json npm包配置文件,里面定义了项目的npm脚本,依赖包等信息 + ├── src 源码目录 + │   ├── main.js 入口js文件 + │   ├── app.vue 根组件 + │ ├── components 公共组件目录 + │   │   └── title.vue + │   ├── assets 资源目录,这里的资源会被wabpack构建 + │   │   └── images + │   │   └── logo.png + │   ├── routes 前端路由 + │   │   └── index.js + │   ├── store 应用级数据(state) + │   │   └── index.js + │   └── views 页面目录 + │   ├── hello.vue + │   └── notfound.vue + ├── static 纯静态资源,不会被wabpack构建。 + +## 环境安装 + +本项目依赖 node.js(node版本是10.15.3), 使用前先安装 node.js 和 cnpm(显著提升依赖包的下载速度)。 +1. 自行下载并安装 node.js: [https://nodejs.org/en/download/](https://nodejs.org/en/download/) +2. 然后安装 cnpm 命令: + + npm install -g cnpm --registry=https://registry.npm.taobao.org + + +## 快速开始 + + git clone https://github.com/hanan198501/vue-spa-template.git + cd vue-spa-template + cnpm install + npm run dev + +## 命令列表: + + #开启本地开发服务器,监控项目文件的变化,实时构建并自动刷新浏览器,浏览器访问 http://localhost:8081 + npm run dev + + #使用生产环境配置构建项目,构建好的文件会输出到 "dist" 目录, + npm run build + + #运行构建服务器,可以查看构建的页面 + npm run build-server + + +## 前后端分离 + +项目基于 spa 方式实现前后端分离,后端将所有 url 都返回到同一个 jsp 页面(由前端提供),此 jsp 页面也是前端的入口页面。然后路由由前端控制(基于vue-router),根据不同的 url 加载相应数据和组件进行渲染。 + +## 接口 mock + +前后端分离后,开发前需要和后端同学定义好接口信息(请求地址,参数,返回信息等),前端通过 mock 的方式,即可开始编码,无需等待后端接口 ready。 +项目的本地开发服务器是基于 express 搭建的,通过 express 的中间件机制,我们已经在 dev-server 中添加了接口 mock 功能。 +开发时,接口的 mock 数据统一放在 mock 目录下,每个文件内如下: + + + module.exports = { + + // 接口地址 + api: '/api/hello', + + // 返回数据 参考http://expressjs.com/zh-cn/4x/api.html + response: function (req, res) { + res.send(` +

hello vue!

+ `); + } + } + + +## 模块化 + +开发时可以使用 ES2015 module 语法,构建时每个文件会编译成 amd 模块。 + +## 组件化 + +整个应用通过 vue 组件的方式搭建起来,通过 vue-router 控制相应组件的展现,组件树结构如下: + + app.vue 根组件(整个应用只有一个) + ├──view1.vue 页面级组件,放在 views 目录里面,有子组件时,可以建立子目录 + │ ├──component1.vue 功能组件,公用的放在 components 目录,否则放在 views 子目录 + │ ├──component2.vue + │ └──component3.vue + ├──view2.vue + │ ├──component1.vue + │ └──component4.vue + └──view3.vue + ├──component5.vue + …… + + +## 链接跳转 + +测试代替 + + +script +this.$router.push(this.fun.getUrl('goods',{id:13}));代替 +this.$router.push({name:'goods',params:{id:8},query:{i:2}}); + + +参数说明:fun.getUrl(name,params,query) +功能:自动全网传参。 + +所有ajax均无需加i和type参数,将自动添加。 + + +## 联调方式 + +前后端分离后,由于服务端和前端的开发环境处于2台不同的机器上,前端的异步请求需要代理到后端机器中。 +联调的时候,只需通过 proxy 参数运行 dev 脚本即可,所有 mock 目录下定义的接口将会转发到 proxy 参数指定的机器: + + # 172.16.36.90:8083 为后端机器的环境地址 + npm run dev -- --proxy=172.16.36.90:8083 + +这样,如果 mock 目录下有定义了接口 /api/hello ,将会转发到 http://172.16.36.90/:8083/api/hello + + +## 部署方案-这是一个方向性指引,不能直接套用(部署方案多种,请按自己实际情况操作) + +分离后前后端代码会存放在2个单独的 git 仓库中,构建过程也是分开的。后端构建时,需要依赖前端的构建结果。具体流程如下: + +1. pull 前端项目代码 +2. 构建前端(构建结果放在dist目录) +3. pull 后端代码 +4. 将前端的构建结果(dist目录里的文件)复制到后端工程中 +5. 构建后端 + +提测时,此过程可以借助 jenkins 配置。上线时,需要运维同学配合修改上线脚本。 + + +## 相关资源 + +- vue.js 官网:[https://vuejs.org/](https://vuejs.org/) +- vue.js 中文网: [http://vuefe.cn/](http://vuefe.cn/) +- vue-router 文档:[http://router.vuejs.org/zh-cn/index.html/](http://router.vuejs.org/zh-cn/index.html) +- vuex 文档:[http://vuex.vuejs.org/](http://vuex.vuejs.org/) +- webpack 文档:[https://webpack.github.io/docs/](https://webpack.github.io/docs/) +- ES2015 入门教程:[http://es6.ruanyifeng.com/](http://es6.ruanyifeng.com/) +- scss 文档:[http://sass-lang.com/documentation/file.SASS_REFERENCE.html](http://sass-lang.com/documentation/file.SASS_REFERENCE.html) +- mocha 文档: [http://mochajs.org/](http://mochajs.org/) +- express 中文官网:[http://expressjs.com/zh-cn/](http://expressjs.com/zh-cn/) diff --git a/yunshop-front-master/babel.config.js b/yunshop-front-master/babel.config.js new file mode 100644 index 0000000..e439578 --- /dev/null +++ b/yunshop-front-master/babel.config.js @@ -0,0 +1,22 @@ +// 获取 VUE_APP_ENV 非 NODE_ENV,测试环境依然 console +const IS_PROD = ["production", "prod"].includes(process.env.VUE_APP_ENV); +const plugins = [ + [ + "import", + { + libraryName: "vant", + libraryDirectory: "es", + style: true + }, + "vant" + ] +]; +// 去除 console.log +if (IS_PROD) { + plugins.push("transform-remove-console"); +} + +module.exports = { + presets: [["@vue/cli-plugin-babel/preset", { useBuiltIns: "usage", corejs: 3 }]], + plugins +}; diff --git a/yunshop-front-master/jsconfig.json b/yunshop-front-master/jsconfig.json new file mode 100644 index 0000000..dbfa48c --- /dev/null +++ b/yunshop-front-master/jsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "./src/*" + ] +} \ No newline at end of file diff --git a/yunshop-front-master/mock.js b/yunshop-front-master/mock.js new file mode 100644 index 0000000..65a4285 --- /dev/null +++ b/yunshop-front-master/mock.js @@ -0,0 +1,8512 @@ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else if(typeof exports === 'object') + exports["Mock"] = factory(); + else + root["Mock"] = factory(); +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + /* global require, module, window */ + var Handler = __webpack_require__(1) + var Util = __webpack_require__(3) + var Random = __webpack_require__(5) + var RE = __webpack_require__(20) + var toJSONSchema = __webpack_require__(23) + var valid = __webpack_require__(25) + + var XHR + if (typeof window !== 'undefined') XHR = __webpack_require__(27) + + /*! + Mock - 模拟请求 & 模拟数据 + https://github.com/nuysoft/Mock + 墨智 mozhi.gyy@taobao.com nuysoft@gmail.com + */ + var Mock = { + Handler: Handler, + Random: Random, + Util: Util, + XHR: XHR, + RE: RE, + toJSONSchema: toJSONSchema, + valid: valid, + heredoc: Util.heredoc, + setup: function(settings) { + return XHR.setup(settings) + }, + _mocked: {} + } + + Mock.version = '1.0.1-beta2' + + // 避免循环依赖 + if (XHR) XHR.Mock = Mock + + /* + * Mock.mock( template ) + * Mock.mock( function() ) + * Mock.mock( rurl, template ) + * Mock.mock( rurl, function(options) ) + * Mock.mock( rurl, rtype, template ) + * Mock.mock( rurl, rtype, function(options) ) + + 根据数据模板生成模拟数据。 + */ + Mock.mock = function(rurl, rtype, template) { + // Mock.mock(template) + if (arguments.length === 1) { + return Handler.gen(rurl) + } + // Mock.mock(rurl, template) + if (arguments.length === 2) { + template = rtype + rtype = undefined + } + // 拦截 XHR + if (XHR) window.XMLHttpRequest = XHR + Mock._mocked[rurl + (rtype || '')] = { + rurl: rurl, + rtype: rtype, + template: template + } + return Mock + } + + module.exports = Mock + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Handler + + 处理数据模板。 + + * Handler.gen( template, name?, context? ) + + 入口方法。 + + * Data Template Definition, DTD + + 处理数据模板定义。 + + * Handler.array( options ) + * Handler.object( options ) + * Handler.number( options ) + * Handler.boolean( options ) + * Handler.string( options ) + * Handler.function( options ) + * Handler.regexp( options ) + + 处理路径(相对和绝对)。 + + * Handler.getValueByKeyPath( key, options ) + + * Data Placeholder Definition, DPD + + 处理数据占位符定义 + + * Handler.placeholder( placeholder, context, templateContext, options ) + + */ + + var Constant = __webpack_require__(2) + var Util = __webpack_require__(3) + var Parser = __webpack_require__(4) + var Random = __webpack_require__(5) + var RE = __webpack_require__(20) + + var Handler = { + extend: Util.extend + } + + /* + template 属性值(即数据模板) + name 属性名 + context 数据上下文,生成后的数据 + templateContext 模板上下文, + + Handle.gen(template, name, options) + context + currentContext, templateCurrentContext, + path, templatePath + root, templateRoot + */ + Handler.gen = function(template, name, context) { + /* jshint -W041 */ + name = name == undefined ? '' : (name + '') + + context = context || {} + context = { + // 当前访问路径,只有属性名,不包括生成规则 + path: context.path || [Constant.GUID], + templatePath: context.templatePath || [Constant.GUID++], + // 最终属性值的上下文 + currentContext: context.currentContext, + // 属性值模板的上下文 + templateCurrentContext: context.templateCurrentContext || template, + // 最终值的根 + root: context.root || context.currentContext, + // 模板的根 + templateRoot: context.templateRoot || context.templateCurrentContext || template + } + // console.log('path:', context.path.join('.'), template) + + var rule = Parser.parse(name) + var type = Util.type(template) + var data + + if (Handler[type]) { + data = Handler[type]({ + // 属性值类型 + type: type, + // 属性值模板 + template: template, + // 属性名 + 生成规则 + name: name, + // 属性名 + parsedName: name ? name.replace(Constant.RE_KEY, '$1') : name, + + // 解析后的生成规则 + rule: rule, + // 相关上下文 + context: context + }) + + if (!context.root) context.root = data + return data + } + + return template + } + + Handler.extend({ + array: function(options) { + var result = [], + i, ii; + + // 'name|1': [] + // 'name|count': [] + // 'name|min-max': [] + if (options.template.length === 0) return result + + // 'arr': [{ 'email': '@EMAIL' }, { 'email': '@EMAIL' }] + if (!options.rule.parameters) { + for (i = 0; i < options.template.length; i++) { + options.context.path.push(i) + options.context.templatePath.push(i) + result.push( + Handler.gen(options.template[i], i, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + }) + ) + options.context.path.pop() + options.context.templatePath.pop() + } + } else { + // 'method|1': ['GET', 'POST', 'HEAD', 'DELETE'] + if (options.rule.min === 1 && options.rule.max === undefined) { + // fix #17 + options.context.path.push(options.name) + options.context.templatePath.push(options.name) + result = Random.pick( + Handler.gen(options.template, undefined, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + }) + ) + options.context.path.pop() + options.context.templatePath.pop() + } else { + // 'data|+1': [{}, {}] + if (options.rule.parameters[2]) { + options.template.__order_index = options.template.__order_index || 0 + + options.context.path.push(options.name) + options.context.templatePath.push(options.name) + result = Handler.gen(options.template, undefined, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + })[ + options.template.__order_index % options.template.length + ] + + options.template.__order_index += +options.rule.parameters[2] + + options.context.path.pop() + options.context.templatePath.pop() + + } else { + // 'data|1-10': [{}] + for (i = 0; i < options.rule.count; i++) { + // 'data|1-10': [{}, {}] + for (ii = 0; ii < options.template.length; ii++) { + options.context.path.push(result.length) + options.context.templatePath.push(ii) + result.push( + Handler.gen(options.template[ii], result.length, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + }) + ) + options.context.path.pop() + options.context.templatePath.pop() + } + } + } + } + } + return result + }, + object: function(options) { + var result = {}, + keys, fnKeys, key, parsedKey, inc, i; + + // 'obj|min-max': {} + /* jshint -W041 */ + if (options.rule.min != undefined) { + keys = Util.keys(options.template) + keys = Random.shuffle(keys) + keys = keys.slice(0, options.rule.count) + for (i = 0; i < keys.length; i++) { + key = keys[i] + parsedKey = key.replace(Constant.RE_KEY, '$1') + options.context.path.push(parsedKey) + options.context.templatePath.push(key) + result[parsedKey] = Handler.gen(options.template[key], key, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + }) + options.context.path.pop() + options.context.templatePath.pop() + } + + } else { + // 'obj': {} + keys = [] + fnKeys = [] // #25 改变了非函数属性的顺序,查找起来不方便 + for (key in options.template) { + (typeof options.template[key] === 'function' ? fnKeys : keys).push(key) + } + keys = keys.concat(fnKeys) + + /* + 会改变非函数属性的顺序 + keys = Util.keys(options.template) + keys.sort(function(a, b) { + var afn = typeof options.template[a] === 'function' + var bfn = typeof options.template[b] === 'function' + if (afn === bfn) return 0 + if (afn && !bfn) return 1 + if (!afn && bfn) return -1 + }) + */ + + for (i = 0; i < keys.length; i++) { + key = keys[i] + parsedKey = key.replace(Constant.RE_KEY, '$1') + options.context.path.push(parsedKey) + options.context.templatePath.push(key) + result[parsedKey] = Handler.gen(options.template[key], key, { + path: options.context.path, + templatePath: options.context.templatePath, + currentContext: result, + templateCurrentContext: options.template, + root: options.context.root || result, + templateRoot: options.context.templateRoot || options.template + }) + options.context.path.pop() + options.context.templatePath.pop() + // 'id|+1': 1 + inc = key.match(Constant.RE_KEY) + if (inc && inc[2] && Util.type(options.template[key]) === 'number') { + options.template[key] += parseInt(inc[2], 10) + } + } + } + return result + }, + number: function(options) { + var result, parts; + if (options.rule.decimal) { // float + options.template += '' + parts = options.template.split('.') + // 'float1|.1-10': 10, + // 'float2|1-100.1-10': 1, + // 'float3|999.1-10': 1, + // 'float4|.3-10': 123.123, + parts[0] = options.rule.range ? options.rule.count : parts[0] + parts[1] = (parts[1] || '').slice(0, options.rule.dcount) + while (parts[1].length < options.rule.dcount) { + parts[1] += ( + // 最后一位不能为 0:如果最后一位为 0,会被 JS 引擎忽略掉。 + (parts[1].length < options.rule.dcount - 1) ? Random.character('number') : Random.character('123456789') + ) + } + result = parseFloat(parts.join('.'), 10) + } else { // integer + // 'grade1|1-100': 1, + result = options.rule.range && !options.rule.parameters[2] ? options.rule.count : options.template + } + return result + }, + boolean: function(options) { + var result; + // 'prop|multiple': false, 当前值是相反值的概率倍数 + // 'prop|probability-probability': false, 当前值与相反值的概率 + result = options.rule.parameters ? Random.bool(options.rule.min, options.rule.max, options.template) : options.template + return result + }, + string: function(options) { + var result = '', + i, placeholders, ph, phed; + if (options.template.length) { + + // 'foo': '★', + /* jshint -W041 */ + if (options.rule.count == undefined) { + result += options.template + } + + // 'star|1-5': '★', + for (i = 0; i < options.rule.count; i++) { + result += options.template + } + // 'email|1-10': '@EMAIL, ', + placeholders = result.match(Constant.RE_PLACEHOLDER) || [] // A-Z_0-9 > \w_ + for (i = 0; i < placeholders.length; i++) { + ph = placeholders[i] + + // 遇到转义斜杠,不需要解析占位符 + if (/^\\/.test(ph)) { + placeholders.splice(i--, 1) + continue + } + + phed = Handler.placeholder(ph, options.context.currentContext, options.context.templateCurrentContext, options) + + // 只有一个占位符,并且没有其他字符 + if (placeholders.length === 1 && ph === result && typeof phed !== typeof result) { // + result = phed + break + + if (Util.isNumeric(phed)) { + result = parseFloat(phed, 10) + break + } + if (/^(true|false)$/.test(phed)) { + result = phed === 'true' ? true : + phed === 'false' ? false : + phed // 已经是布尔值 + break + } + } + result = result.replace(ph, phed) + } + + } else { + // 'ASCII|1-10': '', + // 'ASCII': '', + result = options.rule.range ? Random.string(options.rule.count) : options.template + } + return result + }, + 'function': function(options) { + // ( context, options ) + return options.template.call(options.context.currentContext, options) + }, + 'regexp': function(options) { + var source = '' + + // 'name': /regexp/, + /* jshint -W041 */ + if (options.rule.count == undefined) { + source += options.template.source // regexp.source + } + + // 'name|1-5': /regexp/, + for (var i = 0; i < options.rule.count; i++) { + source += options.template.source + } + + return RE.Handler.gen( + RE.Parser.parse( + source + ) + ) + } + }) + + Handler.extend({ + _all: function() { + var re = {}; + for (var key in Random) re[key.toLowerCase()] = key + return re + }, + // 处理占位符,转换为最终值 + placeholder: function(placeholder, obj, templateContext, options) { + // console.log(options.context.path) + // 1 key, 2 params + Constant.RE_PLACEHOLDER.exec('') + var parts = Constant.RE_PLACEHOLDER.exec(placeholder), + key = parts && parts[1], + lkey = key && key.toLowerCase(), + okey = this._all()[lkey], + params = parts && parts[2] || '' + var pathParts = this.splitPathToArray(key) + + // 解析占位符的参数 + try { + // 1. 尝试保持参数的类型 + /* + #24 [Window Firefox 30.0 引用 占位符 抛错](https://github.com/nuysoft/Mock/issues/24) + [BX9056: 各浏览器下 window.eval 方法的执行上下文存在差异](http://www.w3help.org/zh-cn/causes/BX9056) + 应该属于 Window Firefox 30.0 的 BUG + */ + /* jshint -W061 */ + params = eval('(function(){ return [].splice.call(arguments, 0 ) })(' + params + ')') + } catch (error) { + // 2. 如果失败,只能解析为字符串 + // console.error(error) + // if (error instanceof ReferenceError) params = parts[2].split(/,\s*/); + // else throw error + params = parts[2].split(/,\s*/) + } + + // 占位符优先引用数据模板中的属性 + if (obj && (key in obj)) return obj[key] + + // @index @key + // if (Constant.RE_INDEX.test(key)) return +options.name + // if (Constant.RE_KEY.test(key)) return options.name + + // 绝对路径 or 相对路径 + if ( + key.charAt(0) === '/' || + pathParts.length > 1 + ) return this.getValueByKeyPath(key, options) + + // 递归引用数据模板中的属性 + if (templateContext && + (typeof templateContext === 'object') && + (key in templateContext) && + (placeholder !== templateContext[key]) // fix #15 避免自己依赖自己 + ) { + // 先计算被引用的属性值 + templateContext[key] = Handler.gen(templateContext[key], key, { + currentContext: obj, + templateCurrentContext: templateContext + }) + return templateContext[key] + } + + // 如果未找到,则原样返回 + if (!(key in Random) && !(lkey in Random) && !(okey in Random)) return placeholder + + // 递归解析参数中的占位符 + for (var i = 0; i < params.length; i++) { + Constant.RE_PLACEHOLDER.exec('') + if (Constant.RE_PLACEHOLDER.test(params[i])) { + params[i] = Handler.placeholder(params[i], obj, templateContext, options) + } + } + + var handle = Random[key] || Random[lkey] || Random[okey] + switch (Util.type(handle)) { + case 'array': + // 自动从数组中取一个,例如 @areas + return Random.pick(handle) + case 'function': + // 执行占位符方法(大多数情况) + handle.options = options + var re = handle.apply(Random, params) + if (re === undefined) re = '' // 因为是在字符串中,所以默认为空字符串。 + delete handle.options + return re + } + }, + getValueByKeyPath: function(key, options) { + var originalKey = key + var keyPathParts = this.splitPathToArray(key) + var absolutePathParts = [] + + // 绝对路径 + if (key.charAt(0) === '/') { + absolutePathParts = [options.context.path[0]].concat( + this.normalizePath(keyPathParts) + ) + } else { + // 相对路径 + if (keyPathParts.length > 1) { + absolutePathParts = options.context.path.slice(0) + absolutePathParts.pop() + absolutePathParts = this.normalizePath( + absolutePathParts.concat(keyPathParts) + ) + + } + } + + key = keyPathParts[keyPathParts.length - 1] + var currentContext = options.context.root + var templateCurrentContext = options.context.templateRoot + for (var i = 1; i < absolutePathParts.length - 1; i++) { + currentContext = currentContext[absolutePathParts[i]] + templateCurrentContext = templateCurrentContext[absolutePathParts[i]] + } + // 引用的值已经计算好 + if (currentContext && (key in currentContext)) return currentContext[key] + + // 尚未计算,递归引用数据模板中的属性 + if (templateCurrentContext && + (typeof templateCurrentContext === 'object') && + (key in templateCurrentContext) && + (originalKey !== templateCurrentContext[key]) // fix #15 避免自己依赖自己 + ) { + // 先计算被引用的属性值 + templateCurrentContext[key] = Handler.gen(templateCurrentContext[key], key, { + currentContext: currentContext, + templateCurrentContext: templateCurrentContext + }) + return templateCurrentContext[key] + } + }, + // https://github.com/kissyteam/kissy/blob/master/src/path/src/path.js + normalizePath: function(pathParts) { + var newPathParts = [] + for (var i = 0; i < pathParts.length; i++) { + switch (pathParts[i]) { + case '..': + newPathParts.pop() + break + case '.': + break + default: + newPathParts.push(pathParts[i]) + } + } + return newPathParts + }, + splitPathToArray: function(path) { + var parts = path.split(/\/+/); + if (!parts[parts.length - 1]) parts = parts.slice(0, -1) + if (!parts[0]) parts = parts.slice(1) + return parts; + } + }) + + module.exports = Handler + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + /* + ## Constant + + 常量集合。 + */ + /* + RE_KEY + 'name|min-max': value + 'name|count': value + 'name|min-max.dmin-dmax': value + 'name|min-max.dcount': value + 'name|count.dmin-dmax': value + 'name|count.dcount': value + 'name|+step': value + + 1 name, 2 step, 3 range [ min, max ], 4 drange [ dmin, dmax ] + + RE_PLACEHOLDER + placeholder(*) + + [正则查看工具](http://www.regexper.com/) + + #26 生成规则 支持 负数,例如 number|-100-100 + */ + module.exports = { + GUID: 1, + RE_KEY: /(.+)\|(?:\+(\d+)|([\+\-]?\d+-?[\+\-]?\d*)?(?:\.(\d+-?\d*))?)/, + RE_RANGE: /([\+\-]?\d+)-?([\+\-]?\d+)?/, + RE_PLACEHOLDER: /\\*@([^@#%&()\?\s]+)(?:\((.*?)\))?/g + // /\\*@([^@#%&()\?\s\/\.]+)(?:\((.*?)\))?/g + // RE_INDEX: /^index$/, + // RE_KEY: /^key$/ + } + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + /* + ## Utilities + */ + var Util = {} + + Util.extend = function extend() { + var target = arguments[0] || {}, + i = 1, + length = arguments.length, + options, name, src, copy, clone + + if (length === 1) { + target = this + i = 0 + } + + for (; i < length; i++) { + options = arguments[i] + if (!options) continue + + for (name in options) { + src = target[name] + copy = options[name] + + if (target === copy) continue + if (copy === undefined) continue + + if (Util.isArray(copy) || Util.isObject(copy)) { + if (Util.isArray(copy)) clone = src && Util.isArray(src) ? src : [] + if (Util.isObject(copy)) clone = src && Util.isObject(src) ? src : {} + + target[name] = Util.extend(clone, copy) + } else { + target[name] = copy + } + } + } + + return target + } + + Util.each = function each(obj, iterator, context) { + var i, key + if (this.type(obj) === 'number') { + for (i = 0; i < obj; i++) { + iterator(i, i) + } + } else if (obj.length === +obj.length) { + for (i = 0; i < obj.length; i++) { + if (iterator.call(context, obj[i], i, obj) === false) break + } + } else { + for (key in obj) { + if (iterator.call(context, obj[key], key, obj) === false) break + } + } + } + + Util.type = function type(obj) { + return (obj === null || obj === undefined) ? String(obj) : Object.prototype.toString.call(obj).match(/\[object (\w+)\]/)[1].toLowerCase() + } + + Util.each('String Object Array RegExp Function'.split(' '), function(value) { + Util['is' + value] = function(obj) { + return Util.type(obj) === value.toLowerCase() + } + }) + + Util.isObjectOrArray = function(value) { + return Util.isObject(value) || Util.isArray(value) + } + + Util.isNumeric = function(value) { + return !isNaN(parseFloat(value)) && isFinite(value) + } + + Util.keys = function(obj) { + var keys = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) keys.push(key) + } + return keys; + } + Util.values = function(obj) { + var values = []; + for (var key in obj) { + if (obj.hasOwnProperty(key)) values.push(obj[key]) + } + return values; + } + + /* + ### Mock.heredoc(fn) + + * Mock.heredoc(fn) + + 以直观、安全的方式书写(多行)HTML 模板。 + + **使用示例**如下所示: + + var tpl = Mock.heredoc(function() { + /*! + {{email}}{{age}} + + *\/ + }) + + **相关阅读** + * [Creating multiline strings in JavaScript](http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript)、 + */ + Util.heredoc = function heredoc(fn) { + // 1. 移除起始的 function(){ /*! + // 2. 移除末尾的 */ } + // 3. 移除起始和末尾的空格 + return fn.toString() + .replace(/^[^\/]+\/\*!?/, '') + .replace(/\*\/[^\/]+$/, '') + .replace(/^[\s\xA0]+/, '').replace(/[\s\xA0]+$/, '') // .trim() + } + + Util.noop = function() {} + + module.exports = Util + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Parser + + 解析数据模板(属性名部分)。 + + * Parser.parse( name ) + + ```json + { + parameters: [ name, inc, range, decimal ], + rnage: [ min , max ], + + min: min, + max: max, + count : count, + + decimal: decimal, + dmin: dmin, + dmax: dmax, + dcount: dcount + } + ``` + */ + + var Constant = __webpack_require__(2) + var Random = __webpack_require__(5) + + /* jshint -W041 */ + module.exports = { + parse: function(name) { + name = name == undefined ? '' : (name + '') + + var parameters = (name || '').match(Constant.RE_KEY) + + var range = parameters && parameters[3] && parameters[3].match(Constant.RE_RANGE) + var min = range && range[1] && parseInt(range[1], 10) // || 1 + var max = range && range[2] && parseInt(range[2], 10) // || 1 + // repeat || min-max || 1 + // var count = range ? !range[2] && parseInt(range[1], 10) || Random.integer(min, max) : 1 + var count = range ? !range[2] ? parseInt(range[1], 10) : Random.integer(min, max) : undefined + + var decimal = parameters && parameters[4] && parameters[4].match(Constant.RE_RANGE) + var dmin = decimal && parseInt(decimal[1], 10) // || 0, + var dmax = decimal && parseInt(decimal[2], 10) // || 0, + // int || dmin-dmax || 0 + var dcount = decimal ? !decimal[2] && parseInt(decimal[1], 10) || Random.integer(dmin, dmax) : undefined + + var result = { + // 1 name, 2 inc, 3 range, 4 decimal + parameters: parameters, + // 1 min, 2 max + range: range, + min: min, + max: max, + // min-max + count: count, + // 是否有 decimal + decimal: decimal, + dmin: dmin, + dmax: dmax, + // dmin-dimax + dcount: dcount + } + + for (var r in result) { + if (result[r] != undefined) return result + } + + return {} + } + } + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Mock.Random + + 工具类,用于生成各种随机数据。 + */ + + var Util = __webpack_require__(3) + + var Random = { + extend: Util.extend + } + + Random.extend(__webpack_require__(6)) + Random.extend(__webpack_require__(7)) + Random.extend(__webpack_require__(8)) + Random.extend(__webpack_require__(10)) + Random.extend(__webpack_require__(13)) + Random.extend(__webpack_require__(15)) + Random.extend(__webpack_require__(16)) + Random.extend(__webpack_require__(17)) + Random.extend(__webpack_require__(14)) + Random.extend(__webpack_require__(19)) + + module.exports = Random + +/***/ }, +/* 6 */ +/***/ function(module, exports) { + + /* + ## Basics + */ + module.exports = { + // 返回一个随机的布尔值。 + boolean: function(min, max, cur) { + if (cur !== undefined) { + min = typeof min !== 'undefined' && !isNaN(min) ? parseInt(min, 10) : 1 + max = typeof max !== 'undefined' && !isNaN(max) ? parseInt(max, 10) : 1 + return Math.random() > 1.0 / (min + max) * min ? !cur : cur + } + + return Math.random() >= 0.5 + }, + bool: function(min, max, cur) { + return this.boolean(min, max, cur) + }, + // 返回一个随机的自然数(大于等于 0 的整数)。 + natural: function(min, max) { + min = typeof min !== 'undefined' ? parseInt(min, 10) : 0 + max = typeof max !== 'undefined' ? parseInt(max, 10) : 9007199254740992 // 2^53 + return Math.round(Math.random() * (max - min)) + min + }, + // 返回一个随机的整数。 + integer: function(min, max) { + min = typeof min !== 'undefined' ? parseInt(min, 10) : -9007199254740992 + max = typeof max !== 'undefined' ? parseInt(max, 10) : 9007199254740992 // 2^53 + return Math.round(Math.random() * (max - min)) + min + }, + int: function(min, max) { + return this.integer(min, max) + }, + // 返回一个随机的浮点数。 + float: function(min, max, dmin, dmax) { + dmin = dmin === undefined ? 0 : dmin + dmin = Math.max(Math.min(dmin, 17), 0) + dmax = dmax === undefined ? 17 : dmax + dmax = Math.max(Math.min(dmax, 17), 0) + var ret = this.integer(min, max) + '.'; + for (var i = 0, dcount = this.natural(dmin, dmax); i < dcount; i++) { + ret += ( + // 最后一位不能为 0:如果最后一位为 0,会被 JS 引擎忽略掉。 + (i < dcount - 1) ? this.character('number') : this.character('123456789') + ) + } + return parseFloat(ret, 10) + }, + // 返回一个随机字符。 + character: function(pool) { + var pools = { + lower: 'abcdefghijklmnopqrstuvwxyz', + upper: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', + number: '0123456789', + symbol: '!@#$%^&*()[]' + } + pools.alpha = pools.lower + pools.upper + pools['undefined'] = pools.lower + pools.upper + pools.number + pools.symbol + + pool = pools[('' + pool).toLowerCase()] || pool + return pool.charAt(this.natural(0, pool.length - 1)) + }, + char: function(pool) { + return this.character(pool) + }, + // 返回一个随机字符串。 + string: function(pool, min, max) { + var len + switch (arguments.length) { + case 0: // () + len = this.natural(3, 7) + break + case 1: // ( length ) + len = pool + pool = undefined + break + case 2: + // ( pool, length ) + if (typeof arguments[0] === 'string') { + len = min + } else { + // ( min, max ) + len = this.natural(pool, min) + pool = undefined + } + break + case 3: + len = this.natural(min, max) + break + } + + var text = '' + for (var i = 0; i < len; i++) { + text += this.character(pool) + } + + return text + }, + str: function( /*pool, min, max*/ ) { + return this.string.apply(this, arguments) + }, + // 返回一个整型数组。 + range: function(start, stop, step) { + // range( stop ) + if (arguments.length <= 1) { + stop = start || 0; + start = 0; + } + // range( start, stop ) + step = arguments[2] || 1; + + start = +start + stop = +stop + step = +step + + var len = Math.max(Math.ceil((stop - start) / step), 0); + var idx = 0; + var range = new Array(len); + + while (idx < len) { + range[idx++] = start; + start += step; + } + + return range; + } + } + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + /* + ## Date + */ + var patternLetters = { + yyyy: 'getFullYear', + yy: function(date) { + return ('' + date.getFullYear()).slice(2) + }, + y: 'yy', + + MM: function(date) { + var m = date.getMonth() + 1 + return m < 10 ? '0' + m : m + }, + M: function(date) { + return date.getMonth() + 1 + }, + + dd: function(date) { + var d = date.getDate() + return d < 10 ? '0' + d : d + }, + d: 'getDate', + + HH: function(date) { + var h = date.getHours() + return h < 10 ? '0' + h : h + }, + H: 'getHours', + hh: function(date) { + var h = date.getHours() % 12 + return h < 10 ? '0' + h : h + }, + h: function(date) { + return date.getHours() % 12 + }, + + mm: function(date) { + var m = date.getMinutes() + return m < 10 ? '0' + m : m + }, + m: 'getMinutes', + + ss: function(date) { + var s = date.getSeconds() + return s < 10 ? '0' + s : s + }, + s: 'getSeconds', + + SS: function(date) { + var ms = date.getMilliseconds() + return ms < 10 && '00' + ms || ms < 100 && '0' + ms || ms + }, + S: 'getMilliseconds', + + A: function(date) { + return date.getHours() < 12 ? 'AM' : 'PM' + }, + a: function(date) { + return date.getHours() < 12 ? 'am' : 'pm' + }, + T: 'getTime' + } + module.exports = { + // 日期占位符集合。 + _patternLetters: patternLetters, + // 日期占位符正则。 + _rformat: new RegExp((function() { + var re = [] + for (var i in patternLetters) re.push(i) + return '(' + re.join('|') + ')' + })(), 'g'), + // 格式化日期。 + _formatDate: function(date, format) { + return format.replace(this._rformat, function creatNewSubString($0, flag) { + return typeof patternLetters[flag] === 'function' ? patternLetters[flag](date) : + patternLetters[flag] in patternLetters ? creatNewSubString($0, patternLetters[flag]) : + date[patternLetters[flag]]() + }) + }, + // 生成一个随机的 Date 对象。 + _randomDate: function(min, max) { // min, max + min = min === undefined ? new Date(0) : min + max = max === undefined ? new Date() : max + return new Date(Math.random() * (max.getTime() - min.getTime())) + }, + // 返回一个随机的日期字符串。 + date: function(format) { + format = format || 'yyyy-MM-dd' + return this._formatDate(this._randomDate(), format) + }, + // 返回一个随机的时间字符串。 + time: function(format) { + format = format || 'HH:mm:ss' + return this._formatDate(this._randomDate(), format) + }, + // 返回一个随机的日期和时间字符串。 + datetime: function(format) { + format = format || 'yyyy-MM-dd HH:mm:ss' + return this._formatDate(this._randomDate(), format) + }, + // 返回当前的日期和时间字符串。 + now: function(unit, format) { + // now(unit) now(format) + if (arguments.length === 1) { + // now(format) + if (!/year|month|day|hour|minute|second|week/.test(unit)) { + format = unit + unit = '' + } + } + unit = (unit || '').toLowerCase() + format = format || 'yyyy-MM-dd HH:mm:ss' + + var date = new Date() + + /* jshint -W086 */ + // 参考自 http://momentjs.cn/docs/#/manipulating/start-of/ + switch (unit) { + case 'year': + date.setMonth(0) + case 'month': + date.setDate(1) + case 'week': + case 'day': + date.setHours(0) + case 'hour': + date.setMinutes(0) + case 'minute': + date.setSeconds(0) + case 'second': + date.setMilliseconds(0) + } + switch (unit) { + case 'week': + date.setDate(date.getDate() - date.getDay()) + } + + return this._formatDate(date, format) + } + } + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(module) {/* global document */ + /* + ## Image + */ + module.exports = { + // 常见的广告宽高 + _adSize: [ + '300x250', '250x250', '240x400', '336x280', '180x150', + '720x300', '468x60', '234x60', '88x31', '120x90', + '120x60', '120x240', '125x125', '728x90', '160x600', + '120x600', '300x600' + ], + // 常见的屏幕宽高 + _screenSize: [ + '320x200', '320x240', '640x480', '800x480', '800x480', + '1024x600', '1024x768', '1280x800', '1440x900', '1920x1200', + '2560x1600' + ], + // 常见的视频宽高 + _videoSize: ['720x480', '768x576', '1280x720', '1920x1080'], + /* + 生成一个随机的图片地址。 + + 替代图片源 + http://fpoimg.com/ + 参考自 + http://rensanning.iteye.com/blog/1933310 + http://code.tutsplus.com/articles/the-top-8-placeholders-for-web-designers--net-19485 + */ + image: function(size, background, foreground, format, text) { + // Random.image( size, background, foreground, text ) + if (arguments.length === 4) { + text = format + format = undefined + } + // Random.image( size, background, text ) + if (arguments.length === 3) { + text = foreground + foreground = undefined + } + // Random.image() + if (!size) size = this.pick(this._adSize) + + if (background && ~background.indexOf('#')) background = background.slice(1) + if (foreground && ~foreground.indexOf('#')) foreground = foreground.slice(1) + + // http://dummyimage.com/600x400/cc00cc/470047.png&text=hello + return 'http://dummyimage.com/' + size + + (background ? '/' + background : '') + + (foreground ? '/' + foreground : '') + + (format ? '.' + format : '') + + (text ? '&text=' + text : '') + }, + img: function() { + return this.image.apply(this, arguments) + }, + + /* + BrandColors + http://brandcolors.net/ + A collection of major brand color codes curated by Galen Gidman. + 大牌公司的颜色集合 + + // 获取品牌和颜色 + $('h2').each(function(index, item){ + item = $(item) + console.log('\'' + item.text() + '\'', ':', '\'' + item.next().text() + '\'', ',') + }) + */ + _brandColors: { + '4ormat': '#fb0a2a', + '500px': '#02adea', + 'About.me (blue)': '#00405d', + 'About.me (yellow)': '#ffcc33', + 'Addvocate': '#ff6138', + 'Adobe': '#ff0000', + 'Aim': '#fcd20b', + 'Amazon': '#e47911', + 'Android': '#a4c639', + 'Angie\'s List': '#7fbb00', + 'AOL': '#0060a3', + 'Atlassian': '#003366', + 'Behance': '#053eff', + 'Big Cartel': '#97b538', + 'bitly': '#ee6123', + 'Blogger': '#fc4f08', + 'Boeing': '#0039a6', + 'Booking.com': '#003580', + 'Carbonmade': '#613854', + 'Cheddar': '#ff7243', + 'Code School': '#3d4944', + 'Delicious': '#205cc0', + 'Dell': '#3287c1', + 'Designmoo': '#e54a4f', + 'Deviantart': '#4e6252', + 'Designer News': '#2d72da', + 'Devour': '#fd0001', + 'DEWALT': '#febd17', + 'Disqus (blue)': '#59a3fc', + 'Disqus (orange)': '#db7132', + 'Dribbble': '#ea4c89', + 'Dropbox': '#3d9ae8', + 'Drupal': '#0c76ab', + 'Dunked': '#2a323a', + 'eBay': '#89c507', + 'Ember': '#f05e1b', + 'Engadget': '#00bdf6', + 'Envato': '#528036', + 'Etsy': '#eb6d20', + 'Evernote': '#5ba525', + 'Fab.com': '#dd0017', + 'Facebook': '#3b5998', + 'Firefox': '#e66000', + 'Flickr (blue)': '#0063dc', + 'Flickr (pink)': '#ff0084', + 'Forrst': '#5b9a68', + 'Foursquare': '#25a0ca', + 'Garmin': '#007cc3', + 'GetGlue': '#2d75a2', + 'Gimmebar': '#f70078', + 'GitHub': '#171515', + 'Google Blue': '#0140ca', + 'Google Green': '#16a61e', + 'Google Red': '#dd1812', + 'Google Yellow': '#fcca03', + 'Google+': '#dd4b39', + 'Grooveshark': '#f77f00', + 'Groupon': '#82b548', + 'Hacker News': '#ff6600', + 'HelloWallet': '#0085ca', + 'Heroku (light)': '#c7c5e6', + 'Heroku (dark)': '#6567a5', + 'HootSuite': '#003366', + 'Houzz': '#73ba37', + 'HTML5': '#ec6231', + 'IKEA': '#ffcc33', + 'IMDb': '#f3ce13', + 'Instagram': '#3f729b', + 'Intel': '#0071c5', + 'Intuit': '#365ebf', + 'Kickstarter': '#76cc1e', + 'kippt': '#e03500', + 'Kodery': '#00af81', + 'LastFM': '#c3000d', + 'LinkedIn': '#0e76a8', + 'Livestream': '#cf0005', + 'Lumo': '#576396', + 'Mixpanel': '#a086d3', + 'Meetup': '#e51937', + 'Nokia': '#183693', + 'NVIDIA': '#76b900', + 'Opera': '#cc0f16', + 'Path': '#e41f11', + 'PayPal (dark)': '#1e477a', + 'PayPal (light)': '#3b7bbf', + 'Pinboard': '#0000e6', + 'Pinterest': '#c8232c', + 'PlayStation': '#665cbe', + 'Pocket': '#ee4056', + 'Prezi': '#318bff', + 'Pusha': '#0f71b4', + 'Quora': '#a82400', + 'QUOTE.fm': '#66ceff', + 'Rdio': '#008fd5', + 'Readability': '#9c0000', + 'Red Hat': '#cc0000', + 'Resource': '#7eb400', + 'Rockpack': '#0ba6ab', + 'Roon': '#62b0d9', + 'RSS': '#ee802f', + 'Salesforce': '#1798c1', + 'Samsung': '#0c4da2', + 'Shopify': '#96bf48', + 'Skype': '#00aff0', + 'Snagajob': '#f47a20', + 'Softonic': '#008ace', + 'SoundCloud': '#ff7700', + 'Space Box': '#f86960', + 'Spotify': '#81b71a', + 'Sprint': '#fee100', + 'Squarespace': '#121212', + 'StackOverflow': '#ef8236', + 'Staples': '#cc0000', + 'Status Chart': '#d7584f', + 'Stripe': '#008cdd', + 'StudyBlue': '#00afe1', + 'StumbleUpon': '#f74425', + 'T-Mobile': '#ea0a8e', + 'Technorati': '#40a800', + 'The Next Web': '#ef4423', + 'Treehouse': '#5cb868', + 'Trulia': '#5eab1f', + 'Tumblr': '#34526f', + 'Twitch.tv': '#6441a5', + 'Twitter': '#00acee', + 'TYPO3': '#ff8700', + 'Ubuntu': '#dd4814', + 'Ustream': '#3388ff', + 'Verizon': '#ef1d1d', + 'Vimeo': '#86c9ef', + 'Vine': '#00a478', + 'Virb': '#06afd8', + 'Virgin Media': '#cc0000', + 'Wooga': '#5b009c', + 'WordPress (blue)': '#21759b', + 'WordPress (orange)': '#d54e21', + 'WordPress (grey)': '#464646', + 'Wunderlist': '#2b88d9', + 'XBOX': '#9bc848', + 'XING': '#126567', + 'Yahoo!': '#720e9e', + 'Yandex': '#ffcc00', + 'Yelp': '#c41200', + 'YouTube': '#c4302b', + 'Zalongo': '#5498dc', + 'Zendesk': '#78a300', + 'Zerply': '#9dcc7a', + 'Zootool': '#5e8b1d' + }, + _brandNames: function() { + var brands = []; + for (var b in this._brandColors) { + brands.push(b) + } + return brands + }, + /* + 生成一段随机的 Base64 图片编码。 + + https://github.com/imsky/holder + Holder renders image placeholders entirely on the client side. + + dataImageHolder: function(size) { + return 'holder.js/' + size + }, + */ + dataImage: function(size, text) { + var canvas + if (typeof document !== 'undefined') { + canvas = document.createElement('canvas') + } else { + /* + https://github.com/Automattic/node-canvas + npm install canvas --save + 安装问题: + * http://stackoverflow.com/questions/22953206/gulp-issues-with-cario-install-command-not-found-when-trying-to-installing-canva + * https://github.com/Automattic/node-canvas/issues/415 + * https://github.com/Automattic/node-canvas/wiki/_pages + + PS:node-canvas 的安装过程实在是太繁琐了,所以不放入 package.json 的 dependencies。 + */ + var Canvas = module.require('canvas') + canvas = new Canvas() + } + + var ctx = canvas && canvas.getContext && canvas.getContext("2d") + if (!canvas || !ctx) return '' + + if (!size) size = this.pick(this._adSize) + text = text !== undefined ? text : size + + size = size.split('x') + + var width = parseInt(size[0], 10), + height = parseInt(size[1], 10), + background = this._brandColors[this.pick(this._brandNames())], + foreground = '#FFF', + text_height = 14, + font = 'sans-serif'; + + canvas.width = width + canvas.height = height + ctx.textAlign = 'center' + ctx.textBaseline = 'middle' + ctx.fillStyle = background + ctx.fillRect(0, 0, width, height) + ctx.fillStyle = foreground + ctx.font = 'bold ' + text_height + 'px ' + font + ctx.fillText(text, (width / 2), (height / 2), width) + return canvas.toDataURL('image/png') + } + } + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)(module))) + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + module.exports = function(module) { + if(!module.webpackPolyfill) { + module.deprecate = function() {}; + module.paths = []; + // module.parent = undefined by default + module.children = []; + module.webpackPolyfill = 1; + } + return module; + } + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Color + + http://llllll.li/randomColor/ + A color generator for JavaScript. + randomColor generates attractive colors by default. More specifically, randomColor produces bright colors with a reasonably high saturation. This makes randomColor particularly useful for data visualizations and generative art. + + http://randomcolour.com/ + var bg_colour = Math.floor(Math.random() * 16777215).toString(16); + bg_colour = "#" + ("000000" + bg_colour).slice(-6); + document.bgColor = bg_colour; + + http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ + Creating random colors is actually more difficult than it seems. The randomness itself is easy, but aesthetically pleasing randomness is more difficult. + https://github.com/devongovett/color-generator + + http://www.paulirish.com/2009/random-hex-color-code-snippets/ + Random Hex Color Code Generator in JavaScript + + http://chancejs.com/#color + chance.color() + // => '#79c157' + chance.color({format: 'hex'}) + // => '#d67118' + chance.color({format: 'shorthex'}) + // => '#60f' + chance.color({format: 'rgb'}) + // => 'rgb(110,52,164)' + + http://tool.c7sky.com/webcolor + 网页设计常用色彩搭配表 + + https://github.com/One-com/one-color + An OO-based JavaScript color parser/computation toolkit with support for RGB, HSV, HSL, CMYK, and alpha channels. + API 很赞 + + https://github.com/harthur/color + JavaScript color conversion and manipulation library + + https://github.com/leaverou/css-colors + Share & convert CSS colors + http://leaverou.github.io/css-colors/#slategray + Type a CSS color keyword, #hex, hsl(), rgba(), whatever: + + 色调 hue + http://baike.baidu.com/view/23368.htm + 色调指的是一幅画中画面色彩的总体倾向,是大的色彩效果。 + 饱和度 saturation + http://baike.baidu.com/view/189644.htm + 饱和度是指色彩的鲜艳程度,也称色彩的纯度。饱和度取决于该色中含色成分和消色成分(灰色)的比例。含色成分越大,饱和度越大;消色成分越大,饱和度越小。 + 亮度 brightness + http://baike.baidu.com/view/34773.htm + 亮度是指发光体(反光体)表面发光(反光)强弱的物理量。 + 照度 luminosity + 物体被照亮的程度,采用单位面积所接受的光通量来表示,表示单位为勒[克斯](Lux,lx) ,即 1m / m2 。 + + http://stackoverflow.com/questions/1484506/random-color-generator-in-javascript + var letters = '0123456789ABCDEF'.split('') + var color = '#' + for (var i = 0; i < 6; i++) { + color += letters[Math.floor(Math.random() * 16)] + } + return color + + // 随机生成一个无脑的颜色,格式为 '#RRGGBB'。 + // _brainlessColor() + var color = Math.floor( + Math.random() * + (16 * 16 * 16 * 16 * 16 * 16 - 1) + ).toString(16) + color = "#" + ("000000" + color).slice(-6) + return color.toUpperCase() + */ + + var Convert = __webpack_require__(11) + var DICT = __webpack_require__(12) + + module.exports = { + // 随机生成一个有吸引力的颜色,格式为 '#RRGGBB'。 + color: function(name) { + if (name || DICT[name]) return DICT[name].nicer + return this.hex() + }, + // #DAC0DE + hex: function() { + var hsv = this._goldenRatioColor() + var rgb = Convert.hsv2rgb(hsv) + var hex = Convert.rgb2hex(rgb[0], rgb[1], rgb[2]) + return hex + }, + // rgb(128,255,255) + rgb: function() { + var hsv = this._goldenRatioColor() + var rgb = Convert.hsv2rgb(hsv) + return 'rgb(' + + parseInt(rgb[0], 10) + ', ' + + parseInt(rgb[1], 10) + ', ' + + parseInt(rgb[2], 10) + ')' + }, + // rgba(128,255,255,0.3) + rgba: function() { + var hsv = this._goldenRatioColor() + var rgb = Convert.hsv2rgb(hsv) + return 'rgba(' + + parseInt(rgb[0], 10) + ', ' + + parseInt(rgb[1], 10) + ', ' + + parseInt(rgb[2], 10) + ', ' + + Math.random().toFixed(2) + ')' + }, + // hsl(300,80%,90%) + hsl: function() { + var hsv = this._goldenRatioColor() + var hsl = Convert.hsv2hsl(hsv) + return 'hsl(' + + parseInt(hsl[0], 10) + ', ' + + parseInt(hsl[1], 10) + ', ' + + parseInt(hsl[2], 10) + ')' + }, + // http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/ + // https://github.com/devongovett/color-generator/blob/master/index.js + // 随机生成一个有吸引力的颜色。 + _goldenRatioColor: function(saturation, value) { + this._goldenRatio = 0.618033988749895 + this._hue = this._hue || Math.random() + this._hue += this._goldenRatio + this._hue %= 1 + + if (typeof saturation !== "number") saturation = 0.5; + if (typeof value !== "number") value = 0.95; + + return [ + this._hue * 360, + saturation * 100, + value * 100 + ] + } + } + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + /* + ## Color Convert + + http://blog.csdn.net/idfaya/article/details/6770414 + 颜色空间RGB与HSV(HSL)的转换 + */ + // https://github.com/harthur/color-convert/blob/master/conversions.js + module.exports = { + rgb2hsl: function rgb2hsl(rgb) { + var r = rgb[0] / 255, + g = rgb[1] / 255, + b = rgb[2] / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + delta = max - min, + h, s, l; + + if (max == min) + h = 0; + else if (r == max) + h = (g - b) / delta; + else if (g == max) + h = 2 + (b - r) / delta; + else if (b == max) + h = 4 + (r - g) / delta; + + h = Math.min(h * 60, 360); + + if (h < 0) + h += 360; + + l = (min + max) / 2; + + if (max == min) + s = 0; + else if (l <= 0.5) + s = delta / (max + min); + else + s = delta / (2 - max - min); + + return [h, s * 100, l * 100]; + }, + rgb2hsv: function rgb2hsv(rgb) { + var r = rgb[0], + g = rgb[1], + b = rgb[2], + min = Math.min(r, g, b), + max = Math.max(r, g, b), + delta = max - min, + h, s, v; + + if (max === 0) + s = 0; + else + s = (delta / max * 1000) / 10; + + if (max == min) + h = 0; + else if (r == max) + h = (g - b) / delta; + else if (g == max) + h = 2 + (b - r) / delta; + else if (b == max) + h = 4 + (r - g) / delta; + + h = Math.min(h * 60, 360); + + if (h < 0) + h += 360; + + v = ((max / 255) * 1000) / 10; + + return [h, s, v]; + }, + hsl2rgb: function hsl2rgb(hsl) { + var h = hsl[0] / 360, + s = hsl[1] / 100, + l = hsl[2] / 100, + t1, t2, t3, rgb, val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) + t2 = l * (1 + s); + else + t2 = l + s - l * s; + t1 = 2 * l - t2; + + rgb = [0, 0, 0]; + for (var i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) t3++; + if (t3 > 1) t3--; + + if (6 * t3 < 1) + val = t1 + (t2 - t1) * 6 * t3; + else if (2 * t3 < 1) + val = t2; + else if (3 * t3 < 2) + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + else + val = t1; + + rgb[i] = val * 255; + } + + return rgb; + }, + hsl2hsv: function hsl2hsv(hsl) { + var h = hsl[0], + s = hsl[1] / 100, + l = hsl[2] / 100, + sv, v; + l *= 2; + s *= (l <= 1) ? l : 2 - l; + v = (l + s) / 2; + sv = (2 * s) / (l + s); + return [h, sv * 100, v * 100]; + }, + hsv2rgb: function hsv2rgb(hsv) { + var h = hsv[0] / 60 + var s = hsv[1] / 100 + var v = hsv[2] / 100 + var hi = Math.floor(h) % 6 + + var f = h - Math.floor(h) + var p = 255 * v * (1 - s) + var q = 255 * v * (1 - (s * f)) + var t = 255 * v * (1 - (s * (1 - f))) + + v = 255 * v + + switch (hi) { + case 0: + return [v, t, p] + case 1: + return [q, v, p] + case 2: + return [p, v, t] + case 3: + return [p, q, v] + case 4: + return [t, p, v] + case 5: + return [v, p, q] + } + }, + hsv2hsl: function hsv2hsl(hsv) { + var h = hsv[0], + s = hsv[1] / 100, + v = hsv[2] / 100, + sl, l; + + l = (2 - s) * v; + sl = s * v; + sl /= (l <= 1) ? l : 2 - l; + l /= 2; + return [h, sl * 100, l * 100]; + }, + // http://www.140byt.es/keywords/color + rgb2hex: function( + a, // red, as a number from 0 to 255 + b, // green, as a number from 0 to 255 + c // blue, as a number from 0 to 255 + ) { + return "#" + ((256 + a << 8 | b) << 8 | c).toString(16).slice(1) + }, + hex2rgb: function( + a // take a "#xxxxxx" hex string, + ) { + a = '0x' + a.slice(1).replace(a.length > 4 ? a : /./g, '$&$&') | 0; + return [a >> 16, a >> 8 & 255, a & 255] + } + } + +/***/ }, +/* 12 */ +/***/ function(module, exports) { + + /* + ## Color 字典数据 + + 字典数据来源 [A nicer color palette for the web](http://clrs.cc/) + */ + module.exports = { + // name value nicer + navy: { + value: '#000080', + nicer: '#001F3F' + }, + blue: { + value: '#0000ff', + nicer: '#0074D9' + }, + aqua: { + value: '#00ffff', + nicer: '#7FDBFF' + }, + teal: { + value: '#008080', + nicer: '#39CCCC' + }, + olive: { + value: '#008000', + nicer: '#3D9970' + }, + green: { + value: '#008000', + nicer: '#2ECC40' + }, + lime: { + value: '#00ff00', + nicer: '#01FF70' + }, + yellow: { + value: '#ffff00', + nicer: '#FFDC00' + }, + orange: { + value: '#ffa500', + nicer: '#FF851B' + }, + red: { + value: '#ff0000', + nicer: '#FF4136' + }, + maroon: { + value: '#800000', + nicer: '#85144B' + }, + fuchsia: { + value: '#ff00ff', + nicer: '#F012BE' + }, + purple: { + value: '#800080', + nicer: '#B10DC9' + }, + silver: { + value: '#c0c0c0', + nicer: '#DDDDDD' + }, + gray: { + value: '#808080', + nicer: '#AAAAAA' + }, + black: { + value: '#000000', + nicer: '#111111' + }, + white: { + value: '#FFFFFF', + nicer: '#FFFFFF' + } + } + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Text + + http://www.lipsum.com/ + */ + var Basic = __webpack_require__(6) + var Helper = __webpack_require__(14) + + function range(defaultMin, defaultMax, min, max) { + return min === undefined ? Basic.natural(defaultMin, defaultMax) : // () + max === undefined ? min : // ( len ) + Basic.natural(parseInt(min, 10), parseInt(max, 10)) // ( min, max ) + } + + module.exports = { + // 随机生成一段文本。 + paragraph: function(min, max) { + var len = range(3, 7, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.sentence()) + } + return result.join(' ') + }, + // + cparagraph: function(min, max) { + var len = range(3, 7, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.csentence()) + } + return result.join('') + }, + // 随机生成一个句子,第一个单词的首字母大写。 + sentence: function(min, max) { + var len = range(12, 18, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.word()) + } + return Helper.capitalize(result.join(' ')) + '.' + }, + // 随机生成一个中文句子。 + csentence: function(min, max) { + var len = range(12, 18, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.cword()) + } + + return result.join('') + '。' + }, + // 随机生成一个单词。 + word: function(min, max) { + var len = range(3, 10, min, max) + var result = ''; + for (var i = 0; i < len; i++) { + result += Basic.character('lower') + } + return result + }, + // 随机生成一个或多个汉字。 + cword: function(pool, min, max) { + // 最常用的 500 个汉字 http://baike.baidu.com/view/568436.htm + var DICT_KANZI = '的一是在不了有和人这中大为上个国我以要他时来用们生到作地于出就分对成会可主发年动同工也能下过子说产种面而方后多定行学法所民得经十三之进着等部度家电力里如水化高自二理起小物现实加量都两体制机当使点从业本去把性好应开它合还因由其些然前外天政四日那社义事平形相全表间样与关各重新线内数正心反你明看原又么利比或但质气第向道命此变条只没结解问意建月公无系军很情者最立代想已通并提直题党程展五果料象员革位入常文总次品式活设及管特件长求老头基资边流路级少图山统接知较将组见计别她手角期根论运农指几九区强放决西被干做必战先回则任取据处队南给色光门即保治北造百规热领七海口东导器压志世金增争济阶油思术极交受联什认六共权收证改清己美再采转更单风切打白教速花带安场身车例真务具万每目至达走积示议声报斗完类八离华名确才科张信马节话米整空元况今集温传土许步群广石记需段研界拉林律叫且究观越织装影算低持音众书布复容儿须际商非验连断深难近矿千周委素技备半办青省列习响约支般史感劳便团往酸历市克何除消构府称太准精值号率族维划选标写存候毛亲快效斯院查江型眼王按格养易置派层片始却专状育厂京识适属圆包火住调满县局照参红细引听该铁价严龙飞' + + var len + switch (arguments.length) { + case 0: // () + pool = DICT_KANZI + len = 1 + break + case 1: // ( pool ) + if (typeof arguments[0] === 'string') { + len = 1 + } else { + // ( length ) + len = pool + pool = DICT_KANZI + } + break + case 2: + // ( pool, length ) + if (typeof arguments[0] === 'string') { + len = min + } else { + // ( min, max ) + len = this.natural(pool, min) + pool = DICT_KANZI + } + break + case 3: + len = this.natural(min, max) + break + } + + var result = '' + for (var i = 0; i < len; i++) { + result += pool.charAt(this.natural(0, pool.length - 1)) + } + return result + }, + // 随机生成一句标题,其中每个单词的首字母大写。 + title: function(min, max) { + var len = range(3, 7, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.capitalize(this.word())) + } + return result.join(' ') + }, + // 随机生成一句中文标题。 + ctitle: function(min, max) { + var len = range(3, 7, min, max) + var result = [] + for (var i = 0; i < len; i++) { + result.push(this.cword()) + } + return result.join('') + } + } + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Helpers + */ + + var Util = __webpack_require__(3) + + module.exports = { + // 把字符串的第一个字母转换为大写。 + capitalize: function(word) { + return (word + '').charAt(0).toUpperCase() + (word + '').substr(1) + }, + // 把字符串转换为大写。 + upper: function(str) { + return (str + '').toUpperCase() + }, + // 把字符串转换为小写。 + lower: function(str) { + return (str + '').toLowerCase() + }, + // 从数组中随机选取一个元素,并返回。 + pick: function pick(arr, min, max) { + // pick( item1, item2 ... ) + if (!Util.isArray(arr)) { + arr = [].slice.call(arguments) + min = 1 + max = 1 + } else { + // pick( [ item1, item2 ... ] ) + if (min === undefined) min = 1 + + // pick( [ item1, item2 ... ], count ) + if (max === undefined) max = min + } + + if (min === 1 && max === 1) return arr[this.natural(0, arr.length - 1)] + + // pick( [ item1, item2 ... ], min, max ) + return this.shuffle(arr, min, max) + + // 通过参数个数判断方法签名,扩展性太差!#90 + // switch (arguments.length) { + // case 1: + // // pick( [ item1, item2 ... ] ) + // return arr[this.natural(0, arr.length - 1)] + // case 2: + // // pick( [ item1, item2 ... ], count ) + // max = min + // /* falls through */ + // case 3: + // // pick( [ item1, item2 ... ], min, max ) + // return this.shuffle(arr, min, max) + // } + }, + /* + 打乱数组中元素的顺序,并返回。 + Given an array, scramble the order and return it. + + 其他的实现思路: + // https://code.google.com/p/jslibs/wiki/JavascriptTips + result = result.sort(function() { + return Math.random() - 0.5 + }) + */ + shuffle: function shuffle(arr, min, max) { + arr = arr || [] + var old = arr.slice(0), + result = [], + index = 0, + length = old.length; + for (var i = 0; i < length; i++) { + index = this.natural(0, old.length - 1) + result.push(old[index]) + old.splice(index, 1) + } + switch (arguments.length) { + case 0: + case 1: + return result + case 2: + max = min + /* falls through */ + case 3: + min = parseInt(min, 10) + max = parseInt(max, 10) + return result.slice(0, this.natural(min, max)) + } + }, + /* + * Random.order(item, item) + * Random.order([item, item ...]) + + 顺序获取数组中的元素 + + [JSON导入数组支持数组数据录入](https://github.com/thx/RAP/issues/22) + + 不支持单独调用! + */ + order: function order(array) { + order.cache = order.cache || {} + + if (arguments.length > 1) array = [].slice.call(arguments, 0) + + // options.context.path/templatePath + var options = order.options + var templatePath = options.context.templatePath.join('.') + + var cache = ( + order.cache[templatePath] = order.cache[templatePath] || { + index: 0, + array: array + } + ) + + return cache.array[cache.index++ % cache.array.length] + } + } + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + /* + ## Name + + [Beyond the Top 1000 Names](http://www.ssa.gov/oact/babynames/limits.html) + */ + module.exports = { + // 随机生成一个常见的英文名。 + first: function() { + var names = [ + // male + "James", "John", "Robert", "Michael", "William", + "David", "Richard", "Charles", "Joseph", "Thomas", + "Christopher", "Daniel", "Paul", "Mark", "Donald", + "George", "Kenneth", "Steven", "Edward", "Brian", + "Ronald", "Anthony", "Kevin", "Jason", "Matthew", + "Gary", "Timothy", "Jose", "Larry", "Jeffrey", + "Frank", "Scott", "Eric" + ].concat([ + // female + "Mary", "Patricia", "Linda", "Barbara", "Elizabeth", + "Jennifer", "Maria", "Susan", "Margaret", "Dorothy", + "Lisa", "Nancy", "Karen", "Betty", "Helen", + "Sandra", "Donna", "Carol", "Ruth", "Sharon", + "Michelle", "Laura", "Sarah", "Kimberly", "Deborah", + "Jessica", "Shirley", "Cynthia", "Angela", "Melissa", + "Brenda", "Amy", "Anna" + ]) + return this.pick(names) + // or this.capitalize(this.word()) + }, + // 随机生成一个常见的英文姓。 + last: function() { + var names = [ + "Smith", "Johnson", "Williams", "Brown", "Jones", + "Miller", "Davis", "Garcia", "Rodriguez", "Wilson", + "Martinez", "Anderson", "Taylor", "Thomas", "Hernandez", + "Moore", "Martin", "Jackson", "Thompson", "White", + "Lopez", "Lee", "Gonzalez", "Harris", "Clark", + "Lewis", "Robinson", "Walker", "Perez", "Hall", + "Young", "Allen" + ] + return this.pick(names) + // or this.capitalize(this.word()) + }, + // 随机生成一个常见的英文姓名。 + name: function(middle) { + return this.first() + ' ' + + (middle ? this.first() + ' ' : '') + + this.last() + }, + /* + 随机生成一个常见的中文姓。 + [世界常用姓氏排行](http://baike.baidu.com/view/1719115.htm) + [玄派网 - 网络小说创作辅助平台](http://xuanpai.sinaapp.com/) + */ + cfirst: function() { + var names = ( + '王 李 张 刘 陈 杨 赵 黄 周 吴 ' + + '徐 孙 胡 朱 高 林 何 郭 马 罗 ' + + '梁 宋 郑 谢 韩 唐 冯 于 董 萧 ' + + '程 曹 袁 邓 许 傅 沈 曾 彭 吕 ' + + '苏 卢 蒋 蔡 贾 丁 魏 薛 叶 阎 ' + + '余 潘 杜 戴 夏 锺 汪 田 任 姜 ' + + '范 方 石 姚 谭 廖 邹 熊 金 陆 ' + + '郝 孔 白 崔 康 毛 邱 秦 江 史 ' + + '顾 侯 邵 孟 龙 万 段 雷 钱 汤 ' + + '尹 黎 易 常 武 乔 贺 赖 龚 文' + ).split(' ') + return this.pick(names) + }, + /* + 随机生成一个常见的中文名。 + [中国最常见名字前50名_三九算命网](http://www.name999.net/xingming/xingshi/20131004/48.html) + */ + clast: function() { + var names = ( + '伟 芳 娜 秀英 敏 静 丽 强 磊 军 ' + + '洋 勇 艳 杰 娟 涛 明 超 秀兰 霞 ' + + '平 刚 桂英' + ).split(' ') + return this.pick(names) + }, + // 随机生成一个常见的中文姓名。 + cname: function() { + return this.cfirst() + this.clast() + } + } + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + + /* + ## Web + */ + module.exports = { + /* + 随机生成一个 URL。 + + [URL 规范](http://www.w3.org/Addressing/URL/url-spec.txt) + http Hypertext Transfer Protocol + ftp File Transfer protocol + gopher The Gopher protocol + mailto Electronic mail address + mid Message identifiers for electronic mail + cid Content identifiers for MIME body part + news Usenet news + nntp Usenet news for local NNTP access only + prospero Access using the prospero protocols + telnet rlogin tn3270 Reference to interactive sessions + wais Wide Area Information Servers + */ + url: function(protocol, host) { + return (protocol || this.protocol()) + '://' + // protocol? + (host || this.domain()) + // host? + '/' + this.word() + }, + // 随机生成一个 URL 协议。 + protocol: function() { + return this.pick( + // 协议簇 + 'http ftp gopher mailto mid cid news nntp prospero telnet rlogin tn3270 wais'.split(' ') + ) + }, + // 随机生成一个域名。 + domain: function(tld) { + return this.word() + '.' + (tld || this.tld()) + }, + /* + 随机生成一个顶级域名。 + 国际顶级域名 international top-level domain-names, iTLDs + 国家顶级域名 national top-level domainnames, nTLDs + [域名后缀大全](http://www.163ns.com/zixun/post/4417.html) + */ + tld: function() { // Top Level Domain + return this.pick( + ( + // 域名后缀 + 'com net org edu gov int mil cn ' + + // 国内域名 + 'com.cn net.cn gov.cn org.cn ' + + // 中文国内域名 + '中国 中国互联.公司 中国互联.网络 ' + + // 新国际域名 + 'tel biz cc tv info name hk mobi asia cd travel pro museum coop aero ' + + // 世界各国域名后缀 + 'ad ae af ag ai al am an ao aq ar as at au aw az ba bb bd be bf bg bh bi bj bm bn bo br bs bt bv bw by bz ca cc cf cg ch ci ck cl cm cn co cq cr cu cv cx cy cz de dj dk dm do dz ec ee eg eh es et ev fi fj fk fm fo fr ga gb gd ge gf gh gi gl gm gn gp gr gt gu gw gy hk hm hn hr ht hu id ie il in io iq ir is it jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc li lk lr ls lt lu lv ly ma mc md mg mh ml mm mn mo mp mq mr ms mt mv mw mx my mz na nc ne nf ng ni nl no np nr nt nu nz om qa pa pe pf pg ph pk pl pm pn pr pt pw py re ro ru rw sa sb sc sd se sg sh si sj sk sl sm sn so sr st su sy sz tc td tf tg th tj tk tm tn to tp tr tt tv tw tz ua ug uk us uy va vc ve vg vn vu wf ws ye yu za zm zr zw' + ).split(' ') + ) + }, + // 随机生成一个邮件地址。 + email: function(domain) { + return this.character('lower') + '.' + this.word() + '@' + + ( + domain || + (this.word() + '.' + this.tld()) + ) + // return this.character('lower') + '.' + this.last().toLowerCase() + '@' + this.last().toLowerCase() + '.' + this.tld() + // return this.word() + '@' + (domain || this.domain()) + }, + // 随机生成一个 IP 地址。 + ip: function() { + return this.natural(0, 255) + '.' + + this.natural(0, 255) + '.' + + this.natural(0, 255) + '.' + + this.natural(0, 255) + } + } + +/***/ }, +/* 17 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Address + */ + + var DICT = __webpack_require__(18) + var REGION = ['东北', '华北', '华东', '华中', '华南', '西南', '西北'] + + module.exports = { + // 随机生成一个大区。 + region: function() { + return this.pick(REGION) + }, + // 随机生成一个(中国)省(或直辖市、自治区、特别行政区)。 + province: function() { + return this.pick(DICT).name + }, + // 随机生成一个(中国)市。 + city: function(prefix) { + var province = this.pick(DICT) + var city = this.pick(province.children) + return prefix ? [province.name, city.name].join(' ') : city.name + }, + // 随机生成一个(中国)县。 + county: function(prefix) { + var province = this.pick(DICT) + var city = this.pick(province.children) + var county = this.pick(city.children) || { + name: '-' + } + return prefix ? [province.name, city.name, county.name].join(' ') : county.name + }, + // 随机生成一个邮政编码(六位数字)。 + zip: function(len) { + var zip = '' + for (var i = 0; i < (len || 6); i++) zip += this.natural(0, 9) + return zip + } + + // address: function() {}, + // phone: function() {}, + // areacode: function() {}, + // street: function() {}, + // street_suffixes: function() {}, + // street_suffix: function() {}, + // states: function() {}, + // state: function() {}, + } + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + + /* + ## Address 字典数据 + + 字典数据来源 http://www.atatech.org/articles/30028?rnd=254259856 + + 国标 省(市)级行政区划码表 + + 华北 北京市 天津市 河北省 山西省 内蒙古自治区 + 东北 辽宁省 吉林省 黑龙江省 + 华东 上海市 江苏省 浙江省 安徽省 福建省 江西省 山东省 + 华南 广东省 广西壮族自治区 海南省 + 华中 河南省 湖北省 湖南省 + 西南 重庆市 四川省 贵州省 云南省 西藏自治区 + 西北 陕西省 甘肃省 青海省 宁夏回族自治区 新疆维吾尔自治区 + 港澳台 香港特别行政区 澳门特别行政区 台湾省 + + **排序** + + ```js + var map = {} + _.each(_.keys(REGIONS),function(id){ + map[id] = REGIONS[ID] + }) + JSON.stringify(map) + ``` + */ + var DICT = { + "110000": "北京", + "110100": "北京市", + "110101": "东城区", + "110102": "西城区", + "110105": "朝阳区", + "110106": "丰台区", + "110107": "石景山区", + "110108": "海淀区", + "110109": "门头沟区", + "110111": "房山区", + "110112": "通州区", + "110113": "顺义区", + "110114": "昌平区", + "110115": "大兴区", + "110116": "怀柔区", + "110117": "平谷区", + "110228": "密云县", + "110229": "延庆县", + "110230": "其它区", + "120000": "天津", + "120100": "天津市", + "120101": "和平区", + "120102": "河东区", + "120103": "河西区", + "120104": "南开区", + "120105": "河北区", + "120106": "红桥区", + "120110": "东丽区", + "120111": "西青区", + "120112": "津南区", + "120113": "北辰区", + "120114": "武清区", + "120115": "宝坻区", + "120116": "滨海新区", + "120221": "宁河县", + "120223": "静海县", + "120225": "蓟县", + "120226": "其它区", + "130000": "河北省", + "130100": "石家庄市", + "130102": "长安区", + "130103": "桥东区", + "130104": "桥西区", + "130105": "新华区", + "130107": "井陉矿区", + "130108": "裕华区", + "130121": "井陉县", + "130123": "正定县", + "130124": "栾城县", + "130125": "行唐县", + "130126": "灵寿县", + "130127": "高邑县", + "130128": "深泽县", + "130129": "赞皇县", + "130130": "无极县", + "130131": "平山县", + "130132": "元氏县", + "130133": "赵县", + "130181": "辛集市", + "130182": "藁城市", + "130183": "晋州市", + "130184": "新乐市", + "130185": "鹿泉市", + "130186": "其它区", + "130200": "唐山市", + "130202": "路南区", + "130203": "路北区", + "130204": "古冶区", + "130205": "开平区", + "130207": "丰南区", + "130208": "丰润区", + "130223": "滦县", + "130224": "滦南县", + "130225": "乐亭县", + "130227": "迁西县", + "130229": "玉田县", + "130230": "曹妃甸区", + "130281": "遵化市", + "130283": "迁安市", + "130284": "其它区", + "130300": "秦皇岛市", + "130302": "海港区", + "130303": "山海关区", + "130304": "北戴河区", + "130321": "青龙满族自治县", + "130322": "昌黎县", + "130323": "抚宁县", + "130324": "卢龙县", + "130398": "其它区", + "130400": "邯郸市", + "130402": "邯山区", + "130403": "丛台区", + "130404": "复兴区", + "130406": "峰峰矿区", + "130421": "邯郸县", + "130423": "临漳县", + "130424": "成安县", + "130425": "大名县", + "130426": "涉县", + "130427": "磁县", + "130428": "肥乡县", + "130429": "永年县", + "130430": "邱县", + "130431": "鸡泽县", + "130432": "广平县", + "130433": "馆陶县", + "130434": "魏县", + "130435": "曲周县", + "130481": "武安市", + "130482": "其它区", + "130500": "邢台市", + "130502": "桥东区", + "130503": "桥西区", + "130521": "邢台县", + "130522": "临城县", + "130523": "内丘县", + "130524": "柏乡县", + "130525": "隆尧县", + "130526": "任县", + "130527": "南和县", + "130528": "宁晋县", + "130529": "巨鹿县", + "130530": "新河县", + "130531": "广宗县", + "130532": "平乡县", + "130533": "威县", + "130534": "清河县", + "130535": "临西县", + "130581": "南宫市", + "130582": "沙河市", + "130583": "其它区", + "130600": "保定市", + "130602": "新市区", + "130603": "北市区", + "130604": "南市区", + "130621": "满城县", + "130622": "清苑县", + "130623": "涞水县", + "130624": "阜平县", + "130625": "徐水县", + "130626": "定兴县", + "130627": "唐县", + "130628": "高阳县", + "130629": "容城县", + "130630": "涞源县", + "130631": "望都县", + "130632": "安新县", + "130633": "易县", + "130634": "曲阳县", + "130635": "蠡县", + "130636": "顺平县", + "130637": "博野县", + "130638": "雄县", + "130681": "涿州市", + "130682": "定州市", + "130683": "安国市", + "130684": "高碑店市", + "130699": "其它区", + "130700": "张家口市", + "130702": "桥东区", + "130703": "桥西区", + "130705": "宣化区", + "130706": "下花园区", + "130721": "宣化县", + "130722": "张北县", + "130723": "康保县", + "130724": "沽源县", + "130725": "尚义县", + "130726": "蔚县", + "130727": "阳原县", + "130728": "怀安县", + "130729": "万全县", + "130730": "怀来县", + "130731": "涿鹿县", + "130732": "赤城县", + "130733": "崇礼县", + "130734": "其它区", + "130800": "承德市", + "130802": "双桥区", + "130803": "双滦区", + "130804": "鹰手营子矿区", + "130821": "承德县", + "130822": "兴隆县", + "130823": "平泉县", + "130824": "滦平县", + "130825": "隆化县", + "130826": "丰宁满族自治县", + "130827": "宽城满族自治县", + "130828": "围场满族蒙古族自治县", + "130829": "其它区", + "130900": "沧州市", + "130902": "新华区", + "130903": "运河区", + "130921": "沧县", + "130922": "青县", + "130923": "东光县", + "130924": "海兴县", + "130925": "盐山县", + "130926": "肃宁县", + "130927": "南皮县", + "130928": "吴桥县", + "130929": "献县", + "130930": "孟村回族自治县", + "130981": "泊头市", + "130982": "任丘市", + "130983": "黄骅市", + "130984": "河间市", + "130985": "其它区", + "131000": "廊坊市", + "131002": "安次区", + "131003": "广阳区", + "131022": "固安县", + "131023": "永清县", + "131024": "香河县", + "131025": "大城县", + "131026": "文安县", + "131028": "大厂回族自治县", + "131081": "霸州市", + "131082": "三河市", + "131083": "其它区", + "131100": "衡水市", + "131102": "桃城区", + "131121": "枣强县", + "131122": "武邑县", + "131123": "武强县", + "131124": "饶阳县", + "131125": "安平县", + "131126": "故城县", + "131127": "景县", + "131128": "阜城县", + "131181": "冀州市", + "131182": "深州市", + "131183": "其它区", + "140000": "山西省", + "140100": "太原市", + "140105": "小店区", + "140106": "迎泽区", + "140107": "杏花岭区", + "140108": "尖草坪区", + "140109": "万柏林区", + "140110": "晋源区", + "140121": "清徐县", + "140122": "阳曲县", + "140123": "娄烦县", + "140181": "古交市", + "140182": "其它区", + "140200": "大同市", + "140202": "城区", + "140203": "矿区", + "140211": "南郊区", + "140212": "新荣区", + "140221": "阳高县", + "140222": "天镇县", + "140223": "广灵县", + "140224": "灵丘县", + "140225": "浑源县", + "140226": "左云县", + "140227": "大同县", + "140228": "其它区", + "140300": "阳泉市", + "140302": "城区", + "140303": "矿区", + "140311": "郊区", + "140321": "平定县", + "140322": "盂县", + "140323": "其它区", + "140400": "长治市", + "140421": "长治县", + "140423": "襄垣县", + "140424": "屯留县", + "140425": "平顺县", + "140426": "黎城县", + "140427": "壶关县", + "140428": "长子县", + "140429": "武乡县", + "140430": "沁县", + "140431": "沁源县", + "140481": "潞城市", + "140482": "城区", + "140483": "郊区", + "140485": "其它区", + "140500": "晋城市", + "140502": "城区", + "140521": "沁水县", + "140522": "阳城县", + "140524": "陵川县", + "140525": "泽州县", + "140581": "高平市", + "140582": "其它区", + "140600": "朔州市", + "140602": "朔城区", + "140603": "平鲁区", + "140621": "山阴县", + "140622": "应县", + "140623": "右玉县", + "140624": "怀仁县", + "140625": "其它区", + "140700": "晋中市", + "140702": "榆次区", + "140721": "榆社县", + "140722": "左权县", + "140723": "和顺县", + "140724": "昔阳县", + "140725": "寿阳县", + "140726": "太谷县", + "140727": "祁县", + "140728": "平遥县", + "140729": "灵石县", + "140781": "介休市", + "140782": "其它区", + "140800": "运城市", + "140802": "盐湖区", + "140821": "临猗县", + "140822": "万荣县", + "140823": "闻喜县", + "140824": "稷山县", + "140825": "新绛县", + "140826": "绛县", + "140827": "垣曲县", + "140828": "夏县", + "140829": "平陆县", + "140830": "芮城县", + "140881": "永济市", + "140882": "河津市", + "140883": "其它区", + "140900": "忻州市", + "140902": "忻府区", + "140921": "定襄县", + "140922": "五台县", + "140923": "代县", + "140924": "繁峙县", + "140925": "宁武县", + "140926": "静乐县", + "140927": "神池县", + "140928": "五寨县", + "140929": "岢岚县", + "140930": "河曲县", + "140931": "保德县", + "140932": "偏关县", + "140981": "原平市", + "140982": "其它区", + "141000": "临汾市", + "141002": "尧都区", + "141021": "曲沃县", + "141022": "翼城县", + "141023": "襄汾县", + "141024": "洪洞县", + "141025": "古县", + "141026": "安泽县", + "141027": "浮山县", + "141028": "吉县", + "141029": "乡宁县", + "141030": "大宁县", + "141031": "隰县", + "141032": "永和县", + "141033": "蒲县", + "141034": "汾西县", + "141081": "侯马市", + "141082": "霍州市", + "141083": "其它区", + "141100": "吕梁市", + "141102": "离石区", + "141121": "文水县", + "141122": "交城县", + "141123": "兴县", + "141124": "临县", + "141125": "柳林县", + "141126": "石楼县", + "141127": "岚县", + "141128": "方山县", + "141129": "中阳县", + "141130": "交口县", + "141181": "孝义市", + "141182": "汾阳市", + "141183": "其它区", + "150000": "内蒙古自治区", + "150100": "呼和浩特市", + "150102": "新城区", + "150103": "回民区", + "150104": "玉泉区", + "150105": "赛罕区", + "150121": "土默特左旗", + "150122": "托克托县", + "150123": "和林格尔县", + "150124": "清水河县", + "150125": "武川县", + "150126": "其它区", + "150200": "包头市", + "150202": "东河区", + "150203": "昆都仑区", + "150204": "青山区", + "150205": "石拐区", + "150206": "白云鄂博矿区", + "150207": "九原区", + "150221": "土默特右旗", + "150222": "固阳县", + "150223": "达尔罕茂明安联合旗", + "150224": "其它区", + "150300": "乌海市", + "150302": "海勃湾区", + "150303": "海南区", + "150304": "乌达区", + "150305": "其它区", + "150400": "赤峰市", + "150402": "红山区", + "150403": "元宝山区", + "150404": "松山区", + "150421": "阿鲁科尔沁旗", + "150422": "巴林左旗", + "150423": "巴林右旗", + "150424": "林西县", + "150425": "克什克腾旗", + "150426": "翁牛特旗", + "150428": "喀喇沁旗", + "150429": "宁城县", + "150430": "敖汉旗", + "150431": "其它区", + "150500": "通辽市", + "150502": "科尔沁区", + "150521": "科尔沁左翼中旗", + "150522": "科尔沁左翼后旗", + "150523": "开鲁县", + "150524": "库伦旗", + "150525": "奈曼旗", + "150526": "扎鲁特旗", + "150581": "霍林郭勒市", + "150582": "其它区", + "150600": "鄂尔多斯市", + "150602": "东胜区", + "150621": "达拉特旗", + "150622": "准格尔旗", + "150623": "鄂托克前旗", + "150624": "鄂托克旗", + "150625": "杭锦旗", + "150626": "乌审旗", + "150627": "伊金霍洛旗", + "150628": "其它区", + "150700": "呼伦贝尔市", + "150702": "海拉尔区", + "150703": "扎赉诺尔区", + "150721": "阿荣旗", + "150722": "莫力达瓦达斡尔族自治旗", + "150723": "鄂伦春自治旗", + "150724": "鄂温克族自治旗", + "150725": "陈巴尔虎旗", + "150726": "新巴尔虎左旗", + "150727": "新巴尔虎右旗", + "150781": "满洲里市", + "150782": "牙克石市", + "150783": "扎兰屯市", + "150784": "额尔古纳市", + "150785": "根河市", + "150786": "其它区", + "150800": "巴彦淖尔市", + "150802": "临河区", + "150821": "五原县", + "150822": "磴口县", + "150823": "乌拉特前旗", + "150824": "乌拉特中旗", + "150825": "乌拉特后旗", + "150826": "杭锦后旗", + "150827": "其它区", + "150900": "乌兰察布市", + "150902": "集宁区", + "150921": "卓资县", + "150922": "化德县", + "150923": "商都县", + "150924": "兴和县", + "150925": "凉城县", + "150926": "察哈尔右翼前旗", + "150927": "察哈尔右翼中旗", + "150928": "察哈尔右翼后旗", + "150929": "四子王旗", + "150981": "丰镇市", + "150982": "其它区", + "152200": "兴安盟", + "152201": "乌兰浩特市", + "152202": "阿尔山市", + "152221": "科尔沁右翼前旗", + "152222": "科尔沁右翼中旗", + "152223": "扎赉特旗", + "152224": "突泉县", + "152225": "其它区", + "152500": "锡林郭勒盟", + "152501": "二连浩特市", + "152502": "锡林浩特市", + "152522": "阿巴嘎旗", + "152523": "苏尼特左旗", + "152524": "苏尼特右旗", + "152525": "东乌珠穆沁旗", + "152526": "西乌珠穆沁旗", + "152527": "太仆寺旗", + "152528": "镶黄旗", + "152529": "正镶白旗", + "152530": "正蓝旗", + "152531": "多伦县", + "152532": "其它区", + "152900": "阿拉善盟", + "152921": "阿拉善左旗", + "152922": "阿拉善右旗", + "152923": "额济纳旗", + "152924": "其它区", + "210000": "辽宁省", + "210100": "沈阳市", + "210102": "和平区", + "210103": "沈河区", + "210104": "大东区", + "210105": "皇姑区", + "210106": "铁西区", + "210111": "苏家屯区", + "210112": "东陵区", + "210113": "新城子区", + "210114": "于洪区", + "210122": "辽中县", + "210123": "康平县", + "210124": "法库县", + "210181": "新民市", + "210184": "沈北新区", + "210185": "其它区", + "210200": "大连市", + "210202": "中山区", + "210203": "西岗区", + "210204": "沙河口区", + "210211": "甘井子区", + "210212": "旅顺口区", + "210213": "金州区", + "210224": "长海县", + "210281": "瓦房店市", + "210282": "普兰店市", + "210283": "庄河市", + "210298": "其它区", + "210300": "鞍山市", + "210302": "铁东区", + "210303": "铁西区", + "210304": "立山区", + "210311": "千山区", + "210321": "台安县", + "210323": "岫岩满族自治县", + "210381": "海城市", + "210382": "其它区", + "210400": "抚顺市", + "210402": "新抚区", + "210403": "东洲区", + "210404": "望花区", + "210411": "顺城区", + "210421": "抚顺县", + "210422": "新宾满族自治县", + "210423": "清原满族自治县", + "210424": "其它区", + "210500": "本溪市", + "210502": "平山区", + "210503": "溪湖区", + "210504": "明山区", + "210505": "南芬区", + "210521": "本溪满族自治县", + "210522": "桓仁满族自治县", + "210523": "其它区", + "210600": "丹东市", + "210602": "元宝区", + "210603": "振兴区", + "210604": "振安区", + "210624": "宽甸满族自治县", + "210681": "东港市", + "210682": "凤城市", + "210683": "其它区", + "210700": "锦州市", + "210702": "古塔区", + "210703": "凌河区", + "210711": "太和区", + "210726": "黑山县", + "210727": "义县", + "210781": "凌海市", + "210782": "北镇市", + "210783": "其它区", + "210800": "营口市", + "210802": "站前区", + "210803": "西市区", + "210804": "鲅鱼圈区", + "210811": "老边区", + "210881": "盖州市", + "210882": "大石桥市", + "210883": "其它区", + "210900": "阜新市", + "210902": "海州区", + "210903": "新邱区", + "210904": "太平区", + "210905": "清河门区", + "210911": "细河区", + "210921": "阜新蒙古族自治县", + "210922": "彰武县", + "210923": "其它区", + "211000": "辽阳市", + "211002": "白塔区", + "211003": "文圣区", + "211004": "宏伟区", + "211005": "弓长岭区", + "211011": "太子河区", + "211021": "辽阳县", + "211081": "灯塔市", + "211082": "其它区", + "211100": "盘锦市", + "211102": "双台子区", + "211103": "兴隆台区", + "211121": "大洼县", + "211122": "盘山县", + "211123": "其它区", + "211200": "铁岭市", + "211202": "银州区", + "211204": "清河区", + "211221": "铁岭县", + "211223": "西丰县", + "211224": "昌图县", + "211281": "调兵山市", + "211282": "开原市", + "211283": "其它区", + "211300": "朝阳市", + "211302": "双塔区", + "211303": "龙城区", + "211321": "朝阳县", + "211322": "建平县", + "211324": "喀喇沁左翼蒙古族自治县", + "211381": "北票市", + "211382": "凌源市", + "211383": "其它区", + "211400": "葫芦岛市", + "211402": "连山区", + "211403": "龙港区", + "211404": "南票区", + "211421": "绥中县", + "211422": "建昌县", + "211481": "兴城市", + "211482": "其它区", + "220000": "吉林省", + "220100": "长春市", + "220102": "南关区", + "220103": "宽城区", + "220104": "朝阳区", + "220105": "二道区", + "220106": "绿园区", + "220112": "双阳区", + "220122": "农安县", + "220181": "九台市", + "220182": "榆树市", + "220183": "德惠市", + "220188": "其它区", + "220200": "吉林市", + "220202": "昌邑区", + "220203": "龙潭区", + "220204": "船营区", + "220211": "丰满区", + "220221": "永吉县", + "220281": "蛟河市", + "220282": "桦甸市", + "220283": "舒兰市", + "220284": "磐石市", + "220285": "其它区", + "220300": "四平市", + "220302": "铁西区", + "220303": "铁东区", + "220322": "梨树县", + "220323": "伊通满族自治县", + "220381": "公主岭市", + "220382": "双辽市", + "220383": "其它区", + "220400": "辽源市", + "220402": "龙山区", + "220403": "西安区", + "220421": "东丰县", + "220422": "东辽县", + "220423": "其它区", + "220500": "通化市", + "220502": "东昌区", + "220503": "二道江区", + "220521": "通化县", + "220523": "辉南县", + "220524": "柳河县", + "220581": "梅河口市", + "220582": "集安市", + "220583": "其它区", + "220600": "白山市", + "220602": "浑江区", + "220621": "抚松县", + "220622": "靖宇县", + "220623": "长白朝鲜族自治县", + "220625": "江源区", + "220681": "临江市", + "220682": "其它区", + "220700": "松原市", + "220702": "宁江区", + "220721": "前郭尔罗斯蒙古族自治县", + "220722": "长岭县", + "220723": "乾安县", + "220724": "扶余市", + "220725": "其它区", + "220800": "白城市", + "220802": "洮北区", + "220821": "镇赉县", + "220822": "通榆县", + "220881": "洮南市", + "220882": "大安市", + "220883": "其它区", + "222400": "延边朝鲜族自治州", + "222401": "延吉市", + "222402": "图们市", + "222403": "敦化市", + "222404": "珲春市", + "222405": "龙井市", + "222406": "和龙市", + "222424": "汪清县", + "222426": "安图县", + "222427": "其它区", + "230000": "黑龙江省", + "230100": "哈尔滨市", + "230102": "道里区", + "230103": "南岗区", + "230104": "道外区", + "230106": "香坊区", + "230108": "平房区", + "230109": "松北区", + "230111": "呼兰区", + "230123": "依兰县", + "230124": "方正县", + "230125": "宾县", + "230126": "巴彦县", + "230127": "木兰县", + "230128": "通河县", + "230129": "延寿县", + "230181": "阿城区", + "230182": "双城市", + "230183": "尚志市", + "230184": "五常市", + "230186": "其它区", + "230200": "齐齐哈尔市", + "230202": "龙沙区", + "230203": "建华区", + "230204": "铁锋区", + "230205": "昂昂溪区", + "230206": "富拉尔基区", + "230207": "碾子山区", + "230208": "梅里斯达斡尔族区", + "230221": "龙江县", + "230223": "依安县", + "230224": "泰来县", + "230225": "甘南县", + "230227": "富裕县", + "230229": "克山县", + "230230": "克东县", + "230231": "拜泉县", + "230281": "讷河市", + "230282": "其它区", + "230300": "鸡西市", + "230302": "鸡冠区", + "230303": "恒山区", + "230304": "滴道区", + "230305": "梨树区", + "230306": "城子河区", + "230307": "麻山区", + "230321": "鸡东县", + "230381": "虎林市", + "230382": "密山市", + "230383": "其它区", + "230400": "鹤岗市", + "230402": "向阳区", + "230403": "工农区", + "230404": "南山区", + "230405": "兴安区", + "230406": "东山区", + "230407": "兴山区", + "230421": "萝北县", + "230422": "绥滨县", + "230423": "其它区", + "230500": "双鸭山市", + "230502": "尖山区", + "230503": "岭东区", + "230505": "四方台区", + "230506": "宝山区", + "230521": "集贤县", + "230522": "友谊县", + "230523": "宝清县", + "230524": "饶河县", + "230525": "其它区", + "230600": "大庆市", + "230602": "萨尔图区", + "230603": "龙凤区", + "230604": "让胡路区", + "230605": "红岗区", + "230606": "大同区", + "230621": "肇州县", + "230622": "肇源县", + "230623": "林甸县", + "230624": "杜尔伯特蒙古族自治县", + "230625": "其它区", + "230700": "伊春市", + "230702": "伊春区", + "230703": "南岔区", + "230704": "友好区", + "230705": "西林区", + "230706": "翠峦区", + "230707": "新青区", + "230708": "美溪区", + "230709": "金山屯区", + "230710": "五营区", + "230711": "乌马河区", + "230712": "汤旺河区", + "230713": "带岭区", + "230714": "乌伊岭区", + "230715": "红星区", + "230716": "上甘岭区", + "230722": "嘉荫县", + "230781": "铁力市", + "230782": "其它区", + "230800": "佳木斯市", + "230803": "向阳区", + "230804": "前进区", + "230805": "东风区", + "230811": "郊区", + "230822": "桦南县", + "230826": "桦川县", + "230828": "汤原县", + "230833": "抚远县", + "230881": "同江市", + "230882": "富锦市", + "230883": "其它区", + "230900": "七台河市", + "230902": "新兴区", + "230903": "桃山区", + "230904": "茄子河区", + "230921": "勃利县", + "230922": "其它区", + "231000": "牡丹江市", + "231002": "东安区", + "231003": "阳明区", + "231004": "爱民区", + "231005": "西安区", + "231024": "东宁县", + "231025": "林口县", + "231081": "绥芬河市", + "231083": "海林市", + "231084": "宁安市", + "231085": "穆棱市", + "231086": "其它区", + "231100": "黑河市", + "231102": "爱辉区", + "231121": "嫩江县", + "231123": "逊克县", + "231124": "孙吴县", + "231181": "北安市", + "231182": "五大连池市", + "231183": "其它区", + "231200": "绥化市", + "231202": "北林区", + "231221": "望奎县", + "231222": "兰西县", + "231223": "青冈县", + "231224": "庆安县", + "231225": "明水县", + "231226": "绥棱县", + "231281": "安达市", + "231282": "肇东市", + "231283": "海伦市", + "231284": "其它区", + "232700": "大兴安岭地区", + "232702": "松岭区", + "232703": "新林区", + "232704": "呼中区", + "232721": "呼玛县", + "232722": "塔河县", + "232723": "漠河县", + "232724": "加格达奇区", + "232725": "其它区", + "310000": "上海", + "310100": "上海市", + "310101": "黄浦区", + "310104": "徐汇区", + "310105": "长宁区", + "310106": "静安区", + "310107": "普陀区", + "310108": "闸北区", + "310109": "虹口区", + "310110": "杨浦区", + "310112": "闵行区", + "310113": "宝山区", + "310114": "嘉定区", + "310115": "浦东新区", + "310116": "金山区", + "310117": "松江区", + "310118": "青浦区", + "310120": "奉贤区", + "310230": "崇明县", + "310231": "其它区", + "320000": "江苏省", + "320100": "南京市", + "320102": "玄武区", + "320104": "秦淮区", + "320105": "建邺区", + "320106": "鼓楼区", + "320111": "浦口区", + "320113": "栖霞区", + "320114": "雨花台区", + "320115": "江宁区", + "320116": "六合区", + "320124": "溧水区", + "320125": "高淳区", + "320126": "其它区", + "320200": "无锡市", + "320202": "崇安区", + "320203": "南长区", + "320204": "北塘区", + "320205": "锡山区", + "320206": "惠山区", + "320211": "滨湖区", + "320281": "江阴市", + "320282": "宜兴市", + "320297": "其它区", + "320300": "徐州市", + "320302": "鼓楼区", + "320303": "云龙区", + "320305": "贾汪区", + "320311": "泉山区", + "320321": "丰县", + "320322": "沛县", + "320323": "铜山区", + "320324": "睢宁县", + "320381": "新沂市", + "320382": "邳州市", + "320383": "其它区", + "320400": "常州市", + "320402": "天宁区", + "320404": "钟楼区", + "320405": "戚墅堰区", + "320411": "新北区", + "320412": "武进区", + "320481": "溧阳市", + "320482": "金坛市", + "320483": "其它区", + "320500": "苏州市", + "320505": "虎丘区", + "320506": "吴中区", + "320507": "相城区", + "320508": "姑苏区", + "320581": "常熟市", + "320582": "张家港市", + "320583": "昆山市", + "320584": "吴江区", + "320585": "太仓市", + "320596": "其它区", + "320600": "南通市", + "320602": "崇川区", + "320611": "港闸区", + "320612": "通州区", + "320621": "海安县", + "320623": "如东县", + "320681": "启东市", + "320682": "如皋市", + "320684": "海门市", + "320694": "其它区", + "320700": "连云港市", + "320703": "连云区", + "320705": "新浦区", + "320706": "海州区", + "320721": "赣榆县", + "320722": "东海县", + "320723": "灌云县", + "320724": "灌南县", + "320725": "其它区", + "320800": "淮安市", + "320802": "清河区", + "320803": "淮安区", + "320804": "淮阴区", + "320811": "清浦区", + "320826": "涟水县", + "320829": "洪泽县", + "320830": "盱眙县", + "320831": "金湖县", + "320832": "其它区", + "320900": "盐城市", + "320902": "亭湖区", + "320903": "盐都区", + "320921": "响水县", + "320922": "滨海县", + "320923": "阜宁县", + "320924": "射阳县", + "320925": "建湖县", + "320981": "东台市", + "320982": "大丰市", + "320983": "其它区", + "321000": "扬州市", + "321002": "广陵区", + "321003": "邗江区", + "321023": "宝应县", + "321081": "仪征市", + "321084": "高邮市", + "321088": "江都区", + "321093": "其它区", + "321100": "镇江市", + "321102": "京口区", + "321111": "润州区", + "321112": "丹徒区", + "321181": "丹阳市", + "321182": "扬中市", + "321183": "句容市", + "321184": "其它区", + "321200": "泰州市", + "321202": "海陵区", + "321203": "高港区", + "321281": "兴化市", + "321282": "靖江市", + "321283": "泰兴市", + "321284": "姜堰区", + "321285": "其它区", + "321300": "宿迁市", + "321302": "宿城区", + "321311": "宿豫区", + "321322": "沭阳县", + "321323": "泗阳县", + "321324": "泗洪县", + "321325": "其它区", + "330000": "浙江省", + "330100": "杭州市", + "330102": "上城区", + "330103": "下城区", + "330104": "江干区", + "330105": "拱墅区", + "330106": "西湖区", + "330108": "滨江区", + "330109": "萧山区", + "330110": "余杭区", + "330122": "桐庐县", + "330127": "淳安县", + "330182": "建德市", + "330183": "富阳市", + "330185": "临安市", + "330186": "其它区", + "330200": "宁波市", + "330203": "海曙区", + "330204": "江东区", + "330205": "江北区", + "330206": "北仑区", + "330211": "镇海区", + "330212": "鄞州区", + "330225": "象山县", + "330226": "宁海县", + "330281": "余姚市", + "330282": "慈溪市", + "330283": "奉化市", + "330284": "其它区", + "330300": "温州市", + "330302": "鹿城区", + "330303": "龙湾区", + "330304": "瓯海区", + "330322": "洞头县", + "330324": "永嘉县", + "330326": "平阳县", + "330327": "苍南县", + "330328": "文成县", + "330329": "泰顺县", + "330381": "瑞安市", + "330382": "乐清市", + "330383": "其它区", + "330400": "嘉兴市", + "330402": "南湖区", + "330411": "秀洲区", + "330421": "嘉善县", + "330424": "海盐县", + "330481": "海宁市", + "330482": "平湖市", + "330483": "桐乡市", + "330484": "其它区", + "330500": "湖州市", + "330502": "吴兴区", + "330503": "南浔区", + "330521": "德清县", + "330522": "长兴县", + "330523": "安吉县", + "330524": "其它区", + "330600": "绍兴市", + "330602": "越城区", + "330621": "绍兴县", + "330624": "新昌县", + "330681": "诸暨市", + "330682": "上虞市", + "330683": "嵊州市", + "330684": "其它区", + "330700": "金华市", + "330702": "婺城区", + "330703": "金东区", + "330723": "武义县", + "330726": "浦江县", + "330727": "磐安县", + "330781": "兰溪市", + "330782": "义乌市", + "330783": "东阳市", + "330784": "永康市", + "330785": "其它区", + "330800": "衢州市", + "330802": "柯城区", + "330803": "衢江区", + "330822": "常山县", + "330824": "开化县", + "330825": "龙游县", + "330881": "江山市", + "330882": "其它区", + "330900": "舟山市", + "330902": "定海区", + "330903": "普陀区", + "330921": "岱山县", + "330922": "嵊泗县", + "330923": "其它区", + "331000": "台州市", + "331002": "椒江区", + "331003": "黄岩区", + "331004": "路桥区", + "331021": "玉环县", + "331022": "三门县", + "331023": "天台县", + "331024": "仙居县", + "331081": "温岭市", + "331082": "临海市", + "331083": "其它区", + "331100": "丽水市", + "331102": "莲都区", + "331121": "青田县", + "331122": "缙云县", + "331123": "遂昌县", + "331124": "松阳县", + "331125": "云和县", + "331126": "庆元县", + "331127": "景宁畲族自治县", + "331181": "龙泉市", + "331182": "其它区", + "340000": "安徽省", + "340100": "合肥市", + "340102": "瑶海区", + "340103": "庐阳区", + "340104": "蜀山区", + "340111": "包河区", + "340121": "长丰县", + "340122": "肥东县", + "340123": "肥西县", + "340192": "其它区", + "340200": "芜湖市", + "340202": "镜湖区", + "340203": "弋江区", + "340207": "鸠江区", + "340208": "三山区", + "340221": "芜湖县", + "340222": "繁昌县", + "340223": "南陵县", + "340224": "其它区", + "340300": "蚌埠市", + "340302": "龙子湖区", + "340303": "蚌山区", + "340304": "禹会区", + "340311": "淮上区", + "340321": "怀远县", + "340322": "五河县", + "340323": "固镇县", + "340324": "其它区", + "340400": "淮南市", + "340402": "大通区", + "340403": "田家庵区", + "340404": "谢家集区", + "340405": "八公山区", + "340406": "潘集区", + "340421": "凤台县", + "340422": "其它区", + "340500": "马鞍山市", + "340503": "花山区", + "340504": "雨山区", + "340506": "博望区", + "340521": "当涂县", + "340522": "其它区", + "340600": "淮北市", + "340602": "杜集区", + "340603": "相山区", + "340604": "烈山区", + "340621": "濉溪县", + "340622": "其它区", + "340700": "铜陵市", + "340702": "铜官山区", + "340703": "狮子山区", + "340711": "郊区", + "340721": "铜陵县", + "340722": "其它区", + "340800": "安庆市", + "340802": "迎江区", + "340803": "大观区", + "340811": "宜秀区", + "340822": "怀宁县", + "340823": "枞阳县", + "340824": "潜山县", + "340825": "太湖县", + "340826": "宿松县", + "340827": "望江县", + "340828": "岳西县", + "340881": "桐城市", + "340882": "其它区", + "341000": "黄山市", + "341002": "屯溪区", + "341003": "黄山区", + "341004": "徽州区", + "341021": "歙县", + "341022": "休宁县", + "341023": "黟县", + "341024": "祁门县", + "341025": "其它区", + "341100": "滁州市", + "341102": "琅琊区", + "341103": "南谯区", + "341122": "来安县", + "341124": "全椒县", + "341125": "定远县", + "341126": "凤阳县", + "341181": "天长市", + "341182": "明光市", + "341183": "其它区", + "341200": "阜阳市", + "341202": "颍州区", + "341203": "颍东区", + "341204": "颍泉区", + "341221": "临泉县", + "341222": "太和县", + "341225": "阜南县", + "341226": "颍上县", + "341282": "界首市", + "341283": "其它区", + "341300": "宿州市", + "341302": "埇桥区", + "341321": "砀山县", + "341322": "萧县", + "341323": "灵璧县", + "341324": "泗县", + "341325": "其它区", + "341400": "巢湖市", + "341421": "庐江县", + "341422": "无为县", + "341423": "含山县", + "341424": "和县", + "341500": "六安市", + "341502": "金安区", + "341503": "裕安区", + "341521": "寿县", + "341522": "霍邱县", + "341523": "舒城县", + "341524": "金寨县", + "341525": "霍山县", + "341526": "其它区", + "341600": "亳州市", + "341602": "谯城区", + "341621": "涡阳县", + "341622": "蒙城县", + "341623": "利辛县", + "341624": "其它区", + "341700": "池州市", + "341702": "贵池区", + "341721": "东至县", + "341722": "石台县", + "341723": "青阳县", + "341724": "其它区", + "341800": "宣城市", + "341802": "宣州区", + "341821": "郎溪县", + "341822": "广德县", + "341823": "泾县", + "341824": "绩溪县", + "341825": "旌德县", + "341881": "宁国市", + "341882": "其它区", + "350000": "福建省", + "350100": "福州市", + "350102": "鼓楼区", + "350103": "台江区", + "350104": "仓山区", + "350105": "马尾区", + "350111": "晋安区", + "350121": "闽侯县", + "350122": "连江县", + "350123": "罗源县", + "350124": "闽清县", + "350125": "永泰县", + "350128": "平潭县", + "350181": "福清市", + "350182": "长乐市", + "350183": "其它区", + "350200": "厦门市", + "350203": "思明区", + "350205": "海沧区", + "350206": "湖里区", + "350211": "集美区", + "350212": "同安区", + "350213": "翔安区", + "350214": "其它区", + "350300": "莆田市", + "350302": "城厢区", + "350303": "涵江区", + "350304": "荔城区", + "350305": "秀屿区", + "350322": "仙游县", + "350323": "其它区", + "350400": "三明市", + "350402": "梅列区", + "350403": "三元区", + "350421": "明溪县", + "350423": "清流县", + "350424": "宁化县", + "350425": "大田县", + "350426": "尤溪县", + "350427": "沙县", + "350428": "将乐县", + "350429": "泰宁县", + "350430": "建宁县", + "350481": "永安市", + "350482": "其它区", + "350500": "泉州市", + "350502": "鲤城区", + "350503": "丰泽区", + "350504": "洛江区", + "350505": "泉港区", + "350521": "惠安县", + "350524": "安溪县", + "350525": "永春县", + "350526": "德化县", + "350527": "金门县", + "350581": "石狮市", + "350582": "晋江市", + "350583": "南安市", + "350584": "其它区", + "350600": "漳州市", + "350602": "芗城区", + "350603": "龙文区", + "350622": "云霄县", + "350623": "漳浦县", + "350624": "诏安县", + "350625": "长泰县", + "350626": "东山县", + "350627": "南靖县", + "350628": "平和县", + "350629": "华安县", + "350681": "龙海市", + "350682": "其它区", + "350700": "南平市", + "350702": "延平区", + "350721": "顺昌县", + "350722": "浦城县", + "350723": "光泽县", + "350724": "松溪县", + "350725": "政和县", + "350781": "邵武市", + "350782": "武夷山市", + "350783": "建瓯市", + "350784": "建阳市", + "350785": "其它区", + "350800": "龙岩市", + "350802": "新罗区", + "350821": "长汀县", + "350822": "永定县", + "350823": "上杭县", + "350824": "武平县", + "350825": "连城县", + "350881": "漳平市", + "350882": "其它区", + "350900": "宁德市", + "350902": "蕉城区", + "350921": "霞浦县", + "350922": "古田县", + "350923": "屏南县", + "350924": "寿宁县", + "350925": "周宁县", + "350926": "柘荣县", + "350981": "福安市", + "350982": "福鼎市", + "350983": "其它区", + "360000": "江西省", + "360100": "南昌市", + "360102": "东湖区", + "360103": "西湖区", + "360104": "青云谱区", + "360105": "湾里区", + "360111": "青山湖区", + "360121": "南昌县", + "360122": "新建县", + "360123": "安义县", + "360124": "进贤县", + "360128": "其它区", + "360200": "景德镇市", + "360202": "昌江区", + "360203": "珠山区", + "360222": "浮梁县", + "360281": "乐平市", + "360282": "其它区", + "360300": "萍乡市", + "360302": "安源区", + "360313": "湘东区", + "360321": "莲花县", + "360322": "上栗县", + "360323": "芦溪县", + "360324": "其它区", + "360400": "九江市", + "360402": "庐山区", + "360403": "浔阳区", + "360421": "九江县", + "360423": "武宁县", + "360424": "修水县", + "360425": "永修县", + "360426": "德安县", + "360427": "星子县", + "360428": "都昌县", + "360429": "湖口县", + "360430": "彭泽县", + "360481": "瑞昌市", + "360482": "其它区", + "360483": "共青城市", + "360500": "新余市", + "360502": "渝水区", + "360521": "分宜县", + "360522": "其它区", + "360600": "鹰潭市", + "360602": "月湖区", + "360622": "余江县", + "360681": "贵溪市", + "360682": "其它区", + "360700": "赣州市", + "360702": "章贡区", + "360721": "赣县", + "360722": "信丰县", + "360723": "大余县", + "360724": "上犹县", + "360725": "崇义县", + "360726": "安远县", + "360727": "龙南县", + "360728": "定南县", + "360729": "全南县", + "360730": "宁都县", + "360731": "于都县", + "360732": "兴国县", + "360733": "会昌县", + "360734": "寻乌县", + "360735": "石城县", + "360781": "瑞金市", + "360782": "南康市", + "360783": "其它区", + "360800": "吉安市", + "360802": "吉州区", + "360803": "青原区", + "360821": "吉安县", + "360822": "吉水县", + "360823": "峡江县", + "360824": "新干县", + "360825": "永丰县", + "360826": "泰和县", + "360827": "遂川县", + "360828": "万安县", + "360829": "安福县", + "360830": "永新县", + "360881": "井冈山市", + "360882": "其它区", + "360900": "宜春市", + "360902": "袁州区", + "360921": "奉新县", + "360922": "万载县", + "360923": "上高县", + "360924": "宜丰县", + "360925": "靖安县", + "360926": "铜鼓县", + "360981": "丰城市", + "360982": "樟树市", + "360983": "高安市", + "360984": "其它区", + "361000": "抚州市", + "361002": "临川区", + "361021": "南城县", + "361022": "黎川县", + "361023": "南丰县", + "361024": "崇仁县", + "361025": "乐安县", + "361026": "宜黄县", + "361027": "金溪县", + "361028": "资溪县", + "361029": "东乡县", + "361030": "广昌县", + "361031": "其它区", + "361100": "上饶市", + "361102": "信州区", + "361121": "上饶县", + "361122": "广丰县", + "361123": "玉山县", + "361124": "铅山县", + "361125": "横峰县", + "361126": "弋阳县", + "361127": "余干县", + "361128": "鄱阳县", + "361129": "万年县", + "361130": "婺源县", + "361181": "德兴市", + "361182": "其它区", + "370000": "山东省", + "370100": "济南市", + "370102": "历下区", + "370103": "市中区", + "370104": "槐荫区", + "370105": "天桥区", + "370112": "历城区", + "370113": "长清区", + "370124": "平阴县", + "370125": "济阳县", + "370126": "商河县", + "370181": "章丘市", + "370182": "其它区", + "370200": "青岛市", + "370202": "市南区", + "370203": "市北区", + "370211": "黄岛区", + "370212": "崂山区", + "370213": "李沧区", + "370214": "城阳区", + "370281": "胶州市", + "370282": "即墨市", + "370283": "平度市", + "370285": "莱西市", + "370286": "其它区", + "370300": "淄博市", + "370302": "淄川区", + "370303": "张店区", + "370304": "博山区", + "370305": "临淄区", + "370306": "周村区", + "370321": "桓台县", + "370322": "高青县", + "370323": "沂源县", + "370324": "其它区", + "370400": "枣庄市", + "370402": "市中区", + "370403": "薛城区", + "370404": "峄城区", + "370405": "台儿庄区", + "370406": "山亭区", + "370481": "滕州市", + "370482": "其它区", + "370500": "东营市", + "370502": "东营区", + "370503": "河口区", + "370521": "垦利县", + "370522": "利津县", + "370523": "广饶县", + "370591": "其它区", + "370600": "烟台市", + "370602": "芝罘区", + "370611": "福山区", + "370612": "牟平区", + "370613": "莱山区", + "370634": "长岛县", + "370681": "龙口市", + "370682": "莱阳市", + "370683": "莱州市", + "370684": "蓬莱市", + "370685": "招远市", + "370686": "栖霞市", + "370687": "海阳市", + "370688": "其它区", + "370700": "潍坊市", + "370702": "潍城区", + "370703": "寒亭区", + "370704": "坊子区", + "370705": "奎文区", + "370724": "临朐县", + "370725": "昌乐县", + "370781": "青州市", + "370782": "诸城市", + "370783": "寿光市", + "370784": "安丘市", + "370785": "高密市", + "370786": "昌邑市", + "370787": "其它区", + "370800": "济宁市", + "370802": "市中区", + "370811": "任城区", + "370826": "微山县", + "370827": "鱼台县", + "370828": "金乡县", + "370829": "嘉祥县", + "370830": "汶上县", + "370831": "泗水县", + "370832": "梁山县", + "370881": "曲阜市", + "370882": "兖州市", + "370883": "邹城市", + "370884": "其它区", + "370900": "泰安市", + "370902": "泰山区", + "370903": "岱岳区", + "370921": "宁阳县", + "370923": "东平县", + "370982": "新泰市", + "370983": "肥城市", + "370984": "其它区", + "371000": "威海市", + "371002": "环翠区", + "371081": "文登市", + "371082": "荣成市", + "371083": "乳山市", + "371084": "其它区", + "371100": "日照市", + "371102": "东港区", + "371103": "岚山区", + "371121": "五莲县", + "371122": "莒县", + "371123": "其它区", + "371200": "莱芜市", + "371202": "莱城区", + "371203": "钢城区", + "371204": "其它区", + "371300": "临沂市", + "371302": "兰山区", + "371311": "罗庄区", + "371312": "河东区", + "371321": "沂南县", + "371322": "郯城县", + "371323": "沂水县", + "371324": "苍山县", + "371325": "费县", + "371326": "平邑县", + "371327": "莒南县", + "371328": "蒙阴县", + "371329": "临沭县", + "371330": "其它区", + "371400": "德州市", + "371402": "德城区", + "371421": "陵县", + "371422": "宁津县", + "371423": "庆云县", + "371424": "临邑县", + "371425": "齐河县", + "371426": "平原县", + "371427": "夏津县", + "371428": "武城县", + "371481": "乐陵市", + "371482": "禹城市", + "371483": "其它区", + "371500": "聊城市", + "371502": "东昌府区", + "371521": "阳谷县", + "371522": "莘县", + "371523": "茌平县", + "371524": "东阿县", + "371525": "冠县", + "371526": "高唐县", + "371581": "临清市", + "371582": "其它区", + "371600": "滨州市", + "371602": "滨城区", + "371621": "惠民县", + "371622": "阳信县", + "371623": "无棣县", + "371624": "沾化县", + "371625": "博兴县", + "371626": "邹平县", + "371627": "其它区", + "371700": "菏泽市", + "371702": "牡丹区", + "371721": "曹县", + "371722": "单县", + "371723": "成武县", + "371724": "巨野县", + "371725": "郓城县", + "371726": "鄄城县", + "371727": "定陶县", + "371728": "东明县", + "371729": "其它区", + "410000": "河南省", + "410100": "郑州市", + "410102": "中原区", + "410103": "二七区", + "410104": "管城回族区", + "410105": "金水区", + "410106": "上街区", + "410108": "惠济区", + "410122": "中牟县", + "410181": "巩义市", + "410182": "荥阳市", + "410183": "新密市", + "410184": "新郑市", + "410185": "登封市", + "410188": "其它区", + "410200": "开封市", + "410202": "龙亭区", + "410203": "顺河回族区", + "410204": "鼓楼区", + "410205": "禹王台区", + "410211": "金明区", + "410221": "杞县", + "410222": "通许县", + "410223": "尉氏县", + "410224": "开封县", + "410225": "兰考县", + "410226": "其它区", + "410300": "洛阳市", + "410302": "老城区", + "410303": "西工区", + "410304": "瀍河回族区", + "410305": "涧西区", + "410306": "吉利区", + "410307": "洛龙区", + "410322": "孟津县", + "410323": "新安县", + "410324": "栾川县", + "410325": "嵩县", + "410326": "汝阳县", + "410327": "宜阳县", + "410328": "洛宁县", + "410329": "伊川县", + "410381": "偃师市", + "410400": "平顶山市", + "410402": "新华区", + "410403": "卫东区", + "410404": "石龙区", + "410411": "湛河区", + "410421": "宝丰县", + "410422": "叶县", + "410423": "鲁山县", + "410425": "郏县", + "410481": "舞钢市", + "410482": "汝州市", + "410483": "其它区", + "410500": "安阳市", + "410502": "文峰区", + "410503": "北关区", + "410505": "殷都区", + "410506": "龙安区", + "410522": "安阳县", + "410523": "汤阴县", + "410526": "滑县", + "410527": "内黄县", + "410581": "林州市", + "410582": "其它区", + "410600": "鹤壁市", + "410602": "鹤山区", + "410603": "山城区", + "410611": "淇滨区", + "410621": "浚县", + "410622": "淇县", + "410623": "其它区", + "410700": "新乡市", + "410702": "红旗区", + "410703": "卫滨区", + "410704": "凤泉区", + "410711": "牧野区", + "410721": "新乡县", + "410724": "获嘉县", + "410725": "原阳县", + "410726": "延津县", + "410727": "封丘县", + "410728": "长垣县", + "410781": "卫辉市", + "410782": "辉县市", + "410783": "其它区", + "410800": "焦作市", + "410802": "解放区", + "410803": "中站区", + "410804": "马村区", + "410811": "山阳区", + "410821": "修武县", + "410822": "博爱县", + "410823": "武陟县", + "410825": "温县", + "410881": "济源市", + "410882": "沁阳市", + "410883": "孟州市", + "410884": "其它区", + "410900": "濮阳市", + "410902": "华龙区", + "410922": "清丰县", + "410923": "南乐县", + "410926": "范县", + "410927": "台前县", + "410928": "濮阳县", + "410929": "其它区", + "411000": "许昌市", + "411002": "魏都区", + "411023": "许昌县", + "411024": "鄢陵县", + "411025": "襄城县", + "411081": "禹州市", + "411082": "长葛市", + "411083": "其它区", + "411100": "漯河市", + "411102": "源汇区", + "411103": "郾城区", + "411104": "召陵区", + "411121": "舞阳县", + "411122": "临颍县", + "411123": "其它区", + "411200": "三门峡市", + "411202": "湖滨区", + "411221": "渑池县", + "411222": "陕县", + "411224": "卢氏县", + "411281": "义马市", + "411282": "灵宝市", + "411283": "其它区", + "411300": "南阳市", + "411302": "宛城区", + "411303": "卧龙区", + "411321": "南召县", + "411322": "方城县", + "411323": "西峡县", + "411324": "镇平县", + "411325": "内乡县", + "411326": "淅川县", + "411327": "社旗县", + "411328": "唐河县", + "411329": "新野县", + "411330": "桐柏县", + "411381": "邓州市", + "411382": "其它区", + "411400": "商丘市", + "411402": "梁园区", + "411403": "睢阳区", + "411421": "民权县", + "411422": "睢县", + "411423": "宁陵县", + "411424": "柘城县", + "411425": "虞城县", + "411426": "夏邑县", + "411481": "永城市", + "411482": "其它区", + "411500": "信阳市", + "411502": "浉河区", + "411503": "平桥区", + "411521": "罗山县", + "411522": "光山县", + "411523": "新县", + "411524": "商城县", + "411525": "固始县", + "411526": "潢川县", + "411527": "淮滨县", + "411528": "息县", + "411529": "其它区", + "411600": "周口市", + "411602": "川汇区", + "411621": "扶沟县", + "411622": "西华县", + "411623": "商水县", + "411624": "沈丘县", + "411625": "郸城县", + "411626": "淮阳县", + "411627": "太康县", + "411628": "鹿邑县", + "411681": "项城市", + "411682": "其它区", + "411700": "驻马店市", + "411702": "驿城区", + "411721": "西平县", + "411722": "上蔡县", + "411723": "平舆县", + "411724": "正阳县", + "411725": "确山县", + "411726": "泌阳县", + "411727": "汝南县", + "411728": "遂平县", + "411729": "新蔡县", + "411730": "其它区", + "420000": "湖北省", + "420100": "武汉市", + "420102": "江岸区", + "420103": "江汉区", + "420104": "硚口区", + "420105": "汉阳区", + "420106": "武昌区", + "420107": "青山区", + "420111": "洪山区", + "420112": "东西湖区", + "420113": "汉南区", + "420114": "蔡甸区", + "420115": "江夏区", + "420116": "黄陂区", + "420117": "新洲区", + "420118": "其它区", + "420200": "黄石市", + "420202": "黄石港区", + "420203": "西塞山区", + "420204": "下陆区", + "420205": "铁山区", + "420222": "阳新县", + "420281": "大冶市", + "420282": "其它区", + "420300": "十堰市", + "420302": "茅箭区", + "420303": "张湾区", + "420321": "郧县", + "420322": "郧西县", + "420323": "竹山县", + "420324": "竹溪县", + "420325": "房县", + "420381": "丹江口市", + "420383": "其它区", + "420500": "宜昌市", + "420502": "西陵区", + "420503": "伍家岗区", + "420504": "点军区", + "420505": "猇亭区", + "420506": "夷陵区", + "420525": "远安县", + "420526": "兴山县", + "420527": "秭归县", + "420528": "长阳土家族自治县", + "420529": "五峰土家族自治县", + "420581": "宜都市", + "420582": "当阳市", + "420583": "枝江市", + "420584": "其它区", + "420600": "襄阳市", + "420602": "襄城区", + "420606": "樊城区", + "420607": "襄州区", + "420624": "南漳县", + "420625": "谷城县", + "420626": "保康县", + "420682": "老河口市", + "420683": "枣阳市", + "420684": "宜城市", + "420685": "其它区", + "420700": "鄂州市", + "420702": "梁子湖区", + "420703": "华容区", + "420704": "鄂城区", + "420705": "其它区", + "420800": "荆门市", + "420802": "东宝区", + "420804": "掇刀区", + "420821": "京山县", + "420822": "沙洋县", + "420881": "钟祥市", + "420882": "其它区", + "420900": "孝感市", + "420902": "孝南区", + "420921": "孝昌县", + "420922": "大悟县", + "420923": "云梦县", + "420981": "应城市", + "420982": "安陆市", + "420984": "汉川市", + "420985": "其它区", + "421000": "荆州市", + "421002": "沙市区", + "421003": "荆州区", + "421022": "公安县", + "421023": "监利县", + "421024": "江陵县", + "421081": "石首市", + "421083": "洪湖市", + "421087": "松滋市", + "421088": "其它区", + "421100": "黄冈市", + "421102": "黄州区", + "421121": "团风县", + "421122": "红安县", + "421123": "罗田县", + "421124": "英山县", + "421125": "浠水县", + "421126": "蕲春县", + "421127": "黄梅县", + "421181": "麻城市", + "421182": "武穴市", + "421183": "其它区", + "421200": "咸宁市", + "421202": "咸安区", + "421221": "嘉鱼县", + "421222": "通城县", + "421223": "崇阳县", + "421224": "通山县", + "421281": "赤壁市", + "421283": "其它区", + "421300": "随州市", + "421302": "曾都区", + "421321": "随县", + "421381": "广水市", + "421382": "其它区", + "422800": "恩施土家族苗族自治州", + "422801": "恩施市", + "422802": "利川市", + "422822": "建始县", + "422823": "巴东县", + "422825": "宣恩县", + "422826": "咸丰县", + "422827": "来凤县", + "422828": "鹤峰县", + "422829": "其它区", + "429004": "仙桃市", + "429005": "潜江市", + "429006": "天门市", + "429021": "神农架林区", + "430000": "湖南省", + "430100": "长沙市", + "430102": "芙蓉区", + "430103": "天心区", + "430104": "岳麓区", + "430105": "开福区", + "430111": "雨花区", + "430121": "长沙县", + "430122": "望城区", + "430124": "宁乡县", + "430181": "浏阳市", + "430182": "其它区", + "430200": "株洲市", + "430202": "荷塘区", + "430203": "芦淞区", + "430204": "石峰区", + "430211": "天元区", + "430221": "株洲县", + "430223": "攸县", + "430224": "茶陵县", + "430225": "炎陵县", + "430281": "醴陵市", + "430282": "其它区", + "430300": "湘潭市", + "430302": "雨湖区", + "430304": "岳塘区", + "430321": "湘潭县", + "430381": "湘乡市", + "430382": "韶山市", + "430383": "其它区", + "430400": "衡阳市", + "430405": "珠晖区", + "430406": "雁峰区", + "430407": "石鼓区", + "430408": "蒸湘区", + "430412": "南岳区", + "430421": "衡阳县", + "430422": "衡南县", + "430423": "衡山县", + "430424": "衡东县", + "430426": "祁东县", + "430481": "耒阳市", + "430482": "常宁市", + "430483": "其它区", + "430500": "邵阳市", + "430502": "双清区", + "430503": "大祥区", + "430511": "北塔区", + "430521": "邵东县", + "430522": "新邵县", + "430523": "邵阳县", + "430524": "隆回县", + "430525": "洞口县", + "430527": "绥宁县", + "430528": "新宁县", + "430529": "城步苗族自治县", + "430581": "武冈市", + "430582": "其它区", + "430600": "岳阳市", + "430602": "岳阳楼区", + "430603": "云溪区", + "430611": "君山区", + "430621": "岳阳县", + "430623": "华容县", + "430624": "湘阴县", + "430626": "平江县", + "430681": "汨罗市", + "430682": "临湘市", + "430683": "其它区", + "430700": "常德市", + "430702": "武陵区", + "430703": "鼎城区", + "430721": "安乡县", + "430722": "汉寿县", + "430723": "澧县", + "430724": "临澧县", + "430725": "桃源县", + "430726": "石门县", + "430781": "津市市", + "430782": "其它区", + "430800": "张家界市", + "430802": "永定区", + "430811": "武陵源区", + "430821": "慈利县", + "430822": "桑植县", + "430823": "其它区", + "430900": "益阳市", + "430902": "资阳区", + "430903": "赫山区", + "430921": "南县", + "430922": "桃江县", + "430923": "安化县", + "430981": "沅江市", + "430982": "其它区", + "431000": "郴州市", + "431002": "北湖区", + "431003": "苏仙区", + "431021": "桂阳县", + "431022": "宜章县", + "431023": "永兴县", + "431024": "嘉禾县", + "431025": "临武县", + "431026": "汝城县", + "431027": "桂东县", + "431028": "安仁县", + "431081": "资兴市", + "431082": "其它区", + "431100": "永州市", + "431102": "零陵区", + "431103": "冷水滩区", + "431121": "祁阳县", + "431122": "东安县", + "431123": "双牌县", + "431124": "道县", + "431125": "江永县", + "431126": "宁远县", + "431127": "蓝山县", + "431128": "新田县", + "431129": "江华瑶族自治县", + "431130": "其它区", + "431200": "怀化市", + "431202": "鹤城区", + "431221": "中方县", + "431222": "沅陵县", + "431223": "辰溪县", + "431224": "溆浦县", + "431225": "会同县", + "431226": "麻阳苗族自治县", + "431227": "新晃侗族自治县", + "431228": "芷江侗族自治县", + "431229": "靖州苗族侗族自治县", + "431230": "通道侗族自治县", + "431281": "洪江市", + "431282": "其它区", + "431300": "娄底市", + "431302": "娄星区", + "431321": "双峰县", + "431322": "新化县", + "431381": "冷水江市", + "431382": "涟源市", + "431383": "其它区", + "433100": "湘西土家族苗族自治州", + "433101": "吉首市", + "433122": "泸溪县", + "433123": "凤凰县", + "433124": "花垣县", + "433125": "保靖县", + "433126": "古丈县", + "433127": "永顺县", + "433130": "龙山县", + "433131": "其它区", + "440000": "广东省", + "440100": "广州市", + "440103": "荔湾区", + "440104": "越秀区", + "440105": "海珠区", + "440106": "天河区", + "440111": "白云区", + "440112": "黄埔区", + "440113": "番禺区", + "440114": "花都区", + "440115": "南沙区", + "440116": "萝岗区", + "440183": "增城市", + "440184": "从化市", + "440189": "其它区", + "440200": "韶关市", + "440203": "武江区", + "440204": "浈江区", + "440205": "曲江区", + "440222": "始兴县", + "440224": "仁化县", + "440229": "翁源县", + "440232": "乳源瑶族自治县", + "440233": "新丰县", + "440281": "乐昌市", + "440282": "南雄市", + "440283": "其它区", + "440300": "深圳市", + "440303": "罗湖区", + "440304": "福田区", + "440305": "南山区", + "440306": "宝安区", + "440307": "龙岗区", + "440308": "盐田区", + "440309": "其它区", + "440320": "光明新区", + "440321": "坪山新区", + "440322": "大鹏新区", + "440323": "龙华新区", + "440400": "珠海市", + "440402": "香洲区", + "440403": "斗门区", + "440404": "金湾区", + "440488": "其它区", + "440500": "汕头市", + "440507": "龙湖区", + "440511": "金平区", + "440512": "濠江区", + "440513": "潮阳区", + "440514": "潮南区", + "440515": "澄海区", + "440523": "南澳县", + "440524": "其它区", + "440600": "佛山市", + "440604": "禅城区", + "440605": "南海区", + "440606": "顺德区", + "440607": "三水区", + "440608": "高明区", + "440609": "其它区", + "440700": "江门市", + "440703": "蓬江区", + "440704": "江海区", + "440705": "新会区", + "440781": "台山市", + "440783": "开平市", + "440784": "鹤山市", + "440785": "恩平市", + "440786": "其它区", + "440800": "湛江市", + "440802": "赤坎区", + "440803": "霞山区", + "440804": "坡头区", + "440811": "麻章区", + "440823": "遂溪县", + "440825": "徐闻县", + "440881": "廉江市", + "440882": "雷州市", + "440883": "吴川市", + "440884": "其它区", + "440900": "茂名市", + "440902": "茂南区", + "440903": "茂港区", + "440923": "电白县", + "440981": "高州市", + "440982": "化州市", + "440983": "信宜市", + "440984": "其它区", + "441200": "肇庆市", + "441202": "端州区", + "441203": "鼎湖区", + "441223": "广宁县", + "441224": "怀集县", + "441225": "封开县", + "441226": "德庆县", + "441283": "高要市", + "441284": "四会市", + "441285": "其它区", + "441300": "惠州市", + "441302": "惠城区", + "441303": "惠阳区", + "441322": "博罗县", + "441323": "惠东县", + "441324": "龙门县", + "441325": "其它区", + "441400": "梅州市", + "441402": "梅江区", + "441421": "梅县", + "441422": "大埔县", + "441423": "丰顺县", + "441424": "五华县", + "441426": "平远县", + "441427": "蕉岭县", + "441481": "兴宁市", + "441482": "其它区", + "441500": "汕尾市", + "441502": "城区", + "441521": "海丰县", + "441523": "陆河县", + "441581": "陆丰市", + "441582": "其它区", + "441600": "河源市", + "441602": "源城区", + "441621": "紫金县", + "441622": "龙川县", + "441623": "连平县", + "441624": "和平县", + "441625": "东源县", + "441626": "其它区", + "441700": "阳江市", + "441702": "江城区", + "441721": "阳西县", + "441723": "阳东县", + "441781": "阳春市", + "441782": "其它区", + "441800": "清远市", + "441802": "清城区", + "441821": "佛冈县", + "441823": "阳山县", + "441825": "连山壮族瑶族自治县", + "441826": "连南瑶族自治县", + "441827": "清新区", + "441881": "英德市", + "441882": "连州市", + "441883": "其它区", + "441900": "东莞市", + "442000": "中山市", + "442101": "东沙群岛", + "445100": "潮州市", + "445102": "湘桥区", + "445121": "潮安区", + "445122": "饶平县", + "445186": "其它区", + "445200": "揭阳市", + "445202": "榕城区", + "445221": "揭东区", + "445222": "揭西县", + "445224": "惠来县", + "445281": "普宁市", + "445285": "其它区", + "445300": "云浮市", + "445302": "云城区", + "445321": "新兴县", + "445322": "郁南县", + "445323": "云安县", + "445381": "罗定市", + "445382": "其它区", + "450000": "广西壮族自治区", + "450100": "南宁市", + "450102": "兴宁区", + "450103": "青秀区", + "450105": "江南区", + "450107": "西乡塘区", + "450108": "良庆区", + "450109": "邕宁区", + "450122": "武鸣县", + "450123": "隆安县", + "450124": "马山县", + "450125": "上林县", + "450126": "宾阳县", + "450127": "横县", + "450128": "其它区", + "450200": "柳州市", + "450202": "城中区", + "450203": "鱼峰区", + "450204": "柳南区", + "450205": "柳北区", + "450221": "柳江县", + "450222": "柳城县", + "450223": "鹿寨县", + "450224": "融安县", + "450225": "融水苗族自治县", + "450226": "三江侗族自治县", + "450227": "其它区", + "450300": "桂林市", + "450302": "秀峰区", + "450303": "叠彩区", + "450304": "象山区", + "450305": "七星区", + "450311": "雁山区", + "450321": "阳朔县", + "450322": "临桂区", + "450323": "灵川县", + "450324": "全州县", + "450325": "兴安县", + "450326": "永福县", + "450327": "灌阳县", + "450328": "龙胜各族自治县", + "450329": "资源县", + "450330": "平乐县", + "450331": "荔浦县", + "450332": "恭城瑶族自治县", + "450333": "其它区", + "450400": "梧州市", + "450403": "万秀区", + "450405": "长洲区", + "450406": "龙圩区", + "450421": "苍梧县", + "450422": "藤县", + "450423": "蒙山县", + "450481": "岑溪市", + "450482": "其它区", + "450500": "北海市", + "450502": "海城区", + "450503": "银海区", + "450512": "铁山港区", + "450521": "合浦县", + "450522": "其它区", + "450600": "防城港市", + "450602": "港口区", + "450603": "防城区", + "450621": "上思县", + "450681": "东兴市", + "450682": "其它区", + "450700": "钦州市", + "450702": "钦南区", + "450703": "钦北区", + "450721": "灵山县", + "450722": "浦北县", + "450723": "其它区", + "450800": "贵港市", + "450802": "港北区", + "450803": "港南区", + "450804": "覃塘区", + "450821": "平南县", + "450881": "桂平市", + "450882": "其它区", + "450900": "玉林市", + "450902": "玉州区", + "450903": "福绵区", + "450921": "容县", + "450922": "陆川县", + "450923": "博白县", + "450924": "兴业县", + "450981": "北流市", + "450982": "其它区", + "451000": "百色市", + "451002": "右江区", + "451021": "田阳县", + "451022": "田东县", + "451023": "平果县", + "451024": "德保县", + "451025": "靖西县", + "451026": "那坡县", + "451027": "凌云县", + "451028": "乐业县", + "451029": "田林县", + "451030": "西林县", + "451031": "隆林各族自治县", + "451032": "其它区", + "451100": "贺州市", + "451102": "八步区", + "451119": "平桂管理区", + "451121": "昭平县", + "451122": "钟山县", + "451123": "富川瑶族自治县", + "451124": "其它区", + "451200": "河池市", + "451202": "金城江区", + "451221": "南丹县", + "451222": "天峨县", + "451223": "凤山县", + "451224": "东兰县", + "451225": "罗城仫佬族自治县", + "451226": "环江毛南族自治县", + "451227": "巴马瑶族自治县", + "451228": "都安瑶族自治县", + "451229": "大化瑶族自治县", + "451281": "宜州市", + "451282": "其它区", + "451300": "来宾市", + "451302": "兴宾区", + "451321": "忻城县", + "451322": "象州县", + "451323": "武宣县", + "451324": "金秀瑶族自治县", + "451381": "合山市", + "451382": "其它区", + "451400": "崇左市", + "451402": "江州区", + "451421": "扶绥县", + "451422": "宁明县", + "451423": "龙州县", + "451424": "大新县", + "451425": "天等县", + "451481": "凭祥市", + "451482": "其它区", + "460000": "海南省", + "460100": "海口市", + "460105": "秀英区", + "460106": "龙华区", + "460107": "琼山区", + "460108": "美兰区", + "460109": "其它区", + "460200": "三亚市", + "460300": "三沙市", + "460321": "西沙群岛", + "460322": "南沙群岛", + "460323": "中沙群岛的岛礁及其海域", + "469001": "五指山市", + "469002": "琼海市", + "469003": "儋州市", + "469005": "文昌市", + "469006": "万宁市", + "469007": "东方市", + "469025": "定安县", + "469026": "屯昌县", + "469027": "澄迈县", + "469028": "临高县", + "469030": "白沙黎族自治县", + "469031": "昌江黎族自治县", + "469033": "乐东黎族自治县", + "469034": "陵水黎族自治县", + "469035": "保亭黎族苗族自治县", + "469036": "琼中黎族苗族自治县", + "471005": "其它区", + "500000": "重庆", + "500100": "重庆市", + "500101": "万州区", + "500102": "涪陵区", + "500103": "渝中区", + "500104": "大渡口区", + "500105": "江北区", + "500106": "沙坪坝区", + "500107": "九龙坡区", + "500108": "南岸区", + "500109": "北碚区", + "500110": "万盛区", + "500111": "双桥区", + "500112": "渝北区", + "500113": "巴南区", + "500114": "黔江区", + "500115": "长寿区", + "500222": "綦江区", + "500223": "潼南县", + "500224": "铜梁县", + "500225": "大足区", + "500226": "荣昌县", + "500227": "璧山县", + "500228": "梁平县", + "500229": "城口县", + "500230": "丰都县", + "500231": "垫江县", + "500232": "武隆县", + "500233": "忠县", + "500234": "开县", + "500235": "云阳县", + "500236": "奉节县", + "500237": "巫山县", + "500238": "巫溪县", + "500240": "石柱土家族自治县", + "500241": "秀山土家族苗族自治县", + "500242": "酉阳土家族苗族自治县", + "500243": "彭水苗族土家族自治县", + "500381": "江津区", + "500382": "合川区", + "500383": "永川区", + "500384": "南川区", + "500385": "其它区", + "510000": "四川省", + "510100": "成都市", + "510104": "锦江区", + "510105": "青羊区", + "510106": "金牛区", + "510107": "武侯区", + "510108": "成华区", + "510112": "龙泉驿区", + "510113": "青白江区", + "510114": "新都区", + "510115": "温江区", + "510121": "金堂县", + "510122": "双流县", + "510124": "郫县", + "510129": "大邑县", + "510131": "蒲江县", + "510132": "新津县", + "510181": "都江堰市", + "510182": "彭州市", + "510183": "邛崃市", + "510184": "崇州市", + "510185": "其它区", + "510300": "自贡市", + "510302": "自流井区", + "510303": "贡井区", + "510304": "大安区", + "510311": "沿滩区", + "510321": "荣县", + "510322": "富顺县", + "510323": "其它区", + "510400": "攀枝花市", + "510402": "东区", + "510403": "西区", + "510411": "仁和区", + "510421": "米易县", + "510422": "盐边县", + "510423": "其它区", + "510500": "泸州市", + "510502": "江阳区", + "510503": "纳溪区", + "510504": "龙马潭区", + "510521": "泸县", + "510522": "合江县", + "510524": "叙永县", + "510525": "古蔺县", + "510526": "其它区", + "510600": "德阳市", + "510603": "旌阳区", + "510623": "中江县", + "510626": "罗江县", + "510681": "广汉市", + "510682": "什邡市", + "510683": "绵竹市", + "510684": "其它区", + "510700": "绵阳市", + "510703": "涪城区", + "510704": "游仙区", + "510722": "三台县", + "510723": "盐亭县", + "510724": "安县", + "510725": "梓潼县", + "510726": "北川羌族自治县", + "510727": "平武县", + "510781": "江油市", + "510782": "其它区", + "510800": "广元市", + "510802": "利州区", + "510811": "昭化区", + "510812": "朝天区", + "510821": "旺苍县", + "510822": "青川县", + "510823": "剑阁县", + "510824": "苍溪县", + "510825": "其它区", + "510900": "遂宁市", + "510903": "船山区", + "510904": "安居区", + "510921": "蓬溪县", + "510922": "射洪县", + "510923": "大英县", + "510924": "其它区", + "511000": "内江市", + "511002": "市中区", + "511011": "东兴区", + "511024": "威远县", + "511025": "资中县", + "511028": "隆昌县", + "511029": "其它区", + "511100": "乐山市", + "511102": "市中区", + "511111": "沙湾区", + "511112": "五通桥区", + "511113": "金口河区", + "511123": "犍为县", + "511124": "井研县", + "511126": "夹江县", + "511129": "沐川县", + "511132": "峨边彝族自治县", + "511133": "马边彝族自治县", + "511181": "峨眉山市", + "511182": "其它区", + "511300": "南充市", + "511302": "顺庆区", + "511303": "高坪区", + "511304": "嘉陵区", + "511321": "南部县", + "511322": "营山县", + "511323": "蓬安县", + "511324": "仪陇县", + "511325": "西充县", + "511381": "阆中市", + "511382": "其它区", + "511400": "眉山市", + "511402": "东坡区", + "511421": "仁寿县", + "511422": "彭山县", + "511423": "洪雅县", + "511424": "丹棱县", + "511425": "青神县", + "511426": "其它区", + "511500": "宜宾市", + "511502": "翠屏区", + "511521": "宜宾县", + "511522": "南溪区", + "511523": "江安县", + "511524": "长宁县", + "511525": "高县", + "511526": "珙县", + "511527": "筠连县", + "511528": "兴文县", + "511529": "屏山县", + "511530": "其它区", + "511600": "广安市", + "511602": "广安区", + "511603": "前锋区", + "511621": "岳池县", + "511622": "武胜县", + "511623": "邻水县", + "511681": "华蓥市", + "511683": "其它区", + "511700": "达州市", + "511702": "通川区", + "511721": "达川区", + "511722": "宣汉县", + "511723": "开江县", + "511724": "大竹县", + "511725": "渠县", + "511781": "万源市", + "511782": "其它区", + "511800": "雅安市", + "511802": "雨城区", + "511821": "名山区", + "511822": "荥经县", + "511823": "汉源县", + "511824": "石棉县", + "511825": "天全县", + "511826": "芦山县", + "511827": "宝兴县", + "511828": "其它区", + "511900": "巴中市", + "511902": "巴州区", + "511903": "恩阳区", + "511921": "通江县", + "511922": "南江县", + "511923": "平昌县", + "511924": "其它区", + "512000": "资阳市", + "512002": "雁江区", + "512021": "安岳县", + "512022": "乐至县", + "512081": "简阳市", + "512082": "其它区", + "513200": "阿坝藏族羌族自治州", + "513221": "汶川县", + "513222": "理县", + "513223": "茂县", + "513224": "松潘县", + "513225": "九寨沟县", + "513226": "金川县", + "513227": "小金县", + "513228": "黑水县", + "513229": "马尔康县", + "513230": "壤塘县", + "513231": "阿坝县", + "513232": "若尔盖县", + "513233": "红原县", + "513234": "其它区", + "513300": "甘孜藏族自治州", + "513321": "康定县", + "513322": "泸定县", + "513323": "丹巴县", + "513324": "九龙县", + "513325": "雅江县", + "513326": "道孚县", + "513327": "炉霍县", + "513328": "甘孜县", + "513329": "新龙县", + "513330": "德格县", + "513331": "白玉县", + "513332": "石渠县", + "513333": "色达县", + "513334": "理塘县", + "513335": "巴塘县", + "513336": "乡城县", + "513337": "稻城县", + "513338": "得荣县", + "513339": "其它区", + "513400": "凉山彝族自治州", + "513401": "西昌市", + "513422": "木里藏族自治县", + "513423": "盐源县", + "513424": "德昌县", + "513425": "会理县", + "513426": "会东县", + "513427": "宁南县", + "513428": "普格县", + "513429": "布拖县", + "513430": "金阳县", + "513431": "昭觉县", + "513432": "喜德县", + "513433": "冕宁县", + "513434": "越西县", + "513435": "甘洛县", + "513436": "美姑县", + "513437": "雷波县", + "513438": "其它区", + "520000": "贵州省", + "520100": "贵阳市", + "520102": "南明区", + "520103": "云岩区", + "520111": "花溪区", + "520112": "乌当区", + "520113": "白云区", + "520121": "开阳县", + "520122": "息烽县", + "520123": "修文县", + "520151": "观山湖区", + "520181": "清镇市", + "520182": "其它区", + "520200": "六盘水市", + "520201": "钟山区", + "520203": "六枝特区", + "520221": "水城县", + "520222": "盘县", + "520223": "其它区", + "520300": "遵义市", + "520302": "红花岗区", + "520303": "汇川区", + "520321": "遵义县", + "520322": "桐梓县", + "520323": "绥阳县", + "520324": "正安县", + "520325": "道真仡佬族苗族自治县", + "520326": "务川仡佬族苗族自治县", + "520327": "凤冈县", + "520328": "湄潭县", + "520329": "余庆县", + "520330": "习水县", + "520381": "赤水市", + "520382": "仁怀市", + "520383": "其它区", + "520400": "安顺市", + "520402": "西秀区", + "520421": "平坝县", + "520422": "普定县", + "520423": "镇宁布依族苗族自治县", + "520424": "关岭布依族苗族自治县", + "520425": "紫云苗族布依族自治县", + "520426": "其它区", + "522200": "铜仁市", + "522201": "碧江区", + "522222": "江口县", + "522223": "玉屏侗族自治县", + "522224": "石阡县", + "522225": "思南县", + "522226": "印江土家族苗族自治县", + "522227": "德江县", + "522228": "沿河土家族自治县", + "522229": "松桃苗族自治县", + "522230": "万山区", + "522231": "其它区", + "522300": "黔西南布依族苗族自治州", + "522301": "兴义市", + "522322": "兴仁县", + "522323": "普安县", + "522324": "晴隆县", + "522325": "贞丰县", + "522326": "望谟县", + "522327": "册亨县", + "522328": "安龙县", + "522329": "其它区", + "522400": "毕节市", + "522401": "七星关区", + "522422": "大方县", + "522423": "黔西县", + "522424": "金沙县", + "522425": "织金县", + "522426": "纳雍县", + "522427": "威宁彝族回族苗族自治县", + "522428": "赫章县", + "522429": "其它区", + "522600": "黔东南苗族侗族自治州", + "522601": "凯里市", + "522622": "黄平县", + "522623": "施秉县", + "522624": "三穗县", + "522625": "镇远县", + "522626": "岑巩县", + "522627": "天柱县", + "522628": "锦屏县", + "522629": "剑河县", + "522630": "台江县", + "522631": "黎平县", + "522632": "榕江县", + "522633": "从江县", + "522634": "雷山县", + "522635": "麻江县", + "522636": "丹寨县", + "522637": "其它区", + "522700": "黔南布依族苗族自治州", + "522701": "都匀市", + "522702": "福泉市", + "522722": "荔波县", + "522723": "贵定县", + "522725": "瓮安县", + "522726": "独山县", + "522727": "平塘县", + "522728": "罗甸县", + "522729": "长顺县", + "522730": "龙里县", + "522731": "惠水县", + "522732": "三都水族自治县", + "522733": "其它区", + "530000": "云南省", + "530100": "昆明市", + "530102": "五华区", + "530103": "盘龙区", + "530111": "官渡区", + "530112": "西山区", + "530113": "东川区", + "530121": "呈贡区", + "530122": "晋宁县", + "530124": "富民县", + "530125": "宜良县", + "530126": "石林彝族自治县", + "530127": "嵩明县", + "530128": "禄劝彝族苗族自治县", + "530129": "寻甸回族彝族自治县", + "530181": "安宁市", + "530182": "其它区", + "530300": "曲靖市", + "530302": "麒麟区", + "530321": "马龙县", + "530322": "陆良县", + "530323": "师宗县", + "530324": "罗平县", + "530325": "富源县", + "530326": "会泽县", + "530328": "沾益县", + "530381": "宣威市", + "530382": "其它区", + "530400": "玉溪市", + "530402": "红塔区", + "530421": "江川县", + "530422": "澄江县", + "530423": "通海县", + "530424": "华宁县", + "530425": "易门县", + "530426": "峨山彝族自治县", + "530427": "新平彝族傣族自治县", + "530428": "元江哈尼族彝族傣族自治县", + "530429": "其它区", + "530500": "保山市", + "530502": "隆阳区", + "530521": "施甸县", + "530522": "腾冲县", + "530523": "龙陵县", + "530524": "昌宁县", + "530525": "其它区", + "530600": "昭通市", + "530602": "昭阳区", + "530621": "鲁甸县", + "530622": "巧家县", + "530623": "盐津县", + "530624": "大关县", + "530625": "永善县", + "530626": "绥江县", + "530627": "镇雄县", + "530628": "彝良县", + "530629": "威信县", + "530630": "水富县", + "530631": "其它区", + "530700": "丽江市", + "530702": "古城区", + "530721": "玉龙纳西族自治县", + "530722": "永胜县", + "530723": "华坪县", + "530724": "宁蒗彝族自治县", + "530725": "其它区", + "530800": "普洱市", + "530802": "思茅区", + "530821": "宁洱哈尼族彝族自治县", + "530822": "墨江哈尼族自治县", + "530823": "景东彝族自治县", + "530824": "景谷傣族彝族自治县", + "530825": "镇沅彝族哈尼族拉祜族自治县", + "530826": "江城哈尼族彝族自治县", + "530827": "孟连傣族拉祜族佤族自治县", + "530828": "澜沧拉祜族自治县", + "530829": "西盟佤族自治县", + "530830": "其它区", + "530900": "临沧市", + "530902": "临翔区", + "530921": "凤庆县", + "530922": "云县", + "530923": "永德县", + "530924": "镇康县", + "530925": "双江拉祜族佤族布朗族傣族自治县", + "530926": "耿马傣族佤族自治县", + "530927": "沧源佤族自治县", + "530928": "其它区", + "532300": "楚雄彝族自治州", + "532301": "楚雄市", + "532322": "双柏县", + "532323": "牟定县", + "532324": "南华县", + "532325": "姚安县", + "532326": "大姚县", + "532327": "永仁县", + "532328": "元谋县", + "532329": "武定县", + "532331": "禄丰县", + "532332": "其它区", + "532500": "红河哈尼族彝族自治州", + "532501": "个旧市", + "532502": "开远市", + "532522": "蒙自市", + "532523": "屏边苗族自治县", + "532524": "建水县", + "532525": "石屏县", + "532526": "弥勒市", + "532527": "泸西县", + "532528": "元阳县", + "532529": "红河县", + "532530": "金平苗族瑶族傣族自治县", + "532531": "绿春县", + "532532": "河口瑶族自治县", + "532533": "其它区", + "532600": "文山壮族苗族自治州", + "532621": "文山市", + "532622": "砚山县", + "532623": "西畴县", + "532624": "麻栗坡县", + "532625": "马关县", + "532626": "丘北县", + "532627": "广南县", + "532628": "富宁县", + "532629": "其它区", + "532800": "西双版纳傣族自治州", + "532801": "景洪市", + "532822": "勐海县", + "532823": "勐腊县", + "532824": "其它区", + "532900": "大理白族自治州", + "532901": "大理市", + "532922": "漾濞彝族自治县", + "532923": "祥云县", + "532924": "宾川县", + "532925": "弥渡县", + "532926": "南涧彝族自治县", + "532927": "巍山彝族回族自治县", + "532928": "永平县", + "532929": "云龙县", + "532930": "洱源县", + "532931": "剑川县", + "532932": "鹤庆县", + "532933": "其它区", + "533100": "德宏傣族景颇族自治州", + "533102": "瑞丽市", + "533103": "芒市", + "533122": "梁河县", + "533123": "盈江县", + "533124": "陇川县", + "533125": "其它区", + "533300": "怒江傈僳族自治州", + "533321": "泸水县", + "533323": "福贡县", + "533324": "贡山独龙族怒族自治县", + "533325": "兰坪白族普米族自治县", + "533326": "其它区", + "533400": "迪庆藏族自治州", + "533421": "香格里拉县", + "533422": "德钦县", + "533423": "维西傈僳族自治县", + "533424": "其它区", + "540000": "西藏自治区", + "540100": "拉萨市", + "540102": "城关区", + "540121": "林周县", + "540122": "当雄县", + "540123": "尼木县", + "540124": "曲水县", + "540125": "堆龙德庆县", + "540126": "达孜县", + "540127": "墨竹工卡县", + "540128": "其它区", + "542100": "昌都地区", + "542121": "昌都县", + "542122": "江达县", + "542123": "贡觉县", + "542124": "类乌齐县", + "542125": "丁青县", + "542126": "察雅县", + "542127": "八宿县", + "542128": "左贡县", + "542129": "芒康县", + "542132": "洛隆县", + "542133": "边坝县", + "542134": "其它区", + "542200": "山南地区", + "542221": "乃东县", + "542222": "扎囊县", + "542223": "贡嘎县", + "542224": "桑日县", + "542225": "琼结县", + "542226": "曲松县", + "542227": "措美县", + "542228": "洛扎县", + "542229": "加查县", + "542231": "隆子县", + "542232": "错那县", + "542233": "浪卡子县", + "542234": "其它区", + "542300": "日喀则地区", + "542301": "日喀则市", + "542322": "南木林县", + "542323": "江孜县", + "542324": "定日县", + "542325": "萨迦县", + "542326": "拉孜县", + "542327": "昂仁县", + "542328": "谢通门县", + "542329": "白朗县", + "542330": "仁布县", + "542331": "康马县", + "542332": "定结县", + "542333": "仲巴县", + "542334": "亚东县", + "542335": "吉隆县", + "542336": "聂拉木县", + "542337": "萨嘎县", + "542338": "岗巴县", + "542339": "其它区", + "542400": "那曲地区", + "542421": "那曲县", + "542422": "嘉黎县", + "542423": "比如县", + "542424": "聂荣县", + "542425": "安多县", + "542426": "申扎县", + "542427": "索县", + "542428": "班戈县", + "542429": "巴青县", + "542430": "尼玛县", + "542431": "其它区", + "542432": "双湖县", + "542500": "阿里地区", + "542521": "普兰县", + "542522": "札达县", + "542523": "噶尔县", + "542524": "日土县", + "542525": "革吉县", + "542526": "改则县", + "542527": "措勤县", + "542528": "其它区", + "542600": "林芝地区", + "542621": "林芝县", + "542622": "工布江达县", + "542623": "米林县", + "542624": "墨脱县", + "542625": "波密县", + "542626": "察隅县", + "542627": "朗县", + "542628": "其它区", + "610000": "陕西省", + "610100": "西安市", + "610102": "新城区", + "610103": "碑林区", + "610104": "莲湖区", + "610111": "灞桥区", + "610112": "未央区", + "610113": "雁塔区", + "610114": "阎良区", + "610115": "临潼区", + "610116": "长安区", + "610122": "蓝田县", + "610124": "周至县", + "610125": "户县", + "610126": "高陵县", + "610127": "其它区", + "610200": "铜川市", + "610202": "王益区", + "610203": "印台区", + "610204": "耀州区", + "610222": "宜君县", + "610223": "其它区", + "610300": "宝鸡市", + "610302": "渭滨区", + "610303": "金台区", + "610304": "陈仓区", + "610322": "凤翔县", + "610323": "岐山县", + "610324": "扶风县", + "610326": "眉县", + "610327": "陇县", + "610328": "千阳县", + "610329": "麟游县", + "610330": "凤县", + "610331": "太白县", + "610332": "其它区", + "610400": "咸阳市", + "610402": "秦都区", + "610403": "杨陵区", + "610404": "渭城区", + "610422": "三原县", + "610423": "泾阳县", + "610424": "乾县", + "610425": "礼泉县", + "610426": "永寿县", + "610427": "彬县", + "610428": "长武县", + "610429": "旬邑县", + "610430": "淳化县", + "610431": "武功县", + "610481": "兴平市", + "610482": "其它区", + "610500": "渭南市", + "610502": "临渭区", + "610521": "华县", + "610522": "潼关县", + "610523": "大荔县", + "610524": "合阳县", + "610525": "澄城县", + "610526": "蒲城县", + "610527": "白水县", + "610528": "富平县", + "610581": "韩城市", + "610582": "华阴市", + "610583": "其它区", + "610600": "延安市", + "610602": "宝塔区", + "610621": "延长县", + "610622": "延川县", + "610623": "子长县", + "610624": "安塞县", + "610625": "志丹县", + "610626": "吴起县", + "610627": "甘泉县", + "610628": "富县", + "610629": "洛川县", + "610630": "宜川县", + "610631": "黄龙县", + "610632": "黄陵县", + "610633": "其它区", + "610700": "汉中市", + "610702": "汉台区", + "610721": "南郑县", + "610722": "城固县", + "610723": "洋县", + "610724": "西乡县", + "610725": "勉县", + "610726": "宁强县", + "610727": "略阳县", + "610728": "镇巴县", + "610729": "留坝县", + "610730": "佛坪县", + "610731": "其它区", + "610800": "榆林市", + "610802": "榆阳区", + "610821": "神木县", + "610822": "府谷县", + "610823": "横山县", + "610824": "靖边县", + "610825": "定边县", + "610826": "绥德县", + "610827": "米脂县", + "610828": "佳县", + "610829": "吴堡县", + "610830": "清涧县", + "610831": "子洲县", + "610832": "其它区", + "610900": "安康市", + "610902": "汉滨区", + "610921": "汉阴县", + "610922": "石泉县", + "610923": "宁陕县", + "610924": "紫阳县", + "610925": "岚皋县", + "610926": "平利县", + "610927": "镇坪县", + "610928": "旬阳县", + "610929": "白河县", + "610930": "其它区", + "611000": "商洛市", + "611002": "商州区", + "611021": "洛南县", + "611022": "丹凤县", + "611023": "商南县", + "611024": "山阳县", + "611025": "镇安县", + "611026": "柞水县", + "611027": "其它区", + "620000": "甘肃省", + "620100": "兰州市", + "620102": "城关区", + "620103": "七里河区", + "620104": "西固区", + "620105": "安宁区", + "620111": "红古区", + "620121": "永登县", + "620122": "皋兰县", + "620123": "榆中县", + "620124": "其它区", + "620200": "嘉峪关市", + "620300": "金昌市", + "620302": "金川区", + "620321": "永昌县", + "620322": "其它区", + "620400": "白银市", + "620402": "白银区", + "620403": "平川区", + "620421": "靖远县", + "620422": "会宁县", + "620423": "景泰县", + "620424": "其它区", + "620500": "天水市", + "620502": "秦州区", + "620503": "麦积区", + "620521": "清水县", + "620522": "秦安县", + "620523": "甘谷县", + "620524": "武山县", + "620525": "张家川回族自治县", + "620526": "其它区", + "620600": "武威市", + "620602": "凉州区", + "620621": "民勤县", + "620622": "古浪县", + "620623": "天祝藏族自治县", + "620624": "其它区", + "620700": "张掖市", + "620702": "甘州区", + "620721": "肃南裕固族自治县", + "620722": "民乐县", + "620723": "临泽县", + "620724": "高台县", + "620725": "山丹县", + "620726": "其它区", + "620800": "平凉市", + "620802": "崆峒区", + "620821": "泾川县", + "620822": "灵台县", + "620823": "崇信县", + "620824": "华亭县", + "620825": "庄浪县", + "620826": "静宁县", + "620827": "其它区", + "620900": "酒泉市", + "620902": "肃州区", + "620921": "金塔县", + "620922": "瓜州县", + "620923": "肃北蒙古族自治县", + "620924": "阿克塞哈萨克族自治县", + "620981": "玉门市", + "620982": "敦煌市", + "620983": "其它区", + "621000": "庆阳市", + "621002": "西峰区", + "621021": "庆城县", + "621022": "环县", + "621023": "华池县", + "621024": "合水县", + "621025": "正宁县", + "621026": "宁县", + "621027": "镇原县", + "621028": "其它区", + "621100": "定西市", + "621102": "安定区", + "621121": "通渭县", + "621122": "陇西县", + "621123": "渭源县", + "621124": "临洮县", + "621125": "漳县", + "621126": "岷县", + "621127": "其它区", + "621200": "陇南市", + "621202": "武都区", + "621221": "成县", + "621222": "文县", + "621223": "宕昌县", + "621224": "康县", + "621225": "西和县", + "621226": "礼县", + "621227": "徽县", + "621228": "两当县", + "621229": "其它区", + "622900": "临夏回族自治州", + "622901": "临夏市", + "622921": "临夏县", + "622922": "康乐县", + "622923": "永靖县", + "622924": "广河县", + "622925": "和政县", + "622926": "东乡族自治县", + "622927": "积石山保安族东乡族撒拉族自治县", + "622928": "其它区", + "623000": "甘南藏族自治州", + "623001": "合作市", + "623021": "临潭县", + "623022": "卓尼县", + "623023": "舟曲县", + "623024": "迭部县", + "623025": "玛曲县", + "623026": "碌曲县", + "623027": "夏河县", + "623028": "其它区", + "630000": "青海省", + "630100": "西宁市", + "630102": "城东区", + "630103": "城中区", + "630104": "城西区", + "630105": "城北区", + "630121": "大通回族土族自治县", + "630122": "湟中县", + "630123": "湟源县", + "630124": "其它区", + "632100": "海东市", + "632121": "平安县", + "632122": "民和回族土族自治县", + "632123": "乐都区", + "632126": "互助土族自治县", + "632127": "化隆回族自治县", + "632128": "循化撒拉族自治县", + "632129": "其它区", + "632200": "海北藏族自治州", + "632221": "门源回族自治县", + "632222": "祁连县", + "632223": "海晏县", + "632224": "刚察县", + "632225": "其它区", + "632300": "黄南藏族自治州", + "632321": "同仁县", + "632322": "尖扎县", + "632323": "泽库县", + "632324": "河南蒙古族自治县", + "632325": "其它区", + "632500": "海南藏族自治州", + "632521": "共和县", + "632522": "同德县", + "632523": "贵德县", + "632524": "兴海县", + "632525": "贵南县", + "632526": "其它区", + "632600": "果洛藏族自治州", + "632621": "玛沁县", + "632622": "班玛县", + "632623": "甘德县", + "632624": "达日县", + "632625": "久治县", + "632626": "玛多县", + "632627": "其它区", + "632700": "玉树藏族自治州", + "632721": "玉树市", + "632722": "杂多县", + "632723": "称多县", + "632724": "治多县", + "632725": "囊谦县", + "632726": "曲麻莱县", + "632727": "其它区", + "632800": "海西蒙古族藏族自治州", + "632801": "格尔木市", + "632802": "德令哈市", + "632821": "乌兰县", + "632822": "都兰县", + "632823": "天峻县", + "632824": "其它区", + "640000": "宁夏回族自治区", + "640100": "银川市", + "640104": "兴庆区", + "640105": "西夏区", + "640106": "金凤区", + "640121": "永宁县", + "640122": "贺兰县", + "640181": "灵武市", + "640182": "其它区", + "640200": "石嘴山市", + "640202": "大武口区", + "640205": "惠农区", + "640221": "平罗县", + "640222": "其它区", + "640300": "吴忠市", + "640302": "利通区", + "640303": "红寺堡区", + "640323": "盐池县", + "640324": "同心县", + "640381": "青铜峡市", + "640382": "其它区", + "640400": "固原市", + "640402": "原州区", + "640422": "西吉县", + "640423": "隆德县", + "640424": "泾源县", + "640425": "彭阳县", + "640426": "其它区", + "640500": "中卫市", + "640502": "沙坡头区", + "640521": "中宁县", + "640522": "海原县", + "640523": "其它区", + "650000": "新疆维吾尔自治区", + "650100": "乌鲁木齐市", + "650102": "天山区", + "650103": "沙依巴克区", + "650104": "新市区", + "650105": "水磨沟区", + "650106": "头屯河区", + "650107": "达坂城区", + "650109": "米东区", + "650121": "乌鲁木齐县", + "650122": "其它区", + "650200": "克拉玛依市", + "650202": "独山子区", + "650203": "克拉玛依区", + "650204": "白碱滩区", + "650205": "乌尔禾区", + "650206": "其它区", + "652100": "吐鲁番地区", + "652101": "吐鲁番市", + "652122": "鄯善县", + "652123": "托克逊县", + "652124": "其它区", + "652200": "哈密地区", + "652201": "哈密市", + "652222": "巴里坤哈萨克自治县", + "652223": "伊吾县", + "652224": "其它区", + "652300": "昌吉回族自治州", + "652301": "昌吉市", + "652302": "阜康市", + "652323": "呼图壁县", + "652324": "玛纳斯县", + "652325": "奇台县", + "652327": "吉木萨尔县", + "652328": "木垒哈萨克自治县", + "652329": "其它区", + "652700": "博尔塔拉蒙古自治州", + "652701": "博乐市", + "652702": "阿拉山口市", + "652722": "精河县", + "652723": "温泉县", + "652724": "其它区", + "652800": "巴音郭楞蒙古自治州", + "652801": "库尔勒市", + "652822": "轮台县", + "652823": "尉犁县", + "652824": "若羌县", + "652825": "且末县", + "652826": "焉耆回族自治县", + "652827": "和静县", + "652828": "和硕县", + "652829": "博湖县", + "652830": "其它区", + "652900": "阿克苏地区", + "652901": "阿克苏市", + "652922": "温宿县", + "652923": "库车县", + "652924": "沙雅县", + "652925": "新和县", + "652926": "拜城县", + "652927": "乌什县", + "652928": "阿瓦提县", + "652929": "柯坪县", + "652930": "其它区", + "653000": "克孜勒苏柯尔克孜自治州", + "653001": "阿图什市", + "653022": "阿克陶县", + "653023": "阿合奇县", + "653024": "乌恰县", + "653025": "其它区", + "653100": "喀什地区", + "653101": "喀什市", + "653121": "疏附县", + "653122": "疏勒县", + "653123": "英吉沙县", + "653124": "泽普县", + "653125": "莎车县", + "653126": "叶城县", + "653127": "麦盖提县", + "653128": "岳普湖县", + "653129": "伽师县", + "653130": "巴楚县", + "653131": "塔什库尔干塔吉克自治县", + "653132": "其它区", + "653200": "和田地区", + "653201": "和田市", + "653221": "和田县", + "653222": "墨玉县", + "653223": "皮山县", + "653224": "洛浦县", + "653225": "策勒县", + "653226": "于田县", + "653227": "民丰县", + "653228": "其它区", + "654000": "伊犁哈萨克自治州", + "654002": "伊宁市", + "654003": "奎屯市", + "654021": "伊宁县", + "654022": "察布查尔锡伯自治县", + "654023": "霍城县", + "654024": "巩留县", + "654025": "新源县", + "654026": "昭苏县", + "654027": "特克斯县", + "654028": "尼勒克县", + "654029": "其它区", + "654200": "塔城地区", + "654201": "塔城市", + "654202": "乌苏市", + "654221": "额敏县", + "654223": "沙湾县", + "654224": "托里县", + "654225": "裕民县", + "654226": "和布克赛尔蒙古自治县", + "654227": "其它区", + "654300": "阿勒泰地区", + "654301": "阿勒泰市", + "654321": "布尔津县", + "654322": "富蕴县", + "654323": "福海县", + "654324": "哈巴河县", + "654325": "青河县", + "654326": "吉木乃县", + "654327": "其它区", + "659001": "石河子市", + "659002": "阿拉尔市", + "659003": "图木舒克市", + "659004": "五家渠市", + "710000": "台湾", + "710100": "台北市", + "710101": "中正区", + "710102": "大同区", + "710103": "中山区", + "710104": "松山区", + "710105": "大安区", + "710106": "万华区", + "710107": "信义区", + "710108": "士林区", + "710109": "北投区", + "710110": "内湖区", + "710111": "南港区", + "710112": "文山区", + "710113": "其它区", + "710200": "高雄市", + "710201": "新兴区", + "710202": "前金区", + "710203": "芩雅区", + "710204": "盐埕区", + "710205": "鼓山区", + "710206": "旗津区", + "710207": "前镇区", + "710208": "三民区", + "710209": "左营区", + "710210": "楠梓区", + "710211": "小港区", + "710212": "其它区", + "710241": "苓雅区", + "710242": "仁武区", + "710243": "大社区", + "710244": "冈山区", + "710245": "路竹区", + "710246": "阿莲区", + "710247": "田寮区", + "710248": "燕巢区", + "710249": "桥头区", + "710250": "梓官区", + "710251": "弥陀区", + "710252": "永安区", + "710253": "湖内区", + "710254": "凤山区", + "710255": "大寮区", + "710256": "林园区", + "710257": "鸟松区", + "710258": "大树区", + "710259": "旗山区", + "710260": "美浓区", + "710261": "六龟区", + "710262": "内门区", + "710263": "杉林区", + "710264": "甲仙区", + "710265": "桃源区", + "710266": "那玛夏区", + "710267": "茂林区", + "710268": "茄萣区", + "710300": "台南市", + "710301": "中西区", + "710302": "东区", + "710303": "南区", + "710304": "北区", + "710305": "安平区", + "710306": "安南区", + "710307": "其它区", + "710339": "永康区", + "710340": "归仁区", + "710341": "新化区", + "710342": "左镇区", + "710343": "玉井区", + "710344": "楠西区", + "710345": "南化区", + "710346": "仁德区", + "710347": "关庙区", + "710348": "龙崎区", + "710349": "官田区", + "710350": "麻豆区", + "710351": "佳里区", + "710352": "西港区", + "710353": "七股区", + "710354": "将军区", + "710355": "学甲区", + "710356": "北门区", + "710357": "新营区", + "710358": "后壁区", + "710359": "白河区", + "710360": "东山区", + "710361": "六甲区", + "710362": "下营区", + "710363": "柳营区", + "710364": "盐水区", + "710365": "善化区", + "710366": "大内区", + "710367": "山上区", + "710368": "新市区", + "710369": "安定区", + "710400": "台中市", + "710401": "中区", + "710402": "东区", + "710403": "南区", + "710404": "西区", + "710405": "北区", + "710406": "北屯区", + "710407": "西屯区", + "710408": "南屯区", + "710409": "其它区", + "710431": "太平区", + "710432": "大里区", + "710433": "雾峰区", + "710434": "乌日区", + "710435": "丰原区", + "710436": "后里区", + "710437": "石冈区", + "710438": "东势区", + "710439": "和平区", + "710440": "新社区", + "710441": "潭子区", + "710442": "大雅区", + "710443": "神冈区", + "710444": "大肚区", + "710445": "沙鹿区", + "710446": "龙井区", + "710447": "梧栖区", + "710448": "清水区", + "710449": "大甲区", + "710450": "外埔区", + "710451": "大安区", + "710500": "金门县", + "710507": "金沙镇", + "710508": "金湖镇", + "710509": "金宁乡", + "710510": "金城镇", + "710511": "烈屿乡", + "710512": "乌坵乡", + "710600": "南投县", + "710614": "南投市", + "710615": "中寮乡", + "710616": "草屯镇", + "710617": "国姓乡", + "710618": "埔里镇", + "710619": "仁爱乡", + "710620": "名间乡", + "710621": "集集镇", + "710622": "水里乡", + "710623": "鱼池乡", + "710624": "信义乡", + "710625": "竹山镇", + "710626": "鹿谷乡", + "710700": "基隆市", + "710701": "仁爱区", + "710702": "信义区", + "710703": "中正区", + "710704": "中山区", + "710705": "安乐区", + "710706": "暖暖区", + "710707": "七堵区", + "710708": "其它区", + "710800": "新竹市", + "710801": "东区", + "710802": "北区", + "710803": "香山区", + "710804": "其它区", + "710900": "嘉义市", + "710901": "东区", + "710902": "西区", + "710903": "其它区", + "711100": "新北市", + "711130": "万里区", + "711131": "金山区", + "711132": "板桥区", + "711133": "汐止区", + "711134": "深坑区", + "711135": "石碇区", + "711136": "瑞芳区", + "711137": "平溪区", + "711138": "双溪区", + "711139": "贡寮区", + "711140": "新店区", + "711141": "坪林区", + "711142": "乌来区", + "711143": "永和区", + "711144": "中和区", + "711145": "土城区", + "711146": "三峡区", + "711147": "树林区", + "711148": "莺歌区", + "711149": "三重区", + "711150": "新庄区", + "711151": "泰山区", + "711152": "林口区", + "711153": "芦洲区", + "711154": "五股区", + "711155": "八里区", + "711156": "淡水区", + "711157": "三芝区", + "711158": "石门区", + "711200": "宜兰县", + "711214": "宜兰市", + "711215": "头城镇", + "711216": "礁溪乡", + "711217": "壮围乡", + "711218": "员山乡", + "711219": "罗东镇", + "711220": "三星乡", + "711221": "大同乡", + "711222": "五结乡", + "711223": "冬山乡", + "711224": "苏澳镇", + "711225": "南澳乡", + "711226": "钓鱼台", + "711300": "新竹县", + "711314": "竹北市", + "711315": "湖口乡", + "711316": "新丰乡", + "711317": "新埔镇", + "711318": "关西镇", + "711319": "芎林乡", + "711320": "宝山乡", + "711321": "竹东镇", + "711322": "五峰乡", + "711323": "横山乡", + "711324": "尖石乡", + "711325": "北埔乡", + "711326": "峨眉乡", + "711400": "桃园县", + "711414": "中坜市", + "711415": "平镇市", + "711416": "龙潭乡", + "711417": "杨梅市", + "711418": "新屋乡", + "711419": "观音乡", + "711420": "桃园市", + "711421": "龟山乡", + "711422": "八德市", + "711423": "大溪镇", + "711424": "复兴乡", + "711425": "大园乡", + "711426": "芦竹乡", + "711500": "苗栗县", + "711519": "竹南镇", + "711520": "头份镇", + "711521": "三湾乡", + "711522": "南庄乡", + "711523": "狮潭乡", + "711524": "后龙镇", + "711525": "通霄镇", + "711526": "苑里镇", + "711527": "苗栗市", + "711528": "造桥乡", + "711529": "头屋乡", + "711530": "公馆乡", + "711531": "大湖乡", + "711532": "泰安乡", + "711533": "铜锣乡", + "711534": "三义乡", + "711535": "西湖乡", + "711536": "卓兰镇", + "711700": "彰化县", + "711727": "彰化市", + "711728": "芬园乡", + "711729": "花坛乡", + "711730": "秀水乡", + "711731": "鹿港镇", + "711732": "福兴乡", + "711733": "线西乡", + "711734": "和美镇", + "711735": "伸港乡", + "711736": "员林镇", + "711737": "社头乡", + "711738": "永靖乡", + "711739": "埔心乡", + "711740": "溪湖镇", + "711741": "大村乡", + "711742": "埔盐乡", + "711743": "田中镇", + "711744": "北斗镇", + "711745": "田尾乡", + "711746": "埤头乡", + "711747": "溪州乡", + "711748": "竹塘乡", + "711749": "二林镇", + "711750": "大城乡", + "711751": "芳苑乡", + "711752": "二水乡", + "711900": "嘉义县", + "711919": "番路乡", + "711920": "梅山乡", + "711921": "竹崎乡", + "711922": "阿里山乡", + "711923": "中埔乡", + "711924": "大埔乡", + "711925": "水上乡", + "711926": "鹿草乡", + "711927": "太保市", + "711928": "朴子市", + "711929": "东石乡", + "711930": "六脚乡", + "711931": "新港乡", + "711932": "民雄乡", + "711933": "大林镇", + "711934": "溪口乡", + "711935": "义竹乡", + "711936": "布袋镇", + "712100": "云林县", + "712121": "斗南镇", + "712122": "大埤乡", + "712123": "虎尾镇", + "712124": "土库镇", + "712125": "褒忠乡", + "712126": "东势乡", + "712127": "台西乡", + "712128": "仑背乡", + "712129": "麦寮乡", + "712130": "斗六市", + "712131": "林内乡", + "712132": "古坑乡", + "712133": "莿桐乡", + "712134": "西螺镇", + "712135": "二仑乡", + "712136": "北港镇", + "712137": "水林乡", + "712138": "口湖乡", + "712139": "四湖乡", + "712140": "元长乡", + "712400": "屏东县", + "712434": "屏东市", + "712435": "三地门乡", + "712436": "雾台乡", + "712437": "玛家乡", + "712438": "九如乡", + "712439": "里港乡", + "712440": "高树乡", + "712441": "盐埔乡", + "712442": "长治乡", + "712443": "麟洛乡", + "712444": "竹田乡", + "712445": "内埔乡", + "712446": "万丹乡", + "712447": "潮州镇", + "712448": "泰武乡", + "712449": "来义乡", + "712450": "万峦乡", + "712451": "崁顶乡", + "712452": "新埤乡", + "712453": "南州乡", + "712454": "林边乡", + "712455": "东港镇", + "712456": "琉球乡", + "712457": "佳冬乡", + "712458": "新园乡", + "712459": "枋寮乡", + "712460": "枋山乡", + "712461": "春日乡", + "712462": "狮子乡", + "712463": "车城乡", + "712464": "牡丹乡", + "712465": "恒春镇", + "712466": "满州乡", + "712500": "台东县", + "712517": "台东市", + "712518": "绿岛乡", + "712519": "兰屿乡", + "712520": "延平乡", + "712521": "卑南乡", + "712522": "鹿野乡", + "712523": "关山镇", + "712524": "海端乡", + "712525": "池上乡", + "712526": "东河乡", + "712527": "成功镇", + "712528": "长滨乡", + "712529": "金峰乡", + "712530": "大武乡", + "712531": "达仁乡", + "712532": "太麻里乡", + "712600": "花莲县", + "712615": "花莲市", + "712616": "新城乡", + "712617": "太鲁阁", + "712618": "秀林乡", + "712619": "吉安乡", + "712620": "寿丰乡", + "712621": "凤林镇", + "712622": "光复乡", + "712623": "丰滨乡", + "712624": "瑞穗乡", + "712625": "万荣乡", + "712626": "玉里镇", + "712627": "卓溪乡", + "712628": "富里乡", + "712700": "澎湖县", + "712707": "马公市", + "712708": "西屿乡", + "712709": "望安乡", + "712710": "七美乡", + "712711": "白沙乡", + "712712": "湖西乡", + "712800": "连江县", + "712805": "南竿乡", + "712806": "北竿乡", + "712807": "莒光乡", + "712808": "东引乡", + "810000": "香港特别行政区", + "810100": "香港岛", + "810101": "中西区", + "810102": "湾仔", + "810103": "东区", + "810104": "南区", + "810200": "九龙", + "810201": "九龙城区", + "810202": "油尖旺区", + "810203": "深水埗区", + "810204": "黄大仙区", + "810205": "观塘区", + "810300": "新界", + "810301": "北区", + "810302": "大埔区", + "810303": "沙田区", + "810304": "西贡区", + "810305": "元朗区", + "810306": "屯门区", + "810307": "荃湾区", + "810308": "葵青区", + "810309": "离岛区", + "820000": "澳门特别行政区", + "820100": "澳门半岛", + "820200": "离岛", + "990000": "海外", + "990100": "海外" + } + + // id pid/parentId name children + function tree(list) { + var mapped = {} + for (var i = 0, item; i < list.length; i++) { + item = list[i] + if (!item || !item.id) continue + mapped[item.id] = item + } + + var result = [] + for (var ii = 0; ii < list.length; ii++) { + item = list[ii] + + if (!item) continue + /* jshint -W041 */ + if (item.pid == undefined && item.parentId == undefined) { + result.push(item) + continue + } + var parent = mapped[item.pid] || mapped[item.parentId] + if (!parent) continue + if (!parent.children) parent.children = [] + parent.children.push(item) + } + return result + } + + var DICT_FIXED = function() { + var fixed = [] + for (var id in DICT) { + var pid = id.slice(2, 6) === '0000' ? undefined : + id.slice(4, 6) == '00' ? (id.slice(0, 2) + '0000') : + id.slice(0, 4) + '00' + fixed.push({ + id: id, + pid: pid, + name: DICT[id] + }) + } + return tree(fixed) + }() + + module.exports = DICT_FIXED + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## Miscellaneous + */ + var DICT = __webpack_require__(18) + module.exports = { + // Dice + d4: function() { + return this.natural(1, 4) + }, + d6: function() { + return this.natural(1, 6) + }, + d8: function() { + return this.natural(1, 8) + }, + d12: function() { + return this.natural(1, 12) + }, + d20: function() { + return this.natural(1, 20) + }, + d100: function() { + return this.natural(1, 100) + }, + /* + 随机生成一个 GUID。 + + http://www.broofa.com/2008/09/javascript-uuid-function/ + [UUID 规范](http://www.ietf.org/rfc/rfc4122.txt) + UUIDs (Universally Unique IDentifier) + GUIDs (Globally Unique IDentifier) + The formal definition of the UUID string representation is provided by the following ABNF [7]: + UUID = time-low "-" time-mid "-" + time-high-and-version "-" + clock-seq-and-reserved + clock-seq-low "-" node + time-low = 4hexOctet + time-mid = 2hexOctet + time-high-and-version = 2hexOctet + clock-seq-and-reserved = hexOctet + clock-seq-low = hexOctet + node = 6hexOctet + hexOctet = hexDigit hexDigit + hexDigit = + "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / + "a" / "b" / "c" / "d" / "e" / "f" / + "A" / "B" / "C" / "D" / "E" / "F" + + https://github.com/victorquinn/chancejs/blob/develop/chance.js#L1349 + */ + guid: function() { + var pool = "abcdefABCDEF1234567890", + guid = this.string(pool, 8) + '-' + + this.string(pool, 4) + '-' + + this.string(pool, 4) + '-' + + this.string(pool, 4) + '-' + + this.string(pool, 12); + return guid + }, + uuid: function() { + return this.guid() + }, + /* + 随机生成一个 18 位身份证。 + + [身份证](http://baike.baidu.com/view/1697.htm#4) + 地址码 6 + 出生日期码 8 + 顺序码 3 + 校验码 1 + [《中华人民共和国行政区划代码》国家标准(GB/T2260)](http://zhidao.baidu.com/question/1954561.html) + */ + id: function() { + var id, + sum = 0, + rank = [ + "7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2" + ], + last = [ + "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" + ] + + id = this.pick(DICT).id + + this.date('yyyyMMdd') + + this.string('number', 3) + + for (var i = 0; i < id.length; i++) { + sum += id[i] * rank[i]; + } + id += last[sum % 11]; + + return id + }, + + /* + 生成一个全局的自增整数。 + 类似自增主键(auto increment primary key)。 + */ + increment: function() { + var key = 0 + return function(step) { + return key += (+step || 1) // step? + } + }(), + inc: function(step) { + return this.increment(step) + } + } + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + var Parser = __webpack_require__(21) + var Handler = __webpack_require__(22) + module.exports = { + Parser: Parser, + Handler: Handler + } + +/***/ }, +/* 21 */ +/***/ function(module, exports) { + + // https://github.com/nuysoft/regexp + // forked from https://github.com/ForbesLindesay/regexp + + function parse(n) { + if ("string" != typeof n) { + var l = new TypeError("The regexp to parse must be represented as a string."); + throw l; + } + return index = 1, cgs = {}, parser.parse(n); + } + + function Token(n) { + this.type = n, this.offset = Token.offset(), this.text = Token.text(); + } + + function Alternate(n, l) { + Token.call(this, "alternate"), this.left = n, this.right = l; + } + + function Match(n) { + Token.call(this, "match"), this.body = n.filter(Boolean); + } + + function Group(n, l) { + Token.call(this, n), this.body = l; + } + + function CaptureGroup(n) { + Group.call(this, "capture-group"), this.index = cgs[this.offset] || (cgs[this.offset] = index++), + this.body = n; + } + + function Quantified(n, l) { + Token.call(this, "quantified"), this.body = n, this.quantifier = l; + } + + function Quantifier(n, l) { + Token.call(this, "quantifier"), this.min = n, this.max = l, this.greedy = !0; + } + + function CharSet(n, l) { + Token.call(this, "charset"), this.invert = n, this.body = l; + } + + function CharacterRange(n, l) { + Token.call(this, "range"), this.start = n, this.end = l; + } + + function Literal(n) { + Token.call(this, "literal"), this.body = n, this.escaped = this.body != this.text; + } + + function Unicode(n) { + Token.call(this, "unicode"), this.code = n.toUpperCase(); + } + + function Hex(n) { + Token.call(this, "hex"), this.code = n.toUpperCase(); + } + + function Octal(n) { + Token.call(this, "octal"), this.code = n.toUpperCase(); + } + + function BackReference(n) { + Token.call(this, "back-reference"), this.code = n.toUpperCase(); + } + + function ControlCharacter(n) { + Token.call(this, "control-character"), this.code = n.toUpperCase(); + } + + var parser = function() { + function n(n, l) { + function u() { + this.constructor = n; + } + u.prototype = l.prototype, n.prototype = new u(); + } + function l(n, l, u, t, r) { + function e(n, l) { + function u(n) { + function l(n) { + return n.charCodeAt(0).toString(16).toUpperCase(); + } + return n.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(n) { + return "\\x0" + l(n); + }).replace(/[\x10-\x1F\x80-\xFF]/g, function(n) { + return "\\x" + l(n); + }).replace(/[\u0180-\u0FFF]/g, function(n) { + return "\\u0" + l(n); + }).replace(/[\u1080-\uFFFF]/g, function(n) { + return "\\u" + l(n); + }); + } + var t, r; + switch (n.length) { + case 0: + t = "end of input"; + break; + + case 1: + t = n[0]; + break; + + default: + t = n.slice(0, -1).join(", ") + " or " + n[n.length - 1]; + } + return r = l ? '"' + u(l) + '"' : "end of input", "Expected " + t + " but " + r + " found."; + } + this.expected = n, this.found = l, this.offset = u, this.line = t, this.column = r, + this.name = "SyntaxError", this.message = e(n, l); + } + function u(n) { + function u() { + return n.substring(Lt, qt); + } + function t() { + return Lt; + } + function r(l) { + function u(l, u, t) { + var r, e; + for (r = u; t > r; r++) e = n.charAt(r), "\n" === e ? (l.seenCR || l.line++, l.column = 1, + l.seenCR = !1) : "\r" === e || "\u2028" === e || "\u2029" === e ? (l.line++, l.column = 1, + l.seenCR = !0) : (l.column++, l.seenCR = !1); + } + return Mt !== l && (Mt > l && (Mt = 0, Dt = { + line: 1, + column: 1, + seenCR: !1 + }), u(Dt, Mt, l), Mt = l), Dt; + } + function e(n) { + Ht > qt || (qt > Ht && (Ht = qt, Ot = []), Ot.push(n)); + } + function o(n) { + var l = 0; + for (n.sort(); l < n.length; ) n[l - 1] === n[l] ? n.splice(l, 1) : l++; + } + function c() { + var l, u, t, r, o; + return l = qt, u = i(), null !== u ? (t = qt, 124 === n.charCodeAt(qt) ? (r = fl, + qt++) : (r = null, 0 === Wt && e(sl)), null !== r ? (o = c(), null !== o ? (r = [ r, o ], + t = r) : (qt = t, t = il)) : (qt = t, t = il), null === t && (t = al), null !== t ? (Lt = l, + u = hl(u, t), null === u ? (qt = l, l = u) : l = u) : (qt = l, l = il)) : (qt = l, + l = il), l; + } + function i() { + var n, l, u, t, r; + if (n = qt, l = f(), null === l && (l = al), null !== l) if (u = qt, Wt++, t = d(), + Wt--, null === t ? u = al : (qt = u, u = il), null !== u) { + for (t = [], r = h(), null === r && (r = a()); null !== r; ) t.push(r), r = h(), + null === r && (r = a()); + null !== t ? (r = s(), null === r && (r = al), null !== r ? (Lt = n, l = dl(l, t, r), + null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il); + } else qt = n, n = il; else qt = n, n = il; + return n; + } + function a() { + var n; + return n = x(), null === n && (n = Q(), null === n && (n = B())), n; + } + function f() { + var l, u; + return l = qt, 94 === n.charCodeAt(qt) ? (u = pl, qt++) : (u = null, 0 === Wt && e(vl)), + null !== u && (Lt = l, u = wl()), null === u ? (qt = l, l = u) : l = u, l; + } + function s() { + var l, u; + return l = qt, 36 === n.charCodeAt(qt) ? (u = Al, qt++) : (u = null, 0 === Wt && e(Cl)), + null !== u && (Lt = l, u = gl()), null === u ? (qt = l, l = u) : l = u, l; + } + function h() { + var n, l, u; + return n = qt, l = a(), null !== l ? (u = d(), null !== u ? (Lt = n, l = bl(l, u), + null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, n = il), n; + } + function d() { + var n, l, u; + return Wt++, n = qt, l = p(), null !== l ? (u = k(), null === u && (u = al), null !== u ? (Lt = n, + l = Tl(l, u), null === l ? (qt = n, n = l) : n = l) : (qt = n, n = il)) : (qt = n, + n = il), Wt--, null === n && (l = null, 0 === Wt && e(kl)), n; + } + function p() { + var n; + return n = v(), null === n && (n = w(), null === n && (n = A(), null === n && (n = C(), + null === n && (n = g(), null === n && (n = b()))))), n; + } + function v() { + var l, u, t, r, o, c; + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + null !== u ? (t = T(), null !== t ? (44 === n.charCodeAt(qt) ? (r = ml, qt++) : (r = null, + 0 === Wt && e(Rl)), null !== r ? (o = T(), null !== o ? (125 === n.charCodeAt(qt) ? (c = Fl, + qt++) : (c = null, 0 === Wt && e(Ql)), null !== c ? (Lt = l, u = Sl(t, o), null === u ? (qt = l, + l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function w() { + var l, u, t, r; + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + null !== u ? (t = T(), null !== t ? (n.substr(qt, 2) === Ul ? (r = Ul, qt += 2) : (r = null, + 0 === Wt && e(El)), null !== r ? (Lt = l, u = Gl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; + } + function A() { + var l, u, t, r; + return l = qt, 123 === n.charCodeAt(qt) ? (u = xl, qt++) : (u = null, 0 === Wt && e(yl)), + null !== u ? (t = T(), null !== t ? (125 === n.charCodeAt(qt) ? (r = Fl, qt++) : (r = null, + 0 === Wt && e(Ql)), null !== r ? (Lt = l, u = Bl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; + } + function C() { + var l, u; + return l = qt, 43 === n.charCodeAt(qt) ? (u = jl, qt++) : (u = null, 0 === Wt && e($l)), + null !== u && (Lt = l, u = ql()), null === u ? (qt = l, l = u) : l = u, l; + } + function g() { + var l, u; + return l = qt, 42 === n.charCodeAt(qt) ? (u = Ll, qt++) : (u = null, 0 === Wt && e(Ml)), + null !== u && (Lt = l, u = Dl()), null === u ? (qt = l, l = u) : l = u, l; + } + function b() { + var l, u; + return l = qt, 63 === n.charCodeAt(qt) ? (u = Hl, qt++) : (u = null, 0 === Wt && e(Ol)), + null !== u && (Lt = l, u = Wl()), null === u ? (qt = l, l = u) : l = u, l; + } + function k() { + var l; + return 63 === n.charCodeAt(qt) ? (l = Hl, qt++) : (l = null, 0 === Wt && e(Ol)), + l; + } + function T() { + var l, u, t; + if (l = qt, u = [], zl.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, + 0 === Wt && e(Il)), null !== t) for (;null !== t; ) u.push(t), zl.test(n.charAt(qt)) ? (t = n.charAt(qt), + qt++) : (t = null, 0 === Wt && e(Il)); else u = il; + return null !== u && (Lt = l, u = Jl(u)), null === u ? (qt = l, l = u) : l = u, + l; + } + function x() { + var l, u, t, r; + return l = qt, 40 === n.charCodeAt(qt) ? (u = Kl, qt++) : (u = null, 0 === Wt && e(Nl)), + null !== u ? (t = R(), null === t && (t = F(), null === t && (t = m(), null === t && (t = y()))), + null !== t ? (41 === n.charCodeAt(qt) ? (r = Pl, qt++) : (r = null, 0 === Wt && e(Vl)), + null !== r ? (Lt = l, u = Xl(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il)) : (qt = l, l = il), l; + } + function y() { + var n, l; + return n = qt, l = c(), null !== l && (Lt = n, l = Yl(l)), null === l ? (qt = n, + n = l) : n = l, n; + } + function m() { + var l, u, t; + return l = qt, n.substr(qt, 2) === Zl ? (u = Zl, qt += 2) : (u = null, 0 === Wt && e(_l)), + null !== u ? (t = c(), null !== t ? (Lt = l, u = nu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function R() { + var l, u, t; + return l = qt, n.substr(qt, 2) === lu ? (u = lu, qt += 2) : (u = null, 0 === Wt && e(uu)), + null !== u ? (t = c(), null !== t ? (Lt = l, u = tu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function F() { + var l, u, t; + return l = qt, n.substr(qt, 2) === ru ? (u = ru, qt += 2) : (u = null, 0 === Wt && e(eu)), + null !== u ? (t = c(), null !== t ? (Lt = l, u = ou(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function Q() { + var l, u, t, r, o; + if (Wt++, l = qt, 91 === n.charCodeAt(qt) ? (u = iu, qt++) : (u = null, 0 === Wt && e(au)), + null !== u) if (94 === n.charCodeAt(qt) ? (t = pl, qt++) : (t = null, 0 === Wt && e(vl)), + null === t && (t = al), null !== t) { + for (r = [], o = S(), null === o && (o = U()); null !== o; ) r.push(o), o = S(), + null === o && (o = U()); + null !== r ? (93 === n.charCodeAt(qt) ? (o = fu, qt++) : (o = null, 0 === Wt && e(su)), + null !== o ? (Lt = l, u = hu(t, r), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il); + } else qt = l, l = il; else qt = l, l = il; + return Wt--, null === l && (u = null, 0 === Wt && e(cu)), l; + } + function S() { + var l, u, t, r; + return Wt++, l = qt, u = U(), null !== u ? (45 === n.charCodeAt(qt) ? (t = pu, qt++) : (t = null, + 0 === Wt && e(vu)), null !== t ? (r = U(), null !== r ? (Lt = l, u = wu(u, r), null === u ? (qt = l, + l = u) : l = u) : (qt = l, l = il)) : (qt = l, l = il)) : (qt = l, l = il), Wt--, + null === l && (u = null, 0 === Wt && e(du)), l; + } + function U() { + var n, l; + return Wt++, n = G(), null === n && (n = E()), Wt--, null === n && (l = null, 0 === Wt && e(Au)), + n; + } + function E() { + var l, u; + return l = qt, Cu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, 0 === Wt && e(gu)), + null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, l; + } + function G() { + var n; + return n = L(), null === n && (n = Y(), null === n && (n = H(), null === n && (n = O(), + null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), null === n && (n = J(), + null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), null === n && (n = V(), + null === n && (n = X(), null === n && (n = _(), null === n && (n = nl(), null === n && (n = ll(), + null === n && (n = ul(), null === n && (n = tl()))))))))))))))))), n; + } + function B() { + var n; + return n = j(), null === n && (n = q(), null === n && (n = $())), n; + } + function j() { + var l, u; + return l = qt, 46 === n.charCodeAt(qt) ? (u = ku, qt++) : (u = null, 0 === Wt && e(Tu)), + null !== u && (Lt = l, u = xu()), null === u ? (qt = l, l = u) : l = u, l; + } + function $() { + var l, u; + return Wt++, l = qt, mu.test(n.charAt(qt)) ? (u = n.charAt(qt), qt++) : (u = null, + 0 === Wt && e(Ru)), null !== u && (Lt = l, u = bu(u)), null === u ? (qt = l, l = u) : l = u, + Wt--, null === l && (u = null, 0 === Wt && e(yu)), l; + } + function q() { + var n; + return n = M(), null === n && (n = D(), null === n && (n = Y(), null === n && (n = H(), + null === n && (n = O(), null === n && (n = W(), null === n && (n = z(), null === n && (n = I(), + null === n && (n = J(), null === n && (n = K(), null === n && (n = N(), null === n && (n = P(), + null === n && (n = V(), null === n && (n = X(), null === n && (n = Z(), null === n && (n = _(), + null === n && (n = nl(), null === n && (n = ll(), null === n && (n = ul(), null === n && (n = tl()))))))))))))))))))), + n; + } + function L() { + var l, u; + return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), + null !== u && (Lt = l, u = Su()), null === u ? (qt = l, l = u) : l = u, l; + } + function M() { + var l, u; + return l = qt, n.substr(qt, 2) === Fu ? (u = Fu, qt += 2) : (u = null, 0 === Wt && e(Qu)), + null !== u && (Lt = l, u = Uu()), null === u ? (qt = l, l = u) : l = u, l; + } + function D() { + var l, u; + return l = qt, n.substr(qt, 2) === Eu ? (u = Eu, qt += 2) : (u = null, 0 === Wt && e(Gu)), + null !== u && (Lt = l, u = Bu()), null === u ? (qt = l, l = u) : l = u, l; + } + function H() { + var l, u; + return l = qt, n.substr(qt, 2) === ju ? (u = ju, qt += 2) : (u = null, 0 === Wt && e($u)), + null !== u && (Lt = l, u = qu()), null === u ? (qt = l, l = u) : l = u, l; + } + function O() { + var l, u; + return l = qt, n.substr(qt, 2) === Lu ? (u = Lu, qt += 2) : (u = null, 0 === Wt && e(Mu)), + null !== u && (Lt = l, u = Du()), null === u ? (qt = l, l = u) : l = u, l; + } + function W() { + var l, u; + return l = qt, n.substr(qt, 2) === Hu ? (u = Hu, qt += 2) : (u = null, 0 === Wt && e(Ou)), + null !== u && (Lt = l, u = Wu()), null === u ? (qt = l, l = u) : l = u, l; + } + function z() { + var l, u; + return l = qt, n.substr(qt, 2) === zu ? (u = zu, qt += 2) : (u = null, 0 === Wt && e(Iu)), + null !== u && (Lt = l, u = Ju()), null === u ? (qt = l, l = u) : l = u, l; + } + function I() { + var l, u; + return l = qt, n.substr(qt, 2) === Ku ? (u = Ku, qt += 2) : (u = null, 0 === Wt && e(Nu)), + null !== u && (Lt = l, u = Pu()), null === u ? (qt = l, l = u) : l = u, l; + } + function J() { + var l, u; + return l = qt, n.substr(qt, 2) === Vu ? (u = Vu, qt += 2) : (u = null, 0 === Wt && e(Xu)), + null !== u && (Lt = l, u = Yu()), null === u ? (qt = l, l = u) : l = u, l; + } + function K() { + var l, u; + return l = qt, n.substr(qt, 2) === Zu ? (u = Zu, qt += 2) : (u = null, 0 === Wt && e(_u)), + null !== u && (Lt = l, u = nt()), null === u ? (qt = l, l = u) : l = u, l; + } + function N() { + var l, u; + return l = qt, n.substr(qt, 2) === lt ? (u = lt, qt += 2) : (u = null, 0 === Wt && e(ut)), + null !== u && (Lt = l, u = tt()), null === u ? (qt = l, l = u) : l = u, l; + } + function P() { + var l, u; + return l = qt, n.substr(qt, 2) === rt ? (u = rt, qt += 2) : (u = null, 0 === Wt && e(et)), + null !== u && (Lt = l, u = ot()), null === u ? (qt = l, l = u) : l = u, l; + } + function V() { + var l, u; + return l = qt, n.substr(qt, 2) === ct ? (u = ct, qt += 2) : (u = null, 0 === Wt && e(it)), + null !== u && (Lt = l, u = at()), null === u ? (qt = l, l = u) : l = u, l; + } + function X() { + var l, u; + return l = qt, n.substr(qt, 2) === ft ? (u = ft, qt += 2) : (u = null, 0 === Wt && e(st)), + null !== u && (Lt = l, u = ht()), null === u ? (qt = l, l = u) : l = u, l; + } + function Y() { + var l, u, t; + return l = qt, n.substr(qt, 2) === dt ? (u = dt, qt += 2) : (u = null, 0 === Wt && e(pt)), + null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), + null !== t ? (Lt = l, u = wt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function Z() { + var l, u, t; + return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), + null !== u ? (gt.test(n.charAt(qt)) ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(bt)), + null !== t ? (Lt = l, u = kt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + function _() { + var l, u, t, r; + if (l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), + null !== u) { + if (t = [], yt.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(mt)), + null !== r) for (;null !== r; ) t.push(r), yt.test(n.charAt(qt)) ? (r = n.charAt(qt), + qt++) : (r = null, 0 === Wt && e(mt)); else t = il; + null !== t ? (Lt = l, u = Rt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il); + } else qt = l, l = il; + return l; + } + function nl() { + var l, u, t, r; + if (l = qt, n.substr(qt, 2) === Ft ? (u = Ft, qt += 2) : (u = null, 0 === Wt && e(Qt)), + null !== u) { + if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), + null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), + qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; + null !== t ? (Lt = l, u = Et(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il); + } else qt = l, l = il; + return l; + } + function ll() { + var l, u, t, r; + if (l = qt, n.substr(qt, 2) === Gt ? (u = Gt, qt += 2) : (u = null, 0 === Wt && e(Bt)), + null !== u) { + if (t = [], St.test(n.charAt(qt)) ? (r = n.charAt(qt), qt++) : (r = null, 0 === Wt && e(Ut)), + null !== r) for (;null !== r; ) t.push(r), St.test(n.charAt(qt)) ? (r = n.charAt(qt), + qt++) : (r = null, 0 === Wt && e(Ut)); else t = il; + null !== t ? (Lt = l, u = jt(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il); + } else qt = l, l = il; + return l; + } + function ul() { + var l, u; + return l = qt, n.substr(qt, 2) === Tt ? (u = Tt, qt += 2) : (u = null, 0 === Wt && e(xt)), + null !== u && (Lt = l, u = $t()), null === u ? (qt = l, l = u) : l = u, l; + } + function tl() { + var l, u, t; + return l = qt, 92 === n.charCodeAt(qt) ? (u = At, qt++) : (u = null, 0 === Wt && e(Ct)), + null !== u ? (n.length > qt ? (t = n.charAt(qt), qt++) : (t = null, 0 === Wt && e(vt)), + null !== t ? (Lt = l, u = bu(t), null === u ? (qt = l, l = u) : l = u) : (qt = l, + l = il)) : (qt = l, l = il), l; + } + var rl, el = arguments.length > 1 ? arguments[1] : {}, ol = { + regexp: c + }, cl = c, il = null, al = "", fl = "|", sl = '"|"', hl = function(n, l) { + return l ? new Alternate(n, l[1]) : n; + }, dl = function(n, l, u) { + return new Match([ n ].concat(l).concat([ u ])); + }, pl = "^", vl = '"^"', wl = function() { + return new Token("start"); + }, Al = "$", Cl = '"$"', gl = function() { + return new Token("end"); + }, bl = function(n, l) { + return new Quantified(n, l); + }, kl = "Quantifier", Tl = function(n, l) { + return l && (n.greedy = !1), n; + }, xl = "{", yl = '"{"', ml = ",", Rl = '","', Fl = "}", Ql = '"}"', Sl = function(n, l) { + return new Quantifier(n, l); + }, Ul = ",}", El = '",}"', Gl = function(n) { + return new Quantifier(n, 1/0); + }, Bl = function(n) { + return new Quantifier(n, n); + }, jl = "+", $l = '"+"', ql = function() { + return new Quantifier(1, 1/0); + }, Ll = "*", Ml = '"*"', Dl = function() { + return new Quantifier(0, 1/0); + }, Hl = "?", Ol = '"?"', Wl = function() { + return new Quantifier(0, 1); + }, zl = /^[0-9]/, Il = "[0-9]", Jl = function(n) { + return +n.join(""); + }, Kl = "(", Nl = '"("', Pl = ")", Vl = '")"', Xl = function(n) { + return n; + }, Yl = function(n) { + return new CaptureGroup(n); + }, Zl = "?:", _l = '"?:"', nu = function(n) { + return new Group("non-capture-group", n); + }, lu = "?=", uu = '"?="', tu = function(n) { + return new Group("positive-lookahead", n); + }, ru = "?!", eu = '"?!"', ou = function(n) { + return new Group("negative-lookahead", n); + }, cu = "CharacterSet", iu = "[", au = '"["', fu = "]", su = '"]"', hu = function(n, l) { + return new CharSet(!!n, l); + }, du = "CharacterRange", pu = "-", vu = '"-"', wu = function(n, l) { + return new CharacterRange(n, l); + }, Au = "Character", Cu = /^[^\\\]]/, gu = "[^\\\\\\]]", bu = function(n) { + return new Literal(n); + }, ku = ".", Tu = '"."', xu = function() { + return new Token("any-character"); + }, yu = "Literal", mu = /^[^|\\\/.[()?+*$\^]/, Ru = "[^|\\\\\\/.[()?+*$\\^]", Fu = "\\b", Qu = '"\\\\b"', Su = function() { + return new Token("backspace"); + }, Uu = function() { + return new Token("word-boundary"); + }, Eu = "\\B", Gu = '"\\\\B"', Bu = function() { + return new Token("non-word-boundary"); + }, ju = "\\d", $u = '"\\\\d"', qu = function() { + return new Token("digit"); + }, Lu = "\\D", Mu = '"\\\\D"', Du = function() { + return new Token("non-digit"); + }, Hu = "\\f", Ou = '"\\\\f"', Wu = function() { + return new Token("form-feed"); + }, zu = "\\n", Iu = '"\\\\n"', Ju = function() { + return new Token("line-feed"); + }, Ku = "\\r", Nu = '"\\\\r"', Pu = function() { + return new Token("carriage-return"); + }, Vu = "\\s", Xu = '"\\\\s"', Yu = function() { + return new Token("white-space"); + }, Zu = "\\S", _u = '"\\\\S"', nt = function() { + return new Token("non-white-space"); + }, lt = "\\t", ut = '"\\\\t"', tt = function() { + return new Token("tab"); + }, rt = "\\v", et = '"\\\\v"', ot = function() { + return new Token("vertical-tab"); + }, ct = "\\w", it = '"\\\\w"', at = function() { + return new Token("word"); + }, ft = "\\W", st = '"\\\\W"', ht = function() { + return new Token("non-word"); + }, dt = "\\c", pt = '"\\\\c"', vt = "any character", wt = function(n) { + return new ControlCharacter(n); + }, At = "\\", Ct = '"\\\\"', gt = /^[1-9]/, bt = "[1-9]", kt = function(n) { + return new BackReference(n); + }, Tt = "\\0", xt = '"\\\\0"', yt = /^[0-7]/, mt = "[0-7]", Rt = function(n) { + return new Octal(n.join("")); + }, Ft = "\\x", Qt = '"\\\\x"', St = /^[0-9a-fA-F]/, Ut = "[0-9a-fA-F]", Et = function(n) { + return new Hex(n.join("")); + }, Gt = "\\u", Bt = '"\\\\u"', jt = function(n) { + return new Unicode(n.join("")); + }, $t = function() { + return new Token("null-character"); + }, qt = 0, Lt = 0, Mt = 0, Dt = { + line: 1, + column: 1, + seenCR: !1 + }, Ht = 0, Ot = [], Wt = 0; + if ("startRule" in el) { + if (!(el.startRule in ol)) throw new Error("Can't start parsing from rule \"" + el.startRule + '".'); + cl = ol[el.startRule]; + } + if (Token.offset = t, Token.text = u, rl = cl(), null !== rl && qt === n.length) return rl; + throw o(Ot), Lt = Math.max(qt, Ht), new l(Ot, Lt < n.length ? n.charAt(Lt) : null, Lt, r(Lt).line, r(Lt).column); + } + return n(l, Error), { + SyntaxError: l, + parse: u + }; + }(), index = 1, cgs = {}; + + module.exports = parser + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## RegExp Handler + + https://github.com/ForbesLindesay/regexp + https://github.com/dmajda/pegjs + http://www.regexper.com/ + + 每个节点的结构 + { + type: '', + offset: number, + text: '', + body: {}, + escaped: true/false + } + + type 可选值 + alternate | 选择 + match 匹配 + capture-group () 捕获组 + non-capture-group (?:...) 非捕获组 + positive-lookahead (?=p) 零宽正向先行断言 + negative-lookahead (?!p) 零宽负向先行断言 + quantified a* 重复节点 + quantifier * 量词 + charset [] 字符集 + range {m, n} 范围 + literal a 直接量字符 + unicode \uxxxx Unicode + hex \x 十六进制 + octal 八进制 + back-reference \n 反向引用 + control-character \cX 控制字符 + + // Token + start ^ 开头 + end $ 结尾 + any-character . 任意字符 + backspace [\b] 退格直接量 + word-boundary \b 单词边界 + non-word-boundary \B 非单词边界 + digit \d ASCII 数字,[0-9] + non-digit \D 非 ASCII 数字,[^0-9] + form-feed \f 换页符 + line-feed \n 换行符 + carriage-return \r 回车符 + white-space \s 空白符 + non-white-space \S 非空白符 + tab \t 制表符 + vertical-tab \v 垂直制表符 + word \w ASCII 字符,[a-zA-Z0-9] + non-word \W 非 ASCII 字符,[^a-zA-Z0-9] + null-character \o NUL 字符 + */ + + var Util = __webpack_require__(3) + var Random = __webpack_require__(5) + /* + + */ + var Handler = { + extend: Util.extend + } + + // http://en.wikipedia.org/wiki/ASCII#ASCII_printable_code_chart + /*var ASCII_CONTROL_CODE_CHART = { + '@': ['\u0000'], + A: ['\u0001'], + B: ['\u0002'], + C: ['\u0003'], + D: ['\u0004'], + E: ['\u0005'], + F: ['\u0006'], + G: ['\u0007', '\a'], + H: ['\u0008', '\b'], + I: ['\u0009', '\t'], + J: ['\u000A', '\n'], + K: ['\u000B', '\v'], + L: ['\u000C', '\f'], + M: ['\u000D', '\r'], + N: ['\u000E'], + O: ['\u000F'], + P: ['\u0010'], + Q: ['\u0011'], + R: ['\u0012'], + S: ['\u0013'], + T: ['\u0014'], + U: ['\u0015'], + V: ['\u0016'], + W: ['\u0017'], + X: ['\u0018'], + Y: ['\u0019'], + Z: ['\u001A'], + '[': ['\u001B', '\e'], + '\\': ['\u001C'], + ']': ['\u001D'], + '^': ['\u001E'], + '_': ['\u001F'] + }*/ + + // ASCII printable code chart + // var LOWER = 'abcdefghijklmnopqrstuvwxyz' + // var UPPER = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + // var NUMBER = '0123456789' + // var SYMBOL = ' !"#$%&\'()*+,-./' + ':;<=>?@' + '[\\]^_`' + '{|}~' + var LOWER = ascii(97, 122) + var UPPER = ascii(65, 90) + var NUMBER = ascii(48, 57) + var OTHER = ascii(32, 47) + ascii(58, 64) + ascii(91, 96) + ascii(123, 126) // 排除 95 _ ascii(91, 94) + ascii(96, 96) + var PRINTABLE = ascii(32, 126) + var SPACE = ' \f\n\r\t\v\u00A0\u2028\u2029' + var CHARACTER_CLASSES = { + '\\w': LOWER + UPPER + NUMBER + '_', // ascii(95, 95) + '\\W': OTHER.replace('_', ''), + '\\s': SPACE, + '\\S': function() { + var result = PRINTABLE + for (var i = 0; i < SPACE.length; i++) { + result = result.replace(SPACE[i], '') + } + return result + }(), + '\\d': NUMBER, + '\\D': LOWER + UPPER + OTHER + } + + function ascii(from, to) { + var result = '' + for (var i = from; i <= to; i++) { + result += String.fromCharCode(i) + } + return result + } + + // var ast = RegExpParser.parse(regexp.source) + Handler.gen = function(node, result, cache) { + cache = cache || { + guid: 1 + } + return Handler[node.type] ? Handler[node.type](node, result, cache) : + Handler.token(node, result, cache) + } + + Handler.extend({ + /* jshint unused:false */ + token: function(node, result, cache) { + switch (node.type) { + case 'start': + case 'end': + return '' + case 'any-character': + return Random.character() + case 'backspace': + return '' + case 'word-boundary': // TODO + return '' + case 'non-word-boundary': // TODO + break + case 'digit': + return Random.pick( + NUMBER.split('') + ) + case 'non-digit': + return Random.pick( + (LOWER + UPPER + OTHER).split('') + ) + case 'form-feed': + break + case 'line-feed': + return node.body || node.text + case 'carriage-return': + break + case 'white-space': + return Random.pick( + SPACE.split('') + ) + case 'non-white-space': + return Random.pick( + (LOWER + UPPER + NUMBER).split('') + ) + case 'tab': + break + case 'vertical-tab': + break + case 'word': // \w [a-zA-Z0-9] + return Random.pick( + (LOWER + UPPER + NUMBER).split('') + ) + case 'non-word': // \W [^a-zA-Z0-9] + return Random.pick( + OTHER.replace('_', '').split('') + ) + case 'null-character': + break + } + return node.body || node.text + }, + /* + { + type: 'alternate', + offset: 0, + text: '', + left: { + boyd: [] + }, + right: { + boyd: [] + } + } + */ + alternate: function(node, result, cache) { + // node.left/right {} + return this.gen( + Random.boolean() ? node.left : node.right, + result, + cache + ) + }, + /* + { + type: 'match', + offset: 0, + text: '', + body: [] + } + */ + match: function(node, result, cache) { + result = '' + // node.body [] + for (var i = 0; i < node.body.length; i++) { + result += this.gen(node.body[i], result, cache) + } + return result + }, + // () + 'capture-group': function(node, result, cache) { + // node.body {} + result = this.gen(node.body, result, cache) + cache[cache.guid++] = result + return result + }, + // (?:...) + 'non-capture-group': function(node, result, cache) { + // node.body {} + return this.gen(node.body, result, cache) + }, + // (?=p) + 'positive-lookahead': function(node, result, cache) { + // node.body + return this.gen(node.body, result, cache) + }, + // (?!p) + 'negative-lookahead': function(node, result, cache) { + // node.body + return '' + }, + /* + { + type: 'quantified', + offset: 3, + text: 'c*', + body: { + type: 'literal', + offset: 3, + text: 'c', + body: 'c', + escaped: false + }, + quantifier: { + type: 'quantifier', + offset: 4, + text: '*', + min: 0, + max: Infinity, + greedy: true + } + } + */ + quantified: function(node, result, cache) { + result = '' + // node.quantifier {} + var count = this.quantifier(node.quantifier); + // node.body {} + for (var i = 0; i < count; i++) { + result += this.gen(node.body, result, cache) + } + return result + }, + /* + quantifier: { + type: 'quantifier', + offset: 4, + text: '*', + min: 0, + max: Infinity, + greedy: true + } + */ + quantifier: function(node, result, cache) { + var min = Math.max(node.min, 0) + var max = isFinite(node.max) ? node.max : + min + Random.integer(3, 7) + return Random.integer(min, max) + }, + /* + + */ + charset: function(node, result, cache) { + // node.invert + if (node.invert) return this['invert-charset'](node, result, cache) + + // node.body [] + var literal = Random.pick(node.body) + return this.gen(literal, result, cache) + }, + 'invert-charset': function(node, result, cache) { + var pool = PRINTABLE + for (var i = 0, item; i < node.body.length; i++) { + item = node.body[i] + switch (item.type) { + case 'literal': + pool = pool.replace(item.body, '') + break + case 'range': + var min = this.gen(item.start, result, cache).charCodeAt() + var max = this.gen(item.end, result, cache).charCodeAt() + for (var ii = min; ii <= max; ii++) { + pool = pool.replace(String.fromCharCode(ii), '') + } + /* falls through */ + default: + var characters = CHARACTER_CLASSES[item.text] + if (characters) { + for (var iii = 0; iii <= characters.length; iii++) { + pool = pool.replace(characters[iii], '') + } + } + } + } + return Random.pick(pool.split('')) + }, + range: function(node, result, cache) { + // node.start, node.end + var min = this.gen(node.start, result, cache).charCodeAt() + var max = this.gen(node.end, result, cache).charCodeAt() + return String.fromCharCode( + Random.integer(min, max) + ) + }, + literal: function(node, result, cache) { + return node.escaped ? node.body : node.text + }, + // Unicode \u + unicode: function(node, result, cache) { + return String.fromCharCode( + parseInt(node.code, 16) + ) + }, + // 十六进制 \xFF + hex: function(node, result, cache) { + return String.fromCharCode( + parseInt(node.code, 16) + ) + }, + // 八进制 \0 + octal: function(node, result, cache) { + return String.fromCharCode( + parseInt(node.code, 8) + ) + }, + // 反向引用 + 'back-reference': function(node, result, cache) { + return cache[node.code] || '' + }, + /* + http://en.wikipedia.org/wiki/C0_and_C1_control_codes + */ + CONTROL_CHARACTER_MAP: function() { + var CONTROL_CHARACTER = '@ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \\ ] ^ _'.split(' ') + var CONTROL_CHARACTER_UNICODE = '\u0000 \u0001 \u0002 \u0003 \u0004 \u0005 \u0006 \u0007 \u0008 \u0009 \u000A \u000B \u000C \u000D \u000E \u000F \u0010 \u0011 \u0012 \u0013 \u0014 \u0015 \u0016 \u0017 \u0018 \u0019 \u001A \u001B \u001C \u001D \u001E \u001F'.split(' ') + var map = {} + for (var i = 0; i < CONTROL_CHARACTER.length; i++) { + map[CONTROL_CHARACTER[i]] = CONTROL_CHARACTER_UNICODE[i] + } + return map + }(), + 'control-character': function(node, result, cache) { + return this.CONTROL_CHARACTER_MAP[node.code] + } + }) + + module.exports = Handler + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(24) + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## toJSONSchema + + 把 Mock.js 风格的数据模板转换成 JSON Schema。 + + > [JSON Schema](http://json-schema.org/) + */ + var Constant = __webpack_require__(2) + var Util = __webpack_require__(3) + var Parser = __webpack_require__(4) + + function toJSONSchema(template, name, path /* Internal Use Only */ ) { + // type rule properties items + path = path || [] + var result = { + name: typeof name === 'string' ? name.replace(Constant.RE_KEY, '$1') : name, + template: template, + type: Util.type(template), // 可能不准确,例如 { 'name|1': [{}, {} ...] } + rule: Parser.parse(name) + } + result.path = path.slice(0) + result.path.push(name === undefined ? 'ROOT' : result.name) + + switch (result.type) { + case 'array': + result.items = [] + Util.each(template, function(value, index) { + result.items.push( + toJSONSchema(value, index, result.path) + ) + }) + break + case 'object': + result.properties = [] + Util.each(template, function(value, name) { + result.properties.push( + toJSONSchema(value, name, result.path) + ) + }) + break + } + + return result + + } + + module.exports = toJSONSchema + + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(26) + +/***/ }, +/* 26 */ +/***/ function(module, exports, __webpack_require__) { + + /* + ## valid(template, data) + + 校验真实数据 data 是否与数据模板 template 匹配。 + + 实现思路: + 1. 解析规则。 + 先把数据模板 template 解析为更方便机器解析的 JSON-Schame + name 属性名 + type 属性值类型 + template 属性值模板 + properties 对象属性数组 + items 数组元素数组 + rule 属性值生成规则 + 2. 递归验证规则。 + 然后用 JSON-Schema 校验真实数据,校验项包括属性名、值类型、值、值生成规则。 + + 提示信息 + https://github.com/fge/json-schema-validator/blob/master/src/main/resources/com/github/fge/jsonschema/validator/validation.properties + [JSON-Schama validator](http://json-schema-validator.herokuapp.com/) + [Regexp Demo](http://demos.forbeslindesay.co.uk/regexp/) + */ + var Constant = __webpack_require__(2) + var Util = __webpack_require__(3) + var toJSONSchema = __webpack_require__(23) + + function valid(template, data) { + var schema = toJSONSchema(template) + var result = Diff.diff(schema, data) + for (var i = 0; i < result.length; i++) { + // console.log(Assert.message(result[i])) + } + return result + } + + /* + ## name + 有生成规则:比较解析后的 name + 无生成规则:直接比较 + ## type + 无类型转换:直接比较 + 有类型转换:先试着解析 template,然后再检查? + ## value vs. template + 基本类型 + 无生成规则:直接比较 + 有生成规则: + number + min-max.dmin-dmax + min-max.dcount + count.dmin-dmax + count.dcount + +step + 整数部分 + 小数部分 + boolean + string + min-max + count + ## properties + 对象 + 有生成规则:检测期望的属性个数,继续递归 + 无生成规则:检测全部的属性个数,继续递归 + ## items + 数组 + 有生成规则: + `'name|1': [{}, {} ...]` 其中之一,继续递归 + `'name|+1': [{}, {} ...]` 顺序检测,继续递归 + `'name|min-max': [{}, {} ...]` 检测个数,继续递归 + `'name|count': [{}, {} ...]` 检测个数,继续递归 + 无生成规则:检测全部的元素个数,继续递归 + */ + var Diff = { + diff: function diff(schema, data, name /* Internal Use Only */ ) { + var result = [] + + // 先检测名称 name 和类型 type,如果匹配,才有必要继续检测 + if ( + this.name(schema, data, name, result) && + this.type(schema, data, name, result) + ) { + this.value(schema, data, name, result) + this.properties(schema, data, name, result) + this.items(schema, data, name, result) + } + + return result + }, + /* jshint unused:false */ + name: function(schema, data, name, result) { + var length = result.length + + Assert.equal('name', schema.path, name + '', schema.name + '', result) + + return result.length === length + }, + type: function(schema, data, name, result) { + var length = result.length + + switch (schema.type) { + // 跳过含有『占位符』的属性值,因为『占位符』返回值的类型可能和模板不一致,例如 '@int' 会返回一个整形值 + case 'string': + if (schema.template.match(Constant.RE_PLACEHOLDER)) return true + break + } + + Assert.equal('type', schema.path, Util.type(data), schema.type, result) + + return result.length === length + }, + value: function(schema, data, name, result) { + var length = result.length + + var rule = schema.rule + var templateType = schema.type + if (templateType === 'object' || templateType === 'array') return + + // 无生成规则 + if (!rule.parameters) { + switch (templateType) { + case 'regexp': + Assert.match('value', schema.path, data, schema.template, result) + return result.length === length + case 'string': + // 同样跳过含有『占位符』的属性值,因为『占位符』的返回值会通常会与模板不一致 + if (schema.template.match(Constant.RE_PLACEHOLDER)) return result.length === length + break + } + Assert.equal('value', schema.path, data, schema.template, result) + return result.length === length + } + + // 有生成规则 + switch (templateType) { + case 'number': + var parts = (data + '').split('.') + parts[0] = +parts[0] + + // 整数部分 + // |min-max + if (rule.min !== undefined && rule.max !== undefined) { + Assert.greaterThanOrEqualTo('value', schema.path, parts[0], rule.min, result) + // , 'numeric instance is lower than the required minimum (minimum: {expected}, found: {actual})') + Assert.lessThanOrEqualTo('value', schema.path, parts[0], rule.max, result) + } + // |count + if (rule.min !== undefined && rule.max === undefined) { + Assert.equal('value', schema.path, parts[0], rule.min, result, '[value] ' + name) + } + + // 小数部分 + if (rule.decimal) { + // |dmin-dmax + if (rule.dmin !== undefined && rule.dmax !== undefined) { + Assert.greaterThanOrEqualTo('value', schema.path, parts[1].length, rule.dmin, result) + Assert.lessThanOrEqualTo('value', schema.path, parts[1].length, rule.dmax, result) + } + // |dcount + if (rule.dmin !== undefined && rule.dmax === undefined) { + Assert.equal('value', schema.path, parts[1].length, rule.dmin, result) + } + } + + break + + case 'boolean': + break + + case 'string': + // 'aaa'.match(/a/g) + var actualRepeatCount = data.match(new RegExp(schema.template, 'g')) + actualRepeatCount = actualRepeatCount ? actualRepeatCount.length : actualRepeatCount + + // |min-max + if (rule.min !== undefined && rule.max !== undefined) { + Assert.greaterThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.min, result) + Assert.lessThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.max, result) + } + // |count + if (rule.min !== undefined && rule.max === undefined) { + Assert.equal('repeat count', schema.path, actualRepeatCount, rule.min, result) + } + + break + + case 'regexp': + var actualRepeatCount = data.match(new RegExp(schema.template.source.replace(/^\^|\$$/g, ''), 'g')) + actualRepeatCount = actualRepeatCount ? actualRepeatCount.length : actualRepeatCount + + // |min-max + if (rule.min !== undefined && rule.max !== undefined) { + Assert.greaterThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.min, result) + Assert.lessThanOrEqualTo('repeat count', schema.path, actualRepeatCount, rule.max, result) + } + // |count + if (rule.min !== undefined && rule.max === undefined) { + Assert.equal('repeat count', schema.path, actualRepeatCount, rule.min, result) + } + break + } + + return result.length === length + }, + properties: function(schema, data, name, result) { + var length = result.length + + var rule = schema.rule + var keys = Util.keys(data) + if (!schema.properties) return + + // 无生成规则 + if (!schema.rule.parameters) { + Assert.equal('properties length', schema.path, keys.length, schema.properties.length, result) + } else { + // 有生成规则 + // |min-max + if (rule.min !== undefined && rule.max !== undefined) { + Assert.greaterThanOrEqualTo('properties length', schema.path, keys.length, rule.min, result) + Assert.lessThanOrEqualTo('properties length', schema.path, keys.length, rule.max, result) + } + // |count + if (rule.min !== undefined && rule.max === undefined) { + Assert.equal('properties length', schema.path, keys.length, rule.min, result) + } + } + + if (result.length !== length) return false + + for (var i = 0; i < keys.length; i++) { + result.push.apply( + result, + this.diff( + schema.properties[i], + data[keys[i]], + keys[i] + ) + ) + } + + return result.length === length + }, + items: function(schema, data, name, result) { + var length = result.length + + if (!schema.items) return + + var rule = schema.rule + + // 无生成规则 + if (!schema.rule.parameters) { + Assert.equal('items length', schema.path, data.length, schema.items.length, result) + } else { + // 有生成规则 + // |min-max + if (rule.min !== undefined && rule.max !== undefined) { + Assert.greaterThanOrEqualTo('items', schema.path, data.length, (rule.min * schema.items.length), result, + '[{utype}] array is too short: {path} must have at least {expected} elements but instance has {actual} elements') + Assert.lessThanOrEqualTo('items', schema.path, data.length, (rule.max * schema.items.length), result, + '[{utype}] array is too long: {path} must have at most {expected} elements but instance has {actual} elements') + } + // |count + if (rule.min !== undefined && rule.max === undefined) { + Assert.equal('items length', schema.path, data.length, (rule.min * schema.items.length), result) + } + } + + if (result.length !== length) return false + + for (var i = 0; i < data.length; i++) { + result.push.apply( + result, + this.diff( + schema.items[i % schema.items.length], + data[i], + i % schema.items.length + ) + ) + } + + return result.length === length + } + } + + /* + 完善、友好的提示信息 + + Equal, not equal to, greater than, less than, greater than or equal to, less than or equal to + 路径 验证类型 描述 + + Expect path.name is less than or equal to expected, but path.name is actual. + + Expect path.name is less than or equal to expected, but path.name is actual. + Expect path.name is greater than or equal to expected, but path.name is actual. + + */ + var Assert = { + message: function(item) { + return (item.message || + '[{utype}] Expect {path}\'{ltype} {action} {expected}, but is {actual}') + .replace('{utype}', item.type.toUpperCase()) + .replace('{ltype}', item.type.toLowerCase()) + .replace('{path}', Util.isArray(item.path) && item.path.join('.') || item.path) + .replace('{action}', item.action) + .replace('{expected}', item.expected) + .replace('{actual}', item.actual) + }, + equal: function(type, path, actual, expected, result, message) { + if (actual === expected) return true + switch (type) { + case 'type': + // 正则模板 === 字符串最终值 + if (expected === 'regexp' && actual === 'string') return true + break + } + + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is equal to', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + // actual matches expected + match: function(type, path, actual, expected, result, message) { + if (expected.test(actual)) return true + + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'matches', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + notEqual: function(type, path, actual, expected, result, message) { + if (actual !== expected) return true + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is not equal to', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + greaterThan: function(type, path, actual, expected, result, message) { + if (actual > expected) return true + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is greater than', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + lessThan: function(type, path, actual, expected, result, message) { + if (actual < expected) return true + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is less to', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + greaterThanOrEqualTo: function(type, path, actual, expected, result, message) { + if (actual >= expected) return true + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is greater than or equal to', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + }, + lessThanOrEqualTo: function(type, path, actual, expected, result, message) { + if (actual <= expected) return true + var item = { + path: path, + type: type, + actual: actual, + expected: expected, + action: 'is less than or equal to', + message: message + } + item.message = Assert.message(item) + result.push(item) + return false + } + } + + valid.Diff = Diff + valid.Assert = Assert + + module.exports = valid + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(28) + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + /* global window, document, location, Event, setTimeout */ + /* + ## MockXMLHttpRequest + + 期望的功能: + 1. 完整地覆盖原生 XHR 的行为 + 2. 完整地模拟原生 XHR 的行为 + 3. 在发起请求时,自动检测是否需要拦截 + 4. 如果不必拦截,则执行原生 XHR 的行为 + 5. 如果需要拦截,则执行虚拟 XHR 的行为 + 6. 兼容 XMLHttpRequest 和 ActiveXObject + new window.XMLHttpRequest() + new window.ActiveXObject("Microsoft.XMLHTTP") + + 关键方法的逻辑: + * new 此时尚无法确定是否需要拦截,所以创建原生 XHR 对象是必须的。 + * open 此时可以取到 URL,可以决定是否进行拦截。 + * send 此时已经确定了请求方式。 + + 规范: + http://xhr.spec.whatwg.org/ + http://www.w3.org/TR/XMLHttpRequest2/ + + 参考实现: + https://github.com/philikon/MockHttpRequest/blob/master/lib/mock.js + https://github.com/trek/FakeXMLHttpRequest/blob/master/fake_xml_http_request.js + https://github.com/ilinsky/xmlhttprequest/blob/master/XMLHttpRequest.js + https://github.com/firebug/firebug-lite/blob/master/content/lite/xhr.js + https://github.com/thx/RAP/blob/master/lab/rap.plugin.xinglie.js + + **需不需要全面重写 XMLHttpRequest?** + http://xhr.spec.whatwg.org/#interface-xmlhttprequest + 关键属性 readyState、status、statusText、response、responseText、responseXML 是 readonly,所以,试图通过修改这些状态,来模拟响应是不可行的。 + 因此,唯一的办法是模拟整个 XMLHttpRequest,就像 jQuery 对事件模型的封装。 + + // Event handlers + onloadstart loadstart + onprogress progress + onabort abort + onerror error + onload load + ontimeout timeout + onloadend loadend + onreadystatechange readystatechange + */ + + var Util = __webpack_require__(3) + + // 备份原生 XMLHttpRequest + window._XMLHttpRequest = window.XMLHttpRequest + window._ActiveXObject = window.ActiveXObject + + /* + PhantomJS + TypeError: '[object EventConstructor]' is not a constructor (evaluating 'new Event("readystatechange")') + + https://github.com/bluerail/twitter-bootstrap-rails-confirm/issues/18 + https://github.com/ariya/phantomjs/issues/11289 + */ + try { + new window.Event('custom') + } catch (exception) { + window.Event = function(type, bubbles, cancelable, detail) { + var event = document.createEvent('CustomEvent') // MUST be 'CustomEvent' + event.initCustomEvent(type, bubbles, cancelable, detail) + return event + } + } + + var XHR_STATES = { + // The object has been constructed. + UNSENT: 0, + // The open() method has been successfully invoked. + OPENED: 1, + // All redirects (if any) have been followed and all HTTP headers of the response have been received. + HEADERS_RECEIVED: 2, + // The response's body is being received. + LOADING: 3, + // The data transfer has been completed or something went wrong during the transfer (e.g. infinite redirects). + DONE: 4 + } + + var XHR_EVENTS = 'readystatechange loadstart progress abort error load timeout loadend'.split(' ') + var XHR_REQUEST_PROPERTIES = 'timeout withCredentials'.split(' ') + var XHR_RESPONSE_PROPERTIES = 'readyState responseURL status statusText responseType response responseText responseXML'.split(' ') + + // https://github.com/trek/FakeXMLHttpRequest/blob/master/fake_xml_http_request.js#L32 + var HTTP_STATUS_CODES = { + 100: "Continue", + 101: "Switching Protocols", + 200: "OK", + 201: "Created", + 202: "Accepted", + 203: "Non-Authoritative Information", + 204: "No Content", + 205: "Reset Content", + 206: "Partial Content", + 300: "Multiple Choice", + 301: "Moved Permanently", + 302: "Found", + 303: "See Other", + 304: "Not Modified", + 305: "Use Proxy", + 307: "Temporary Redirect", + 400: "Bad Request", + 401: "Unauthorized", + 402: "Payment Required", + 403: "Forbidden", + 404: "Not Found", + 405: "Method Not Allowed", + 406: "Not Acceptable", + 407: "Proxy Authentication Required", + 408: "Request Timeout", + 409: "Conflict", + 410: "Gone", + 411: "Length Required", + 412: "Precondition Failed", + 413: "Request Entity Too Large", + 414: "Request-URI Too Long", + 415: "Unsupported Media Type", + 416: "Requested Range Not Satisfiable", + 417: "Expectation Failed", + 422: "Unprocessable Entity", + 500: "Internal Server Error", + 501: "Not Implemented", + 502: "Bad Gateway", + 503: "Service Unavailable", + 504: "Gateway Timeout", + 505: "HTTP Version Not Supported" + } + + /* + MockXMLHttpRequest + */ + + function MockXMLHttpRequest() { + // 初始化 custom 对象,用于存储自定义属性 + this.custom = { + events: {}, + requestHeaders: {}, + responseHeaders: {} + } + } + + MockXMLHttpRequest._settings = { + timeout: '10-100', + /* + timeout: 50, + timeout: '10-100', + */ + } + + MockXMLHttpRequest.setup = function(settings) { + Util.extend(MockXMLHttpRequest._settings, settings) + return MockXMLHttpRequest._settings + } + + Util.extend(MockXMLHttpRequest, XHR_STATES) + Util.extend(MockXMLHttpRequest.prototype, XHR_STATES) + + // 标记当前对象为 MockXMLHttpRequest + MockXMLHttpRequest.prototype.mock = true + + // 是否拦截 Ajax 请求 + MockXMLHttpRequest.prototype.match = false + + // 初始化 Request 相关的属性和方法 + Util.extend(MockXMLHttpRequest.prototype, { + // https://xhr.spec.whatwg.org/#the-open()-method + // Sets the request method, request URL, and synchronous flag. + open: function(method, url, async, username, password) { + var that = this + + Util.extend(this.custom, { + method: method, + url: url, + async: typeof async === 'boolean' ? async : true, + username: username, + password: password, + options: { + url: url, + type: method + } + }) + + this.custom.timeout = function(timeout) { + if (typeof timeout === 'number') return timeout + if (typeof timeout === 'string' && !~timeout.indexOf('-')) return parseInt(timeout, 10) + if (typeof timeout === 'string' && ~timeout.indexOf('-')) { + var tmp = timeout.split('-') + var min = parseInt(tmp[0], 10) + var max = parseInt(tmp[1], 10) + return Math.round(Math.random() * (max - min)) + min + } + }(MockXMLHttpRequest._settings.timeout) + + // 查找与请求参数匹配的数据模板 + var item = find(this.custom.options) + + function handle(event) { + // 同步属性 NativeXMLHttpRequest => MockXMLHttpRequest + for (var i = 0; i < XHR_RESPONSE_PROPERTIES.length; i++) { + try { + that[XHR_RESPONSE_PROPERTIES[i]] = xhr[XHR_RESPONSE_PROPERTIES[i]] + } catch (e) {} + } + // 触发 MockXMLHttpRequest 上的同名事件 + that.dispatchEvent(new Event(event.type /*, false, false, that*/ )) + } + + // 如果未找到匹配的数据模板,则采用原生 XHR 发送请求。 + if (!item) { + // 创建原生 XHR 对象,调用原生 open(),监听所有原生事件 + var xhr = createNativeXMLHttpRequest() + this.custom.xhr = xhr + + // 初始化所有事件,用于监听原生 XHR 对象的事件 + for (var i = 0; i < XHR_EVENTS.length; i++) { + xhr.addEventListener(XHR_EVENTS[i], handle) + } + + // xhr.open() + if (username) xhr.open(method, url, async, username, password) + else xhr.open(method, url, async) + + // 同步属性 MockXMLHttpRequest => NativeXMLHttpRequest + for (var j = 0; j < XHR_REQUEST_PROPERTIES.length; j++) { + try { + xhr[XHR_REQUEST_PROPERTIES[j]] = that[XHR_REQUEST_PROPERTIES[j]] + } catch (e) {} + } + + return + } + + // 找到了匹配的数据模板,开始拦截 XHR 请求 + this.match = true + this.custom.template = item + this.readyState = MockXMLHttpRequest.OPENED + this.dispatchEvent(new Event('readystatechange' /*, false, false, this*/ )) + }, + // https://xhr.spec.whatwg.org/#the-setrequestheader()-method + // Combines a header in author request headers. + setRequestHeader: function(name, value) { + // 原生 XHR + if (!this.match) { + this.custom.xhr.setRequestHeader(name, value) + return + } + + // 拦截 XHR + var requestHeaders = this.custom.requestHeaders + if (requestHeaders[name]) requestHeaders[name] += ',' + value + else requestHeaders[name] = value + }, + timeout: 0, + withCredentials: false, + upload: {}, + // https://xhr.spec.whatwg.org/#the-send()-method + // Initiates the request. + send: function send(data) { + var that = this + this.custom.options.body = data + + // 原生 XHR + if (!this.match) { + this.custom.xhr.send(data) + return + } + + // 拦截 XHR + + // X-Requested-With header + this.setRequestHeader('X-Requested-With', 'MockXMLHttpRequest') + + // loadstart The fetch initiates. + this.dispatchEvent(new Event('loadstart' /*, false, false, this*/ )) + + if (this.custom.async) setTimeout(done, this.custom.timeout) // 异步 + else done() // 同步 + + function done() { + that.readyState = MockXMLHttpRequest.HEADERS_RECEIVED + that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) + that.readyState = MockXMLHttpRequest.LOADING + that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) + + that.status = 200 + that.statusText = HTTP_STATUS_CODES[200] + + // fix #92 #93 by @qddegtya + that.response = that.responseText = JSON.stringify( + convert(that.custom.template, that.custom.options), + null, 4 + ) + + that.readyState = MockXMLHttpRequest.DONE + that.dispatchEvent(new Event('readystatechange' /*, false, false, that*/ )) + that.dispatchEvent(new Event('load' /*, false, false, that*/ )); + that.dispatchEvent(new Event('loadend' /*, false, false, that*/ )); + } + }, + // https://xhr.spec.whatwg.org/#the-abort()-method + // Cancels any network activity. + abort: function abort() { + // 原生 XHR + if (!this.match) { + this.custom.xhr.abort() + return + } + + // 拦截 XHR + this.readyState = MockXMLHttpRequest.UNSENT + this.dispatchEvent(new Event('abort', false, false, this)) + this.dispatchEvent(new Event('error', false, false, this)) + } + }) + + // 初始化 Response 相关的属性和方法 + Util.extend(MockXMLHttpRequest.prototype, { + responseURL: '', + status: MockXMLHttpRequest.UNSENT, + statusText: '', + // https://xhr.spec.whatwg.org/#the-getresponseheader()-method + getResponseHeader: function(name) { + // 原生 XHR + if (!this.match) { + return this.custom.xhr.getResponseHeader(name) + } + + // 拦截 XHR + return this.custom.responseHeaders[name.toLowerCase()] + }, + // https://xhr.spec.whatwg.org/#the-getallresponseheaders()-method + // http://www.utf8-chartable.de/ + getAllResponseHeaders: function() { + // 原生 XHR + if (!this.match) { + return this.custom.xhr.getAllResponseHeaders() + } + + // 拦截 XHR + var responseHeaders = this.custom.responseHeaders + var headers = '' + for (var h in responseHeaders) { + if (!responseHeaders.hasOwnProperty(h)) continue + headers += h + ': ' + responseHeaders[h] + '\r\n' + } + return headers + }, + overrideMimeType: function( /*mime*/ ) {}, + responseType: '', // '', 'text', 'arraybuffer', 'blob', 'document', 'json' + response: null, + responseText: '', + responseXML: null + }) + + // EventTarget + Util.extend(MockXMLHttpRequest.prototype, { + addEventListene: function addEventListene(type, handle) { + var events = this.custom.events + if (!events[type]) events[type] = [] + events[type].push(handle) + }, + removeEventListener: function removeEventListener(type, handle) { + var handles = this.custom.events[type] || [] + for (var i = 0; i < handles.length; i++) { + if (handles[i] === handle) { + handles.splice(i--, 1) + } + } + }, + dispatchEvent: function dispatchEvent(event) { + var handles = this.custom.events[event.type] || [] + for (var i = 0; i < handles.length; i++) { + handles[i].call(this, event) + } + + var ontype = 'on' + event.type + if (this[ontype]) this[ontype](event) + } + }) + + // Inspired by jQuery + function createNativeXMLHttpRequest() { + var isLocal = function() { + var rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/ + var rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/ + var ajaxLocation = location.href + var ajaxLocParts = rurl.exec(ajaxLocation.toLowerCase()) || [] + return rlocalProtocol.test(ajaxLocParts[1]) + }() + + return window.ActiveXObject ? + (!isLocal && createStandardXHR() || createActiveXHR()) : createStandardXHR() + + function createStandardXHR() { + try { + return new window._XMLHttpRequest(); + } catch (e) {} + } + + function createActiveXHR() { + try { + return new window._ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) {} + } + } + + + // 查找与请求参数匹配的数据模板:URL,Type + function find(options) { + + for (var sUrlType in MockXMLHttpRequest.Mock._mocked) { + var item = MockXMLHttpRequest.Mock._mocked[sUrlType] + if ( + (!item.rurl || match(item.rurl, options.url)) && + (!item.rtype || match(item.rtype, options.type.toLowerCase())) + ) { + // console.log('[mock]', options.url, '>', item.rurl) + return item + } + } + + function match(expected, actual) { + if (Util.type(expected) === 'string') { + return expected === actual + } + if (Util.type(expected) === 'regexp') { + return expected.test(actual) + } + } + + } + + // 数据模板 => 响应数据 + function convert(item, options) { + return Util.isFunction(item.template) ? + item.template(options) : MockXMLHttpRequest.Mock.mock(item.template) + } + + module.exports = MockXMLHttpRequest + +/***/ } +/******/ ]) +}); +; \ No newline at end of file diff --git a/yunshop-front-master/mock/Display.js b/yunshop-front-master/mock/Display.js new file mode 100644 index 0000000..8badaee --- /dev/null +++ b/yunshop-front-master/mock/Display.js @@ -0,0 +1,1564 @@ +/** + * Created by an.han on 16/10/15. + * 基于 express 的接口处理定义 + * See http://expressjs.com/zh-cn/4x/api.html + */ +var Mock = require('mockjs'); +var data = Mock.mock({ + // 属性 list 的值是一个数组,其中含有 1 到 10 个元素 + 'list|1-100': [{ + 'id|+5': 1 + }] +}); +module.exports = { + api: '/goods/Display', + response: function (req, res) { + + if(req.query.page==1){ + res.send({ + "result": "1", + "msg": "成功", + "data": { + "goods": [ + { + "id": "43", + "uniacid": "3", + "pcate": "121", + "ccate": "147", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "良良婴儿用品宝宝床上用品八件套 新生儿必备婴幼儿礼盒秋冬包邮", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/YhXUBQ2BhYa3a2t222vQ3m2xUDmKm4.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "428.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "399", + "totalcnf": "0", + "sales": "214", + "salesreal": "0", + "spec": "", + "createtime": "1484991220", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/EA1EsSazizw8ih1UIH6tvCHFufVSj5.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/mKkHwfAgdcGyLew8G6gg1eJOGhJCow.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/yMi9hd65m8VRz5J5mkMov8O4I6kI6J.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/W405GY0y5G4e56Lg44BlCK8BJ4546l.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1484991240", + "timeend": "1484991240", + "viewcount": "13", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "16285581453", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a221w.7920213.3456443-53.6.R3WBYI&abtest=_AB-LR978-PR978&pos=6&abbucket=_AB-M978_B9&acm=201601216.1003.1.739886&id=16285581453&scm=1003.1.201601216.D2I_16285581453_739886&sku_properties=122216343:28851", + "updatetime": "1484991220", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returns2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "42", + "uniacid": "3", + "pcate": "121", + "ccate": "146", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "法国PELLIOT户外冲锋衣 男女三合一两件套秋冬防水透气抓绒冲锋衣", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/AwSzHztF4w5hVhwqvwfwkHmhvkt5Wk.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "1599.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "7579", + "totalcnf": "0", + "sales": "3809", + "salesreal": "2", + "spec": "", + "createtime": "1484991078", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/vF6GCS9HvPOjcBQmKQHMhfiB6Ski9b.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/YUg6GmsGB2AgBjMQDkAkkb3623AD3D.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/QxYN8MXHl5K5Y5Hx1nIL0lFlpkHd6K.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/ZBHpjxPhCPDphjWq199CnflABptFh9.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "25", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "40445775139", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.4-b-s.w5003-14561979876.2.eJoYZp&id=40445775139&rn=be399b6c5eecbb910b42821899d4578d&abbucket=19&scene=taobao_shop", + "updatetime": "1484991078", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "41", + "uniacid": "3", + "pcate": "121", + "ccate": "139", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "贝妍冬季加厚珊瑚绒情侣睡衣韩版女保暖家居服可外穿男法兰绒套装", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/RhnhCLVNn8cwnNojaKlOaaI88Lajkn.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "328.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "2903", + "totalcnf": "0", + "sales": "1375", + "salesreal": "0", + "spec": "", + "createtime": "1484990918", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/ELSXJeEIrW6lLZ9NsTeWijzE2LCXWe.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/CicwtapTppzslqPCW4LlqaJ4LTqL4g.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/pSxeIb13xsJbNBI3JKJJ3jpuI9ijkJ.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/BTPUq6UGb3tF26jt3qqhHHnzbQ62h2.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "11", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "539392586137", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a220m.1000858.1000725.5.bAmB4S&id=539392586137&skuId=3231898201103&areaId=440100&user_id=746267782&cat_id=50025983&is_b=1&rn=e0a6a51d55256398c890a6b3128c957b", + "updatetime": "1484990918", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "36", + "uniacid": "3", + "pcate": "121", + "ccate": "147", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "新生儿礼盒婴儿衣服0-3个月纯棉母婴用品大全刚出生宝宝套装冬季", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/eKTLLt66BcltxXG6CB79b1Txk9XBXk.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "399.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "5384", + "totalcnf": "0", + "sales": "552", + "salesreal": "0", + "spec": "", + "createtime": "1484984611", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/mNbW8NK8Nnw8nsqKZU8bFAlLnsYNwb.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/XzTx30AOFrM8HTFI3Fos8trPs80Wm3.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/LQSyEe5kb4SZAs1steqEQyE4bB5XY4.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/AP03DAcy602pewEAAqqmyPeE6Z35ca.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "20", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "38948609524", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a2311wz.7782398.200013.10.W6oR3L&abtest=_AB-LR979-PR979&pos=2&abbucket=_AB-M979_B9&acm=201601215.1003.1.700922&id=38948609524&scm=1003.1.201601215.D2I_38948609524_700922", + "updatetime": "1484984611", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "35", + "uniacid": "3", + "pcate": "121", + "ccate": "146", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "彪马PUMA男装羽绒服2016新款运动服运动休闲鹿晗无帽59037112", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/lEEDcc55PCI12EpC1dlif2i95Efi39.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "649.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "97", + "totalcnf": "0", + "sales": "104", + "salesreal": "0", + "spec": "", + "createtime": "1484984487", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/dGiaA6GZzW4osOagw6TIOMwgOgMqx6.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/SN5FOad331f3ghN6f35Ng6dDpA93NN.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/j08vkEpjpZUV8SEV28PZ0eEePEV0sV.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/hjKJPZ1KkZuZPpzzagHph7KvjAcjAH.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "15", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "539414520510", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.3-b-s.w4011-15179893822.89.1g9w3l&id=539414520510&rn=023913d49621ff9c4cb5f2877a9fc221&abbucket=10", + "updatetime": "1484984487", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "32", + "uniacid": "3", + "pcate": "135", + "ccate": "143", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "预售 包包2017新款日韩简约时尚手提包百搭单肩斜挎包女包翅膀包", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/tE9TRScEsHHKz2BhSBrbCtrssBC3S4.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "269.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "76", + "totalcnf": "0", + "sales": "35", + "salesreal": "0", + "spec": "", + "createtime": "1484981552", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/AUwP0pnPbZB0HT8NPbD0sixuix8Z00.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/q8e88lUh8b8BEb8X5ZEBaALhb8HlBB.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/lGG7rirZbDC3rP53Cr177zpiqRDiP7.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/bwg5gFbkFCbfZ11dQGg5kGd55eBW5q.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "16", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "544224637530", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.4-b-s.w5003-15807068085.2.0rbJvc&id=544224637530&scene=taobao_shop", + "updatetime": "1484981552", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "29", + "uniacid": "3", + "pcate": "135", + "ccate": "143", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Samsonite/新秀丽新款双肩包 简约时尚背包多功能防水商务电脑包", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/jf8AMvJRrGmrvmbHAGVffGhasFczAH.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "1880.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "113", + "totalcnf": "0", + "sales": "40", + "salesreal": "15", + "spec": "", + "createtime": "1484980640", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/r2Ize6EeIVAiEVcYZ4ua4SnnBFB3vB.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/SWrTTkVZpVR5QWVTCCrQDVwiNhMkpV.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/dDjm1p1BzdnZPW6NYQQz37yDNdDW46.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/OCUd5366MWq6fZxu6QCVe655MJhYDy.jpg\";}", + "isnew": "0", + "ishot": "1", + "isdiscount": "0", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1487138820", + "timeend": "1487138820", + "viewcount": "223", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "543590106394", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a220o.1000855.w5003-14942028552.1.6epotF&id=543590106394&scene=taobao_shop#", + "updatetime": "1484980640", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "1", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "25", + "uniacid": "3", + "pcate": "121", + "ccate": "139", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "美梦春秋季女人睡衣长袖韩版莱卡棉可爱家居服女士条纹居家服套装", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/S15MS89gmt997LSD7ds17777swG6D1.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "258.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "297", + "totalcnf": "0", + "sales": "135", + "salesreal": "0", + "spec": "", + "createtime": "1484979165", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/CddJEe16IR61rTP6yv66pDdE688t6t.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/HHYEb2o2oyLNVhL26E6Zs6ls6Zh2fR.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/k3MKtOikYK2o40NI5Ck4hO35Y2h52k.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/d3rLdu3J3JU9KGgZ9RP3gpv35xAUvg.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "7", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "544077273637", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a3211.60665-6440522.userDefined_1483695508579_11.1.IkLn9E&id=544077273637&gccpm=8127348.102.2.subject-1009.60665&sta=gccpm:8127348.102.2.subject-1009.60665&track_params={%22gccpm%22:%228127348.102.2.subject-1009.60665", + "updatetime": "1484979165", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "24", + "uniacid": "3", + "pcate": "135", + "ccate": "137", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Camel/骆驼男鞋春季时尚休闲男鞋布洛克雕花 男士皮鞋", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/LC6l6Ll6kUz8c7I8cOKllpo7C81K6l.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "768.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "496", + "totalcnf": "0", + "sales": "8", + "salesreal": "0", + "spec": "", + "createtime": "1484973963", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/fZ6wdVV06H8sV6RMr2JDjo6x6Xm6RC.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/Xo34433rV6Avh54oZH777hHRBHvHTs.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/EJ1qSwlLLSStM6EA11StLq1Ze1Mt16.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/KUiVU8pf6PUCuzUUIPCUvCvvuxebur.jpg\";}", + "isnew": "1", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "22", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "537646616023", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.5-b-s.w4011-14859136264.120.v3HVYq&id=537646616023&rn=0056df63de7193d81f747954f310f646&abbucket=10", + "updatetime": "1484973963", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "23", + "uniacid": "3", + "pcate": "135", + "ccate": "138", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Daphne/达芙妮2017春新舒适羊皮高跟鞋 简约尖头浅口细跟通勤单鞋", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/ux50N0R000HHwlNr505w3x0wW0PNxq.png", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "599.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "1810", + "totalcnf": "0", + "sales": "52", + "salesreal": "0", + "spec": "", + "createtime": "1484973604", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/H33I6leIz7Ib7M46iIgIAD4BN9iIAa.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/B3rL5lvoA4PPLlrF9p0Fc54Jv9f759.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/hbxz8YfxYMOrw3iomItZMPGtptO8wo.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/XvdZF2GNetc5E2CBV7fGNE52E17zp1.jpg\";}", + "isnew": "0", + "ishot": "0", + "isdiscount": "0", + "isrecommand": "0", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "14", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "542495539297", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.5-b-s.w4011-14964898488.131.s6Rb1Q&id=542495539297&rn=77222e57bc127e9e94fd145260afbe31&abbucket=10", + "updatetime": "1484973604", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + } + ], + "pagesize": "10", + "category": [ + { + "id": "121", + "name": "服装", + "level": "1", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2016/12/oQ9ZqEo0Uu9kNfq9S9q0roFQqEnqNN.png" + }, + { + "id": "135", + "name": "鞋子", + "level": "1", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/gOlR33YNb4rbOQ4O3VRone5eO2VlY2.png" + } + ], + "current_category": false, + "page_total": "3", + "page": "1" + } +}); + + } + if(req.query.page==2){ + res.send({"result":"1","msg":"\u6210\u529f","data":{"goods":[{"id":"22","uniacid":"3","pcate":"135","ccate":"138","type":"1","status":"1","displayorder":"0","title":"Daphne\/\u8fbe\u8299\u59ae\u8212\u9002\u5e73\u5e95\u4f11\u95f2\u5c0f\u767d\u978b \u65f6\u5c1a\u62fc\u63a5\u522b\u9488\u6302\u9970\u7cfb\u5e26\u900f\u6c14\u5355\u978b","thumb":"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/mn2JB95Zuf383bL8WN083uNPLUn5Pm.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"399.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"8056","totalcnf":"0","sales":"1516","salesreal":"0","spec":"","createtime":"1484973341","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/NaAueuAZzuCl9Ig1l14alG9uuVU2e9.jpg\";i:1;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/XsH92624zhqB5aSwhJ9s966S5WBnyL.jpg\";i:2;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/wgGOzCLODxXmOqqj9B2MbcljOBlwJW.jpg\";i:3;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/g73Ug942wz9o2239w3u97S8X9969kn.jpg\";}","isnew":"1","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"0","timeend":"0","viewcount":"18","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"535517550934","taotaoid":"","taobaourl":"https:\/\/detail.tmall.com\/item.htm?spm=a220o.1000855.w5003-15716907265.1.IAobxF&id=535517550934&scene=taobao_shop","updatetime":"1484973341","share_title":"","share_icon":"","cash":"0","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"0","storeids":"","noticeopenid":"","tcate":"0","noticetype":"","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"21","uniacid":"3","pcate":"135","ccate":"137","type":"1","status":"1","displayorder":"0","title":"Semir\u5c0f\u767d\u978b\u7537 \u767d\u8272\u677f\u978b\u60c5\u4fa3\u978b\u4f11\u95f2\u8fd0\u52a8\u978b\u900f\u6c14\u97e9\u7248\u6f6e\u6d41\u4f4e\u5e2e\u7537\u978b\u5b50","thumb":"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/wbboB8449YH83oo1f1b9S51fo8YFO1.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"199.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"3227","totalcnf":"0","sales":"4005","salesreal":"1","spec":"","createtime":"1484973031","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/c5M10r00mC0wC0tWz1EzwNhMnwtW6z.jpg\";i:1;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/jEwz4y55Y9EDhYkZy7eU54e777y5Xr.jpg\";i:2;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/UDtg1sZsDUs5KS7A1GDmX0mm8fXXaD.jpg\";i:3;s:89:\"https:\/\/sp.tbw365.cn\/attachment\/images\/sz_yi\/3\/2017\/01\/tzV35HS2Gbg25a03Hf885uUX83AGF8.jpg\";}","isnew":"1","ishot":"1","isdiscount":"1","isrecommand":"1","issendfree":"0","istime":"0","iscomment":"0","timestart":"0","timeend":"0","viewcount":"132","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"531236111440","taotaoid":"","taobaourl":"https:\/\/detail.tmall.com\/item.htm?spm=a1z10.1-b-s.w11359925-15073436959.8.KZp7Sy&id=531236111440","updatetime":"1484973031","share_title":"","share_icon":"","cash":"0","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"0","storeids":"","noticeopenid":"","tcate":"0","noticetype":"","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"15","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"\u3010angelababy\u3011\u8863\u54c1\u5929\u6210\u6bdb\u5462\u5916\u5957\u79cb\u51ac\u5b66\u751f\u4e2d\u957f\u6b3e2016\u79cb\u51ac\u5462\u5b50\u5927\u8863","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/vw4mbw58b5MSWwmW2Uj3zJAtW92aua.jpg","unit":"\u4ef6","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"99999999.99","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"4956","totalcnf":"0","sales":"1243","salesreal":"2","spec":"","createtime":"1484039202","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Yu4a3uhTpU3rUuUHCQCmJ9USUMFU4Y.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/jU2ndbnPnUPrnZCbO1Ow3p00BcPUGo.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/txb1E9ddNx3oMbzqEFNGVfUvEZFbDP.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/h9aie9Aw56WpBZ7M5TPbPw0tPzqTqZ.jpg\";}","isnew":"1","ishot":"1","isdiscount":"1","isrecommand":"1","issendfree":"1","istime":"0","iscomment":"0","timestart":"1484289960","timeend":"1484289960","viewcount":"176","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"538795783617","taotaoid":"","taobaourl":"https:\/\/detail.tmall.com\/item.htm?spm=a1z10.4-b-s.w4004-15309747252.14.dgMGCY&abtest=_AB-LR130-PR130&pvid=dfa5170b-0ed2-4f9c-80c5-49fa10a86c06&pos=7&abbucket=_AB-M130_B9&acm=03131.1003.1.702582&id=538795783617&scm=1007.12940.28087.100200300000000","updatetime":"1484039202","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"125","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"1","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"296","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returns2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"14","uniacid":"3","pcate":"121","ccate":"123","type":"1","status":"1","displayorder":"0","title":"\u3010\u9884\u552e\u3011\u8863\u54c1\u5929\u6210 \u65b0\u6b3e\u51ac\u7537\u88c5\u886c\u8863 \u97e9\u7248\u5370\u82b1\u7537\u58eb\u5c16\u9886\u7eaf\u68c9\u886c\u886b \u7537","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/IGeBNaaAJuAXxriJ2ppA9zyAZWXaOb.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"488.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"843","totalcnf":"0","sales":"951","salesreal":"1","spec":"","createtime":"1484038864","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/z94UcZ8eEN0DE9aE8E3D3cNeV389E5.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Gn4JJP9ZJKwwaVoBjKzkl9Zm9JVknJ.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/us3z4S49J3EI04iCt31h3q4cmJJjas.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/m1ICaGTlaMCSAI4BJatlA4AAIAjXTA.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"0","timeend":"0","viewcount":"21","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"539150189589","taotaoid":"","taobaourl":"https:\/\/detail.tmall.com\/item.htm?spm=a1z10.3-b-s.w4011-14448791615.63.PE3Ex6&id=539150189589&rn=498935111bfd65529a33447f329163ce&abbucket=10","updatetime":"1484038864","share_title":"","share_icon":"","cash":"0","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"0","storeids":"","noticeopenid":"","tcate":"130","noticetype":"","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"12","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"[\u81ea\u63d0,\u6838\u9500]\u6885\u5b50\u719f\u4e862016\u51ac\u5b63\u6b3e \u6587\u827a\u590d\u53e4\u957f\u8896\u6253\u5e95\u9488\u7ec7\u886b \u7eaf\u8272\u6e05\u65b0\u5957\u5934\u6bdb\u8863\u5973","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/m3lzgOb6gkLLOTvVCSApOFbS0Yb4P2.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"128.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"89","totalcnf":"0","sales":"707","salesreal":"10","spec":"","createtime":"1484034241","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/SbVyjyy3eJk9jmq3c9Io9TTTq93oYq.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/y55Q4ZVXBv00D5D5m5AKAbZ5nEdr20.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/qP6wW6rYGV6z6k4Y6zyTt4RCt1l5Rg.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/aOJT9QWj0QQKYqsXkh0ysyG6WkWKKj.jpg\";}","isnew":"1","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"1484037060","timeend":"1484037060","viewcount":"163","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"539418265542","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.4-c-s.w4004-14451455231.9.XQ1LSY&id=539418265542","updatetime":"1484034241","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"2","storeids":"","noticeopenid":"","tcate":"0","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"1","discounttype":"0","discounts2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returns2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"1","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"11","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"\u7ea2\u8c46\u8bcd \/\u81ea\u5236 \u6e05\u65b0\u7eaf\u8272\u767d\u9e2d\u7ed2\u7fbd\u7ed2\u670d\u5973 \u4fdd\u6696\u6587\u827a\u8fde\u5e3d\u51ac\u6b3e\u77ed\u5916\u5957","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/r1CD8DdD3yje083336626618HWEd33.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"395.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"174","totalcnf":"0","sales":"212","salesreal":"0","spec":"","createtime":"1484033964","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Xgi4vjH1PJhzj3IhXj2J9Vx51H59b2.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/xj8yC78W82a4Wa2Bb877o28y8v2EEA.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/D7fT2eFhEOSNKNMZ22EotONQm7zo7F.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/psuAK4IcZ27Da4py1EM7c2kPia4zFk.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"1484038020","timeend":"1484038020","viewcount":"18","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"542560269636","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a217f.8051907.312185.28.REf2Po&id=542560269636","updatetime":"1484033964","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"124","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"10","uniacid":"3","pcate":"121","ccate":"123","type":"1","status":"1","displayorder":"0","title":"\u7f8e\u7279\u65af\u90a6\u5a01\u725b\u4ed4\u88e4\u75372016\u79cb\u88c5\u65b0\u6b3e\u4fee\u8eab\u5c0f\u811a\u957f\u88e4[\u674e\u6613\u5cf0\u6b3e]602725","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/l3RiiRIMoxIXBmbtMt3xjx3vVD3mz6.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"219.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"7376","totalcnf":"0","sales":"559","salesreal":"5","spec":"","createtime":"1484033845","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/I9efe939hb99p1EH44MhH69398eXH9.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/gJl1Ci6cKmtCcTUTNnIKIKnam1cku9.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/ta83K6qOK8Oj8SDOaJ8fFWoIo8owOW.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/n1qtOyi4dlYsXl24SosizQQQQLQ7ld.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"0","timeend":"0","viewcount":"23","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"537831485091","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.5-c-s.w4002-14845071775.29.ky3ipR&id=537831485091","updatetime":"1484033845","share_title":"","share_icon":"","cash":"0","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"0","storeids":"","noticeopenid":"","tcate":"131","noticetype":"","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"8","uniacid":"3","pcate":"121","ccate":"123","type":"1","status":"1","displayorder":"0","title":"\u7f8e\u7279\u65af\u90a6\u5a01\u6bdb\u8863\u7537\u58eb2016\u51ac\u88c5\u65b0\u6b3e\u7eaf\u8272\u5706\u9886\u957f\u8896\u6bdb\u886b601657","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/zgPizFGsAezsP3XzEafuzUer5iFIrI.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"239.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"1013","totalcnf":"0","sales":"1966","salesreal":"1","spec":"","createtime":"1484033696","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/TYV5YQ1OEDvK80oo48CC50Hd02YVYz.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/V04nIiWHC8dGY94IYcqT168WC09hW4.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/wxZEdepsbR6Ps6zpSlSPNS7D7opqEB.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Z40Brz55Hf60g00bh56H0H7m7SEVs5.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"0","timeend":"0","viewcount":"26","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"537791446223","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.5-c-s.w4002-14845071775.20.4gxZYz&id=537791446223","updatetime":"1484033696","share_title":"","share_icon":"","cash":"0","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"0","storeids":"","noticeopenid":"","tcate":"129","noticetype":"","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"7","uniacid":"3","pcate":"121","ccate":"123","type":"1","status":"1","displayorder":"0","title":"\u7f8e\u7279\u65af\u90a6\u5a01\u68c9\u670d\u7537\u58eb2016\u51ac\u88c5\u65b0\u6b3e\u5531K\u5939\u68c9\u5916\u5957231202\u4e13\u67dc\u6b3e","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/R9QYvq0ZQvk80oU9tTb9T48t5z9400.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"449.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"1111","totalcnf":"0","sales":"20","salesreal":"8","spec":"","createtime":"1484033590","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/js36HFf6LlZc6uUhHuQu3WwS1ughas.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/fUWWKKtfyQGqQdkYuTGTCdj808Qd77.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Wgi11epJpGS0IPg5tPPP3vZzPi0j0j.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/EWzMEmiedmC19bBH7Rhl77iHI9ceT9.jpg\";}","isnew":"0","ishot":"1","isdiscount":"0","isrecommand":"1","issendfree":"0","istime":"0","iscomment":"0","timestart":"1487146920","timeend":"1487146920","viewcount":"127","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"541230305470","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.5-c-s.w4002-14845071775.96.I0F0MH&id=541230305470","updatetime":"1484033590","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"128","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"4","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"\u5973\u88c5\u6625\u5b632017\u65b0\u6b3e\u6f6e\u97e9\u7248\u8377\u53f6\u8fb9\u62fc\u63a5\u6bdb\u5462\u5927\u8863\u4e2d\u957f\u6b3e\u6bdb\u5462\u5916\u5957AD23","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/Aj6NIys5uS0544645s65Dn4PnxUTXx.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"213.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"89413","totalcnf":"0","sales":"585","salesreal":"30","spec":"","createtime":"1483963234","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/XNwDChHNHN7z5Sfun9NKSUVDwQ79UD.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/KhU7d1901uxDeXZuuUdvdux610hd76.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/kjyDMMmjyeC1TZ8NWte9d6NmZkcnEz.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/AkK003KovFkdo9EHkBW0OoflNy30wY.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"1484035980","timeend":"1484035980","viewcount":"117","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"544108800362","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.1-c-s.w9695563-15699880305.6.Q73rvQ&id=544108800362&scene=taobao_shop","updatetime":"1483963234","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"125","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"}],"pagesize":"10","category":false,"current_category":false,"page_total":"3","page":"2"}}) + } + if(req.query.page==3){ + res.send({"result":"1","msg":"\u6210\u529f","data":{"goods":[{"id":"3","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"\u5305\u90ae\u5973\u88c5\u51ac\u5b632016\u65b0\u6b3e\u6f6e\u97e9\u7248\u77ed\u6b3e\u5916\u5957\u68c9\u670d\u7f8a\u7f94\u6bdb\u62fc\u63a5\u7ffb\u9886\u68c9\u8884\u68c9\u8863","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/e11FMAZL7yDr0rd0NYLyFWy16wGFlE.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"0.01","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"61748","totalcnf":"0","sales":"12857","salesreal":"41","spec":"","createtime":"1483963162","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/m4174ll2b5Nz54qQ72770b2B22z0K0.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/IV5SQkF3Gm5ffqfvgmM5vVmmF5f5NV.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/AorPSVEyozSEVPVSnf9VcapFrqRNYs.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/WIjcR2HJNIRg2seGSBIVVC00FWzErJ.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"1484029920","timeend":"1484029920","viewcount":"88","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"541805128288","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.1-c-s.w9695563-15699880305.3.Q73rvQ&id=541805128288&scene=taobao_shop","updatetime":"1483963162","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"125","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"1","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"},{"id":"1","uniacid":"3","pcate":"121","ccate":"122","type":"1","status":"1","displayorder":"0","title":"2016\u79cb\u51ac\u5b63\u65b0\u6b3e\u97e9\u7248\u77ed\u6b3e\u5bbd\u677e\u7ffb\u9886\u62fc\u8272\u5462\u5b50\u5927\u8863\u6f6e\u7f8a\u7f94\u6bdb\u5462\u5916\u5957\u5973","thumb":"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/ckUQle9FMM9xHJZMuH2J8MU9mulTfl.jpg","unit":"","description":"","goodssn":"","productsn":"","productprice":"0.00","marketprice":"318.00","costprice":"0.00","bonusmoney":"0.00","originalprice":"0.00","total":"150978","totalcnf":"0","sales":"6339","salesreal":"9","spec":"","createtime":"1483963000","weight":"0.00","credit":"","maxbuy":"0","usermaxbuy":"0","hasoption":"1","dispatch":"0","thumb_url":"a:4:{i:0;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/a1P1iQR01F0uPQ813P3O8fk8k8DokI.jpg\";i:1;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/wPXaEAUX0pNYPjQ00yxCvvZ6aaCCXY.jpg\";i:2;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/vruxJOhgzC9sH755co9e5XcX67HEhX.jpg\";i:3;s:93:\"http:\/\/bztang.cdlfjy.com\/attachment\/images\/sz_yi\/3\/2017\/01\/zzY26UNzNM87k42z7Uom2V4J7zC42Z.jpg\";}","isnew":"0","ishot":"0","isdiscount":"0","isrecommand":"0","issendfree":"0","istime":"0","iscomment":"0","timestart":"1484035980","timeend":"1484035980","viewcount":"72","deleted":"0","hascommission":"0","commission1_rate":"0.00","commission1_pay":"0.00","commission2_rate":"0.00","commission2_pay":"0.00","commission3_rate":"0.00","commission3_pay":"0.00","score":"0.00","taobaoid":"543498366489","taotaoid":"","taobaourl":"https:\/\/item.taobao.com\/item.htm?spm=a1z10.1-c-s.w9695563-15699880305.1.Q73rvQ&id=543498366489&scene=taobao_shop","updatetime":"1483963000","share_title":"","share_icon":"","cash":"1","commission_thumb":"","isnodiscount":"0","showlevels":"","buylevels":"","showgroups":"","buygroups":"","isverify":"1","storeids":"","noticeopenid":"","tcate":"125","noticetype":"0","needfollow":"0","followtip":"","followurl":"","deduct":"0.00","virtual":"0","ccates":"","discounts":"{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}","returns":"","nocommission":"0","hidecommission":"0","pcates":"","tcates":"","artid":"0","detail_logo":"","detail_shopname":"","detail_btntext1":"","detail_btnurl1":"","detail_btntext2":"","detail_btnurl2":"","detail_totaltitle":"","deduct2":"0.00","ednum":"0","edmoney":"0.00","edareas":"","cates":"","diyformtype":"0","manydeduct":"0","dispatchtype":"0","dispatchid":"0","dispatchprice":"0.00","diyformid":"0","diymode":"0","shorttitle":"","commission_level_id":"0","supplier_uid":"0","isreturn":"0","isreturnqueue":"0","deposit":"10","print_id":"0","redprice":"","pcate1":"0","ccate1":"0","tcate1":"0","nobonus":"0","isverifysend":"0","discounttype":"0","discounts2":"{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}","returns2":"","returntype":"0","discountway":"0","isopenchannel":"0","pcates2":"","ccates2":"","tcates2":"","love_money":"0.00","yunbi_consumption":"0.000","yunbi_commission":"0.000","isyunbi":"0","yunbi_deduct":"0.00","isforceyunbi":"0","catch_id":"0","catch_source":"0","catch_url":"0","minprice":"0.00","maxprice":"0.00","isdeclaration":"0","virtual_declaration":"0.00","goods_balance":"0.00","balance_with_store":"1","dispatchsend":"0","pcate_area":"0","ccate_area":"0","tcate_area":"0","plugin":"","return_appoint_amount":"0.00","opt_switch":"0","province":"","operator":"0","isrecharge":"0","deductcommission":"0.00"}],"pagesize":"10","category":false,"current_category":false,"page_total":"3","page":"3"}}) + } + if(req.query.page==4){ + res.send({ + "result": "1", + "msg": "成功", + "page_total": "3", + "page": "4" + }) + } + if(req.query.page==5){ + res.send() + } + } +}; diff --git a/yunshop-front-master/mock/contentlist.js b/yunshop-front-master/mock/contentlist.js new file mode 100644 index 0000000..217314f --- /dev/null +++ b/yunshop-front-master/mock/contentlist.js @@ -0,0 +1,69 @@ +/** + * Created by an.han on 16/10/15. + * 基于 express 的接口处理定义 + * See http://expressjs.com/zh-cn/4x/api.html + */ +var Mock = require('mockjs'); +var data = Mock.mock({ + // 属性 list 的值是一个数组,其中含有 1 到 10 个元素 + 'list|1-100': [{ + 'id|+5': 1 + }] +}); + var obj = { + branch: 'https://m.360buyimg.com/mobilecms/s528x180_jfs/t3208/247/6270757246/214756/73dcfa1c/58a27dfdN602a0a22.png', + category: [{ + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服佛殿灰", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4384/79/686427577/12080/704f7986/58b7f7e8N61c4f884.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t331/362/1515835677/3566/461716a8/543c8a67Ne129f018.jpg" }, + { id: 4, name: "羽绒", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" } + ] + }, { + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4384/79/686427577/12080/704f7986/58b7f7e8N61c4f884.jpg" }, + { id: 3, name: "羽绒沙鸥枯帮历随大流", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4066/54/467847264/15196/5b8aa181/58b39019N8e1dbc75.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4066/54/467847264/15196/5b8aa181/58b39019N8e1dbc75.jpg" }, + { id: 4, name: "羽绒沙鸥枯帮历随大流枯燥士大夫士大夫尔耳", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" }, + { id: 4, name: "羽绒沙鸥枯帮历随大流", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" } + ] + }, { + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4384/79/686427577/12080/704f7986/58b7f7e8N61c4f884.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t331/362/1515835677/3566/461716a8/543c8a67Ne129f018.jpg" }, + { id: 4, name: "羽绒", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4066/54/467847264/15196/5b8aa181/58b39019N8e1dbc75.jpg" } + ] + }] + + }; + var obj2 = { + branch: 'https://m.360buyimg.com/mobilecms/s528x180_jfs/t4363/75/680194164/52298/54d0c634/58b7e3ebNe1f5f67b.jpg', + category: [{ + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服佛殿灰", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2647/276/633288982/11637/e9bb1b7a/571dc6a8Nbd641f1b.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t331/362/1515835677/3566/461716a8/543c8a67Ne129f018.jpg" }, + { id: 4, name: "羽绒", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" } + ] + }, { + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4384/79/686427577/12080/704f7986/58b7f7e8N61c4f884.jpg" }, + { id: 3, name: "羽绒沙鸥枯帮历随大流", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t913/290/173123020/11082/e3dd8c46/5507c2e4N78755364.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4066/54/467847264/15196/5b8aa181/58b39019N8e1dbc75.jpg" }, + { id: 4, name: "羽绒沙鸥枯帮历随大流枯燥士大夫士大夫尔耳", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" }, + { id: 4, name: "羽绒沙鸥枯帮历随大流", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t2893/176/1045856721/6331/21075b96/5732d235N90395e10.jpg" } + ] + }, { + catname: '裙装', + catshop: [{ id: 2, name: "羽绒棉服", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4384/79/686427577/12080/704f7986/58b7f7e8N61c4f884.jpg" }, + { id: 3, name: "棉服", thumb: "https://m.360buyimg.com/mobile/s100x100_jfs/t331/362/1515835677/3566/461716a8/543c8a67Ne129f018.jpg" }, + { id: 4, name: "羽绒", thumb: "https://m.360buyimg.com/mobile/s130x130_jfs/t4066/54/467847264/15196/5b8aa181/58b39019N8e1dbc75.jpg" } + ] + }] + + }; +module.exports = { + api: '/api/contentlist', + response: function (req, res) { + if(req.query.id==1){ res.send({"result": "1","msg": "成功","data":obj});} + if(req.query.id==2){ res.send({"result": "1","msg": "成功","data":obj2});} + } +}; diff --git a/yunshop-front-master/mock/goods.js b/yunshop-front-master/mock/goods.js new file mode 100644 index 0000000..a1f8c63 --- /dev/null +++ b/yunshop-front-master/mock/goods.js @@ -0,0 +1,72 @@ +/** + * Created by an.han on 16/10/15. + * 基于 express 的接口处理定义 + * See http://expressjs.com/zh-cn/4x/api.html + */ +var Mock = require('mockjs'); +var data = Mock.mock({ + // 属性 list 的值是一个数组,其中含有 1 到 10 个元素 + 'list|1-100': [{ + 'id|+5': 1 + }] +}); +var goods= { + bonusmoney: "43.97", + content: "

售后电话:18028696783

微信同步:18028696783


甘肃、西藏、内蒙古、港澳台,偏远地区不包邮

谢谢体谅


", + costprice: "75.00", + createtime: "1488006226", + credit: "879", + current: 1488850195, + deduct: "17.00", + deduct2: "0.00", + deductcommission: "0.00", + discounttype: "1", + discountway: "1", + dispatch: "0", + dispatchid: "9", + dispatchtype: "1", + displayorder: "39", + edmoney: "0.00", + ednum: "0", + goods_balance: "0.00", + goodssn: "765#", + groupbuy: "1", + id: "6394", + love_money: "1.92", + manydeduct: "0", + marketprice: "139.00", + maxbuy: "0", + maxprice: "139.00", + minprice: "139.00", + pcate: "8", + pcate1: "0", + pcates: "437", + productprice: "468.00", + returntype: "1", + tcate: "269", + tcate1: "0", + tcates: "679", + tcates2: "", + thumb: "http://www.heliaigou.com/attachment/images/0/2017/02/Rx97NC9q4DGg36Z9DgqCQQ4e676D2Q.jpg", + timeend: "1488005820", + timestart: "1488005820", + title: "2017春夏新款日系修身小脚牛仔九分裤765#", + total: "450", + type: "1", + uniacid: "4", + unit: "件", + userbuy: "1", + viewcount: "4" +}; +module.exports = { + api: '/api/goods', + response: function (req, res) { + res.send( + { + "result": "1", + "msg": "成功", + "data":goods + } + ); + } +}; diff --git a/yunshop-front-master/mock/http.js b/yunshop-front-master/mock/http.js new file mode 100644 index 0000000..aa90f0a --- /dev/null +++ b/yunshop-front-master/mock/http.js @@ -0,0 +1,101 @@ +// var http = require('http'); +// var fs = require('fs'); +// +// var server = http.createServer(function (req, res) { +// console.log('服务器接受:' + req.url); +// +// res.writeHead(200, {'Content-Type': 'text/plain;charset=UTF8'}); +// res.write("

我是标题

"); +// fs.readFile('./mock.js', function (err, data) { +// if (err) { +// console.log(err); +// return; +// } +// res.end(data); +// }); +// // res.end((1 + 2 + 3).toString()); +// }); +// +// server.listen(3000, "localhost"); +// console.log(__dirname); +// console.log(__filename); +// console.log(module.filename === __filename); +// console.log(process.cwd()); + +var express = require("express"); + +var app = express(); + +app.get("/",function(req,res){ + res.send("你好"); +}); + +app.get("/haha",function(req,res){ + res.send("这是haha页面,哈哈哈哈哈哈"); +}); + +app.get(/^\/student\/([\d]{10})$/,function(req,res){ + res.send("学生信息,学号" + req.params[0]); +}); + +app.get("/teacher/:gonghao",function(req,res){ + res.send("老师信息,工号" + req.params.gonghao); +}); + +app.listen(3000); + + +// var express = require('express'); +// var app = express(); +// +// //设置跨域访问 +// app.all('*', function (req, res, next) { +// res.header("Access-Control-Allow-Origin", "*"); +// res.header("Access-Control-Allow-Headers", "X-Requested-With"); +// res.header("Access-Control-Allow-Methods", "PUT,POST,GET,DELETE,OPTIONS"); +// res.header("X-Powered-By", ' 3.2.1'); +// res.header("Content-Type", "application/json;charset=utf-8"); +// next(); +// }); +// +// var questions = [ +// { +// data: 213, +// num: 444, +// age: 12 +// }, +// { +// data: 456, +// num: 678, +// age: 13 +// }]; +// +// //写个接口123 +// app.get('/123', function (req, res) { +// res.status(200), +// res.json(questions) +// }); +// +// //配置服务端口 +// +// var server = app.listen(3000, function () { +// +// var host = server.address().address; +// +// var port = server.address().port; +// +// console.log('Example app listening at http://%s:%s', 'localhost', 3000); +// }); + +// 请求的原生ajax +// test() { +// //步骤一:创建异步对象 +// var ajax = new XMLHttpRequest(); +// ajax.open('get', 'http://localhost:3000/123'); +// ajax.send(); +// ajax.onreadystatechange = function () { +// if (ajax.readyState == 4 && ajax.status == 200) { +// console.log(ajax.responseText);//输入相应的内容 +// } +// } +// } \ No newline at end of file diff --git a/yunshop-front-master/mock/index.js b/yunshop-front-master/mock/index.js new file mode 100644 index 0000000..7f09007 --- /dev/null +++ b/yunshop-front-master/mock/index.js @@ -0,0 +1,1307 @@ +/** + * Created by an.han on 16/10/15. + * 基于 express 的接口处理定义 + * See http://expressjs.com/zh-cn/4x/api.html + */ +var Mock = require('mockjs'); +var data = Mock.mock({ + // 属性 list 的值是一个数组,其中含有 1 到 10 个元素 + 'list|1-100': [{ + 'id|+5': 1 + }] +}); +module.exports = { + api: '/index/Index', + response: function (req, res) { + res.send( +{ + "result": "1", + "msg": "成功", + "data": { + "goods": [ + { + "id": "29", + "uniacid": "3", + "pcate": "135", + "ccate": "143", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Samsonite/新秀丽新款双肩包 简约时尚背包多功能防水商务电脑包", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/jf8AMvJRrGmrvmbHAGVffGhasFczAH.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "1880.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "113", + "totalcnf": "0", + "sales": "40", + "salesreal": "15", + "spec": "", + "createtime": "1484980640", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/r2Ize6EeIVAiEVcYZ4ua4SnnBFB3vB.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/SWrTTkVZpVR5QWVTCCrQDVwiNhMkpV.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/dDjm1p1BzdnZPW6NYQQz37yDNdDW46.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/OCUd5366MWq6fZxu6QCVe655MJhYDy.jpg\";}", + "isnew": "0", + "ishot": "1", + "isdiscount": "0", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1487138820", + "timeend": "1487138820", + "viewcount": "222", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "543590106394", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a220o.1000855.w5003-14942028552.1.6epotF&id=543590106394&scene=taobao_shop#", + "updatetime": "1484980640", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "1", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "21", + "uniacid": "3", + "pcate": "135", + "ccate": "137", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Semir小白鞋男 白色板鞋情侣鞋休闲运动鞋透气韩版潮流低帮男鞋子", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/wbboB8449YH83oo1f1b9S51fo8YFO1.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "199.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "3227", + "totalcnf": "0", + "sales": "4005", + "salesreal": "1", + "spec": "", + "createtime": "1484973031", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/c5M10r00mC0wC0tWz1EzwNhMnwtW6z.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/jEwz4y55Y9EDhYkZy7eU54e777y5Xr.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/UDtg1sZsDUs5KS7A1GDmX0mm8fXXaD.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/tzV35HS2Gbg25a03Hf885uUX83AGF8.jpg\";}", + "isnew": "1", + "ishot": "1", + "isdiscount": "1", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "125", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "531236111440", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.1-b-s.w11359925-15073436959.8.KZp7Sy&id=531236111440", + "updatetime": "1484973031", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "15", + "uniacid": "3", + "pcate": "121", + "ccate": "122", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "【angelababy】衣品天成毛呢外套秋冬学生中长款2016秋冬呢子大衣", + "thumb": "http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/vw4mbw58b5MSWwmW2Uj3zJAtW92aua.jpg", + "unit": "件", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "99999999.99", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "4956", + "totalcnf": "0", + "sales": "1243", + "salesreal": "2", + "spec": "", + "createtime": "1484039202", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/Yu4a3uhTpU3rUuUHCQCmJ9USUMFU4Y.jpg\";i:1;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/jU2ndbnPnUPrnZCbO1Ow3p00BcPUGo.jpg\";i:2;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/txb1E9ddNx3oMbzqEFNGVfUvEZFbDP.jpg\";i:3;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/h9aie9Aw56WpBZ7M5TPbPw0tPzqTqZ.jpg\";}", + "isnew": "1", + "ishot": "1", + "isdiscount": "1", + "isrecommand": "1", + "issendfree": "1", + "istime": "0", + "iscomment": "0", + "timestart": "1484289960", + "timeend": "1484289960", + "viewcount": "171", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "538795783617", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.4-b-s.w4004-15309747252.14.dgMGCY&abtest=_AB-LR130-PR130&pvid=dfa5170b-0ed2-4f9c-80c5-49fa10a86c06&pos=7&abbucket=_AB-M130_B9&acm=03131.1003.1.702582&id=538795783617&scm=1007.12940.28087.100200300000000", + "updatetime": "1484039202", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "125", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "1", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "296", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returns2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "7", + "uniacid": "3", + "pcate": "121", + "ccate": "123", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "美特斯邦威棉服男士2016冬装新款唱K夹棉外套231202专柜款", + "thumb": "http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/R9QYvq0ZQvk80oU9tTb9T48t5z9400.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "449.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "1111", + "totalcnf": "0", + "sales": "20", + "salesreal": "8", + "spec": "", + "createtime": "1484033590", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/js36HFf6LlZc6uUhHuQu3WwS1ughas.jpg\";i:1;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/fUWWKKtfyQGqQdkYuTGTCdj808Qd77.jpg\";i:2;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/Wgi11epJpGS0IPg5tPPP3vZzPi0j0j.jpg\";i:3;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/EWzMEmiedmC19bBH7Rhl77iHI9ceT9.jpg\";}", + "isnew": "0", + "ishot": "1", + "isdiscount": "0", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1487146920", + "timeend": "1487146920", + "viewcount": "124", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "541230305470", + "taotaoid": "", + "taobaourl": "https://item.taobao.com/item.htm?spm=a1z10.5-c-s.w4002-14845071775.96.I0F0MH&id=541230305470", + "updatetime": "1484033590", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "128", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + } + ], + "ads": [ + { + "id": "9", + "advname": "1212", + "link": "", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/Yrs6zNDrRSsDVZ6rPhknvvnbRnApwD.jpg", + "thumb_pc": "" + }, + { + "id": "11", + "advname": "3", + "link": "", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/hEqQ3E6w505s2S115Od1SLCQcl1RE2.jpg", + "thumb_pc": "" + } + ], + "category": [ + { + "id": "147", + "name": "童装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/nrvN0NBVoN1i5i5z1bVbvDovN51NzV.png", + "level": "2" + }, + { + "id": "143", + "name": "箱包", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/I5qQTNudQB3CbuLTqt3Lt646Nc63Fp.png", + "level": "2" + }, + { + "id": "146", + "name": "运动户外", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/KPFFTDrxpyrzZdrRTff3D4Dd4E93h1.png", + "level": "2" + }, + { + "id": "147", + "name": "童装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/nrvN0NBVoN1i5i5z1bVbvDovN51NzV.png", + "level": "2" + }, + { + "id": "147", + "name": "童装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/nrvN0NBVoN1i5i5z1bVbvDovN51NzV.png", + "level": "2" + }, + { + "id": "137", + "name": "男鞋", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/gOlR33YNb4rbOQ4O3VRone5eO2VlY2.png", + "level": "2" + }, + { + "id": "138", + "name": "女鞋", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/lfGoQMs6P46aiCCNO6lCB0oi4bbxMm.png", + "level": "2" + }, + { + "id": "123", + "name": "男装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/W7trBiTCZ7XSjSb7Rrks2K7fsr7277.png", + "level": "2" + }, + { + "id": "147", + "name": "童装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/nrvN0NBVoN1i5i5z1bVbvDovN51NzV.png", + "level": "2" + }, + { + "id": "122", + "name": "女装", + "thumb": "https://sp.tbw365.cn/attachment/images/3/2017/01/RTmjMfJzEEm9JF7G7z04mJpeoz7AgJ.png", + "level": "2" + } + ], + "recommand": [ + { + "id": "29", + "uniacid": "3", + "pcate": "135", + "ccate": "143", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Samsonite/新秀丽新款双肩包 简约时尚背包多功能防水商务电脑包", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/jf8AMvJRrGmrvmbHAGVffGhasFczAH.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "1880.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "113", + "totalcnf": "0", + "sales": "40", + "salesreal": "15", + "spec": "", + "createtime": "1484980640", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/r2Ize6EeIVAiEVcYZ4ua4SnnBFB3vB.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/SWrTTkVZpVR5QWVTCCrQDVwiNhMkpV.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/dDjm1p1BzdnZPW6NYQQz37yDNdDW46.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/OCUd5366MWq6fZxu6QCVe655MJhYDy.jpg\";}", + "isnew": "0", + "ishot": "1", + "isdiscount": "0", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1487138820", + "timeend": "1487138820", + "viewcount": "222", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "543590106394", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a220o.1000855.w5003-14942028552.1.6epotF&id=543590106394&scene=taobao_shop#", + "updatetime": "1484980640", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "1", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "21", + "uniacid": "3", + "pcate": "135", + "ccate": "137", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "Semir小白鞋男 白色板鞋情侣鞋休闲运动鞋透气韩版潮流低帮男鞋子", + "thumb": "https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/wbboB8449YH83oo1f1b9S51fo8YFO1.jpg", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "199.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "3227", + "totalcnf": "0", + "sales": "4005", + "salesreal": "1", + "spec": "", + "createtime": "1484973031", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/c5M10r00mC0wC0tWz1EzwNhMnwtW6z.jpg\";i:1;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/jEwz4y55Y9EDhYkZy7eU54e777y5Xr.jpg\";i:2;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/UDtg1sZsDUs5KS7A1GDmX0mm8fXXaD.jpg\";i:3;s:89:\"https://sp.tbw365.cn/attachment/images/sz_yi/3/2017/01/tzV35HS2Gbg25a03Hf885uUX83AGF8.jpg\";}", + "isnew": "1", + "ishot": "1", + "isdiscount": "1", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "0", + "timeend": "0", + "viewcount": "125", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "531236111440", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.1-b-s.w11359925-15073436959.8.KZp7Sy&id=531236111440", + "updatetime": "1484973031", + "share_title": "", + "share_icon": "", + "cash": "0", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "0", + "storeids": "", + "noticeopenid": "", + "tcate": "0", + "noticetype": "", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "15", + "uniacid": "3", + "pcate": "121", + "ccate": "122", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "【angelababy】衣品天成毛呢外套秋冬学生中长款2016秋冬呢子大衣", + "thumb": "http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/vw4mbw58b5MSWwmW2Uj3zJAtW92aua.jpg", + "unit": "件", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "99999999.99", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "4956", + "totalcnf": "0", + "sales": "1243", + "salesreal": "2", + "spec": "", + "createtime": "1484039202", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/Yu4a3uhTpU3rUuUHCQCmJ9USUMFU4Y.jpg\";i:1;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/jU2ndbnPnUPrnZCbO1Ow3p00BcPUGo.jpg\";i:2;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/txb1E9ddNx3oMbzqEFNGVfUvEZFbDP.jpg\";i:3;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/h9aie9Aw56WpBZ7M5TPbPw0tPzqTqZ.jpg\";}", + "isnew": "1", + "ishot": "1", + "isdiscount": "1", + "isrecommand": "1", + "issendfree": "1", + "istime": "0", + "iscomment": "0", + "timestart": "1484289960", + "timeend": "1484289960", + "viewcount": "171", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "538795783617", + "taotaoid": "", + "taobaourl": "https://detail.tmall.com/item.htm?spm=a1z10.4-b-s.w4004-15309747252.14.dgMGCY&abtest=_AB-LR130-PR130&pvid=dfa5170b-0ed2-4f9c-80c5-49fa10a86c06&pos=7&abbucket=_AB-M130_B9&acm=03131.1003.1.702582&id=538795783617&scm=1007.12940.28087.100200300000000", + "updatetime": "1484039202", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "125", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "1", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "296", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returns2": "{\"default\":\"\",\"level17\":\"\",\"level18\":\"\",\"level29\":\"\"}", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + }, + { + "id": "7", + "uniacid": "3", + "pcate": "121", + "ccate": "123", + "type": "1", + "status": "1", + "displayorder": "0", + "title": "美特斯邦威棉服男士2016冬装新款唱K夹棉外套231202专柜款", + "thumb": "", + "unit": "", + "description": "", + "goodssn": "", + "productsn": "", + "productprice": "0.00", + "marketprice": "449.00", + "costprice": "0.00", + "bonusmoney": "0.00", + "originalprice": "0.00", + "total": "1111", + "totalcnf": "0", + "sales": "20", + "salesreal": "8", + "spec": "", + "createtime": "1484033590", + "weight": "0.00", + "credit": "", + "maxbuy": "0", + "usermaxbuy": "0", + "hasoption": "1", + "dispatch": "0", + "thumb_url": "a:4:{i:0;s:93:\"\";i:1;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/fUWWKKtfyQGqQdkYuTGTCdj808Qd77.jpg\";i:2;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/Wgi11epJpGS0IPg5tPPP3vZzPi0j0j.jpg\";i:3;s:93:\"http://bztang.cdlfjy.com/attachment/images/sz_yi/3/2017/01/EWzMEmiedmC19bBH7Rhl77iHI9ceT9.jpg\";}", + "isnew": "0", + "ishot": "1", + "isdiscount": "0", + "isrecommand": "1", + "issendfree": "0", + "istime": "0", + "iscomment": "0", + "timestart": "1487146920", + "timeend": "1487146920", + "viewcount": "124", + "deleted": "0", + "hascommission": "0", + "commission1_rate": "0.00", + "commission1_pay": "0.00", + "commission2_rate": "0.00", + "commission2_pay": "0.00", + "commission3_rate": "0.00", + "commission3_pay": "0.00", + "score": "0.00", + "taobaoid": "541230305470", + "taotaoid": "", + "taobaourl": "https://item.taobao.com/item.htm?spm=a1z10.5-c-s.w4002-14845071775.96.I0F0MH&id=541230305470", + "updatetime": "1484033590", + "share_title": "", + "share_icon": "", + "cash": "1", + "commission_thumb": "", + "isnodiscount": "0", + "showlevels": "", + "buylevels": "", + "showgroups": "", + "buygroups": "", + "isverify": "1", + "storeids": "", + "noticeopenid": "", + "tcate": "128", + "noticetype": "0", + "needfollow": "0", + "followtip": "", + "followurl": "", + "deduct": "0.00", + "virtual": "0", + "ccates": "", + "discounts": "{\"default\":\"\",\"level1\":\"\",\"level16\":\"\"}", + "returns": "", + "nocommission": "0", + "hidecommission": "0", + "pcates": "", + "tcates": "", + "artid": "0", + "detail_logo": "", + "detail_shopname": "", + "detail_btntext1": "", + "detail_btnurl1": "", + "detail_btntext2": "", + "detail_btnurl2": "", + "detail_totaltitle": "", + "deduct2": "0.00", + "ednum": "0", + "edmoney": "0.00", + "edareas": "", + "cates": "", + "diyformtype": "0", + "manydeduct": "0", + "dispatchtype": "0", + "dispatchid": "0", + "dispatchprice": "0.00", + "diyformid": "0", + "diymode": "0", + "shorttitle": "", + "commission_level_id": "0", + "supplier_uid": "0", + "isreturn": "0", + "isreturnqueue": "0", + "deposit": "10", + "print_id": "0", + "redprice": "", + "pcate1": "0", + "ccate1": "0", + "tcate1": "0", + "nobonus": "0", + "isverifysend": "0", + "discounttype": "0", + "discounts2": "{\"default\":\"\",\"level18\":\"\",\"level29\":\"\",\"level17\":\"\"}", + "returns2": "", + "returntype": "0", + "discountway": "0", + "isopenchannel": "0", + "pcates2": "", + "ccates2": "", + "tcates2": "", + "love_money": "0.00", + "yunbi_consumption": "0.000", + "yunbi_commission": "0.000", + "isyunbi": "0", + "yunbi_deduct": "0.00", + "isforceyunbi": "0", + "catch_id": "0", + "catch_source": "0", + "catch_url": "0", + "minprice": "0.00", + "maxprice": "0.00", + "isdeclaration": "0", + "virtual_declaration": "0.00", + "goods_balance": "0.00", + "balance_with_store": "1", + "dispatchsend": "0", + "pcate_area": "0", + "ccate_area": "0", + "tcate_area": "0", + "plugin": "", + "return_appoint_amount": "0.00", + "opt_switch": "0", + "province": "", + "operator": "0", + "isrecharge": "0", + "deductcommission": "0.00" + } + ] + } +} + ); + } +}; diff --git a/yunshop-front-master/mock/mock.js b/yunshop-front-master/mock/mock.js new file mode 100644 index 0000000..db2739d --- /dev/null +++ b/yunshop-front-master/mock/mock.js @@ -0,0 +1,618 @@ +// 引入mockjs +const Mock = require('mockjs'); +// 获取 mock.Random 对象 +const Random = Mock.Random; + +let banner_img = []; +for (let i = 0; i < 5; i++) { + let list = { + name: Random.cname(), + id: Random.integer(1, 20), + imgurl: Random.dataImage('338x140'), + }; + banner_img.push(list); +} +let data1 = { + banner_img: banner_img, + notice: Random.csentence(5, 30), + property_total: Random.float(2, 100, 0, 2), + profit_total: Random.float(2, 100, 0, 2), + deal_quantity: Random.integer(1, 20), + sell_quantity: Random.integer(1, 20), + 'isClassify|1': ["0", "1"], +}; + +Mock.mock('asset-details-home-page', 'post', { + result: 1, + msg: "成功", + data: data1, +}); + +let classify_img = []; +for (let i = 0; i < 10; i++) { + let list = { + title: Random.cname(), + id: Random.integer(1, 20), + img: Random.dataImage('40x40'), + }; + classify_img.push(list); +} + +Mock.mock('classify-home', 'post', { + result: 1, + msg: "成功", + data: classify_img, +}); + +let list = []; +for (let i = 0; i < 10; i++) { + let item = { + id: Random.integer(1, 10), + property_name: Random.cname(), + imgUrl: Random.dataImage('96x96'), + "issue": Random.float(2, 100, 0, 2), + "total": Random.float(2, 100, 0, 2), + 'feature': ['核心商圈位置', '高大上'], + }; + list.push(item); +} +let data2 = { + last_page: Random.integer(1, 5), + data: list +}; + +Mock.mock('asset-details-home-list', 'post', { + result: 1, + msg: "成功", + data: data2, +}); + + +let list1 = []; +for (let i = 0; i < 15; i++) { + let item = { + id: Random.integer(1, 20), + "property_name": Random.cname(), + "quantity": Random.float(2, 100, 0, 2), + "price": Random.float(2, 100, 0, 2), + }; + list1.push(item); +} +let data3 = { + last_page: Random.integer(1, 5), + data: list1 +}; + +Mock.mock('asset-list', 'post', { + result: 1, + msg: "成功", + data: data3, +}); + +let list2 = []; +for (let i = 0; i < 15; i++) { + let item = { + id: Random.integer(1, 20), + "author": Random.cname(), + "notice_title": Random.csentence(5, 30), + "date": Random.date('yyyyMMdd'), + }; + list2.push(item); +} +let data4 = { + last_page: Random.integer(1, 5), + "notice": list2 +}; + +Mock.mock('notices-list', 'post', { + result: 1, + msg: "成功", + data: data4, +}); + +// +let item = { + company: { + "product": Random.ctitle(2, 4), + "company_name": Random.cname(), + "company_address": Random.city() + }, + basic_info: { + "category": Random.ctitle(2, 4), + "label": Random.ctitle(2, 4), + "company_name": Random.cname(), + "company_address": Random.city(), + "create_time": Random.date('yyyy-MM-dd'), + "company_type": Random.ctitle(2, 4), + "capital": Random.natural(1, 100), + "representative": Random.cname(), + "deadline": Random.date('yyyy-MM-dd'), + "business_scope": Random.csentence(5, 10) + }, + asset_attributes: { + "building_type": Random.cname(), + "periodic": Random.natural(1, 100), + "decoration_standard": Random.cname(), + }, + "asset_details": Random.cparagraph(20, 30) +} +Mock.mock('introduce-list', 'post', { + result: 1, + msg: "成功", + data: item, +}); +let arr1 = []; +for (let i = 0; i < 20; i++) { + let item = { + id: Random.integer(1, 20), + "report_name": Random.ctitle(2, 4), + "report_time": Random.date('yyyy-MM-dd'), + "organization": Random.ctitle(2, 4), + "market_value": Random.float(2, 1000, 0, 3) + } + arr1.push(item) +} +let details = { + "desc": Random.csentence(10, 20), + "price": Random.float(2, 1000, 0, 3), + last_page: Random.integer(1, 5), + "subcompany": arr1 +}; +Mock.mock('assess-list', 'post', { + result: 1, + msg: "成功", + data: details, +}); +let arr2 = []; +for (let i = 0; i < 20; i++) { + let item = { + id: Random.integer(1, 20), + "total_momery": Random.float(900, 1000, 0, 7), + "single_property": Random.float(800, 1000, 0, 7), + "usable_total": Random.float(2, 1000, 0, 3), + "profit_time": Random.datetime("yyyy-MM-dd A HH:mm:ss") + } + arr2.push(item) +} +let profit = { + "profits": { + "property_total": Random.float(2, 1000, 0, 3), + "accumulative_time": Random.integer(50, 100), + "accumulative_people": Random.integer(50, 100), + "accumulative_top_momery": Random.float(2, 1000, 0, 3), + "init_accumlative_momery": Random.float(2, 1000, 0, 3) + }, + "last_page": Random.integer(1, 5), + "profit_record": arr2 +} +Mock.mock('profit-list', 'post', { + result: 1, + msg: "成功", + data: profit, +}); +// mock一组数据 +// let lists = []; +// for (let i = 0; i < 3; i++) { +let has_many_sell = []; +// for (let i = 0; i < 2; i++) { +let newList = { + amount: Random.integer(1, 20), + // order_sn: Random.word() + Random.integer(60, 100), + coin: Random.float(2, 50, 0, 2), + checked: false, + code: "love", + 'name': "爱心值", +}; +let newList1 = { + amount: Random.integer(1, 20), + // order_sn: Random.word() + Random.integer(60, 100), + coin: Random.float(2, 50, 0, 2), + checked: true, + code: "point", + 'name': "积分", +}; +has_many_sell.push(newList); +has_many_sell.push(newList1); +// } +let newListObject = { + // create_month: Random.date('yyyy-MM'), + subscribe_name: '商城', + "subscribe_quantity": Random.float(2, 50, 0, 2), + "subscribe_money": Random.float(2, 50, 0, 2), + "available": Random.float(2, 5000, 0, 2), + "freezeing": Random.float(2, 5000, 0, 2), + "service_charge": Random.float(2, 50, 0, 2), + order_deductions: has_many_sell, + // Random.csentence( min, max ) 中文5-30个字 + // Random.dataImage( size, text ) 生成一段随机的 Base64 图片编码 + // Random.cname() 随机生成一个常见的中文姓名 + // date: Random.date() + ' ' + Random.time() // Random.date()指示生成的日期字符串的格式,默认为yyyy-MM-dd;Random.time() 返回一个随机的时间字符串 +}; +// lists.push(newListObject) +// } + +// Mock.mock( url, post/get , 返回的数据); +Mock.mock('buying', 'post', { + result: 1, + msg: "成功", + data: newListObject, +}); + +let data0 = { + "blockchain_address": '0xd73d7c35a504c34b80696cd6e3671cfff860d8ee', + transfer_num: Random.float(2, 5000, 0, 2), + "isPassword|1": [true, false], +}; + +Mock.mock('sure-buying', 'post', { + result: 1, + msg: "成功", + data: data0, +}); + + +let asset1 = { + property_name: Random.cname(), + use: Random.float(2, 500, 0, 2), + property: Random.float(2, 500, 0, 2), + profit_total_price: Random.float(2, 500, 0, 2), + unused_profit: Random.float(2, 500, 0, 2), + // 'status_name|1': ["已发放", "未发放"], + // created_at: Random.date() + ' ' + Random.time(), +}; + +Mock.mock('asset1', 'post', { + result: 1, + msg: "成功", + data: asset1, +}); + +let asset2 = { + acquire_use_total: Random.float(2, 500, 0, 2), + acquire_disabled_total: Random.float(2, 500, 0, 2), + distribution_price: Random.float(2, 500, 0, 2), + disabled_active: Random.float(2, 500, 0, 2), + subscribe_price: Random.float(2, 500, 0, 2), + buy_price: Random.float(2, 500, 0, 2), + consumer_incentives: Random.float(2, 500, 0, 2), + performance_rewards: Random.float(2, 500, 0, 2), + move_in_price: Random.float(2, 500, 0, 2), + shark_link: Random.float(2, 500, 0, 2), +}; + +Mock.mock('asset2', 'post', { + result: 1, + msg: "成功", + data: asset2, +}); + +let asset3 = { + deduct_price: Random.float(2, 500, 0, 2), + sell_price: Random.float(2, 500, 0, 2), + move_sell_price: Random.float(2, 500, 0, 2), +}; + +Mock.mock('asset3', 'post', { + result: 1, + msg: "成功", + data: asset3, +}); + +let list3 = []; +for (let i = 0; i < 10; i++) { + let item = { + id: Random.integer(1, 10), + property_name: Random.cname(), + total: Random.float(2, 10000, 0, 2), + gross: Random.float(2, 10000, 0, 2), + usable: Random.float(2, 10000, 0, 2), + property_price: Random.float(2, 10000, 0, 2), + profit_date: Random.date() + ' ' + Random.time(), + }; + list3.push(item); +} +let data6 = { + "property_profit_total": Random.float(2, 10000, 0, 2), + "own_profit_total": Random.float(2, 10000, 0, 2), + last_page: Random.integer(1, 5), + data: list3 +}; + +Mock.mock('record-profit', 'post', { + result: 1, + msg: "成功", + data: data6, +}); + +let list4 = []; +for (let i = 0; i < 10; i++) { + let item = { + id: Random.integer(1, 5000), + property_name: Random.cname(), + subscribe_order_munber: '3671cfff86', + subscribe_monery: Random.float(2, 10000, 0, 2), + subscribe_price: Random.float(2, 10000, 0, 2), + sell_monery: Random.float(2, 10000, 0, 2), + sell_price: Random.float(2, 10000, 0, 2), + 'sell_status|1': ['出售中', '已出售', '已撤回'], + 'trans_status|1': ['转入', '转出'], + 'status|1': ['买入', '售出'], + 'cost_status|1': ['可用', '冻结'], + 'cost_name|1': ['全部', '后台配发', '认购', '转让-转出', '转让-转入', '冻结激活', '出售', '奖励', '购买'], + subscribe_date: Random.date() + ' ' + Random.time(), + }; + list4.push(item); +} +let data7 = { + last_page: Random.integer(1, 5), + data: list4 +}; + +Mock.mock('record-buying', 'post', { + result: 1, + msg: "成功", + data: data7, +}); + +let data = { + asset_name: Random.cname(), + "subscribe_total": Random.float(2, 10000, 0, 2), + "sell_total": Random.float(2, 10000, 0, 2), +}; + +Mock.mock('classify-profit', 'post', { + result: 1, + msg: "成功", + data: data, +}); + +let detail = { + subscribe_name: Random.cname(), + subscribe_munber: Random.float(2, 10000, 0, 2), + subscribe_price: Random.float(2, 10000, 0, 2), + subscribe_total_monery: Random.float(2, 10000, 0, 2), + love_pledge: Random.float(2, 10000, 0, 2), + integral_pledge: Random.float(2, 10000, 0, 2), + payment_monery: Random.float(2, 10000, 0, 2), + subscribe_order_munber: 'SK20181122NK', + 'sell_status|1': ['出售中'], + // 'sell_status|1': ['出售中', '已出售', '已撤回'], +}; + +Mock.mock('detail', 'post', { + result: 1, + msg: "成功", + data: detail, +}); + +let worker_orderlist_datalist = []; +for (let i = 0; i < 20; i++) { + let item = { + id: i + 1, + order_sn: `sn37994595843_${i}`, + status: 1, + reserve_time: '2020-08-14', + person: '吃烧烤', + phone: '15603091690', + adress: '广东省顺德xxxxxx', + total: '3', + money: '20.00', + button_models: [ + { + api: "xxx.xxxxxxx", + name: "完成", + value: 1 + } + ] + }; + worker_orderlist_datalist.push(item); +} +let worker_orderlist = { + total: 0, + per_page: 20, + current_page: 1, + last_page: 2, + data: worker_orderlist_datalist +} +Mock.mock('install_service/worker_orderlist', 'get', { + result: 1, + msg: "成功", + data: worker_orderlist, +}); + +let worker_orderDetail = { + id: 1, + order_sn: 'sn37994595843', + status: 1, + total: '3', + person: '吃烧烤', + phone: '131323232', + reserve_time: '2020-08-14', + adress: '广东省顺德xxxxxx', + money: '20.00', + remark: '这是备注信息。。。。', + sendOrder_time: '2020-05-01 14:45:44', + install_time: null, + finish_time: null, + has_many_order_goods: [ + { + goods_id: 454, + title: '标题', + image: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + total: 2, + } + ], + button_models: [ + { + api: "xxx.xxxxxxx", + name: "完成", + value: 1 + } + ] +} +Mock.mock('install_service/worker_orderDetail', 'get', { + result: 1, + msg: "成功", + data: worker_orderDetail, +}); + +let user_orderlist = { + total: 20, + per_page: 20, + current_page: 1, + last_page: 2, + data: [ + { + id: 1, + order_sn: 'sn37994595843', + status: 1, + reserve_time: '2020-08-14', + has_many_order_goods: [{ + goods_id: 454, + title: '标题', + image: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + total: 2, + }], + button_models: [ + { + api: "xxx.xxxxxxx", + name: "完成", + value: 1 + } + ] + }, + { + id: 1, + order_sn: 'sn3799459584sass', + status: 0, + reserve_time: '', + has_many_order_goods: [{ + goods_id: 454, + title: '标题', + image: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + total: 2, + }], + button_models: [ + { + api: "xxx.xxxxxxx", + name: "预约安装", + value: 0 + } + ] + } + ] +} +Mock.mock('install_service/user_orderlist', 'get', { + result: 1, + msg: "成功", + data: user_orderlist, +}); + +let user_orderDetail_1 = { + order_sn: 'sn37994595843', + status: 1, + schedule_status: 1, + time: '2020-10-25 10:55:44', + remark: '上门安装前请联系以便确认是否在家 麻烦进门的时候脚步放轻', + has_many_order_goods: [ + { + goods_id: 454, + title: '标题', + image: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + total: 2 + } + ], + button_models: [ + { + api: "xxx.xxxxxxx", + name: "完成", + value: 1 + } + ], + schedule: { + appointment_time: '2020-50-50 41:44:44', + sendOrder_time: '2020-05-01 14:45:44', + install_time: '2020-05-01 14:45:44', + finish_time: '2020-05-01 14:45:44', + worker_info: { + name: '成师傅', + phone: '1234456666' + } + } +} + +let user_orderDetail_2 = { + order_sn: 'sn37994595843', + status: 0, + schedule_status: 0, + time: null, + remark: null, + has_many_order_goods: [ + { + goods_id: 454, + title: '标题', + image: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + total: 2 + } + ], + button_models: [ + { + api: "xxx.xxxxxxx", + name: "完成", + value: 1 + } + ], + schedule: {} +} + +Mock.mock('install_service/user_orderDetail', 'get', { + result: 1, + msg: "成功", + data: user_orderDetail_2, +}); + + +let install_income = { + nickname: '沙发垫', + avatar: 'https://bztang.cdlfjy.com/addons/yun_shop/plugins/designer/assets/images/init-data/init-icon.png', + grand_total: '150.00', + unsettlement_total: '3.55', + settlement_total: '50.00', + Identity: 1 +} + +Mock.mock('install_service/install_income', 'get', { + result: 1, + msg: "成功", + data: install_income, +}); + +let install_income_list_1 = []; +for (let i = 0; i < 20; i++) { + let item = { + id: 1, + order_sn: 'sn37994595843', + total: '250.00', + time: '2020-08-14 14:54:44', + status: 1 + }; + install_income_list_1.push(item); +} +let install_income_list = { + total: 20, + per_page: 20, + current_page: 1, + last_page: 2, + data: install_income_list_1 +} + +Mock.mock('install_service/install_income_list', 'get', { + result: 1, + msg: "成功", + data: install_income_list, +}); + + +Mock.setup({ + timeout: '200-600' +}) diff --git a/yunshop-front-master/package.json b/yunshop-front-master/package.json new file mode 100644 index 0000000..9553405 --- /dev/null +++ b/yunshop-front-master/package.json @@ -0,0 +1,69 @@ +{ + "version": "2.2.713", + "description": "商城", + "author": "shop", + "private": true, + "scripts": { + "dev": "vue-cli-service serve", + "build": "vue-cli-service build", + "devtest": "vue-cli-service build --mode devtest", + "stage": "vue-cli-service build --mode staging", + "lint": "eslint --ext .js --ext .jsx --ext .vue src", + "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src", + "lint:style": "stylelint src/**/*.{html,vue,sass,scss}", + "lint-fix:style": "npm run lint:style -- --fix" + }, + "dependencies": { + "@vant/touch-emulator": "^1.2.0", + "benz-amr-recorder": "^1.1.3", + "better-scroll": "^1.13.2", + "c-swipe": "^2.1.5", + "core-js": "^3.20.3", + "echarts": "^4.2.0-rc.2", + "element-ui": "^2.15.6", + "html2canvas": "1.0.0-rc.4", + "lodash": "^4.17.15", + "qrcode": "^1.5.0", + "ramda": "^0.23.0", + "regenerator-runtime": "^0.13.5", + "tim-js-sdk": "^2.6.4", + "v-viewer": "^1.4.0", + "vant": "^2.12.22", + "vconsole": "^3.11.1", + "vue": "~2.6.14", + "vue-clipboard2": "^0.2.1", + "vue-count-to": "^1.0.13", + "vue-esign": "^1.0.5", + "vue-i18n": "^8.15.0", + "vue-router": "^3.1.5", + "vue-seamless-scroll": "^1.1.23", + "vue-template-compiler": "~2.6.14", + "vue-ydui": "^1.2.6", + "vue2-hammer": "^2.1.2", + "whatwg-fetch": "^1.0.0", + "ydui-district": "^1.1.0", + "@micro-zoe/micro-app": "1.0.0-beta.4" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "~4.3.0", + "@vue/cli-plugin-router": "~4.3.0", + "@vue/cli-plugin-vuex": "~4.3.0", + "@vue/cli-service": "~4.3.0", + "babel-plugin-component": "^1.1.1", + "babel-plugin-import": "^1.13.0", + "babel-plugin-transform-remove-console": "^6.9.4", + "babel-polyfill": "^6.26.0", + "es6-promise": "^4.2.8", + "eslint": "^7.20.0", + "eslint-plugin-vue": "^7.6.0", + "prettier": "^1.19.1", + "quagga": "^0.12.1", + "sass": "^1.54.4", + "sass-loader": "^8.0.2", + "script-ext-html-webpack-plugin": "^2.1.4", + "stylelint": "^13.11.0", + "stylelint-config-standard": "^20.0.0", + "vue-template-compiler": "^2.6.11", + "webpack-bundle-analyzer": "^4.5.0" + } +} diff --git a/yunshop-front-master/public/index.html b/yunshop-front-master/public/index.html new file mode 100644 index 0000000..854b432 --- /dev/null +++ b/yunshop-front-master/public/index.html @@ -0,0 +1,292 @@ + + + + + + + + + + + <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.css) { %> + + + <% } %> + + + + + + + + + + + + + + <% for (var i in htmlWebpackPlugin.options.cdn&&htmlWebpackPlugin.options.cdn.js) { %> + + <% } %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/yunshop-front-master/public/static/app/TcPlayer-2.3.2.js b/yunshop-front-master/public/static/app/TcPlayer-2.3.2.js new file mode 100644 index 0000000..c40741f --- /dev/null +++ b/yunshop-front-master/public/static/app/TcPlayer-2.3.2.js @@ -0,0 +1,4 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="//imgcache.qq.com/open/qcloud/video/vcplayer/",t(0)}([function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(d.IS_MOBILE?(e.flash=!1,d.IS_X5TBS&&e.x5_player?b.mobile=["flv","m3u8","mp4"]:d.IS_ENABLED_MSE&&e.h5_flv&&(b.mobile=["flv","m3u8","mp4"])):(e.flash=!!t.isFormat("rtmp")||e.flash,t.isFormat("flv")&&void 0==e.flash&&(e.flash=!0),e.flash?d.IS_ENABLED_FLASH||(e.flash=!1,d.IS_ENABLED_MSE?e.h5_flv&&(d.IS_SAFARI&&A.compareVersion(d.SAFARI_VERSION,"10.1")>-1||!d.IS_SAFARI)?b.pc=["flv","m3u8","mp4"]:b.pc=["m3u8","mp4"]:b.pc=["mp4"]):d.IS_ENABLED_MSE?e.h5_flv&&(d.IS_SAFARI&&A.compareVersion(d.SAFARI_VERSION,"10.1")>-1||!d.IS_SAFARI)?b.pc=["flv","m3u8","mp4"]:b.pc=["m3u8","mp4"]:d.IS_ENABLED_FLASH?e.flash=!0:b.pc=["mp4"]),e.clarity){var i=M.indexOf(e.clarity);M.splice(i,1),M.unshift(e.clarity)}}function l(e){var t={urls:{m3u8:{od:e.m3u8||"",hd:e.m3u8_hd||"",sd:e.m3u8_sd||""},flv:{od:e.flv||"",hd:e.flv_hd||"",sd:e.flv_sd||""},mp4:{od:e.mp4||"",hd:e.mp4_hd||"",sd:e.mp4_sd||""},rtmp:{od:e.rtmp||"",hd:e.rtmp_hd||"",sd:e.rtmp_sd||""}},isClarity:function(e){var i=t.urls;return!!(i.m3u8[e]||i.flv[e]||i.mp4[e]||i.rtmp[e])},isFormat:function(e){var i=t.urls;return!!i[e].od||!!i[e].hd||!!i[e].sd},hasUrl:function(){return this.isFormat("rtmp")||this.isFormat("flv")||this.isFormat("m3u8")||this.isFormat("mp4")}};t.definitions=[];for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:b,n="",r=void 0;i=i||(d.IS_MOBILE?o.mobile:o.pc);for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:M,o="",n=0;n1&&void 0!==arguments[1]?arguments[1]:b,i=void 0,o="",n=e.urls,r=d.IS_MOBILE?t.mobile:t.pc,s=0;s0&&!this.options.live&&this.currentTime(t),n&&this.play(!0),m.unsub(w.MetaLoaded,"*",r,this)});m.sub(w.MetaLoaded,"*",r,this)},t.prototype.switchClarity=function(e){this.claritySwitcher?this.claritySwitcher.setClarity(e):this._switchClarity(e)},t.prototype.handleMsg=function(t){e.prototype.handleMsg.call(this,t)},t}(g.Player)},function(e,t){"use strict";t.__esModule=!0;var i=window.navigator.userAgent,o=/AppleWebKit\/([\d.]+)/i.exec(i),n=o?parseFloat(o.pop()):null,r=t.IS_IPAD=/iPad/i.test(i),s=t.IS_IPHONE=/iPhone/i.test(i)&&!r,a=t.IS_IPOD=/iPod/i.test(i),l=t.IS_IOS=s||r||a,c=(t.IOS_VERSION=function(){var e=i.match(/OS (\d+)_/i);if(e&&e[1])return e[1]}(),t.IS_MAC=/Mac/i.test(i),t.IS_ANDROID=/Android/i.test(i)),u=t.ANDROID_VERSION=function(){var e,t,o=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return o?(e=o[1]&&parseFloat(o[1]),t=o[2]&&parseFloat(o[2]),e&&t?parseFloat(o[1]+"."+o[2]):e?e:null):null}(),p=(t.IS_OLD_ANDROID=c&&/webkit/i.test(i)&&u<2.3,t.IS_NATIVE_ANDROID=c&&u<5&&n<537,t.IS_FIREFOX=/Firefox/i.test(i),t.IS_EDGE=/Edge/i.test(i)),h=t.IS_CHROME=!p&&/Chrome/i.test(i),d=t.IS_SAFARI=!p&&!h&&/Safari/i.test(i),f=(t.SAFARI_VERSION=function(){if(!d)return null;var e=/version\/([\d.]+)/i,t=i.match(e);return t?t[1]:void 0}(),t.IS_IE8=/MSIE\s8\.0/.test(i),t.IS_IE9=/MSIE\s9\.0/.test(i),t.IS_IE=/(msie\s|trident.*rv:)([\w.]+)/i.test(i)),y=(t.IE_VERSION=function(){var e=/(msie\s|trident.*rv:)([\w.]+)/i,t=i.match(e);return t?t[2]:null}(),t.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),t.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in document.createElement("video").style,t.HASVIDEO=!!document.createElement("video").canPlayType,t.IS_X5TBS=/TBS\/\d+/i.test(i)),A=(t.TBS_VERSION=function(){var e=i.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),t.IS_MQQB=!y&&/MQQBrowser\/\d+/i.test(i),t.IS_QQB=!y&&/ QQBrowser\/\d+/i.test(i),t.IS_WECHAT=/(micromessenger|webbrowser)/i.test(i),t.IS_MQQ=/ QQ\/\d+/i.test(i),t.IS_MOBILE=c||l,t.IS_FILE_PROTOCOL=/file:/.test(location.protocol),t.FLASH_VERSION=null);t.IS_ENABLED_FLASH=function(){var e;if(document.all||f)try{if(e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return t.FLASH_VERSION=A=e.GetVariable("$version").split(" ")[1].replace(/,/g,"."),window.console&&console.log("FLASH_VERSION",A),!0}catch(i){return!1}else try{if(navigator.plugins&&navigator.plugins.length>0&&(e=navigator.plugins["Shockwave Flash"])){for(var o=e.description.split(" "),n=0;n-1?"Edge":i.indexOf(".NET")>-1?"IE":i.indexOf("QQBrowser")>-1?"QQBrowser":i.indexOf("Mac OS")>-1?"safari":i.indexOf("Chrome")>-1?"chrome":"other"}()},function(e,t){"use strict";function i(e,t,i){return e?(e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i),i):console.warn("element not exists")}function o(e,t,i){return e?void(e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent&&e.detachEvent("on"+t,i)):console.warn("element not exists")}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];null===r?o.removeAttribute(r):o.setAttribute(n,r)}for(var s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);return o}function r(e){return document.getElementById(e)}function s(e,t){e.classList?e.classList.add(t):c(e,t)||(e.className=e.className+" "+t)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(u(t)," ")}function l(e,t,i){i?s(e,t):a(e,t)}function c(e,t){return e.classList?e.classList.contains(t):u(t).test(e.className)}function u(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function p(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=document.documentElement,o=document.body,n=i.clientLeft||o.clientLeft||0,r=window.pageXOffset||o.scrollLeft,s=t.left+r-n,a=i.clientTop||o.clientTop||0,l=window.pageYOffset||o.scrollTop,c=t.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function h(e,t,i){var o={},n=i||p(e),r=e.offsetWidth,s=e.offsetHeight,a=n.top,l=n.left,c=t.pageY||t.clientY,u=t.pageX||t.clientX;return t.changedTouches&&(u=t.changedTouches[0].pageX,c=t.changedTouches[0].pageY),o.y=Math.max(0,Math.min(1,(a-c+s)/s)),o.x=Math.max(0,Math.min(1,(u-l)/r)),o}function d(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=document.createElement("script");if(n.onload=n.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof t&&t(),n.onload=n.onreadystatechange=null,n.parentNode&&!o&&n.parentNode.removeChild(n))},i)for(var r in i)if(i.hasOwnProperty(r)){var s=i[r];null===s?n.removeAttribute(s):n.setAttribute(r,s)}n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}function f(){var e=document,t=e.documentElement,i=e.body;return{width:t&&t.clientWidth||i&&i.offsetWidth||window.innerWidth||0,height:t&&t.clientHeight||i&&i.offsetHeight||window.innerHeight||0}}t.__esModule=!0,t.on=i,t.off=o,t.createEl=n,t.get=r,t.addClass=s,t.removeClass=a,t.toggleClass=l,t.hasClass=c,t.findElPosition=p,t.getPointerPosition=h,t.loadScript=d,t.getViewportSize=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(){return I++}function r(e,t,i){t.guid||(t.guid=n());var o=function(){t.apply(e,arguments)};return o.guid=i?i+"_"+t.guid:t.guid,o}function s(e){if(e instanceof Array)return 0===e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){e=0|e;var t=3600,i=60,o=e/t|0,n=(e-o*t)/i|0,r=e-o*t-n*i;return o=o>0?o+":":"",n=n>0?n+":":"00:",r=r>0?r+"":o.length>0||n.length>0?"00":"00:00",o=2==o.length?"0"+o:o,n=2==n.length?"0"+n:n,r=1==r.length?"0"+r:r,o+n+r}function l(e){p.__isFullscreen=!!document[S.fullscreenElement],p.__isFullscreen||g.off(document,S.fullscreenchange,l),b.pub({type:w.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:p.__isFullscreen}},p.player)}function c(e,t){g.off(t.video.el,"webkitbeginfullscreen",c),"webkitbeginfullscreen"==e.type?(g.on(t.video.el,"webkitendfullscreen",function(e){c(e,t)}),b.pub({type:w.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!0}},p.player)):"webkitendfullscreen"==e.type&&(g.off(t.video.el,"webkitendfullscreen",c),b.pub({type:w.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!1}},p.player))}function u(e){27===e.keyCode&&p(p.player,!1)}function p(e,t,i){if("undefined"==typeof t)return p.__isFullscreen||!1;var o=e.options.systemFullscreen;p.player=e,S.requestFullscreen?t?(g.on(document,S.fullscreenchange,l),i&&i[S.requestFullscreen]()):document[S.exitFullscreen]():o&&e.video.el.webkitEnterFullScreen?(g.on(e.video.el,"webkitbeginfullscreen",function(t){c(t,e)}),t?e.video.el.webkitEnterFullScreen():e.video.el.webkitExitFullscreen()):(p.__isFullscreen=t,p.__isFullscreen?(p.__origOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",g.on(document,"keydown",u)):(document.documentElement.style.overflow=p.__origOverflow,g.off(document,"keydown",u)),g.toggleClass(document.body,"vcp-full-window",t),b.pub({type:w.MSG.FullScreen,src:"util",detail:{isFullscreen:p.__isFullscreen}},p.player))}function h(e){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;oa)return-1}return-1}function y(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/")}function A(e){var t="unknown";return e.isFormat("rtmp")?t="rtmp":e.isFormat("flv")?t="flv":e.isFormat("m3u8")?t="m3u8":e.isFormat("mp4")&&(t="mp4"),t}function v(e,t){e=e.replace(/^(http|https):/,"");var i=window.location.protocol;return"http:"!=i&&"https:"!=i&&(i=t||"https:"),e=i+e}t.__esModule=!0,t.supportStyle=t.console=t.VideoType=t.CDNPath=t.FullscreenApi=void 0,t.guid=n,t.bind=r,t.isEmpty=s,t.convertTime=a,t.doFullscreen=p,t.extend=h,t.store=d,t.compareVersion=f,t.escapeHTML=y,t.getFormat=A,t.unifyProtocol=v;for(var m=i(2),g=o(m),w=i(4),b=o(w),M=i(1),I=(o(M),1),S=t.FullscreenApi={requestFullscreen:null,exitFullscreen:null,fullscreenElement:null,fullscreenEnabled:null,fullscreenchange:null,fullscreenerror:null},E=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],_=E[0],T=void 0,D=0;D10||C.IOS_VERSION>10)&&"system"==this.options.controls||(this.bigplay=new b["default"](this),this.bigplay.render(this.el));var n=void 0;n=!(this.options.controls&&"default"!=this.options.controls&&(!this.options.flash||"system"!=this.options.controls)),n&&(this.panel=new g["default"](this),this.panel.render(this.el)),this.setup()},e.prototype.verifyOptions=function(){return C.IE_VERSION&&x.compareVersion(C.IE_VERSION,"8.0")==-1?(this.errortips.show({code:5}),!1):!!this.options.src||(this.options.videoSource.hasUrl()?C.IS_IE||!C.IS_ENABLED_FLASH?this.errortips.show({code:5}):this.errortips.show({code:5}):this.errortips.show({code:12}),!1)},e.prototype.size=function(e,t,i){i=i||"cover";var o=/^\d+\.?\d{0,2}%$/,n=void 0,r=void 0;if(o.test(e)||o.test(t))n=e,r=t;else{var s=this.video?this.video.videoWidth():this.options.width,a=this.video?this.video.videoHeight():this.options.height;if(n=e,r=t,s&&a){var l=s/a;"fit"==i&&(n=e,r=n/l,r>t&&(n*=t/r,r=t))}var c=P.getViewportSize();c.width>0&&n>c.width&&(n=c.width)}n+=o.test(n)?"":"px",r+=o.test(r)?"":"px",this.el.style.width=n,this.el.style.height=r,this.video&&(this.video.width(n),this.video.height(r)),this.width=n,this.height=r},e.prototype.setup=function(){if(this.__handleEvent=x.bind(this,this.handleEvent),C.IS_MOBILE){if(this.options.autoplay){var e=this;document.addEventListener("WeixinJSBridgeReady",function(){e.play()})}}else this.loading.show()},e.prototype.destroy=function(){this.video&&this.video.destroy(),this.panel&&this.panel.destroy(),this.bigplay&&this.bigplay.destroy(),this.loading&&this.loading.destroy(),d.unsub("*","*",this.handleMsg,this),this.video=this.panel=this.bigplay=this.loading=null,this.el.parentNode.removeChild(this.el)},e.prototype.setListener=function(e){this.listener=e},e.prototype.handleEvent=function(e){switch(e.type){case"mousemove":if(this.__lastmove&&new Date-this.__lastmove<100)break;var t=this;if(this.__movecnt=this.__movecnt||0,this.__movecnt++,this.__movecnt<5){setTimeout(function(){t.__movecnt=0},500);break}this.__movecnt=0,this.__lastmove=+new Date,clearTimeout(this.__moveid),t.panel&&t.panel.show(),this.__moveid=setTimeout(function(){t.playing()&&t.panel&&t.panel.hide()},3e3)}},e.prototype.handleMsg=function(e){switch(e.type){case O.Load:P.removeClass(this.el,"vcp-playing"),("none"===this.options.preload||this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1)&&this.loading.hide();break;case O.Play:if(!this.playing())break;!this.hasPlay&&this.options.flash&&(this.mtaReport.reportFlash(),this.hasPlay=!0),P.addClass(this.el,"vcp-playing"),this.video.type()==x.VideoType.RTMP&&(this.__wait=!0,this.loading.show()),P.on(this.el,"mousemove",this.__handleEvent);break;case O.Playing:this.loading.hide();break;case O.TimeUpdate:this.__wait&&(this.__wait=!1,this.loading.hide());break;case O.Pause:P.off(this.el,"mousemove",this.__handleEvent),P.removeClass(this.el,"vcp-playing");break;case O.Ended:P.off(this.el,"mousemove",this.__handleEvent),this.panel&&this.panel.show(),P.removeClass(this.el,"vcp-playing");break;case O.MetaLoaded:this.loading.hide(),this.mtaReport.report(),this.size(this.options.width,this.options.height);break;case O.Seeking:this.loading.show();break;case O.Seeked:this.loading.hide();break;case O.FullScreen:var t=this;setTimeout(function(){P.toggleClass(t.el,"vcp-fullscreen",e.detail.isFullscreen)},0);break;case O.Error:this.loading.hide(),this.errortips.show(e.detail),this.panel&&this.panel.show();try{var i=this.options.videoSource,o=x.getFormat(i);C.IS_X5TBS?MtaH5.clickStat("x5_err",{format:o}):MtaH5.clickStat("error",{format:o})}catch(n){}}!e["private"]&&this.listener&&this.listener(e)},e.prototype.currentTime=function(e){return this.video.currentTime(e)},e.prototype.duration=function(){return this.video.duration()},e.prototype.percent=function(e){return this.video.duration()?"undefined"==typeof e?this.video.currentTime()/this.video.duration():void this.video.currentTime(this.video.duration()*e):0},e.prototype.buffered=function(){return this.video.duration()?this.video.buffered()/this.video.duration():0},e.prototype.pause=function(){this.video.pause()},e.prototype.play=function(){var e;this.errortips.clear(),(e=this.video).play.apply(e,arguments)},e.prototype.togglePlay=function(){this.errortips.clear(),this.video.togglePlay()},e.prototype.stop=function(){this.video.stop()},e.prototype.mute=function(e){return this.video.mute(e)},e.prototype.volume=function(e){return this.video.volume(e)},e.prototype.fullscreen=function(e){return this.video.fullscreen(e)},e.prototype.load=function(e,t){this.errortips.clear(),this.loading.show(),this.video.load(e||this.options.src,t)},e.prototype.playing=function(){return this.video&&this.video.playing()},e.prototype.paused=function(){return this.video&&this.video.paused()},e}()},function(e,t,i){var o=i(7);"string"==typeof o&&(o=[[e.id,o,""]]);i(22)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,i){t=e.exports=i(8)(),t.push([e.id,".vcp-player{position:relative;z-index:0;font-family:Tahoma,\\\\5FAE\\8F6F\\96C5\\9ED1,\\u5b8b\\u4f53,Verdana,Arial,sans-serif;background-color:#000}.vcp-player video{display:block;overflow:hidden}.vcp-fullscreen.vcp-player,.vcp-fullscreen video,body.vcp-full-window{width:100%!important;height:100%!important}body.vcp-full-window{overflow-y:auto}.vcp-full-window .vcp-player{position:fixed;left:0;top:0;z-index:2147483647}.vcp-pre-flash,.vcp-video{width:100%;height:100%}.vcp-pre-flash{z-index:999;background:#000;position:absolute;top:0;left:0}.vcp-controls-panel{position:absolute;bottom:0;width:100%;font-size:16px;height:3em;z-index:1000}.vcp-controls-panel.show{-webkit-animation:fadeIn ease .8s;animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-controls-panel.hide{-webkit-animation:fadeOut ease .8s;animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-panel-bg{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#242424;opacity:.8;filter:alpha(opacity=80);z-index:1000}.vcp-playtoggle{cursor:pointer;position:relative;z-index:1001;width:3em;height:100%;float:left;background-image:url("+i(9)+");background-image:url("+i(10)+")\\0}.vcp-playtoggle:focus,.vcp-playtoggle:hover{background-color:#708090;opacity:.9;filter:alpha(opacity=90)}.touchable .vcp-playtoggle:hover{background-color:transparent;opacity:1}.vcp-playing .vcp-playtoggle{background-image:url("+i(11)+");background-image:url("+i(12)+")\\0}.vcp-bigplay{width:100%;height:80%;position:absolute;background-color:white\\0;filter:alpha(opacity=0);opacity:0;z-index:1000;top:0;left:0}.vcp-slider{position:relative;z-index:1001;float:left;background:#c4c4c4;height:10px;opacity:.8;filter:alpha(opacity=80);cursor:pointer}.vcp-slider .vcp-slider-track{width:0;height:100%;margin-top:0;opacity:1;filter:alpha(opacity=100);background-color:#1e90ff}.vcp-slider .vcp-slider-thumb{cursor:pointer;background-color:#fff;position:absolute;top:0;left:0;border-radius:1em!important;height:10px;margin-left:-5px;width:10px}.vcp-slider-vertical{position:relative;width:.5em;height:8em;top:-5.6em;z-index:1001;background-color:#1c1c1c;opacity:.9;filter:alpha(opacity=90);cursor:pointer}.vcp-slider-vertical .vcp-slider-track{background-color:#1275cf;width:.5em;height:100%;opacity:.8;filter:alpha(opacity=80)}.vcp-slider-vertical .vcp-slider-thumb{cursor:pointer;position:absolute;background-color:#f0f8ff;width:.8em;height:.8em;border-radius:.8em!important;margin-top:-.4em;top:0;left:-.15em}.vcp-timeline{top:-10px;left:0;height:10px;position:absolute;z-index:1001;width:100%}.vcp-timeline .vcp-slider-thumb{top:-4px}.vcp-timeline .vcp-slider{margin-top:8px;height:2px;width:100%}.vcp-timeline:hover .vcp-slider{margin-top:0;height:10px}.vcp-timeline:hover .vcp-slider-thumb{display:block;width:16px;height:16px;top:-3px;margin-left:-8px}.vcp-timelabel{display:inline-block;line-height:3em;float:left;color:#fff;padding:0 9px}.vcp-timelabel,.vcp-volume{height:3em;z-index:1001;position:relative}.vcp-volume{width:3em;cursor:pointer;float:right;background-color:transparent;opacity:.9;filter:alpha(opacity=90)}.vcp-volume-icon{background-image:url("+i(13)+");background-image:url("+i(14)+")\\0;display:inline-block;width:3em;height:3em;position:absolute;left:0;top:0}.vcp-volume-muted .vcp-volume-icon{background-image:url("+i(15)+");background-image:url("+i(16)+")\\0}.vcp-volume .vcp-slider-vertical{top:-8.4em;left:1em;display:none}.vcp-volume .vcp-slider-track{position:absolute;bottom:0}.vcp-volume:hover .vcp-slider-vertical{display:block}.vcp-volume .vcp-volume-bg{height:8.8em;width:2em;position:absolute;left:.25em;top:-8.8em;background:#242424;display:none}.vcp-volume:hover .vcp-slider-vertical,.vcp-volume:hover .vcp-volume-bg{display:block}.vcp-fullscreen-toggle{position:relative;width:3em;height:3em;float:right;cursor:pointer;z-index:1001;background-image:url("+i(17)+");background-image:url("+i(18)+")\\0}.vcp-fullscreen .vcp-fullscreen-toggle{background-image:url("+i(19)+");background-image:url("+i(20)+')\\0}.vcp-loading{box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;text-indent:-9999em}.vcp-loading:before{box-sizing:inherit;content:"";display:block;width:100%;height:100%;border-radius:50%;border:3px solid hsla(0,0%,100%,0);border-left-color:#fff;border-right-color:#fff;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.vcp-poster{position:absolute;left:0;top:0;overflow:hidden;z-index:1000;width:100%;height:100%;display:none}.vcp-poster-pic{position:relative}.vcp-poster-pic.cover,.vcp-poster-pic.default{left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vcp-poster-pic.cover{width:100%}.vcp-poster-pic.stretch{width:100%;height:100%}.vcp-error-tips{position:absolute;z-index:1001;width:100%;height:4.5em;left:0;top:50%;color:#ff4500;margin-top:-5.25em;text-align:center;display:none}.vcp-clarityswitcher{height:3em;width:3em;cursor:pointer;position:relative;z-index:1001;float:right;background-color:transparent;opacity:.9}.vcp-vertical-switcher-container{width:3em;position:absolute;left:0;bottom:2.4em;background:#242424;display:none}.vcp-vertical-switcher-current{display:block;color:#fff;text-align:center;line-height:3em}.vcp-vertical-switcher-item{display:block;color:#fff;text-align:center;line-height:2em}.vcp-vertical-switcher-item.current{color:#888}.vcp-share>a{width:3em;height:3em;cursor:pointer;background-image:url('+i(21)+");opacity:.9;display:block}.vcp-share{width:3em;height:3em;position:relative;float:right;z-index:1001}.vcp-vertical-share-container{width:auto;height:auto;position:absolute;background:rgba(36,36,36,.8);padding:.5em;overflow:hidden;display:none}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation:fadeOut ease .8s;animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation:fadeIn ease .8s;animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&g.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",r(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",r(e,t),t}function c(e,t){var i,o,n;if(t.singleton){var r=m++;i=v||(v=a(t)),o=u.bind(null,i,r,!1),n=u.bind(null,i,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=l(t),o=h.bind(null,i),n=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=a(t),o=p.bind(null,i),n=function(){s(i)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}function u(e,t,i,o){var n=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,n);else{var r=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function p(e,t){var i=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function h(e,t){var i=t.css,o=t.sourceMap;o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var n=new Blob([i],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}var d={},f=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},y=f(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),A=f(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,m=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=y()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var i=n(e);return o(i,t),function(e){for(var r=[],s=0;s0?f.console.error("加载视频文件超时"):f.console.error("无法加载视频文件,请检查网络,以及视频文件是否允许跨域请求访问,m3u8文件是否存在 "+(t.response&&t.response.status?"netstatus:"+t.response.status:"")),this.notify({type:"error",code:2,timeStamp:+new Date}),r.startLoad();break;case Hls.ErrorTypes.MEDIA_ERROR:r.recoverMediaError();break;default:r.destroy()}},t.prototype.__flvLoaded=function(e){if(!flvjs.isSupported())return this.notify({type:"error",code:5,timeStamp:+new Date});this.flv&&this.flv.destroy();var t=flvjs.createPlayer({type:"flv",isLive:this.player.options.live,url:e},this.options.flvConfig);t.attachMediaElement(this.el),t.on(flvjs.Events.ERROR,f.bind(this,function(e,t,i){var o={type:"error"};e==flvjs.ErrorTypes.NETWORK_ERROR&&(o.code=2),e==flvjs.ErrorTypes.MEDIA_ERROR&&(o.code=1002),e==flvjs.ErrorTypes.OTHER_ERROR,o.timeStamp=+new Date,this.notify(o)})),t.on(flvjs.Events.MEDIA_INFO,f.bind(this,function(e,t){})),t.on(flvjs.Events.STATISTICS_INFO,f.bind(this,function(e,t){})),this.flv=t,t.load()},t.prototype.setup=function(){this.playState=v.PlayStates.IDLE,this.seekState=v.SeekStates.IDLE,this.metaDataLoaded=!1,this.__timebase=+new Date,this.on(y.MSG.MetaLoaded,this.notify),this.on(y.MSG.Loaded,this.notify),this.on(y.MSG.Progress,this.notify),this.on(y.MSG.Play,this.notify),this.on(y.MSG.Playing,this.notify),this.on(y.MSG.Pause,this.notify),this.on(y.MSG.Error,this.notify),this.on(y.MSG.TimeUpdate,this.notify),this.on(y.MSG.Ended,this.notify),this.on(y.MSG.Seeking,this.notify),this.on(y.MSG.Seeked,this.notify),this.on(y.MSG.VolumeChange,this.notify),this.on("durationchange",this.notify),this.load(this.options.src,this.options.m3u8?f.VideoType.M3U8:"")},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.hls&&this.hls.destroy(),this.flv&&this.flv.destroy()},t.prototype.notify=function(e){var t={type:e.type,src:this,ts:+new Date,timeStamp:e.timeStamp};switch(e.type){case y.MSG.MetaLoaded:this.metaDataLoaded=!0;break;case y.MSG.Error:var i={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};t.detail=this.el&&this.el.error||{code:e.code},t.detail.reason=i[t.detail.code];break;case y.MSG.Ended:this.pause(),this.playState=v.PlayStates.STOP;break;case"durationchange":0!=this.videoHeight()&&(t.type=y.MSG.Resize);break;case y.MSG.Playing:this.playState=e.type.toUpperCase();break;case y.MSG.Pause:this.playState=v.PlayStates.PAUSED;break;case y.MSG.Seeking:case y.MSG.Seeked:this.seekState=e.type.toUpperCase()}"timeupdate"!=e.type,this.pub(t)},t.prototype.videoWidth=function(){return this.el.videoWidth},t.prototype.videoHeight=function(){return this.el.videoHeight},t.prototype.width=function(e){return e?void(this.el.style.width=e):this.el.width},t.prototype.height=function(e){return e?void(this.el.style.height=e):this.el.height},t.prototype.play=function(){this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1&&this.hls&&this.hls.startLoad(-1),this.el.play()},t.prototype.togglePlay=function(){this.paused()?this.play():this.pause()},t.prototype.pause=function(){this.el.pause()},t.prototype.stop=function(){this.el.pause(),this.el.currentTime=0},t.prototype.paused=function(){return this.el.paused},t.prototype.buffered=function(){return this.el.buffered.length>=1?this.el.buffered.end(this.el.buffered.length-1):0},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.currentTime:this.el.currentTime=e},t.prototype.duration=function(){return this.el.duration||0},t.prototype.mute=function(e){return"undefined"==typeof e?this.el.muted:(this.volume(e?0:this.__lastVol),this.el.muted=e)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el.volume:(e<0&&(e=0),e>1&&(e=1),0!=e&&(this.__lastVol=e),this.el.muted=0==e,this.options.volume=e,this.el.volume=e)},t.prototype.fullscreen=function(e){return f.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){this.pub({type:y.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}});var i=e.indexOf(".m3u8")>-1||t==f.VideoType.M3U8,o=e.indexOf(".flv")>-1;if(!g.IS_ENABLED_MSE||!i&&!o||g.IS_X5TBS&&this.player.options.x5_player||i&&g.IS_MAC&&g.IS_SAFARI&&!g.IS_IOS)this.__type=t,this.el.src=e;else{var n=this,r=w[this.options.hls]||w["0.7.1"];i?(this.__type=f.VideoType.M3U8,"undefined"==typeof window.Hls?h.loadScript(f.unifyProtocol(f.CDNPath+r),function(){n.__hlsLoaded.call(n,e)}):this.__hlsLoaded(e)):o&&(this.__type=f.VideoType.FLV,"undefined"==typeof window.flvjs?h.loadScript(f.unifyProtocol(f.CDNPath+"libs/flv.min.1.5.js"),function(){n.__flvLoaded.call(n,e)}):this.__flvLoaded(e))}},t.prototype.playing=function(){return!this.el.paused},t.prototype.type=function(){return this.__type},t}(u["default"]);t["default"]=b},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return t+"_"+e}function s(e,t){return t.guid&&String(t.guid).indexOf("_")==-1?e+"_"+t.guid:t.guid}t.__esModule=!0;var a=i(2),l=o(a),c=i(3),u=o(c),p=i(4),h=o(p),d=i(1),f=o(d),y=function(){function e(t,i){n(this,e),this.name=i,this.player=t,this.options=t.options,this.fnCache={},this.guid=u.guid()}return e.prototype.createEl=function(e,t,i){return this.el=l.createEl(e,t,i)},e.prototype.render=function(e){return e&&this.el&&(this.owner=e,e.appendChild(this.el),this.setup()),this.el},e.prototype.on=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),this.cbs=this.cbs||{};var o=s(this.guid,i),n=!o,a=o&&!this.fnCache[o];return n||a?(i=u.bind(this,i,this.guid),this.fnCache[i.guid]=i,o=i.guid):i=this.fnCache[o],l.on(e,t,i),this.cbs[r(o,t)]={guid:o,el:e,type:t},i},e.prototype.off=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),f.IS_MOBILE&&"click"==t&&(t="touchend");var o=s(this.guid,i);this.fnCache[o]&&(i=this.fnCache[o]),l.off(e,t,i),delete this.cbs[r(o,t)]},e.prototype.pub=function(e){var t=this;setTimeout(function(){h.pub(e,t.player)},0)},e.prototype.sub=function(e,t,i){h.sub(e,t,i,this.player)},e.prototype.unsub=function(e,t,i){h.unsub(e,t,i,this.player)},e.prototype.handleMsg=function(){},e.prototype.setup=function(){},e.prototype.destroy=function(){if(this.handleMsg&&this.unsub("*","*",this.handleMsg),this.cbs){for(var e in this.cbs)if(this.cbs.hasOwnProperty(e)){var t=this.cbs[e];l.off(t.el,t.type,this.fnCache[t.guid]),delete this.cbs[e]}this.fnCache=null,this.cbs=null;try{this.el.parentNode.removeChild(this.el)}catch(i){}}},e}();t["default"]=y},function(e,t){"use strict";t.__esModule=!0;t.PlayStates={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",STOP:"STOP"},t.SeekStates={IDLE:"IDLE",SEEKING:"SEEKING",SEEKED:"SEEKED"},t.ControlsStates={DEFAULT:"default",NONE:"none",SYSTEM:""}},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return window.document[e]?window.document[e]:navigator.appName.indexOf("Microsoft Internet")!=-1?document.getElementById(e):document.embeds&&document.embeds[e]?document.embeds[e]:void 0}t.__esModule=!0;var c=i(24),u=n(c),p=i(4),h=i(2),d=o(h),f=i(3),y=o(f),A=i(25),v=o(A),m=i(1),g=o(m),w=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"FlashVideo")),n="vcpFlashCB_"+o.guid;return o.__flashCB=n,window[n]||(window[n]=function(e,t){t=t&&t[0];var i=window[n].fnObj&&window[n].fnObj[t.objectID];i&&i(e,t)},window[n].fnObj={}),o}return a(t,e),t.prototype.render=function(e){this.__timebase=+new Date;var t=this.player.options,i=y.unifyProtocol(t.flashUrl||"//imgcache.qq.com/open/qcloud/video/player/release/QCPlayer.swf"),o="opaque",n="obj_vcplayer_"+this.player.guid,r=this.__flashCB;this.__id=n;var s=d.createEl("div",{"class":"vcp-video"});s.innerHTML='\n\t\t\n \n \n \n \n \n \n \n \n\n \n \n \n\t\t',this.container=s,this.owner=e,this.owner.appendChild(s),this.cover=d.createEl("div",{"class":"vcp-pre-flash"}),this.owner.appendChild(this.cover),window[this.__flashCB].fnObj[this.__id]=y.bind(this,this.notify)},t.prototype.setup=function(){this.on("error",this.notify),this.playState=v.PlayStates.IDLE,this.seekState=v.SeekStates.IDLE,this.metaDataLoaded=!1},t.prototype.doPolling=function(){this.options.live||(clearInterval(this.__timer),this.__timer=setInterval(this.interval.bind(this),1e3))},t.prototype.endPolling=function(){clearInterval(this.__timer)},t.prototype.interval=function(){var e;try{e=this.el.getState()}catch(t){return void this.endPolling()}if(this.__m3u8){var i=this.currentTime()+e.bufferLength;this.__buffered!==i&&(this.__buffered=i,this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__buffered>=this.duration()&&this.endPolling()}else this.__rtmp||(this.__bytesloaded!=e.bytesLoaded&&(this.__bytesloaded=e.bytesLoaded, +this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__bytesloaded>=this.__bytesTotal&&this.endPolling())},t.prototype.destroy=function(){"undefined"!=typeof this.el&&"undefined"!=typeof this.el.destroy&&this.el.destroy(),this.endPolling(),delete window[this.__flashCB].fnObj[this.__id],e.prototype.destroy.call(this)},t.prototype.notify=function(e,t){var i={type:e,ts:+new Date};try{switch(this.options.debug&&this.pub({type:i.type,src:this,ts:i.ts,detail:y.extend({debug:!0},t)}),i.type){case"ready":if(this.el=l(this.__id),this.setup(),g.IS_FIREFOX){var o=this;setTimeout(function(){o.el.setAutoPlay(!!o.options.autoplay),o.__timebase=new Date-t.time,o.load(o.options.src)},0)}else this.el.setAutoPlay(!!this.options.autoplay),this.__timebase=new Date-t.time,this.load(this.options.src);return;case"metaData":i.type=p.MSG.MetaLoaded,this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,this.__duration=t.duration,this.__bytesTotal=t.bytesTotal,this.__prevPlayState=null,this.__m3u8=t.type===y.VideoType.M3U8,this.__rtmp=t.type===y.VideoType.RTMP,this.__type=t.type,this.__metaloaded=!0,this.metaDataLoaded=!0,this.doPolling();var o=this;if(!o.cover)break;setTimeout(function(){o.cover&&(o.owner.removeChild(o.cover),o.cover=null)},500);break;case"playState":this.playState=t.playState,t.playState==v.PlayStates.PLAYING?(this.__playing=!0,this.__stopped=!1,i.type=p.MSG.Play):t.playState==v.PlayStates.PAUSED?(this.__playing=!1,this.__stopped=!1,i.type=p.MSG.Pause):t.playState==v.PlayStates.STOP?(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended,this.__prevPlayState=null,this.options.live&&(this.metaDataLoaded=!1)):t.playState==v.PlayStates.IDLE&&(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended);break;case"seekState":if(this.seekState=t.seekState,!this.__metaloaded)return;if(t.seekState==v.SeekStates.SEEKING)i.type=p.MSG.Seeking;else{if(t.seekState!=v.SeekStates.SEEKED)return;this.__m3u8||this.options.live||t.playState!=v.PlayStates.STOP||(this.play(),this.__prevPlayState=t.playState),this.__m3u8&&(i.type=p.MSG.Seeked)}break;case"netStatus":this.options.live||("NetStream.Buffer.Full"==t.code?(this.__prevPlayState==v.PlayStates.PAUSED||this.__prevPlayState==v.PlayStates.STOP,this.__prevPlayState=null,i.type=p.MSG.Seeked):"NetStream.Seek.Complete"==t.code),"NetConnection.Connect.Closed"==t.code&&(this.options.src.indexOf("rtmp://")>-1?this.playState==v.PlayStates.STOP?(i.type="error",t={code:13,reason:t.code}):(i.type="error",t={code:1002,reason:t.code}):this.playState=v.PlayStates.IDLE),"NetStream.Play.Stop"!=t.code&&"NetConnection.Connect.Success"!=t.code&&"NetConnection.Connect.Failed"!=t.code||(this.playState=v.PlayStates.IDLE);break;case"mediaTime":this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,i.type=p.MSG.TimeUpdate;break;case"error":if("NetStream.Seek.InvalidTime"==t.code)return this.currentTime(t.details),!1;"NetStream.Play.StreamNotFound"==t.code&&this.pub({type:"netStatus",src:this,ts:i.ts,detail:t});var n=isNaN(parseInt(t.code))?1002:t.code,r=isNaN(parseInt(t.code))?t.code:t.msg,s=r.match(/#(\d+)/);s&&s[1]&&(n=s[1]),t={code:n,reason:r||""},this.metaDataLoaded=!1}var a="printLog"==e||"canPlay"==e;!a&&this.pub({type:i.type,src:this,ts:i.ts,detail:t})}catch(c){y.console.error(e+" "+i.type,c)}},t.prototype.handleMsg=function(e){},t.prototype.videoWidth=function(){return this.__videoWidth},t.prototype.videoHeight=function(){return this.__videoHeight},t.prototype.width=function(e){return"undefined"==typeof e?this.el&&this.el.width:(e="100%",this.el&&(this.el.width=e))},t.prototype.height=function(e){return"undefined"==typeof e?this.el&&this.el.height:(e="100%",this.el&&(this.el.height=e))},t.prototype.play=function(e){this.playState==v.PlayStates.PAUSED||this.playState==v.PlayStates.PLAYING||e?this.el.playerResume():this.playState!=v.PlayStates.PLAYING&&this.el.playerPlay()},t.prototype.togglePlay=function(){this.metaDataLoaded?this.playState==v.PlayStates.PAUSED?this.el.playerResume():this.playState==v.PlayStates.PLAYING?this.el.playerPause():this.playState==v.PlayStates.STOP?(this.currentTime(0),this.el.playerResume()):this.el.playerPlay():this.player.load()},t.prototype.pause=function(){this.el.playerPause()},t.prototype.stop=function(){this.el.playerStop()},t.prototype.paused=function(){return!this.__playing},t.prototype.buffered=function(){var e;return this.__m3u8?this.__buffered||0:(e=(this.__bytesloaded||0)/(this.__bytesTotal||1),this.duration()*e)},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.getPosition():void this.el.playerSeek(e)},t.prototype.duration=function(){return this.__duration},t.prototype.mute=function(e){return"undefined"==typeof e?0==this.volume():void this.volume(e?0:this.__lastVol)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el&&this.el.getState().volume:(this.el&&this.el.playerVolume(e),0!=e&&(this.__lastVol=e),this.options.volume=e,void this.pub({type:p.MSG.VolumeChange,src:this,ts:+new Date}))},t.prototype.fullscreen=function(e){return y.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){this.pub({type:p.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}}),this.el&&this.el.playerLoad(e)},t.prototype.playing=function(){return this.el&&this.el.getState&&this.el.getState().playState===v.PlayStates.PLAYING},t.prototype.type=function(){return this.__type},t.prototype.state=function(){return this.playState},t}(u["default"]);t["default"]=w},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(28),p=n(u),h=i(29),d=n(h),f=i(30),y=i(31),A=n(y),v=i(32),m=n(v),g=i(33),w=n(g),b=i(34),M=n(b),I=i(4),S=i(2),E=o(S),_=i(3),T=o(_),D=i(1),L=o(D),O=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Panel"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{"class":"vcp-controls-panel"}),this.el.appendChild(E.createEl("div",{"class":"vcp-panel-bg"})),this.playToggle=new p["default"](this.player),this.playToggle.render(this.el),this.timelabel=new m["default"](this.player),this.timelabel.render(this.el),this.timeline=new A["default"](this.player),this.timeline.render(this.el),this.options.fullscreenEnabled===!0&&(this.fullscreen=new d["default"](this.player),this.fullscreen.render(this.el)),L.IS_MOBILE||(this.volume=new w["default"](this.player),this.volume.render(this.el)),this.options.videoSource&&this.options.videoSource.definitions.length>1&&!L.IS_MOBILE&&(this.claritySwitcher=new M["default"](this.player),this.claritySwitcher.render(this.el)),e.prototype.render.call(this,t)},t.prototype.setup=function(){var e=T.bind(this,this.handleMsg);this.sub(f.MSG.Changing,this.volume,e),this.sub(f.MSG.Changed,this.timeline.progress,e),this.sub(I.MSG.TimeUpdate,this.player.video,e),this.sub(I.MSG.Progress,this.player.video,e),this.sub(I.MSG.MetaLoaded,this.player.video,e),this.sub(I.MSG.Pause,this.player.video,e),this.sub(I.MSG.Play,this.player.video,e),this.sub(I.MSG.Ended,this.player.video,e)},t.prototype.handleMsg=function(e){switch(e.type){case I.MSG.MetaLoaded:this.timeline.percent(this.player.percent()),this.timeline.buffered(this.player.buffered()),this.player.volume("undefined"==typeof this.options.volume?.5:this.options.volume),!this.options.autoplay&&this.show();break;case I.MSG.TimeUpdate:this.timeline.scrubbing||this.timeline.percent(this.player.percent());break;case I.MSG.Pause:this.show();break;case I.MSG.Play:this.hide();break;case I.MSG.Progress:this.timeline.buffered(this.player.buffered());break;case f.MSG.Changed:e.src===this.timeline.progress&&this.player.percent(this.timeline.percent());break;case I.MSG.Ended:this.show()}},t.prototype.toggle=function(){E.hasClass(this.el,"show")?this.hide():this.show()},t.prototype.show=function(){E.hasClass(this.el,"hide")&&(E.removeClass(this.el,"hide"),E.addClass(this.el,"show"))},t.prototype.hide=function(){E.removeClass(this.el,"show"),E.addClass(this.el,"hide")},t}(c["default"]);t["default"]=O},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),i(25)),f=(o(d),function(e){function t(i){return r(this,t),s(this,e.call(this,i,"PlayToggle"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{"class":"vcp-playtoggle"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.togglePlay()},t.prototype.handleMsg=function(e){console.log("@"+this.name,e)},t}(c["default"]));t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"FullscreenToggle"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{"class":"vcp-fullscreen-toggle"}),window.fsApi=d.FullscreenApi,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.fullscreen(!this.player.fullscreen())},t.prototype.handleMsg=function(e){console.log(t.name,e)},t}(c["default"]);t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.MSG=void 0;var l=i(24),c=n(l),u=i(2),p=o(u),h=i(4),d=(o(h),i(3)),f=(o(d),t.MSG={Changing:"sliderchanging",Changed:"sliderchanged"}),y=function(e){function t(i,o){r(this,t);var n=s(this,e.call(this,i,"Slider"));return n.vertical=o||!1,n}return a(t,e),t.prototype.render=function(t,i){var o=this.vertical?"vcp-slider-vertical":"vcp-slider";return this.createEl("div",{"class":o}),this.track=p.createEl("div",{"class":"vcp-slider-track"}),this.thumb=p.createEl("div",{"class":"vcp-slider-thumb"}),this.el.appendChild(this.track),this.el.appendChild(this.thumb),this.enabled="undefined"==typeof i||i,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.ownerDoc=document.body.ownerDocument,this.on("mousedown",this.mousedown),this.on("touchstart",this.mousedown))},t.prototype.handleMsg=function(e){},t.prototype.mousedown=function(e){return e.preventDefault&&e.preventDefault(),this.pos=p.findElPosition(this.el),this.on(this.ownerDoc,"mouseup",this.mouseup),this.on(this.ownerDoc,"mousemove",this.mousemove),this.on(this.ownerDoc,"touchend",this.mouseup),this.on(this.ownerDoc,"touchmove",this.mousemove),this.mousemove(e),!1},t.prototype.mouseup=function(e){e.target||e.srcElement;this.off(this.ownerDoc,"mouseup",this.mouseup),this.off(this.ownerDoc,"mousemove",this.mousemove),this.off(this.ownerDoc,"touchend",this.mouseup),this.off(this.ownerDoc,"touchmove",this.mousemove),this.pub({type:f.Changed,src:this,"private":!0})},t.prototype.mousemove=function(e){var t=p.getPointerPosition(this.el,e,this.pos);this.vertical?(this.__percent=1-t.y,this.thumb.style.top=100*this.__percent+"%"):(this.__percent=t.x,this.thumb.style.left=100*this.__percent+"%"),this.__percent=Number(this.__percent.toFixed(3)),this.pub({type:f.Changing,src:this,"private":!0})},t.prototype.percent=function(e){return e||0==e?(this.__percent=e,void(this.vertical?this.thumb.style.top=100*this.__percent+"%":this.thumb.style.left=100*this.__percent+"%")):this.__percent},t}(c["default"]);t["default"]=y},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(30),c=n(l),u=i(24),p=n(u),h=i(2),d=(o(h),i(3)),f=o(d),y=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Timeline"))}return a(t,e),t.prototype.render=function(t){return this.enabled=!this.options.live,this.createEl("div",{"class":"vcp-timeline"}),this.progress=new c["default"](this.player,(!1)),this.progress.render(this.el,this.enabled),this.track=this.progress.track,this.enabled||(this.el.style.display="none"),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.sub(l.MSG.Changing,this.progress,f.bind(this,this.handleMsg)),this.sub(l.MSG.Changed,this.progress,f.bind(this,this.handleMsg)))},t.prototype.handleMsg=function(e){e.type===l.MSG.Changing?(this.scrubbing=!0,this.syncLabel(this.percent())):e.type===l.MSG.Changed&&(this.scrubbing=!1)},t.prototype.syncLabel=function(e){var t=this.player.duration();e=Math.min(e,1);var i="";t&&(i=f.convertTime(e*t)+" / "+f.convertTime(t)),this.pub({type:"timelabel",src:"timeline",label:i,"private":!0})},t.prototype.buffered=function(e){this.enabled&&(e=Math.min(e,1),this.__buffered=e,this.track.style.width=100*e+"%")},t.prototype.percent=function(e){if(this.enabled)return"undefined"==typeof e?this.progress.percent()||0:(e=Math.min(e,1),this.syncLabel(e),this.__buffered0&&this.__muted&&this.syncMute(!1)}},t.prototype.toggleMute=function(e){var t=!this.player.mute();this.player.mute(t)},t.prototype.syncMute=function(e){e?d.addClass(this.el,"vcp-volume-muted"):d.removeClass(this.el,"vcp-volume-muted"),this.__muted=e},t.prototype.syncTrack=function(e){this.track.style.height=100*e+"%",this.volume.percent(1-e)},t.prototype.percent=function(e){return"undefined"==typeof e?1-this.volume.percent()||0:(this.player.volume(e),e)},t}(p["default"]);t["default"]=v},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=o(u),h=i(3),d=o(h),f={od:"超清",hd:"高清",sd:"标清"},y=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ClaritySwitcher"));return f=d.extend({},i.options.clarityLabel,f),i.claritySwitcher=o,o}return a(t,e),t.prototype.render=function(t){this.show=!1,this.createEl("div",{"class":"vcp-clarityswitcher"}),this.current=p.createEl("a",{"class":"vcp-vertical-switcher-current"}),this.container=p.createEl("div",{"class":"vcp-vertical-switcher-container"}),this.items=[],this.currentItem="";var i=this.options.videoSource;this.current.innerHTML=f[i.curDef],this.el.appendChild(this.current);for(var o=0;o10||A.IOS_VERSION>10)&&"system"==this.player.options.controls&&this.player.togglePlay()},t.prototype.handleMsg=function(e){switch(e.type){case v.MSG.Load:this.__loaded=!1,this.setPoster(this.poster.start);break;case v.MSG.MetaLoaded:if(this.__loaded=!0,!this.player.playing())break;this.hide();case v.MSG.Play:if(!this.__loaded)break;this.hide();break;case v.MSG.Pause:if(!this.__loaded)break;this.options.pausePosterEnabled===!0&&this.setPoster(this.poster.pause);break;case v.MSG.Ended:if(!this.__loaded)break;break;case v.MSG.Error:if(!this.__loaded)break}},t.prototype.setPoster=function(e){if(e=e||this.poster.src){this.__preload&&(this.__preload.onload=null),this.__preload=new Image;var t=this.__preload;this.hide();var i=this;t.onload=function(){if(i.pic.src=t.src,i.show(),!f.supportStyle("transform")){var e="stretch"==i.poster.style;if(e)return;var o="cover"==i.poster.style?i.options.width/(t.width/t.height):t.height,n="-"+i.options.width/2+"px",r="-"+o/2+"px";i.pic.style.cssText="left: 50%; top: 50%; margin-left: "+n+"; margin-top: "+r+";"}},t.src=e}},t.prototype.toggle=function(e){clearTimeout(this.__tid);var t=this;this.__tid=setTimeout(function(){t.el.style.display=e},100)},t.prototype.hide=function(){this.__preload&&(this.__preload.onload=null),this.toggle("none")},t.prototype.show=function(){this.toggle("block")},t}(u["default"]);t["default"]=m},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"Loading"));return o.timeSeed=null,o}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{"class":"vcp-loading"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){},t.prototype.handleMsg=function(e){},t.prototype.show=function(){if(this.options.showLoading!==!1){var e=500,t=this;this.timeSeed=setTimeout(function(){t.el.style.display="block"},e)}},t.prototype.hide=function(){this.timeSeed&&(clearTimeout(this.timeSeed),this.timeSeed=null),this.el.style.display="none"},t}(c["default"]));t["default"]=d},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f={EnvError:"当前系统环境不支持播放该视频格式",EnvFlashError:"当前系统环境不支持播放该视频格式",VideoSourceError:"获取视频失败,请检查播放链接是否有效",NetworkError:"网络错误,请检查网络配置或者播放链接是否正确",VideoDecodeError:"视频解码错误",ArgumentError:"使用参数有误,请检查播放器调用代码",UrlEmpty:"请填写视频播放地址",FileProtocol:"请勿在file协议下使用播放器,可能会导致视频无法播放",LiveFinish:"直播已结束,请稍后再来",CrossDomainError:"无法加载视频文件,跨域访问被拒绝",Ie9IframeFullscreenError:"在IE9中用iframe引用的实例无法支持全屏"},y={FileProtocol:[10],ArgumentError:[11],UrlEmpty:[12],LiveFinish:[13],VideoSourceError:[1002,2032],EnvError:[4,5],NetworkError:[1001,1,2],VideoDecodeError:[3],CrossDomainError:[2048],Ie9IframeFullscreenError:[10001]},A=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ErrorTips"));o.customTips=d.extend({},f,o.options.wording);for(var n in y)for(var a=0;a-1||!d.IS_SAFARI)?b.pc=["webrtc","flv","m3u8","mp4"]:b.pc=["webrtc","m3u8","mp4"]:b.pc=["webrtc","mp4"]):d.IS_ENABLED_MSE?e.h5_flv&&(d.IS_SAFARI&&v.compareVersion(d.SAFARI_VERSION,"10.1")>-1||!d.IS_SAFARI)?b.pc=["webrtc","flv","m3u8","mp4"]:b.pc=["webrtc","m3u8","mp4"]:d.IS_ENABLED_FLASH?e.flash=!0:b.pc=["webrtc","mp4"]),e.clarity){var i=M.indexOf(e.clarity);M.splice(i,1),M.unshift(e.clarity)}}function l(e){var t={urls:{m3u8:{od:e.m3u8||"",hd:e.m3u8_hd||"",sd:e.m3u8_sd||""},flv:{od:e.flv||"",hd:e.flv_hd||"",sd:e.flv_sd||""},mp4:{od:e.mp4||"",hd:e.mp4_hd||"",sd:e.mp4_sd||""},rtmp:{od:e.rtmp||"",hd:e.rtmp_hd||"",sd:e.rtmp_sd||""},webrtc:{od:e.webrtc||"",hd:e.webrtc_hd||"",sd:e.webrtc_sd||""}},isClarity:function(e){var i=t.urls;return!!(i.m3u8[e]||i.flv[e]||i.mp4[e]||i.rtmp[e]||i.webrtc[e])},isFormat:function(e){var i=t.urls;return!!i[e].od||!!i[e].hd||!!i[e].sd},hasUrl:function(){return this.isFormat("rtmp")||this.isFormat("flv")||this.isFormat("m3u8")||this.isFormat("mp4")||this.isFormat("webrtc")}};t.definitions=[];for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:b,n="",r=void 0;i=i||(d.IS_MOBILE?o.mobile:o.pc);for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:M,o="",n=0;n1&&void 0!==arguments[1]?arguments[1]:b,i=void 0,o="",n=e.urls,r=d.IS_MOBILE?t.mobile:t.pc,s=0;s0&&!this.options.live&&this.currentTime(t),n&&this.play(!0),m.unsub(w.MetaLoaded,"*",r,this)});m.sub(w.MetaLoaded,"*",r,this)},t.prototype.switchClarity=function(e){this.claritySwitcher?this.claritySwitcher.setClarity(e):this._switchClarity(e)},t.prototype.handleMsg=function(t){e.prototype.handleMsg.call(this,t)},t}(g.Player)},function(e,t){"use strict";t.__esModule=!0;var i=window.navigator.userAgent,o=/AppleWebKit\/([\d.]+)/i.exec(i),n=o?parseFloat(o.pop()):null,r=t.IS_IPAD=/iPad/i.test(i),s=t.IS_IPHONE=/iPhone/i.test(i)&&!r,a=t.IS_IPOD=/iPod/i.test(i),l=t.IS_IOS=s||r||a,c=t.IOS_VERSION=function(){var e=i.match(/OS (\d+)_(\d+)_?(\d+)?/i);return e&&[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]||[]}(),u=(t.IS_MAC=/Mac/i.test(i),t.IS_ANDROID=/Android/i.test(i)),p=t.ANDROID_VERSION=function(){var e,t,o=i.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);return o?(e=o[1]&&parseFloat(o[1]),t=o[2]&&parseFloat(o[2]),e&&t?parseFloat(o[1]+"."+o[2]):e?e:null):null}(),h=(t.IS_OLD_ANDROID=u&&/webkit/i.test(i)&&p<2.3,t.IS_NATIVE_ANDROID=u&&p<5&&n<537,t.IS_FIREFOX=/Firefox/i.test(i)),d=t.FIREFOX_VERSION=h&&function(){var e=i.match(/Firefox\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),f=t.IS_EDGE=/Edge/i.test(i),y=t.IS_EDG=/Edg/i.test(i),v=t.EDG_VERSION=y&&function(){var e=i.match(/Edg\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),A=t.IS_CHROME=!f&&/Chrome/i.test(i),m=t.IS_SAFARI=!f&&!A&&/Safari/i.test(i),g=(t.SAFARI_VERSION=function(){if(!m)return null;var e=/version\/([\d.]+)/i,t=i.match(e);return t?t[1]:void 0}(),t.IS_IE8=/MSIE\s8\.0/.test(i),t.IS_IE9=/MSIE\s9\.0/.test(i),t.IS_IE=/(msie\s|trident.*rv:)([\w.]+)/i.test(i)),w=(t.IE_VERSION=function(){var e=/(msie\s|trident.*rv:)([\w.]+)/i,t=i.match(e);return t?t[2]:null}(),t.TOUCH_ENABLED=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),t.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in document.createElement("video").style,t.HASVIDEO=!!document.createElement("video").canPlayType,t.IS_X5TBS=/TBS\/\d+/i.test(i)),b=(t.TBS_VERSION=function(){var e=i.match(/TBS\/(\d+)/i);if(e&&e[1])return e[1]}(),t.IS_MQQB=!w&&/MQQBrowser\/\d+/i.test(i),t.IS_QQB=!w&&/ QQBrowser\/\d+/i.test(i),t.IS_WECHAT=/(micromessenger|webbrowser)/i.test(i),t.IS_UC=/UCBrowser\/(\d+)\./i.test(i)),M=(t.IS_MQQ=/ QQ\/\d+/i.test(i),t.IS_MOBILE=u||l,t.IS_FILE_PROTOCOL=/file:/.test(location.protocol),t.FLASH_VERSION=null),S=(t.IS_ENABLED_FLASH=function(){var e;if(document.all||g)try{if(e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return t.FLASH_VERSION=M=e.GetVariable("$version").split(" ")[1].replace(/,/g,"."),window.console&&console.log("FLASH_VERSION",M),!0}catch(e){return!1}else try{if(navigator.plugins&&navigator.plugins.length>0&&(e=navigator.plugins["Shockwave Flash"])){for(var i=e.description.split(" "),o=0;o-1?"Edge":i.indexOf(".NET")>-1?"IE":i.indexOf("QQBrowser")>-1?"QQBrowser":i.indexOf("Mac OS")>-1?"safari":i.indexOf("Chrome")>-1?"chrome":"other"}(),t.isBrowserSupportWebRTC=function(){var e=56,t=80;return!b&&!f&&(!(y&&v-1;n.close(),t(e()&&o)})}catch(e){i()}});return t}()},function(e,t){"use strict";function i(e,t,i){return e?(e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i),i):console.warn("element not exists")}function o(e,t,i){return e?void(e.removeEventListener?e.removeEventListener(t,i,!1):e.detachEvent&&e.detachEvent("on"+t,i)):console.warn("element not exists")}function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=document.createElement(e);for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];null===r?o.removeAttribute(r):o.setAttribute(n,r)}for(var s in i)i.hasOwnProperty(s)&&(o[s]=i[s]);return o}function r(e){return document.getElementById(e)}function s(e,t){e.classList?e.classList.add(t):c(e,t)||(e.className=e.className+" "+t)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(u(t)," ")}function l(e,t,i){i?s(e,t):a(e,t)}function c(e,t){return e.classList?e.classList.contains(t):u(t).test(e.className)}function u(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}function p(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=document.documentElement,o=document.body,n=i.clientLeft||o.clientLeft||0,r=window.pageXOffset||o.scrollLeft,s=t.left+r-n,a=i.clientTop||o.clientTop||0,l=window.pageYOffset||o.scrollTop,c=t.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function h(e,t,i){var o={},n=i||p(e),r=e.offsetWidth,s=e.offsetHeight,a=n.top,l=n.left,c=t.pageY||t.clientY,u=t.pageX||t.clientX;return t.changedTouches&&(u=t.changedTouches[0].pageX,c=t.changedTouches[0].pageY),o.y=Math.max(0,Math.min(1,(a-c+s)/s)),o.x=Math.max(0,Math.min(1,(u-l)/r)),o}function d(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=document.createElement("script");if(n.onload=n.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof t&&t(),n.onload=n.onreadystatechange=null,n.parentNode&&!o&&n.parentNode.removeChild(n))},i)for(var r in i)if(i.hasOwnProperty(r)){var s=i[r];null===s?n.removeAttribute(s):n.setAttribute(r,s)}n.src=e,document.getElementsByTagName("head")[0].appendChild(n)}function f(){var e=document,t=e.documentElement,i=e.body;return{width:t&&t.clientWidth||i&&i.offsetWidth||window.innerWidth||0,height:t&&t.clientHeight||i&&i.offsetHeight||window.innerHeight||0}}t.__esModule=!0,t.on=i,t.off=o,t.createEl=n,t.get=r,t.addClass=s,t.removeClass=a,t.toggleClass=l,t.hasClass=c,t.findElPosition=p,t.getPointerPosition=h,t.loadScript=d,t.getViewportSize=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(){return E++}function r(e,t,i){t.guid||(t.guid=n());var o=function(){t.apply(e,arguments)};return o.guid=i?i+"_"+t.guid:t.guid,o}function s(e){if(e instanceof Array)return 0===e.length;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function a(e){e|=0;var t=3600,i=60,o=e/t|0,n=(e-o*t)/i|0,r=e-o*t-n*i;return o=o>0?o+":":"",n=n>0?n+":":"00:",r=r>0?r+"":o.length>0||n.length>0?"00":"00:00",o=2==o.length?"0"+o:o,n=2==n.length?"0"+n:n,r=1==r.length?"0"+r:r,o+n+r}function l(e){h.__isFullscreen=!!document[_.fullscreenElement],h.__isFullscreen||(I.IS_X5TBS&&w.off(h.player.video.el,"x5videoexitfullscreen",c),w.off(document,_.fullscreenchange,l)),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:h.__isFullscreen}},h.player)}function c(e){"x5videoexitfullscreen"===e.type&&(h.__isFullscreen=!1,w.off(document,_.fullscreenchange,l),w.off(h.player.video.el,"x5videoexitfullscreen",c),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!1}},h.player))}function u(e){"webkitbeginfullscreen"==e.type?(w.off(h.player.video.el,"webkitbeginfullscreen",u),w.on(h.player.video.el,"webkitendfullscreen",u),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!0}},h.player)):"webkitendfullscreen"==e.type&&(w.off(h.player.video.el,"webkitendfullscreen",u),M.pub({type:b.MSG.FullScreen,src:"util",ts:e.timeStamp,detail:{isFullscreen:!1}},h.player))}function p(e){27===e.keyCode&&h(h.player,!1)}function h(e,t,i){if("undefined"==typeof t)return h.__isFullscreen||!1;var o=e.options.systemFullscreen;h.player=e,_.requestFullscreen?t?(I.IS_X5TBS&&w.on(e.video.el,"x5videoexitfullscreen",c),w.on(document,_.fullscreenchange,l),i&&i[_.requestFullscreen]()):document[_.exitFullscreen]():o&&e.video.el.webkitEnterFullScreen?(w.on(e.video.el,"webkitbeginfullscreen",u),t?e.video.el.webkitEnterFullScreen():e.video.el.webkitExitFullscreen()):(h.__isFullscreen=t,h.__isFullscreen?(h.__origOverflow=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden",w.on(document,"keydown",p)):(document.documentElement.style.overflow=h.__origOverflow,w.off(document,"keydown",p)),w.toggleClass(document.body,"vcp-full-window",t),M.pub({type:b.MSG.FullScreen,src:"util",detail:{isFullscreen:h.__isFullscreen}},h.player))}function d(e){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;oa)return-1}return-1}function v(e){return e.replace(/&/g,"&").replace(//g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/")}function A(e){var t="unknown";return e.isFormat("rtmp")?t="rtmp":e.isFormat("flv")?t="flv":e.isFormat("m3u8")?t="m3u8":e.isFormat("mp4")&&(t="mp4"),t}function m(e,t){e=e.replace(/^(http|https):/,"");var i=window.location.protocol;return"http:"!=i&&"https:"!=i&&(i=t||"https:"),e=i+e}t.__esModule=!0,t.supportStyle=t.console=t.VideoType=t.CDNPath=t.FullscreenApi=void 0,t.guid=n,t.bind=r,t.isEmpty=s,t.convertTime=a,t.doFullscreen=h,t.extend=d,t.store=f,t.compareVersion=y,t.escapeHTML=v,t.getFormat=A,t.unifyProtocol=m;for(var g=i(2),w=o(g),b=i(4),M=o(b),S=i(1),I=o(S),E=1,_=t.FullscreenApi={requestFullscreen:null,exitFullscreen:null,fullscreenElement:null,fullscreenEnabled:null,fullscreenchange:null,fullscreenerror:null},T=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],D=T[0],L=void 0,C=0;C10||O.IOS_VERSION>10)&&"system"==this.options.controls||(this.bigplay=new b["default"](this),this.bigplay.render(this.el));var n=void 0;n=!(this.options.controls&&"default"!=this.options.controls&&(!this.options.flash||"system"!=this.options.controls)),n&&(this.panel=new g["default"](this),this.panel.render(this.el)),this.setup()},e.prototype.verifyOptions=function(){return O.IE_VERSION&&x.compareVersion(O.IE_VERSION,"8.0")==-1?(this.errortips.show({code:5}),!1):!!this.options.src||(this.options.videoSource.hasUrl()?O.IS_IE||!O.IS_ENABLED_FLASH?this.errortips.show({code:5}):this.errortips.show({code:5}):this.errortips.show({code:12}),!1)},e.prototype.size=function(e,t,i){i=i||"cover";var o=/^\d+\.?\d{0,2}%$/,n=void 0,r=void 0;if(o.test(e)||o.test(t))n=e,r=t;else{var s=this.video?this.video.videoWidth():this.options.width,a=this.video?this.video.videoHeight():this.options.height;if(n=e,r=t,s&&a){var l=s/a;"fit"==i&&(n=e,r=n/l,r>t&&(n*=t/r,r=t))}var c=P.getViewportSize();c.width>0&&n>c.width&&(n=c.width)}n+=o.test(n)?"":"px",r+=o.test(r)?"":"px",this.el.style.width=n,this.el.style.height=r,this.video&&(this.video.width(n),this.video.height(r)),this.width=n,this.height=r},e.prototype.setup=function(){if(this.__handleEvent=x.bind(this,this.handleEvent),O.IS_MOBILE){if(this.options.autoplay){var e=this;document.addEventListener("WeixinJSBridgeReady",function(){e.play()})}}else this.loading.show()},e.prototype.destroy=function(){this.video&&this.video.destroy(),this.panel&&this.panel.destroy(),this.bigplay&&this.bigplay.destroy(),this.loading&&this.loading.destroy(),d.unsub("*","*",this.handleMsg,this),this.video=this.panel=this.bigplay=this.loading=null,this.el.parentNode.removeChild(this.el)},e.prototype.setListener=function(e){this.listener=e},e.prototype.handleEvent=function(e){switch(e.type){case"mousemove":if(this.__lastmove&&new Date-this.__lastmove<100)break;var t=this;if(this.__movecnt=this.__movecnt||0,this.__movecnt++,this.__movecnt<5){setTimeout(function(){t.__movecnt=0},500);break}this.__movecnt=0,this.__lastmove=+new Date,clearTimeout(this.__moveid),t.panel&&t.panel.show(),this.__moveid=setTimeout(function(){t.playing()&&t.panel&&t.panel.hide()},3e3)}},e.prototype.handleMsg=function(e){switch(e.type){case C.Load:P.removeClass(this.el,"vcp-playing"),("none"===this.options.preload||this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1)&&this.loading.hide();break;case C.Play:if(!this.playing())break;!this.hasPlay&&this.options.flash&&(this.mtaReport.reportFlash(),this.hasPlay=!0),P.addClass(this.el,"vcp-playing"),this.video.type()==x.VideoType.RTMP&&(this.__wait=!0,this.loading.show()),P.on(this.el,"mousemove",this.__handleEvent);break;case C.Playing:this.loading.hide();break;case C.TimeUpdate:this.__wait&&(this.__wait=!1,this.loading.hide());break;case C.Pause:P.off(this.el,"mousemove",this.__handleEvent),P.removeClass(this.el,"vcp-playing");break;case C.Ended:P.off(this.el,"mousemove",this.__handleEvent),this.panel&&this.panel.show(),P.removeClass(this.el,"vcp-playing");break;case C.MetaLoaded:this.loading.hide(),this.mtaReport.report(),this.size(this.options.width,this.options.height);break;case C.Seeking:this.loading.show();break;case C.Seeked:this.loading.hide();break;case C.FullScreen:var t=this;setTimeout(function(){P.toggleClass(t.el,"vcp-fullscreen",e.detail.isFullscreen)},0);break;case C.Error:this.loading.hide(),this.errortips.show(e.detail),this.panel&&this.panel.show();try{var i=this.options.videoSource,o=x.getFormat(i);O.IS_X5TBS?MtaH5.clickStat("x5_err",{format:o}):MtaH5.clickStat("error",{format:o})}catch(e){}}!e["private"]&&this.listener&&this.listener(e)},e.prototype.currentTime=function(e){return this.video.currentTime(e)},e.prototype.duration=function(){return this.video.duration()},e.prototype.percent=function(e){return this.video.duration()?"undefined"==typeof e?this.video.currentTime()/this.video.duration():void this.video.currentTime(this.video.duration()*e):0},e.prototype.buffered=function(){return this.video.duration()?this.video.buffered()/this.video.duration():0},e.prototype.pause=function(){this.video.pause()},e.prototype.play=function(){var e;this.errortips.clear(),(e=this.video).play.apply(e,arguments)},e.prototype.togglePlay=function(){this.errortips.clear(),this.video.togglePlay()},e.prototype.stop=function(){this.video.stop()},e.prototype.mute=function(e){return this.video.mute(e)},e.prototype.volume=function(e){return this.video.volume(e)},e.prototype.fullscreen=function(e){return this.video.fullscreen(e)},e.prototype.load=function(e,t){this.errortips.clear(),this.loading.show(),this.video.load(e||this.options.src,t)},e.prototype.playing=function(){return this.video&&this.video.playing()},e.prototype.paused=function(){return this.video&&this.video.paused()},e}()},function(e,t,i){var o=i(7);"string"==typeof o&&(o=[[e.id,o,""]]);i(22)(o,{});o.locals&&(e.exports=o.locals)},function(e,t,i){t=e.exports=i(8)(),t.push([e.id,".vcp-player{position:relative;z-index:0;font-family:Tahoma,\\\\5FAE\\8F6F\\96C5\\9ED1,\\u5b8b\\u4f53,Verdana,Arial,sans-serif;background-color:#000}.vcp-player video{display:block;overflow:hidden}.vcp-fullscreen.vcp-player,.vcp-fullscreen video,body.vcp-full-window{width:100%!important;height:100%!important}body.vcp-full-window{overflow-y:auto}.vcp-full-window .vcp-player{position:fixed;left:0;top:0;z-index:2147483647}.vcp-pre-flash,.vcp-video{width:100%;height:100%}.vcp-pre-flash{z-index:999;background:#000;position:absolute;top:0;left:0}.vcp-controls-panel{position:absolute;bottom:0;width:100%;font-size:16px;height:3em;z-index:1000}.vcp-controls-panel.show{animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-controls-panel.hide{animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.vcp-panel-bg{width:100%;height:100%;position:absolute;left:0;top:0;background-color:#242424;opacity:.8;filter:alpha(opacity=80);z-index:1000}.vcp-playtoggle{cursor:pointer;position:relative;z-index:1001;width:3em;height:100%;float:left;background-image:url("+i(9)+");background-image:url("+i(10)+")\\0}.vcp-playtoggle:focus,.vcp-playtoggle:hover{background-color:#708090;opacity:.9;filter:alpha(opacity=90)}.touchable .vcp-playtoggle:hover{background-color:transparent;opacity:1}.vcp-playing .vcp-playtoggle{background-image:url("+i(11)+");background-image:url("+i(12)+")\\0}.vcp-bigplay{width:100%;height:80%;position:absolute;background-color:white\\0;filter:alpha(opacity=0);opacity:0;z-index:1000;top:0;left:0}.vcp-slider{position:relative;z-index:1001;float:left;background:#c4c4c4;height:10px;opacity:.8;filter:alpha(opacity=80);cursor:pointer}.vcp-slider .vcp-slider-track{width:0;height:100%;margin-top:0;opacity:1;filter:alpha(opacity=100);background-color:#1e90ff}.vcp-slider .vcp-slider-thumb{cursor:pointer;background-color:#fff;position:absolute;top:0;left:0;border-radius:1em!important;height:10px;margin-left:-5px;width:10px}.vcp-slider-vertical{position:relative;width:.5em;height:8em;top:-5.6em;z-index:1001;background-color:#1c1c1c;opacity:.9;filter:alpha(opacity=90);cursor:pointer}.vcp-slider-vertical .vcp-slider-track{background-color:#1275cf;width:.5em;height:100%;opacity:.8;filter:alpha(opacity=80)}.vcp-slider-vertical .vcp-slider-thumb{cursor:pointer;position:absolute;background-color:#f0f8ff;width:.8em;height:.8em;border-radius:.8em!important;margin-top:-.4em;top:0;left:-.15em}.vcp-timeline{top:-10px;left:0;height:10px;position:absolute;z-index:1001;width:100%}.vcp-timeline .vcp-slider-thumb{top:-4px}.vcp-timeline .vcp-slider{margin-top:8px;height:2px;width:100%}.vcp-timeline:hover .vcp-slider{margin-top:0;height:10px}.vcp-timeline:hover .vcp-slider-thumb{display:block;width:16px;height:16px;top:-3px;margin-left:-8px}.vcp-timelabel{display:inline-block;line-height:3em;float:left;color:#fff;padding:0 9px}.vcp-timelabel,.vcp-volume{height:3em;z-index:1001;position:relative}.vcp-volume{width:3em;cursor:pointer;float:right;background-color:transparent;opacity:.9;filter:alpha(opacity=90)}.vcp-volume-icon{background-image:url("+i(13)+");background-image:url("+i(14)+")\\0;display:inline-block;width:3em;height:3em;position:absolute;left:0;top:0}.vcp-volume-muted .vcp-volume-icon{background-image:url("+i(15)+");background-image:url("+i(16)+")\\0}.vcp-volume .vcp-slider-vertical{top:-8.4em;left:1em;display:none}.vcp-volume .vcp-slider-track{position:absolute;bottom:0}.vcp-volume:hover .vcp-slider-vertical{display:block}.vcp-volume .vcp-volume-bg{height:8.8em;width:2em;position:absolute;left:.25em;top:-8.8em;background:#242424;display:none}.vcp-volume:hover .vcp-slider-vertical,.vcp-volume:hover .vcp-volume-bg{display:block}.vcp-fullscreen-toggle{position:relative;width:3em;height:3em;float:right;cursor:pointer;z-index:1001;background-image:url("+i(17)+");background-image:url("+i(18)+")\\0}.vcp-fullscreen .vcp-fullscreen-toggle{background-image:url("+i(19)+");background-image:url("+i(20)+')\\0}.vcp-loading{box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;text-indent:-9999em}.vcp-loading:before{box-sizing:inherit;content:"";display:block;width:100%;height:100%;border-radius:50%;border:3px solid hsla(0,0%,100%,0);border-left-color:#fff;border-right-color:#fff;transform:translateZ(0);animation:load8 1.1s infinite linear}@keyframes load8{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.vcp-poster{position:absolute;left:0;top:0;overflow:hidden;z-index:1000;width:100%;height:100%;display:none}.vcp-poster-pic{position:relative}.vcp-poster-pic.cover,.vcp-poster-pic.default{left:50%;top:50%;transform:translate(-50%,-50%)}.vcp-poster-pic.cover{width:100%}.vcp-poster-pic.stretch{width:100%;height:100%}.vcp-error-tips{position:absolute;z-index:1001;width:100%;height:4.5em;left:0;top:50%;color:#ff4500;margin-top:-5.25em;text-align:center;display:none}.vcp-clarityswitcher{height:3em;width:3em;cursor:pointer;position:relative;z-index:1001;float:right;background-color:transparent;opacity:.9}.vcp-vertical-switcher-container{width:3em;position:absolute;left:0;bottom:2.4em;background:#242424;display:none}.vcp-vertical-switcher-current{display:block;color:#fff;text-align:center;line-height:3em}.vcp-vertical-switcher-item{display:block;color:#fff;text-align:center;line-height:2em}.vcp-vertical-switcher-item.current{color:#888}.vcp-share>a{width:3em;height:3em;cursor:pointer;background-image:url('+i(21)+");opacity:.9;display:block}.vcp-share{width:3em;height:3em;position:relative;float:right;z-index:1001}.vcp-vertical-share-container{width:auto;height:auto;position:absolute;background:rgba(36,36,36,.8);padding:.5em;overflow:hidden;display:none}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fadeOut{animation:fadeOut ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fadeIn{animation:fadeIn ease .8s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&g.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",r(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",r(e,t),t}function c(e,t){var i,o,n;if(t.singleton){var r=m++;i=A||(A=a(t)),o=u.bind(null,i,r,!1),n=u.bind(null,i,r,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=l(t),o=h.bind(null,i),n=function(){s(i),i.href&&URL.revokeObjectURL(i.href)}):(i=a(t),o=p.bind(null,i),n=function(){s(i)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}function u(e,t,i,o){var n=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,n);else{var r=document.createTextNode(n),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function p(e,t){var i=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function h(e,t){var i=t.css,o=t.sourceMap;o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var n=new Blob([i],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}var d={},f=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},y=f(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),v=f(function(){return document.head||document.getElementsByTagName("head")[0]}),A=null,m=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=y()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var i=n(e);return o(i,t),function(e){for(var r=[],s=0;s0?f.console.error("加载视频文件超时"):f.console.error("无法加载视频文件,请检查网络,以及视频文件是否允许跨域请求访问,m3u8文件是否存在 "+(t.response&&t.response.status?"netstatus:"+t.response.status:"")),this.notify({type:"error",code:2,timeStamp:+new Date}),r.startLoad();break;case Hls.ErrorTypes.MEDIA_ERROR:r.recoverMediaError();break;default:r.destroy()}},t.prototype.__webrtcLoaded=function(e){this.hls&&(this.hls.stopLoad(),this.hls.detachMedia()),this.flv&&(this.flv.detachMediaElement(),this.flv.destroy());var t=this,i=this.player.options.webrtcConfig,o=new TXLivePlayer;o.setPlayerView(this.el),i&&i.streamType?"video"===i.streamType?o.setConfig({receiveVideo:!0,receiveAudio:!1}):"audio"===i.streamType?o.setConfig({receiveVideo:!1,receiveAudio:!0}):o.setConfig({receiveVideo:!0,receiveAudio:!0}):o.setConfig({receiveVideo:!0,receiveAudio:!0}),o.startPlay(e),o.setPlayListener({onPlayEvent:function(e,i){if(1006===e){var o={type:"webrtcstop",timeStamp:+new Date};return t.notify(o),!1}if(1009===e){var o={type:"webrtcwaitstart",timeStamp:+new Date};return t.notify(o),!1}if(1010===e){var o={type:"webrtcwaitend",timeStamp:+new Date};return t.notify(o),!1}var o={type:"error"};return e===-2001&&(o.code=2001),e===-2002&&(o.code=2002),e===-2004&&(o.code=2003),e===-2005?(t.__convertProtocol(t.options.src,t.options.m3u8?f.VideoType.M3U8:""),!1):void(o.code&&(i&&(o.reason=i.message),o.timeStamp=+new Date,t.notify(o)))},onPlayStats:function(e){t.notify({type:y.MSG.WebRTCStatUpdate,detail:e,timeStamp:+new Date})}}),this.webrtc=o},t.prototype.__flvLoaded=function(e){if(!flvjs.isSupported())return this.notify({type:"error",code:5,timeStamp:+new Date});this.hls&&(this.hls.stopLoad(),this.hls.detachMedia()),this.flv&&(this.flv.detachMediaElement(),this.flv.destroy()),this.webrtc&&this.webrtc.stopPlay();var t=flvjs.createPlayer(Object.assign({type:"flv",isLive:this.player.options.live,url:e},this.options.flvConfig));t.attachMediaElement(this.el),t.on(flvjs.Events.ERROR,f.bind(this,function(e,t,i){var o={type:"error"};e==flvjs.ErrorTypes.NETWORK_ERROR&&(o.code=2),e==flvjs.ErrorTypes.MEDIA_ERROR&&(o.code=1002),e==flvjs.ErrorTypes.OTHER_ERROR,o.timeStamp=+new Date,this.notify(o)})),t.on(flvjs.Events.MEDIA_INFO,f.bind(this,function(e,t){})),t.on(flvjs.Events.STATISTICS_INFO,f.bind(this,function(e,t){})),this.flv=t,t.load()},t.prototype.setup=function(){this.playState=A.PlayStates.IDLE,this.seekState=A.SeekStates.IDLE,this.metaDataLoaded=!1,this.__timebase=+new Date,this.on(y.MSG.MetaLoaded,this.notify),this.on(y.MSG.Loaded,this.notify),this.on(y.MSG.Progress,this.notify),this.on(y.MSG.Play,this.notify),this.on(y.MSG.Playing,this.notify),this.on(y.MSG.Pause,this.notify),this.on(y.MSG.Error,this.notify),this.on(y.MSG.TimeUpdate,this.notify),this.on(y.MSG.Ended,this.notify),this.on(y.MSG.Seeking,this.notify),this.on(y.MSG.Seeked,this.notify),this.on(y.MSG.VolumeChange,this.notify),this.on("durationchange",this.notify),this.load(this.options.src,this.options.m3u8?f.VideoType.M3U8:"")},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.hls&&this.hls.destroy(),this.flv&&this.flv.destroy()},t.prototype.notify=function(e){var t={type:e.type,src:this,ts:+new Date,timeStamp:e.timeStamp};switch(e.type){case y.MSG.MetaLoaded:this.metaDataLoaded=!0;break;case y.MSG.Error:var i={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"};t.detail=this.el&&this.el.error||{code:e.code},t.detail.reason=i[t.detail.code]||e.reason;break;case y.MSG.Ended:this.pause(),this.playState=A.PlayStates.STOP;break;case"durationchange":0!=this.videoHeight()&&(t.type=y.MSG.Resize);break;case y.MSG.Playing:this.playState=e.type.toUpperCase();break;case y.MSG.Pause:this.playState=A.PlayStates.PAUSED;break;case y.MSG.Seeking:case y.MSG.Seeked:this.seekState=e.type.toUpperCase();break;case y.MSG.WebRTCStatUpdate:t.detail=e.detail}"timeupdate"!=e.type,this.pub(t)},t.prototype.videoWidth=function(){return this.el.videoWidth},t.prototype.videoHeight=function(){return this.el.videoHeight},t.prototype.width=function(e){return e?void(this.el.style.width=e):this.el.width},t.prototype.height=function(e){return e?void(this.el.style.height=e):this.el.height},t.prototype.play=function(){this.options.hlsConfig&&this.options.hlsConfig.autoStartLoad===!1&&this.hls&&this.hls.startLoad(-1),this.el.play()},t.prototype.togglePlay=function(){this.paused()?this.play():this.pause()},t.prototype.pause=function(){this.el.pause()},t.prototype.stop=function(){this.el.pause(),this.el.currentTime=0},t.prototype.paused=function(){return this.el.paused},t.prototype.buffered=function(){return this.el.buffered.length>=1?this.el.buffered.end(this.el.buffered.length-1):0},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.currentTime:this.el.currentTime=e},t.prototype.duration=function(){return this.el.duration||0},t.prototype.mute=function(e){return"undefined"==typeof e?this.el.muted:(this.volume(e?0:this.__lastVol),this.el.muted=e)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el.volume:(e<0&&(e=0),e>1&&(e=1),0!=e&&(this.__lastVol=e),this.el.muted=0==e,this.options.volume=e,this.el.volume=e)},t.prototype.fullscreen=function(e){return f.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){var i=this,o=e.indexOf("webrtc://")>-1||e.indexOf(".sdp")>-1;this.pub({type:y.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}}),o?g.IS_ENABLED_WEBRTC.then(function(o){o?"undefined"==typeof window.TXLivePlayer?h.loadScript(f.unifyProtocol("https://cloudcache.tencent-cloud.com/open/qcloud/live/webrtc/js/TXLivePlayer-1.1.0.min.js"),function(){i.__webrtcLoaded.call(i,e)}):i.__webrtcLoaded(e):i.__convertProtocol(e,t)})["catch"](function(o){i.__convertProtocol(e,t)}):this.__load(e,t)},t.prototype.__convertProtocol=function(e,t){g.IS_ENABLED_MSE?g.IS_MOBILE?(e.indexOf(".sdp")>-1?e=e.replace(".sdp",".m3u8"):(e=e.replace("webrtc://","https://").replace("?",".m3u8?"),e.indexOf("?")===-1&&e.indexOf(".m3u8")===-1&&(e+=".m3u8")),this.__load(e,t)):(e.indexOf(".sdp")>-1?e=e.replace(".sdp",".flv"):(e=e.replace("webrtc://","https://").replace("?",".flv?"),e.indexOf("?")===-1&&e.indexOf(".flv")===-1&&(e+=".flv")),this.__load(e,t)):this.notify({type:"error",code:2e3,timeStamp:+new Date})},t.prototype.__load=function(e,t){var i=e.indexOf(".m3u8")>-1||t==f.VideoType.M3U8,o=e.indexOf(".flv")>-1;if(!g.IS_ENABLED_MSE||!i&&!o||g.IS_X5TBS&&this.player.options.x5_player||i&&g.IS_MAC&&g.IS_SAFARI&&!g.IS_IOS)this.hls&&(this.hls.stopLoad(),this.hls.detachMedia()),this.flv&&(this.flv.unload(),this.flv.detachMediaElement()),this.__type=t,this.el.src=e;else{var n=this,r=w[this.options.hls]||w["0.7.1"];i?(this.__type=f.VideoType.M3U8,"undefined"==typeof window.Hls?h.loadScript(f.unifyProtocol(f.CDNPath+r),function(){n.__hlsLoaded.call(n,e)}):this.__hlsLoaded(e)):o&&(this.__type=f.VideoType.FLV,"undefined"==typeof window.flvjs?h.loadScript(f.unifyProtocol(f.CDNPath+"libs/flv.min.1.5.js"),function(){n.__flvLoaded.call(n,e)}):this.__flvLoaded(e))}},t.prototype.playing=function(){return!this.el.paused},t.prototype.type=function(){return this.__type},t}(u["default"]);t["default"]=b},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return t+"_"+e}function s(e,t){return t.guid&&String(t.guid).indexOf("_")==-1?e+"_"+t.guid:t.guid}t.__esModule=!0;var a=i(2),l=o(a),c=i(3),u=o(c),p=i(4),h=o(p),d=i(1),f=o(d),y=function(){function e(t,i){n(this,e),this.name=i,this.player=t,this.options=t.options,this.fnCache={},this.guid=u.guid()}return e.prototype.createEl=function(e,t,i){return this.el=l.createEl(e,t,i)},e.prototype.render=function(e){return e&&this.el&&(this.owner=e,e.appendChild(this.el),this.setup()),this.el},e.prototype.on=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),this.cbs=this.cbs||{};var o=s(this.guid,i),n=!o,a=o&&!this.fnCache[o];return n||a?(i=u.bind(this,i,this.guid),this.fnCache[i.guid]=i,o=i.guid):i=this.fnCache[o],l.on(e,t,i),this.cbs[r(o,t)]={guid:o,el:e,type:t},i},e.prototype.off=function(e,t,i){"string"==typeof e&&(i=t,t=e,e=this.el),f.IS_MOBILE&&"click"==t&&(t="touchend");var o=s(this.guid,i);this.fnCache[o]&&(i=this.fnCache[o]),l.off(e,t,i),delete this.cbs[r(o,t)]},e.prototype.pub=function(e){var t=this;setTimeout(function(){h.pub(e,t.player)},0)},e.prototype.sub=function(e,t,i){h.sub(e,t,i,this.player)},e.prototype.unsub=function(e,t,i){h.unsub(e,t,i,this.player)},e.prototype.handleMsg=function(){}, +e.prototype.setup=function(){},e.prototype.destroy=function(){if(this.handleMsg&&this.unsub("*","*",this.handleMsg),this.cbs){for(var e in this.cbs)if(this.cbs.hasOwnProperty(e)){var t=this.cbs[e];l.off(t.el,t.type,this.fnCache[t.guid]),delete this.cbs[e]}this.fnCache=null,this.cbs=null;try{this.el.parentNode.removeChild(this.el)}catch(e){}}},e}();t["default"]=y},function(e,t){"use strict";t.__esModule=!0;t.PlayStates={IDLE:"IDLE",PLAYING:"PLAYING",PAUSED:"PAUSED",STOP:"STOP"},t.SeekStates={IDLE:"IDLE",SEEKING:"SEEKING",SEEKED:"SEEKED"},t.ControlsStates={DEFAULT:"default",NONE:"none",SYSTEM:""}},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return window.document[e]?window.document[e]:navigator.appName.indexOf("Microsoft Internet")!=-1?document.getElementById(e):document.embeds&&document.embeds[e]?document.embeds[e]:void 0}t.__esModule=!0;var c=i(24),u=n(c),p=i(4),h=i(2),d=o(h),f=i(3),y=o(f),v=i(25),A=o(v),m=i(1),g=o(m),w=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"FlashVideo")),n="vcpFlashCB_"+o.guid;return o.__flashCB=n,window[n]||(window[n]=function(e,t){t=t&&t[0];var i=window[n].fnObj&&window[n].fnObj[t.objectID];i&&i(e,t)},window[n].fnObj={}),o}return a(t,e),t.prototype.render=function(e){this.__timebase=+new Date;var t=this.player.options,i=y.unifyProtocol(t.flashUrl||"//cloudcache.tencent-cloud.com/open/qcloud/video/player/release/QCPlayer.swf"),o="opaque",n="obj_vcplayer_"+this.player.guid,r=this.__flashCB;this.__id=n;var s=d.createEl("div",{class:"vcp-video"});s.innerHTML='\n\t\t\n \n \n \n \n \n \n \n \n\n \n \n \n\t\t',this.container=s,this.owner=e,this.owner.appendChild(s),this.cover=d.createEl("div",{class:"vcp-pre-flash"}),this.owner.appendChild(this.cover),window[this.__flashCB].fnObj[this.__id]=y.bind(this,this.notify)},t.prototype.setup=function(){this.on("error",this.notify),this.playState=A.PlayStates.IDLE,this.seekState=A.SeekStates.IDLE,this.metaDataLoaded=!1},t.prototype.doPolling=function(){this.options.live||(clearInterval(this.__timer),this.__timer=setInterval(this.interval.bind(this),1e3))},t.prototype.endPolling=function(){clearInterval(this.__timer)},t.prototype.interval=function(){var e;try{e=this.el.getState()}catch(e){return void this.endPolling()}if(this.__m3u8){var t=this.currentTime()+e.bufferLength;this.__buffered!==t&&(this.__buffered=t,this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__buffered>=this.duration()&&this.endPolling()}else this.__rtmp||(this.__bytesloaded!=e.bytesLoaded&&(this.__bytesloaded=e.bytesLoaded,this.pub({type:p.MSG.Progress,src:this,ts:+new Date})),this.__bytesloaded>=this.__bytesTotal&&this.endPolling())},t.prototype.destroy=function(){"undefined"!=typeof this.el&&"undefined"!=typeof this.el.destroy&&this.el.destroy(),this.endPolling(),delete window[this.__flashCB].fnObj[this.__id],e.prototype.destroy.call(this)},t.prototype.notify=function(e,t){var i={type:e,ts:+new Date};try{switch(this.options.debug&&this.pub({type:i.type,src:this,ts:i.ts,detail:y.extend({debug:!0},t)}),i.type){case"ready":if(this.el=l(this.__id),this.setup(),g.IS_FIREFOX){var o=this;setTimeout(function(){o.el.setAutoPlay(!!o.options.autoplay),o.__timebase=new Date-t.time,o.load(o.options.src)},0)}else{try{this.el.setAutoPlay(!!this.options.autoplay)}catch(e){console.warn("Flash 调用失败,请检查Flash是否启用成功")}this.__timebase=new Date-t.time,this.load(this.options.src)}return;case"metaData":i.type=p.MSG.MetaLoaded,this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,this.__duration=t.duration,this.__bytesTotal=t.bytesTotal,this.__prevPlayState=null,this.__m3u8=t.type===y.VideoType.M3U8,this.__rtmp=t.type===y.VideoType.RTMP,this.__type=t.type,this.__metaloaded=!0,this.metaDataLoaded=!0,this.doPolling();var o=this;if(!o.cover)break;setTimeout(function(){o.cover&&(o.owner.removeChild(o.cover),o.cover=null)},500);break;case"playState":this.playState=t.playState,t.playState==A.PlayStates.PLAYING?(this.__playing=!0,this.__stopped=!1,i.type=p.MSG.Play):t.playState==A.PlayStates.PAUSED?(this.__playing=!1,this.__stopped=!1,i.type=p.MSG.Pause):t.playState==A.PlayStates.STOP?(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended,this.__prevPlayState=null,this.options.live&&(this.metaDataLoaded=!1)):t.playState==A.PlayStates.IDLE&&(this.__playing=!1,this.__stopped=!0,i.type=p.MSG.Ended);break;case"seekState":if(this.seekState=t.seekState,!this.__metaloaded)return;if(t.seekState==A.SeekStates.SEEKING)i.type=p.MSG.Seeking;else{if(t.seekState!=A.SeekStates.SEEKED)return;this.__m3u8||this.options.live||t.playState!=A.PlayStates.STOP||(this.play(),this.__prevPlayState=t.playState),this.__m3u8&&(i.type=p.MSG.Seeked)}break;case"netStatus":this.options.live||("NetStream.Buffer.Full"==t.code?(this.__prevPlayState==A.PlayStates.PAUSED||this.__prevPlayState==A.PlayStates.STOP,this.__prevPlayState=null,i.type=p.MSG.Seeked):"NetStream.Seek.Complete"==t.code),"NetConnection.Connect.Closed"==t.code&&(this.options.src.indexOf("rtmp://")>-1?this.playState==A.PlayStates.STOP?(i.type="error",t={code:13,reason:t.code}):(i.type="error",t={code:1002,reason:t.code}):this.playState=A.PlayStates.IDLE),"NetStream.Play.Stop"!=t.code&&"NetConnection.Connect.Success"!=t.code&&"NetConnection.Connect.Failed"!=t.code||(this.playState=A.PlayStates.IDLE);break;case"mediaTime":this.__videoWidth=t.videoWidth,this.__videoHeight=t.videoHeight,i.type=p.MSG.TimeUpdate;break;case"error":if("NetStream.Seek.InvalidTime"==t.code)return this.currentTime(t.details),!1;"NetStream.Play.StreamNotFound"==t.code&&this.pub({type:"netStatus",src:this,ts:i.ts,detail:t});var n=isNaN(parseInt(t.code))?1002:t.code,r=isNaN(parseInt(t.code))?t.code:t.msg,s=r.match(/#(\d+)/);s&&s[1]&&(n=s[1]),t={code:n,reason:r||""},this.metaDataLoaded=!1}var a="printLog"==e||"canPlay"==e;!a&&this.pub({type:i.type,src:this,ts:i.ts,detail:t})}catch(t){y.console.error(e+" "+i.type,t)}},t.prototype.handleMsg=function(e){},t.prototype.videoWidth=function(){return this.__videoWidth},t.prototype.videoHeight=function(){return this.__videoHeight},t.prototype.width=function(e){return"undefined"==typeof e?this.el&&this.el.width:(e="100%",this.el&&(this.el.width=e))},t.prototype.height=function(e){return"undefined"==typeof e?this.el&&this.el.height:(e="100%",this.el&&(this.el.height=e))},t.prototype.play=function(e){this.playState==A.PlayStates.PAUSED||this.playState==A.PlayStates.PLAYING||e?this.el.playerResume():this.playState!=A.PlayStates.PLAYING&&this.el.playerPlay()},t.prototype.togglePlay=function(){if(this.metaDataLoaded)if(this.playState==A.PlayStates.PAUSED)this.el.playerResume();else if(this.playState==A.PlayStates.PLAYING)this.el.playerPause();else if(this.playState==A.PlayStates.STOP)this.currentTime(0),this.el.playerResume();else try{this.el.playerPlay()}catch(e){console.warn("Flash 调用失败,请检查Flash是否启用成功")}else this.player.load()},t.prototype.pause=function(){this.el.playerPause()},t.prototype.stop=function(){this.el.playerStop()},t.prototype.paused=function(){return!this.__playing},t.prototype.buffered=function(){var e;return this.__m3u8?this.__buffered||0:(e=(this.__bytesloaded||0)/(this.__bytesTotal||1),this.duration()*e)},t.prototype.currentTime=function(e){return"undefined"==typeof e?this.el.getPosition():void this.el.playerSeek(e)},t.prototype.duration=function(){return this.__duration},t.prototype.mute=function(e){return"undefined"==typeof e?0==this.volume():void this.volume(e?0:this.__lastVol)},t.prototype.volume=function(e){return"undefined"==typeof e?this.el&&this.el.getState().volume:(this.el&&this.el.playerVolume(e),0!=e&&(this.__lastVol=e),this.options.volume=e,void this.pub({type:p.MSG.VolumeChange,src:this,ts:+new Date}))},t.prototype.fullscreen=function(e){return y.doFullscreen(this.player,e,this.owner)},t.prototype.load=function(e,t){this.pub({type:p.MSG.Load,src:this,ts:+new Date,detail:{src:e,type:t}}),this.el&&this.el.playerLoad(e)},t.prototype.playing=function(){return this.el&&this.el.getState&&this.el.getState().playState===A.PlayStates.PLAYING},t.prototype.type=function(){return this.__type},t.prototype.state=function(){return this.playState},t}(u["default"]);t["default"]=w},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(28),p=n(u),h=i(29),d=n(h),f=i(30),y=i(31),v=n(y),A=i(32),m=n(A),g=i(33),w=n(g),b=i(34),M=n(b),S=i(4),I=i(2),E=o(I),_=i(3),T=o(_),D=i(1),L=o(D),C=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Panel"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-controls-panel"}),this.el.appendChild(E.createEl("div",{class:"vcp-panel-bg"})),this.playToggle=new p["default"](this.player),this.playToggle.render(this.el),this.timelabel=new m["default"](this.player),this.timelabel.render(this.el),this.timeline=new v["default"](this.player),this.timeline.render(this.el),this.options.fullscreenEnabled===!0&&(this.fullscreen=new d["default"](this.player),this.fullscreen.render(this.el)),L.IS_MOBILE||(this.volume=new w["default"](this.player),this.volume.render(this.el)),this.options.videoSource&&this.options.videoSource.definitions.length>1&&!L.IS_MOBILE&&(this.claritySwitcher=new M["default"](this.player),this.claritySwitcher.render(this.el)),e.prototype.render.call(this,t)},t.prototype.setup=function(){var e=T.bind(this,this.handleMsg);this.sub(f.MSG.Changing,this.volume,e),this.sub(f.MSG.Changed,this.timeline.progress,e),this.sub(S.MSG.TimeUpdate,this.player.video,e),this.sub(S.MSG.Progress,this.player.video,e),this.sub(S.MSG.MetaLoaded,this.player.video,e),this.sub(S.MSG.Pause,this.player.video,e),this.sub(S.MSG.Play,this.player.video,e),this.sub(S.MSG.Ended,this.player.video,e)},t.prototype.handleMsg=function(e){switch(e.type){case S.MSG.MetaLoaded:this.timeline.percent(this.player.percent()),this.timeline.buffered(this.player.buffered()),this.player.volume("undefined"==typeof this.options.volume?.5:this.options.volume),!this.options.autoplay&&this.show();break;case S.MSG.TimeUpdate:this.timeline.scrubbing||this.timeline.percent(this.player.percent());break;case S.MSG.Pause:this.show();break;case S.MSG.Play:this.hide();break;case S.MSG.Progress:this.timeline.buffered(this.player.buffered());break;case f.MSG.Changed:e.src===this.timeline.progress&&this.player.percent(this.timeline.percent());break;case S.MSG.Ended:this.show()}},t.prototype.toggle=function(){E.hasClass(this.el,"show")?this.hide():this.show()},t.prototype.show=function(){E.hasClass(this.el,"hide")&&(E.removeClass(this.el,"hide"),E.addClass(this.el,"show"))},t.prototype.hide=function(){E.removeClass(this.el,"show"),E.addClass(this.el,"hide")},t}(c["default"]);t["default"]=C},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),i(25)),f=(o(d),function(e){function t(i){return r(this,t),s(this,e.call(this,i,"PlayToggle"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-playtoggle"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.togglePlay()},t.prototype.handleMsg=function(e){console.log("@"+this.name,e)},t}(c["default"]));t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"FullscreenToggle"))}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-fullscreen-toggle"}),window.fsApi=d.FullscreenApi,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.on("click",this.onClick)},t.prototype.onClick=function(){this.player.fullscreen(!this.player.fullscreen())},t.prototype.handleMsg=function(e){console.log(t.name,e)},t}(c["default"]);t["default"]=f},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t.MSG=void 0;var l=i(24),c=n(l),u=i(2),p=o(u),h=i(4),d=(o(h),i(3)),f=(o(d),t.MSG={Changing:"sliderchanging",Changed:"sliderchanged"}),y=function(e){function t(i,o){r(this,t);var n=s(this,e.call(this,i,"Slider"));return n.vertical=o||!1,n}return a(t,e),t.prototype.render=function(t,i){var o=this.vertical?"vcp-slider-vertical":"vcp-slider";return this.createEl("div",{class:o}),this.track=p.createEl("div",{class:"vcp-slider-track"}),this.thumb=p.createEl("div",{class:"vcp-slider-thumb"}),this.el.appendChild(this.track),this.el.appendChild(this.thumb),this.enabled="undefined"==typeof i||i,e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.ownerDoc=document.body.ownerDocument,this.on("mousedown",this.mousedown),this.on("touchstart",this.mousedown))},t.prototype.handleMsg=function(e){},t.prototype.mousedown=function(e){return e.preventDefault&&e.preventDefault(),this.pos=p.findElPosition(this.el),this.on(this.ownerDoc,"mouseup",this.mouseup),this.on(this.ownerDoc,"mousemove",this.mousemove),this.on(this.ownerDoc,"touchend",this.mouseup),this.on(this.ownerDoc,"touchmove",this.mousemove),this.mousemove(e),!1},t.prototype.mouseup=function(e){e.target||e.srcElement;this.off(this.ownerDoc,"mouseup",this.mouseup),this.off(this.ownerDoc,"mousemove",this.mousemove),this.off(this.ownerDoc,"touchend",this.mouseup),this.off(this.ownerDoc,"touchmove",this.mousemove),this.pub({type:f.Changed,src:this,private:!0})},t.prototype.mousemove=function(e){var t=p.getPointerPosition(this.el,e,this.pos);this.vertical?(this.__percent=1-t.y,this.thumb.style.top=100*this.__percent+"%"):(this.__percent=t.x,this.thumb.style.left=100*this.__percent+"%"),this.__percent=Number(this.__percent.toFixed(3)),this.pub({type:f.Changing,src:this,private:!0})},t.prototype.percent=function(e){return e||0==e?(this.__percent=e,void(this.vertical?this.thumb.style.top=100*this.__percent+"%":this.thumb.style.left=100*this.__percent+"%")):this.__percent},t}(c["default"]);t["default"]=y},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(30),c=n(l),u=i(24),p=n(u),h=i(2),d=(o(h),i(3)),f=o(d),y=function(e){function t(i){return r(this,t),s(this,e.call(this,i,"Timeline"))}return a(t,e),t.prototype.render=function(t){return this.enabled=!this.options.live,this.createEl("div",{class:"vcp-timeline"}),this.progress=new c["default"](this.player,!1),this.progress.render(this.el,this.enabled),this.track=this.progress.track,this.enabled||(this.el.style.display="none"),e.prototype.render.call(this,t)},t.prototype.setup=function(){this.enabled&&(this.sub(l.MSG.Changing,this.progress,f.bind(this,this.handleMsg)),this.sub(l.MSG.Changed,this.progress,f.bind(this,this.handleMsg)))},t.prototype.handleMsg=function(e){e.type===l.MSG.Changing?(this.scrubbing=!0,this.syncLabel(this.percent())):e.type===l.MSG.Changed&&(this.scrubbing=!1)},t.prototype.syncLabel=function(e){var t=this.player.duration();e=Math.min(e,1);var i="";t&&(i=f.convertTime(e*t)+" / "+f.convertTime(t)),this.pub({type:"timelabel",src:"timeline",label:i,private:!0})},t.prototype.buffered=function(e){this.enabled&&(e=Math.min(e,1),this.__buffered=e,this.track.style.width=100*e+"%")},t.prototype.percent=function(e){if(this.enabled)return"undefined"==typeof e?this.progress.percent()||0:(e=Math.min(e,1),this.syncLabel(e),this.__buffered0&&this.__muted&&this.syncMute(!1)}},t.prototype.toggleMute=function(e){var t=!this.player.mute();this.player.mute(t)},t.prototype.syncMute=function(e){e?d.addClass(this.el,"vcp-volume-muted"):d.removeClass(this.el,"vcp-volume-muted"),this.__muted=e},t.prototype.syncTrack=function(e){this.track.style.height=100*e+"%",this.volume.percent(1-e)},t.prototype.percent=function(e){return"undefined"==typeof e?1-this.volume.percent()||0:(this.player.volume(e),e)},t}(p["default"]);t["default"]=A},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=o(u),h=i(3),d=o(h),f={od:"超清",hd:"高清",sd:"标清"},y=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ClaritySwitcher"));return f=d.extend({},i.options.clarityLabel,f),i.claritySwitcher=o,o}return a(t,e),t.prototype.render=function(t){this.show=!1,this.createEl("div",{class:"vcp-clarityswitcher"}),this.current=p.createEl("a",{class:"vcp-vertical-switcher-current"}),this.container=p.createEl("div",{class:"vcp-vertical-switcher-container"}),this.items=[],this.currentItem="";var i=this.options.videoSource;this.current.innerHTML=f[i.curDef],this.el.appendChild(this.current);for(var o=0;o10||v.IOS_VERSION>10)&&"system"==this.player.options.controls&&this.player.togglePlay()},t.prototype.handleMsg=function(e){switch(e.type){case A.MSG.Load:this.__loaded=!1,this.setPoster(this.poster.start);break;case A.MSG.MetaLoaded:if(this.__loaded=!0,!this.player.playing())break;this.hide();case A.MSG.Play:if(!this.__loaded)break;this.hide();break;case A.MSG.Pause:if(!this.__loaded)break;this.options.pausePosterEnabled===!0&&this.setPoster(this.poster.pause);break;case A.MSG.Ended:if(!this.__loaded)break;break;case A.MSG.Error:if(!this.__loaded)break}},t.prototype.setPoster=function(e){if(e=e||this.poster.src){this.__preload&&(this.__preload.onload=null),this.__preload=new Image;var t=this.__preload;this.hide();var i=this;t.onload=function(){if(i.pic.src!==t.src&&(i.pic.src=t.src,i.show(),!f.supportStyle("transform"))){var e="stretch"==i.poster.style;if(e)return;var o="cover"==i.poster.style?i.options.width/(t.width/t.height):t.height,n="-"+i.options.width/2+"px",r="-"+o/2+"px"; +i.pic.style.cssText="left: 50%; top: 50%; margin-left: "+n+"; margin-top: "+r+";"}},t.src=e}},t.prototype.toggle=function(e){clearTimeout(this.__tid);var t=this;this.__tid=setTimeout(function(){t.el.style.display=e},100)},t.prototype.hide=function(){this.__preload&&(this.__preload.onload=null),this.toggle("none")},t.prototype.show=function(){this.toggle("block")},t}(u["default"]);t["default"]=m},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=(o(h),function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"Loading"));return o.timeSeed=null,o}return a(t,e),t.prototype.render=function(t){return this.createEl("div",{class:"vcp-loading"}),e.prototype.render.call(this,t)},t.prototype.setup=function(){},t.prototype.handleMsg=function(e){},t.prototype.show=function(){if(this.options.showLoading!==!1){var e=500,t=this;this.timeSeed=setTimeout(function(){t.el.style.display="block"},e)}},t.prototype.hide=function(){this.timeSeed&&(clearTimeout(this.timeSeed),this.timeSeed=null),this.el.style.display="none"},t}(c["default"]));t["default"]=d},function(e,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t["default"]=e,t}function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var l=i(24),c=n(l),u=i(2),p=(o(u),i(4)),h=(o(p),i(3)),d=o(h),f={EnvError:"当前系统环境不支持播放该视频格式",EnvFlashError:"当前系统环境不支持播放该视频格式",VideoSourceError:"获取视频失败,请检查播放链接是否有效",NetworkError:"网络错误,请检查网络配置或者播放链接是否正确",VideoDecodeError:"视频解码错误",ArgumentError:"使用参数有误,请检查播放器调用代码",UrlEmpty:"请填写视频播放地址",FileProtocol:"请勿在file协议下使用播放器,可能会导致视频无法播放",LiveFinish:"直播已结束,请稍后再来",CrossDomainError:"无法加载视频文件,跨域访问被拒绝",Ie9IframeFullscreenError:"在IE9中用iframe引用的实例无法支持全屏",WebrtcEnvError:"当前环境不支持 WebRTC 格式文件播放",WebrtcApiError:"调用 WebRTC 接口失败",WebrtcPullStreamError:"调用拉流接口失败",WebrtcConnectError:"连接服务器失败,并且连接重试次数已超过设定值",WebrtcDecodeError:"WebRTC 解码失败"},y={FileProtocol:[10],ArgumentError:[11],UrlEmpty:[12],LiveFinish:[13],VideoSourceError:[1002,2032],EnvError:[4,5],NetworkError:[1001,1,2],VideoDecodeError:[3],CrossDomainError:[2048],Ie9IframeFullscreenError:[10001],WebrtcEnvError:[2e3],WebrtcApiError:[2001],WebrtcPullStreamError:[2002],WebrtcConnectError:[2003],WebrtcDecodeError:[2004]},v=function(e){function t(i){r(this,t);var o=s(this,e.call(this,i,"ErrorTips"));o.customTips=d.extend({},f,o.options.wording);for(var n in y)for(var a=0;a 0) { var OtherParameters = ""; for (var i = 0; i < paraLen; i++) { OtherParameters += iArguments[i]; if (i < paraLen - 1) { OtherParameters += seperator } } } if (isIos) { var ifr = document.createElement("iframe"); ifr.src = "app9vcom:##//" + funName + "/?" + (funName == "SetRSA2AlipayInfo" ? OtherParameters.replace(/,/g, "[,]") : OtherParameters); ifr.style.width = "0"; ifr.style.height = "0"; document.body.appendChild(ifr); if (null != ifr) { ifr.parentNode.removeChild(ifr) } ifr = null; try { if (OtherParameters != "") { eval("window.webkit.messageHandlers." + funName + ".postMessage('" + (OtherParameters == "" ? "''" : OtherParameters) + "')") } else { eval("window.webkit.messageHandlers." + funName + ".postMessage('')") } } catch (ex) { } } else { if (isAndroid && window.App9vCom) { var androidParas = "", argLength = iArguments.length; for (var i = 0; i < argLength; i++) { androidParas += YDBGetArguments(eval("iArguments[" + i.toString() + "]")) + (argLength > 1 && i < (argLength - 1) ? "," : "") } if (typeof (eval("window.App9vCom." + funName)) != "undefined") { var outV = eval("window.App9vCom." + funName + "(" + androidParas + ")") } else { console.log("no Function:" + funName) } } } } catch (ex) { } }; function EncodeBase64(c) { var b = encodeURI(c); var a = btoa(b); return a } function DecodeBase64(a) { var b = atob(a); var c = decodeURI(b); return c } YDBOBJ.prototype.Alert = function () { alert(this.isWindows) }; function YDBGetArguments(a) { var b = ""; if (typeof a == "string") { b = '"' + a + '"' } else { if (typeof a == "int") { b = a } else { b = a } } return b } YDBOBJ.prototype.SetGlobal = function (k, g, l, h, c, d, a, r, f, e, b) { var o = ""; var q = arguments.length; if (q > 8) { for (var m = 8; m < q; m++) { o += arguments[m]; if (m < q - 1) { o += "," } } } if (this.isIos) { var n = document.createElement("iframe"); n.src = "app9vcom:##//SetGlobal/?" + k + "," + g + "," + encodeURI(l.replace(/,/g, "|")) + "," + encodeURI(h.replace(/,/g, "|")) + "," + r + "," + o; n.style.width = "0"; n.style.height = "0"; document.body.appendChild(n); if (null != n) { n.parentNode.removeChild(n) } n = null; try { window.webkit.messageHandlers.SetGlobal.postMessage(k + "," + g + "," + encodeURI(l.replace(/,/g, "|")) + "," + encodeURI(h.replace(/,/g, "|")) + "," + r + "," + o) } catch (j) { } } else { if (this.isAndroid && window.App9vCom) { var p = window.App9vCom.SetGlobal(k, g, l, h, c, d, a, r, o) } } }; YDBOBJ.prototype.SetMenuBar = function (b) { var a = "SetMenuBar"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetDragRefresh = function (b) { var a = "SetDragRefresh"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetMoreButton = function (b) { var a = "SetMoreButton"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.MenuBarAutoHide = function (b) { var a = "MenuBarAutoHide"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GoBack = function () { var a = "GoBack"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GoTop = function () { var a = "GoTop"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.Scan = function () { var a = "Scan"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetScan = function (a) { var b = "GetScan"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.Share = function (h, b, e, f, a) { if (this.isIos) { h = h.replace(/,/g, ","); b = b.replace(/,/g, ","); var d = document.createElement("iframe"); if (undefined == a) { d.src = "app9vcom:##//Share/?" + encodeURI(h) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) } else { d.src = "app9vcom:##//Share/?" + encodeURI(h) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(a) } d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { if (undefined == a) { window.webkit.messageHandlers.Share.postMessage(encodeURI(h) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f)) } else { window.webkit.messageHandlers.Share.postMessage(encodeURI(h) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(a)) } } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var g; if (undefined == a) { g = window.App9vCom.Share(h, b, e, f) } else { g = window.App9vCom.Share(h, b, e, f, a) } } } }; YDBOBJ.prototype.SingleShare = function (i, b, e, f, h, a) { if (this.isIos) { i = i.replace(/,/g, ","); b = b.replace(/,/g, ","); var d = document.createElement("iframe"); if (undefined == a) { d.src = "app9vcom:##//SingleShare/?" + encodeURI(i) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(h) } else { d.src = "app9vcom:##//SingleShare/?" + encodeURI(i) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(h) + "," + encodeURI(a) } d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { if (undefined == a) { window.webkit.messageHandlers.SingleShare.postMessage(encodeURI(i) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(h)) } else { window.webkit.messageHandlers.SingleShare.postMessage(encodeURI(i) + "," + encodeURI(b) + "," + encodeURI(e) + "," + encodeURI(f) + "," + encodeURI(h) + "," + encodeURI(a)) } } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var g; if (undefined == a) { g = window.App9vCom.SingleShare(i, b, e, f, h) } else { g = window.App9vCom.SingleShare(i, b, e, f, h, a) } } } }; YDBOBJ.prototype.ClearCache = function () { var a = "ClearCache"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SpeechRecognition = function (a) { var b = "SpeechRecognition"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetGPS = function (a) { var b = "GetGPS"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenGPS = function (b) { var a = "OpenGPS"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.CloseGPS = function () { var a = "CloseGPS"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetDeviceInformation = function (a) { var b = "GetDeviceInformation"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.PopUp = function (d, a) { if (d == "" || undefined == d) { d = "0" } if (a == "" || undefined == a) { a = "0" } if (this.isIos) { var c = document.createElement("iframe"); c.src = "app9vcom:##//PopUp/?" + d.replace(/,/g, "|") + "," + a.replace(/,/g, "|"); c.style.width = "0"; c.style.height = "0"; document.body.appendChild(c); if (null != c) { c.parentNode.removeChild(c) } c = null; try { window.webkit.messageHandlers.PopUp.postMessage(d.replace(/,/g, "|") + "," + a.replace(/,/g, "|")) } catch (b) { } } else { if (this.isAndroid && window.App9vCom) { var e = window.App9vCom.PopUp(d, a) } } }; YDBOBJ.prototype.ImageViewState = function (b) { var a = "ImageViewState"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetAlipayInfo = function (g, a, f, d) { if (this.isIos) { var c = document.createElement("iframe"); c.src = "app9vcom:##//SetAlipayInfo/?" + g + "[,]" + a + "[,]" + f + "[,]" + d; c.style.width = "0"; c.style.height = "0"; document.body.appendChild(c); if (null != c) { c.parentNode.removeChild(c) } c = null; try { window.webkit.messageHandlers.SetAlipayInfo.postMessage(g + "[,]" + a + "[,]" + f + "[,]" + d) } catch (b) { } } else { if (this.isAndroid && window.App9vCom) { var e = window.App9vCom.SetAlipayInfo(g, a, f, d) } } }; YDBOBJ.prototype.SetWxpayInfo = function (h, b, g, e, a) { g = g.toString(); if (a == "" || undefined == a) { a = undefined } if (this.isIos) { var d = document.createElement("iframe"); d.src = "app9vcom:##//SetWxpayInfo/?" + h + "[,]" + b + "[,]" + g + "[,]" + e + "[,]" + a; d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { window.webkit.messageHandlers.SetWxpayInfo.postMessage(h + "[,]" + b + "[,]" + g + "[,]" + e + "[,]" + a) } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var f = window.App9vCom.SetWxpayInfo(h, b, g, e, a) } } }; YDBOBJ.prototype.SetWxpaySend = function (a, f, g, e, d, j, i, h, b) { var c = "SetWxpaySend"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.WXLogin = function (c, a) { var b = "WXLogin"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.ShowTopRightMenu = function () { var a = "ShowTopRightMenu"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.UploadImage = function (g, h, j, f, d, b, a, i, e) { var c = "UploadImage"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.SetBgColor = function (a) { var b = "SetBgColor"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.SetReturnButtonMode = function (b) { var a = "SetReturnButtonMode"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetWifiSsid = function (a) { var b = "GetWifiSsid"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.UseTouchID = function (b, e, a, c) { var d = "UseTouchID"; if (this.isAndroid) { d = "UseTouchIDFAS" } ApiFunHandler(d, arguments) }; YDBOBJ.prototype.UseFaceID = function (b, e, a, c) { var d = "UseFaceID"; if (this.isIos) { ApiFunHandler(d, arguments) } }; YDBOBJ.prototype.GetHealthStep = function (a) { var b = "GetHealthStep"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.QQLogin = function (a) { var b = "QQLogin"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenBluetooth = function () { var a = "OpenBluetooth"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.ExitApp = function () { var a = "ExitApp"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.AnimationWay = function (a, c) { if (a == "2" || a == "3") { a = "0" } if (c == "2" || c == "3") { c = "0" } if (a == "0" && c == "1") { c = "0" } if (a == "1" && c == "0") { c = "1" } if (this.isIos) { var d = document.createElement("iframe"); d.src = "app9vcom:##//AnimationWay/?" + a + "," + c; d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { window.webkit.messageHandlers.AnimationWay.postMessage(a + "," + c) } catch (b) { } } else { if (this.isAndroid && window.App9vCom) { var e = window.App9vCom.AnimationWay(a, c) } } }; YDBOBJ.prototype.OpenWithSafari = function (b) { var a = "OpenWithSafari"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.OpenNewWindow = function () { var a = "OpenNewWindow"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetOpenCurrentWindow = function () { var a = "SetOpenCurrentWindow"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetUserRelationForPush = function (c, b) { var a = "PushMsgConfig"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetClientIDOfGetui = function (a) { var b = "GetClientIDOfGetui"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.RongyunLogin = function (e, b, c, d) { var a = "RongyunLogin"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.InitiateChat = function (c, b, d) { var a = "InitiateChat"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SessionList = function () { var a = "SessionList"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.RefreshUserInfo = function (d, b, c) { var a = "RefreshUserInfo"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.CreateDiscussGroup = function (a, d, c) { var b = "CreateDiscussGroup"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenDiscussGroup = function (b, c) { var a = "OpenDiscussGroup"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.AddDiscussGroup = function (b, e, c, d) { var a = "AddDiscussGroup"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.RemoveDiscussGroup = function (b, c) { var a = "RemoveDiscussGroup"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.IntPortraitUri = function (d, b, c) { var a = "IntPortraitUri"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetStatusBarStyle = function (a) { var b = "SetStatusBarStyle"; if (this.isIos) { ApiFunHandler(b, arguments) } }; YDBOBJ.prototype.SetStatusCorlor = function (a) { var b = "SetStatusCorlor"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.isWXAppInstalled = function (b) { var a = "isWXAppInstalled"; if (this.isIos) { ApiFunHandler(a, arguments) } }; YDBOBJ.prototype.IsReloadPreviousPage = function (b) { var a = "IsReloadPreviousPage"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.IsReloadNextPage = function (b) { var a = "IsReloadNextPage"; if (this.isIos) { ApiFunHandler(a, arguments) } }; YDBOBJ.prototype.DismissVC = function () { var a = "DismissVC"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetBaseInfo = function (a) { var b = "GetBaseInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetCpuInfo = function (a) { var b = "GetCpuInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetMemoryInfo = function (a) { var b = "GetMemoryInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetStorageInfo = function (a) { var b = "GetStorageInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetDisplayInfo = function (a) { var b = "GetDisplayInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GpsState = function (a) { var b = "GpsState"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.Opengps = function () { if (this.isAndroid && window.App9vCom) { var a = window.App9vCom.Opengps() } }; YDBOBJ.prototype.ContactAll = function (a) { var b = "ContactAll"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.ContactSelect = function (a) { var b = "ContactSelect"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.ContactAdd = function (g, d, e, h, b, a) { if (this.isIos) { var f = document.createElement("iframe"); f.src = "app9vcom:##//ContactAdd/?" + encodeURI(g) + "," + encodeURI(d) + "," + e + "," + h + "," + b + "," + a; f.style.width = "0"; f.style.height = "0"; document.body.appendChild(f); if (null != f) { f.parentNode.removeChild(f) } f = null; try { window.webkit.messageHandlers.ContactAdd.postMessage(encodeURI(g) + "," + encodeURI(d) + "," + e + "," + h + "," + b + "," + a) } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var i = g + d; var j = window.App9vCom.ContactAdd(i, e, h, b, a) } } }; YDBOBJ.prototype.ContactDelete = function (b, a) { var c = "ContactDelete"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.ContactUpdate = function (b, h, e, f, i, c, a) { if (this.isIos) { var g = document.createElement("iframe"); g.src = "app9vcom:##//ContactUpdate/?" + b + "," + encodeURI(h) + "," + encodeURI(e) + "," + f + "," + i + "," + c + "," + a; g.style.width = "0"; g.style.height = "0"; document.body.appendChild(g); if (null != g) { g.parentNode.removeChild(g) } g = null; try { window.webkit.messageHandlers.ContactUpdate.postMessage(b + "," + encodeURI(h) + "," + encodeURI(e) + "," + f + "," + i + "," + c + "," + a) } catch (d) { } } else { if (this.isAndroid && window.App9vCom) { var j = window.App9vCom.ContactUpdate(b, h, e, f, i, c, a) } } }; YDBOBJ.prototype.StartVoice = function (b) { var a = "StartVoice"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.VolumeVideo = function (b) { var a = "VolumeVideo"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.PauseVoice = function () { var a = "PauseVoice"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.PlayVoice = function () { var a = "PauseVoice"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.StopVoice = function () { var a = "StopVoice"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.OpenVideo = function (b) { var a = "OpenVideo"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.Wallpaper = function (b) { var a = "Wallpaper"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.NavigatorInfo = function (a) { var b = "NavigatorInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.NavigatorBaidu = function () { var a = "NavigatorBaidu"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.NavigatorGoogle = function () { var a = "NavigatorGoogle"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.NavigatorGaode = function () { var a = "NavigatorGaode"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.NavigatorBaiduPath = function (d, e, a, b) { var c = "NavigatorBaiduPath"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.NavigatorGaodePath = function (g, h, i, a, b, c) { if (this.isIos) { var e = document.createElement("iframe"); e.src = "app9vcom:##//NavigatorGaodePath/?" + g + "," + h + "," + encodeURI(i) + "," + a + "," + b + "," + encodeURI(c); e.style.width = "0"; e.style.height = "0"; document.body.appendChild(e); if (null != e) { e.parentNode.removeChild(e) } e = null; try { window.webkit.messageHandlers.NavigatorGaodePath.postMessage(g + "," + h + "," + encodeURI(i) + "," + a + "," + b + "," + encodeURI(c)) } catch (d) { } } else { if (this.isAndroid && window.App9vCom) { var f = window.App9vCom.NavigatorGaodePath(g, h, i, a, b, c) } } }; YDBOBJ.prototype.appleNavigation = function (d, e, a, b) { var c = "appleNavigation"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.BLinitManager = function (a) { var b = "BLinitManager"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLscan = function (a) { var b = "BLscan"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLgetPeripheral = function (a) { var b = "BLgetPeripheral"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLisScanning = function (a) { var b = "BLisScanning"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLstopScan = function () { var a = "BLstopScan"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.BLconnect = function (c, a) { var b = "BLconnect"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLdisconnect = function (c, a) { var b = "BLdisconnect"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLisConnected = function (c, a) { var b = "BLisConnected"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLretrievePeripheral = function (c, a) { var b = "BLretrievePeripheral"; if (this.isIos) { ApiFunHandler(b, arguments) } }; YDBOBJ.prototype.BLretrieveConnectedPeripheral = function (c, a) { var b = "BLretrieveConnectedPeripheral"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLdiscoverService = function (c, a) { var b = "BLdiscoverService"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLdiscoverCharacteristics = function (c, d, a) { var b = "BLdiscoverCharacteristics"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BLdiscoverDescriptorsForCharacteristic = function (d, e, b, a) { var c = "BLdiscoverDescriptorsForCharacteristic"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.BLsetNotify = function (d, e, b, a) { var c = "BLsetNotify"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.BLreadValueForCharacteristic = function (d, e, b, a) { var c = "BLreadValueForCharacteristic"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.BLreadValueForDescriptor = function (e, f, b, c, a) { var d = "BLreadValueForDescriptor"; ApiFunHandler(d, arguments) }; YDBOBJ.prototype.BLwriteValueForCharacteristic = function (d, e, b, f, a) { var c = "BLwriteValueForCharacteristic"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.BLwriteValueForDescriptor = function (e, f, b, c, g, a) { var d = "BLwriteValueForDescriptor"; ApiFunHandler(d, arguments) }; YDBOBJ.prototype.SwitchApp = function (a) { var b = "SwitchApp"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.iOSSystemShare = function (a, d, e) { if (this.isIos) { a = a.replace(/,/g, ","); var c = document.createElement("iframe"); c.src = "app9vcom:##//iOSSystemShare/?" + encodeURI(a) + "," + encodeURI(d) + "," + encodeURI(e); c.style.width = "0"; c.style.height = "0"; document.body.appendChild(c); if (null != c) { c.parentNode.removeChild(c) } c = null; try { window.webkit.messageHandlers.iOSSystemShare.postMessage(encodeURI(a) + "," + encodeURI(d) + "," + encodeURI(e)) } catch (b) { } } }; YDBOBJ.prototype.IsFixedBottomMenu = function (a) { if (this.isAndroid && window.App9vCom) { var b = window.App9vCom.IsFixedBottomMenu(a) } }; YDBOBJ.prototype.SetFontSize = function () { var a = "SetFontSize"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.Ring = function () { if (this.isAndroid && window.App9vCom) { var a = window.App9vCom.Ring() } }; YDBOBJ.prototype.SetBrightness = function (b) { var a = "SetBrightness"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.CiticWxPay = function (a, h, i, e, j, k, f, b) { if (this.isIos) { var d = document.createElement("iframe"); d.src = "app9vcom:##//CiticWxPay/?" + a + "[,]" + h + "[,]" + i + "[,]" + e + "[,]" + j + "[,]" + k + "[,]" + f + "[,]" + b; d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { window.webkit.messageHandlers.CiticWxPay.postMessage(a + "[,]" + h + "[,]" + i + "[,]" + e + "[,]" + j + "[,]" + k + "[,]" + f + "[,]" + b) } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var g = window.App9vCom.CiticWxPay(a, h, i, e, j, k, f, b) } } }; YDBOBJ.prototype.BeeCloudPay = function (b, a, h, i, e, g) { if (this.isIos) { var d = document.createElement("iframe"); d.src = "app9vcom:##//BeeCloudPay/?" + b + "[,]" + a + "[,]" + h + "[,]" + i + "[,]" + e + "[,]" + g; d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { window.webkit.messageHandlers.BeeCloudPay.postMessage(b + "[,]" + a + "[,]" + h + "[,]" + i + "[,]" + e + "[,]" + g) } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var f = window.App9vCom.BeeCloudPay(b, a, h, i, e, g) } } }; YDBOBJ.prototype.GetHalfScan = function (a, d, c) { var b = "GetHalfScan"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.CloseScan = function () { var a = "CloseScan"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.WftWxpayInfo = function (h, b, g, e, a) { g = g.toString(); if (a == "" || undefined == a) { a = undefined } if (this.isIos) { var d = document.createElement("iframe"); d.src = "app9vcom:##//WftWxpayInfo/?" + h + "[,]" + b + "[,]" + g + "[,]" + e + "[,]" + a; d.style.width = "0"; d.style.height = "0"; document.body.appendChild(d); if (null != d) { d.parentNode.removeChild(d) } d = null; try { window.webkit.messageHandlers.WftWxpayInfo.postMessage(h + "[,]" + b + "[,]" + g + "[,]" + e + "[,]" + a) } catch (c) { } } else { if (this.isAndroid && window.App9vCom) { var f = window.App9vCom.SetWxpayInfo(h, b, g, e, a) } } }; YDBOBJ.prototype.SetHardware = function (b) { if (this.isAndroid && window.App9vCom) { var a = window.App9vCom.SetHardware(b) } }; YDBOBJ.prototype.isScreenOrientation = function (b) { var a = "isScreenOrientation"; if (this.isIos) { ApiFunHandler(a, arguments) } }; YDBOBJ.prototype.OpenStep = function (b) { var a = "OpenStep"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetCurrentStep = function (e, d, b, a) { var c = "GetCurrentStep"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.openUCBrower = function (c, a) { var b = "openUCBrower"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetChannel = function (a) { var b = "GetChannel"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.CopyPasteboardText = function (b) { var a = "copyPasteboardText"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.StatusBarHidden = function (b) { var a = "statusBarHidden"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.IsShowLandcape = function (b) { var a = "IsShowLandcape"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.ScreenOrientation = function (b) { var a = "screenOrientation"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetAppInfo = function (a) { var b = "GetAppInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.MultiPicShare = function (d, c, a) { var b = "MultiPicShare"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.SetTitleColor = function (b) { var a = "SetTitleColor"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GetCacheSize = function (a) { var b = "GetCacheSize"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.isRightMenu = function (b) { var a = "isRightMenu"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetHeadBar = function (c, d, a, e) { var b = "SetHeadBar"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.SetMenuBar = function (e, a, f, c, d) { var b = "SetMenuBar"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.SetDragRefresh = function (c, d, b) { var a = "SetDragRefresh"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.IsShareSet = function (b) { var a = "IsShareSet"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.SetRSA2AlipayInfo = function (e, a, d, c) { var b = "SetRSA2AlipayInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenByBrowser = function (a, c) { var b = "OpenByBrowser"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenByGoogleBrowser = function (a, c) { var b = "OpenByGoogleBrowser"; if (this.isAndroid) { ApiFunHandler(b, arguments) } }; YDBOBJ.prototype.LtcyCameraInfo = function (e, f, d, g, c, a) { var b = "LtcyCameraInfo"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.StartApp = function (c, a) { var b = "startApp"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.GetElectricQuantity = function (a) { var b = "GetElectricQuantity"; if (this.isAndroid) { ApiFunHandler(b, arguments) } }; YDBOBJ.prototype.TuiLiu = function (d, c, a) { var b = "tuiliu"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.YunTuiLiu = function (d, c, a) { var b = "YunTuiLiu"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.WangsuTuiLiu = function (d, c, a) { var b = "WangsuTuiLiu"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.WangsuLaLiu = function (c, b) { var a = "WangsuLaLiu"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.MiniWX = function (b, c) { var a = "miniwx"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.AudioRecord = function (c, a) { var b = "AudioRecord"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.SingleVideoChat = function (b, c) { var a = "SingleVideoChat"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.GroupVideoChat = function (b, d, c) { var a = "GroupVideoChat"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.loginTXLive = function (c, d, b) { var a = "loginTXLive"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.newTXLiveRoom = function (c, b) { var a = "newTXLiveRoom"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.getRoomList = function (a) { var b = "getRoomList"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.enterLiveRoom = function (c, b) { var a = "enterLiveRoom"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.wirteNfcTag = function (b, a) { var c = "wirteNfcTag"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.readNfcTag = function (a) { var b = "readNfcTag"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.getNfcId = function (a) { var b = "getNfcId"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.getNfcVersion = function (a) { var b = "getNfcVersion"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.BaiduTuiLiu = function (d, c, a) { var b = "BaiduTuiLiu"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.EnableOuterApp = function (b) { var a = "EnableOuterApp"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.ScanLocalImg = function (b) { var a = "ScanLocalImg"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.ScanWebImg = function (b, c) { var a = "ScanWebImg"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMessageRegister = function (e, b, c, d) { var a = "jMessageRegister"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMessageLogin = function (d, b, c) { var a = "jMessageLogin"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMessageGoChatList = function () { var a = "jMessageGoChatList"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMessageSingleChat = function (b) { var a = "jMessageSingleChat"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMessageGetUnReadMsg = function (b) { var a = "jMessageGetUnReadMsg"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMUpdateUserNickname = function (c, b) { var a = "updateUserNickname"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.JMUpdateUserAvatar = function (c, b) { var a = "updateUserAvatar"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.YunLaLiu = function (c, b) { var a = "YunLaLiu"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.BaiduOrcWord = function (c, a) { var b = "baiduOrcWord"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.PayZjZfb = function (a, c) { var b = "PayZjZfb"; if (this.isIos) { arguments[0] = EncodeBase64(a) } ApiFunHandler(b, arguments) }; YDBOBJ.prototype.PayZjWx = function (a, b, e, d) { var c = "PayZjWx"; if (this.isIos) { arguments[1] = EncodeBase64(b) } ApiFunHandler(c, arguments) }; YDBOBJ.prototype.getTXGps = function (a) { var b = "getTXGps"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.OpenTXGPS = function (b) { var a = "OpenTXGPS"; ApiFunHandler(a, arguments) }; YDBOBJ.prototype.stopTXGps = function (a, b, d) { var c = "stopTXGps"; ApiFunHandler(c, arguments) }; YDBOBJ.prototype.ShareWxMini = function (e, a, c, f, g, d) { var b = "ShareWxMini"; ApiFunHandler(b, arguments) }; YDBOBJ.prototype.test = function (b) { var a = "test"; ApiFunHandler(a, arguments) }; diff --git a/yunshop-front-master/public/static/app/ap.js b/yunshop-front-master/public/static/app/ap.js new file mode 100644 index 0000000..2c6f052 --- /dev/null +++ b/yunshop-front-master/public/static/app/ap.js @@ -0,0 +1 @@ +(function(){var b={};var a={};a.PADCHAR="=";a.ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";a.makeDOMException=function(){var f,d;try{return new DOMException(DOMException.INVALID_CHARACTER_ERR)}catch(d){var c=new Error("DOM Exception 5");c.code=c.number=5;c.name=c.description="INVALID_CHARACTER_ERR";c.toString=function(){return"Error: "+c.name+": "+c.message};return c}};a.getbyte64=function(e,d){var c=a.ALPHA.indexOf(e.charAt(d));if(c===-1){throw a.makeDOMException()}return c};a.decode=function(f){f=""+f;var j=a.getbyte64;var h,e,g;var d=f.length;if(d===0){return f}if(d%4!==0){throw a.makeDOMException()}h=0;if(f.charAt(d-1)===a.PADCHAR){h=1;if(f.charAt(d-2)===a.PADCHAR){h=2}d-=4}var c=[];for(e=0;e>16,(g>>8)&255,g&255))}switch(h){case 1:g=(j(f,e)<<18)|(j(f,e+1)<<12)|(j(f,e+2)<<6);c.push(String.fromCharCode(g>>16,(g>>8)&255));break;case 2:g=(j(f,e)<<18)|(j(f,e+1)<<12);c.push(String.fromCharCode(g>>16));break}return c.join("")};a.getbyte=function(e,d){var c=e.charCodeAt(d);if(c>255){throw a.makeDOMException()}return c};a.encode=function(f){if(arguments.length!==1){throw new SyntaxError("Not enough arguments")}var g=a.PADCHAR;var h=a.ALPHA;var k=a.getbyte;var e,j;var c=[];f=""+f;var d=f.length-f.length%3;if(f.length===0){return f}for(e=0;e>18));c.push(h.charAt((j>>12)&63));c.push(h.charAt((j>>6)&63));c.push(h.charAt(j&63))}switch(f.length-d){case 1:j=k(f,e)<<16;c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+g+g);break;case 2:j=(k(f,e)<<16)|(k(f,e+1)<<8);c.push(h.charAt(j>>18)+h.charAt((j>>12)&63)+h.charAt((j>>6)&63)+g);break}return c.join("")};b.pay=function(d){var c=encodeURIComponent(a.encode(d));location.href="./../addons/sz_yi/template/mobile/default/order/pay.htm?goto="+c};b.decode=function(c){return a.decode(decodeURIComponent(c))};window._AP=b})(); \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/app-min.js b/yunshop-front-master/public/static/app/app-min.js new file mode 100644 index 0000000..23bb873 --- /dev/null +++ b/yunshop-front-master/public/static/app/app-min.js @@ -0,0 +1,6 @@ +/* +录音 +https://github.com/xiangyuecn/Recorder +src: app-support/app.js,app-support/app-ios-weixin-support.js,app-support/app-native-support.js +*/ +!function(){"use strict";var n=/MicroMessenger/i.test(navigator.userAgent),u=window.RecordAppBaseFolder||"/Recorder/dist/",e=window.OnRecordAppInstalled,l=[{Key:"Native",Support:function(e){e(!1)},Config:{}},{Key:"IOS-Weixin",Support:function(e){d.AlwaysUseWeixinJS||!Recorder.Support()?e(n):e(!1)},Config:{WxReady:function(e){e(null,"未实现IOS-Weixin.Config.WxReady")},DownWxMedia:function(e,n,t){t("下载素材接口DownWxMedia未实现")},AMREngine:[{url:u+"engine/beta-amr.js",check:function(){return!Recorder.prototype.amr}}]},ExtendDefault:!0},{Key:"Default",Support:function(e){e(!0)},Config:{paths:[{url:u+"recorder-core.js",check:function(){return!window.Recorder}},{url:u+"engine/mp3.js",check:function(){return!Recorder.prototype.mp3}}]}}],t=l[0],o=l[1],f=l[2];f.RequestPermission=function(e,n){var t=Recorder();t.open(function(){t.close(),e()},n)},f.Start=function(e,n,t){var o=d.__Rec;null!=o&&o.close(),d.__Rec=o=Recorder({type:e.type,sampleRate:e.sampleRate,bitRate:e.bitRate,onProcess:function(e,n,t,o){d.ReceivePCM(e[e.length-1],n,t,o)}}),o.appSet=e,o.open(function(){o.start(),n()},function(e){t(e)})},f.Stop=function(t,n){var o=d.__Rec;if(o){var r=function(){for(var e in o.close(),o.set)o.appSet[e]=o.set[e];d.__Rec=null};o.stop(function(e,n){r(),d.BlobRead(e,n,t)},function(e){r(),n(e)})}else n("未开始录音")};var d={LM:"2019-4-23 14:51:14",Current:0,IsWx:n,BaseFolder:u,AlwaysUseWeixinJS:!1,Platforms:{Native:t,Weixin:o,Default:f},Js:function(r,i,a,e){var s=(e=e||window).document,c=function(e){if(e>=r.length)i();else{var n=r[e],t=n.url;if(!1!==n.check()){var o=s.createElement("script");o.setAttribute("type","text/javascript"),o.setAttribute("src",t),o.onload=function(){c(e+1)},o.onerror=function(e){a("请求失败:"+(e.message||"-")+","+t)},s.body.appendChild(o)}else c(e+1)}};c(0)},BlobRead:function(e,n,t){var o=new FileReader;o.onloadend=function(){t({mime:e.type,duration:n,data:(/.+;\s*base64\s*,\s*(.+)$/i.exec(o.result)||[])[1]})},o.readAsDataURL(e)},ReceivePCM:function(e,n,t,o){d.OnProcess&&d.OnProcess([e],n,t,o)},Install:function(t,o){var r=d.__reqs||(d.__reqs=[]);r.push({s:t,f:o}),t=function(){i("s",arguments)},o=function(e,n){i("f",arguments)};var i=function(e,n){for(var t=0;t=r.length)return p.decodeTime=Date.now()-c,void function(){a||(a=Date.now());for(var e=[],n=0;n=v.length)r();else{var e=v[t];g.DownWxMedia({mediaId:e,transform_mediaIds:v.join(","),transform_type:d.type,transform_bitRate:d.bitRate,transform_sampleRate:d.sampleRate},function(e){p.list.push(e),e.duration?r():/amr/i.test(e.mime)?(t++,i()):f("微信服务器返回了未知音频类型:"+e.mime)},function(e){f("下载音频失败:"+e)})}},a=0,s=function(){if(a>=n.length)return p.uploadTime=Date.now()-c,void i();var e=n[a];console.log("微信录音片段"+a+" wx.playVoice({localId:'"+e+"'})"),wx.uploadVoice({localId:e,isShowProgressTips:0,fail:f,success:function(e){var n=e.serverId;console.log("serverId:"+n),v.push(n),a++,s()}})},c=Date.now();s()},m=r.timeout;return r.err?(console.error(r.err,m),void f("录制失败,已录制"+m.length+"分钟,但后面出错:"+r.err)):m.length&&Date.now()-m[m.length-1].time<900?(r.wx.stopRecord(),void t()):void r.wx.stopRecord({fail:f,success:function(e){var n=Date.now();m.push({res:e,duration:n-r.startTime,time:n}),t()}})}f("未开始录音")}}(),function(){"use strict";var s=RecordApp,e=s.Platforms.Native;e.Config;e.IsInit=!0,window.top.NativeRecordReceivePCM=function(e,n,t){for(var o,r=e.length,i=0,a=0;a -1) { + return true; + } else { + return false; + } +} + +// 聚合CPS的登录跳转 +function callAndroid() { + // 由于对象映射,所以调用cps对象等于调用Android映射的对象 + cps.toLogin(); +} +function callIOS(data) { + window.webkit.messageHandlers.toLogin.postMessage(data); +} + +// 聚合CPS的退出跳转 +function toQuitAndroid() { + cps.toQuitAndroid(); +} +function toQuitIOS(data) { + window.webkit.messageHandlers.toQuitIOS.postMessage(data); +} + +// 聚合CPS的分享方法 +function shareByH5Android(json) { + // 由于对象映射,所以调用cps对象等于调用Android映射的对象 + cps.shareByH5Android(json); +} +function shareByH5IOS(data) { + window.webkit.messageHandlers.shareByH5IOS.postMessage(data); +} + +// 聚合CPS的返回上一页的方法 +function routeBackUrlAndroid() { + cps.routeBackUrlAndroid(); +} +function routeBackUrlIOS(data) { + window.webkit.messageHandlers.routeBackUrlIOS.postMessage(data); +} + +// 聚合CPS调起小程序的方法 +function miniWXAndroid(json) { + cps.miniWXAndroid(json); +} +function miniWXIOS(data) { + window.webkit.messageHandlers.miniWXIOS.postMessage(data); +} + +// 聚合CPS原生微信支付 +function wxPayAndroid(json) { + cps.wxPayAndroid(json); +} +function wxPayIOS(data) { + window.webkit.messageHandlers.wxPayIOS.postMessage(data); +} + +// 聚合APP 任务中心跳转 +function toUrlAndroid(json) { + cps.toUrlAndroid(json); +} +// 聚合app 支付宝周期扣款 +function aliPayToPay(json,orderId,url) { + console.log(json,orderId); + console.log(url); + cps.aliPayToPay(json,orderId,url); +} +function toUrlIOS(data) { + window.webkit.messageHandlers.toUrlIOS.postMessage(data); +} + +// 聚合APP 原生页面跳转 +function toAPPUrlAndroid(json) { + cps.toAPPUrlAndroid(json); +} +function toAPPUrlIOS(data) { + window.webkit.messageHandlers.toAPPUrlIOS.postMessage(data); +} + +// 获取聚合APP的公众号i和域名 +function getKeyIAndroid() { + if(cps.getKeyIAndroid()) { + return JSON.parse(cps.getKeyIAndroid()) || {}; + }else { + return {} + } +} + +function toGetKeyIIOS(data) { + window.webkit.messageHandlers.toGetKeyIIOS.postMessage(data); +} + +function getKeyIIOS(data) { + var obj = {}; + // if(data){ + // obj = JSON.parse(data) + // } + // console.log(obj['token'],obj.i,obj.domain,"obj") + // window.localStorage.setItem('getKeyIIOS',JSON.stringify(obj)); + var regex = /\{(.+?)\}/g; + if(window.navigator.userAgent.match(regex)) { + obj = JSON.parse(window.navigator.userAgent.match(regex)[0]); + } + // console.log(obj,"obj") + return obj; +} + +// 跳转详情通知APP +function toGoodDetailIOS(data) { + if(window.webkit && window.webkit.messageHandlers) { + window.webkit.messageHandlers.toGoodDetailIOS.postMessage(data); + } +} + + + +// 详情返回列表通知APP +function toGoodListIOS(data) { + var u = window.navigator.userAgent; + var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端 + var ua = window.navigator.userAgent.toLowerCase(); + if (ua.indexOf("yz_cps") > -1) { + // 是否为cps环境 + if (isiOS) { + if(window.webkit && window.webkit.messageHandlers) { + window.webkit.messageHandlers.toGoodListIOS.postMessage(data); + } + } + } +} + +// 商品购买成功通知APP +function toGoodBuyIOS(data) { + if(window.webkit && window.webkit.messageHandlers) { + window.webkit.messageHandlers.toGoodBuyIOS.postMessage(data); + } +} + +// 商品购买成功通知APP +function sharePoster(data) { + if(window.webkit && window.webkit.messageHandlers) { + window.webkit.messageHandlers.sharePoster.postMessage(data); + } +} + +// 全屏时是否横屏,true 横屏||false 竖屏 +function switchLandscapeAndroid(data) { + cps.switchLandscape(data); +} + +//Android cps聚合页跳转抖音app +function androidToTikTok(data){ + cps.androidToTikTok(data); +} +//IOS cps聚合页跳转抖音app +function IOStoTikTok(data){ + window.webkit.messageHandlers.IOStoTikTok.postMessage(data) +} +//Android cps聚合页跳转拼多多、淘宝、京东app +function androidToPDD(deep_link,coupon_click_url,item_id){ + console.log(deep_link,coupon_click_url,item_id,"拼多多"); + cps.androidToPDD(deep_link,coupon_click_url,item_id); +} +function androidToJD(deep_link,coupon_click_url,item_id){ + console.log(deep_link,coupon_click_url,item_id,"京东"); + cps.androidToJD(deep_link,coupon_click_url,item_id); +} +function androidTB(deep_link,coupon_click_url,item_id){ + console.log(deep_link,coupon_click_url,item_id,"天猫、淘宝"); + cps.androidTB(deep_link,coupon_click_url,item_id); +} +//IOS cps聚合页跳转拼多多、淘宝、京东app +function IOStoPDD(data){ + window.webkit.messageHandlers.IOStoPDD.postMessage(data) +} +function IOStoJD(data){ + window.webkit.messageHandlers.IOStoJD.postMessage(data) +} +function IOStoTB(data){ + window.webkit.messageHandlers.IOStoTB.postMessage(data) +} + +// 聚合CPS的登录跳转 +function toQRAndroid() { + // 由于对象映射,所以调用cps对象等于调用Android映射的对象 + cps.toQR(); +} +function toQRIOS() { + window.webkit.messageHandlers.toQR.postMessage(); +} \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/axios.min.js b/yunshop-front-master/public/static/app/axios.min.js new file mode 100644 index 0000000..69cc188 --- /dev/null +++ b/yunshop-front-master/public/static/app/axios.min.js @@ -0,0 +1,9 @@ +/* axios v0.18.0 | (c) 2018 by Matt Zabriskie */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n + * @license MIT + */ +e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); +//# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/beta-amr.js b/yunshop-front-master/public/static/app/beta-amr.js new file mode 100644 index 0000000..6136bf2 --- /dev/null +++ b/yunshop-front-master/public/static/app/beta-amr.js @@ -0,0 +1,6 @@ +/* +录音 +https://github.com/xiangyuecn/Recorder +src: engine/beta-amr.js,engine/beta-amr-engine.js,engine/wav.js +*/ +!function(){"use strict";Recorder.prototype.enc_amr={stable:!1,testmsg:"采样率比特率设置无效,只提供8000hz,AMR12.2(12.8kbps)"},Recorder.amr2wav=function(e,n,r){var t=new FileReader;t.onload=function(){var e=new Uint8Array(t.result);Recorder.AMR.decode(e,function(e){Recorder({type:"wav"}).mock(e,8e3).stop(function(e,r){n(e,r)},r)},r)},t.readAsArrayBuffer(e)},Recorder.prototype.amr=function(e,n,r){var t=this.set;e.length;t.bitRate=12.8;var i=t.sampleRate;if(8e3!=i)return console.log("amr mock start"),t.sampleRate=8e3,void this.mock(e,i).stop(function(e,r){console.log("amr mock end"),n(e)},r);Recorder.AMR.encode(e,function(e){n(new Blob([e.buffer],{type:"audio/amr"}))})}}(),function(){"use strict";var AMR={decode:function(t,i,e){var o=this;if(String.fromCharCode.apply(null,t.subarray(0,this.AMR_HEADER.length))===this.AMR_HEADER){var a=this.Decoder_Interface_init(),s=new Int16Array(Math.floor(t.length/6*this.PCM_BUFFER_COUNT)),r=Module._malloc(this.AMR_BUFFER_COUNT),l=new Uint8Array(Module.HEAPU8.buffer,r,this.AMR_BUFFER_COUNT);r=Module._malloc(2*this.PCM_BUFFER_COUNT);var f=new Int16Array(Module.HEAPU8.buffer,r,this.PCM_BUFFER_COUNT),u=6,c=0,d=function(){for(var e=0;u+1>3&15];if(u+r+1>t.length)break;if(l.set(t.subarray(u,u+r+1)),o.Decoder_Interface_Decode(a,l.byteOffset,f.byteOffset,0),c+o.PCM_BUFFER_COUNT>s.length){var n=new Int16Array(2*s.length);n.set(s.subarray(0,c)),s=n}if(s.set(f,c),c+=o.PCM_BUFFER_COUNT,u+=r+1,2e4<(e+=r+1))return void setTimeout(d)}Module._free(l.byteOffset),Module._free(f.byteOffset),o.Decoder_Interface_exit(a),i(s.subarray(0,c))};d()}else e("非AMR音频数据")},encode:function(n,t){var i=this,o=this.Encoder_Interface_init(),e=Module._malloc(2*this.PCM_BUFFER_COUNT),a=new Int16Array(Module.HEAPU8.buffer,e,this.PCM_BUFFER_COUNT);e=Module._malloc(this.AMR_BUFFER_COUNT);var s=new Uint8Array(Module.HEAPU8.buffer,e,this.AMR_BUFFER_COUNT),l=this.SIZES[7]+1,f=new Uint8Array(Math.ceil(n.length/this.PCM_BUFFER_COUNT*l)+this.AMR_HEADER.length);f.set(new TextEncoder("utf-8").encode(this.AMR_HEADER));var u=0,c=this.AMR_HEADER.length,d=function(){for(var e=0;u+i.PCM_BUFFER_COUNT>>0)+4294967296*+(r>>>0):+(e>>>0)+4294967296*+(0|r)},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var __THREW__=0,ABORT=!1,EXITSTATUS=0,undef=0,tempValue,tempInt,tempBigInt,tempInt2,tempBigInt2,tempPair,tempBigIntI,tempBigIntR,tempBigIntS,tempBigIntP,tempBigIntD,tempDouble,tempFloat,tempI64,tempI64b,tempRet0,tempRet1,tempRet2,tempRet3,tempRet4,tempRet5,tempRet6,tempRet7,tempRet8,tempRet9;function assert(e,r){e||abort("Assertion failed: "+r)}var globalScope=this,cwrap,ccall;function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(e){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}function setValue(e,r,n,t){switch("*"===(n=n||"i8").charAt(n.length-1)&&(n="i32"),n){case"i1":case"i8":HEAP8[e>>0]=r;break;case"i16":HEAP16[e>>1]=r;break;case"i32":HEAP32[e>>2]=r;break;case"i64":tempI64=[r>>>0,(tempDouble=r,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[e>>2]=tempI64[0],HEAP32[e+4>>2]=tempI64[1];break;case"float":HEAPF32[e>>2]=r;break;case"double":HEAPF64[e>>3]=r;break;default:abort("invalid type for setValue: "+n)}}function getValue(e,r,n){switch("*"===(r=r||"i8").charAt(r.length-1)&&(r="i32"),r){case"i1":case"i8":return HEAP8[e>>0];case"i16":return HEAP16[e>>1];case"i32":case"i64":return HEAP32[e>>2];case"float":return HEAPF32[e>>2];case"double":return HEAPF64[e>>3];default:abort("invalid type for setValue: "+r)}return null}!function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(e){var r=Runtime.stackAlloc(e.length);return writeArrayToMemory(e,r),r},stringToC:function(e){var r=0;return null!=e&&0!==e&&writeStringToMemory(e,r=Runtime.stackAlloc(1+(e.length<<2))),r}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,n,t,i){var o=getCFunc(e),a=[],s=0;if(t)for(var l=0;l>2]=0;for(l=a+o;t>0]=0;return a}if("i8"===s)return e.subarray||e.slice?HEAPU8.set(e,a):HEAPU8.set(new Uint8Array(e),a),a;for(var f,u,c,d=0;d>0],(0!=n||r)&&(i++,!r||i!=r););r||(r=i);var o="";if(t<128){for(var a;0>0];if(!n)return r;r+=String.fromCharCode(n)}}function stringToAscii(e,r){return writeAsciiToMemory(e,r,!1)}function UTF8ArrayToString(e,r){for(var n,t,i,o,a,s="";;){if(!(n=e[r++]))return s;if(128&n)if(t=63&e[r++],192!=(224&n))if(i=63&e[r++],224==(240&n)?n=(15&n)<<12|t<<6|i:(o=63&e[r++],240==(248&n)?n=(7&n)<<18|t<<12|i<<6|o:(a=63&e[r++],n=248==(252&n)?(3&n)<<24|t<<18|i<<12|o<<6|a:(1&n)<<30|t<<24|i<<18|o<<12|a<<6|63&e[r++])),n<65536)s+=String.fromCharCode(n);else{var l=n-65536;s+=String.fromCharCode(55296|l>>10,56320|1023&l)}else s+=String.fromCharCode((31&n)<<6|t);else s+=String.fromCharCode(n)}}function UTF8ToString(e){return UTF8ArrayToString(HEAPU8,e)}function stringToUTF8Array(e,r,n,t){if(!(0>6,r[n++]=128|63&s}else if(s<=65535){if(o<=n+2)break;r[n++]=224|s>>12,r[n++]=128|s>>6&63,r[n++]=128|63&s}else if(s<=2097151){if(o<=n+3)break;r[n++]=240|s>>18,r[n++]=128|s>>12&63,r[n++]=128|s>>6&63,r[n++]=128|63&s}else if(s<=67108863){if(o<=n+4)break;r[n++]=248|s>>24,r[n++]=128|s>>18&63,r[n++]=128|s>>12&63,r[n++]=128|s>>6&63,r[n++]=128|63&s}else{if(o<=n+5)break;r[n++]=252|s>>30,r[n++]=128|s>>24&63,r[n++]=128|s>>18&63,r[n++]=128|s>>12&63,r[n++]=128|s>>6&63,r[n++]=128|63&s}}return r[n]=0,n-i}function stringToUTF8(e,r,n){return stringToUTF8Array(e,HEAPU8,r,n)}function lengthBytesUTF8(e){for(var r=0,n=0;n>1];if(0==t)return n;++r,n+=String.fromCharCode(t)}}function stringToUTF16(e,r,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var t=r,i=(n-=2)<2*e.length?n/2:e.length,o=0;o>1]=a,r+=2}return HEAP16[r>>1]=0,r-t}function lengthBytesUTF16(e){return 2*e.length}function UTF32ToString(e){for(var r=0,n="";;){var t=HEAP32[e+4*r>>2];if(0==t)return n;if(++r,65536<=t){var i=t-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(t)}}function stringToUTF32(e,r,n){if(void 0===n&&(n=2147483647),n<4)return 0;for(var t=r,i=t+n-4,o=0;o>2]=a,i<(r+=4)+4)break}return HEAP32[r>>2]=0,r-t}function lengthBytesUTF32(e){for(var r=0,n=0;n"}else o=i;e:for(;d>0]=o,i+=1}}function writeArrayToMemory(e,r){for(var n=0;n>0]=e[n]}function writeAsciiToMemory(e,r,n){for(var t=0;t>0]=e.charCodeAt(t);n||(HEAP8[r>>0]=0)}function unSign(e,r,n){return 0<=e?e:r<=32?2*Math.abs(1<>>16)*t+n*(r>>>16)<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(e){e>>>=0;for(var r=0;r<32;r++)if(e&1<<31-r)return r;return 32}),Math.clz32=Math.clz32;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_min=Math.min,Math_clz32=Math.clz32,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(e){return e}function addRunDependency(e){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}function removeRunDependency(e){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),0==runDependencies&&(null!==runDependencyWatcher&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}Module.addRunDependency=addRunDependency,Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var memoryInitializer=null,ASM_CONSTS=[];STATIC_BASE=8,STATICTOP=STATIC_BASE+31776,__ATINIT__.push(),allocate([154,14,0,0,188,14,0,0,226,14,0,0,8,15,0,0,46,15,0,0,84,15,0,0,130,15,0,0,208,15,0,0,66,16,0,0,108,16,0,0,42,17,0,0,248,17,0,0,228,18,0,0,240,19,0,0,24,21,0,0,86,22,0,0,238,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,13,0,15,0,17,0,19,0,20,0,26,0,31,0,5,0,6,0,5,0,5,0,0,0,0,0,0,0,0,0,1,252,146,252,36,253,182,253,72,254,218,254,108,255,0,0,0,0,32,78,32,78,32,78,32,78,32,78,80,70,0,64,0,32,0,0,0,0,255,127,112,125,112,125,112,125,112,125,112,125,153,89,255,127,112,125,112,125,102,102,102,38,153,25,153,25,154,89,185,62,232,43,188,30,132,21,16,15,139,10,97,7,42,5,157,3,0,96,0,72,0,54,128,40,96,30,200,22,22,17,209,12,157,9,54,7,102,70,184,38,75,21,182,11,113,6,139,3,243,1,18,1,151,0,83,0,154,89,185,62,232,43,188,30,132,21,16,15,139,10,97,7,42,5,157,3,44,3,128,0,30,2,140,0,57,11,111,4,218,8,74,13,19,8,51,2,133,49,135,2,36,16,6,7,225,21,165,20,9,30,118,1,151,14,185,1,160,42,78,10,31,46,190,9,10,80,29,3,98,20,163,2,68,26,162,32,162,20,160,6,208,5,172,1,250,22,196,1,212,20,232,15,255,13,244,4,165,9,133,3,22,62,237,3,134,58,199,12,91,40,250,18,51,14,229,7,36,10,67,3,72,48,28,19,174,47,168,6,120,52,68,6,158,35,37,9,128,15,2,6,103,21,208,38,211,14,161,1,79,5,158,1,56,14,33,6,59,31,213,13,141,44,133,2,104,33,123,2,216,15,97,5,224,64,236,23,156,44,188,2,215,7,95,2,127,48,42,6,111,43,46,18,112,53,172,6,214,46,205,4,60,31,129,28,175,51,83,22,124,9,135,4,25,8,149,7,74,24,233,23,218,13,12,7,221,34,10,7,231,33,44,6,111,54,248,13,1,52,93,24,254,23,106,4,106,23,198,6,61,55,54,18,7,44,249,12,194,47,15,6,107,54,199,11,217,19,224,40,228,36,50,26,153,6,171,2,156,5,26,5,44,28,93,15,242,15,153,10,113,30,192,2,222,58,34,3,155,24,92,20,241,16,237,20,20,26,29,2,174,23,114,2,83,53,116,14,234,44,104,9,28,63,204,2,145,47,239,2,129,31,225,44,170,24,208,8,114,17,240,1,125,28,11,2,229,39,249,14,202,32,221,11,211,32,198,3,148,55,88,7,255,33,33,21,11,64,255,18,252,28,187,7,201,23,206,4,155,36,46,17,222,56,35,13,247,52,57,11,107,51,185,5,158,21,142,6,82,51,179,57,170,28,88,2,38,5,36,2,156,16,211,13,60,39,60,9,91,41,110,2,32,51,157,2,46,55,198,13,175,19,56,38,234,59,107,2,43,12,78,2,58,64,197,11,182,60,72,16,177,60,75,6,45,60,204,4,151,62,83,36,110,29,112,19,198,7,189,4,183,44,133,4,224,48,143,21,3,37,84,10,36,30,242,7,224,51,191,8,139,62,229,19,130,31,105,26,99,39,133,5,138,19,43,9,235,48,87,23,22,59,83,11,88,71,241,8,211,61,223,9,137,63,14,40,59,57,55,44,5,7,81,1,43,12,141,1,182,13,112,11,240,17,110,10,95,29,116,2,151,44,144,2,58,23,131,9,144,25,199,28,46,32,61,3,160,15,95,3,48,39,188,9,185,62,223,13,28,71,30,4,215,23,174,5,252,22,220,30,64,73,140,13,72,7,32,2,238,35,171,2,103,45,64,16,242,17,108,6,86,12,133,4,81,62,0,10,61,48,149,14,12,68,140,20,218,23,212,7,101,11,206,6,83,64,137,20,147,65,144,6,53,67,223,6,165,18,159,12,218,28,147,23,6,56,28,39,195,15,186,1,98,16,202,1,254,35,194,8,3,29,121,16,60,50,33,3,178,43,57,3,104,49,36,8,156,50,154,25,33,37,228,3,229,25,217,3,41,41,198,9,185,59,142,19,58,49,7,8,124,60,117,6,66,63,9,27,151,55,158,22,66,10,60,3,239,21,150,6,95,53,146,22,84,14,18,6,49,44,73,10,42,38,179,5,179,54,125,18,25,62,147,24,134,24,78,7,230,30,237,8,82,66,219,17,192,64,9,15,144,59,7,9,151,62,172,12,123,56,144,69,71,46,203,10,189,7,127,5,120,5,108,3,239,16,219,13,39,17,114,16,29,21,168,2,53,68,13,3,101,25,254,19,155,31,253,29,187,28,26,3,141,32,158,4,193,58,88,12,80,58,223,11,197,79,112,3,209,56,84,3,49,48,116,57,248,26,128,7,129,16,165,3,26,32,63,4,163,41,244,15,98,39,181,17,175,10,72,3,177,80,57,4,71,65,78,23,1,62,226,17,119,42,14,10,189,14,142,4,183,56,204,15,219,80,67,10,115,59,174,10,170,59,138,8,113,24,154,12,69,51,24,76,28,28,162,3,158,9,82,6,163,17,20,12,28,54,181,16,220,40,65,3,187,67,42,3,251,65,241,8,186,60,25,32,35,53,148,6,125,12,42,7,76,62,4,11,196,61,207,20,110,66,134,9,148,65,46,5,55,61,220,31,206,45,108,33,178,14,5,8,91,37,37,5,249,52,134,26,195,47,144,7,244,31,222,13,231,51,242,6,171,63,199,25,163,63,78,30,73,33,247,9,57,28,85,10,93,71,65,29,245,65,200,8,218,69,68,11,113,67,0,13,201,36,194,78,34,43,128,32,6,5,108,2,151,5,71,2,105,23,241,8,138,15,42,14,24,20,240,2,97,52,62,3,177,21,44,11,244,45,20,23,241,41,48,2,70,21,52,2,9,52,192,11,170,46,99,14,175,77,30,3,97,38,216,2,95,53,44,34,223,28,237,11,211,9,10,3,162,23,65,3,69,25,210,19,113,32,159,9,253,23,73,7,204,59,238,4,72,56,195,17,95,53,163,17,65,12,167,11,175,9,235,4,240,58,39,18,22,60,47,10,156,56,88,9,174,48,233,9,115,29,133,11,109,50,28,47,92,21,172,2,69,12,210,2,217,19,250,4,188,49,104,16,198,59,169,2,139,30,80,2,134,25,229,7,94,64,33,34,52,52,114,3,21,21,131,3,64,57,130,8,149,57,131,16,190,55,18,5,105,54,237,7,117,60,58,29,199,61,220,17,217,9,221,7,198,19,12,7,39,20,182,25,218,27,13,14,168,42,75,6,209,45,172,6,7,66,127,13,140,63,240,25,90,36,239,3,153,36,58,8,238,74,173,19,153,48,173,16,47,62,52,5,253,59,184,13,122,46,61,55,229,62,198,26,218,7,225,2,195,14,93,3,190,44,64,11,236,13,212,13,97,35,217,4,103,48,128,3,98,33,21,18,41,45,144,22,193,31,77,2,26,32,76,2,40,73,171,14,173,50,77,12,113,61,246,2,250,64,242,2,118,59,130,43,255,61,160,8,65,18,98,2,234,39,166,2,153,59,50,16,97,22,255,12,185,32,134,6,150,77,17,9,90,60,135,21,230,54,105,21,96,22,72,11,156,29,66,5,48,56,205,20,108,63,110,15,14,59,160,14,202,59,155,5,5,57,230,15,13,48,80,61,193,29,163,6,122,8,116,3,107,17,215,17,174,70,234,12,198,49,47,3,78,58,139,3,168,58,185,16,158,60,176,32,74,70,63,4,54,9,97,3,153,63,203,14,63,61,244,17,228,63,254,5,200,64,162,8,193,65,225,37,57,62,161,17,205,12,61,4,171,37,139,8,197,46,180,23,239,35,110,17,251,34,93,6,49,40,246,11,97,64,35,20,106,60,154,27,110,53,239,9,153,20,229,8,106,65,69,24,15,65,80,13,80,79,35,13,0,73,193,7,92,55,67,50,50,59,87,61,121,17,252,3,145,6,118,3,215,16,205,16,248,34,73,14,5,23,123,4,127,45,172,5,14,62,179,8,230,17,244,25,17,27,181,4,76,24,31,3,127,48,81,13,96,62,37,15,147,77,61,8,217,37,93,8,150,57,126,34,144,56,39,10,25,7,214,4,91,30,45,3,135,74,58,17,178,21,16,8,103,14,28,11,27,68,208,8,57,65,134,17,71,63,12,21,92,31,203,10,77,13,71,8,18,68,101,21,130,53,226,10,167,77,160,10,138,35,40,15,252,70,225,18,184,67,175,47,252,19,228,3,71,19,220,3,160,38,9,12,126,23,251,20,9,62,131,6,213,32,159,4,239,58,62,9,65,77,90,27,187,46,26,6,111,28,104,4,219,65,252,5,146,61,5,21,116,57,17,8,137,78,107,8,6,67,53,32,247,69,174,24,91,21,224,5,4,16,14,10,13,68,154,26,41,22,72,11,252,64,54,13,15,35,39,7,191,78,129,18,94,76,126,28,2,26,221,10,208,44,249,12,197,75,190,19,190,73,114,18,55,64,69,9,206,79,34,17,89,44,158,103,73,45,252,11,50,11,30,6,244,19,46,4,142,37,51,19,75,19,208,13,117,29,110,3,237,80,83,3,26,27,43,17,159,65,53,30,153,39,251,3,117,38,196,3,134,60,115,15,99,60,102,13,175,73,214,3,152,78,195,3,236,65,87,50,254,55,104,16,199,25,196,4,6,36,46,3,46,66,14,20,29,22,34,19,112,21,6,7,34,79,122,15,109,66,34,24,9,70,41,23,149,36,92,13,50,29,179,7,81,76,57,20,59,74,190,11,70,64,204,14,198,62,63,9,216,33,183,10,229,36,246,102,104,42,7,5,227,13,241,3,230,21,38,14,253,75,136,21,165,48,29,3,154,80,143,3,67,60,250,11,141,66,35,40,195,73,73,10,73,15,244,4,63,76,43,13,132,70,110,20,91,75,142,6,52,76,100,12,152,70,2,42,241,64,189,26,62,12,250,8,117,42,133,9,220,60,1,27,53,49,53,13,108,43,225,12,122,65,120,9,165,73,59,26,19,67,159,38,199,49,45,10,233,34,68,12,89,74,84,30,171,71,40,15,251,79,98,14,146,76,52,13,244,50,173,75,30,41,84,90,1,0,3,0,0,0,1,0,2,0,4,0,82,120,26,113,81,106,240,99,241,93,78,88,2,83,7,78,89,73,242,68,51,115,174,103,80,93,251,83,149,75,6,68,56,61,25,55,150,49,161,44,205,76,21,46,166,27,151,16,244,9,249,5,149,3,38,2,74,1,198,0,249,79,26,80,59,80,92,80,125,80,164,80,197,80,236,80,13,81,52,81,85,81,124,81,157,81,196,81,236,81,19,82,58,82,97,82,137,82,176,82,215,82,255,82,38,83,84,83,123,83,169,83,208,83,254,83,38,84,84,84,129,84,175,84,221,84,11,85,57,85,103,85,149,85,201,85,247,85,43,86,89,86,142,86,194,86,247,86,43,87,95,87,148,87,200,87,3,88,56,88,115,88,174,88,233,88,36,89,95,89,154,89,219,89,22,90,88,90,153,90,212,90,28,91,94,91,159,91,231,91,48,92,113,92,192,92,8,93,80,93,159,93,237,93,60,94,138,94,224,94,46,95,131,95,217,95,52,96,138,96,229,96,72,97,163,97,6,98,104,98,209,98,51,99,156,99,11,100,123,100,234,100,96,101,214,101,76,102,201,102,76,103,207,103,82,104,220,104,108,105,252,105,147,106,48,107,205,107,113,108,27,109,204,109,125,110,59,111,249,111,197,112,150,113,111,114,84,115,64,116,50,117,50,118,63,119,88,120,225,122,255,127,255,127,255,127,255,127,255,127,255,127,255,127,225,122,88,120,63,119,50,118,50,117,64,116,84,115,111,114,150,113,197,112,249,111,59,111,125,110,204,109,27,109,113,108,205,107,48,107,147,106,252,105,108,105,220,104,82,104,207,103,76,103,201,102,76,102,214,101,96,101,234,100,123,100,11,100,156,99,51,99,209,98,104,98,6,98,163,97,72,97,229,96,138,96,52,96,217,95,131,95,46,95,224,94,138,94,60,94,237,93,159,93,80,93,8,93,192,92,113,92,48,92,231,91,159,91,94,91,28,91,212,90,153,90,88,90,22,90,219,89,154,89,95,89,36,89,233,88,174,88,115,88,56,88,3,88,200,87,148,87,95,87,43,87,247,86,194,86,142,86,89,86,43,86,247,85,201,85,149,85,103,85,57,85,11,85,221,84,175,84,129,84,84,84,38,84,254,83,208,83,169,83,123,83,84,83,38,83,255,82,215,82,176,82,137,82,97,82,58,82,19,82,236,81,196,81,157,81,124,81,85,81,52,81,13,81,236,80,197,80,164,80,125,80,92,80,59,80,26,80,249,79,210,79,177,79,145,79,112,79,13,0,14,0,16,0,18,0,20,0,21,0,27,0,32,0,6,0,7,0,6,0,6,0,0,0,0,0,0,0,1,0,13,0,14,0,16,0,18,0,19,0,21,0,26,0,31,0,6,0,6,0,6,0,6,0,0,0,0,0,0,0,1,0,79,115,156,110,74,97,126,77,72,54,9,31,195,10,153,251,125,242,48,239,127,240,173,244,231,249,176,254,22,2,202,3,255,3,55,3,4,2,220,0,0,0,125,255,62,255,41,255,0,0,216,127,107,127,182,126,187,125,123,124,248,122,53,121,53,119,250,116,137,114,128,46,128,67,0,120,0,101,128,94,64,113,64,95,192,28,64,76,192,57,84,0,1,0,254,255,2,0,5,0,10,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,5,0,10,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,10,0,19,0,20,0,84,0,1,0,254,255,2,0,3,0,6,0,5,0,9,0,20,0,94,0,0,0,253,255,3,0,3,0,6,0,5,0,9,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,19,0,19,0,19,0,19,0,23,0,39,0,57,0,5,0,8,0,8,0,7,0,8,0,7,0,2,0,8,0,4,0,7,0,2,0,4,0,7,0,2,0,8,0,4,0,7,0,2,0,8,0,8,0,7,0,8,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,4,0,7,0,2,0,6,0,8,0,9,0,9,0,8,0,9,0,2,0,6,0,4,0,9,0,2,0,6,0,8,0,9,0,2,0,6,0,4,0,9,0,2,0,6,0,8,0,9,0,9,0,8,0,11,0,3,0,7,0,4,0,11,0,3,0,7,0,8,0,11,0,3,0,7,0,4,0,11,0,3,0,7,0,8,0,9,0,9,0,8,0,13,0,4,0,7,0,5,0,13,0,4,0,7,0,8,0,13,0,4,0,7,0,5,0,13,0,4,0,7,0,9,0,9,0,9,0,8,0,13,0,4,0,4,0,5,0,6,0,13,0,4,0,4,0,5,0,8,0,13,0,4,0,4,0,5,0,6,0,13,0,4,0,4,0,5,0,8,0,9,0,9,0,8,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,5,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,8,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,5,0,1,0,1,0,1,0,1,0,10,0,10,0,7,0,7,0,7,0,8,0,9,0,8,0,6,0,9,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,6,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,9,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,6,0,4,0,4,0,4,0,4,0,4,0,4,0,3,0,3,0,3,0,3,0,3,0,5,0,3,0,8,0,9,0,9,0,6,0,95,0,103,0,118,0,134,0,148,0,159,0,204,0,244,0,39,0,43,0,38,0,37,0,0,0,0,0,0,0,0,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,23,0,24,0,25,0,26,0,27,0,28,0,48,0,49,0,61,0,62,0,82,0,83,0,47,0,46,0,45,0,44,0,81,0,80,0,79,0,78,0,17,0,18,0,20,0,22,0,77,0,76,0,75,0,74,0,29,0,30,0,43,0,42,0,41,0,40,0,38,0,39,0,16,0,19,0,21,0,50,0,51,0,59,0,60,0,63,0,64,0,72,0,73,0,84,0,85,0,93,0,94,0,32,0,33,0,35,0,36,0,53,0,54,0,56,0,57,0,66,0,67,0,69,0,70,0,87,0,88,0,90,0,91,0,34,0,55,0,68,0,89,0,37,0,58,0,71,0,92,0,31,0,52,0,65,0,86,0,7,0,6,0,5,0,4,0,3,0,2,0,1,0,0,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,23,0,24,0,25,0,26,0,27,0,46,0,65,0,84,0,45,0,44,0,43,0,64,0,63,0,62,0,83,0,82,0,81,0,102,0,101,0,100,0,42,0,61,0,80,0,99,0,28,0,47,0,66,0,85,0,18,0,41,0,60,0,79,0,98,0,29,0,48,0,67,0,17,0,20,0,22,0,40,0,59,0,78,0,97,0,21,0,30,0,49,0,68,0,86,0,19,0,16,0,87,0,39,0,38,0,58,0,57,0,77,0,35,0,54,0,73,0,92,0,76,0,96,0,95,0,36,0,55,0,74,0,93,0,32,0,51,0,33,0,52,0,70,0,71,0,89,0,90,0,31,0,50,0,69,0,88,0,37,0,56,0,75,0,94,0,34,0,53,0,72,0,91,0,0,0,1,0,4,0,5,0,3,0,6,0,7,0,2,0,13,0,15,0,8,0,9,0,11,0,12,0,14,0,10,0,16,0,28,0,74,0,29,0,75,0,27,0,73,0,26,0,72,0,30,0,76,0,51,0,97,0,50,0,71,0,96,0,117,0,31,0,77,0,52,0,98,0,49,0,70,0,95,0,116,0,53,0,99,0,32,0,78,0,33,0,79,0,48,0,69,0,94,0,115,0,47,0,68,0,93,0,114,0,46,0,67,0,92,0,113,0,19,0,21,0,23,0,22,0,18,0,17,0,20,0,24,0,111,0,43,0,89,0,110,0,64,0,65,0,44,0,90,0,25,0,45,0,66,0,91,0,112,0,54,0,100,0,40,0,61,0,86,0,107,0,39,0,60,0,85,0,106,0,36,0,57,0,82,0,103,0,35,0,56,0,81,0,102,0,34,0,55,0,80,0,101,0,42,0,63,0,88,0,109,0,41,0,62,0,87,0,108,0,38,0,59,0,84,0,105,0,37,0,58,0,83,0,104,0,0,0,1,0,4,0,3,0,5,0,6,0,13,0,7,0,2,0,8,0,9,0,11,0,15,0,12,0,14,0,10,0,28,0,82,0,29,0,83,0,27,0,81,0,26,0,80,0,30,0,84,0,16,0,55,0,109,0,56,0,110,0,31,0,85,0,57,0,111,0,48,0,73,0,102,0,127,0,32,0,86,0,51,0,76,0,105,0,130,0,52,0,77,0,106,0,131,0,58,0,112,0,33,0,87,0,19,0,23,0,53,0,78,0,107,0,132,0,21,0,22,0,18,0,17,0,20,0,24,0,25,0,50,0,75,0,104,0,129,0,47,0,72,0,101,0,126,0,54,0,79,0,108,0,133,0,46,0,71,0,100,0,125,0,128,0,103,0,74,0,49,0,45,0,70,0,99,0,124,0,42,0,67,0,96,0,121,0,39,0,64,0,93,0,118,0,38,0,63,0,92,0,117,0,35,0,60,0,89,0,114,0,34,0,59,0,88,0,113,0,44,0,69,0,98,0,123,0,43,0,68,0,97,0,122,0,41,0,66,0,95,0,120,0,40,0,65,0,94,0,119,0,37,0,62,0,91,0,116,0,36,0,61,0,90,0,115,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,26,0,87,0,27,0,88,0,28,0,89,0,29,0,90,0,30,0,91,0,51,0,80,0,112,0,141,0,52,0,81,0,113,0,142,0,54,0,83,0,115,0,144,0,55,0,84,0,116,0,145,0,58,0,119,0,59,0,120,0,21,0,22,0,23,0,17,0,18,0,19,0,31,0,60,0,92,0,121,0,56,0,85,0,117,0,146,0,20,0,24,0,25,0,50,0,79,0,111,0,140,0,57,0,86,0,118,0,147,0,49,0,78,0,110,0,139,0,48,0,77,0,53,0,82,0,114,0,143,0,109,0,138,0,47,0,76,0,108,0,137,0,32,0,33,0,61,0,62,0,93,0,94,0,122,0,123,0,41,0,42,0,43,0,44,0,45,0,46,0,70,0,71,0,72,0,73,0,74,0,75,0,102,0,103,0,104,0,105,0,106,0,107,0,131,0,132,0,133,0,134,0,135,0,136,0,34,0,63,0,95,0,124,0,35,0,64,0,96,0,125,0,36,0,65,0,97,0,126,0,37,0,66,0,98,0,127,0,38,0,67,0,99,0,128,0,39,0,68,0,100,0,129,0,40,0,69,0,101,0,130,0,8,0,7,0,6,0,5,0,4,0,3,0,2,0,14,0,16,0,9,0,10,0,12,0,13,0,15,0,11,0,17,0,20,0,22,0,24,0,23,0,19,0,18,0,21,0,56,0,88,0,122,0,154,0,57,0,89,0,123,0,155,0,58,0,90,0,124,0,156,0,52,0,84,0,118,0,150,0,53,0,85,0,119,0,151,0,27,0,93,0,28,0,94,0,29,0,95,0,30,0,96,0,31,0,97,0,61,0,127,0,62,0,128,0,63,0,129,0,59,0,91,0,125,0,157,0,32,0,98,0,64,0,130,0,1,0,0,0,25,0,26,0,33,0,99,0,34,0,100,0,65,0,131,0,66,0,132,0,54,0,86,0,120,0,152,0,60,0,92,0,126,0,158,0,55,0,87,0,121,0,153,0,117,0,116,0,115,0,46,0,78,0,112,0,144,0,43,0,75,0,109,0,141,0,40,0,72,0,106,0,138,0,36,0,68,0,102,0,134,0,114,0,149,0,148,0,147,0,146,0,83,0,82,0,81,0,80,0,51,0,50,0,49,0,48,0,47,0,45,0,44,0,42,0,39,0,35,0,79,0,77,0,76,0,74,0,71,0,67,0,113,0,111,0,110,0,108,0,105,0,101,0,145,0,143,0,142,0,140,0,137,0,133,0,41,0,73,0,107,0,139,0,37,0,69,0,103,0,135,0,38,0,70,0,104,0,136,0,7,0,6,0,5,0,4,0,3,0,2,0,1,0,0,0,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,26,0,27,0,28,0,29,0,30,0,31,0,115,0,116,0,117,0,118,0,119,0,120,0,72,0,73,0,161,0,162,0,65,0,68,0,69,0,108,0,111,0,112,0,154,0,157,0,158,0,197,0,200,0,201,0,32,0,33,0,121,0,122,0,74,0,75,0,163,0,164,0,66,0,109,0,155,0,198,0,19,0,23,0,21,0,22,0,18,0,17,0,20,0,24,0,25,0,37,0,36,0,35,0,34,0,80,0,79,0,78,0,77,0,126,0,125,0,124,0,123,0,169,0,168,0,167,0,166,0,70,0,67,0,71,0,113,0,110,0,114,0,159,0,156,0,160,0,202,0,199,0,203,0,76,0,165,0,81,0,82,0,92,0,91,0,93,0,83,0,95,0,85,0,84,0,94,0,101,0,102,0,96,0,104,0,86,0,103,0,87,0,97,0,127,0,128,0,138,0,137,0,139,0,129,0,141,0,131,0,130,0,140,0,147,0,148,0,142,0,150,0,132,0,149,0,133,0,143,0,170,0,171,0,181,0,180,0,182,0,172,0,184,0,174,0,173,0,183,0,190,0,191,0,185,0,193,0,175,0,192,0,176,0,186,0,38,0,39,0,49,0,48,0,50,0,40,0,52,0,42,0,41,0,51,0,58,0,59,0,53,0,61,0,43,0,60,0,44,0,54,0,194,0,179,0,189,0,196,0,177,0,195,0,178,0,187,0,188,0,151,0,136,0,146,0,153,0,134,0,152,0,135,0,144,0,145,0,105,0,90,0,100,0,107,0,88,0,106,0,89,0,98,0,99,0,62,0,47,0,57,0,64,0,45,0,63,0,46,0,55,0,56,0,0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,23,0,15,0,16,0,17,0,18,0,19,0,20,0,21,0,22,0,24,0,25,0,26,0,27,0,28,0,38,0,141,0,39,0,142,0,40,0,143,0,41,0,144,0,42,0,145,0,43,0,146,0,44,0,147,0,45,0,148,0,46,0,149,0,47,0,97,0,150,0,200,0,48,0,98,0,151,0,201,0,49,0,99,0,152,0,202,0,86,0,136,0,189,0,239,0,87,0,137,0,190,0,240,0,88,0,138,0,191,0,241,0,91,0,194,0,92,0,195,0,93,0,196,0,94,0,197,0,95,0,198,0,29,0,30,0,31,0,32,0,33,0,34,0,35,0,50,0,100,0,153,0,203,0,89,0,139,0,192,0,242,0,51,0,101,0,154,0,204,0,55,0,105,0,158,0,208,0,90,0,140,0,193,0,243,0,59,0,109,0,162,0,212,0,63,0,113,0,166,0,216,0,67,0,117,0,170,0,220,0,36,0,37,0,54,0,53,0,52,0,58,0,57,0,56,0,62,0,61,0,60,0,66,0,65,0,64,0,70,0,69,0,68,0,104,0,103,0,102,0,108,0,107,0,106,0,112,0,111,0,110,0,116,0,115,0,114,0,120,0,119,0,118,0,157,0,156,0,155,0,161,0,160,0,159,0,165,0,164,0,163,0,169,0,168,0,167,0,173,0,172,0,171,0,207,0,206,0,205,0,211,0,210,0,209,0,215,0,214,0,213,0,219,0,218,0,217,0,223,0,222,0,221,0,73,0,72,0,71,0,76,0,75,0,74,0,79,0,78,0,77,0,82,0,81,0,80,0,85,0,84,0,83,0,123,0,122,0,121,0,126,0,125,0,124,0,129,0,128,0,127,0,132,0,131,0,130,0,135,0,134,0,133,0,176,0,175,0,174,0,179,0,178,0,177,0,182,0,181,0,180,0,185,0,184,0,183,0,188,0,187,0,186,0,226,0,225,0,224,0,229,0,228,0,227,0,232,0,231,0,230,0,235,0,234,0,233,0,238,0,237,0,236,0,96,0,199,0,0,0,2,0,0,0,3,0,0,0,2,0,0,0,3,0,1,0,3,0,2,0,4,0,1,0,4,0,1,0,4,0,0,0,205,12,156,25,0,32,102,38,205,44,0,48,51,51,102,54,154,57,205,60,0,64,51,67,102,70,154,73,205,76,159,0,64,241,53,167,206,0,190,242,52,176,12,1,67,244,88,185,93,1,201,245,133,194,163,1,215,246,223,200,226,1,166,247,189,205,42,2,116,248,147,210,125,2,66,249,109,215,221,2,18,250,77,220,74,3,222,250,30,225,201,3,174,251,0,230,90,4,124,252,216,234,1,5,74,253,179,239,193,5,25,254,141,244,158,6,231,254,104,249,156,7,181,255,67,254,193,8,133,0,33,3,17,10,83,1,252,7,147,11,33,2,213,12,80,13,240,2,178,17,79,15,190,3,140,22,155,17,141,4,104,27,63,20,91,5,67,32,72,23,41,6,29,37,199,26,248,6,249,41,203,30,199,7,212,46,105,35,149,8,175,51,185,40,100,9,138,56,222,48,113,10,224,62,135,63,244,11,253,71,150,82,120,13,27,81,93,107,252,14,57,90,93,107,252,14,57,90,0,0,1,0,3,0,2,0,6,0,4,0,5,0,7,0,0,0,1,0,3,0,2,0,5,0,6,0,4,0,7,0,248,127,211,127,76,127,108,126,51,125,163,123,188,121,127,119,239,116,12,114,217,110,89,107,141,103,121,99,31,95,130,90,166,85,141,80,60,75,182,69,0,64,28,58,15,52,223,45,141,39,32,33,156,26,6,20,97,13,178,6,0,0,78,249,159,242,250,235,100,229,224,222,115,216,33,210,241,203,228,197,0,192,74,186,196,180,115,175,90,170,126,165,225,160,135,156,115,152,167,148,39,145,244,141,17,139,129,136,68,134,93,132,205,130,148,129,180,128,45,128,8,128,255,127,46,124,174,120,118,117,125,114,186,111,41,109,194,106,131,104,102,102,105,100,137,98,194,96,19,95,122,93,245,91,130,90,33,89,207,87,139,86,85,85,44,84,15,83,252,81,244,80,246,79,1,79,20,78,48,77,83,76,126,75,175,74,231,73,37,73,104,72,178,71,0,71,84,70,173,69,10,69,107,68,209,67,59,67,168,66,25,66,142,65,6,65,130,64,0,64,0,0,175,5,50,11,140,16,192,21,207,26,188,31,136,36,53,41,196,45,55,50,143,54,206,58,245,62,4,67,252,70,223,74,174,78,105,82,17,86,167,89,44,93,159,96,3,100,87,103,155,106,209,109,250,112,20,116,33,119,34,122,23,125,255,127,255,127,217,127,98,127,157,126,138,125,42,124,125,122,133,120,66,118,182,115,227,112,202,109,110,106,208,102,242,98,215,94,130,90,246,85,52,81,64,76,29,71,206,65,87,60,186,54,252,48,31,43,40,37,26,31,249,24,200,18,140,12,72,6,0,0,184,249,116,243,56,237,7,231,230,224,216,218,225,212,4,207,70,201,169,195,50,190,227,184,192,179,204,174,10,170,126,165,41,161,14,157,48,153,146,149,54,146,29,143,74,140,190,137,123,135,131,133,214,131,118,130,99,129,158,128,39,128,0,128,249,150,148,221,53,235,27,241,93,244,116,246,223,247,237,248,184,249,86,250,214,250,61,251,148,251,221,251,26,252,78,252,123,252,163,252,197,252,227,252,252,252,18,253,38,253,55,253,69,253,81,253,91,253,100,253,106,253,111,253,114,253,116,253,116,253,114,253,111,253,106,253,100,253,91,253,81,253,69,253,55,253,38,253,18,253,252,252,227,252,197,252,163,252,123,252,78,252,26,252,221,251,148,251,61,251,214,250,86,250,184,249,237,248,223,247,116,246,93,244,27,241,53,235,148,221,249,150,48,117,144,101,8,82,152,58,64,31,0,0,192,224,104,197,248,173,112,154,153,104,33,3,201,9,85,253,154,250,70,2,92,2,6,251,183,13,250,232,182,17,13,254,108,248,195,11,62,236,238,21,58,248,219,251,77,250,90,17,68,253,41,235,1,18,196,1,179,253,232,242,137,11,243,4,68,251,226,245,195,6,86,14,133,238,49,252,39,17,23,246,181,3,173,250,45,252,102,22,66,118,247,14,60,240,156,11,232,251,22,252,173,9,29,244,255,10,73,247,217,6,181,249,178,6,17,249,7,6,16,252,173,1,87,255,216,1,16,251,128,8,110,245,219,9,171,249,88,1,58,3,7,250,188,6,135,249,165,6,241,247,84,10,12,244,81,11,70,248,45,2,12,3,167,250,74,3,143,2,98,57,254,44,244,4,55,245,217,233,90,29,221,255,9,245,32,244,215,18,136,11,24,223,201,14,175,5,131,8,67,222,115,31,201,247,82,250,9,3,84,4,175,246,206,8,149,254,94,253,201,247,158,23,207,233,48,4,51,12,62,236,192,20,231,246,112,241,12,27,207,240,163,2,17,249,29,0,161,39,66,118,247,14,60,240,156,11,232,251,22,252,173,9,29,244,255,10,73,247,217,6,181,249,178,6,17,249,7,6,16,252,173,1,87,255,216,1,16,251,128,8,110,245,219,9,171,249,88,1,58,3,7,250,188,6,135,249,165,6,241,247,84,10,12,244,81,11,70,248,45,2,12,3,167,250,74,3,143,2,0,64,103,65,213,66,76,68,203,69,82,71,226,72,122,74,28,76,199,77,123,79,56,81,255,82,209,84,172,86,146,88,130,90,126,92,132,94,150,96,180,98,221,100,18,103,84,105,162,107,254,109,102,112,221,114,96,117,242,119,147,122,66,125,255,127,3,115,186,110,119,98,225,79,109,57,245,33,71,12,184,250,206,238,23,233,38,233,191,237,33,245,96,253,187,4,232,9,58,12,175,11,211,8,146,4,0,0,23,252,140,249,180,248,126,249,133,251,48,254,218,0,244,2,36,4,75,4,136,3,38,2,135,0,11,255,254,253,134,253,166,253,61,254,25,255,0,0,191,0,52,1,84,1,40,1,198,0,78,0,220,255,136,255,93,255,91,255,124,255,177,255,237,255,34,0,73,0,91,0,89,0,70,0,38,0,0,0,254,254,194,254,73,254,134,253,112,253,251,252,57,253,10,254,244,254,63,255,254,255,125,0,122,0,217,255,247,255,105,0,129,0,27,1,116,1,63,2,235,254,188,254,59,255,25,254,67,254,150,254,220,254,229,255,177,0,31,2,86,1,5,2,4,2,130,0,27,0,152,255,136,255,116,255,182,255,200,255,204,253,81,252,16,250,59,252,210,252,242,253,190,254,254,255,159,0,145,2,200,254,228,254,126,254,171,253,19,254,242,253,94,254,27,255,105,0,193,1,211,253,154,252,205,251,105,252,74,252,16,253,59,253,196,254,62,0,230,1,198,254,65,255,53,255,182,254,96,255,153,255,205,255,131,0,82,1,3,2,10,6,224,8,194,14,112,21,60,27,190,32,63,39,221,43,222,49,146,53,84,37,17,42,27,49,236,51,45,56,131,45,92,41,39,38,145,33,84,25,6,0,82,0,125,255,154,0,200,255,33,253,183,0,191,255,247,254,9,0,46,255,151,254,113,0,206,2,25,7,242,3,190,4,37,6,89,3,53,5,228,8,59,3,32,6,141,7,205,2,197,7,158,8,70,3,148,4,31,7,209,2,232,3,106,8,30,1,220,1,229,5,9,255,237,253,230,0,147,0,174,255,57,2,26,0,79,255,80,252,229,255,239,254,180,2,92,255,248,254,73,255,224,0,22,3,15,4,131,3,178,3,89,2,229,1,3,3,126,4,12,2,165,2,135,3,116,255,119,1,10,3,154,1,164,2,173,1,45,1,18,2,241,3,207,2,134,2,38,0,226,0,111,1,40,0,145,0,211,255,7,254,34,1,121,0,135,255,46,1,127,0,166,0,132,255,129,254,68,252,154,254,57,254,47,252,203,2,110,3,126,3,210,3,155,3,211,0,221,1,16,1,64,0,188,0,178,255,17,0,113,255,191,255,38,0,131,2,74,2,109,2,122,255,86,254,117,253,91,1,33,2,4,11,164,4,166,10,138,9,142,0,176,255,199,6,27,1,130,0,205,1,250,254,113,254,135,251,101,254,155,0,174,1,73,1,119,1,11,3,53,0,30,255,117,255,127,255,20,255,146,6,29,1,232,2,47,5,226,2,185,2,128,6,56,1,153,1,10,1,69,1,208,2,135,0,1,0,221,0,197,1,8,0,203,0,145,0,43,1,128,2,248,2,29,0,212,1,126,2,103,0,173,1,123,1,164,1,186,3,164,3,46,5,186,4,234,4,192,2,244,3,128,4,90,255,68,254,246,254,196,254,126,255,136,254,191,0,127,4,112,7,16,255,225,253,20,251,144,255,12,1,183,4,70,0,38,4,47,6,22,1,80,5,38,6,254,254,240,254,0,253,19,0,51,2,192,8,253,255,247,254,135,0,217,254,177,253,124,254,140,0,98,1,50,255,252,254,8,254,229,252,79,254,50,253,217,250,109,0,75,1,194,3,83,254,169,255,140,2,216,254,170,1,251,3,17,255,7,3,83,3,233,1,54,5,49,4,178,254,180,254,25,0,31,2,182,4,15,7,70,1,61,0,215,2,66,2,81,3,125,5,48,255,235,254,73,1,104,255,64,0,157,2,78,254,90,253,41,253,58,254,185,255,251,0,93,2,224,1,254,0,30,254,11,0,228,3,223,254,139,1,230,1,210,2,25,4,160,5,226,255,196,254,238,252,150,255,141,255,149,253,93,3,194,5,132,5,31,4,86,5,160,4,44,3,213,4,157,3,42,0,5,255,192,253,86,1,141,0,58,254,88,255,176,255,79,5,170,254,112,253,29,249,100,0,53,3,213,2,222,3,235,2,32,3,76,1,184,1,56,2,151,2,123,1,84,3,112,0,165,0,143,254,85,2,142,3,26,1,248,255,66,3,1,5,160,254,60,2,183,2,206,1,198,8,14,7,89,1,190,0,94,5,160,1,147,3,118,8,168,0,174,255,24,1,252,253,66,254,72,3,47,0,21,2,44,0,150,254,57,253,137,251,22,0,193,0,192,5,171,255,233,0,21,7,194,255,67,2,224,5,38,2,176,3,213,6,211,2,138,2,124,4,204,3,116,3,115,5,87,254,131,2,0,0,232,3,184,3,74,4,249,0,166,5,160,2,178,254,169,255,124,8,214,253,90,7,112,10,140,0,34,7,61,7,152,3,213,6,30,10,52,4,141,7,246,7,119,255,69,254,237,249,245,4,150,4,212,1,19,254,134,255,241,5,61,254,9,4,190,4,226,1,159,6,94,4,47,3,137,2,128,1,66,254,76,253,107,0,193,254,163,253,138,255,49,255,7,254,13,2,44,254,244,255,176,10,75,0,142,7,25,5,112,3,54,9,219,8,5,5,39,6,212,7,208,255,208,254,94,251,77,254,51,254,5,255,146,254,108,254,221,253,223,254,163,253,171,253,230,253,214,252,91,255,136,255,3,0,100,1,127,2,217,4,222,5,96,0,177,0,238,2,77,254,183,253,106,251,156,254,109,0,177,255,27,254,32,1,213,7,9,0,92,4,219,2,112,3,86,8,178,3,247,254,49,6,41,4,133,4,186,4,75,3,14,254,100,253,175,1,118,1,65,1,27,255,160,5,53,8,101,5,193,1,205,1,131,4,151,255,39,0,128,254,249,254,111,1,182,0,141,254,108,253,5,3,68,255,127,4,203,3,53,5,96,6,155,5,6,3,243,4,197,4,30,254,192,252,47,250,19,255,46,255,92,3,122,3,79,6,40,4,216,1,38,4,168,4,185,0,53,4,221,3,200,253,32,252,88,249,63,254,122,252,5,248,114,255,135,254,54,254,46,255,214,253,251,251,245,255,109,4,217,8,183,254,93,253,131,252,6,255,145,2,163,4,7,2,230,5,243,6,8,2,27,2,123,5,15,2,141,5,22,5,205,253,153,252,32,251,109,255,49,254,111,3,180,255,30,9,24,11,51,2,13,10,81,9,120,2,134,7,104,11,207,2,231,7,48,7,223,253,45,253,84,4,129,0,131,255,116,3,137,5,96,6,157,3,162,255,30,6,215,6,171,254,253,5,15,6,79,2,139,1,238,254,180,255,213,3,15,11,153,0,169,11,52,7,8,4,5,10,189,10,228,5,16,11,87,7,23,3,175,4,26,2,66,255,59,254,209,5,234,254,220,253,134,4,11,255,149,7,252,7,0,4,24,6,114,6,0,2,253,0,210,1,194,255,189,254,127,4,39,254,136,254,251,1,79,254,100,5,114,8,131,3,151,7,165,5,134,0,192,2,184,1,204,1,13,2,228,255,62,254,23,1,58,5,0,0,203,3,252,0,67,254,141,253,33,252,164,254,166,253,112,250,142,1,200,2,120,6,149,255,58,1,78,255,93,0,178,8,190,8,6,2,81,3,144,2,50,254,57,253,65,254,174,0,222,255,167,4,137,255,42,0,237,3,140,254,18,1,246,2,12,4,48,9,46,7,163,2,188,6,218,5,174,1,6,5,85,8,127,255,73,254,0,0,139,254,32,3,96,8,6,0,51,6,174,9,222,1,84,2,80,8,84,254,32,253,225,5,129,1,178,0,212,3,139,0,193,1,201,4,242,253,182,252,42,252,145,0,18,6,218,4,111,2,168,5,144,2,93,1,248,3,202,5,31,0,232,254,159,1,196,254,212,2,105,6,104,1,34,4,44,2,76,254,154,254,177,4,157,254,99,4,147,7,145,1,48,6,200,8,241,253,12,252,99,1,233,0,238,0,185,8,218,253,127,252,129,253,147,254,11,254,165,7,133,1,68,7,85,6,162,0,108,4,240,4,19,255,150,4,110,5,128,253,101,254,116,0,28,255,158,6,250,8,103,6,138,8,219,8,50,2,249,4,98,10,67,1,82,1,238,6,66,2,83,4,84,3,22,0,82,2,166,3,113,255,206,2,190,1,50,0,71,0,247,255,174,254,70,253,129,250,102,0,118,255,204,252,202,254,43,254,133,251,158,1,67,0,245,254,36,4,46,3,161,5,12,6,80,5,248,4,218,6,103,7,125,6,227,7,85,8,28,7,16,7,14,9,53,7,132,2,163,255,198,1,90,3,73,1,120,255,233,1,254,254,128,255,58,255,23,253,215,255,204,255,247,254,39,252,90,1,137,0,223,1,51,249,20,253,84,253,117,251,67,249,145,254,129,252,135,251,240,252,24,254,78,252,56,252,171,255,122,254,43,253,215,0,172,254,85,255,252,3,148,3,177,7,52,2,179,0,234,2,150,2,209,3,198,6,119,3,110,2,146,3,171,3,88,3,141,4,53,1,176,2,35,3,149,3,161,0,58,2,118,0,236,255,229,254,208,252,214,255,204,0,52,251,187,254,50,254,61,252,54,255,113,255,36,252,28,254,151,254,66,253,46,252,35,254,210,254,234,252,92,251,156,255,238,252,192,251,226,251,77,252,108,249,54,255,181,252,242,252,241,251,158,250,123,252,144,253,146,255,171,255,100,1,213,0,246,255,19,254,108,1,6,3,169,1,54,3,223,1,173,255,45,2,8,2,32,252,232,249,196,253,165,253,27,253,230,255,10,254,130,253,121,252,209,0,50,1,147,0,196,254,175,253,172,253,171,255,45,255,31,255,106,252,239,253,117,0,233,0,73,254,30,253,77,4,239,2,121,2,177,5,180,6,231,5,229,6,177,5,142,3,98,4,132,4,81,3,74,5,100,3,214,1,153,252,130,251,252,248,153,252,163,252,32,252,138,255,155,0,212,0,229,251,175,252,162,253,163,251,199,248,66,245,5,252,109,250,179,248,114,1,72,255,98,254,191,3,237,1,104,0,190,3,15,4,31,2,154,0,141,2,201,0,225,4,251,1,150,0,151,2,247,1,230,0,111,2,9,3,163,2,147,2,88,0,146,255,75,3,244,0,224,0,126,1,29,2,46,1,212,2,177,1,154,2,142,4,222,2,85,1,118,255,20,0,115,254,97,251,88,254,210,255,191,254,160,254,132,255,53,5,253,3,56,4,6,1,110,1,211,2,154,3,27,1,217,253,31,0,132,253,157,253,79,253,71,253,97,254,72,252,245,252,55,255,207,250,170,253,153,254,71,252,251,250,166,0,237,1,49,1,221,0,78,3,191,2],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE),allocate([98,2,72,3,168,3,6,3,45,253,212,250,19,251,155,254,255,251,148,250,184,251,160,250,147,254,120,250,167,248,160,253,250,248,65,249,94,253,223,253,107,251,65,253,166,2,18,3,148,0,133,255,184,2,8,5,132,2,94,1,246,255,158,1,102,2,15,0,137,0,88,1,45,255,210,252,24,250,205,252,121,254,94,252,180,253,47,0,177,253,126,252,115,252,183,251,93,255,8,251,113,251,99,255,72,250,11,250,123,254,6,251,92,251,144,253,159,2,213,0,198,1,124,0,238,254,243,253,39,253,16,254,104,255,192,250,122,0,135,0,167,244,179,253,118,254,64,249,185,1,206,255,196,5,136,3,19,3,60,1,236,0,72,254,165,254,217,0,157,1,113,252,107,252,121,0,57,254,92,252,202,0,164,255,47,254,137,254,232,1,134,1,218,1,108,3,217,2,60,1,233,248,224,250,99,253,87,0,194,3,176,1,51,2,7,255,222,251,250,0,29,1,81,4,117,4,171,1,184,2,242,251,128,249,210,249,76,252,90,1,160,0,203,254,240,254,166,252,158,2,112,2,226,4,80,252,104,254,102,253,162,253,192,254,128,254,20,254,230,0,65,0,78,1,206,255,240,255,240,255,78,253,139,250,255,6,180,6,119,5,174,9,15,8,124,5,221,4,191,5,146,5,130,254,243,251,254,255,173,0,114,254,121,4,211,5,232,7,9,7,4,3,250,4,226,5,149,5,199,6,209,7,55,4,194,4,249,4,126,251,197,248,207,250,216,252,147,251,184,251,61,254,247,251,70,249,65,0,66,2,172,255,60,250,126,246,14,249,3,253,170,250,18,254,38,255,174,253,93,252,81,1,20,255,50,2,53,9,102,10,146,7,209,5,252,4,106,3,189,0,102,1,118,1,17,250,23,247,214,246,57,252,9,251,209,247,140,253,92,251,250,249,125,6,19,4,34,2,53,2,37,4,220,2,192,255,188,252,78,254,76,254,160,255,203,0,54,4,192,4,100,6,139,3,254,5,218,3,70,1,197,3,77,3,142,0,172,255,197,0,214,1,75,9,34,6,109,4,214,1,190,4,139,1,96,5,176,4,101,4,18,4,92,1,225,253,46,251,136,254,41,255,75,255,225,1,101,248,171,249,46,255,18,253,95,251,134,1,29,0,113,254,27,0,52,3,212,4,243,2,183,2,211,3,153,1,82,255,173,4,11,4,144,3,76,5,54,7,32,252,99,250,228,1,51,250,92,249,208,0,100,254,180,4,152,5,241,254,128,3,120,4,96,254,241,6,154,5,96,249,172,245,52,255,3,249,241,249,9,4,136,249,233,249,23,5,27,251,203,249,57,4,99,253,185,251,190,255,86,253,64,1,167,254,147,2,49,1,45,4,244,250,220,252,237,255,157,249,245,250,29,0,109,249,15,254,71,0,225,254,249,255,156,255,18,254,62,252,19,255,84,3,89,7,204,6,63,251,149,250,227,0,108,253,46,1,117,1,96,0,63,4,233,4,206,251,123,249,160,0,229,1,28,8,6,7,90,252,36,255,40,2,172,253,156,253,237,0,80,1,184,6,111,3,131,2,117,2,178,1,243,4,10,2,97,6,15,0,244,0,71,254,195,5,205,2,184,0,27,7,54,6,173,6,220,3,5,1,169,3,45,8,41,9,240,5,91,8,66,7,70,6,191,253,189,253,77,251,68,252,135,0,24,254,48,254,51,0,174,254,139,253,164,254,45,253,122,4,25,8,162,5,144,8,186,5,143,3,92,250,220,249,26,247,120,5,198,2,17,5,55,5,121,2,160,3,154,5,146,8,34,10,118,9,156,8,89,7,214,3,194,8,62,7,124,1,24,3,121,4,193,255,229,253,158,1,4,255,60,252,198,254,19,251,85,253,244,252,193,252,242,253,19,252,126,249,145,251,88,254,181,249,60,254,213,254,244,4,24,4,130,2,123,4,85,3,88,3,93,253,176,254,139,0,220,8,63,5,138,5,29,0,0,3,29,3,56,251,167,1,52,2,218,250,198,251,245,0,234,250,212,252,61,2,238,250,175,249,134,2,56,252,66,3,211,2,225,3,116,6,235,7,65,255,207,252,176,1,150,2,60,0,198,0,114,2,229,3,50,5,112,6,171,7,9,5,195,249,163,255,211,255,192,251,37,0,172,255,117,6,47,10,33,9,41,4,248,7,73,9,115,4,22,9,70,8,91,3,101,1,230,5,152,2,203,4,75,4,223,1,80,5,144,3,105,7,218,6,227,7,144,4,117,7,248,6,143,1,34,0,0,1,175,253,208,254,227,251,35,2,158,6,127,5,135,2,157,255,171,254,212,5,111,6,166,4,38,0,124,253,44,255,139,1,78,3,222,0,64,253,3,253,52,253,44,253,84,248,12,245,106,255,35,1,174,255,209,4,179,5,239,3,116,255,101,255,153,0,183,1,41,1,32,6,7,250,102,254,132,253,0,6,199,1,19,255,208,250,117,255,252,254,19,2,42,2,100,3,13,1,240,4,94,2,23,255,115,3,207,1,230,2,88,2,136,255,183,255,165,1,212,0,73,254,198,255,36,3,250,250,39,251,216,2,38,1,22,254,50,0,177,253,119,252,26,251,42,0,81,253,147,0,231,255,17,1,84,2,201,254,189,4,89,2,14,253,81,3,72,2,173,1,95,2,75,2,166,253,90,255,205,1,228,252,201,252,9,3,100,5,142,3,219,6,119,0,137,5,204,3,37,255,144,252,196,249,231,251,14,252,182,1,55,253,157,250,78,0,0,0,65,254,101,251,144,251,217,250,219,249,200,8,231,6,29,5,178,3,47,6,152,5,126,4,226,1,180,1,43,254,172,251,106,2,65,254,58,252,64,4,28,251,21,250,142,255,176,251,40,248,189,253,210,0,101,2,241,1,73,248,99,250,130,2,11,251,168,252,243,3,146,249,95,251,39,4,237,249,96,253,180,4,100,249,166,251,111,2,45,252,210,250,3,251,27,2,109,255,126,3,182,250,127,252,78,254,120,3,219,1,172,1,153,0,128,254,82,1,44,250,1,254,103,1,50,252,165,251,42,254,105,0,218,253,165,2,87,252,135,251,109,3,124,1,252,254,210,0,149,6,156,3,232,4,239,6,166,4,71,4,139,5,119,2,21,2,115,2,43,1,165,254,101,254,234,253,135,2,118,253,29,0,173,253,134,254,169,250,27,6,122,5,97,4,185,5,65,4,130,5,136,2,208,247,190,251,250,255,55,1,62,255,155,252,129,253,193,252,160,1,118,251,56,251,69,5,33,251,83,252,21,7,111,247,61,248,197,1,149,253,169,250,68,252,186,249,76,248,29,250,105,251,223,251,176,251,135,254,89,2,201,0,84,7,57,3,118,1,82,254,213,250,29,0,139,250,31,251,205,250,17,252,32,250,192,3,135,250,39,248,197,0,157,250,99,248,20,255,203,251,123,0,166,1,103,2,245,4,34,2,206,254,246,5,136,3,170,4,252,6,153,4,142,253,140,252,10,250,199,0,254,2,224,5,215,251,94,3,197,0,246,251,19,249,137,252,224,252,145,0,87,2,146,251,249,253,114,2,75,251,122,248,244,1,114,252,239,251,141,250,60,250,225,249,55,252,245,253,74,3,34,0,2,7,134,2,94,3,73,251,160,248,22,252,178,255,247,255,96,253,20,4,247,2,80,0,168,253,115,4,251,3,57,0,208,7,142,5,191,252,134,5,97,4,78,251,94,6,236,4,51,254,140,5,220,4,1,6,207,3,253,0,229,254,68,1,153,254,87,2,61,255,106,0,76,2,62,0,181,253,11,253,133,2,205,0,51,0,177,4,246,2,71,251,161,2,122,254,144,253,45,6,173,3,105,255,255,3,223,2,4,11,21,5,178,2,210,254,12,2,157,255,124,252,204,249,91,251,60,4,251,0,238,0,222,7,0,7,242,3,221,4,97,6,205,6,53,251,252,249,72,251,147,253,200,1,147,255,40,0,191,255,20,3,219,252,69,253,186,250,185,253,136,3,64,3,223,252,20,2,82,2,180,7,128,5,71,5,103,251,168,248,190,247,251,252,56,2,180,3,9,252,55,4,236,4,169,251,226,1,126,255,242,6,20,4,12,3,45,250,245,0,144,3,196,254,139,251,107,252,232,253,94,250,214,246,239,252,246,249,60,248,45,248,1,1,141,3,199,248,135,253,71,251,254,249,130,248,226,251,70,6,191,8,40,6,201,253,36,250,248,249,1,251,195,0,89,5,207,252,37,1,195,4,243,253,118,2,173,4,94,249,135,246,208,248,209,254,219,2,235,2,111,251,5,255,13,1,74,252,181,255,148,6,98,251,59,254,237,3,193,249,73,2,122,1,229,247,197,253,85,254,239,253,121,251,109,251,229,254,51,255,204,253,228,252,222,4,205,2,229,8,159,3,27,2,58,254,47,2,184,1,51,253,180,5,79,6,250,251,28,4,74,6,111,251,118,255,79,3,226,0,39,0,156,253,29,251,150,255,39,253,117,253,200,3,22,5,54,253,132,253,191,6,97,1,45,4,154,1,226,252,100,255,75,4,194,253,150,3,190,1,226,250,244,3,210,1,128,5,55,6,253,2,149,5,100,5,221,6,157,7,164,7,74,9,42,6,255,7,100,8,148,3,98,0,249,255,101,7,138,5,93,8,92,1,125,5,43,6,152,0,110,4,9,7,245,254,154,0,115,5,114,251,213,1,30,4,138,251,107,254,207,251,195,250,40,247,211,249,148,254,101,3,170,6,118,251,37,2,14,6,55,251,116,248,126,249,51,250,71,248,249,247,65,249,118,252,158,255,151,248,233,0,212,5,124,3,108,0,181,254,64,249,110,251,92,249,220,251,188,7,254,6,210,251,51,249,139,248,245,255,3,6,37,5,192,249,94,0,241,1,165,1,187,1,59,255,214,249,163,254,30,252,169,253,229,253,116,4,59,252,117,250,127,255,195,250,175,0,65,254,137,254,31,5,7,8,141,254,118,253,205,254,207,251,93,2,109,1,247,247,143,255,174,1,140,2,146,3,199,3,12,252,206,249,237,246,225,5,224,4,47,2,6,1,26,254,111,254,65,249,62,5,10,6,50,0,56,0,176,1,182,254,119,0,164,253,19,250,200,251,214,252,178,3,103,4,31,4,136,250,89,249,80,249,10,251,64,253,219,250,39,3,29,7,119,4,200,10,70,6,123,8,96,4,153,1,106,255,109,255,148,1,191,3,135,9,119,7,141,8,118,252,115,255,158,252,120,252,114,255,54,254,211,253,60,253,113,249,194,252,105,250,209,249,206,248,190,250,194,251,188,249,240,254,147,3,84,251,4,3,32,4,130,253,46,251,151,248,12,254,175,255,202,252,247,250,179,249,33,253,139,255,17,3,168,0,190,251,109,4,154,3,184,251,22,253,104,5,31,1,221,253,217,251,160,250,103,247,76,251,128,247,222,249,35,249,25,250,63,247,253,252,55,249,75,4,62,3,204,249,212,2,219,4,250,249,181,2,37,3,102,249,16,255,129,6,92,249,252,255,100,253,101,8,48,3,18,4,206,252,207,248,22,0,4,253,5,254,193,1,129,251,151,253,33,1,181,252,196,249,16,255,242,1,22,255,111,253,16,253,224,1,142,6,193,254,31,254,193,0,213,252,171,0,137,255,176,247,54,255,176,252,181,6,116,4,164,6,67,0,239,255,66,0,244,255,102,249,187,253,152,255,240,254,204,251,94,251,203,248,136,254,140,251,98,252,92,254,198,255,253,254,112,253,146,251,215,253,252,6,203,4,199,1,129,0,206,1,185,1,16,255,240,253,72,3,2,2,130,0,181,255,90,4,111,2,153,0,216,0,44,4,52,2,250,255,236,254,95,4,215,2,190,0,188,255,192,2,50,1,119,0,248,254,73,1,61,0,156,255,156,0,108,1,123,0,183,0,48,255,85,255,133,255,220,0,191,255,206,254,194,255,146,1,17,0,108,253,86,252,246,254,0,0,129,1,235,0,20,1,29,1,64,1,12,1,176,254,56,255,44,253,17,0,172,255,125,1,224,253,173,1,238,1,7,2,139,255,32,1,48,1,73,1,131,2,157,0,189,2,252,1,176,4,113,2,28,3,96,2,230,3,165,1,236,1,120,2,180,4,12,3,190,1,132,0,233,4,76,3,35,2,193,1,61,3,146,2,29,2,214,1,108,4,234,4,150,3,127,2,35,2,51,0,167,1,23,1,9,0,136,1,83,0,94,0,30,2,31,2,229,0,109,255,58,255,129,0,194,0,71,255,161,252,215,250,210,254,30,0,171,253,139,253,237,255,114,0,124,252,199,251,210,1,97,1,53,250,219,249,15,0,113,255,84,249,245,247,17,253,196,0,172,248,237,247,126,253,254,254,225,246,66,250,62,254,204,253,184,253,70,255,152,252,98,254,243,248,36,252,155,251,226,250,42,253,151,251,28,0,169,0,241,251,160,252,50,253,10,255,228,1,36,0,23,255,207,255,9,1,67,0,33,1,211,1,178,0,31,2,42,3,28,2,84,0,26,1,160,2,191,2,49,252,247,252,129,0,31,1,86,252,29,255,187,3,83,2,175,249,223,254,68,3,137,2,201,248,41,255,82,4,206,2,14,248,195,251,138,2,184,1,203,247,239,253,139,3,63,2,37,248,176,254,158,2,204,0,171,246,76,253,104,1,137,0,148,247,100,247,247,255,24,1,246,254,119,0,39,0,193,0,78,0,197,255,136,255,226,0,49,252,166,252,243,252,185,251,149,253,99,254,61,254,182,252,64,251,215,250,211,252,141,252,160,250,177,249,118,254,84,254,31,253,167,251,219,253,234,252,144,252,49,252,57,252,126,253,39,252,138,252,7,251,175,250,39,254,220,252,135,250,129,250,160,0,247,254,105,252,237,254,8,255,6,255,50,253,132,254,97,0,153,255,137,254,27,255,97,254,63,255,121,255,213,253,116,2,105,1,119,0,216,0,67,2,108,1,135,1,209,0,122,2,10,2,102,255,108,255,14,2,133,1,170,0,33,0,105,0,11,1,64,0,124,1,33,250,24,252,226,255,143,254,210,251,58,0,135,2,223,0,16,250,221,254,109,2,51,1,5,250,156,0,250,2,148,1,19,248,141,0,222,2,243,1,199,248,118,253,50,1,0,2,69,255,152,255,197,255,182,1,134,0,26,255,156,0,70,255,195,255,252,254,240,255,10,0,199,253,253,255,91,254,215,254,67,249,247,253,166,254,178,0,174,250,197,255,212,255,157,0,158,247,51,254,42,254,163,254,134,247,255,255,143,254,135,255,213,249,139,254,124,252,9,252,163,251,177,253,155,253,240,252,207,253,122,0,181,255,63,254,252,255,85,255,133,255,140,254,192,0,168,0,180,255,124,255,252,0,149,255,84,1,210,0,136,1,253,1,16,1,181,0,147,255,145,0,218,0,119,0,96,254,249,254,229,1,9,1,75,255,248,255,226,254,226,0,12,255,38,255,69,0,222,254,98,255,191,0,255,255,192,255,176,253,166,255,213,0,160,255,255,0,179,1,178,0,176,255,143,254,238,255,223,255,176,255,214,255,159,1,140,0,34,255,119,4,139,2,137,2,73,1,255,2,44,2,249,0,235,0,180,3,157,1,186,1,23,1,141,0,83,1,100,1,45,2,42,254,86,255,99,0,237,0,199,253,224,252,96,1,53,2,26,1,217,1,214,1,76,1,57,255,78,253,252,250,107,252,63,255,86,254,224,252,158,251,230,255,141,254,22,254,63,255,125,2,83,2,7,2,74,1,152,1,141,255,79,0,12,0,221,1,87,0,153,255,136,254,102,253,165,254,235,254,221,254,2,254,31,254,169,0,41,1,195,252,30,253,51,255,85,255,192,254,228,253,72,1,27,1,165,252,66,252,186,1,254,255,44,2,174,2,130,0,56,0,103,5,244,3,243,2,171,1,100,2,229,2,116,2,41,2,173,254,228,252,134,0,21,1,135,253,195,251,254,255,10,255,144,252,245,251,185,249,216,251,30,252,38,254,142,251,24,254,98,254,229,252,73,0,50,255,248,255,117,255,183,1,204,0,80,255,190,253,23,0,131,0,243,254,11,253,65,255,245,0,147,255,174,254,112,0,60,1,120,0,106,254,138,255,99,2,76,255,70,255,123,253,115,0,83,255,34,0,250,253,23,254,105,255,61,0,185,253,180,252,220,0,118,255,87,253,4,252,135,1,239,255,170,253,191,254,157,0,217,254,129,0,155,0,98,252,149,252,37,252,29,1,241,0,173,255,131,255,131,255,108,2,85,2,176,1,92,0,137,1,78,0,153,1,61,0,119,254,29,253,99,254,20,253,83,0,54,0,105,1,27,0,196,251,130,0,175,254,74,253,227,249,41,1,62,1,237,255,175,248,36,0,51,0,195,254,237,246,10,255,231,0,172,255,254,246,241,252,40,0,77,255,71,247,94,252,38,254,50,254,14,253,170,255,224,254,142,253,149,246,57,254,193,255,171,0,181,251,186,251,230,255,113,255,87,251,57,254,106,254,131,254,163,253,46,255,160,255,205,255,188,253,36,254,236,254,241,255,85,251,134,253,77,251,143,252,134,254,35,255,99,253,72,252,82,2,178,0,109,254,92,253,251,2,71,1,89,2,34,1,172,0,44,1,203,0,157,0,200,255,176,254,100,1,24,0,28,255,216,254,253,254,227,255,70,255,7,1,160,1,14,0,159,254,117,1,244,255,40,255,1,1,96,0,174,0,57,0,10,250,152,253,70,252,13,254,15,254,104,255,179,254,125,0,105,0,200,0,179,0,159,255,181,254,32,255,253,2,185,2,248,2,0,1,45,1,59,0,199,1,171,255,204,0,32,1,254,253,240,0,251,0,147,255,0,1,161,1,222,255,99,254,101,0,174,1,128,1,156,0,225,255,246,255,206,0,170,1,77,2,145,0,143,0,71,0,40,3,138,3,77,1,93,1,218,3,170,3,77,2,75,1,20,5,56,3,187,0,253,1,38,4,141,2,123,1,210,1,182,5,169,3,145,1,18,1,19,3,93,3,9,1,2,0,97,2,41,2,28,0,49,1,158,3,84,1,106,0,130,1,241,0,245,254,109,255,225,0,78,255,234,253,91,1,246,1,125,253,131,254,141,1,30,0,117,253,35,253,77,254,142,1,105,254,42,253,28,254,8,255,235,252,110,252,74,254,36,254,14,254,122,254,75,0,217,254,60,252,178,253,162,253,150,0,135,255,207,255,101,255,178,255,167,3,38,2,133,1,38,0,191,254,127,0,168,1,59,1,227,254,143,255,27,1,3,1,146,2,203,0,66,1,230,1,135,3,249,1,236,2,161,1,99,2,167,1,43,2,0,2,239,0,173,255,190,253,237,255,173,254,37,253,93,1,13,0,90,252,137,250,142,255,152,254,107,0,180,2,182,0,90,0,37,251,254,249,241,249,43,253,200,253,121,252,173,250,243,253,251,253,171,252,163,252,20,252,88,255,78,253,189,252,63,0,119,255,212,253,221,253,144,0,226,254,207,252,229,1,63,1,109,255,104,254,14,2,246,0,165,254,78,254,41,1,228,255,222,254,41,254,170,251,251,250,52,254,153,254,36,252,230,252,67,5,19,5,178,2,11,2,192,4,44,4,70,4,245,2,57,3,116,4,240,2,238,1,228,4,85,5,171,4,130,3,9,2,29,4,20,2,176,1,178,254,40,255,199,254,249,254,96,255,52,0,40,254,101,255,127,0,136,0,132,254,44,0,83,3,154,1,94,255,23,254,123,0,1,255,228,252,101,253,66,4,149,3,21,3,237,1,117,5,173,4,46,2,202,0,205,255,138,255,170,254,67,253,83,0,108,0,214,255,71,254,61,0,95,0,31,1,0,1,229,255,89,0,12,2,19,2,95,1,227,0,80,2,33,2,185,2,155,0,92,255,51,1,126,2,18,1,23,254,206,255,242,2,240,0,90,255,132,255,140,255,189,253,68,251,193,255,190,0,217,254,240,251,240,250,147,0,136,254,79,255,143,255,73,3,217,4,27,4,156,2,2,0,37,1,39,2,48,1,184,251,71,252,8,255,120,1,18,253,59,252,87,0,4,2,237,254,252,253,177,2,135,1,133,254,125,253,108,3,82,2,122,254,11,252,123,253,61,2,149,255,200,253,79,253,198,252,255,251,229,255,184,254,53,255,93,3,237,2,36,2,233,0,132,249,237,251,195,1,108,0,108,253,148,253,174,1,236,0,21,0,116,254,122,251,137,253,92,5,18,5,199,3,65,2,101,4,101,4,77,2,198,1,189,254,159,252,45,254,153,0,44,254,69,253,220,252,3,254,120,254,50,253,52,255,221,255,165,253,187,251,201,253,94,255,7,254,20,252,154,255,94,1,219,0,224,0,167,1,252,0,139,1,79,2,96,2,107,1,22,253,160,255,117,1,172,0,171,0,39,1,202,2,83,1,233,0,77,0,107,0,21,1,157,0,153,0,13,254,156,254,11,6,49,4,64,2,238,1,220,254,173,254,8,254,176,253,121,252,184,255,149,253,31,254,198,249,163,251,201,253,2,255,231,252,5,254,204,253,221,254,20,254,236,253,246,1,48,2,130,254,171,1,88,2,230,0,29,255,221,1,251,0,75,0,29,1,74,3,45,3,220,1,226,250,203,250,186,0,121,1,181,253,107,252,131,2,125,1,94,251,215,253,155,1,82,0,153,251,204,252,82,255,228,253,164,253,119,0,31,2,205,0,132,254,145,2,141,3,55,2,112,0,214,254,138,254,114,0,167,252,5,255,56,0,159,0,145,1,89,1,222,255,116,255,145,255,161,253,41,0,102,2,99,1,142,255,179,255,218,1,66,2,56,0,170,5,156,3,74,4,140,5,229,2,144,1,246,0,22,0,76,2,57,1,135,255,71,1,63,3,216,1,142,251,160,253,88,3,40,2,39,251,208,251,126,2,88,2,154,254,254,0,179,254,209,254,122,253,227,2,102,1,74,0,202,4,135,6,197,4,81,3,193,8,88,6,215,3,124,2,49,7,197,5,237,2,128,1,94,1,7,1,87,0,128,0,146,248,83,252,112,255,192,255,58,249,1,255,32,1,225,255,172,245,42,251,110,1,235,0,149,249,188,251,192,250,208,254,227,253,205,251,164,251,123,0,102,251,4,255,208,252,76,255,8,252,21,2,53,2,233,0,25,254,82,254,68,255,78,1,99,3,212,4,22,2,171,0,202,249,185,249,123,2,118,2,108,247,54,1,156,3,156,1,202,246,184,254,188,3,17,2,177,245,135,254,118,2,22,1,214,245,61,1,31,3,43,1,154,246,133,0,84,1,31,0,148,247,68,250,131,0,125,0,96,251,22,254,117,255,46,0,24,253,191,1,123,3,52,2,67,0,61,254,134,2,92,2,215,253,83,254,148,252,140,1,162,0,190,255,25,5,147,3,223,1,67,2,64,4,26,3,194,1,22,1,54,2,68,1,223,251,102,255,148,0,79,255,15,246,168,0,46,4,80,2,209,246,214,255,51,3,89,1,216,246,61,253,209,2,250,0,129,247,39,250,203,254,122,0,178,255,183,255,120,0,173,0,252,255,6,1,249,254,251,254,81,254,192,255,107,254,36,253,207,245,116,0,173,255,63,255,11,250,80,252,35,254,43,253,4,254,51,1,170,0,172,0,64,3,161,1,64,3,174,2,31,255,177,0,126,3,50,3,30,254,123,254,255,4,15,4,129,254,201,0,162,254,40,0,218,2,123,2,226,0,14,2,247,1,206,1,82,1,142,1,23,2,202,2,40,0,230,254,202,5,191,5,61,4,219,2,25,6,48,4,141,3,181,2,139,5,2,5,121,3,111,3,129,4,216,2,162,4,72,3,30,255,106,4,181,3,177,2,18,254,38,252,236,249,128,255,200,253,47,253,55,253,230,255,61,1,12,2,70,0,135,0,107,254,159,252,26,249,116,253,82,255,223,252,117,3,5,3,103,255,165,255,75,4,239,2,6,254,131,251,85,3,134,2,241,0,14,3,7,2,27,2,61,7,164,6,77,4,172,2,31,251,50,250,48,254,188,0,131,252,127,250,224,250,171,254,121,255,182,1,81,255,18,0,87,4,208,3,63,1,208,0,106,250,24,249,83,0,202,1,238,253,24,252,51,1,129,0,184,252,241,255,227,255,156,254,113,252,100,252,133,251,14,255,137,255,240,253,127,0,123,255,7,253,3,253,190,0,173,255,197,254,127,3,10,2,231,0,34,255,102,0,193,255,84,254,60,1,187,2,123,1,70,0,25,0,204,2,58,1,148,255,251,1,106,3,54,2,238,0,108,0,173,3,7,2,195,0,169,1,196,255,85,254,1,1,139,0,153,255,138,253,190,1,78,1,114,1,156,1,48,0,84,255,78,253,229,254,45,2,187,0,226,254,158,0,227,1,140,0,14,1,168,254,137,253,156,3,67,2,140,255,132,0,142,0,210,1,188,255,192,255,230,0,111,255,210,254,226,253,221,252,112,252,250,3,225,2,251,252,247,3,118,2,41,1,220,245,95,0,189,1,80,1,182,247,235,1,254,1,191,0,27,251,161,0,254,255,188,254,86,250,135,253,56,253,151,255,182,252,2,255,101,254,100,0,128,253,222,254,242,3,251,2,118,253,57,1,145,4,218,2,140,0,249,1,6,4,254,2,4,3,31,1,43,4,55,3,239,1,237,2,49,1,67,1,92,255,206,1,78,0,143,1,170,254,150,252,69,0,85,2,240,255,108,2,109,2,81,1,118,255,68,254,247,254,218,0,84,0,62,254,185,3,154,2,34,255,221,252,29,2,92,2,103,252,160,250,244,0,116,0,183,252,45,253,118,2,76,2,140,0,151,2,38,1,112,1,167,3,22,4,113,3,247,2,210,6,184,5,148,3,116,2,180,1,195,3,25,1,1,0,137,255,74,0,30,2,213,0,1,0,201,253,45,1,241,0,4,1,179,1,222,0,140,1,168,3,189,3,84,4,191,2,254,1,250,1,40,3,222,1,89,2,182,2,192,3,108,2,204,3,229,2,212,3,88,2,66,3,205,2,255,2,172,2,131,2,204,3,167,3,126,2,245,1,149,2,208,2,83,3,151,255,136,253,209,254,139,255,83,254,130,0,21,3,186,1,246,253,68,255,192,2,117,1,9,253,42,0,46,3,11,2,237,253,143,251,117,1,66,2,86,253,77,251,57,254,29,1,117,251,215,249,182,251,44,0,81,0,174,255,200,2,107,1,221,1,246,0,186,3,110,2,68,6,86,6,253,4,123,3,129,5,91,3,156,3,124,3,6,3,17,4,179,3,118,4,40,0,222,253,181,255,32,1,152,253,150,255,71,253,230,255,87,255,96,255,133,252,29,253,233,254,128,254,251,251,162,254,245,6,28,5,22,4,48,3,44,6,253,5,192,5,154,4,225,5,52,4,192,4,131,3,122,3,136,3,52,2,142,2,152,3,180,2,253,3,88,3,19,254,132,0,177,0,249,1,71,0,195,0,228,255,97,0,200,1,95,1,92,255,88,0,183,1,22,1,216,255,94,1,115,5,181,3,234,0,161,255,219,252,40,254,38,0,93,255,111,1,158,255,233,1,11,2,1,4,154,4,188,4,138,3,63,1,34,5,46,3,205,1,133,255,225,253,220,252,191,1,20,253,188,254,127,252,153,251,31,253,11,254,235,252,55,253,203,2,9,3,215,4,154,3,157,7,147,7,88,5,97,3,218,2,112,3,246,2,132,1,153,252,198,1,17,0,5,255,131,254,214,252,209,249,239,0,247,253,58,252,232,252,3,1,134,252,178,250,254,252,183,255,166,0,93,1,44,255,67,1,184,252,211,254,217,1,179,1,89,253,48,254,216,2,95,1,100,255,57,255,155,2,176,1,29,0,4,255,159,1,224,1,37,253,133,254,145,0,47,2,240,253,137,253,122,251,97,255,189,1,17,1,123,0,127,2,117,1,130,255,32,3,56,2,84,0,94,255,208,2,200,2,194,252,232,253,71,255,222,0,152,1,196,1,245,1,3,3,127,252,181,250,189,255,186,1,232,252,130,250,54,2,90,2,167,0,186,254,253,1,74,1,161,255,142,253,38,253,168,254,132,6,193,4,11,3,199,1,36,5,60,3,72,2,207,2,148,1,225,255,245,3,21,3,89,0,107,0,123,3,37,2,103,3,45,6,149,3,159,2,98,3,199,5,9,5,86,3,135,1,44,4,98,4,44,3,78,0,206,253,89,1,51,2,173,1,153,255,161,1,19,3,134,255,75,254,155,1,20,3,111,252,95,254,90,2,242,2,30,255,240,255,151,0,248,2,68,253,118,0,152,255,242,255,152,251,48,0,28,1,137,1,122,254,93,254,129,253,140,255,114,252,50,1,60,1,243,255,183,4,216,3,53,3,157,2,85,251,75,253,140,0,43,255,140,252,96,254,57,255,210,253,152,253,245,0,108,254,104,253,6,1,56,0,151,253,44,253,171,255,21,254,192,254,112,253,198,253,193,252,127,255,240,253,30,250,193,255,145,254,127,254,154,254,191,254,4,0,51,0,146,254,42,255,63,1,255,1,146,0,159,2,239,255,221,254,146,255,208,1,117,255,16,254,54,255,220,0,200,254,137,253,108,253,183,255,113,253,204,252,106,253,115,253,248,250,167,252,82,254,71,252,65,252,248,254,207,255,44,254,184,255,131,254,162,254,205,253,63,255,105,254,55,0,104,254,221,252,11,0,203,254,137,2,188,0,58,255,0,254,205,1,177,255,54,254,218,250,249,254,122,255,245,253,135,249,77,254,17,254,3,253,57,0,165,254,98,254,178,1,139,251,14,255,104,253,167,252,34,0,188,255,61,253,174,254,163,1,163,0,226,255,250,254,57,254,235,252,106,250,47,253,238,3,152,2,13,1,25,0,107,2,4,1,183,0,96,0,56,252,178,250,124,254,135,0,75,253,67,3,200,1,154,0,81,4,191,2,57,2,107,1,89,6,46,5,217,3,236,2,36,255,219,0,76,0,48,255,81,250,130,249,49,0,149,0,60,252,84,255,16,253,176,254,113,2,209,0,6,255,190,255,7,252,186,252,254,255,61,1,136,247,51,250,118,255,123,0,172,248,205,247,247,253,85,0,57,252,146,254,73,253,143,252,103,252,13,252,5,253,75,252,132,255,0,255,160,254,108,253,178,0,207,1,98,1,48,1,48,249,177,253,230,254,79,0,55,247,175,0,99,3,243,1,118,255,76,255,75,255,235,255,13,247,39,251,52,254,248,253,253,252,195,1,246,255,204,254,15,1,191,255,4,0,214,0,233,254,77,254,213,255,164,254,98,253,35,0,191,255,45,255,38,3,23,2,85,0,41,1,57,0,239,0,210,2,237,1,225,0,149,2,72,3,35,2,228,253,136,254,14,0,93,1,213,1,209,2,75,1,162,0,224,253,16,253,194,255,246,255,142,1,168,255,212,2,189,2,237,255,235,253,162,255,89,2,136,0,185,255,87,253,21,253,90,255,168,254,5,1,206,255,161,0,204,255,229,1,81,1,117,249,50,0,190,0,163,255,22,247,25,255,62,255,174,255,161,255,173,253,102,255,128,0,126,3,245,1,76,2,201,1,167,254,206,0,122,0,110,0,137,253,29,255,199,253,3,0,152,1,239,0,141,1,226,0,59,255,254,255,128,0,235,1,1,5,136,3,36,1,215,0,26,2,50,1,3,1,253,1,91,253,233,251,13,0,65,1,89,253,180,253,154,254,44,255,210,253,243,0,134,2,223,1,230,1,86,1,122,2,20,2,107,0,34,3,75,1,136,0,144,255,114,254,249,251,226,254,186,254,63,253,32,1,16,1,19,5,120,4,154,4,92,3,89,254,121,0,127,254,108,255,217,254,210,254,190,252,205,252,16,0,232,255,55,255,36,254,43,2,91,0,11,255,38,1,218,255,133,254,62,252,59,251,89,251,18,250,239,254,117,254,122,254,11,252,123,253,61,2,205,248,250,251,249,1,212,1,232,2,179,3,97,2,237,1,79,253,108,251,140,253,121,255,254,251,195,0,155,1,196,0,46,6,123,4,63,2,81,1,41,251,247,252,120,253,114,255,83,2,57,3,199,3,223,2,74,251,54,252,175,255,170,254,23,253,13,0,184,255,119,1,198,1,19,0,127,5,153,3,145,249,84,255,93,3,50,2,160,3,1,6,39,4,228,2,88,246,72,252,8,1,82,0,10,254,59,252,202,250,123,0,99,3,212,4,22,2,171,0,240,246,52,254,12,3,107,1,90,251,151,253,252,0,195,255,82,255,34,0,243,3,20,3,227,246,247,0,167,1,153,0,240,255,157,254,6,1,193,1,216,249,207,251,224,253,141,254,153,253,207,254,27,4,37,3,175,2,16,2,6,0,74,255,167,3,107,3,234,3,41,3,199,0,1,1,126,0,76,0,184,253,142,251,87,2,44,2,175,251,145,250,201,249,249,253,47,252,211,250,108,0,91,1,46,253,49,252,109,1,101,0,111,255,169,2,249,0,103,255,0,0,178,254,198,253,159,0,156,1,29,1,176,254,151,253,71,252,58,252,119,3,177,2,29,251,84,0,71,255,114,254,176,253,177,1,20,4,141,2,85,0,73,1,216,255,105,1,79,254,63,253,210,1,62,2,102,255,142,2,80,2,34,1,89,255,72,0,93,1,175,0,162,2,41,1,209,3,208,2,211,4,180,4,245,2,232,1,112,254,243,254,26,2,116,1,186,250,149,250,86,251,165,255,238,4,108,3,7,3,188,2,169,253,218,255,82,254,46,253,184,7,94,6,223,3,96,2,111,0,20,1,30,255,160,255,77,252,124,254,245,255,249,255,209,254,237,253,185,252,82,1,198,6,174,6,125,5,245,3,252,253,169,252,123,253,210,0,80,253,96,254,1,2,230,0,202,252,131,253,134,251,192,254,72,252,110,253,74,253,183,0,142,255,145,253,50,3,162,2,65,255,52,255,219,2,123,2,51,0,197,4,115,3,64,2,70,252,81,254,58,3,86,2,170,254,13,253,124,252,105,254,154,251,158,254,50,255,0,254,221,253,214,252,155,254,148,253,66,0,3,2,183,255,102,254,152,252,79,252,92,250,53,251,191,0,239,255,224,253,25,255,252,249,224,253,123,252,138,252,134,252,242,249,19,246,205,252,54,252,175,0,198,252,46,251,6,253,169,253,234,255,122,2,213,252,37,252,122,252,189,254,203,0,26,0,129,254,21,255,243,252,113,254,238,4,138,3,92,252,137,250,156,250,144,253,93,0,87,0,98,254,229,253,77,253,37,0,121,2,254,1,125,254,36,254,206,250,143,1,66,0,7,1,105,254,207,255,177,254,95,254,17,4,73,7,245,252,191,251,96,250,22,253,166,252,64,3,187,253,9,253,141,254,95,253,6,254,40,8,208,253,134,253,101,251,15,1,241,0,14,0,74,254,12,255,115,254,207,1,178,4,23,4,162,253,227,252,98,250,205,255,189,254,225,1,32,255,184,253,241,253,238,1,113,3,170,2,79,254,206,254,22,252,42,2,147,2,222,0,171,0,96,255,159,254,169,2,6,7,29,6,172,252,99,251,97,249,176,254,102,253,114,0,187,253,12,253,24,253,61,255,119,1,241,1,47,254,220,252,182,251,154,0,26,1,125,255,206,255,65,255,49,253,67,1,220,2,6,6,46,253,205,252,132,250,105,0,6,255,185,0,78,255,10,254,26,253,65,1,254,1,87,4,189,254,201,253,58,252,127,0,228,1,82,1,96,255,52,0,174,254,220,2,87,5,18,6,142,253,222,252,96,249,226,254,182,253,164,2,73,253,169,254,142,254,22,254,39,1,101,7,138,253,194,253,10,252,176,255,133,2,187,255,250,255,194,254,148,254,14,3,170,5,14,4,199,254,35,253,141,250,120,0,60,0,221,1,248,254,183,253,133,255,199,2,221,4,121,2,165,255,157,254,8,252,3,3,246,2,5,1,253,0,81,0,38,254,162,3,167,8,184,6,216,252,181,251,123,248,208,253,242,252,169,0,220,252,206,251,68,255,142,253,201,255,125,5,74,253,52,253,86,251,108,253,98,1,73,1,254,253,201,255,225,253,110,1,9,4,158,4,110,253,65,252,179,250,201,255,72,255,93,0,163,253,226,254,106,253,148,1,193,1,59,3,226,254,162,254,17,251,116,2,50,1,227,0,240,255,147,0,145,253,186,0,155,3,98,8,94,253,134,252,186,249,69,254,28,255,83,1,143,254,234,252,103,254,231,0,86,0,189,5,64,254,187,253,219,251,82,2,194,1,79,255,132,255,86,255,65,254,159,2,135,4,124,5,36,254,101,253,25,250,179,255,118,255,204,2,79,255,140,254,131,254,195,1,166,3,147,3,6,255,80,254,202,252,16,1,60,3,190,1,26,0,19,0,225,255,186,2,156,6,120,8,122,253,47,252,124,248,77,255,39,254,12,1,133,254,23,253,77,253,11,0,127,0,9,4,24,254,107,252,199,252,61,0,67,1,135,0,147,0,111,255,82,253,173,2,18,3,146,6,6,254,176,252,239,250,35,0,90,0,222,0,233,255,166,254,98,253,199,1,79,2,7,5,53,255,175,253,194,251,140,2,96,1,181,1,39,0,63,0,55,254,73,3,241,4,57,8,248,253,142,252,208,249,184,254,57,253,141,5,172,253,170,254,186,255,209,0,173,0,136,7,89,254,170,253,103,252,165,1,93,2,218,255,254,255,11,255,129,255,128,3,177,7,111,4,133,254,250,253,213,249,173,0,118,0,241,2,201,255,131,254,204,255,217,3,253,3,241,2,254,255,221,254,133,252,241,2,224,3,167,1,8,1,131,0,60,255,127,3,226,8,239,9,133,253,192,251,61,246,239,253,42,252,14,2,4,253,194,252,220,253,76,254,60,1,87,2,93,253,84,252,22,253,199,255,236,0,245,255,55,255,175,255,226,252,16,0,77,3,22,6,31,253,39,252,68,251,44,254,17,0,34,1,233,254,184,253,68,253,183,0,54,3,193,2,247,254,20,254,93,251,165,1,152,0,212,1,122,254,166,0,244,254,39,0,14,6,76,7,133,253,58,252,221,249,59,254,20,254,142,3,228,254,253,251,181,255,75,255,123,255,60,7,67,254,144,253,106,251,164,1,111,1,207,255,123,254,44,255,87,255,195,2,49,4,184,4,229,253,58,253,87,250,83,0,93,255,228,1,20,255,225,253,157,254,82,1,151,4,46,3,10,255,203,254,66,252,94,2,248,2,60,0,166,0,248,255,93,255,206,254,57,7,3,10,21,253,255,251,9,249,93,254,66,254,209,0,50,253,202,253,234,253,6,254,181,2,89,3,49,254,71,253,198,251,69,1,175,1,50,255,241,255,248,255,5,253,33,2,151,3,238,5,157,253,241,252,223,250,0,1,201,255,208,0,91,255,164,254,106,253,65,1,168,2,162,3,186,254,83,254,73,252,228,1,190,1,58,2,59,255,72,0,183,255,141,3,175,5,205,6,205,253,31,253,74,248,132,255,96,254,206,2,34,254,108,254,198,254,240,255,190,1,100,6,217,253,231,253,18,253,198,255,126,2,214,0,55,0,71,255,241,254,124,4,21,5,188,4,29,254,97,253,16,251,117,0,29,1,31,2,52,255,121,254,145,255,1,2,2,6,86,3,142,255,66,255,46,252,109,3,83,2,208,1,4,1,4,1,201,254,236,2,235,8,168,8,251,253,79,252,133,247,186,254,60,253,122,1,212,252,77,253,24,255,208,253,175,2,129,5,36,253,78,253,188,252,153,254,133,2,130,1,247,254,62,0,90,253,145,0,108,6,184,4,213,253,36,252,47,251,178,255,14,0,114,0,185,254,154,254,23,254,136,1,165,2,185,2,55,255,20,255,140,251,181,2,193,1,178,0,13,255,0,1,79,254,99,2,105,5,152,9,156,253,123,252,72,250,205,254,239,255,243,1,197,254,101,253,2,255,0,1,172,1,183,5,26,254,90,254,224,251,143,2,114,1,18,0,154,255,71,255,236,254,243,2,42,6,55,5,24,254,165,253,118,250,182,0,163,255,102,3,183,255,54,254,164,254,67,3,94,3,189,3,230,254,179,254,22,253,35,2,71,3,172,1,17,1,167,255,13,0,172,3,172,6,16,10,94,254,196,251,34,249,212,255,154,254,3,1,15,254,125,253,208,253,99,0,45,2,193,3,91,254,2,253,107,252,39,1,70,1,184,0,175,0,15,0,142,253,20,2,110,3,189,7,69,254,0,253,5,251,221,0,156,0,12,1,39,0,149,254,7,254,183,2,4,3,116,4,94,255,53,254,112,252,197,2,188,1,146,2,25,0,47,1,200,254,244,4,130,5,179,6,215,254,2,253,212,248,249,254,148,255,46,4,106,254,243,255,127,255,57,0,182,1,174,10,138,254,25,254,189,252,48,1,184,2,164,0,104,0,21,255,5,0,75,6,108,7,119,5,27,255,186,253,211,250,149,1,192,0,49,3,169,255,74,254,111,0,4,4,175,4,225,3,68,0,81,255,90,252,9,4,93,4,195,1,222,1,200,0,8,255,79,8,136,10,250,7,189,252,213,250,173,247,225,252,76,253,210,1,212,252,248,251,43,254,146,253,32,1,152,3,67,253,183,252,210,251,101,254,0,2,8,0,122,254,165,255,24,253,226,255,19,4,137,4,202,252,132,251,124,251,218,254,210,255,110,0,101,254,138,254,90,253,214,0,19,2,156,2,106,254,92,254,86,251,231,1,232,0,47,1,194,254,91,0,40,254,123,0,208,4,141,9,46,253,72,252,41,250,30,253,93,253,52,5,225,253,162,253,45,255,161,255,158,255,228,5,219,253,254,253,87,251,217,1,211,0,73,0,224,254,144,255,123,254,25,2,52,5,234,4,201,253,13,253,247,249,71,0,229,254,120,2,86,255,31,254,19,254,169,2,234,3,49,3,156,254,181,254,147,252,163,1,194,2,90,1,241,0,222,255,186,254,121,1,158,7,91,7,41,253,205,251,167,249,23,255,225,253,116,0,244,253,218,252,183,253,183,255,222,1,217,2,224,254,99,252,137,251,173,0,191,1,204,255,68,0,27,255,162,253,193,1,17,2,5,7,177,253,149,252,173,250,183,0,112,255,68,1,153,255,60,254,102,253,111,2,232,1,152,4,18,255,1,254,20,252,70,1,40,2,202,1,136,0,108,0,193,254,114,2,63,5,91,7,22,254,122,253,62,249,70,255,63,254,216,3,30,253,180,255,86,255,218,253,243,2,0,10,16,254,2,254,77,252,210,0,182,2,204,255,84,0,190,254,57,255,66,4,89,6,200,4,136,254,165,253,140,250,87,1,74,0,120,2,81,255,10,254,224,255,204,3,52,5,222,2,52,0,217,254,167,251,41,4,150,3,160,0,137,1,107,0,115,254,190,4,89,10,205,6,136,253,79,251,157,248,49,253,235,254,97,1,117,253,144,252,134,255,45,255,209,0,58,5,206,253,54,253,221,251,48,255,132,1,159,0,192,254,195,255,217,253,37,1,68,4,163,5,120,253,159,252,27,251,207,255,113,255,49,1,111,254,29,255,183,253,49,2,20,2,159,3,139,255,69,254,92,251,251,1,180,1,36,1,177,255,233,0,54,254,159,2,1,4,92,9,135,253,182,252,11,250,204,254,226,254,128,2,139,254,147,253,105,254,162,1,253,0,25,5,197,254,187,253,143,251,60,2,173,2,231,254,61,0,188,255,141,254,223,3,77,4,218,5,19,254,85,253,174,250,209,255,164,0,192,2,0,255,198,254,244,254,119,2,181,3,28,4,138,255,164,254,191,252,68,0,156,4,56,2,152,0,117,0,34,0,89,4,110,7,191,8,167,253,65,252,86,249,113,255,23,254,224,1,180,254,113,253,194,253,54,0,97,1,168,4,50,254,116,253,228,252,150,0,37,2,112,0,195,0,145,255,253,253,167,2,84,4,111,6,210,253,19,253,63,251,247,255,16,1,85,1,203,255,247,254,233,253,233,1,75,3,18,5,136,255,30,254,248,251,120,2,31,2,152,1,179,0,50,1,242,253,100,4,184,5,196,8,95,254,238,252,230,249,32,255,128,254,84,5,135,254,53,254,231,255,129,1,233,1,126,8,180,254,117,253,195,252,32,2,41,2,61,0,22,0,143,255,167,255,104,4,189,6,244,5,40,255,139,254,139,249,161,0,60,1,140,3,91,255,34,255,189,255,82,5,151,4,21,3,73,0,4,255,1,253,226,2,164,3,104,2,106,1,246,0,130,255,19,3,94,10,211,11,77,253,174,251,114,247,203,253,180,253,12,2,178,253,45,252,22,254,249,254,141,1,214,3,191,253,187,252,79,252,234,255,179,1,207,255,66,255,138,255,139,253,168,255,216,4,233,5,132,253,229,251,5,252,221,254,189,0,3,1,255,254,42,254,139,253,145,0,177,3,126,3,186,254,148,254,186,251,31,2,4,1,118,2,54,255,189,0,47,255,101,1,99,5,43,8,199,253,205,251,87,250,54,253,17,255,151,3,92,254,63,253,172,255,147,255,142,255,103,9,99,254,239,253,103,251,226,1,112,1,131,0,70,255,184,255,125,255,93,3,231,4,196,4,157,253,110,253,195,250,227,0,135,255,119,2,80,255,23,254,38,255,233,2,151,4,189,3,191,254,108,255,88,252,159,2,198,3,216,0,84,1,253,255,113,255,213,1,56,7,133,9,39,253,63,252,109,249,43,255,2,255,65,1,1,254,74,254,247,253,130,255,213,2,135,3,172,254,83,253,248,251,60,1,224,1,20,0,23,0,167,255,217,253,97,1,27,4,253,6,224,253,11,253,172,250,42,1,231,255,180,1,156,255,120,254,249,253,211,1,242,2,54,4,46,255,114,254,202,251,108,2,146,2,118,2],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+10240),allocate([33,0,147,0,78,255,153,3,151,6,129,7,187,254,240,253,70,248,2,0,227,254,142,3,141,254,22,254,26,255,0,0,85,2,218,7,16,254,117,254,190,252,37,0,177,3,245,0,181,0,96,255,112,255,201,5,93,5,77,5,157,254,167,253,10,251,42,1,66,1,160,2,63,255,176,254,77,0,65,4,253,5,154,3,177,0,217,255,155,251,228,3,13,3,24,2,200,1,110,1,80,254,135,5,136,9,231,8,46,254,10,253,235,246,209,254,3,254,131,1,41,253,211,253,66,0,111,255,131,2,224,4,224,253,92,253,108,252,31,255,94,3,76,2,104,255,40,0,235,253,167,1,143,5,22,6,196,253,181,252,135,251,128,255,85,0,205,1,18,255,255,254,184,253,93,2,236,2,93,3,24,0,54,255,127,250,29,3,231,1,47,1,75,255,108,1,74,255,104,2,98,5,126,11,18,254,172,252,95,250,220,254,61,0,44,3,172,255,45,253,74,255,43,2,20,2,226,5,147,254,19,254,223,251,54,3,76,2,11,0,242,255,238,255,26,255,233,3,121,5,171,5,38,254,199,253,244,250,46,1,62,0,38,4,186,255,136,254,34,255,214,3,206,3,125,4,60,255,22,255,229,252,223,1,74,4,243,1,106,1,58,0,70,0,123,4,21,8,41,11,25,254,146,252,224,248,73,0,224,254,92,1,154,254,12,254,4,254,199,0,209,2,218,4,178,255,71,253,229,252,105,1,24,2,196,0,118,1,110,0,33,253,79,3,27,4,104,7,146,254,55,253,98,251,59,1,64,1,173,1,72,0,41,255,62,254,247,2,118,3,83,5,226,255,84,254,190,252,93,3,115,2,28,3,118,0,212,1,233,254,75,5,91,7,101,7,68,255,126,253,180,249,63,0,81,255,174,4,94,254,45,255,51,0,158,1,75,2,41,10,22,255,211,253,166,252,168,1,121,3,222,0,136,0,155,255,83,0,133,5,230,8,103,5,172,255,67,254,147,250,158,1,57,1,21,4,29,0,169,254,65,0,16,6,111,6,212,3,183,0,165,255,195,252,249,4,133,5,104,1,41,2,16,1,149,255,51,6,77,12,43,10,104,5,29,8,92,13,244,19,86,26,186,31,135,38,84,43,170,49,133,53,61,254,215,251,239,253,231,250,62,254,12,253,15,254,161,252,128,254,149,253,99,254,99,253,195,254,230,253,181,254,212,253,98,254,4,254,88,254,134,254,238,254,188,254,78,254,154,253,30,255,12,254,24,255,254,253,249,254,135,254,214,254,102,254,105,255,58,253,82,255,206,252,107,255,100,254,100,255,83,254,224,254,50,254,70,255,53,255,86,255,210,254,65,255,191,254,125,255,109,255,215,254,117,254,28,255,42,255,11,255,64,255,189,255,196,254,185,255,185,254,152,255,51,255,162,255,73,255,113,255,218,255,63,255,161,255,16,0,180,255,132,255,8,255,23,0,19,255,24,0,12,255,18,0,120,255,44,0,145,255,223,255,232,255,231,255,0,0,149,0,19,0,23,0,113,255,158,0,87,255,174,0,75,255,133,0,201,255,165,0,230,255,111,0,84,0,98,0,75,0,87,0,183,0,141,255,245,255,248,255,130,0,11,0,170,0,254,0,77,0,205,0,17,0,183,0,112,0,6,1,194,0,202,0,31,1,95,0,189,0,214,255,151,255,234,0,179,0,39,0,186,0,163,0,89,1,76,1,199,0,43,1,161,0,202,255,29,1,178,255,25,1,123,255,141,0,74,255,111,0,249,0,85,1,15,1,108,1,93,0,147,1,75,0,135,1,92,0,254,1,118,255,220,0,71,255,227,255,222,255,105,1,141,255,64,1,3,0,42,2,99,0,30,1,218,0,79,2,11,255,150,1,244,254,197,1,0,0,68,2,25,0,94,2,19,1,20,2,148,0,194,1,183,255,227,2,227,254,6,2,224,254,94,0,53,255,162,2,116,255,182,255,205,0,202,2,142,255,43,1,176,0,155,3,182,0,45,2,240,0,193,2,240,255,1,2,229,1,81,2,37,1,128,1,195,1,105,2,218,255,50,0,51,2,17,2,47,1,209,0,203,1,107,1,177,1,196,1,194,1,198,1,111,1,94,2,221,1,229,2,176,1,97,1,112,1,11,1,105,1,204,2,17,1,71,2,197,1,166,0,254,1,172,0,201,0,117,2,18,1,191,0,56,2,127,2,46,1,42,1,122,2,131,1,131,2,94,1,75,2,48,2,100,2,53,2,88,2,20,3,231,1,160,2,0,2,247,3,65,1,77,1,101,1,86,3,131,255,157,1,218,1,200,2,17,0,105,255,52,2,29,1,14,1,15,255,203,3,121,3,233,1,220,0,254,1,128,3,37,2,156,3,71,1,57,3,34,1,143,3,28,2,84,4,158,0,37,3,199,0,189,3,255,1,218,2,100,0,106,3,13,0,23,3,179,1,120,2,164,2,204,3,249,0,132,3,211,1,194,4,13,3,50,4,73,2,17,3,233,255,157,2,11,1,19,4,107,2,60,4,103,2,121,4,110,2,137,3,148,3,25,4,80,0,75,1,72,2,51,4,89,0,127,2,220,3,193,3,2,3,208,2,30,3,187,2,236,1,191,1,131,3,115,2,15,1,164,4,213,2,53,5,87,0,91,2,64,3,67,6,104,2,103,4,122,3,225,5,232,3,132,4,98,3,241,3,227,3,59,3,125,4,90,3,49,3,170,5,5,3,40,5,244,1,109,5,56,1,129,4,236,255,60,4,64,0,3,5,2,0,148,4,143,1,77,7,2,2,170,6,246,1,100,6,118,3,242,5,160,1,88,2,107,4,70,5,251,4,110,5,121,3,3,7,146,3,230,6,227,0,159,4,226,4,34,7,249,1,62,7,151,3,49,9,57,255,175,1,152,0,199,6,43,255,228,255,136,1,54,5,103,255,204,255,210,3,127,4,189,254,112,254,45,3,167,6,120,255,84,0,169,5,223,7,181,254,113,255,119,255,168,4,0,255,22,2,99,255,7,4,205,254,73,254,30,2,219,2,183,254,92,254,159,255,104,2,150,254,88,255,190,254,110,1,9,255,146,255,45,255,89,0,60,255,203,254,20,0,59,0,148,254,49,254,226,254,89,0,176,254,175,0,80,254,141,0,133,254,66,255,78,254,60,255,177,255,150,0,234,254,29,255,232,254,166,0,213,253,90,254,101,255,29,2,146,254,54,0,227,255,173,255,211,254,250,252,186,0,116,2,115,254,248,254,242,0,37,1,59,255,183,253,124,0,154,1,53,0,123,255,10,0,84,1,198,253,215,251,65,0,66,254,68,0,19,254,127,1,169,3,155,254,57,253,153,254,6,255,91,253,212,251,36,1,230,255,107,1,6,0,95,2,33,5,129,255,246,255,233,5,94,7,201,2,204,3,189,5,133,8,163,5,224,7,161,249,192,249,252,248,14,247,253,251,22,249,180,251,23,248,3,251,148,250,169,250,2,250,77,252,75,250,52,252,12,250,25,252,58,251,4,252,108,251,209,252,37,252,32,252,165,250,64,251,18,252,247,250,186,251,24,253,12,251,13,253,243,250,162,252,101,252,119,252,40,252,90,253,229,251,83,253,230,251,193,251,39,252,218,251,89,253,35,252,127,253,153,251,48,252,6,253,114,253,134,252,218,252,191,252,189,251,62,253,139,253,147,253,218,252,128,253,212,252,249,252,134,253,245,252,225,253,28,252,203,253,205,251,188,253,222,253,157,253,196,253,149,253,8,253,222,254,145,252,242,253,201,252,50,254,229,252,3,255,215,253,97,254,179,253,73,254,235,253,172,254,76,253,89,252,7,254,252,252,66,253,149,251,249,254,206,254,53,252,29,254,67,254,182,255,213,253,220,253,154,253,127,255,75,253,22,255,116,254,10,255,37,254,6,255,247,254,108,254,136,254,254,253,95,254,2,254,212,254,199,254,178,254,104,253,49,254,210,252,126,254,64,253,175,254,153,253,22,255,55,255,23,255,17,255,89,255,201,253,53,255,149,253,109,255,97,254,141,255,160,254,90,255,18,253,85,255,7,253,242,254,145,252,248,254,121,252,145,254,24,253,43,0,37,254,14,0,115,253,43,0,98,253,11,0,64,254,197,255,247,253,130,255,137,255,101,255,155,253,214,255,161,252,229,255,93,252,136,0,29,254,183,0,44,254,55,0,214,254,55,0,208,254,57,1,159,253,57,1,48,253,66,1,89,255,100,0,227,253,253,255,137,255,145,255,69,255,233,0,20,255,4,1,22,255,26,0,91,255,134,0,211,255,216,255,219,253,104,1,53,255,122,1,124,254,194,1,129,254,19,1,20,0,182,0,153,255,246,0,145,255,175,1,37,0,206,1,110,255,231,1,99,255,228,254,197,255,247,1,72,255,24,0,53,0,253,255,54,0,122,0,3,1,77,1,66,0,228,1,104,0,180,1,68,0,195,0,116,0,190,0,206,0,13,1,247,255,226,1,96,1,126,1,29,1,143,1,21,1,196,1,0,1,69,0,186,0,13,0,41,1,243,255,3,1,161,255,30,0,56,0,138,1,196,0,169,1,205,0,200,1,25,1,65,2,15,0,191,0,119,1,34,1,151,1,64,2,200,255,227,0,32,2,149,1,0,0,37,2,164,255,16,2,27,255,95,1,11,255,82,1,150,254,179,1,167,0,15,2,181,255,46,1,91,0,56,3,129,0,87,2,240,1,167,2,186,0,237,2,153,0,225,2,231,254,88,2,164,254,103,2,20,255,1,3,41,0,113,3,38,0,122,3,36,255,73,3,155,254,115,3,119,254,135,3,134,253,218,1,68,254,82,3,81,255,166,2,19,254,242,0,249,253,17,3,54,253,70,2,227,253,110,1,225,253,178,1,171,253,244,1,3,253,222,0,66,253,149,3,25,253,194,3,155,252,245,1,125,252,36,2,133,254,200,0,77,254,157,0,205,252,214,0,163,252,157,0,154,253,40,0,136,253,94,0,141,252,202,255,27,253,4,2,11,254,42,1,154,253,85,255,154,252,95,255,159,252,233,255,206,252,93,0,9,252,245,254,106,253,153,254,219,253,2,0,70,254,135,255,135,254,0,0,29,255,33,0,98,254,130,255,127,255,212,0,90,252,34,0,198,251,230,254,161,251,244,254,58,253,199,252,92,254,65,255,204,251,96,252,107,252,163,255,140,253,154,254,97,0,7,0,50,255,119,254,155,255,24,0,53,255,38,0,88,255,83,0,169,253,89,254,233,254,170,1,68,253,118,0,181,255,206,0,43,252,95,253,88,253,161,1,145,254,37,0,233,254,218,1,127,255,194,254,63,1,40,1,142,253,217,255,87,1,90,2,72,253,217,255,209,254,172,3,104,0,233,0,132,254,137,0,220,255,13,1,181,255,42,255,120,0,43,0,239,253,35,254,203,1,164,0,54,255,27,255,207,255,89,255,97,2,24,3,98,0,36,255,147,3,148,0,37,1,27,1,101,3,91,0,63,2,138,1,70,1,178,255,205,2,67,0,109,1,189,254,104,2,220,255,219,2,27,0,107,2,238,0,120,2,17,1,192,1,99,0,33,3,220,1,101,3,17,1,173,2,64,0,21,3,72,0,253,3,217,0,25,3,203,1,222,2,104,1,134,2,224,1,104,1,66,1,173,1,208,1,126,2,174,1,244,2,107,1,232,3,148,1,171,2,16,2,90,2,103,2,143,2,157,1,178,3,175,2,169,3,90,2,136,3,92,2,43,2,225,2,18,3,150,2,211,1,142,2,106,1,77,2,161,3,198,2,242,1,222,1,159,1,164,1,181,2,115,3,45,3,171,2,13,3,157,3,145,3,171,3,214,2,220,2,235,1,85,3,19,2,180,3,222,2,195,3,59,1,40,3,249,2,243,2,120,4,248,2,143,2,52,4,58,3,33,4,67,4,70,3,235,3,40,3,23,4,109,4,147,2,77,4,224,3,26,4,50,4,51,4,203,3,182,2,202,4,30,4,59,2,73,3,116,3,124,5,99,5,72,4,56,4,93,3,207,4,223,2,4,5,248,2,248,4,223,3,87,5,29,4,233,4,188,2,26,4,22,2,220,3,197,1,240,4,87,2,116,4,167,2,85,6,47,3,104,5,9,2,37,5,137,1,28,6,37,3,168,5,174,2,44,4,136,2,107,3,51,1,59,4,105,1,23,4,61,1,137,5,196,3,163,2,59,2,128,4,79,0,90,4,209,255,250,5,55,1,185,6,58,1,142,4,177,2,2,2,162,255,93,1,26,1,132,5,72,1,1,4,231,1,191,255,57,0,37,3,202,3,36,0,62,0,1,3,249,254,23,3,166,254,125,2,187,2,119,255,108,2,22,2,29,2,33,253,194,0,199,2,44,1,244,254,161,252,158,3,1,3,60,253,84,254,250,1,174,0,132,252,138,253,179,1,35,2,101,250,254,254,109,2,215,1,6,252,168,250,119,254,9,2,104,252,82,253,231,255,20,0,42,252,124,251,84,1,9,0,234,249,145,251,160,254,48,0,213,249,110,254,137,252,6,0,124,251,136,252,220,253,160,254,149,249,112,251,97,255,98,2,24,248,61,252,31,255,193,0,136,249,88,248,11,255,19,254,60,252,112,249,88,252,133,253,237,250,48,249,148,250,164,253,252,249,189,252,139,250,121,255,204,249,222,254,122,249,56,253,37,248,160,249,129,249,229,255,46,247,213,252,123,251,184,0,15,251,189,0,169,250,74,2,37,248,201,0,234,252,200,2,70,251,3,0,247,251,40,3,29,251,62,3,145,255,123,2,156,249,191,1,49,254,75,252,67,254,96,252,8,254,118,251,11,254,69,251,144,0,161,254,140,254,228,251,229,254,221,251,233,254,157,251,193,253,98,250,181,253,178,249,89,252,40,252,229,0,178,2,103,252,49,253,109,254,82,5,83,253,47,254,106,3,141,1,3,254,210,255,61,1,54,5,27,254,200,1,45,3,183,1,101,254,83,1,130,3,43,4,87,254,46,0,161,5,241,1,115,252,224,252,185,5,22,4,2,255,191,254,150,5,141,4,68,0,94,1,10,4,154,2,114,1,11,0,31,5,22,3,143,0,232,0,17,4,26,6,142,255,151,2,80,6,54,4,198,1,67,2,251,4,16,4,180,255,141,3,240,2,43,4,153,0,0,2,92,1,190,4,102,2,129,1,51,7,40,3,13,1,10,4,203,0,62,4,140,2,249,3,247,6,106,4,173,1,47,5,131,1,104,5,207,255,159,4,184,255,191,4,96,254,233,3,32,2,213,6,160,254,199,4,10,254,175,4,179,253,57,2,29,255,94,6,114,255,42,6,26,255,179,6,54,253,8,5,186,252,118,5,107,4,77,5,48,255,208,4,181,1,197,3,95,252,50,3,43,3,130,5,91,3,227,5,164,0,188,4,107,5,1,7,228,1,82,7,200,1,15,8,228,3,146,4,46,5,122,5,36,5,80,5,111,4,238,4,210,4,82,6,81,5,232,6,141,5,203,4,48,6,67,5,86,3,160,2,149,6,30,6,115,4,246,4,224,7,33,7,237,6,45,6,252,5,180,5,207,5,178,3,123,6,253,3,208,6,188,4,112,5,209,3,236,6,137,4,34,7,140,4,182,6,149,5,181,7,55,6,161,4,96,3,84,8,37,4,7,7,46,3,46,7,245,2,56,8,35,5,6,8,234,4,65,8,147,3,27,9,162,3,187,5,123,4,30,10,159,5,197,8,208,6,42,8,84,6,54,9,174,5,106,10,226,5,84,7,45,7,22,8,183,7,203,6,41,6,170,2,9,5,48,6,253,7,174,5,50,8,194,9,212,7,151,10,18,8,214,2,52,6,196,10,32,9,228,0,79,3,152,9,123,6,36,0,45,1,150,7,165,7,66,254,160,255,106,8,116,5,253,5,77,4,14,0,96,2,101,252,36,253,103,5,190,7,65,5,184,3,88,253,65,1,1,5,244,4,198,249,109,1,173,3,178,3,55,249,202,252,70,9,227,10,29,7,228,10,236,248,29,247,169,248,23,246,152,249,200,248,97,249,44,248,60,251,136,248,59,251,198,247,233,249,204,249,219,249,236,249,85,251,177,249,56,251,65,249,177,250,129,251,176,249,100,248,6,251,145,250,231,250,133,250,185,249,101,251,116,249,225,250,93,250,58,250,169,250,126,252,24,251,221,251,205,250,146,251,42,252,147,251,131,251,32,250,200,251,228,250,4,252,97,251,44,252,50,250,57,252,41,250,36,252,102,252,233,251,203,251,186,252,101,251,166,252,58,251,149,251,239,251,216,251,1,253,152,252,123,251,67,253,144,252,62,253,118,252,250,252,8,252,190,253,200,251,223,252,58,250,177,253,169,251,176,253,134,251,55,253,148,250,128,253,160,250,171,253,221,251,96,254,121,252,82,253,192,252,107,253,60,253,68,254,156,252,22,254,103,252,138,254,248,252,149,253,110,251,183,253,219,253,255,252,229,252,77,254,109,253,238,253,27,253,14,254,187,252,155,254,171,253,233,254,153,252,13,255,137,252,230,254,103,253,232,254,101,253,91,255,208,253,118,254,121,252,150,254,102,254,64,254,185,253,103,254,194,253,199,254,155,254,131,253,220,253,198,253,76,254,128,252,8,254,130,254,11,253,198,255,31,254,91,255,150,253,65,255,138,254,22,255,130,254,34,255,85,253,231,255,32,254,94,254,153,254,38,253,159,254,188,254,99,255,80,254,190,254,118,254,209,254,228,254,152,255,167,253,223,254,212,253,60,255,180,253,106,255,109,253,160,253,39,254,232,255,188,255,64,254,38,254,248,255,6,254,211,255,20,253,72,255,180,252,4,255,123,252,165,255,184,253,159,255,116,253,138,0,4,253,125,255,90,253,244,255,98,253,165,0,253,254,253,255,184,252,149,255,115,252,37,0,32,252,44,0,170,252,97,254,185,252,13,0,23,252,241,254,254,251,203,254,226,252,34,254,192,252,24,254,81,252,168,0,168,251,125,254,95,251,155,255,97,251,216,255,83,252,196,254,250,251,254,252,236,251,143,253,199,251,230,253,56,251,213,254,224,250,76,254,83,251,105,253,113,251,95,255,64,251,78,253,43,251,193,252,104,250,48,253,133,250,19,254,126,252,28,253,102,252,223,252,178,251,110,254,213,249,60,252,219,251,130,253,11,251,98,250,37,250,90,252,34,250,129,252,194,249,204,253,69,249,51,253,162,253,171,253,114,251,195,251,167,250,44,254,102,248,43,250,210,248,71,252,116,248,93,252,37,250,68,255,157,249,91,254,79,250,174,254,88,250,234,255,106,248,90,254,42,248,7,255,16,254,142,255,138,248,13,253,247,250,174,0,85,250,147,255,30,254,255,254,59,251,4,254,175,249,151,0,98,249,208,0,114,253,107,0,141,249,29,0,139,251,23,1,65,251,50,1,52,251,6,254,38,253,81,255,44,251,155,255,55,252,39,2,154,252,22,1,201,252,59,1,205,253,120,1,229,251,228,0,5,254,24,1,169,253,25,1,10,253,253,0,207,254,123,1,13,253,122,255,157,253,148,2,200,252,24,2,207,252,134,2,99,254,49,0,171,254,177,0,59,254,14,2,30,254,77,2,185,255,83,1,111,253,8,1,12,255,39,1,19,255,59,1,125,254,57,2,6,254,247,255,135,254,14,0,96,255,149,2,40,255,40,0,204,254,210,255,95,0,214,0,14,255,167,0,170,255,192,0,200,255,27,0,180,255,31,0,36,0,53,1,150,255,74,255,143,255,74,0,71,254,234,255,23,0,139,0,81,0,245,255,44,0,15,0,169,255,119,255,138,255,49,255,98,255,198,255,16,1,164,255,100,255,71,254,8,0,120,255,128,0,35,255,101,0,38,255,40,0,59,255,180,255,56,254,9,0,67,254,33,0,89,254,226,0,60,0,73,0,34,255,156,0,113,254,24,1,194,254,245,0,171,254,166,0,13,254,83,1,66,255,71,1,37,255,69,1,119,255,167,255,172,253,100,0,141,253,144,0,91,253,231,1,28,0,252,0,121,254,214,0,215,255,26,1,228,255,99,0,226,254,75,1,49,0,203,1,124,254,53,2,143,254,180,1,28,0,80,1,247,255,141,1,89,255,106,2,34,0,84,2,239,255,49,2,116,255,43,1,79,0,10,2,125,0,203,0,2,0,244,0,32,1,255,0,211,0,175,0,82,0,84,2,187,0,5,2,108,0,125,1,255,0,109,1,41,1,241,1,96,1,71,1,174,255,25,0,210,0,115,1,245,0,5,1,3,0,33,2,193,1,140,0,38,1,44,0,39,1,212,0,91,1,244,0,238,1,75,1,16,2,201,0,51,1,93,1,155,1,101,2,28,1,102,2,157,1,208,1,66,1,112,2,141,1,97,0,200,0,96,255,128,1,149,0,106,1,239,1,13,2,13,1,73,2,33,0,235,1,135,255,177,1,171,1,99,2,242,1,4,2,171,0,187,1,241,1,154,2,184,1,19,1,54,2,63,2,146,0,127,2,155,0,158,2,223,255,173,0,212,0,184,2,90,255,89,2,65,255,183,2,23,254,247,1,175,0,230,2,214,0,220,1,116,1,59,4,66,2,18,2,74,2,9,3,169,1,106,3,59,1,73,3,118,1,80,3,91,255,53,2,35,0,223,3,217,255,38,4,73,1,200,2,18,3,72,3,133,2,27,3,149,2,164,2,59,2,150,3,120,2,55,4,161,2,49,3,62,1,132,1,106,3,244,3,52,2,80,3,112,3,108,2,45,2,223,1,159,2,197,1,180,2,212,1,72,3,130,2,76,3,133,2,250,1,172,1,129,3,55,2,69,3,131,1,194,3,243,1,179,2,49,2,171,3,158,3,15,3,40,1,22,3,12,1,4,4,18,2,106,3,73,1,36,2,143,0,163,2,35,1,247,1,66,0,17,4,103,1,18,3,97,0,37,3,33,0,69,3,214,1,255,1,49,0,68,4,71,1,150,4,67,1,3,0,242,0,104,3,218,1,177,2,173,1,49,5,166,2,18,4,108,2,85,4,152,2,65,1,193,0,121,3,182,3,129,4,106,3,125,3,123,2,109,3,94,3,180,3,145,3,13,5,153,2,40,5,127,2,229,3,25,3,122,5,6,4,152,4,244,3,86,4,191,3,130,5,157,3,123,5,147,3,31,2,94,3,92,4,198,4,67,3,166,4,67,3,166,4,191,3,124,4,123,4,96,5,20,5,169,4,135,5,207,4,55,5,61,5,234,2,68,4,175,6,3,5,109,5,49,4,54,5,30,6,129,4,195,5,109,6,113,4,33,7,196,4,32,4,102,5,241,5,194,6,96,6,9,6,84,6,6,6,87,3,60,6,97,3,131,6,181,2,117,3,180,6,239,5,143,4,16,5,161,8,224,6,160,7,213,5,228,7,202,5,254,5,74,7,158,6,216,7,30,6,236,2,225,6,57,3,38,1,112,5,60,4,10,8,109,2,35,5,109,1,7,5,198,0,4,4,232,1,128,5,249,0,147,1,246,3,25,6,68,1,107,1,109,6,20,4,193,0,111,1,242,7,67,7,5,255,67,2,238,2,226,3,13,255,30,0,45,5,111,3,228,255,87,255,112,2,149,3,59,254,159,0,186,0,90,5,154,253,6,0,25,2,136,1,162,255,221,254,13,3,229,0,128,255,214,254,245,0,235,1,67,253,120,253,204,3,21,3,11,254,128,253,178,0,255,0,147,254,122,254,1,255,61,1,66,252,218,254,65,255,228,0,249,252,65,254,157,0,19,255,111,253,48,253,105,254,92,0,139,255,157,253,78,1,26,255,89,253,196,251,112,255,195,254,123,252,163,252,30,253,152,254,171,255,41,253,166,255,237,252,100,0,234,255,121,254,249,254,200,255,183,255,175,254,14,253,5,0,67,255,62,253,144,253,89,0,168,254,121,255,167,251,159,254,19,255,84,253,145,251,237,254,178,251,243,254,77,251,152,0,145,0,46,253,48,251,49,0,80,0,32,251,248,252,8,255,135,1,36,253,221,253,213,1,218,0,1,255,160,252,69,0,110,1,90,255,27,254,80,253,191,0,68,251,84,251,86,255,87,255,228,250,161,249,65,1,214,1,117,250,37,251,192,255,16,1,175,250,8,255,236,1,53,2,47,253,159,253,195,0,229,1,195,253,123,255,171,1,202,0,85,255,138,255,199,0,63,2,2,0,225,255,182,2,243,2,170,250,217,255,40,2,45,2,23,254,15,1,168,2,25,2,13,0,59,254,87,3,186,3,123,255,204,255,175,255,226,2,111,251,125,2,31,4,35,4,161,255,164,2,235,4,57,4,233,1,49,1,63,254,186,3,234,253,228,3,55,252,98,3,222,251,35,4,242,250,106,2,120,250,105,2,54,254,86,5,97,255,29,7,250,252,240,253,242,255,86,4,78,251,123,252,252,252,177,1,24,251,25,251,13,252,210,254,166,253,183,253,9,253,174,249,8,253,243,249,184,252,127,248,208,252,229,253,23,249,69,247,29,255,220,255,14,248,217,248,197,247,154,251,89,246,232,248,66,250,252,0,115,245,97,254,197,253,45,254,229,5,18,6,132,8,183,7,22,9,228,7,191,248,111,249,191,248,37,249,248,247,130,251,170,247,138,249,173,249,181,251,88,249,149,251,191,250,184,249,177,250,154,249,198,250,243,250,211,250,15,251,128,249,143,249,49,250,173,252,190,250,216,248,123,250,116,247,254,250,87,253,7,249,143,249,58,252,198,251,97,251,116,249,226,251,207,251,138,251,122,251,73,251,24,253,6,251,27,252,90,252,153,250,97,252,120,250,14,252,231,250,241,252,69,252,231,251,124,252,31,252,207,252,31,253,201,252,52,252,91,251,30,253,186,251,30,253,126,251,240,252,223,252,214,252,238,252,132,252,248,253,24,252,206,252,124,253,59,252,191,253,142,252,227,253,74,253,97,253,107,252,173,253,126,253,122,253,153,253,68,252,147,253,99,252,253,253,41,253,29,254,209,252,27,254,184,252,190,253,72,254,55,253,190,253,187,254,111,253,98,253,126,254,198,253,71,254,102,253,254,253,237,252,120,254,239,253,246,253,59,254,25,254,89,254,152,253,183,253,151,253,99,255,106,253,244,254,88,253,164,254,190,254,189,254,136,253,68,254,208,254,82,254,180,254,54,254,235,254,44,254,109,253,231,252,193,254,132,253,29,255,214,253,139,254,165,254,178,254,46,255,56,254,64,255,238,253,14,255,40,255,58,255,146,254,142,254,174,254,95,255,103,254,20,253,149,255,132,254,218,254,125,253,33,255,103,253,22,255,27,253,115,255,16,254,126,255,2,254,117,255,185,254,84,255,207,254,206,254,188,253,92,255,249,254,250,254,84,255,189,255,110,254,31,0,146,254,246,255,76,254,170,255,241,253,71,0,135,254,234,255,159,253,244,255,90,253,189,255,193,254,63,0,65,255,35,0,75,255,217,255,14,255,126,0,89,255,116,255,224,253,155,0,215,254,174,0,215,254,38,0,248,255,117,0,132,254,197,0,60,254,240,0,246,253,223,0,153,255,110,0,69,255,87,0,101,255,169,0,209,255,157,0,26,0,173,255,156,255,128,0,80,0,209,0,194,255,6,0,7,0,22,0,5,0,62,1,236,255,248,0,211,255,56,255,193,255,156,0,187,255,250,0,73,255,113,1,130,255,143,255,180,255,114,255,134,255,192,255,2,255,225,255,35,0,79,255,185,255,249,255,171,0,93,0,27,0,108,0,212,0,182,254,47,255,133,255,186,255,233,254,95,0,160,255,20,0,68,255,195,255,198,254,87,0,212,254,178,255,158,254,122,255,11,0,122,0,116,255,122,0,237,254,152,0,219,254,140,0,174,255,138,0,191,254,145,255,32,254,100,255,153,254,76,0,2,255,216,255,133,253,160,255,246,253,79,0,5,254,8,0,244,254,47,1,229,253,68,0,66,254,61,0,246,253,50,1,111,0,189,0,77,254,122,0,133,254,166,0,197,253,114,254,136,253,182,255,21,253,161,255,57,254,194,0,72,252,83,0,226,252,192,0,13,253,192,0,243,252,94,255,149,253,234,0,105,253,215,254,24,254,147,255,60,252,124,255,186,252,188,255,181,252,58,0,168,251,170,255,219,252,213,254,80,252,3,255,246,252,206,255,59,252,219,253,160,254,158,255,32,252,169,254,163,251,197,254,163,251,205,254,125,251,138,254,131,253,26,255,114,251,213,255,237,250,156,255,99,252,119,254,6,251,168,253,79,253,126,255,57,250,200,254,215,250,2,255,72,250,70,254,244,250,155,253,19,251,9,254,35,250,144,254,214,250,26,0,104,250,190,255,49,249,95,255,148,249,45,254,32,249,220,253,143,250,200,253,236,249,153,252,41,250,246,251,149,250,197,253,131,248,240,253,9,249,133,255,151,248,25,255,250,247,189,254,252,247,118,252,72,248,201,253,131,248,148,253,1,248,35,252,203,251,142,254,17,248,64,253,205,246,19,253,76,245,191,251,139,248,159,0,36,248,248,0,142,253,133,255,221,246,62,252,99,253,104,254,157,250,106,251,60,254,148,254,236,251,33,253,124,255,183,0,172,249,16,253,221,253,205,254,247,252,19,251,158,255,41,0,144,252,189,251,255,254,97,0,190,249,215,248,31,0,230,255,124,253,207,253,76,255,222,253,127,254,185,251,102,254,222,252,98,254,197,252,55,254,54,252,22,254,171,251,41,255,108,252,112,255,87,252,19,254,11,251,251,253,29,250,181,0,101,0,180,254,135,252,188,252,87,252,209,253,83,254,139,253,221,253,73,255,175,254,223,253,174,255,6,255,226,254,5,0,124,255,164,254,4,255,219,254,40,254,98,255,100,0,227,255,197,0,20,255,88,254,163,252,43,255,116,255,249,255,85,254,69,254,187,0,159,255,84,253,32,253,219,254,2,1,144,254,104,255,106,255,136,1,159,253,175,0,114,255,43,1,118,255,152,0,137,255,73,1,26,254,204,255,37,1,198,0,73,255,117,0,175,0,75,1,198,255,238,254,231,0,44,1,224,254,74,1,207,254,116,1,145,255,153,1,247,255,167,1,83,0,0,1,67,0,111,1,237,255,248,0,91,0,113,0,221,255,150,1,65,255,154,0,238,0,40,1,5,0,197,0,141,0,221,0,57,1,198,0,211,0,165,1,244,0,78,1,88,0,170,1,13,255,198,1,202,0,40,2,251,255,147,1,35,1,185,0,219,0,45,1,251,0,138,0,128,0,69,0,197,0,32,1,116,255,195,255,188,0,105,1,197,0,86,2,186,1,17,1,34,1,143,0,216,1,226,1,157,0,114,1,159,1,65,1,116,1,129,1,146,1,40,2,155,0,24,0,38,2,7,1,245,255,21,0,104,1,227,0,147,0,2,255,168,1,97,0,110,1,243,255,119,1,141,0,193,1,232,0,140,1,251,1,218,1,16,1,189,2,68,1,106,1,209,255,75,2,148,0,31,2,69,0,144,1,205,255,49,2,59,0,220,0,246,255,96,1,147,0,206,0,211,0,141,2,185,0,51,2,41,1,53,2,28,1,82,2,121,0,254,2,192,0,142,1,118,0,130,2,178,1,233,0,8,1,225,1,211,1,129,0,91,255,187,2,239,0,90,0,26,0,86,1,218,1,201,255,27,0,132,1,94,0,84,255,0,0,213,2,123,1,196,255,81,1,114,1,209,1,95,0,63,1,38,3,83,2,78,0,4,1,241,1,83,3,210,0,48,2,202,1,62,2,48,254,202,0,241,1,113,2,54,255,152,0,48,0,200,2,236,255,54,2,100,0,203,2,199,1,212,1,155,1,93,2,63,1,134,2,195,0,103,2,145,1,26,2,168,2,227,2,201,0,155,2,178,1,186,3,198,1,169,1,134,2,235,1,94,2,169,2,160,1,252,1,241,1,54,3,170,1,47,3,148,2,135,2,116,2,204,2,185,2,210,1,106,2,201,1,173,2,204,1,109,1,53,1,209,2,55,2,68,3,89,2,97,2,44,1,57,3,203,1,175,3,175,2,169,2,21,2,147,3,86,2,79,2,243,0,108,3,195,1,106,3,164,1,18,3,61,1,220,2,220,0,154,3,61,1,84,4,111,1,19,2,210,1,4,4,137,2,29,4,103,2,10,4,41,2,61,3,90,2,253,3,31,3,159,3,35,3,110,3,251,2,31,3,240,1,93,5,5,3,73,2,2,3,35,3,162,3,75,4,25,3,198,4,94,3,185,4,127,3,1,4,215,2,4,3,77,3,148,4,91,4,99,3,253,3,62,3,245,3,73,3,142,3,250,1,191,2,215,4,53,4,108,2,51,3,172,4,59,4,131,4,57,4,118,4,139,3,11,6,97,4,29,5,136,2,63,5,100,2,204,5,220,3,199,5,169,3,217,3,48,5,187,3,61,5,173,1,142,3,73,3,58,5,52,2,155,4,156,1,132,4,147,5,40,5,154,5,50,5,128,2,248,2,190,6,130,5,190,0,43,2,49,4,237,3,170,1,1,1,71,3,212,3,235,0,231,0,240,5,143,4,109,0,37,1,246,3,33,6,49,1,142,0,124,4,27,2,221,254,148,255,189,4,204,3,22,0,40,255,155,2,60,3,30,254,182,1,197,1,151,5,187,253,90,254,21,3,131,1,154,254,58,254,174,0,12,3,220,255,140,254,134,1,122,255,139,253,160,0,206,254,239,2,22,251,181,254,177,0,10,2,8,255,62,2,5,255,127,2,237,253,151,1,172,253,138,1,93,254,21,3,151,253,33,3,38,252,143,1,167,252,215,2,249,255,6,2,65,253,54,1,137,251,232,255,22,252,31,1,64,252,107,1,237,250,56,1,2,250,245,0,235,249,49,1,28,0,153,0,165,252,81,255,223,255,76,1,138,250,102,255,212,0,154,1,175,253,59,255,188,251,64,253,120,252,191,255,26,1,111,1,106,252,82,253,89,1,93,0,254,254,155,254,184,2,132,2,75,253,228,255,192,1,237,1,239,254,193,0,15,2,34,2,13,255,255,253,128,1,120,255,17,1,159,254,0,2,114,255,25,2,58,255,173,3,238,2,83,0,248,0,66,2,93,3,200,255,80,2,74,3,44,0,124,3,24,0,33,0,122,3,240,255,214,3,63,3,118,5,255,5,106,7,180,6,96,5,156,7,185,5,22,252,95,252,184,251,77,251,127,253,93,252,164,253,63,252,245,252,95,253,189,252,236,252,96,254,104,253,54,254,2,253,116,253,247,253,106,253,17,254,1,252,3,254,1,252,84,254,68,254,216,253,144,254,63,254,33,254,45,255,226,251,121,252,196,254,7,255,199,253,177,253,199,253,237,254,227,253,65,255,52,253,68,255,182,252,248,254,179,254,8,255,194,254,28,255,237,254,1,0,201,253,28,255,141,255,35,255,18,255,138,254,59,255,5,254,34,255,189,253,254,254,80,254,195,255,12,255,167,254,2,0,174,254,39,0,41,255,87,255,198,255,0,0,200,255,250,255,53,255,125,255,1,0,70,255,251,255,45,255,6,0,132,254,11,0,94,254,140,255,131,0,122,255,113,0,89,0,252,255,71,0,254,255,237,255,64,255,6,1,24,0,189,0,151,0,123,255,147,255,186,0,103,255,166,0,37,255,37,0,139,0,193,0,171,0,81,1,124,0,158,0,195,255,141,0,226,0,243,255,190,0,231,0,34,0,98,1,109,0,60,1,201,0,244,0,164,0,74,1,171,255,134,1,172,255,254,0,71,1,1,1,79,1,235,1,147,0,220,1,105,0,54,0,77,0,181,1,114,1,165,1,58,1,193,1,86,1,73,1,126,0,161,2,36,1,59,2,132,1,243,0,193,0,141,2,64,1,109,2,24,1,194,0,124,1,5,2,69,2,45,0,67,1,111,0,166,1,233,1,139,1,222,2,22,2,110,2,34,2,230,1,246,1,62,1,60,2,189,0,38,2,129,1,166,1,99,255,153,0,131,255,126,1,59,255,130,1,249,254,78,1,228,0,185,2,68,255,1,0,51,0,41,1,5,254,213,0,136,254,141,1,232,255,255,0,221,253,89,0,10,254,162,255,131,1,179,0,148,253,68,0,84,253,112,0,126,253,162,254,252,254,172,0,74,254,188,254,8,1,136,2,60,252,252,255,159,251,7,0,122,255,134,0,147,251,206,254,143,0,96,0,92,254,15,254,59,251,162,254,9,250,83,253,95,255,72,0,105,3,179,2,220,2,27,1,153,3,97,1,78,1,219,1,71,4,53,3,96,3,12,2,75,3,241,1,202,2,199,2,20,3,238,2,52,4,202,2,180,4,241,2,65,2,150,2,124,245,170,192,38,3,44,7,95,251,33,228,37,12,28,4,40,248,202,208,85,16,107,5,192,249,99,218,69,9,145,5,232,249,78,219,176,12,193,7,210,251,214,230,35,7,16,9,184,252,64,236,173,3,242,12,199,254,163,248,47,9,161,11,41,254,234,244,32,14,116,9,247,252,183,237,123,13,24,12,98,254,70,246,139,11,205,16,72,0,178,1,56,7,148,17,139,0,68,3,44,15,40,21,157,1,180,9,163,4,42,28,67,3,166,19,11,12,40,35,139,4,90,27,216,28,115,3,37,247,177,202,74,23,226,5,58,250,60,221,35,20,86,8,61,252,88,233,8,31,217,7,228,251,65,231,107,25,202,8,139,252,49,235,246,29,192,10,180,253,47,242,64,23,200,11,60,254,92,245,34,19,180,14,131,255,17,253,77,27,4,14,60,255,103,251,238,31,138,15,213,255,252,254,176,23,52,17,107,0,133,2,29,30,223,19,64,1,136,7,147,21,133,23,57,2,98,13,89,30,214,27,50,3,62,19,172,23,2,31,209,3,253,22,218,21,223,44,243,5,212,35,85,41,76,5,159,249,153,217,89,35,61,6,145,250,68,223,66,38,243,7,247,251,180,231,242,34,111,9,244,252,164,237,56,40,24,10,87,253,253,239,191,36,174,10,171,253,245,241,252,33,146,12,156,254,160,247,29,38,67,13,235,254,123,249,193,39,52,15,181,255,58,254,210,35,176,17,148,0,123,3,168,39,140,19,40,1,245,6,154,35,103,22,241,1,177,11,4,41,122,24,116,2,198,14,126,39,207,29,151,3,158,21,140,34,23,34,93,4,72,26,252,34,208,48,112,6,193,38,124,50,208,3,185,247,47,206,171,44,219,6,28,251,141,226,106,47,24,9,189,252,96,236,124,44,64,9,214,252,248,236,204,41,248,11,83,254,236,245,44,48,45,11,238,253,136,243,202,45,255,12,205,254,200,248,6,44,116,14,106,255,120,252,109,42,61,17,110,0,151,2,50,47,181,17,150,0,134,3,19,44,85,20,98,1,84,8,184,46,161,24,125,2,253,14,159,43,110,29,132,3,44,21,96,47,137,32,25,4,168,24,217,42,25,42,149,5,156,33,60,40,224,67,87,8,53,50,75,54,145,6,220,250,15,225,36,49,253,7,254,251,221,231,209,51,135,9,2,253,254,237,209,54,173,11,47,254,14,245,140,52,26,12,99,254,78,246,108,48,74,14,89,255,18,252,198,52,196,14,137,255,55,253,80,50,176,16,62,0,118,1,221,52,253,18,253,0,243,5,123,49,81,21,168,1,248,9,30,54,218,23,78,2,223,13,231,50,83,25,166,2,244,15,245,52,41,30,169,3,7,22,157,50,95,36,189,4,136,28,146,53,31,45,252,5,5,36,47,49,102,59,146,7,147,45,9,59,4,6,91,250,4,222,224,58,29,9,192,252,113,236,191,56,207,9,45,253,0,239,100,57,127,12,147,254,107,247,22,60,232,13,49,255,33,251,53,55,120,15,206,255,212,254,254,58,140,16,50,0,42,1,252,55,216,18,242,0,174,5,254,57,75,21,166,1,238,9,202,59,195,23,72,2,190,13,249,55,232,26,0,3,15,18,212,58,9,30,162,3,226,21,70,56,210,36,207,4,245,28,27,60,13,38,0,5,26,30,232,57,191,55,52,7,94,43,32,53,107,97,109,10,195,62,12,64,177,7,198,251,139,230,177,65,16,11,223,253,45,243,97,61,27,11,229,253,80,243,232,62,8,13,209,254,223,248,0,64,123,15,207,255,218,254,44,66,227,17,165,0,224,3,95,61,247,17,171,0,6,4,94,63,72,21,165,1,233,9,192,65,238,24,143,2,105,15,129,61,229,27,53,3,80,19,198,63,45,29,120,3,223,20,227,64,176,33,76,4,222,25,132,66,178,40,99,5,111,32,33,62,41,46,29,6,207,36,238,65,98,57,95,7,96,44,131,64,134,81,102,9,147,56,222,70,35,8,25,252,131,232,201,75,106,12,137,254,47,247,100,68,98,13,248,254,203,249,86,78,187,15,231,255,105,255,149,70,153,16,54,0,70,1,8,74,202,19,58,1,98,7,47,69,26,21,153,1,157,9,123,77,48,24,98,2,92,14,30,70,102,27,27,3,176,18,70,83,197,30,198,3,184,22,246,69,73,36,186,4,115,28,200,74,74,36,186,4,116,28,37,80,117,44,230,5,129,35,155,70,149,56,74,7,226,43,31,78,218,69,129,8,52,51,154,73,252,127,0,12,62,72,61,42,81,112,63,11,181,67,0,80,225,10,198,253,153,242,153,73,194,25,191,2,139,16,81,24,245,28,108,3,156,20,51,67,204,40,103,5,133,32,122,84,245,4,61,249,74,215,143,82,71,17,113,0,171,2,40,44,20,6,106,250,95,222,61,74,20,50,150,6,164,39,215,67,194,9,37,253,210,238,194,69,225,18,244,0,192,5,10,39,194,9,37,253,210,238,122,68,184,30,196,3,170,22,174,55,92,7,133,251,5,229,20,62,81,12,125,254,233,246,61,26,10,7,67,251,121,227,10,71,225,78,53,9,109,55,102,70,215,11,67,254,138,245,71,65,225,22,16,2,109,12,143,34,174,15,226,255,76,255,20,62,10,35,134,4,60,27,102,70,112,5,198,249,129,218,71,65,0,16,0,0,0,0,0,32,143,2,108,245,79,192,133,59,102,54,16,7,132,42,174,55,40,12,106,254,116,246,10,55,61,18,193,0,141,4,30,21,143,10,154,253,143,241,122,52,153,25,182,2,84,16,163,48,133,3,67,247,100,203,163,48,102,10,131,253,7,241,184,14,143,2,108,245,79,192,153,57,215,91,22,10,183,60,225,74,153,9,13,253,62,238,184,78,215,19,62,1,121,7,225,26,0,16,0,0,0,0,0,80,112,33,65,4,156,25,204,76,225,2,26,246,105,196,61,74,163,16,58,0,91,1,184,30,40,8,29,252,151,232,204,44,0,48,87,6,43,38,20,62,194,5,26,250,126,220,112,61,20,18,180,0,62,4,215,35,153,5,240,249,131,219,184,62,92,27,25,3,164,18,235,57,225,2,26,246,105,196,225,58,204,8,140,252,55,235,215,19,204,4,12,249,38,214,215,51,174,67,83,8,27,50,163,64,30,9,193,252,118,236,225,58,184,22,6,2,46,12,92,15,102,14,100,255,86,252,174,55,153,33,72,4,198,25,235,65,10,3,106,246,74,198,225,58,225,14,149,255,122,253,174,23,102,2,12,245,17,190,122,36,40,36,180,4,83,28,215,51,225,6,33,251,172,226,215,51,194,13,33,255,193,250,153,9,174,7,196,251,127,230,204,44,153,21,187,1,108,10,245,40,225,2,26,246,105,196,112,45,122,12,145,254,92,247,194,5,10,3,106,246,74,198,0,64,248,65,226,67,190,69,142,71,82,73,12,75,188,76,98,78,0,80,150,81,35,83,170,84,42,86,163,87,22,89,130,90,234,91,76,93,168,94,0,96,83,97,161,98,236,99,49,101,115,102,177,103,235,104,34,106,85,107,132,108,177,109,218,110,0,112,35,113,67,114,97,115,123,116,147,117,169,118,188,119,204,120,218,121,230,122,239,123,247,124,252,125,255,126,255,127,255,127,61,10,63,10,69,10,78,10,91,10,108,10,129,10,153,10,181,10,212,10,248,10,31,11,74,11,120,11,170,11,224,11,25,12,86,12,151,12,219,12,35,13,110,13,189,13,15,14,101,14,190,14,27,15,123,15,223,15,70,16,176,16,30,17,143,17,3,18,123,18,245,18,115,19,244,19,120,20,0,21,138,21,23,22,168,22,59,23,209,23,106,24,6,25,165,25,70,26,234,26,145,27,59,28,231,28,149,29,70,30,250,30,176,31,104,32,35,33,224,33,159,34,97,35,36,36,234,36,178,37,124,38,71,39,21,40,228,40,181,41,136,42,93,43,51,44,11,45,228,45,191,46,155,47,121,48,88,49,56,50,26,51,252,51,224,52,196,53,170,54,145,55,120,56,96,57,73,58,51,59,29,60,8,61,243,61,223,62,203,63,184,64,165,65,146,66,127,67,108,68,90,69,71,70,52,71,33,72,14,73,251,73,231,74,211,75,191,76,170,77,149,78,126,79,104,80,80,81,56,82,31,83,5,84,234,84,207,85,178,86,148,87,116,88,84,89,50,90,15,91,235,91,197,92,157,93,117,94,74,95,30,96,240,96,192,97,143,98,91,99,38,100,239,100,181,101,122,102,60,103,253,103,187,104,119,105,48,106,232,106,156,107,79,108,255,108,172,109,87,110,255,110,165,111,71,112,231,112,133,113,31,114,183,114,75,115,221,115,108,116,248,116,129,117,6,118,137,118,8,119,133,119,254,119,116,120,230,120,86,121,194,121,42,122,144,122,242,122,80,123,171,123,3,124,87,124,167,124,244,124,62,125,132,125,198,125,5,126,64,126,120,126,172,126,220,126,9,127,49,127,87,127,120,127,150,127,176,127,199,127,217,127,232,127,243,127,251,127,255,127,255,127,229,127,153,127,25,127,103,126,129,125],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+20480),allocate([106,124,33,123,167,121,252,119,34,118,24,116,223,113,122,111,231,108,41,106,65,103,47,100,245,96,149,93,15,90,101,86,153,82,171,78,158,74,116,70,45,66,204,61,82,57,193,52,27,48,98,43,151,38,189,33,213,28,226,23,230,18,226,13,216,8,203,3,61,10,64,10,73,10,88,10,108,10,135,10,167,10,205,10,249,10,43,11,99,11,160,11,227,11,44,12,122,12,207,12,40,13,136,13,237,13,87,14,199,14,60,15,183,15,55,16,189,16,71,17,215,17,108,18,6,19,165,19,73,20,242,20,159,21,82,22,9,23,196,23,133,24,73,25,18,26,224,26,177,27,135,28,97,29,62,30,32,31,5,32,238,32,219,33,203,34,191,35,182,36,176,37,174,38,174,39,177,40,184,41,193,42,204,43,218,44,235,45,254,46,19,48,42,49,67,50,94,51,123,52,154,53,186,54,219,55,254,56,34,58,71,59,109,60,148,61,188,62,228,63,13,65,54,66,96,67,138,68,180,69,221,70,7,72,48,73,89,74,130,75,169,76,208,77,246,78,27,80,63,81,98,82,132,83,164,84,194,85,223,86,250,87,19,89,43,90,64,91,83,92,99,93,113,94,125,95,134,96,140,97,143,98,144,99,141,100,135,101,126,102,114,103,98,104,79,105,56,106,30,107,255,107,221,108,183,109,140,110,94,111,43,112,244,112,185,113,121,114,53,115,236,115,158,116,76,117,245,117,153,118,55,119,209,119,102,120,246,120,129,121,6,122,134,122,1,123,118,123,230,123,81,124,182,124,21,125,111,125,195,125,17,126,90,126,157,126,219,126,18,127,68,127,112,127,150,127,183,127,209,127,230,127,244,127,253,127,255,127,255,127,244,127,208,127,149,127,66,127,215,126,85,126,188,125,12,125,69,124,104,123,117,122,108,121,78,120,28,119,213,117,122,116,13,115,140,113,250,111,87,110,162,108,222,106,11,105,40,103,57,101,60,99,51,97,30,95,255,92,215,90,165,88,108,86,44,84,229,81,154,79,74,77,247,74,161,72,74,70,243,67,156,65,71,63,244,60,164,58,88,56,18,54,209,51,152,49,103,47,62,45,31,43,11,41,2,39,5,37,21,35,51,33,95,31,155,29,231,27,67,26,177,24,49,23,195,21,105,20,34,19,239,17,209,16,201,15,214,14,249,13,50,13,130,12,232,11,102,11,252,10,169,10,109,10,73,10,61,10,61,10,63,10,67,10,74,10,84,10,96,10,111,10,129,10,150,10,174,10,200,10,229,10,5,11,39,11,77,11,117,11,159,11,205,11,253,11,48,12,101,12,157,12,216,12,22,13,86,13,153,13,222,13,38,14,113,14,190,14,13,15,96,15,181,15,12,16,102,16,194,16,33,17,130,17,230,17,76,18,180,18,31,19,140,19,252,19,110,20,226,20,88,21,209,21,76,22,201,22,72,23,202,23,77,24,211,24,91,25,229,25,113,26,254,26,142,27,32,28,180,28,74,29,225,29,123,30,22,31,179,31,82,32,242,32,149,33,57,34,222,34,133,35,46,36,216,36,132,37,50,38,224,38,145,39,66,40,245,40,169,41,95,42,22,43,206,43,135,44,66,45,253,45,186,46,120,47,54,48,246,48,183,49,120,50,59,51,254,51,194,52,135,53,77,54,19,55,218,55,161,56,106,57,50,58,252,58,197,59,144,60,90,61,37,62,240,62,188,63,136,64,84,65,32,66,236,66,185,67,133,68,82,69,30,70,235,70,183,71,132,72,80,73,28,74,231,74,179,75,126,76,73,77,19,78,221,78,166,79,111,80,56,81,0,82,199,82,142,83,84,84,25,85,221,85,161,86,100,87,38,88,231,88,167,89,103,90,37,91,226,91,158,92,89,93,19,94,204,94,131,95,57,96,238,96,162,97,84,98,5,99,181,99,99,100,15,101,186,101,100,102,12,103,178,103,87,104,250,104,155,105,59,106,217,106,117,107,16,108,168,108,63,109,211,109,102,110,247,110,134,111,19,112,158,112,39,113,174,113,50,114,181,114,53,115,179,115,47,116,169,116,33,117,150,117,9,118,122,118,232,118,84,119,190,119,37,120,138,120,236,120,76,121,170,121,5,122,94,122,180,122,7,123,88,123,167,123,242,123,60,124,130,124,198,124,8,125,71,125,131,125,188,125,243,125,39,126,89,126,136,126,180,126,221,126,4,127,40,127,73,127,103,127,131,127,156,127,178,127,197,127,214,127,228,127,239,127,247,127,253,127,255,127,255,127,97,125,160,117,15,105,48,88,181,67,116,44,98,19,68,101,99,111,100,101,114,0,101,110,99,111,100,101,114,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+30720);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);function copyTempFloat(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3]}function copyTempDouble(e){HEAP8[tempDoublePtr]=HEAP8[e],HEAP8[tempDoublePtr+1]=HEAP8[e+1],HEAP8[tempDoublePtr+2]=HEAP8[e+2],HEAP8[tempDoublePtr+3]=HEAP8[e+3],HEAP8[tempDoublePtr+4]=HEAP8[e+4],HEAP8[tempDoublePtr+5]=HEAP8[e+5],HEAP8[tempDoublePtr+6]=HEAP8[e+6],HEAP8[tempDoublePtr+7]=HEAP8[e+7]}function _sbrk(e){var r=_sbrk;r.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),r.called=!0,assert(Runtime.dynamicAlloc),r.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var n=DYNAMICTOP;if(0!=e&&!r.alloc(e))return-1>>>0;return n}function ___setErrNo(e){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=e),e}assert(tempDoublePtr%8==0);var ERRNO_CODES={EPERM:1,ENOENT:2,ESRCH:3,EINTR:4,EIO:5,ENXIO:6,E2BIG:7,ENOEXEC:8,EBADF:9,ECHILD:10,EAGAIN:11,EWOULDBLOCK:11,ENOMEM:12,EACCES:13,EFAULT:14,ENOTBLK:15,EBUSY:16,EEXIST:17,EXDEV:18,ENODEV:19,ENOTDIR:20,EISDIR:21,EINVAL:22,ENFILE:23,EMFILE:24,ENOTTY:25,ETXTBSY:26,EFBIG:27,ENOSPC:28,ESPIPE:29,EROFS:30,EMLINK:31,EPIPE:32,EDOM:33,ERANGE:34,ENOMSG:42,EIDRM:43,ECHRNG:44,EL2NSYNC:45,EL3HLT:46,EL3RST:47,ELNRNG:48,EUNATCH:49,ENOCSI:50,EL2HLT:51,EDEADLK:35,ENOLCK:37,EBADE:52,EBADR:53,EXFULL:54,ENOANO:55,EBADRQC:56,EBADSLT:57,EDEADLOCK:35,EBFONT:59,ENOSTR:60,ENODATA:61,ETIME:62,ENOSR:63,ENONET:64,ENOPKG:65,EREMOTE:66,ENOLINK:67,EADV:68,ESRMNT:69,ECOMM:70,EPROTO:71,EMULTIHOP:72,EDOTDOT:73,EBADMSG:74,ENOTUNIQ:76,EBADFD:77,EREMCHG:78,ELIBACC:79,ELIBBAD:80,ELIBSCN:81,ELIBMAX:82,ELIBEXEC:83,ENOSYS:38,ENOTEMPTY:39,ENAMETOOLONG:36,ELOOP:40,EOPNOTSUPP:95,EPFNOSUPPORT:96,ECONNRESET:104,ENOBUFS:105,EAFNOSUPPORT:97,EPROTOTYPE:91,ENOTSOCK:88,ENOPROTOOPT:92,ESHUTDOWN:108,ECONNREFUSED:111,EADDRINUSE:98,ECONNABORTED:103,ENETUNREACH:101,ENETDOWN:100,ETIMEDOUT:110,EHOSTDOWN:112,EHOSTUNREACH:113,EINPROGRESS:115,EALREADY:114,EDESTADDRREQ:89,EMSGSIZE:90,EPROTONOSUPPORT:93,ESOCKTNOSUPPORT:94,EADDRNOTAVAIL:99,ENETRESET:102,EISCONN:106,ENOTCONN:107,ETOOMANYREFS:109,EUSERS:87,EDQUOT:122,ESTALE:116,ENOTSUP:95,ENOMEDIUM:123,EILSEQ:84,EOVERFLOW:75,ECANCELED:125,ENOTRECOVERABLE:131,EOWNERDEAD:130,ESTRPIPE:86};function _sysconf(e){switch(e){case 30:return PAGE_SIZE;case 85:return totalMemory/PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 79:return 0;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}function _emscripten_memcpy_big(e,r,n){return HEAPU8.set(HEAPU8.subarray(r,r+n),e),e}function _abort(){Module.abort()}Module._memcpy=_memcpy,Module._memmove=_memmove,Module._memset=_memset;var ERRNO_MESSAGES={0:"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},TTY={ttys:[],init:function(){},shutdown:function(){},register:function(e,r){TTY.ttys[e]={input:[],output:[],ops:r},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open:function(e){var r=TTY.ttys[e.node.rdev];if(!r)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);e.tty=r,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,r,n,t,i){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(ERRNO_CODES.ENXIO);for(var o=0,a=0;ae.contents.length&&(e.contents=MEMFS.getFileDataAsRegularArray(e),e.usedBytes=e.contents.length),!e.contents||e.contents.subarray){var n=e.contents?e.contents.buffer.byteLength:0;if(r<=n)return;r=Math.max(r,n*(n<1048576?2:1.125)|0),0!=n&&(r=Math.max(r,256));var t=e.contents;return e.contents=new Uint8Array(r),void(0r)e.contents.length=r;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,t);if(assert(0<=a),8n.timestamp)&&(a.push(e),o++)});var n=[];if(Object.keys(i.entries).forEach(function(e){i.entries[e];t.entries[e]||(n.push(e),o++)}),!o)return r(null);var s=0,e=("remote"===t.type?t.db:i.db).transaction([IDBFS.DB_STORE_NAME],"readwrite"),l=e.objectStore(IDBFS.DB_STORE_NAME);function f(e){return e?f.errored?void 0:(f.errored=!0,r(e)):++s>=o?r(null):void 0}e.onerror=function(e){f(this.error),e.preventDefault()},a.sort().forEach(function(n){"local"===i.type?IDBFS.loadRemoteEntry(l,n,function(e,r){if(e)return f(e);IDBFS.storeLocalEntry(n,r,f)}):IDBFS.loadLocalEntry(n,function(e,r){if(e)return f(e);IDBFS.storeRemoteEntry(l,n,r,f)})}),n.sort().reverse().forEach(function(e){"local"===i.type?IDBFS.removeLocalEntry(e,f):IDBFS.removeRemoteEntry(l,e,f)})}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(e){assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var o=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),a={};function t(e){for(var r=e.split("/"),n=o,t=0;t=e.node.size)return 0;var o=e.node.contents.slice(i,i+t),a=WORKERFS.reader.readAsArrayBuffer(o);return r.set(new Uint8Array(a),n),o.size},write:function(e,r,n,t,i){throw new FS.ErrnoError(ERRNO_CODES.EIO)},llseek:function(e,r,n){var t=r;if(1===n?t+=e.position:2===n&&FS.isFile(e.node.mode)&&(t+=e.node.size),t<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return t}}},_stdin=allocate(1,"i32*",ALLOC_STATIC),_stdout=allocate(1,"i32*",ALLOC_STATIC),_stderr=allocate(1,"i32*",ALLOC_STATIC),FS={root:null,mounts:[],devices:[null],streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,handleFSError:function(e){if(!(e instanceof FS.ErrnoError))throw e+" : "+stackTrace();return ___setErrNo(e.errno)},lookupPath:function(e,r){if(r=r||{},!(e=PATH.resolve(FS.cwd(),e)))return{path:"",node:null};var n={follow_mount:!0,recurse_count:0};for(var t in n)void 0===r[t]&&(r[t]=n[t]);if(8>>0)%FS.nameTable.length},hashAddNode:function(e){var r=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[r],FS.nameTable[r]=e},hashRemoveNode:function(e){var r=FS.hashName(e.parent.id,e.name);if(FS.nameTable[r]===e)FS.nameTable[r]=e.name_next;else for(var n=FS.nameTable[r];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode:function(e,r){var n=FS.mayLookup(e);if(n)throw new FS.ErrnoError(n,e);for(var t=FS.hashName(e.id,r),i=FS.nameTable[t];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===r)return i}return FS.lookup(e,r)},createNode:function(e,r,n,t){if(!FS.FSNode){FS.FSNode=function(e,r,n,t){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=r,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=t},FS.FSNode.prototype={};Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}})}var i=new FS.FSNode(e,r,n,t);return FS.hashAddNode(i),i},destroyNode:function(e){FS.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var r=FS.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:function(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:function(e,r){return FS.ignorePermissions?0:(-1===r.indexOf("r")||292&e.mode)&&(-1===r.indexOf("w")||146&e.mode)&&(-1===r.indexOf("x")||73&e.mode)?0:ERRNO_CODES.EACCES},mayLookup:function(e){var r=FS.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:ERRNO_CODES.EACCES)},mayCreate:function(e,r){try{FS.lookupNode(e,r);return ERRNO_CODES.EEXIST}catch(e){}return FS.nodePermissions(e,"wx")},mayDelete:function(e,r,n){var t;try{t=FS.lookupNode(e,r)}catch(e){return e.errno}var i=FS.nodePermissions(e,"wx");if(i)return i;if(n){if(!FS.isDir(t.mode))return ERRNO_CODES.ENOTDIR;if(FS.isRoot(t)||FS.getPath(t)===FS.cwd())return ERRNO_CODES.EBUSY}else if(FS.isDir(t.mode))return ERRNO_CODES.EISDIR;return 0},mayOpen:function(e,r){return e?FS.isLink(e.mode)?ERRNO_CODES.ELOOP:FS.isDir(e.mode)&&(0!=(2097155&r)||512&r)?ERRNO_CODES.EISDIR:FS.nodePermissions(e,FS.flagsToPermissionString(r)):ERRNO_CODES.ENOENT},MAX_OPEN_FDS:4096,nextfd:function(e,r){e=e||0,r=r||FS.MAX_OPEN_FDS;for(var n=e;n<=r;n++)if(!FS.streams[n])return n;throw new FS.ErrnoError(ERRNO_CODES.EMFILE)},getStream:function(e){return FS.streams[e]},createStream:function(e,r,n){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var t=new FS.FSStream;for(var i in e)t[i]=e[i];e=t;var o=FS.nextfd(r,n);return e.fd=o,FS.streams[o]=e},closeStream:function(e){FS.streams[e]=null},chrdev_stream_ops:{open:function(e){var r=FS.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new FS.ErrnoError(ERRNO_CODES.ESPIPE)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,r){return e<<8|r},registerDevice:function(e,r){FS.devices[e]={stream_ops:r}},getDevice:function(e){return FS.devices[e]},getMounts:function(e){for(var r=[],n=[e];n.length;){var t=n.pop();r.push(t),n.push.apply(n,t.mounts)}return r},syncfs:function(r,n){"function"==typeof r&&(n=r,r=!1);var t=FS.getMounts(FS.root.mount),i=0;function o(e){if(e)return o.errored?void 0:(o.errored=!0,n(e));++i>=t.length&&n(null)}t.forEach(function(e){if(!e.type.syncfs)return o(null);e.type.syncfs(e,r,o)})},mount:function(e,r,n){var t,i="/"===n,o=!n;if(i&&FS.root)throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!i&&!o){var a=FS.lookupPath(n,{follow_mount:!1});if(n=a.path,t=a.node,FS.isMountpoint(t))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(!FS.isDir(t.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR)}var s={type:e,opts:r,mountpoint:n,mounts:[]},l=e.mount(s);return(l.mount=s).root=l,i?FS.root=l:t&&(t.mounted=s,t.mount&&t.mount.mounts.push(s)),l},unmount:function(e){var r=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(r.node))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var n=r.node,t=n.mounted,i=FS.getMounts(t);Object.keys(FS.nameTable).forEach(function(e){for(var r=FS.nameTable[e];r;){var n=r.name_next;-1!==i.indexOf(r.mount)&&FS.destroyNode(r),r=n}}),n.mounted=null;var o=n.mount.mounts.indexOf(t);assert(-1!==o),n.mount.mounts.splice(o,1)},lookup:function(e,r){return e.node_ops.lookup(e,r)},mknod:function(e,r,n){var t=FS.lookupPath(e,{parent:!0}).node,i=PATH.basename(e);if(!i||"."===i||".."===i)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var o=FS.mayCreate(t,i);if(o)throw new FS.ErrnoError(o);if(!t.node_ops.mknod)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return t.node_ops.mknod(t,i,r,n)},create:function(e,r){return r=void 0!==r?r:438,r&=4095,r|=32768,FS.mknod(e,r,0)},mkdir:function(e,r){return r=void 0!==r?r:511,r&=1023,r|=16384,FS.mknod(e,r,0)},mkdev:function(e,r,n){return void 0===n&&(n=r,r=438),r|=8192,FS.mknod(e,r,n)},symlink:function(e,r){if(!PATH.resolve(e))throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var n=FS.lookupPath(r,{parent:!0}).node;if(!n)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var t=PATH.basename(r),i=FS.mayCreate(n,t);if(i)throw new FS.ErrnoError(i);if(!n.node_ops.symlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return n.node_ops.symlink(n,t,e)},rename:function(r,n){var e,t,i=PATH.dirname(r),o=PATH.dirname(n),a=PATH.basename(r),s=PATH.basename(n);try{e=FS.lookupPath(r,{parent:!0}).node,t=FS.lookupPath(n,{parent:!0}).node}catch(e){throw new FS.ErrnoError(ERRNO_CODES.EBUSY)}if(!e||!t)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(e.mount!==t.mount)throw new FS.ErrnoError(ERRNO_CODES.EXDEV);var l,f=FS.lookupNode(e,a),u=PATH.relative(r,o);if("."!==u.charAt(0))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if("."!==(u=PATH.relative(n,i)).charAt(0))throw new FS.ErrnoError(ERRNO_CODES.ENOTEMPTY);try{l=FS.lookupNode(t,s)}catch(e){}if(f!==l){var c=FS.isDir(f.mode),d=FS.mayDelete(e,a,c);if(d)throw new FS.ErrnoError(d);if(d=l?FS.mayDelete(t,s,c):FS.mayCreate(t,s))throw new FS.ErrnoError(d);if(!e.node_ops.rename)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(f)||l&&FS.isMountpoint(l))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);if(t!==e&&(d=FS.nodePermissions(e,"w")))throw new FS.ErrnoError(d);try{FS.trackingDelegate.willMovePath&&FS.trackingDelegate.willMovePath(r,n)}catch(e){console.log("FS.trackingDelegate['willMovePath']('"+r+"', '"+n+"') threw an exception: "+e.message)}FS.hashRemoveNode(f);try{e.node_ops.rename(f,t,s)}catch(e){throw e}finally{FS.hashAddNode(f)}try{FS.trackingDelegate.onMovePath&&FS.trackingDelegate.onMovePath(r,n)}catch(e){console.log("FS.trackingDelegate['onMovePath']('"+r+"', '"+n+"') threw an exception: "+e.message)}}},rmdir:function(r){var e=FS.lookupPath(r,{parent:!0}).node,n=PATH.basename(r),t=FS.lookupNode(e,n),i=FS.mayDelete(e,n,!0);if(i)throw new FS.ErrnoError(i);if(!e.node_ops.rmdir)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(t))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(r)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.rmdir(e,n),FS.destroyNode(t);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(r)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readdir:function(e){var r=FS.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);return r.node_ops.readdir(r)},unlink:function(r){var e=FS.lookupPath(r,{parent:!0}).node,n=PATH.basename(r),t=FS.lookupNode(e,n),i=FS.mayDelete(e,n,!1);if(i)throw i===ERRNO_CODES.EISDIR&&(i=ERRNO_CODES.EPERM),new FS.ErrnoError(i);if(!e.node_ops.unlink)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isMountpoint(t))throw new FS.ErrnoError(ERRNO_CODES.EBUSY);try{FS.trackingDelegate.willDeletePath&&FS.trackingDelegate.willDeletePath(r)}catch(e){console.log("FS.trackingDelegate['willDeletePath']('"+r+"') threw an exception: "+e.message)}e.node_ops.unlink(e,n),FS.destroyNode(t);try{FS.trackingDelegate.onDeletePath&&FS.trackingDelegate.onDeletePath(r)}catch(e){console.log("FS.trackingDelegate['onDeletePath']('"+r+"') threw an exception: "+e.message)}},readlink:function(e){var r=FS.lookupPath(e).node;if(!r)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!r.node_ops.readlink)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);return PATH.resolve(FS.getPath(r.parent),r.node_ops.readlink(r))},stat:function(e,r){var n=FS.lookupPath(e,{follow:!r}).node;if(!n)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(!n.node_ops.getattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);return n.node_ops.getattr(n)},lstat:function(e){return FS.stat(e,!0)},chmod:function(e,r,n){var t;"string"==typeof e?t=FS.lookupPath(e,{follow:!n}).node:t=e;if(!t.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);t.node_ops.setattr(t,{mode:4095&r|-4096&t.mode,timestamp:Date.now()})},lchmod:function(e,r){FS.chmod(e,r,!0)},fchmod:function(e,r){var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chmod(n.node,r)},chown:function(e,r,n,t){var i;"string"==typeof e?i=FS.lookupPath(e,{follow:!t}).node:i=e;if(!i.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown:function(e,r,n){FS.chown(e,r,n,!0)},fchown:function(e,r,n){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(ERRNO_CODES.EBADF);FS.chown(t.node,r,n)},truncate:function(e,r){if(r<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var n;"string"==typeof e?n=FS.lookupPath(e,{follow:!0}).node:n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(ERRNO_CODES.EPERM);if(FS.isDir(n.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!FS.isFile(n.mode))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var t=FS.nodePermissions(n,"w");if(t)throw new FS.ErrnoError(t);n.node_ops.setattr(n,{size:r,timestamp:Date.now()})},ftruncate:function(e,r){var n=FS.getStream(e);if(!n)throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(0==(2097155&n.flags))throw new FS.ErrnoError(ERRNO_CODES.EINVAL);FS.truncate(n.node,r)},utime:function(e,r,n){var t=FS.lookupPath(e,{follow:!0}).node;t.node_ops.setattr(t,{timestamp:Math.max(r,n)})},open:function(r,e,n,t,i){if(""===r)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);var o;if(n=void 0===n?438:n,n=64&(e="string"==typeof e?FS.modeStringToFlags(e):e)?4095&n|32768:0,"object"==typeof r)o=r;else{r=PATH.normalize(r);try{o=FS.lookupPath(r,{follow:!(131072&e)}).node}catch(e){}}var a=!1;if(64&e)if(o){if(128&e)throw new FS.ErrnoError(ERRNO_CODES.EEXIST)}else o=FS.mknod(r,n,0),a=!0;if(!o)throw new FS.ErrnoError(ERRNO_CODES.ENOENT);if(FS.isChrdev(o.mode)&&(e&=-513),65536&e&&!FS.isDir(o.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);if(!a){var s=FS.mayOpen(o,e);if(s)throw new FS.ErrnoError(s)}512&e&&FS.truncate(o,0),e&=-641;var l=FS.createStream({node:o,path:FS.getPath(o),flags:e,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1},t,i);l.stream_ops.open&&l.stream_ops.open(l),!Module.logReadFiles||1&e||(FS.readFiles||(FS.readFiles={}),r in FS.readFiles||(FS.readFiles[r]=1,Module.printErr("read file: "+r)));try{if(FS.trackingDelegate.onOpenFile){var f=0;1!=(2097155&e)&&(f|=FS.tracking.openFlags.READ),0!=(2097155&e)&&(f|=FS.tracking.openFlags.WRITE),FS.trackingDelegate.onOpenFile(r,f)}}catch(e){console.log("FS.trackingDelegate['onOpenFile']('"+r+"', flags) threw an exception: "+e.message)}return l},close:function(e){e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{FS.closeStream(e.fd)}},llseek:function(e,r,n){if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);return e.position=e.stream_ops.llseek(e,r,n),e.ungotten=[],e.position},read:function(e,r,n,t,i){if(t<0||i<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(1==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.read)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);var o=!0;if(void 0===i)i=e.position,o=!1;else if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var a=e.stream_ops.read(e,r,n,t,i);return o||(e.position+=a),a},write:function(e,r,n,t,i,o){if(t<0||i<0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(ERRNO_CODES.EISDIR);if(!e.stream_ops.write)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);1024&e.flags&&FS.llseek(e,0,2);var a=!0;if(void 0===i)i=e.position,a=!1;else if(!e.seekable)throw new FS.ErrnoError(ERRNO_CODES.ESPIPE);var s=e.stream_ops.write(e,r,n,t,i,o);a||(e.position+=s);try{e.path&&FS.trackingDelegate.onWriteToFile&&FS.trackingDelegate.onWriteToFile(e.path)}catch(e){console.log("FS.trackingDelegate['onWriteToFile']('"+path+"') threw an exception: "+e.message)}return s},allocate:function(e,r,n){if(r<0||n<=0)throw new FS.ErrnoError(ERRNO_CODES.EINVAL);if(0==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EBADF);if(!FS.isFile(e.node.mode)&&!FS.isDir(node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENODEV);if(!e.stream_ops.allocate)throw new FS.ErrnoError(ERRNO_CODES.EOPNOTSUPP);e.stream_ops.allocate(e,r,n)},mmap:function(e,r,n,t,i,o,a){if(1==(2097155&e.flags))throw new FS.ErrnoError(ERRNO_CODES.EACCES);if(!e.stream_ops.mmap)throw new FS.ErrnoError(ERRNO_CODES.ENODEV);return e.stream_ops.mmap(e,r,n,t,i,o,a)},msync:function(e,r,n,t,i){return e&&e.stream_ops.msync?e.stream_ops.msync(e,r,n,t,i):0},munmap:function(e){return 0},ioctl:function(e,r,n){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(ERRNO_CODES.ENOTTY);return e.stream_ops.ioctl(e,r,n)},readFile:function(e,r){if((r=r||{}).flags=r.flags||"r",r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error('Invalid encoding type "'+r.encoding+'"');var n,t=FS.open(e,r.flags),i=FS.stat(e).size,o=new Uint8Array(i);return FS.read(t,o,0,i,0),"utf8"===r.encoding?n=UTF8ArrayToString(o,0):"binary"===r.encoding&&(n=o),FS.close(t),n},writeFile:function(e,r,n){if((n=n||{}).flags=n.flags||"w",n.encoding=n.encoding||"utf8","utf8"!==n.encoding&&"binary"!==n.encoding)throw new Error('Invalid encoding type "'+n.encoding+'"');var t=FS.open(e,n.flags,n.mode);if("utf8"===n.encoding){var i=new Uint8Array(lengthBytesUTF8(r)+1),o=stringToUTF8Array(r,i,0,i.length);FS.write(t,i,0,o,0,n.canOwn)}else"binary"===n.encoding&&FS.write(t,r,0,r.length,0,n.canOwn);FS.close(t)},cwd:function(){return FS.currentPath},chdir:function(e){var r=FS.lookupPath(e,{follow:!0});if(!FS.isDir(r.node.mode))throw new FS.ErrnoError(ERRNO_CODES.ENOTDIR);var n=FS.nodePermissions(r.node,"x");if(n)throw new FS.ErrnoError(n);FS.currentPath=r.path},createDefaultDirectories:function(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices:function(){var e;if(FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:function(){return 0},write:function(e,r,n,t,i){return t}}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0)),"undefined"!=typeof crypto){var r=new Uint8Array(1);e=function(){return crypto.getRandomValues(r),r[0]}}else e=function(){return 256*Math.random()|0};FS.createDevice("/dev","random",e),FS.createDevice("/dev","urandom",e),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){FS.mkdir("/proc"),FS.mkdir("/proc/self"),FS.mkdir("/proc/self/fd"),FS.mount({mount:function(){var e=FS.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,r){var n=+r,t=FS.getStream(n);if(!t)throw new FS.ErrnoError(ERRNO_CODES.EBADF);var i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return t.path}}};return i.parent=i}},e}},{},"/proc/self/fd")},createStandardStreams:function(){Module.stdin?FS.createDevice("/dev","stdin",Module.stdin):FS.symlink("/dev/tty","/dev/stdin"),Module.stdout?FS.createDevice("/dev","stdout",null,Module.stdout):FS.symlink("/dev/tty","/dev/stdout"),Module.stderr?FS.createDevice("/dev","stderr",null,Module.stderr):FS.symlink("/dev/tty1","/dev/stderr");var e=FS.open("/dev/stdin","r");assert(0===e.fd,"invalid handle for stdin ("+e.fd+")");var r=FS.open("/dev/stdout","w");assert(1===r.fd,"invalid handle for stdout ("+r.fd+")");var n=FS.open("/dev/stderr","w");assert(2===n.fd,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:function(){FS.ErrnoError||(FS.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){for(var r in this.errno=e,ERRNO_CODES)if(ERRNO_CODES[r]===e){this.code=r;break}},this.setErrno(e),this.message=ERRNO_MESSAGES[e]},FS.ErrnoError.prototype=new Error,FS.ErrnoError.prototype.constructor=FS.ErrnoError,[ERRNO_CODES.ENOENT].forEach(function(e){FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack=""}))},staticInit:function(){FS.ensureErrnoError(),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS,NODEFS:{},WORKERFS:WORKERFS}},init:function(e,r,n){assert(!FS.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),FS.init.initialized=!0,FS.ensureErrnoError(),Module.stdin=e||Module.stdin,Module.stdout=r||Module.stdout,Module.stderr=n||Module.stderr,FS.createStandardStreams()},quit:function(){FS.init.initialized=!1;var e=Module._fflush;e&&e(0);for(var r=0;rthis.length-1||e<0)){var r=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",a,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw new Error("Couldn't load "+a+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),n=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,i=1048576;n||(i=t);var o=this;o.setDataGetter(function(e){var r=e*i,n=(e+1)*i-1;if(n=Math.min(n,t-1),void 0===o.chunks[e]&&(o.chunks[e]=function(e,r){if(r=o.length)return 0;var a=Math.min(o.length-i,t);if(assert(0<=a),o.slice)for(var s=0;s>i-6&63;i-=6,n+=r[a]}return 2==i?(n+=r[(3&t)<<4],n+="=="):4==i&&(n+=r[(15&t)<<2],n+="="),n}(r),o(f))},f.src=l,Browser.safeSetTimeout(function(){o(f)},1e4)}};Module.preloadPlugins.push(r);var n=Module.canvas;n&&(n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock||n.msRequestPointerLock||function(){},n.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},n.exitPointerLock=n.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",t,!1),document.addEventListener("mozpointerlockchange",t,!1),document.addEventListener("webkitpointerlockchange",t,!1),document.addEventListener("mspointerlockchange",t,!1),Module.elementPointerLock&&n.addEventListener("click",function(e){!Browser.pointerLock&&n.requestPointerLock&&(n.requestPointerLock(),e.preventDefault())},!1))}function t(){Browser.pointerLock=document.pointerLockElement===n||document.mozPointerLockElement===n||document.webkitPointerLockElement===n||document.msPointerLockElement===n}},createContext:function(e,r,n,t){if(r&&Module.ctx&&e==Module.canvas)return Module.ctx;var i,o;if(r){var a={antialias:!1,alpha:!1};if(t)for(var s in t)a[s]=t[s];(o=GL.createContext(e,a))&&(i=GL.getContext(o).GLctx),e.style.backgroundColor="black"}else i=e.getContext("2d");return i?(n&&(r||assert("undefined"==typeof GLctx,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=i,r&&GL.makeContextCurrent(o),Module.useWebGL=r,Browser.moduleContextCreatedCallbacks.forEach(function(e){e()}),Browser.init()),i):null},destroyContext:function(e,r,n){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(e,r,n){Browser.lockPointer=e,Browser.resizeCanvas=r,Browser.vrDevice=n,void 0===Browser.lockPointer&&(Browser.lockPointer=!0),void 0===Browser.resizeCanvas&&(Browser.resizeCanvas=!1),void 0===Browser.vrDevice&&(Browser.vrDevice=null);var t=Module.canvas;function i(){Browser.isFullScreen=!1;var e=t.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===e?(t.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},t.cancelFullScreen=t.cancelFullScreen.bind(document),Browser.lockPointer&&t.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(t)}Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",i,!1),document.addEventListener("mozfullscreenchange",i,!1),document.addEventListener("webkitfullscreenchange",i,!1),document.addEventListener("MSFullscreenChange",i,!1));var o=document.createElement("div");t.parentNode.insertBefore(o,t),o.appendChild(t),o.requestFullScreen=o.requestFullScreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullScreen?function(){o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),n?o.requestFullScreen({vrDisplay:n}):o.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(e){var r=Date.now();if(0===Browser.nextRAF)Browser.nextRAF=r+1e3/60;else for(;r+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var n=Math.max(Browser.nextRAF-r,0);setTimeout(e,n)},requestAnimationFrame:function(e){"undefined"==typeof window?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(e){return function(){if(!ABORT)return e.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,0>2];e|=8388608,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=e}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=HEAPU32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2];e&=-8388609,HEAP32[SDL.screen+0*Runtime.QUANTUM_SIZE>>2]=e}Browser.updateResizeListeners()},updateCanvasDimensions:function(e,r,n){r&&n?(e.widthNative=r,e.heightNative=n):(r=e.widthNative,n=e.heightNative);var t=r,i=n;if(Module.forcedAspectRatio&&0>2]=r),r}function _pthread_self(){return 0}Module.requestFullScreen=function(e,r,n){Browser.requestFullScreen(e,r,n)},Module.requestAnimationFrame=function(e){Browser.requestAnimationFrame(e)},Module.setCanvasSize=function(e,r,n){Browser.setCanvasSize(e,r,n)},Module.pauseMainLoop=function(){Browser.mainLoop.pause()},Module.resumeMainLoop=function(){Browser.mainLoop.resume()},Module.getUserMedia=function(){Browser.getUserMedia()},Module.createContext=function(e,r,n,t){return Browser.createContext(e,r,n,t)},FS.staticInit(),__ATINIT__.unshift(function(){Module.noFSInit||FS.init.initialized||FS.init()}),__ATMAIN__.push(function(){FS.ignorePermissions=!1}),__ATEXIT__.push(function(){FS.quit()}),Module.FS_createFolder=FS.createFolder,Module.FS_createPath=FS.createPath,Module.FS_createDataFile=FS.createDataFile,Module.FS_createPreloadedFile=FS.createPreloadedFile,Module.FS_createLazyFile=FS.createLazyFile,Module.FS_createLink=FS.createLink,Module.FS_createDevice=FS.createDevice,Module.FS_unlink=FS.unlink,__ATINIT__.unshift(function(){TTY.init()}),__ATEXIT__.push(function(){TTY.shutdown()}),STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE>0]=Ke[e>>0];Ke[s+1>>0]=Ke[e+1>>0];Ke[s+2>>0]=Ke[e+2>>0];Ke[s+3>>0]=Ke[e+3>>0]}function me(e){e=e|0;Ke[s>>0]=Ke[e>>0];Ke[s+1>>0]=Ke[e+1>>0];Ke[s+2>>0]=Ke[e+2>>0];Ke[s+3>>0]=Ke[e+3>>0];Ke[s+4>>0]=Ke[e+4>>0];Ke[s+5>>0]=Ke[e+5>>0];Ke[s+6>>0]=Ke[e+6>>0];Ke[s+7>>0]=Ke[e+7>>0]}function Ee(e){e=e|0;g=e}function pe(){return g|0}function Se(){var e=0,r=0;r=Ge;Ge=Ge+16|0;e=r;We[e>>2]=0;Nr(e,31756)|0;Ge=r;return We[e>>2]|0}function be(e){e=e|0;var r=0,n=0;r=Ge;Ge=Ge+16|0;n=r;We[n>>2]=e;Pr(n);Ge=r;return}function ve(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;Re(e,(t|0)==0?(l[r>>0]|0)>>>3&15:15,r+1|0,n,2)|0;return}function _e(e){e=e|0;var r=0;r=xi(8)|0;Br(r,r+4|0,e)|0;return r|0}function ke(e){e=e|0;Lr(e,e+4|0);Hi(e);return}function Fe(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0;i=Ge;Ge=Ge+16|0;o=i;We[o>>2]=r;n=(Ur(We[e>>2]|0,We[e+4>>2]|0,r,n,t,o,3)|0)<<16>>16;Ke[t>>0]=l[t>>0]|0|4;Ge=i;return n|0}function Me(e){e=e|0;if(!e)e=-1;else{Ve[e>>1]=4096;e=0}return e|0}function ge(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0;u=We[o>>2]|0;w=i<<16>>16>0;if(w){a=0;s=0;do{f=Ve[n+(a<<1)>>1]|0;f=Ze(f,f)|0;if((f|0)!=1073741824){l=(f<<1)+s|0;if((f^s|0)>0&(l^s|0)<0){We[o>>2]=1;s=(s>>>31)+2147483647|0}else s=l}else{We[o>>2]=1;s=2147483647}a=a+1|0}while((a&65535)<<16>>16!=i<<16>>16);if((s|0)==2147483647){We[o>>2]=u;f=0;l=0;do{s=Ve[n+(f<<1)>>1]>>2;s=Ze(s,s)|0;if((s|0)!=1073741824){a=(s<<1)+l|0;if((s^l|0)>0&(a^l|0)<0){We[o>>2]=1;l=(l>>>31)+2147483647|0}else l=a}else{We[o>>2]=1;l=2147483647}f=f+1|0}while((f&65535)<<16>>16!=i<<16>>16)}else h=8}else{s=0;h=8}if((h|0)==8)l=s>>4;if(!l){Ve[e>>1]=0;return}d=((bi(l)|0)&65535)+65535|0;s=d<<16>>16;if((d&65535)<<16>>16>0){a=l<>s|0)==(l|0))l=a;else l=l>>31^2147483647}else{s=0-s<<16;if((s|0)<2031616)l=l>>(s>>16);else l=0}c=Ni(l,o)|0;a=We[o>>2]|0;if(w){s=0;l=0;do{u=Ve[r+(s<<1)>>1]|0;u=Ze(u,u)|0;if((u|0)!=1073741824){f=(u<<1)+l|0;if((u^l|0)>0&(f^l|0)<0){We[o>>2]=1;l=(l>>>31)+2147483647|0}else l=f}else{We[o>>2]=1;l=2147483647}s=s+1|0}while((s&65535)<<16>>16!=i<<16>>16);if((l|0)==2147483647){We[o>>2]=a;u=0;l=0;do{f=Ve[r+(u<<1)>>1]>>2;f=Ze(f,f)|0;if((f|0)!=1073741824){s=(f<<1)+l|0;if((f^l|0)>0&(s^l|0)<0){We[o>>2]=1;l=(l>>>31)+2147483647|0}else l=s}else{We[o>>2]=1;l=2147483647}u=u+1|0}while((u&65535)<<16>>16!=i<<16>>16)}else h=29}else{l=0;h=29}if((h|0)==29)l=l>>4;if(!l)f=0;else{s=(bi(l)|0)<<16>>16;a=d-s|0;f=a&65535;l=(Gt(c,Ni(l<>16;s=l<<7;a=a<<16>>16;if(f<<16>>16>0)a=f<<16>>16<31?s>>a:0;else{h=0-a<<16>>16;a=s<>h|0)==(s|0)?a:l>>24^2147483647}f=(Ze(((ai(a,o)|0)<<9)+32768>>16,32767-(t&65535)<<16>>16)|0)>>>15<<16>>16}a=Ve[e>>1]|0;if(w){l=t<<16>>16;s=0;while(1){t=((Ze(a<<16>>16,l)|0)>>>15&65535)+f|0;a=t&65535;Ve[n>>1]=(Ze(Ve[n>>1]|0,t<<16>>16)|0)>>>12;s=s+1<<16>>16;if(s<<16>>16>=i<<16>>16)break;else n=n+2|0}}Ve[e>>1]=a;return}function Je(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0;a=We[t>>2]|0;i=n<<16>>16>0;if(i){s=0;o=0;do{f=Ve[r+(s<<1)>>1]|0;f=Ze(f,f)|0;if((f|0)!=1073741824){l=(f<<1)+o|0;if((f^o|0)>0&(l^o|0)<0){We[t>>2]=1;o=(o>>>31)+2147483647|0}else o=l}else{We[t>>2]=1;o=2147483647}s=s+1|0}while((s&65535)<<16>>16!=n<<16>>16);if((o|0)==2147483647){We[t>>2]=a;f=0;a=0;do{l=Ve[r+(f<<1)>>1]>>2;l=Ze(l,l)|0;if((l|0)!=1073741824){s=(l<<1)+a|0;if((l^a|0)>0&(s^a|0)<0){We[t>>2]=1;a=(a>>>31)+2147483647|0}else a=s}else{We[t>>2]=1;a=2147483647}f=f+1|0}while((f&65535)<<16>>16!=n<<16>>16)}else d=8}else{o=0;d=8}if((d|0)==8)a=o>>4;if(!a)return;c=((bi(a)|0)&65535)+65535|0;l=c<<16>>16;if((c&65535)<<16>>16>0){s=a<>l|0)==(a|0))a=s;else a=a>>31^2147483647}else{l=0-l<<16;if((l|0)<2031616)a=a>>(l>>16);else a=0}u=Ni(a,t)|0;a=We[t>>2]|0;if(i){s=0;o=0;do{f=Ve[e+(s<<1)>>1]|0;f=Ze(f,f)|0;if((f|0)!=1073741824){l=(f<<1)+o|0;if((f^o|0)>0&(l^o|0)<0){We[t>>2]=1;o=(o>>>31)+2147483647|0}else o=l}else{We[t>>2]=1;o=2147483647}s=s+1|0}while((s&65535)<<16>>16!=n<<16>>16);if((o|0)==2147483647){We[t>>2]=a;a=0;s=0;do{f=Ve[e+(a<<1)>>1]>>2;f=Ze(f,f)|0;if((f|0)!=1073741824){l=(f<<1)+s|0;if((f^s|0)>0&(l^s|0)<0){We[t>>2]=1;s=(s>>>31)+2147483647|0}else s=l}else{We[t>>2]=1;s=2147483647}a=a+1|0}while((a&65535)<<16>>16!=n<<16>>16)}else d=28}else{o=0;d=28}if((d|0)==28)s=o>>4;if(!s)i=0;else{f=bi(s)|0;l=f<<16>>16;if(f<<16>>16>0){a=s<>l|0)==(s|0))s=a;else s=s>>31^2147483647}else{l=0-l<<16;if((l|0)<2031616)s=s>>(l>>16);else s=0}a=c-(f&65535)|0;l=a&65535;o=(Gt(u,Ni(s,t)|0)|0)<<16>>16;i=o<<7;a=a<<16>>16;if(l<<16>>16>0)i=l<<16>>16<31?i>>a:0;else{c=0-a<<16>>16;e=i<>c|0)==(i|0)?e:o>>24^2147483647}i=ai(i,t)|0;if((i|0)>4194303)i=2147483647;else i=(i|0)<-4194304?-2147483648:i<<9;i=Ni(i,t)|0}o=(n&65535)+65535&65535;if(o<<16>>16<=-1)return;f=i<<16>>16;l=n+-1<<16>>16<<16>>16;while(1){a=r+(l<<1)|0;i=Ze(Ve[a>>1]|0,f)|0;do{if((i|0)!=1073741824){s=i<<1;if((s|0)<=268435455)if((s|0)<-268435456){Ve[a>>1]=-32768;break}else{Ve[a>>1]=i>>>12;break}else d=52}else{We[t>>2]=1;d=52}}while(0);if((d|0)==52){d=0;Ve[a>>1]=32767}o=o+-1<<16>>16;if(o<<16>>16<=-1)break;else l=l+-1|0}return}function Re(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0;l=Ge;Ge=Ge+496|0;s=l;a=(i|0)==2;do{if(!(a&1|(i|0)==4)){if(i){e=-1;Ge=l;return e|0}a=Ve[n>>1]|0;r=n+490|0;i=n+2|0;o=0;while(1){Ve[s+(o<<1)>>1]=Ve[i>>1]|0;o=o+1|0;if((o|0)==244)break;else i=i+2|0}o=a<<16>>16;if(a<<16>>16==7){i=492;r=We[e+1760>>2]|0;break}else{i=492;r=Ve[r>>1]|0;break}}else{o=e+1168|0;if(a){Ir(r,n,s,o);o=604}else{He(r,n,s,o);o=3436}i=Ve[o+(r<<1)>>1]|0;do{if(r>>>0>=8){if((r|0)==8){r=Ve[s+76>>1]<<2|(Ve[s+74>>1]<<1|Ve[s+72>>1]);o=(Ve[s+70>>1]|0)==0?4:5;break}if(r>>>0<15){e=-1;Ge=l;return e|0}else{r=We[e+1760>>2]|0;o=7;break}}else o=0}while(0);if(i<<16>>16==-1){e=-1;Ge=l;return e|0}}}while(0);Cr(e,r,s,o,t);We[e+1760>>2]=r;e=i;Ge=l;return e|0}function Ae(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0;m=Ge;Ge=Ge+48|0;h=m+20|0;w=m;i=h;t=i+20|0;do{Ve[i>>1]=Ve[e>>1]|0;i=i+2|0;e=e+2|0}while((i|0)<(t|0));e=Ve[h+18>>1]|0;d=(e&65535)-((e&65535)>>>15&65535)|0;e:do{if(((d<<16>>31^d)&65535)<<16>>16<=4095){t=9;d=9;while(1){e=e<<16>>16;e=(e<<19>>19|0)==(e|0)?e<<3:e>>>15^32767;c=r+(t<<1)|0;Ve[c>>1]=e;e=e<<16>>16;e=Ze(e,e)|0;if((e|0)==1073741824){We[n>>2]=1;i=2147483647}else i=e<<1;e=2147483647-i|0;if((e&i|0)<0){We[n>>2]=1;e=2147483647}f=bi(e)|0;u=15-(f&65535)&65535;o=f<<16>>16;if(f<<16>>16>0){i=e<>o|0)!=(e|0))i=e>>31^2147483647}else{i=0-o<<16;if((i|0)<2031616)i=e>>(i>>16);else i=0}i=Gt(16384,Ni(i,n)|0)|0;do{if(d<<16>>16>0){f=t+-1|0;a=i<<16>>16;s=d<<16>>16;l=0;while(1){t=Xe[h+(l<<1)>>1]|0;e=t<<16;o=Ze(Ve[h+(f-l<<1)>>1]|0,Ve[c>>1]|0)|0;if((o|0)==1073741824){We[n>>2]=1;i=2147483647}else i=o<<1;o=e-i|0;if(((o^e)&(i^e)|0)<0){We[n>>2]=1;o=(t>>>15)+2147483647|0}o=Ze((Ni(o,n)|0)<<16>>16,a)|0;if((o|0)==1073741824){We[n>>2]=1;o=2147483647}else o=o<<1;o=ui(o,u,n)|0;i=o-(o>>>31)|0;if((i>>31^i|0)>32767){o=24;break}Ve[w+(l<<1)>>1]=o;l=l+1|0;if((s|0)<=(l|0)){o=26;break}}if((o|0)==24){o=0;i=r;t=i+20|0;do{Ve[i>>1]=0;i=i+2|0}while((i|0)<(t|0));e=10}else if((o|0)==26){o=0;if(d<<16>>16>0)e=d;else{o=28;break}}i=e+-1<<16>>16;qi(h|0,w|0,((i&65535)<<1)+2|0)|0;t=i<<16>>16}else o=28}while(0);if((o|0)==28){e=d+-1<<16>>16;if(e<<16>>16>-1){t=e<<16>>16;i=32767}else break}e=Ve[h+(t<<1)>>1]|0;d=(e&65535)-((e&65535)>>>15&65535)|0;if(((d<<16>>31^d)&65535)<<16>>16>4095)break e;else d=i}Ge=m;return}}while(0);i=r;t=i+20|0;do{Ve[i>>1]=0;i=i+2|0}while((i|0)<(t|0));Ge=m;return}function ye(e,r){e=e|0;r=r|0;var n=0,t=0,i=0,o=0,a=0;if(r<<16>>16<=0){e=0;return e|0}t=We[e>>2]|0;i=0;n=0;do{a=t&1;n=a|n<<1&131070;o=t>>1;t=(a|0)==(t>>>28&1|0)?o:o|1073741824;i=i+1<<16>>16}while(i<<16>>16>16);We[e>>2]=t;a=n&65535;return a|0}function Oe(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0;i=r;t=i+80|0;do{Ve[i>>1]=0;i=i+2|0}while((i|0)<(t|0));t=0;i=We[e>>2]|0;do{l=i&1;s=i>>1;s=(l|0)==(i>>>28&1|0)?s:s|1073741824;o=s&1;a=s>>1;We[e>>2]=(o|0)==(s>>>28&1|0)?a:a|1073741824;o=Wt((Ze(l<<1|o,1310720)|0)>>>17&65535,t,n)|0;l=We[e>>2]|0;a=l&1;s=l>>1;i=(a|0)==(l>>>28&1|0)?s:s|1073741824;We[e>>2]=i;Ve[r+(o<<16>>16<<1)>>1]=((a&65535)<<13&65535)+-4096<<16>>16;t=t+1<<16>>16}while(t<<16>>16<10);return}function Qe(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0;a=Ve[e>>1]|0;if((a*31821|0)==1073741824){We[o>>2]=1;s=1073741823}else s=a*63642>>1;a=s+13849|0;if((s|0)>-1&(a^s|0)<0){We[o>>2]=1;a=(s>>>31)+2147483647|0}Ve[e>>1]=a;if(r<<16>>16<=0)return;s=0;a=i+((a&127)<<1)|0;while(1){Ve[t+(s<<1)>>1]=(-65536<>1]>>>16^65535)&Xe[a>>1];s=s+1|0;if((s&65535)<<16>>16==r<<16>>16)break;else a=a+2|0}return}function Te(e){e=e|0;var r=0;if(!e){r=-1;return r|0}r=e+122|0;do{Ve[e>>1]=0;e=e+2|0}while((e|0)<(r|0));r=0;return r|0}function $e(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0;s=159;a=0;while(1){f=Ve[n+(s<<1)>>1]|0;f=Ze(f,f)|0;f=(f|0)==1073741824?2147483647:f<<1;o=f+a|0;if((f^a|0)>-1&(o^a|0)<0){We[i>>2]=1;a=(a>>>31)+2147483647|0}else a=o;if((s|0)>0)s=s+-1|0;else{s=a;break}}i=s>>>14&65535;a=32767;o=59;while(1){f=Ve[e+(o<<1)>>1]|0;a=f<<16>>16>16?f:a;if((o|0)>0)o=o+-1|0;else break}f=(s|0)>536870911?32767:i;i=a<<16>>16;o=i<<20>>16;s=a<<16>>16>0?32767:-32768;n=55;a=Ve[e>>1]|0;while(1){l=Ve[e+(n<<1)>>1]|0;a=a<<16>>16>16?l:a;if((n|0)>1)n=n+-1|0;else break}n=Ve[e+80>>1]|0;l=Ve[e+82>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+84>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+86>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+88>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+90>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+92>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+94>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+96>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+98>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+100>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+102>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+104>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+106>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+108>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+110>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+112>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+114>>1]|0;n=n<<16>>16>16?l:n;l=Ve[e+116>>1]|0;n=n<<16>>16>16?l:n;l=e+118|0;c=Ve[l>>1]|0;do{if((f+-21&65535)<17557&a<<16>>16>20?(f<<16>>16|0)<(((i<<4|0)==(o|0)?o:s)|0)?1:(n<<16>>16>16?c:n)<<16>>16<1953:0){a=e+120|0;o=Ve[a>>1]|0;if(o<<16>>16>29){Ve[a>>1]=30;n=a;s=1;break}else{s=(o&65535)+1&65535;Ve[a>>1]=s;n=a;s=s<<16>>16>1&1;break}}else u=14}while(0);if((u|0)==14){n=e+120|0;Ve[n>>1]=0;s=0}a=0;do{c=a;a=a+1|0;Ve[e+(c<<1)>>1]=Ve[e+(a<<1)>>1]|0}while((a|0)!=59);Ve[l>>1]=f;a=Ve[n>>1]|0;a=a<<16>>16>15?16383:a<<16>>16>8?15565:13926;o=ri(r+8|0,5)|0;if((Ve[n>>1]|0)>20){if(((ri(r,9)|0)<<16>>16|0)>(a|0))u=20}else if((o<<16>>16|0)>(a|0))u=20;if((u|0)==20){Ve[t>>1]=0;return s|0}o=(Xe[t>>1]|0)+1&65535;if(o<<16>>16>10){Ve[t>>1]=10;return s|0}else{Ve[t>>1]=o;return s|0}return 0}function De(e){e=e|0;var r=0;if(!e){r=-1;return r|0}r=e+18|0;do{Ve[e>>1]=0;e=e+2|0}while((e|0)<(r|0));r=0;return r|0}function er(e,r,n,t,i,o,a,s,l,f,u,c){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;var d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0;_=e+2|0;Ve[e>>1]=Ve[_>>1]|0;k=e+4|0;Ve[_>>1]=Ve[k>>1]|0;F=e+6|0;Ve[k>>1]=Ve[F>>1]|0;M=e+8|0;Ve[F>>1]=Ve[M>>1]|0;g=e+10|0;Ve[M>>1]=Ve[g>>1]|0;R=e+12|0;Ve[g>>1]=Ve[R>>1]|0;Ve[R>>1]=n;E=0;v=0;do{d=i+(v<<1)|0;w=Bi(Ve[d>>1]|0,Ve[t+(v<<1)>>1]|0,c)|0;w=(w&65535)-((w&65535)>>>15&65535)|0;w=w<<16>>31^w;b=((vi(w&65535)|0)&65535)+65535|0;h=b<<16>>16;if((b&65535)<<16>>16<0){m=0-h<<16;if((m|0)<983040)p=w<<16>>16>>(m>>16)&65535;else p=0}else{m=w<<16>>16;w=m<>16>>h|0)==(m|0))p=w&65535;else p=(m>>>15^32767)&65535}S=vi(Ve[d>>1]|0)|0;w=Ve[d>>1]|0;h=S<<16>>16;if(S<<16>>16<0){m=0-h<<16;if((m|0)<983040)m=w<<16>>16>>(m>>16)&65535;else m=0}else{m=w<<16>>16;w=m<>16>>h|0)==(m|0))m=w&65535;else m=(m>>>15^32767)&65535}h=Gt(p,m)|0;m=(b&65535)+2-(S&65535)|0;w=m&65535;do{if(m&32768){if(w<<16>>16!=-32768){b=0-m|0;m=b<<16>>16;if((b&65535)<<16>>16<0){m=0-m<<16;if((m|0)>=983040){m=0;break}m=h<<16>>16>>(m>>16)&65535;break}}else m=32767;w=h<<16>>16;h=w<>16>>m|0)==(w|0))m=h&65535;else m=(w>>>15^32767)&65535}else m=Pi(h,w,c)|0}while(0);E=Wt(E,m,c)|0;v=v+1|0}while((v|0)!=10);m=E&65535;w=E<<16>>16>5325;E=e+14|0;if(w){i=(Xe[E>>1]|0)+1&65535;Ve[E>>1]=i;if(i<<16>>16>10)Ve[e+16>>1]=0}else Ve[E>>1]=0;switch(r|0){case 0:case 1:case 2:case 3:case 6:break;default:{R=e+16|0;c=n;n=Ve[R>>1]|0;n=n&65535;n=n+1|0;n=n&65535;Ve[R>>1]=n;return c|0}}p=(a|o)<<16>>16==0;S=f<<16>>16==0;b=r>>>0<3;E=m+(b&((S|(p&(s<<16>>16==0|l<<16>>16==0)|u<<16>>16<2))^1)?61030:62259)&65535;E=E<<16>>16>0?E:0;if(E<<16>>16<=2048){E=E<<16>>16;if((E<<18>>18|0)==(E|0))l=E<<2;else l=E>>>15^32767}else l=8192;s=e+16|0;u=w|(Ve[s>>1]|0)<40;E=Ve[k>>1]|0;if((E*6554|0)==1073741824){We[c>>2]=1;w=2147483647}else w=E*13108|0;E=Ve[F>>1]|0;m=E*6554|0;if((m|0)!=1073741824){E=(E*13108|0)+w|0;if((m^w|0)>0&(E^w|0)<0){We[c>>2]=1;E=(w>>>31)+2147483647|0}}else{We[c>>2]=1;E=2147483647}m=Ve[M>>1]|0;w=m*6554|0;if((w|0)!=1073741824){m=(m*13108|0)+E|0;if((w^E|0)>0&(m^E|0)<0){We[c>>2]=1;m=(E>>>31)+2147483647|0}}else{We[c>>2]=1;m=2147483647}E=Ve[g>>1]|0;w=E*6554|0;if((w|0)!=1073741824){E=(E*13108|0)+m|0;if((w^m|0)>0&(E^m|0)<0){We[c>>2]=1;w=(m>>>31)+2147483647|0}else w=E}else{We[c>>2]=1;w=2147483647}E=Ve[R>>1]|0;m=E*6554|0;if((m|0)!=1073741824){E=(E*13108|0)+w|0;if((m^w|0)>0&(E^w|0)<0){We[c>>2]=1;E=(w>>>31)+2147483647|0}}else{We[c>>2]=1;E=2147483647}w=Ni(E,c)|0;if(b&((p|S)^1)){E=Ve[e>>1]|0;if((E*4681|0)==1073741824){We[c>>2]=1;w=2147483647}else w=E*9362|0;E=Ve[_>>1]|0;m=E*4681|0;if((m|0)!=1073741824){E=(E*9362|0)+w|0;if((m^w|0)>0&(E^w|0)<0){We[c>>2]=1;w=(w>>>31)+2147483647|0}else w=E}else{We[c>>2]=1;w=2147483647}E=Ve[k>>1]|0;m=E*4681|0;if((m|0)!=1073741824){E=(E*9362|0)+w|0;if((m^w|0)>0&(E^w|0)<0){We[c>>2]=1;w=(w>>>31)+2147483647|0}else w=E}else{We[c>>2]=1;w=2147483647}E=Ve[F>>1]|0;m=E*4681|0;if((m|0)!=1073741824){E=(E*9362|0)+w|0;if((m^w|0)>0&(E^w|0)<0){We[c>>2]=1;E=(w>>>31)+2147483647|0}}else{We[c>>2]=1;E=2147483647}m=Ve[M>>1]|0;w=m*4681|0;if((w|0)!=1073741824){m=(m*9362|0)+E|0;if((w^E|0)>0&(m^E|0)<0){We[c>>2]=1;E=(E>>>31)+2147483647|0}else E=m}else{We[c>>2]=1;E=2147483647}m=Ve[g>>1]|0;w=m*4681|0;if((w|0)!=1073741824){m=(m*9362|0)+E|0;if((w^E|0)>0&(m^E|0)<0){We[c>>2]=1;m=(E>>>31)+2147483647|0}}else{We[c>>2]=1;m=2147483647}w=Ve[R>>1]|0;d=w*4681|0;if((d|0)!=1073741824){h=(w*9362|0)+m|0;if((d^m|0)>0&(h^m|0)<0){We[c>>2]=1;h=(m>>>31)+2147483647|0}}else{We[c>>2]=1;h=2147483647}w=Ni(h,c)|0}E=u?8192:l<<16>>16;d=Ze(E,n<<16>>16)|0;if((d|0)==1073741824){We[c>>2]=1;m=2147483647}else m=d<<1;w=w<<16>>16;h=w<<13;if((h|0)!=1073741824){d=m+(w<<14)|0;if((m^h|0)>0&(d^m|0)<0){We[c>>2]=1;m=(m>>>31)+2147483647|0}else m=d}else{We[c>>2]=1;m=2147483647}d=Ze(w,E)|0;if((d|0)==1073741824){We[c>>2]=1;h=2147483647}else h=d<<1;d=m-h|0;if(((d^m)&(h^m)|0)<0){We[c>>2]=1;d=(m>>>31)+2147483647|0}R=d<<2;n=s;c=Ni((R>>2|0)==(d|0)?R:d>>31^2147483647,c)|0;R=Ve[n>>1]|0;R=R&65535;R=R+1|0;R=R&65535;Ve[n>>1]=R;return c|0}function rr(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0;t=r;i=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(i|0));t=0;do{a=Ve[e+(t<<1)>>1]|0;i=((a&8)<<10&65535^8192)+-4096<<16>>16;o=t<<16;a=((Ve[n+((a&7)<<1)>>1]|0)*327680|0)+o>>16;Ve[r+(a<<1)>>1]=i;o=((Ve[n+((Xe[e+(t+5<<1)>>1]&7)<<1)>>1]|0)*327680|0)+o>>16;if((o|0)<(a|0))i=0-(i&65535)&65535;a=r+(o<<1)|0;Ve[a>>1]=(Xe[a>>1]|0)+(i&65535);t=t+1|0}while((t|0)!=5);return}function nr(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;i=r<<16>>16;t=(i<<1&2|1)+((i>>>1&7)*5|0)|0;r=i>>>4&3;r=((i>>>6&7)*5|0)+((r|0)==3?4:r)|0;i=n;o=i+80|0;do{Ve[i>>1]=0;i=i+2|0}while((i|0)<(o|0));e=e<<16>>16;Ve[n+(t<<1)>>1]=(0-(e&1)&16383)+57344;Ve[n+(r<<1)>>1]=(0-(e>>>1&1)&16383)+57344;return}function tr(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0;o=n<<16>>16;s=o>>>3;e=e<<16>>16;e=((e<<17>>17|0)==(e|0)?e<<1:e>>>15^32767)+(s&8)<<16;s=(Xe[t+(e+65536>>16<<1)>>1]|0)+((s&7)*5|0)|0;n=r<<16>>16;a=(0-(n&1)&16383)+57344&65535;e=i+((Xe[t+(e>>16<<1)>>1]|0)+((o&7)*5|0)<<16>>16<<1)|0;r=i;o=r+80|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(o|0));Ve[e>>1]=a;Ve[i+(s<<16>>16<<1)>>1]=(0-(n>>>1&1)&16383)+57344;return}function ir(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0;r=r<<16>>16;t=(r&7)*5|0;i=(r>>>2&2|1)+((r>>>4&7)*5|0)|0;r=(r>>>6&2)+2+((r>>>8&7)*5|0)|0;o=n;a=o+80|0;do{Ve[o>>1]=0;o=o+2|0}while((o|0)<(a|0));e=e<<16>>16;Ve[n+(t<<1)>>1]=(0-(e&1)&16383)+57344;Ve[n+(i<<1)>>1]=(0-(e>>>1&1)&16383)+57344;Ve[n+(r<<1)>>1]=(0-(e>>>2&1)&16383)+57344;return}function or(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0;r=r<<16>>16;a=Ve[n+((r&7)<<1)>>1]|0;s=Ve[n+((r>>>3&7)<<1)>>1]|0;o=Ve[n+((r>>>6&7)<<1)>>1]|0;n=(r>>>9&1)+3+((Ve[n+((r>>>10&7)<<1)>>1]|0)*5|0)|0;r=t;i=r+80|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(i|0));e=e<<16>>16;Ve[t+(a*327680>>16<<1)>>1]=(0-(e&1)&16383)+57344;Ve[t+((s*327680|0)+65536>>16<<1)>>1]=(0-(e>>>1&1)&16383)+57344;Ve[t+((o*327680|0)+131072>>16<<1)>>1]=(0-(e>>>2&1)&16383)+57344;Ve[t+(n<<16>>16<<1)>>1]=(0-(e>>>3&1)&16383)+57344;return}function ar(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0;d=Ge;Ge=Ge+32|0;c=d+16|0;u=d;o=r;i=o+80|0;do{Ve[o>>1]=0;o=o+2|0}while((o|0)<(i|0));i=Ve[e>>1]|0;Ve[c>>1]=i;Ve[c+2>>1]=Ve[e+2>>1]|0;Ve[c+4>>1]=Ve[e+4>>1]|0;Ve[c+6>>1]=Ve[e+6>>1]|0;l=Ve[e+8>>1]|0;Ne(l>>>3&65535,l&7,0,4,1,u,n);l=Ve[e+10>>1]|0;Ne(l>>>3&65535,l&7,2,6,5,u,n);l=Ve[e+12>>1]|0;t=l>>2;do{if((t*25|0)!=1073741824){o=(Ze(t,1638400)|0)+786432>>21;t=o*6554>>15;if((t|0)>32767){We[n>>2]=1;a=1;s=1;e=163835;f=6;break}e=(t<<16>>16)*5|0;a=t&1;if((e|0)==1073741824){We[n>>2]=1;s=0;e=65535}else{s=0;f=6}}else{We[n>>2]=1;a=0;t=0;s=0;o=0;e=0;f=6}}while(0);if((f|0)==6)e=e&65535;f=o-e|0;a=a<<16>>16==0?f:4-f|0;f=a<<16>>16;Ve[u+6>>1]=Wt(((a<<17>>17|0)==(f|0)?a<<1:f>>>15^32767)&65535,l&1,n)|0;if(s){We[n>>2]=1;t=32767}f=t<<16>>16;Ve[u+14>>1]=((t<<17>>17|0)==(f|0)?t<<1:f>>>15^32767)+(l>>>1&1);t=0;while(1){i=i<<16>>16==0?8191:-8191;f=(Ve[u+(t<<1)>>1]<<2)+t<<16;o=f>>16;if((f|0)<2621440)Ve[r+(o<<1)>>1]=i;a=(Ve[u+(t+4<<1)>>1]<<2)+t<<16;e=a>>16;if((e|0)<(o|0))i=0-(i&65535)&65535;if((a|0)<2621440){f=r+(e<<1)|0;Ve[f>>1]=(Xe[f>>1]|0)+(i&65535)}t=t+1|0;if((t|0)==4)break;i=Ve[c+(t<<1)>>1]|0}Ge=d;return}function Ne(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0;l=e<<16>>16>124?124:e;e=(l<<16>>16)*1311>>15;h=(e|0)>32767;if(!h){s=e<<16>>16;if((s*25|0)==1073741824){We[a>>2]=1;s=1073741823}else d=4}else{We[a>>2]=1;s=32767;d=4}if((d|0)==4)s=(s*50|0)>>>1;u=(l&65535)-s|0;s=(u<<16>>16)*6554>>15;c=(s|0)>32767;if(!c){l=s<<16>>16;if((l*5|0)==1073741824){We[a>>2]=1;f=1073741823}else d=9}else{We[a>>2]=1;l=32767;d=9}if((d|0)==9)f=(l*10|0)>>>1;u=u-f|0;d=u<<16>>16;l=r<<16>>16;f=l>>2;l=l-(f<<2)|0;Ve[o+(n<<16>>16<<1)>>1]=((u<<17>>17|0)==(d|0)?u<<1:d>>>15^32767)+(l&1);if(c){We[a>>2]=1;s=32767}n=s<<16>>16;Ve[o+(t<<16>>16<<1)>>1]=((s<<17>>17|0)==(n|0)?s<<1:n>>>15^32767)+(l<<16>>17);if(h){We[a>>2]=1;e=32767}t=e<<16>>16;Ve[o+(i<<16>>16<<1)>>1]=Wt(f&65535,((e<<17>>17|0)==(t|0)?e<<1:t>>>15^32767)&65535,a)|0;return}function Pe(e){e=e|0;var r=0,n=0,t=0,i=0;if(!e){i=-1;return i|0}ei(e+1168|0);Ve[e+460>>1]=40;We[e+1164>>2]=0;r=e+646|0;n=e+1216|0;t=e+462|0;i=t+22|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(i|0));Be(r,We[n>>2]|0)|0;xe(e+686|0)|0;Ue(e+700|0)|0;De(e+608|0)|0;ze(e+626|0,We[n>>2]|0)|0;Te(e+484|0)|0;Ye(e+730|0)|0;Le(e+748|0)|0;Zt(e+714|0)|0;sr(e,0)|0;i=0;return i|0}function sr(e,r){e=e|0;r=r|0;var n=0,t=0;if(!e){e=-1;return e|0}We[e+388>>2]=e+308;Vi(e|0,0,308)|0;r=(r|0)!=8;if(r){n=e+412|0;t=n+20|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));Ve[e+392>>1]=3e4;Ve[e+394>>1]=26e3;Ve[e+396>>1]=21e3;Ve[e+398>>1]=15e3;Ve[e+400>>1]=8e3;Ve[e+402>>1]=0;Ve[e+404>>1]=-8e3;Ve[e+406>>1]=-15e3;Ve[e+408>>1]=-21e3;Ve[e+410>>1]=-26e3}Ve[e+432>>1]=0;Ve[e+434>>1]=40;We[e+1164>>2]=0;Ve[e+436>>1]=0;Ve[e+438>>1]=0;Ve[e+440>>1]=0;Ve[e+460>>1]=40;Ve[e+462>>1]=0;Ve[e+464>>1]=0;if(r){n=e+442|0;t=n+18|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));n=e+466|0;t=n+18|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));De(e+608|0)|0;t=e+1216|0;ze(e+626|0,We[t>>2]|0)|0;Be(e+646|0,We[t>>2]|0)|0;xe(e+686|0)|0;Ue(e+700|0)|0;Zt(e+714|0)|0}else{n=e+466|0;t=n+18|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));De(e+608|0)|0;Be(e+646|0,We[e+1216>>2]|0)|0;xe(e+686|0)|0;Ue(e+700|0)|0}Te(e+484|0)|0;Ve[e+606>>1]=21845;Ye(e+730|0)|0;if(!r){e=0;return e|0}Le(e+748|0)|0;e=0;return e|0}function Ce(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,se=0,le=0,fe=0,ue=0,ce=0,de=0,he=0,we=0,me=0,Ee=0,pe=0,Se=0,be=0,ve=0,_e=0,ke=0,Fe=0,Me=0,ge=0,Re=0,Ae=0,ye=0,Oe=0,Te=0,De=0,Ne=0,Pe=0,Ce=0,Ie=0,Be=0,Le=0,Ue=0,xe=0,He=0,ze=0,Ye=0,je=0,qe=0;qe=Ge;Ge=Ge+336|0;d=qe+236|0;c=qe+216|0;Ye=qe+112|0;ze=qe+12|0;Be=qe+256|0;Ue=qe+136|0;Le=qe+32|0;Ce=qe+8|0;Ie=qe+6|0;He=qe+4|0;xe=qe+2|0;je=qe;Oe=e+1164|0;Te=e+748|0;De=pr(Te,t,Oe)|0;if(De){sr(e,8)|0;mr(Te,e+412|0,e+646|0,e+714|0,e+608|0,De,r,n,e+1168|0,i,o,Oe);je=e+666|0;Ei(je,e+392|0,10,Oe);Mr(e+626|0,je,Oe);je=e+1156|0;We[je>>2]=De;Ge=qe;return}switch(t|0){case 1:{a=1;S=6;break}case 2:case 7:{Qe(e+606|0,Ve[(We[e+1256>>2]|0)+(r<<1)>>1]|0,We[(We[e+1260>>2]|0)+(r<<2)>>2]|0,n,We[e+1276>>2]|0,Oe);S=9;break}case 3:{S=9;break}default:{a=0;S=6}}do{if((S|0)==6){t=e+440|0;if((Ve[t>>1]|0)==6){Ve[t>>1]=5;Ae=0;ye=0;break}else{Ve[t>>1]=0;Ae=0;ye=0;break}}else if((S|0)==9){t=e+440|0;Ae=(Xe[t>>1]|0)+1&65535;Ve[t>>1]=Ae<<16>>16>6?6:Ae;Ae=1;ye=1;a=0}}while(0);Fe=e+1156|0;switch(We[Fe>>2]|0){case 1:{Ve[t>>1]=5;Ve[e+436>>1]=0;break}case 2:{Ve[t>>1]=5;Ve[e+436>>1]=1;break}default:{}}l=e+646|0;Me=e+666|0;s=Ye;f=Me;u=s+20|0;do{Ke[s>>0]=Ke[f>>0]|0;s=s+1|0;f=f+1|0}while((s|0)<(u|0));ge=(r|0)!=7;Re=e+1168|0;if(ge){hr(l,r,ye,n,Re,d,Oe);s=e+392|0;ii(s,d,o,Oe);n=n+6|0}else{wr(l,ye,n,Re,c,d,Oe);s=e+392|0;ni(s,c,d,o,Oe);n=n+10|0}f=d;u=s+20|0;do{Ve[s>>1]=Ve[f>>1]|0;s=s+2|0;f=f+2|0}while((s|0)<(u|0));ke=r>>>0>1;k=r>>>0<4&1;_e=(r|0)==5;ve=_e?10:5;_e=_e?19:9;g=e+434|0;R=143-_e&65535;A=e+460|0;y=e+462|0;O=e+464|0;F=r>>>0>2;T=e+388|0;D=(r|0)==0;N=r>>>0<2;P=e+1244|0;C=e+432|0;I=r>>>0<6;B=e+1168|0;L=(r|0)==6;U=ye<<16>>16==0;x=e+714|0;H=e+686|0;z=e+436|0;Y=e+700|0;j=(r|0)==7;q=e+482|0;K=r>>>0<3;V=e+608|0;W=e+626|0;X=e+438|0;G=r>>>0<7;Z=e+730|0;M=Ae^1;J=a<<16>>16!=0;be=J?ye^1:0;Q=e+442|0;$=e+458|0;ee=e+412|0;re=e+80|0;ne=e+1236|0;te=e+1240|0;ie=e+468|0;oe=e+466|0;ae=e+470|0;se=e+472|0;le=e+474|0;fe=e+476|0;ue=e+478|0;ce=e+480|0;de=e+444|0;he=e+446|0;we=e+448|0;me=e+450|0;Ee=e+452|0;pe=e+454|0;Se=e+456|0;b=0;v=0;h=0;w=0;_=-1;while(1){_=(_<<16>>16)+1|0;u=_&65535;v=1-(v<<16>>16)|0;E=v&65535;c=ke&h<<16>>16==80?0:h;m=n+2|0;d=Ve[n>>1]|0;e:do{if(ge){p=Ve[g>>1]|0;s=(p&65535)-ve&65535;s=s<<16>>16<20?20:s;f=(s&65535)+_e&65535;l=f<<16>>16>143;fr(d,l?R:s,l?143:f,c,p,Ce,Ie,k,Oe);c=Ve[Ce>>1]|0;Ve[A>>1]=c;if(Ae){d=Ve[g>>1]|0;if(d<<16>>16<143){d=(d&65535)+1&65535;Ve[g>>1]=d}Ve[Ce>>1]=d;Ve[Ie>>1]=0;if((Ve[y>>1]|0)!=0?!(F|(Ve[O>>1]|0)<5):0){Ve[Ce>>1]=c;d=c;c=0}else c=0}else{d=c;c=Ve[Ie>>1]|0}ki(We[T>>2]|0,d,c,40,1,Oe);if(N){c=n+6|0;tr(u,Ve[n+4>>1]|0,Ve[m>>1]|0,We[P>>2]|0,Be,Oe);n=Ve[C>>1]|0;p=n<<16>>16;d=p<<1;if((d|0)==(p<<17>>16|0)){f=D;break}f=D;d=n<<16>>16>0?32767:-32768;break}switch(r|0){case 2:{c=n+6|0;nr(Ve[n+4>>1]|0,Ve[m>>1]|0,Be);n=Ve[C>>1]|0;p=n<<16>>16;d=p<<1;if((d|0)==(p<<17>>16|0)){f=D;break e}f=D;d=n<<16>>16>0?32767:-32768;break e}case 3:{c=n+6|0;ir(Ve[n+4>>1]|0,Ve[m>>1]|0,Be);n=Ve[C>>1]|0;p=n<<16>>16;d=p<<1;if((d|0)==(p<<17>>16|0)){f=D;break e}f=D;d=n<<16>>16>0?32767:-32768;break e}default:{if(I){c=n+6|0;or(Ve[n+4>>1]|0,Ve[m>>1]|0,We[B>>2]|0,Be);n=Ve[C>>1]|0;p=n<<16>>16;d=p<<1;if((d|0)==(p<<17>>16|0)){f=D;break e}f=D;d=n<<16>>16>0?32767:-32768;break e}if(!L){f=D;S=44;break e}ar(m,Be,Oe);d=n+16|0;n=Ve[C>>1]|0;p=n<<16>>16;u=p<<1;if((u|0)==(p<<17>>16|0)){c=d;f=D;d=u;break e}c=d;f=D;d=n<<16>>16>0?32767:-32768;break e}}}else{ur(d,18,143,c,Ce,Ie,Oe);if(U?c<<16>>16==0|d<<16>>16<61:0){d=Ve[Ce>>1]|0;c=Ve[Ie>>1]|0}else{Ve[A>>1]=Ve[Ce>>1]|0;d=Ve[g>>1]|0;Ve[Ce>>1]=d;Ve[Ie>>1]=0;c=0}ki(We[T>>2]|0,d,c,40,0,Oe);f=0;S=44}}while(0);if((S|0)==44){S=0;if(Ae)vr(H,Ve[t>>1]|0,He,Oe);else Ve[He>>1]=dr(r,Ve[m>>1]|0,We[te>>2]|0)|0;_r(H,ye,Ve[z>>1]|0,He,Oe);rr(n+4|0,Be,We[B>>2]|0);d=n+24|0;n=Ve[He>>1]|0;p=n<<16>>16;u=p<<1;if((u|0)==(p<<17>>16|0)){c=d;d=u}else{c=d;d=n<<16>>16>0?32767:-32768}}n=Ve[Ce>>1]|0;e:do{if(n<<16>>16<40){s=d<<16>>16;l=n;d=n<<16>>16;while(1){u=Be+(d<<1)|0;n=(Ze(Ve[Be+(d-(l<<16>>16)<<1)>>1]|0,s)|0)>>15;if((n|0)>32767){We[Oe>>2]=1;n=32767}p=n&65535;Ve[je>>1]=p;Ve[u>>1]=Wt(Ve[u>>1]|0,p,Oe)|0;d=d+1|0;if((d&65535)<<16>>16==40)break e;l=Ve[Ce>>1]|0}}}while(0);e:do{if(f){f=(v&65535|0)==0;if(f){n=c;u=w}else{n=c+2|0;u=Ve[c>>1]|0}if(U)lr(x,r,u,Be,E,He,xe,Re,Oe);else{vr(H,Ve[t>>1]|0,He,Oe);Sr(Y,x,Ve[t>>1]|0,xe,Oe)}_r(H,ye,Ve[z>>1]|0,He,Oe);br(Y,ye,Ve[z>>1]|0,xe,Oe);c=Ve[He>>1]|0;d=c<<16>>16>13017?13017:c;if(f)S=80;else p=u}else{n=c+2|0;d=Ve[c>>1]|0;switch(r|0){case 1:case 2:case 3:case 4:case 6:{if(U)lr(x,r,d,Be,E,He,xe,Re,Oe);else{vr(H,Ve[t>>1]|0,He,Oe);Sr(Y,x,Ve[t>>1]|0,xe,Oe)}_r(H,ye,Ve[z>>1]|0,He,Oe);br(Y,ye,Ve[z>>1]|0,xe,Oe);c=Ve[He>>1]|0;d=c<<16>>16>13017?13017:c;if(!L){u=w;S=80;break e}if((Ve[g>>1]|0)<=45){u=w;S=80;break e}u=w;d=d<<16>>16>>>2&65535;S=80;break e}case 5:{if(Ae)vr(H,Ve[t>>1]|0,He,Oe);else Ve[He>>1]=dr(5,d,We[te>>2]|0)|0;_r(H,ye,Ve[z>>1]|0,He,Oe);if(U)cr(x,5,Ve[n>>1]|0,Be,We[ne>>2]|0,xe,Oe);else Sr(Y,x,Ve[t>>1]|0,xe,Oe);br(Y,ye,Ve[z>>1]|0,xe,Oe);d=Ve[He>>1]|0;n=c+4|0;c=d;u=w;d=d<<16>>16>13017?13017:d;S=80;break e}default:{if(U)cr(x,r,d,Be,We[ne>>2]|0,xe,Oe);else Sr(Y,x,Ve[t>>1]|0,xe,Oe);br(Y,ye,Ve[z>>1]|0,xe,Oe);d=Ve[He>>1]|0;c=d;u=w;S=80;break e}}}}while(0);if((S|0)==80){S=0;Ve[C>>1]=c<<16>>16>13017?13017:c;p=u}d=d<<16>>16;d=(d<<17>>17|0)==(d|0)?d<<1:d>>>15^32767;E=(d&65535)<<16>>16>16384;e:do{if(E){m=d<<16>>16;if(j)c=0;else{c=0;while(1){d=(Ze(Ve[(We[T>>2]|0)+(c<<1)>>1]|0,m)|0)>>15;if((d|0)>32767){We[Oe>>2]=1;d=32767}Ve[je>>1]=d;d=Ze(Ve[He>>1]|0,d<<16>>16)|0;if((d|0)==1073741824){We[Oe>>2]=1;d=2147483647}else d=d<<1;Ve[Ue+(c<<1)>>1]=Ni(d,Oe)|0;c=c+1|0;if((c|0)==40)break e}}do{d=(Ze(Ve[(We[T>>2]|0)+(c<<1)>>1]|0,m)|0)>>15;if((d|0)>32767){We[Oe>>2]=1;d=32767}Ve[je>>1]=d;d=Ze(Ve[He>>1]|0,d<<16>>16)|0;if((d|0)!=1073741824){d=d<<1;if((d|0)<0)d=~((d^-2)>>1);else S=88}else{We[Oe>>2]=1;d=2147483647;S=88}if((S|0)==88){S=0;d=d>>1}Ve[Ue+(c<<1)>>1]=Ni(d,Oe)|0;c=c+1|0}while((c|0)!=40)}}while(0);if(U){Ve[oe>>1]=Ve[ie>>1]|0;Ve[ie>>1]=Ve[ae>>1]|0;Ve[ae>>1]=Ve[se>>1]|0;Ve[se>>1]=Ve[le>>1]|0;Ve[le>>1]=Ve[fe>>1]|0;Ve[fe>>1]=Ve[ue>>1]|0;Ve[ue>>1]=Ve[ce>>1]|0;Ve[ce>>1]=Ve[q>>1]|0;Ve[q>>1]=Ve[He>>1]|0}if((Ae|(Ve[z>>1]|0)!=0?K&(Ve[y>>1]|0)!=0:0)?(Ne=Ve[He>>1]|0,Ne<<16>>16>12288):0){S=(((Ne<<16>>16)+118784|0)>>>1)+12288&65535;Ve[He>>1]=S<<16>>16>14745?14745:S}Fr(Ye,Me,h,ze,Oe);d=er(V,r,Ve[xe>>1]|0,ze,W,ye,Ve[z>>1]|0,a,Ve[X>>1]|0,Ve[y>>1]|0,Ve[O>>1]|0,Oe)|0;switch(r|0){case 0:case 1:case 2:case 3:case 6:{u=Ve[He>>1]|0;m=1;break}default:{d=Ve[xe>>1]|0;u=Ve[He>>1]|0;if(G)m=1;else{c=u<<16>>16;if(u<<16>>16<0)c=~((c^-2)>>1);else c=c>>>1;u=c&65535;m=2}}}s=u<<16>>16;h=m&65535;c=We[T>>2]|0;w=0;do{c=c+(w<<1)|0;Ve[Le+(w<<1)>>1]=Ve[c>>1]|0;c=Ze(Ve[c>>1]|0,s)|0;if((c|0)==1073741824){We[Oe>>2]=1;l=2147483647}else l=c<<1;f=Ze(Ve[xe>>1]|0,Ve[Be+(w<<1)>>1]|0)|0;if((f|0)!=1073741824){c=(f<<1)+l|0;if((f^l|0)>0&(c^l|0)<0){We[Oe>>2]=1;c=(l>>>31)+2147483647|0}}else{We[Oe>>2]=1;c=2147483647}S=c<>h|0)==(c|0)?S:c>>31^2147483647,Oe)|0;c=We[T>>2]|0;Ve[c+(w<<1)>>1]=S;w=w+1|0}while((w|0)!=40);Rr(Z);if((K?(Ve[O>>1]|0)>3:0)?!((Ve[y>>1]|0)==0|M):0)gr(Z);Ar(Z,r,Le,d,Ve[He>>1]|0,Be,u,m,Re,Oe);d=0;f=0;do{c=Ve[Le+(f<<1)>>1]|0;c=Ze(c,c)|0;if((c|0)!=1073741824){u=(c<<1)+d|0;if((c^d|0)>0&(u^d|0)<0){We[Oe>>2]=1;d=(d>>>31)+2147483647|0}else d=u}else{We[Oe>>2]=1;d=2147483647}f=f+1|0}while((f|0)!=40);if((d|0)<0)d=~((d^-2)>>1);else d=d>>1;d=Ii(d,je,Oe)|0;u=((Ve[je>>1]|0)>>>1)+15|0;c=u&65535;u=u<<16>>16;if(c<<16>>16>0)if(c<<16>>16<31){d=d>>u;S=135}else{d=0;S=137}else{m=0-u<<16>>16;S=d<>m|0)==(d|0)?S:d>>31^2147483647;S=135}if((S|0)==135){S=0;if((d|0)<0)d=~((d^-4)>>2);else S=137}if((S|0)==137){S=0;d=d>>>2}d=d&65535;do{if(K?(Pe=Ve[O>>1]|0,Pe<<16>>16>5):0)if(Ve[y>>1]|0)if((Ve[t>>1]|0)<4){if(J){if(!(Ae|(Ve[X>>1]|0)!=0))S=145}else if(!Ae)S=145;if((S|0)==145?(0,(Ve[z>>1]|0)==0):0){S=147;break}kr(Le,d,Q,Pe,Ve[z>>1]|0,be,Oe)|0;S=147}else S=147;else S=151;else S=147}while(0);do{if((S|0)==147){S=0;if(Ve[y>>1]|0){if(!Ae?(Ve[z>>1]|0)==0:0){S=151;break}if((Ve[t>>1]|0)>=4)S=151}else S=151}}while(0);if((S|0)==151){S=0;Ve[Q>>1]=Ve[de>>1]|0;Ve[de>>1]=Ve[he>>1]|0;Ve[he>>1]=Ve[we>>1]|0;Ve[we>>1]=Ve[me>>1]|0;Ve[me>>1]=Ve[Ee>>1]|0;Ve[Ee>>1]=Ve[pe>>1]|0;Ve[pe>>1]=Ve[Se>>1]|0;Ve[Se>>1]=Ve[$>>1]|0;Ve[$>>1]=d}if(E){d=0;do{E=Ue+(d<<1)|0;Ve[E>>1]=Wt(Ve[E>>1]|0,Ve[Le+(d<<1)>>1]|0,Oe)|0;d=d+1|0}while((d|0)!=40);Je(Le,Ue,40,Oe);We[Oe>>2]=0;Li(o,Ue,i+(b<<1)|0,40,ee,0)}else{We[Oe>>2]=0;Li(o,Le,i+(b<<1)|0,40,ee,0)}if(!(We[Oe>>2]|0))Ki(ee|0,i+(b+30<<1)|0,20)|0;else{u=193;while(1){c=e+(u<<1)|0;E=Ve[c>>1]|0;d=E<<16>>16;if(E<<16>>16<0)d=~((d^-4)>>2);else d=d>>>2;Ve[c>>1]=d;if((u|0)>0)u=u+-1|0;else{u=39;break}}while(1){c=Le+(u<<1)|0;E=Ve[c>>1]|0;d=E<<16>>16;if(E<<16>>16<0)d=~((d^-4)>>2);else d=d>>>2;Ve[c>>1]=d;if((u|0)>0)u=u+-1|0;else break}Li(o,Le,i+(b<<1)|0,40,ee,1)}Ki(e|0,re|0,308)|0;Ve[g>>1]=Ve[Ce>>1]|0;d=b+40|0;h=d&65535;if(h<<16>>16>=160)break;else{b=d<<16>>16;o=o+22|0;w=p}}Ve[y>>1]=$e(e+484|0,e+466|0,i,O,Oe)|0;Er(Te,Me,i,Oe);Ve[z>>1]=ye;Ve[X>>1]=a;Mr(e+626|0,Me,Oe);je=Fe;We[je>>2]=De;Ge=qe;return}function lr(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;var f=0,u=0,c=0,d=0,h=0;h=Ge;Ge=Ge+16|0;c=h+2|0;d=h;n=n<<16>>16;n=(n<<18>>18|0)==(n|0)?n<<2:n>>>15^32767;switch(r|0){case 3:case 4:case 6:{u=n<<16>>16;n=We[s+84>>2]|0;Ve[o>>1]=Ve[n+(u<<1)>>1]|0;s=Ve[n+(u+1<<1)>>1]|0;f=Ve[n+(u+3<<1)>>1]|0;o=Ve[n+(u+2<<1)>>1]|0;break}case 0:{s=(n&65535)+(i<<16>>16<<1^2)|0;s=(s&65535)<<16>>16>1022?1022:s<<16>>16;Ve[o>>1]=Ve[782+(s<<1)>>1]|0;o=Ve[782+(s+1<<1)>>1]|0;si(o<<16>>16,d,c,l);Ve[d>>1]=(Xe[d>>1]|0)+65524;s=Ci(Ve[c>>1]|0,5,l)|0;u=Ve[d>>1]|0;u=Wt(s,((u<<26>>26|0)==(u|0)?u<<10:u>>>15^32767)&65535,l)|0;s=Ve[c>>1]|0;n=Ve[d>>1]|0;if((n*24660|0)==1073741824){We[l>>2]=1;i=2147483647}else i=n*49320|0;f=(s<<16>>16)*24660>>15;n=i+(f<<1)|0;if((i^f|0)>0&(n^i|0)<0){We[l>>2]=1;n=(i>>>31)+2147483647|0}f=n<<13;s=o;f=Ni((f>>13|0)==(n|0)?f:n>>31^2147483647,l)|0;o=u;break}default:{u=n<<16>>16;n=We[s+80>>2]|0;Ve[o>>1]=Ve[n+(u<<1)>>1]|0;s=Ve[n+(u+1<<1)>>1]|0;f=Ve[n+(u+3<<1)>>1]|0;o=Ve[n+(u+2<<1)>>1]|0}}Jt(e,r,t,d,c,0,0,l);i=Ze((_i(14,Ve[c>>1]|0,l)|0)<<16>>16,s<<16>>16)|0;if((i|0)==1073741824){We[l>>2]=1;n=2147483647}else n=i<<1;s=10-(Xe[d>>1]|0)|0;i=s&65535;s=s<<16>>16;if(i<<16>>16>0){d=i<<16>>16<31?n>>s:0;d=d>>>16;d=d&65535;Ve[a>>1]=d;Qt(e,o,f);Ge=h;return}else{l=0-s<<16>>16;d=n<>l|0)==(n|0)?d:n>>31^2147483647;d=d>>>16;d=d&65535;Ve[a>>1]=d;Qt(e,o,f);Ge=h;return}}function fr(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;if(!(t<<16>>16)){s=e<<16>>16;if(e<<16>>16>=197){Ve[o>>1]=s+65424;Ve[a>>1]=0;return}i=((s<<16)+131072>>16)*10923>>15;if((i|0)>32767){We[l>>2]=1;i=32767}e=(i&65535)+19|0;Ve[o>>1]=e;Ve[a>>1]=s+58-((e*196608|0)>>>16);return}if(!(s<<16>>16)){l=e<<16>>16<<16;e=((l+131072>>16)*21846|0)+-65536>>16;Ve[o>>1]=e+(r&65535);Ve[a>>1]=((l+-131072|0)>>>16)-((e*196608|0)>>>16);return}if((Bi(i,r,l)|0)<<16>>16>5)i=(r&65535)+5&65535;s=n<<16>>16;s=(s-(i&65535)&65535)<<16>>16>4?s+65532&65535:i;i=e<<16>>16;if(e<<16>>16<4){Ve[o>>1]=((((s&65535)<<16)+-327680|0)>>>16)+i;Ve[a>>1]=0;return}i=i<<16;if(e<<16>>16<12){l=(((i+-327680>>16)*10923|0)>>>15<<16)+-65536|0;e=l>>16;Ve[o>>1]=(s&65535)+e;Ve[a>>1]=((i+-589824|0)>>>16)-(l>>>15)-e;return}else{Ve[o>>1]=((i+-786432+((s&65535)<<16)|0)>>>16)+1;Ve[a>>1]=0;return}}function ur(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;if(t<<16>>16){a=(Xe[i>>1]|0)+65531|0;a=(a<<16>>16|0)<(r<<16>>16|0)?r:a&65535;n=n<<16>>16;r=e<<16>>16<<16;e=((r+327680>>16)*10924|0)+-65536>>16;Ve[i>>1]=(((((a&65535)<<16)+589824>>16|0)>(n|0)?n+65527&65535:a)&65535)+e;Ve[o>>1]=((r+-196608|0)>>>16)-((e*393216|0)>>>16);return}t=e<<16>>16;if(e<<16>>16<463){e=((((t<<16)+327680>>16)*10924|0)>>>16)+17|0;Ve[i>>1]=e;Ve[o>>1]=t+105-((e*393216|0)>>>16);return}else{Ve[i>>1]=t+65168;Ve[o>>1]=0;return}}function cr(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0;u=Ge;Ge=Ge+16|0;l=u+6|0;s=u+4|0;Jt(e,r,t,l,s,u+2|0,u,a);f=(n&31)*3|0;t=i+(f<<1)|0;if(!((Bi(r&65535,7,a)|0)<<16>>16)){l=_i(Ve[l>>1]|0,Ve[s>>1]|0,a)|0;s=l<<16>>16;s=(Ze(((l<<20>>20|0)==(s|0)?l<<4:s>>>15^32767)<<16>>16,Ve[t>>1]|0)|0)>>15;if((s|0)>32767){We[a>>2]=1;s=32767}t=s<<16;n=t>>16;if((s<<17>>17|0)==(n|0))s=t>>15;else s=n>>>15^32767}else{n=_i(14,Ve[s>>1]|0,a)|0;n=Ze(n<<16>>16,Ve[t>>1]|0)|0;if((n|0)==1073741824){We[a>>2]=1;t=2147483647}else t=n<<1;n=Bi(9,Ve[l>>1]|0,a)|0;s=n<<16>>16;if(n<<16>>16>0)s=n<<16>>16<31?t>>s:0;else{a=0-s<<16>>16;s=t<>a|0)==(t|0)?s:t>>31^2147483647}s=s>>>16}Ve[o>>1]=s;Qt(e,Ve[i+(f+1<<1)>>1]|0,Ve[i+(f+2<<1)>>1]|0);Ge=u;return}function dr(e,r,n){e=e|0;r=r|0;n=n|0;r=Ve[n+(r<<16>>16<<1)>>1]|0;if((e|0)!=7){e=r;return e|0}e=r&65532;return e|0}function hr(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0;p=Ge;Ge=Ge+48|0;h=p+20|0;E=p;m=We[i+44>>2]|0;w=We[i+64>>2]|0;s=We[i+4>>2]|0;d=We[i+12>>2]|0;f=We[i+20>>2]|0;l=We[i+56>>2]|0;if(!(n<<16>>16)){u=r>>>0<2;if(u){n=765;c=508;f=We[i+52>>2]|0}else{i=(r|0)==5;n=i?1533:765;c=2044;s=i?l:s}l=Ve[t>>1]|0;n=((l*196608>>16|0)>(n&65535|0)?n:l*3&65535)<<16>>16;l=Ve[s+(n<<1)>>1]|0;Ve[h>>1]=l;Ve[h+2>>1]=Ve[s+(n+1<<1)>>1]|0;Ve[h+4>>1]=Ve[s+(n+2<<1)>>1]|0;n=Ve[t+2>>1]|0;if(u)n=n<<16>>16<<1&65535;u=(n<<16>>16)*196608|0;u=(u|0)>100466688?1533:u>>16;Ve[h+6>>1]=Ve[d+(u<<1)>>1]|0;Ve[h+8>>1]=Ve[d+(u+1<<1)>>1]|0;Ve[h+10>>1]=Ve[d+(u+2<<1)>>1]|0;t=Ve[t+4>>1]|0;t=((t<<18>>16|0)>(c&65535|0)?c:t<<2&65535)<<16>>16;Ve[h+12>>1]=Ve[f+(t<<1)>>1]|0;Ve[h+14>>1]=Ve[f+((t|1)<<1)>>1]|0;Ve[h+16>>1]=Ve[f+((t|2)<<1)>>1]|0;Ve[h+18>>1]=Ve[f+((t|3)<<1)>>1]|0;if((r|0)==8){n=0;while(1){w=e+(n<<1)|0;Ve[E+(n<<1)>>1]=Wt(l,Wt(Ve[m+(n<<1)>>1]|0,Ve[w>>1]|0,a)|0,a)|0;Ve[w>>1]=l;n=n+1|0;if((n|0)==10)break;l=Ve[h+(n<<1)>>1]|0}Ti(E,205,10,a);s=e+20|0;l=E;n=s+20|0;do{Ke[s>>0]=Ke[l>>0]|0;s=s+1|0;l=l+1|0}while((s|0)<(n|0));Ei(E,o,10,a);Ge=p;return}else s=0;do{l=e+(s<<1)|0;n=(Ze(Ve[w+(s<<1)>>1]|0,Ve[l>>1]|0)|0)>>15;if((n|0)>32767){We[a>>2]=1;n=32767}t=Wt(Ve[m+(s<<1)>>1]|0,n&65535,a)|0;r=Ve[h+(s<<1)>>1]|0;Ve[E+(s<<1)>>1]=Wt(r,t,a)|0;Ve[l>>1]=r;s=s+1|0}while((s|0)!=10);Ti(E,205,10,a);s=e+20|0;l=E;n=s+20|0;do{Ke[s>>0]=Ke[l>>0]|0;s=s+1|0;l=l+1|0}while((s|0)<(n|0));Ei(E,o,10,a);Ge=p;return}else{s=0;do{n=(Ve[e+20+(s<<1)>>1]|0)*29491>>15;if((n|0)>32767){We[a>>2]=1;n=32767}l=(Ve[m+(s<<1)>>1]|0)*3277>>15;if((l|0)>32767){We[a>>2]=1;l=32767}Ve[E+(s<<1)>>1]=Wt(l&65535,n&65535,a)|0;s=s+1|0}while((s|0)!=10);if((r|0)==8){s=0;do{w=e+(s<<1)|0;h=Wt(Ve[m+(s<<1)>>1]|0,Ve[w>>1]|0,a)|0;Ve[w>>1]=Bi(Ve[E+(s<<1)>>1]|0,h,a)|0;s=s+1|0}while((s|0)!=10);Ti(E,205,10,a);s=e+20|0;l=E;n=s+20|0;do{Ke[s>>0]=Ke[l>>0]|0;s=s+1|0;l=l+1|0}while((s|0)<(n|0));Ei(E,o,10,a);Ge=p;return}else s=0;do{l=e+(s<<1)|0;n=(Ze(Ve[w+(s<<1)>>1]|0,Ve[l>>1]|0)|0)>>15;if((n|0)>32767){We[a>>2]=1;n=32767}h=Wt(Ve[m+(s<<1)>>1]|0,n&65535,a)|0;Ve[l>>1]=Bi(Ve[E+(s<<1)>>1]|0,h,a)|0;s=s+1|0}while((s|0)!=10);Ti(E,205,10,a);s=e+20|0;l=E;n=s+20|0;do{Ke[s>>0]=Ke[l>>0]|0;s=s+1|0;l=l+1|0}while((s|0)<(n|0));Ei(E,o,10,a);Ge=p;return}}function Ie(e,r,n){e=e|0;r=r|0;n=n|0;Ki(e|0,n+((r<<16>>16)*10<<1)|0,20)|0;return}function wr(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0;p=Ge;Ge=Ge+80|0;d=p+60|0;h=p+40|0;m=p+20|0;E=p;w=We[t+48>>2]|0;f=We[t+24>>2]|0;u=We[t+28>>2]|0;c=We[t+32>>2]|0;if(r<<16>>16){s=0;do{d=w+(s<<1)|0;n=Wt(((Ve[d>>1]|0)*1639|0)>>>15&65535,((Ve[e+20+(s<<1)>>1]|0)*31128|0)>>>15&65535,a)|0;Ve[m+(s<<1)>>1]=n;Ve[E+(s<<1)>>1]=n;h=e+(s<<1)|0;Ve[h>>1]=Bi(n,Wt(Ve[d>>1]|0,((Ve[h>>1]|0)*21299|0)>>>15&65535,a)|0,a)|0;s=s+1|0}while((s|0)!=10);Ti(m,205,10,a);Ti(E,205,10,a);s=e+20|0;t=E;r=s+20|0;do{Ke[s>>0]=Ke[t>>0]|0;s=s+1|0;t=t+1|0}while((s|0)<(r|0));Ei(m,i,10,a);Ei(E,o,10,a);Ge=p;return}r=We[t+16>>2]|0;t=We[t+8>>2]|0;l=Ve[n>>1]|0;l=((l<<18>>18|0)==(l|0)?l<<2:l>>>15^32767)<<16>>16;Ve[d>>1]=Ve[t+(l<<1)>>1]|0;Ve[d+2>>1]=Ve[t+(l+1<<1)>>1]|0;Ve[h>>1]=Ve[t+(l+2<<1)>>1]|0;Ve[h+2>>1]=Ve[t+(l+3<<1)>>1]|0;l=Ve[n+2>>1]|0;l=((l<<18>>18|0)==(l|0)?l<<2:l>>>15^32767)<<16>>16;Ve[d+4>>1]=Ve[r+(l<<1)>>1]|0;Ve[d+6>>1]=Ve[r+(l+1<<1)>>1]|0;Ve[h+4>>1]=Ve[r+(l+2<<1)>>1]|0;Ve[h+6>>1]=Ve[r+(l+3<<1)>>1]|0;l=Ve[n+4>>1]|0;t=l<<16>>16;if(l<<16>>16<0)r=~((t^-2)>>1);else r=t>>>1;l=r<<16>>16;l=((r<<18>>18|0)==(l|0)?r<<2:l>>>15^32767)<<16>>16;s=f+(l+1<<1)|0;r=Ve[f+(l<<1)>>1]|0;if(!(t&1)){Ve[d+8>>1]=r;Ve[d+10>>1]=Ve[s>>1]|0;Ve[h+8>>1]=Ve[f+(l+2<<1)>>1]|0;Ve[h+10>>1]=Ve[f+(l+3<<1)>>1]|0}else{if(r<<16>>16==-32768)r=32767;else r=0-(r&65535)&65535;Ve[d+8>>1]=r;r=Ve[s>>1]|0;if(r<<16>>16==-32768)r=32767;else r=0-(r&65535)&65535;Ve[d+10>>1]=r;r=Ve[f+(l+2<<1)>>1]|0;if(r<<16>>16==-32768)r=32767;else r=0-(r&65535)&65535;Ve[h+8>>1]=r;r=Ve[f+(l+3<<1)>>1]|0;if(r<<16>>16==-32768)r=32767;else r=0-(r&65535)&65535;Ve[h+10>>1]=r}s=Ve[n+6>>1]|0;s=((s<<18>>18|0)==(s|0)?s<<2:s>>>15^32767)<<16>>16;Ve[d+12>>1]=Ve[u+(s<<1)>>1]|0;Ve[d+14>>1]=Ve[u+(s+1<<1)>>1]|0;Ve[h+12>>1]=Ve[u+(s+2<<1)>>1]|0;Ve[h+14>>1]=Ve[u+(s+3<<1)>>1]|0;s=Ve[n+8>>1]|0;s=((s<<18>>18|0)==(s|0)?s<<2:s>>>15^32767)<<16>>16;Ve[d+16>>1]=Ve[c+(s<<1)>>1]|0;Ve[d+18>>1]=Ve[c+(s+1<<1)>>1]|0;Ve[h+16>>1]=Ve[c+(s+2<<1)>>1]|0;Ve[h+18>>1]=Ve[c+(s+3<<1)>>1]|0;s=0;do{t=e+(s<<1)|0;r=(Ve[t>>1]|0)*21299>>15;if((r|0)>32767){We[a>>2]=1;r=32767}c=Wt(Ve[w+(s<<1)>>1]|0,r&65535,a)|0;Ve[m+(s<<1)>>1]=Wt(Ve[d+(s<<1)>>1]|0,c,a)|0;n=Ve[h+(s<<1)>>1]|0;Ve[E+(s<<1)>>1]=Wt(n,c,a)|0;Ve[t>>1]=n;s=s+1|0}while((s|0)!=10);Ti(m,205,10,a);Ti(E,205,10,a);s=e+20|0;t=E;r=s+20|0;do{Ke[s>>0]=Ke[t>>0]|0;s=s+1|0;t=t+1|0}while((s|0)<(r|0));Ei(m,i,10,a);Ei(E,o,10,a);Ge=p;return}function Be(e,r){e=e|0;r=r|0;var n=0,t=0;if(!e){t=-1;return t|0}n=e;t=n+20|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));Ki(e+20|0,r|0,20)|0;t=0;return t|0}function Le(e){e=e|0;var r=0,n=0,t=0,i=0,o=0;if(!e){o=-1;return o|0}Ve[e>>1]=0;Ve[e+2>>1]=8192;r=e+4|0;Ve[r>>1]=3500;Ve[e+6>>1]=3500;We[e+8>>2]=1887529304;Ve[e+12>>1]=3e4;Ve[e+14>>1]=26e3;Ve[e+16>>1]=21e3;Ve[e+18>>1]=15e3;Ve[e+20>>1]=8e3;Ve[e+22>>1]=0;Ve[e+24>>1]=-8e3;Ve[e+26>>1]=-15e3;Ve[e+28>>1]=-21e3;Ve[e+30>>1]=-26e3;Ve[e+32>>1]=3e4;Ve[e+34>>1]=26e3;Ve[e+36>>1]=21e3;Ve[e+38>>1]=15e3;Ve[e+40>>1]=8e3;Ve[e+42>>1]=0;Ve[e+44>>1]=-8e3;Ve[e+46>>1]=-15e3;Ve[e+48>>1]=-21e3;Ve[e+50>>1]=-26e3;Ve[e+212>>1]=0;Ve[e+374>>1]=0;Ve[e+392>>1]=0;n=e+52|0;Ve[n>>1]=1384;Ve[e+54>>1]=2077;Ve[e+56>>1]=3420;Ve[e+58>>1]=5108;Ve[e+60>>1]=6742;Ve[e+62>>1]=8122;Ve[e+64>>1]=9863;Ve[e+66>>1]=11092;Ve[e+68>>1]=12714;Ve[e+70>>1]=13701;t=e+72|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+92|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+112|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+132|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+152|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+172|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));t=e+192|0;i=n;o=t+20|0;do{Ke[t>>0]=Ke[i>>0]|0;t=t+1|0;i=i+1|0}while((t|0)<(o|0));Vi(e+214|0,0,160)|0;Ve[e+376>>1]=3500;Ve[e+378>>1]=3500;o=Ve[r>>1]|0;Ve[e+380>>1]=o;Ve[e+382>>1]=o;Ve[e+384>>1]=o;Ve[e+386>>1]=o;Ve[e+388>>1]=o;Ve[e+390>>1]=o;Ve[e+394>>1]=0;Ve[e+396>>1]=7;Ve[e+398>>1]=32767;Ve[e+400>>1]=0;Ve[e+402>>1]=0;Ve[e+404>>1]=0;We[e+408>>2]=1;Ve[e+412>>1]=0;o=0;return o|0}function mr(e,r,n,t,i,o,a,s,l,f,u,c){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;var d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0;V=Ge;Ge=Ge+304|0;L=V+192|0;C=V+168|0;x=V+148|0;j=V+216|0;H=V+146|0;z=V+144|0;I=V+124|0;B=V+104|0;U=V+84|0;Y=V+60|0;N=V+40|0;D=V;K=e+404|0;q=e+400|0;if((Ve[K>>1]|0)!=0?(Ve[q>>1]|0)!=0:0){T=e+394|0;Ve[T>>1]=Ve[636+(a<<1)>>1]|0;v=Ve[e+212>>1]|0;b=v+10|0;Ki(e+52+(((b&65535|0)==80?0:b<<16>>16)<<1)|0,e+52+(v<<1)|0,20)|0;v=Ve[e+392>>1]|0;b=v+1|0;Ve[e+376+(((b&65535|0)==8?0:b<<16>>16)<<1)>>1]=Ve[e+376+(v<<1)>>1]|0;b=e+4|0;Ve[b>>1]=0;v=D+36|0;_=D+32|0;k=D+28|0;F=D+24|0;M=D+20|0;g=D+16|0;R=D+12|0;A=D+8|0;y=D+4|0;O=e+52|0;w=D;P=w+40|0;do{We[w>>2]=0;w=w+4|0}while((w|0)<(P|0));h=0;d=7;while(1){P=Ve[e+376+(d<<1)>>1]|0;S=P<<16>>16;if(P<<16>>16<0)S=~((S^-8)>>3);else S=S>>>3;h=Wt(h,S&65535,c)|0;Ve[b>>1]=h;E=d*10|0;w=9;while(1){m=D+(w<<2)|0;p=We[m>>2]|0;P=Ve[e+52+(w+E<<1)>>1]|0;S=P+p|0;if((P^p|0)>-1&(S^p|0)<0){We[c>>2]=1;S=(p>>>31)+2147483647|0}We[m>>2]=S;if((w|0)>0)w=w+-1|0;else break}if((d|0)<=0)break;else d=d+-1|0}Ve[N+18>>1]=(We[v>>2]|0)>>>3;Ve[N+16>>1]=(We[_>>2]|0)>>>3;Ve[N+14>>1]=(We[k>>2]|0)>>>3;Ve[N+12>>1]=(We[F>>2]|0)>>>3;Ve[N+10>>1]=(We[M>>2]|0)>>>3;Ve[N+8>>1]=(We[g>>2]|0)>>>3;Ve[N+6>>1]=(We[R>>2]|0)>>>3;Ve[N+4>>1]=(We[A>>2]|0)>>>3;Ve[N+2>>1]=(We[y>>2]|0)>>>3;Ve[N>>1]=(We[D>>2]|0)>>>3;Ei(N,e+12|0,10,c);Ve[b>>1]=Bi(Ve[b>>1]|0,Ve[T>>1]|0,c)|0;qi(e+214|0,O|0,160)|0;N=9;while(1){P=Ve[e+214+(N+70<<1)>>1]|0;m=P<<16>>16;D=Ve[e+214+(N+60<<1)>>1]|0;w=(D<<16>>16)+m|0;if((D^P)<<16>>16>-1&(w^m|0)<0){We[c>>2]=1;w=(m>>>31)+2147483647|0}P=Ve[e+214+(N+50<<1)>>1]|0;m=P+w|0;if((P^w|0)>-1&(m^w|0)<0){We[c>>2]=1;m=(w>>>31)+2147483647|0}P=Ve[e+214+(N+40<<1)>>1]|0;w=P+m|0;if((P^m|0)>-1&(w^m|0)<0){We[c>>2]=1;w=(m>>>31)+2147483647|0}P=Ve[e+214+(N+30<<1)>>1]|0;m=P+w|0;if((P^w|0)>-1&(m^w|0)<0){We[c>>2]=1;m=(w>>>31)+2147483647|0}P=Ve[e+214+(N+20<<1)>>1]|0;w=P+m|0;if((P^m|0)>-1&(w^m|0)<0){We[c>>2]=1;w=(m>>>31)+2147483647|0}P=Ve[e+214+(N+10<<1)>>1]|0;m=P+w|0;if((P^w|0)>-1&(m^w|0)<0){We[c>>2]=1;w=(w>>>31)+2147483647|0}else w=m;P=Ve[e+214+(N<<1)>>1]|0;m=P+w|0;if((P^w|0)>-1&(m^w|0)<0){We[c>>2]=1;m=(w>>>31)+2147483647|0}if((m|0)<0)m=~((m^-8)>>3);else m=m>>>3;S=m&65535;E=Ve[654+(N<<1)>>1]|0;p=7;while(1){d=e+214+((p*10|0)+N<<1)|0;m=Bi(Ve[d>>1]|0,S,c)|0;Ve[d>>1]=m;m=(Ze(E,m<<16>>16)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[d>>1]=m;h=(m&65535)-(m>>>15&1)|0;h=h<<16>>31^h;w=h&65535;if(w<<16>>16>655)w=(((h<<16>>16)+261489|0)>>>2)+655&65535;w=w<<16>>16>1310?1310:w;if(!(m&32768))m=w;else m=0-(w&65535)&65535;Ve[d>>1]=m;if((p|0)>0)p=p+-1|0;else break}if((N|0)>0)N=N+-1|0;else break}}if(Ve[q>>1]|0){S=e+32|0;p=e+12|0;w=S;E=p;P=w+20|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));E=e+4|0;h=Ve[E>>1]|0;d=e+6|0;Ve[d>>1]=h;do{if(Ve[e+402>>1]|0){w=Ve[e>>1]|0;Ve[e>>1]=0;w=w<<16>>16<32?w:32;P=w<<16>>16;m=P<<10;if((m|0)!=(P<<26>>16|0)){We[c>>2]=1;m=w<<16>>16>0?32767:-32768}if(w<<16>>16>1)m=Gt(1024,m&65535)|0;else m=16384;Ve[e+2>>1]=m;Ie(n,Ve[s>>1]|0,We[l+60>>2]|0);hr(n,8,0,s+2|0,l,p,c);w=n;P=w+20|0;do{Ke[w>>0]=0;w=w+1|0}while((w|0)<(P|0));h=Ve[s+8>>1]|0;h=h<<16>>16==0?-32768:((h+64&65535)>127?h<<16>>16>0?32767:32768:h<<16>>16<<9)+60416&65535;Ve[E>>1]=h;if((Ve[e+412>>1]|0)!=0?(We[e+408>>2]|0)!=0:0)break;w=S;E=p;P=w+20|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));Ve[d>>1]=h}}while(0);w=h<<16>>16;if(h<<16>>16<0)w=~((w^-2)>>1);else w=w>>>1;w=w+56536|0;m=w<<16;if((m|0)>0)w=0;else w=(m|0)<-946077696?-14436:w&65535;Ve[t>>1]=w;Ve[t+2>>1]=w;Ve[t+4>>1]=w;Ve[t+6>>1]=w;s=((w<<16>>16)*5443|0)>>>15&65535;Ve[t+8>>1]=s;Ve[t+10>>1]=s;Ve[t+12>>1]=s;Ve[t+14>>1]=s}w=((Ve[636+(a<<1)>>1]|0)*104864|0)>>>15<<16;if((w|0)<0)w=~((w>>16^-32)>>5);else w=w>>21;a=e+394|0;Ve[a>>1]=Wt(((Ve[a>>1]|0)*29491|0)>>>15&65535,w&65535,c)|0;t=(Xe[e>>1]<<16)+65536|0;w=t>>16;l=e+2|0;w=(Ze(((t<<10>>26|0)==(w|0)?t>>>6:w>>>15^32767)<<16>>16,Ve[l>>1]|0)|0)>>15;if((w|0)>32767){We[c>>2]=1;w=32767}h=w&65535;if(h<<16>>16<=1024)if(h<<16>>16<-2048)p=-32768;else p=w<<4&65535;else p=16384;s=e+4|0;S=p<<16>>16;m=Ze(Ve[s>>1]|0,S)|0;if((m|0)==1073741824){We[c>>2]=1;N=2147483647}else N=m<<1;m=(Ze(Ve[e+30>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}b=m&65535;Ve[L+18>>1]=b;m=(Ze(Ve[e+28>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+16>>1]=m;m=(Ze(Ve[e+26>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+14>>1]=m;m=(Ze(Ve[e+24>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+12>>1]=m;m=(Ze(Ve[e+22>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+10>>1]=m;m=(Ze(Ve[e+20>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+8>>1]=m;m=(Ze(Ve[e+18>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+6>>1]=m;m=(Ze(Ve[e+16>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+4>>1]=m;m=(Ze(Ve[e+14>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L+2>>1]=m;m=(Ze(Ve[e+12>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[L>>1]=m;t=e+6|0;S=16384-(p&65535)<<16>>16;m=Ze(Ve[t>>1]|0,S)|0;if((m|0)!=1073741824){w=(m<<1)+N|0;if((m^N|0)>0&(w^N|0)<0){We[c>>2]=1;D=(N>>>31)+2147483647|0}else D=w}else{We[c>>2]=1;D=2147483647}w=b;E=9;while(1){h=L+(E<<1)|0;m=(Ze(Ve[e+32+(E<<1)>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}w=Wt(w,m&65535,c)|0;Ve[h>>1]=w;P=w<<16>>16;m=P<<1;if((m|0)!=(P<<17>>16|0)){We[c>>2]=1;m=w<<16>>16>0?32767:-32768}Ve[h>>1]=m;m=E+-1|0;if((E|0)<=0)break;w=Ve[L+(m<<1)>>1]|0;E=m}N=e+374|0;m=((Xe[N>>1]<<16)+-161021952>>16)*9830>>15;if((m|0)>32767){We[c>>2]=1;m=32767}m=4096-(m&65535)|0;w=m<<16;if((w|0)>268369920)S=32767;else S=(w|0)<0?0:m<<19>>16;T=e+8|0;m=ye(T,3)|0;pi(L,I,10,c);w=B;E=I;P=w+20|0;do{Ve[w>>1]=Ve[E>>1]|0;w=w+2|0;E=E+2|0}while((w|0)<(P|0));w=(m<<16>>16)*10|0;E=9;while(1){h=B+(E<<1)|0;d=Ve[h>>1]|0;m=(Ze(Ve[e+214+(E+w<<1)>>1]|0,S)|0)>>15;if((m|0)>32767){We[c>>2]=1;m=32767}Ve[h>>1]=Wt(d,m&65535,c)|0;if((E|0)>0)E=E+-1|0;else break}Ti(I,205,10,c);Ti(B,205,10,c);w=n+20|0;E=I;P=w+20|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));Ei(I,L,10,c);Ei(B,U,10,c);ci(L,C,c);ci(U,Y,c);w=u;E=C;P=w+22|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));w=u+22|0;E=C;P=w+22|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));w=u+44|0;E=C;P=w+22|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));w=u+66|0;E=C;P=w+22|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));Ae(C+2|0,x,c);m=0;w=32767;do{h=Ve[x+(m<<1)>>1]|0;h=Ze(h,h)|0;if(h>>>0<1073741824)h=32767-(h>>>15)|0;else{We[c>>2]=1;h=0}w=(Ze(h<<16>>16,w<<16>>16)|0)>>15;if((w|0)>32767){We[c>>2]=1;w=32767}m=m+1|0}while((m|0)!=10);si(w<<16>>16,H,z,c);w=(Xe[H>>1]<<16)+-983040|0;h=w>>16;h=Pi(Bi(0,Wt(((w<<12>>28|0)==(h|0)?w>>>4:h>>>15^32767)&65535,Pi(Ve[z>>1]|0,3,c)|0,c)|0,c)|0,1,c)|0;w=(Ve[N>>1]|0)*29491>>15;if((w|0)>32767){We[c>>2]=1;w=32767}m=h<<16>>16;h=m*3277>>15;if((h|0)>32767){We[c>>2]=1;h=32767}Ve[N>>1]=Wt(w&65535,h&65535,c)|0;h=D>>10;d=h+262144|0;if((h|0)>-1&(d^h|0)<0){We[c>>2]=1;d=(h>>>31)+2147483647|0}z=m<<4;h=d-z|0;if(((h^d)&(d^z)|0)<0){We[c>>2]=1;d=(d>>>31)+2147483647|0}else d=h;z=Ve[a>>1]<<5;h=z+d|0;if((z^d|0)>-1&(h^d|0)<0){We[c>>2]=1;h=(d>>>31)+2147483647|0}m=(_i(h>>>16&65535,h>>>1&32767,c)|0)<<16>>16;Oe(T,j,c);d=39;while(1){w=j+(d<<1)|0;h=(Ze(Ve[w>>1]|0,m)|0)>>15;if((h|0)>32767){We[c>>2]=1;h=32767}Ve[w>>1]=h;if((d|0)>0)d=d+-1|0;else break}Li(Y,j,f,40,r,1);Oe(T,j,c);d=39;while(1){w=j+(d<<1)|0;h=(Ze(Ve[w>>1]|0,m)|0)>>15;if((h|0)>32767){We[c>>2]=1;h=32767}Ve[w>>1]=h;if((d|0)>0)d=d+-1|0;else break}Li(Y,j,f+80|0,40,r,1);Oe(T,j,c);d=39;while(1){w=j+(d<<1)|0;h=(Ze(Ve[w>>1]|0,m)|0)>>15;if((h|0)>32767){We[c>>2]=1;h=32767}Ve[w>>1]=h;if((d|0)>0)d=d+-1|0;else break}Li(Y,j,f+160|0,40,r,1);Oe(T,j,c);w=39;while(1){d=j+(w<<1)|0;h=(Ze(Ve[d>>1]|0,m)|0)>>15;if((h|0)>32767){We[c>>2]=1;h=32767}Ve[d>>1]=h;if((w|0)>0)w=w+-1|0;else break}Li(Y,j,f+240|0,40,r,1);Ve[i+14>>1]=20;Ve[i+16>>1]=0;if((o|0)==2){h=Ve[e>>1]|0;h=h<<16>>16>32?32:h<<16>>16<1?8:h;f=h<<16>>16;d=f<<10;if((d|0)!=(f<<26>>16|0)){We[c>>2]=1;d=h<<16>>16>0?32767:-32768}Ve[l>>1]=Gt(1024,d&65535)|0;Ve[e>>1]=0;w=e+32|0;E=e+12|0;P=w+20|0;do{Ke[w>>0]=Ke[E>>0]|0;w=w+1|0;E=E+1|0}while((w|0)<(P|0));c=Ve[s>>1]|0;Ve[t>>1]=c;Ve[s>>1]=(c&65535)+65280}if(!(Ve[q>>1]|0)){Ge=V;return}do{if(!(Ve[e+402>>1]|0)){if(Ve[K>>1]|0)break;Ge=V;return}}while(0);Ve[e>>1]=0;Ve[e+412>>1]=1;Ge=V;return}function Er(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0;l=Ge;Ge=Ge+16|0;a=l+2|0;s=l;Ve[s>>1]=0;o=e+212|0;i=(Xe[o>>1]|0)+10|0;i=(i&65535|0)==80?0:i&65535;Ve[o>>1]=i;Ki(e+52+(i<<16>>16<<1)|0,r|0,20)|0;i=0;o=159;while(1){f=Ve[n+(o<<1)>>1]|0;f=Ze(f,f)|0;f=(f|0)==1073741824?2147483647:f<<1;r=f+i|0;if((f^i|0)>-1&(r^i|0)<0){We[t>>2]=1;i=(i>>>31)+2147483647|0}else i=r;if((o|0)>0)o=o+-1|0;else break}si(i,a,s,t);i=Ve[a>>1]|0;f=i<<16>>16;r=f<<10;if((r|0)!=(f<<26>>16|0)){We[t>>2]=1;r=i<<16>>16>0?32767:-32768}Ve[a>>1]=r;f=Ve[s>>1]|0;i=f<<16>>16;if(f<<16>>16<0)i=~((i^-32)>>5);else i=i>>>5;s=e+392|0;f=(Xe[s>>1]|0)+1|0;f=(f&65535|0)==8?0:f&65535;Ve[s>>1]=f;Ve[e+376+(f<<16>>16<<1)>>1]=i+57015+r;Ge=l;return}function pr(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0;l=(r|0)==4;f=(r|0)==5;u=(r|0)==6;t=We[e+408>>2]|0;e:do{if((r+-4|0)>>>0<3)s=4;else{if((t+-1|0)>>>0<2)switch(r|0){case 2:case 3:case 7:{s=4;break e}default:{}}Ve[e>>1]=0;a=0}}while(0);if((s|0)==4){e:do{if((t|0)==2){switch(r|0){case 2:case 4:case 6:case 7:break;default:{i=1;break e}}i=2}else i=1}while(0);a=(Xe[e>>1]|0)+1&65535;Ve[e>>1]=a;a=(r|0)!=5&a<<16>>16>50?2:i}o=e+398|0;if(f&(Ve[e+412>>1]|0)==0){Ve[o>>1]=0;i=0}else i=Ve[o>>1]|0;i=Wt(i,1,n)|0;Ve[o>>1]=i;n=e+404|0;Ve[n>>1]=0;e:do{switch(r|0){case 2:case 4:case 5:case 6:case 7:{if(!((r|0)==7&(a|0)==0)){if(i<<16>>16>30){Ve[n>>1]=1;Ve[o>>1]=0;Ve[e+396>>1]=0;break e}i=e+396|0;t=Ve[i>>1]|0;if(!(t<<16>>16)){Ve[o>>1]=0;break e}else{Ve[i>>1]=(t&65535)+65535;break e}}else s=14;break}default:s=14}}while(0);if((s|0)==14)Ve[e+396>>1]=7;if(!a)return a|0;i=e+400|0;Ve[i>>1]=0;t=e+402|0;Ve[t>>1]=0;if(l){Ve[i>>1]=1;return a|0}if(f){Ve[i>>1]=1;Ve[t>>1]=1;return a|0}if(!u)return a|0;Ve[i>>1]=1;Ve[n>>1]=0;return a|0}function Ue(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=1;Ve[e+2>>1]=1;Ve[e+4>>1]=1;Ve[e+6>>1]=1;Ve[e+8>>1]=1;Ve[e+10>>1]=0;Ve[e+12>>1]=1;e=0;return e|0}function Sr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0;l=Ge;Ge=Ge+16|0;s=l+2|0;a=l;o=ri(e,5)|0;e=e+10|0;if((Bi(o,Ve[e>>1]|0,i)|0)<<16>>16>0)o=Ve[e>>1]|0;o=(Ze(Ve[674+(n<<16>>16<<1)>>1]|0,o<<16>>16)|0)>>15;if((o|0)>32767){We[i>>2]=1;o=32767}Ve[t>>1]=o;$t(r,s,a,i);Qt(r,Ve[s>>1]|0,Ve[a>>1]|0);Ge=l;return}function br(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;if(!(r<<16>>16)){if(n<<16>>16){r=e+12|0;if((Bi(Ve[t>>1]|0,Ve[r>>1]|0,i)|0)<<16>>16>0)Ve[t>>1]=Ve[r>>1]|0}else r=e+12|0;Ve[r>>1]=Ve[t>>1]|0}Ve[e+10>>1]=Ve[t>>1]|0;i=e+2|0;Ve[e>>1]=Ve[i>>1]|0;n=e+4|0;Ve[i>>1]=Ve[n>>1]|0;i=e+6|0;Ve[n>>1]=Ve[i>>1]|0;e=e+8|0;Ve[i>>1]=Ve[e>>1]|0;Ve[e>>1]=Ve[t>>1]|0;return}function vr(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0;i=ri(e,5)|0;e=e+10|0;if((Bi(i,Ve[e>>1]|0,t)|0)<<16>>16>0)i=Ve[e>>1]|0;i=(Ze(Ve[688+(r<<16>>16<<1)>>1]|0,i<<16>>16)|0)>>15;if((i|0)<=32767){t=i;t=t&65535;Ve[n>>1]=t;return}We[t>>2]=1;t=32767;t=t&65535;Ve[n>>1]=t;return}function xe(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=1640;Ve[e+2>>1]=1640;Ve[e+4>>1]=1640;Ve[e+6>>1]=1640;Ve[e+8>>1]=1640;Ve[e+10>>1]=0;Ve[e+12>>1]=16384;e=0;return e|0}function _r(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;if(!(r<<16>>16)){if(n<<16>>16){r=e+12|0;if((Bi(Ve[t>>1]|0,Ve[r>>1]|0,i)|0)<<16>>16>0)Ve[t>>1]=Ve[r>>1]|0}else r=e+12|0;Ve[r>>1]=Ve[t>>1]|0}t=Ve[t>>1]|0;r=e+10|0;Ve[r>>1]=t;if((Bi(t,16384,i)|0)<<16>>16>0){Ve[r>>1]=16384;r=16384}else r=Ve[r>>1]|0;i=e+2|0;Ve[e>>1]=Ve[i>>1]|0;t=e+4|0;Ve[i>>1]=Ve[t>>1]|0;i=e+6|0;Ve[t>>1]=Ve[i>>1]|0;e=e+8|0;Ve[i>>1]=Ve[e>>1]|0;Ve[e>>1]=r;return}function kr(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0;l=ri(n,9)|0;f=Ve[n+16>>1]|0;s=f<<16>>16;n=(s+(Ve[n+14>>1]|0)|0)>>>1;n=(s|0)<(n<<16>>16|0)?f:n&65535;if(!(r<<16>>16>5?l<<16>>16>r<<16>>16:0))return 0;s=n<<16>>16;s=((s<<18>>18|0)==(s|0)?s<<2:s>>>15^32767)&65535;if(!(t<<16>>16>6&i<<16>>16==0))s=Bi(s,n,a)|0;l=l<<16>>16>s<<16>>16?s:l;f=vi(r)|0;s=f<<16>>16;if(f<<16>>16<0){n=0-s<<16;if((n|0)<983040)s=r<<16>>16>>(n>>16)&65535;else s=0}else{n=r<<16>>16;i=n<>16>>s|0)==(n|0))s=i&65535;else s=(n>>>15^32767)&65535}t=Ze((Gt(16383,s)|0)<<16>>16,l<<16>>16)|0;if((t|0)==1073741824){We[a>>2]=1;i=2147483647}else i=t<<1;t=Bi(20,f,a)|0;s=t<<16>>16;if(t<<16>>16>0)t=t<<16>>16<31?i>>s:0;else{r=0-s<<16>>16;t=i<>r|0)==(i|0)?t:i>>31^2147483647}t=(t|0)>32767?32767:t&65535;t=o<<16>>16!=0&t<<16>>16>3072?3072:t<<16>>16;n=0;do{i=e+(n<<1)|0;s=Ze(Ve[i>>1]|0,t)|0;if((s|0)==1073741824){We[a>>2]=1;s=2147483647}else s=s<<1;Ve[i>>1]=s>>>11;n=n+1|0}while((n|0)!=40);return 0}function He(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0;i=We[t+104>>2]|0;o=We[t+96>>2]|0;if(e>>>0>=8){Ve[n>>1]=(l[r>>0]|0)>>>4&1;Ve[n+2>>1]=(l[r>>0]|0)>>>5&1;Ve[n+4>>1]=(l[r>>0]|0)>>>6&1;Ve[n+6>>1]=(l[r>>0]|0)>>>7&255;i=i+(e<<1)|0;if((Ve[i>>1]|0)>1){e=1;t=1;o=4}else return;while(1){a=r+e|0;e=o|1;Ve[n+(o<<16>>16<<1)>>1]=l[a>>0]&1;Ve[n+(e<<16>>16<<1)>>1]=(l[a>>0]|0)>>>1&1;s=o|3;Ve[n+(e+1<<16>>16<<16>>16<<1)>>1]=(l[a>>0]|0)>>>2&1;Ve[n+(s<<16>>16<<1)>>1]=(l[a>>0]|0)>>>3&1;Ve[n+(s+1<<16>>16<<16>>16<<1)>>1]=(l[a>>0]|0)>>>4&1;Ve[n+(s+2<<16>>16<<16>>16<<1)>>1]=(l[a>>0]|0)>>>5&1;Ve[n+(s+3<<16>>16<<16>>16<<1)>>1]=(l[a>>0]|0)>>>6&1;Ve[n+(s+4<<16>>16<<16>>16<<1)>>1]=(l[a>>0]|0)>>>7&255;t=t+1<<16>>16;if(t<<16>>16<(Ve[i>>1]|0)){e=t<<16>>16;o=o+8<<16>>16}else break}return}s=We[(We[t+100>>2]|0)+(e<<2)>>2]|0;Ve[n+(Ve[s>>1]<<1)>>1]=(l[r>>0]|0)>>>4&1;Ve[n+(Ve[s+2>>1]<<1)>>1]=(l[r>>0]|0)>>>5&1;Ve[n+(Ve[s+4>>1]<<1)>>1]=(l[r>>0]|0)>>>6&1;Ve[n+(Ve[s+6>>1]<<1)>>1]=(l[r>>0]|0)>>>7&255;a=i+(e<<1)|0;if((Ve[a>>1]|0)<=1)return;t=o+(e<<1)|0;i=1;e=1;o=4;while(1){i=r+i|0;o=o<<16>>16;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=l[i>>0]&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>1&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>2&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>3&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>4&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>5&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>6&1;o=o+1|0;if((o|0)<(Ve[t>>1]|0)){Ve[n+(Ve[s+(o<<1)>>1]<<1)>>1]=(l[i>>0]|0)>>>7&1;o=o+1|0}}}}}}}}e=e+1<<16>>16;if(e<<16>>16<(Ve[a>>1]|0))i=e<<16>>16;else break}return}function Fr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0;switch(n<<16>>16){case 0:{l=9;while(1){s=Ve[e+(l<<1)>>1]|0;n=s<<16>>16;if(s<<16>>16<0)n=~((n^-4)>>2);else n=n>>>2;a=Ve[r+(l<<1)>>1]|0;o=a<<16>>16;if(a<<16>>16<0)a=~((o^-4)>>2);else a=o>>>2;Ve[t+(l<<1)>>1]=Wt((s&65535)-n&65535,a&65535,i)|0;if((l|0)>0)l=l+-1|0;else break}return}case 40:{a=9;while(1){i=Ve[e+(a<<1)>>1]|0;n=i<<16>>16;if(i<<16>>16<0)o=~((n^-2)>>1);else o=n>>>1;i=Ve[r+(a<<1)>>1]|0;n=i<<16>>16;if(i<<16>>16<0)n=~((n^-2)>>1);else n=n>>>1;Ve[t+(a<<1)>>1]=n+o;if((a|0)>0)a=a+-1|0;else break}return}case 80:{l=9;while(1){s=Ve[e+(l<<1)>>1]|0;n=s<<16>>16;if(s<<16>>16<0)s=~((n^-4)>>2);else s=n>>>2;n=Ve[r+(l<<1)>>1]|0;o=n<<16>>16;if(n<<16>>16<0)a=~((o^-4)>>2);else a=o>>>2;Ve[t+(l<<1)>>1]=Wt(s&65535,(n&65535)-a&65535,i)|0;if((l|0)>0)l=l+-1|0;else break}return}case 120:{Ve[t+18>>1]=Ve[r+18>>1]|0;Ve[t+16>>1]=Ve[r+16>>1]|0;Ve[t+14>>1]=Ve[r+14>>1]|0;Ve[t+12>>1]=Ve[r+12>>1]|0;Ve[t+10>>1]=Ve[r+10>>1]|0;Ve[t+8>>1]=Ve[r+8>>1]|0;Ve[t+6>>1]=Ve[r+6>>1]|0;Ve[t+4>>1]=Ve[r+4>>1]|0;Ve[t+2>>1]=Ve[r+2>>1]|0;Ve[t>>1]=Ve[r>>1]|0;return}default:return}}function ze(e,r){e=e|0;r=r|0;if(!e){e=-1;return e|0}Ki(e|0,r|0,20)|0;e=0;return e|0}function Mr(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0;f=0;do{l=e+(f<<1)|0;t=Ve[l>>1]|0;a=t&65535;s=a<<16;t=t<<16>>16;if((t*5243|0)==1073741824){We[n>>2]=1;o=2147483647}else o=t*10486|0;i=s-o|0;if(((i^s)&(o^s)|0)<0){We[n>>2]=1;o=(a>>>15)+2147483647|0}else o=i;t=Ve[r+(f<<1)>>1]|0;i=t*5243|0;if((i|0)!=1073741824){t=(t*10486|0)+o|0;if((i^o|0)>0&(t^o|0)<0){We[n>>2]=1;t=(o>>>31)+2147483647|0}}else{We[n>>2]=1;t=2147483647}Ve[l>>1]=Ni(t,n)|0;f=f+1|0}while((f|0)!=10);return}function Ye(e){e=e|0;var r=0;if(!e){r=-1;return r|0}r=e+18|0;do{Ve[e>>1]=0;e=e+2|0}while((e|0)<(r|0));r=0;return r|0}function gr(e){e=e|0;Ve[e+14>>1]=1;return}function Rr(e){e=e|0;Ve[e+14>>1]=0;return}function Ar(e,r,n,t,i,o,a,s,l,f){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;var u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0;g=Ge;Ge=Ge+160|0;k=g+80|0;F=g;S=We[l+120>>2]|0;b=We[l+124>>2]|0;v=We[l+128>>2]|0;p=We[l+132>>2]|0;c=e+6|0;E=e+8|0;Ve[E>>1]=Ve[c>>1]|0;w=e+4|0;Ve[c>>1]=Ve[w>>1]|0;m=e+2|0;Ve[w>>1]=Ve[m>>1]|0;Ve[m>>1]=Ve[e>>1]|0;Ve[e>>1]=i;l=i<<16>>16<14746?i<<16>>16>9830&1:2;u=e+12|0;i=Ve[u>>1]|0;d=i<<15;do{if((d|0)<=536870911)if((d|0)<-536870912){We[f>>2]=1;i=-2147483648;break}else{i=i<<17;break}else{We[f>>2]=1;i=2147483647}}while(0);_=t<<16>>16;h=e+16|0;if((Ni(i,f)|0)<<16>>16>=t<<16>>16){d=Ve[h>>1]|0;if(d<<16>>16>0){d=(d&65535)+65535&65535;Ve[h>>1]=d}if(!(d<<16>>16)){i=(Ve[e>>1]|0)<9830;i=(Ve[m>>1]|0)<9830?i?2:1:i&1;if((Ve[w>>1]|0)<9830)i=(i&65535)+1&65535;if((Ve[c>>1]|0)<9830)i=(i&65535)+1&65535;if((Ve[E>>1]|0)<9830)i=(i&65535)+1&65535;d=0;l=i<<16>>16>2?0:l}}else{Ve[h>>1]=2;d=2}m=l<<16>>16;E=e+10|0;m=(d<<16>>16==0?(m|0)>((Ve[E>>1]|0)+1|0):0)?m+65535&65535:l;e=(Ve[e+14>>1]|0)==1?0:t<<16>>16<10?2:m<<16>>16<2&d<<16>>16>0?(m&65535)+1&65535:m;Ve[E>>1]=e;Ve[u>>1]=t;switch(r|0){case 4:case 6:case 7:break;default:if(e<<16>>16<2){d=0;l=0;c=o;u=k;while(1){if(!(Ve[c>>1]|0))i=0;else{l=l<<16>>16;Ve[F+(l<<1)>>1]=d;i=Ve[c>>1]|0;l=l+1&65535}Ve[u>>1]=i;Ve[c>>1]=0;d=d+1<<16>>16;if(d<<16>>16>=40){E=l;break}else{c=c+2|0;u=u+2|0}}m=e<<16>>16==0;m=(r|0)==5?m?S:b:m?v:p;if(E<<16>>16>0){w=0;do{h=Ve[F+(w<<1)>>1]|0;l=h<<16>>16;e=Ve[k+(l<<1)>>1]|0;if(h<<16>>16<40){d=e<<16>>16;c=39-h&65535;u=h;l=o+(l<<1)|0;i=m;while(1){r=(Ze(Ve[i>>1]|0,d)|0)>>>15&65535;Ve[l>>1]=Wt(Ve[l>>1]|0,r,f)|0;u=u+1<<16>>16;if(u<<16>>16>=40)break;else{l=l+2|0;i=i+2|0}}if(h<<16>>16>0){l=m+(c+1<<1)|0;M=36}}else{l=m;M=36}if((M|0)==36){M=0;i=e<<16>>16;d=0;c=o;while(1){r=(Ze(Ve[l>>1]|0,i)|0)>>>15&65535;Ve[c>>1]=Wt(Ve[c>>1]|0,r,f)|0;d=d+1<<16>>16;if(d<<16>>16>=h<<16>>16)break;else{c=c+2|0;l=l+2|0}}}w=w+1|0}while((w&65535)<<16>>16!=E<<16>>16)}}}w=a<<16>>16;m=_<<1;i=s<<16>>16;u=0-i<<16;l=u>>16;if(s<<16>>16>0){d=0;c=n;while(1){e=Ze(Ve[n+(d<<1)>>1]|0,w)|0;if((e|0)==1073741824){We[f>>2]=1;u=2147483647}else u=e<<1;s=Ze(m,Ve[o>>1]|0)|0;e=s+u|0;if((s^u|0)>-1&(e^u|0)<0){We[f>>2]=1;e=(u>>>31)+2147483647|0}s=e<>1]=Ni((s>>i|0)==(e|0)?s:e>>31^2147483647,f)|0;d=d+1|0;if((d|0)==40)break;else{o=o+2|0;c=c+2|0}}Ge=g;return}if((u|0)<2031616){d=0;c=n;while(1){e=Ze(Ve[n+(d<<1)>>1]|0,w)|0;if((e|0)==1073741824){We[f>>2]=1;u=2147483647}else u=e<<1;s=Ze(m,Ve[o>>1]|0)|0;e=s+u|0;if((s^u|0)>-1&(e^u|0)<0){We[f>>2]=1;e=(u>>>31)+2147483647|0}Ve[c>>1]=Ni(e>>l,f)|0;d=d+1|0;if((d|0)==40)break;else{o=o+2|0;c=c+2|0}}Ge=g;return}else{c=0;u=n;while(1){e=Ze(Ve[n+(c<<1)>>1]|0,w)|0;if((e|0)==1073741824){We[f>>2]=1;e=2147483647}else e=e<<1;s=Ze(m,Ve[o>>1]|0)|0;if((s^e|0)>-1&(s+e^e|0)<0)We[f>>2]=1;Ve[u>>1]=Ni(0,f)|0;c=c+1|0;if((c|0)==40)break;else{o=o+2|0;u=u+2|0}}Ge=g;return}}function je(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=0;Ve[e+2>>1]=0;Ve[e+4>>1]=0;Ve[e+6>>1]=0;Ve[e+8>>1]=0;Ve[e+10>>1]=0;e=0;return e|0}function qe(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0;if(n<<16>>16<=0)return;i=e+10|0;l=e+8|0;u=e+4|0;c=e+6|0;d=e+2|0;o=Ve[u>>1]|0;a=Ve[c>>1]|0;s=Ve[e>>1]|0;f=Ve[d>>1]|0;h=0;while(1){w=Ve[i>>1]|0;m=Ve[l>>1]|0;Ve[i>>1]=m;E=Ve[r>>1]|0;Ve[l>>1]=E;w=((E<<16>>16)*7699|0)+((Ze(s<<16>>16,-7667)|0)+(((o<<16>>16)*15836|0)+((a<<16>>16)*15836>>15))+((Ze(f<<16>>16,-7667)|0)>>15))+(Ze(m<<16>>16,-15398)|0)+((w<<16>>16)*7699|0)|0;m=w<<3;w=(m>>3|0)==(w|0)?m:w>>31^2147483647;m=w<<1;Ve[r>>1]=Ni((m>>1|0)==(w|0)?m:w>>31^2147483647,t)|0;s=Ve[u>>1]|0;Ve[e>>1]=s;f=Ve[c>>1]|0;Ve[d>>1]=f;o=w>>>16&65535;Ve[u>>1]=o;a=(w>>>1)-(w>>16<<15)&65535;Ve[c>>1]=a;h=h+1<<16>>16;if(h<<16>>16>=n<<16>>16)break;else r=r+2|0}return}function yr(e){e=e|0;if(!e)e=-1;else{Ve[e>>1]=0;e=0}return e|0}function Or(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0;s=t<<16>>16;o=r+(s+-1<<1)|0;s=s+-2|0;l=Ve[o>>1]|0;if(t<<16>>16<2)t=n<<16>>16;else{t=n<<16>>16;a=0;r=r+(s<<1)|0;while(1){n=(Ze(Ve[r>>1]|0,t)|0)>>15;if((n|0)>32767){We[i>>2]=1;n=32767}Ve[o>>1]=Bi(Ve[o>>1]|0,n&65535,i)|0;o=o+-2|0;a=a+1<<16>>16;if((a<<16>>16|0)>(s|0))break;else r=r+-2|0}}t=(Ze(Ve[e>>1]|0,t)|0)>>15;if((t|0)<=32767){s=t;s=s&65535;a=Ve[o>>1]|0;i=Bi(a,s,i)|0;Ve[o>>1]=i;Ve[e>>1]=l;return}We[i>>2]=1;s=32767;s=s&65535;a=Ve[o>>1]|0;i=Bi(a,s,i)|0;Ve[o>>1]=i;Ve[e>>1]=l;return}function Tr(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}Vi(e+104|0,0,340)|0;r=e+102|0;n=e;t=n+100|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));Me(r)|0;yr(e+100|0)|0;t=0;return t|0}function Dr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0;S=Ge;Ge=Ge+96|0;w=S+22|0;m=S;E=S+44|0;Ki(e+124|0,n|0,320)|0;u=E+22|0;c=e+100|0;d=e+80|0;h=e+102|0;if((r&-2|0)==6){f=0;while(1){Ui(t,702,w);Ui(t,722,m);l=e+104+(f+10<<1)|0;Di(w,l,e,40);a=E;o=w;r=a+22|0;do{Ve[a>>1]=Ve[o>>1]|0;a=a+2|0;o=o+2|0}while((a|0)<(r|0));a=u;r=a+22|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(r|0));Li(m,E,E,22,u,0);r=0;a=21;do{o=Ve[E+(a<<16>>16<<1)>>1]|0;o=Ze(o,o)|0;if((o|0)==1073741824){p=7;break}s=o<<1;o=s+r|0;if((s^r|0)>-1&(o^r|0)<0){We[i>>2]=1;r=(r>>>31)+2147483647|0}else r=o;a=a+-1<<16>>16}while(a<<16>>16>-1);if((p|0)==7){p=0;We[i>>2]=1}s=r>>>16&65535;o=20;r=0;a=20;while(1){o=Ze(Ve[E+(o+1<<1)>>1]|0,Ve[E+(o<<1)>>1]|0)|0;if((o|0)==1073741824){p=13;break}b=o<<1;o=b+r|0;if((b^r|0)>-1&(o^r|0)<0){We[i>>2]=1;r=(r>>>31)+2147483647|0}else r=o;o=(a&65535)+-1<<16>>16;if(o<<16>>16>-1){o=o<<16>>16;a=a+-1|0}else break}if((p|0)==13){p=0;We[i>>2]=1}r=r>>16;if((r|0)<1)r=0;else r=Gt((r*26214|0)>>>15&65535,s)|0;Or(c,e,r,40,i);r=n+(f<<1)|0;Li(m,e,r,40,d,1);ge(h,l,r,29491,40,i);r=(f<<16)+2621440|0;if((r|0)<10485760){f=r>>16;t=t+22|0}else break}a=e+104|0;o=e+424|0;r=a+20|0;do{Ke[a>>0]=Ke[o>>0]|0;a=a+1|0;o=o+1|0}while((a|0)<(r|0));Ge=S;return}else{f=0;while(1){Ui(t,742,w);Ui(t,762,m);l=e+104+(f+10<<1)|0;Di(w,l,e,40);a=E;o=w;r=a+22|0;do{Ve[a>>1]=Ve[o>>1]|0;a=a+2|0;o=o+2|0}while((a|0)<(r|0));a=u;r=a+22|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(r|0));Li(m,E,E,22,u,0);r=0;a=21;do{o=Ve[E+(a<<16>>16<<1)>>1]|0;o=Ze(o,o)|0;if((o|0)==1073741824){p=22;break}b=o<<1;o=b+r|0;if((b^r|0)>-1&(o^r|0)<0){We[i>>2]=1;r=(r>>>31)+2147483647|0}else r=o;a=a+-1<<16>>16}while(a<<16>>16>-1);if((p|0)==22){p=0;We[i>>2]=1}s=r>>>16&65535;o=20;r=0;a=20;while(1){o=Ze(Ve[E+(o+1<<1)>>1]|0,Ve[E+(o<<1)>>1]|0)|0;if((o|0)==1073741824){p=28;break}b=o<<1;o=b+r|0;if((b^r|0)>-1&(o^r|0)<0){We[i>>2]=1;r=(r>>>31)+2147483647|0}else r=o;o=(a&65535)+-1<<16>>16;if(o<<16>>16>-1){o=o<<16>>16;a=a+-1|0}else break}if((p|0)==28){p=0;We[i>>2]=1}r=r>>16;if((r|0)<1)r=0;else r=Gt((r*26214|0)>>>15&65535,s)|0;Or(c,e,r,40,i);r=n+(f<<1)|0;Li(m,e,r,40,d,1);ge(h,l,r,29491,40,i);r=(f<<16)+2621440|0;if((r|0)<10485760){f=r>>16;t=t+22|0}else break}a=e+104|0;o=e+424|0;r=a+20|0;do{Ke[a>>0]=Ke[o>>0]|0;a=a+1|0;o=o+1|0}while((a|0)<(r|0));Ge=S;return}}function Nr(e,r){e=e|0;r=r|0;var n=0,t=0;if(!e){e=-1;return e|0}We[e>>2]=0;n=xi(1764)|0;if(!n){e=-1;return e|0}if((Pe(n)|0)<<16>>16==0?(t=n+1748|0,(je(t)|0)<<16>>16==0):0){sr(n,0)|0;Tr(n+1304|0)|0;je(t)|0;We[n+1760>>2]=0;We[e>>2]=n;e=0;return e|0}r=We[n>>2]|0;if(!r){e=-1;return e|0}Hi(r);We[n>>2]=0;e=-1;return e|0}function Pr(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function Cr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0;p=Ge;Ge=Ge+208|0;E=p+88|0;m=p;w=e+1164|0;o=We[e+1256>>2]|0;if((t+-5|0)>>>0<2){h=o+16|0;if((Ve[h>>1]|0)>0){d=We[(We[e+1260>>2]|0)+32>>2]|0;c=0;o=0;while(1){u=d+(c<<1)|0;l=Ve[u>>1]|0;if(l<<16>>16>0){s=n;f=0;a=0;while(1){a=Xe[s>>1]|a<<1&131070;f=f+1<<16>>16;if(f<<16>>16>=l<<16>>16)break;else s=s+2|0}a=a&65535}else a=0;Ve[E+(c<<1)>>1]=a;o=o+1<<16>>16;if(o<<16>>16<(Ve[h>>1]|0)){n=n+(Ve[u>>1]<<1)|0;c=o<<16>>16}else break}}}else{d=o+(r<<1)|0;if((Ve[d>>1]|0)>0){h=We[(We[e+1260>>2]|0)+(r<<2)>>2]|0;u=0;o=0;while(1){c=h+(u<<1)|0;l=Ve[c>>1]|0;if(l<<16>>16>0){s=n;f=0;a=0;while(1){a=Xe[s>>1]|a<<1&131070;f=f+1<<16>>16;if(f<<16>>16>=l<<16>>16)break;else s=s+2|0}a=a&65535}else a=0;Ve[E+(u<<1)>>1]=a;o=o+1<<16>>16;if(o<<16>>16<(Ve[d>>1]|0)){n=n+(Ve[c>>1]<<1)|0;u=o<<16>>16}else break}}}Ce(e,r,E,t,i,m);Dr(e+1304|0,r,i,m,w);qe(e+1748|0,i,160,w);o=0;do{e=i+(o<<1)|0;Ve[e>>1]=Xe[e>>1]&65528;o=o+1|0}while((o|0)!=160);Ge=p;return}function Ir(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;o=We[t+100>>2]|0;a=(Xe[(We[t+96>>2]|0)+(e<<1)>>1]|0)+65535|0;t=a&65535;i=t<<16>>16>-1;if(e>>>0<8){if(!i)return;o=We[o+(e<<2)>>2]|0;i=a<<16>>16;while(1){Ve[n+(Ve[o+(i<<1)>>1]<<1)>>1]=(l[r+(i>>3)>>0]|0)>>>(i&7^7)&1;t=t+-1<<16>>16;if(t<<16>>16>-1)i=t<<16>>16;else break}return}else{if(!i)return;i=a<<16>>16;while(1){Ve[n+(i<<1)>>1]=(l[r+(i>>3)>>0]|0)>>>(i&7^7)&1;t=t+-1<<16>>16;if(t<<16>>16>-1)i=t<<16>>16;else break}return}}function Br(e,r,n){e=e|0;r=r|0;n=n|0;e=gt(e,n,31764)|0;return((kt(r)|0|e)<<16>>16!=0)<<31>>31|0}function Lr(e,r){e=e|0;r=r|0;Rt(e);Ft(r);return}function Ur(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0;c=Ge;Ge=Ge+512|0;s=c+8|0;l=c+4|0;f=c;We[f>>2]=0;u=a<<16>>16==3;if(!((a&65535)<2|u&1)){if(a<<16>>16!=2){i=-1;Ge=c;return i|0}At(e,n,t,s+2|0,f);e=We[f>>2]|0;We[o>>2]=e;Mt(r,e,l);r=We[l>>2]|0;Ve[s>>1]=r;Ve[s+490>>1]=(r|0)==3?-1:n&65535;Ke[i>>0]=r;r=1;do{s=s+1|0;Ke[i+r>>0]=Ke[s>>0]|0;r=r+1|0}while((r|0)!=492);s=492;Ge=c;return s|0}At(e,n,t,s,f);Mt(r,We[f>>2]|0,l);t=We[l>>2]|0;if((t|0)!=3){r=We[f>>2]|0;We[o>>2]=r;if((r|0)==8){switch(t|0){case 1:{Ve[s+70>>1]=0;break}case 2:{f=s+70|0;Ve[f>>1]=Xe[f>>1]|0|1;break}default:{}}Ve[s+72>>1]=n&1;Ve[s+74>>1]=n>>>1&1;Ve[s+76>>1]=n>>>2&1;r=8}}else{We[o>>2]=15;r=15}if(u){Fn(r,s,i,(We[e+4>>2]|0)+2392|0);i=Ve[3404+(We[o>>2]<<16>>16<<1)>>1]|0;Ge=c;return i|0}switch(a<<16>>16){case 0:{kn(r,s,i,(We[e+4>>2]|0)+2392|0);i=Ve[3404+(We[o>>2]<<16>>16<<1)>>1]|0;Ge=c;return i|0}case 1:{_n(r,s,i,(We[e+4>>2]|0)+2392|0);i=Ve[3436+(We[o>>2]<<16>>16<<1)>>1]|0;Ge=c;return i|0}default:{i=-1;Ge=c;return i|0}}return 0}function xr(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0;k=Ge;Ge=Ge+480|0;_=k;o=240;f=i;l=e;s=_;a=0;while(1){v=((Ze(Ve[f>>1]|0,Ve[l>>1]|0)|0)+16384|0)>>>15;Ve[s>>1]=v;v=v<<16;a=(Ze(v>>15,v>>16)|0)+a|0;if((a|0)<0){u=4;break}o=o+-1|0;if(!((o&65535)<<16>>16)){o=0;break}else{f=f+2|0;l=l+2|0;s=s+2|0}}if((u|0)==4){a=o&65535;s=240-o|0;if(!(a<<16>>16))o=0;else{f=a;l=i+(s<<1)|0;o=e+(s<<1)|0;a=_+(s<<1)|0;while(1){Ve[a>>1]=((Ze(Ve[l>>1]|0,Ve[o>>1]|0)|0)+16384|0)>>>15;f=f+-1<<16>>16;if(!(f<<16>>16)){o=0;break}else{l=l+2|0;o=o+2|0;a=a+2|0}}}do{l=o&65535;o=120;s=_;a=0;while(1){v=(Ve[s>>1]|0)>>>2;S=s+2|0;Ve[s>>1]=v;v=v<<16>>16;v=Ze(v,v)|0;b=(Ve[S>>1]|0)>>>2;Ve[S>>1]=b;b=b<<16>>16;a=((Ze(b,b)|0)+v<<1)+a|0;o=o+-1<<16>>16;if(!(o<<16>>16))break;else s=s+4|0}o=l+4|0}while((a|0)<1)}v=a+1|0;b=(bi(v)|0)<<16>>16;v=v<>1]=v>>>16;Ve[t>>1]=(v>>>1)-(v>>16<<15);v=_+478|0;f=r<<16>>16;if(r<<16>>16<=0){_=b-o|0;_=_&65535;Ge=k;return _|0}m=_+476|0;E=b+1|0;p=239-f|0;S=_+(236-f<<1)|0;r=f;n=n+(f<<1)|0;t=t+(f<<1)|0;while(1){u=Ze((p>>>1)+65535&65535,-2)|0;l=_+(u+236<<1)|0;u=S+(u<<1)|0;i=240-r|0;w=i+-1|0;s=_+(w<<1)|0;e=w>>>1&65535;i=_+(i+-2<<1)|0;f=Ze(Ve[v>>1]|0,Ve[s>>1]|0)|0;if(!(e<<16>>16)){u=i;l=m}else{h=m;d=v;while(1){a=s+-4|0;c=d+-4|0;f=(Ze(Ve[h>>1]|0,Ve[i>>1]|0)|0)+f|0;e=e+-1<<16>>16;f=(Ze(Ve[c>>1]|0,Ve[a>>1]|0)|0)+f|0;if(!(e<<16>>16))break;else{i=s+-6|0;h=d+-6|0;s=a;d=c}}}if(w&1)f=(Ze(Ve[l>>1]|0,Ve[u>>1]|0)|0)+f|0;w=f<>1]=w>>>16;Ve[t>>1]=(w>>>1)-(w>>16<<15);if((r&65535)+-1<<16>>16<<16>>16>0){p=p+1|0;S=S+2|0;r=r+-1|0;n=n+-2|0;t=t+-2|0}else break}_=b-o|0;_=_&65535;Ge=k;return _|0}function Hr(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0;A=Ge;Ge=Ge+3440|0;R=A+3420|0;k=A+3400|0;F=A+3224|0;g=A;v=A+3320|0;M=A+3240|0;_=A+24|0;cn(n,e,v,2,s);_t(v,r,M,F,5,k,5,s);fn(n,M,_,s);bt(10,5,5,v,_,k,F,g,s);r=t;s=r+80|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(s|0));Ve[o>>1]=65535;Ve[o+2>>1]=65535;Ve[o+4>>1]=65535;Ve[o+6>>1]=65535;Ve[o+8>>1]=65535;d=0;h=g;w=R;do{e=Ve[h>>1]|0;h=h+2|0;l=(e*6554|0)>>>15;f=l<<16>>16;r=t+(e<<1)|0;s=Ve[r>>1]|0;if((Ve[M+(e<<1)>>1]|0)>0){Ve[r>>1]=s+4096;Ve[w>>1]=8192;u=l}else{Ve[r>>1]=s+61440;Ve[w>>1]=-8192;u=f+8|0}w=w+2|0;c=u&65535;r=e-(l<<2)-f<<16>>16;l=o+(r<<1)|0;s=Ve[l>>1]|0;e=s<<16>>16;do{if(s<<16>>16>=0){f=u<<16>>16;if(!((f^e)&8)){r=o+(r+5<<1)|0;if((e|0)>(f|0)){Ve[r>>1]=s;Ve[l>>1]=c;break}else{Ve[r>>1]=c;break}}else{r=o+(r+5<<1)|0;if((e&7)>>>0>(f&7)>>>0){Ve[r>>1]=c;break}else{Ve[r>>1]=s;Ve[l>>1]=c;break}}}else Ve[l>>1]=c}while(0);d=d+1<<16>>16}while(d<<16>>16<10);w=R+2|0;d=R+4|0;u=R+6|0;f=R+8|0;l=R+10|0;r=R+12|0;s=R+14|0;e=R+16|0;m=R+18|0;E=40;p=n+(0-(Ve[g>>1]|0)<<1)|0;S=n+(0-(Ve[g+2>>1]|0)<<1)|0;b=n+(0-(Ve[g+4>>1]|0)<<1)|0;v=n+(0-(Ve[g+6>>1]|0)<<1)|0;_=n+(0-(Ve[g+8>>1]|0)<<1)|0;k=n+(0-(Ve[g+10>>1]|0)<<1)|0;F=n+(0-(Ve[g+12>>1]|0)<<1)|0;M=n+(0-(Ve[g+14>>1]|0)<<1)|0;t=n+(0-(Ve[g+16>>1]|0)<<1)|0;h=n+(0-(Ve[g+18>>1]|0)<<1)|0;c=i;while(1){P=(Ze(Ve[R>>1]|0,Ve[p>>1]|0)|0)>>7;N=(Ze(Ve[w>>1]|0,Ve[S>>1]|0)|0)>>7;D=(Ze(Ve[d>>1]|0,Ve[b>>1]|0)|0)>>7;T=(Ze(Ve[u>>1]|0,Ve[v>>1]|0)|0)>>7;O=(Ze(Ve[f>>1]|0,Ve[_>>1]|0)|0)>>7;y=(Ze(Ve[l>>1]|0,Ve[k>>1]|0)|0)>>7;g=(Ze(Ve[r>>1]|0,Ve[F>>1]|0)|0)>>7;n=(Ze(Ve[s>>1]|0,Ve[M>>1]|0)|0)>>>7;i=(Ze(Ve[e>>1]|0,Ve[t>>1]|0)|0)>>>7;Ve[c>>1]=(P+128+N+D+T+O+y+g+n+i+((Ze(Ve[m>>1]|0,Ve[h>>1]|0)|0)>>>7)|0)>>>8;E=E+-1<<16>>16;if(!(E<<16>>16))break;else{p=p+2|0;S=S+2|0;b=b+2|0;v=v+2|0;_=_+2|0;k=k+2|0;F=F+2|0;M=M+2|0;t=t+2|0;h=h+2|0;c=c+2|0}}r=0;do{s=o+(r<<1)|0;e=Ve[s>>1]|0;if((r|0)<5)e=(Xe[a+((e&7)<<1)>>1]|e&8)&65535;else e=Ve[a+((e&7)<<1)>>1]|0;Ve[s>>1]=e;r=r+1|0}while((r|0)!=10);Ge=A;return}function zr(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0;B=Ge;Ge=Ge+3456|0;D=B+3448|0;O=B+3360|0;A=B+3368|0;d=B+3280|0;T=B+3200|0;y=B;P=(t&65535)<<17;I=n<<16>>16;N=n<<16>>16<40;if(N){t=P>>16;n=I;do{f=(Ze(Ve[r+(n-I<<1)>>1]|0,t)|0)>>15;if((f|0)>32767){We[s>>2]=1;f=32767}R=r+(n<<1)|0;Ve[R>>1]=Wt(Ve[R>>1]|0,f&65535,s)|0;n=n+1|0}while((n&65535)<<16>>16!=40)}cn(r,e,A,1,s);vt(A,T,d,8);fn(r,T,y,s);R=O+2|0;Ve[O>>1]=0;Ve[R>>1]=1;e=1;f=0;c=1;d=0;u=-1;do{M=Ve[2830+(d<<1)>>1]|0;g=M<<16>>16;F=0;do{_=Ve[2834+(F<<1)>>1]|0;k=_<<16>>16;v=e;S=g;p=c;b=M;E=u;while(1){l=Ve[A+(S<<1)>>1]|0;w=Ve[y+(S*80|0)+(S<<1)>>1]|0;n=k;c=1;m=_;e=_;u=-1;while(1){t=Wt(l,Ve[A+(n<<1)>>1]|0,s)|0;t=t<<16>>16;t=(Ze(t,t)|0)>>>15;h=(Ve[y+(S*80|0)+(n<<1)>>1]<<15)+32768+((Ve[y+(n*80|0)+(n<<1)>>1]|0)+w<<14)|0;if(((Ze(t<<16>>16,c<<16>>16)|0)-(Ze(h>>16,u<<16>>16)|0)<<1|0)>0){c=h>>>16&65535;e=m;u=t&65535}h=n+5|0;m=h&65535;if(m<<16>>16>=40)break;else n=h<<16>>16}if(((Ze(u<<16>>16,p<<16>>16)|0)-(Ze(c<<16>>16,E<<16>>16)|0)<<1|0)>0){Ve[O>>1]=b;Ve[R>>1]=e;f=b}else{e=v;c=p;u=E}h=S+5|0;b=h&65535;if(b<<16>>16>=40)break;else{v=e;S=h<<16>>16;p=c;E=u}}F=F+1|0}while((F|0)!=4);d=d+1|0}while((d|0)!=2);w=e;m=f;t=i;n=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(n|0));c=m;n=0;h=0;t=0;while(1){f=c<<16>>16;l=Ve[T+(f<<1)>>1]|0;e=(f*6554|0)>>>15;c=e<<16;d=c>>15;u=f-(d+(e<<3)<<16>>17)|0;switch(u<<16>>16|0){case 0:{d=c>>10;e=1;break}case 1:{if(!((n&65535)<<16>>16))e=0;else{d=e<<22>>16|16;e=1}break}case 2:{d=e<<22>>16|32;e=1;break}case 3:{d=e<<17>>16|1;e=0;break}case 4:{d=e<<22>>16|48;e=1;break}default:{d=e;e=u&65535}}d=d&65535;u=i+(f<<1)|0;if(l<<16>>16>0){Ve[u>>1]=8191;Ve[D+(n<<1)>>1]=32767;f=e<<16>>16;if(e<<16>>16<0){f=0-f<<16;if((f|0)<983040)f=1>>>(f>>16)&65535;else f=0}else{y=1<>16>>f|0)==1?y&65535:32767}t=Wt(t,f,s)|0}else{Ve[u>>1]=-8192;Ve[D+(n<<1)>>1]=-32768}f=Wt(h,d,s)|0;n=n+1|0;if((n|0)==2){h=f;break}c=Ve[O+(n<<1)>>1]|0;h=f}Ve[a>>1]=t;d=D+2|0;c=Ve[D>>1]|0;e=0;u=r+(0-(m<<16>>16)<<1)|0;f=r+(0-(w<<16>>16)<<1)|0;do{t=Ze(Ve[u>>1]|0,c)|0;u=u+2|0;if((t|0)!=1073741824?(C=t<<1,!((t|0)>0&(C|0)<0)):0)l=C;else{We[s>>2]=1;l=2147483647}n=Ze(Ve[d>>1]|0,Ve[f>>1]|0)|0;f=f+2|0;if((n|0)!=1073741824){t=(n<<1)+l|0;if((n^l|0)>0&(t^l|0)<0){We[s>>2]=1;t=(l>>>31)+2147483647|0}}else{We[s>>2]=1;t=2147483647}Ve[o+(e<<1)>>1]=Ni(t,s)|0;e=e+1|0}while((e|0)!=40);if(!N){Ge=B;return h|0}n=P>>16;t=I;do{l=(Ze(Ve[i+(t-I<<1)>>1]|0,n)|0)>>15;if((l|0)>32767){We[s>>2]=1;l=32767}o=i+(t<<1)|0;Ve[o>>1]=Wt(Ve[o>>1]|0,l&65535,s)|0;t=t+1|0}while((t&65535)<<16>>16!=40);Ge=B;return h|0}function Yr(e,r,n,t,i,o,a,s,l,f){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;var u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0;v=Ge;Ge=Ge+3456|0;w=v+3360|0;m=v+3368|0;E=v+3280|0;p=v+3200|0;S=v;b=i<<16>>16;d=b<<1;if((d|0)==(b<<17>>16|0))h=d;else{We[f>>2]=1;h=i<<16>>16>0?32767:-32768}b=t<<16>>16;u=t<<16>>16<40;if(u){i=h<<16>>16;c=b;do{t=n+(c<<1)|0;d=(Ze(Ve[n+(c-b<<1)>>1]|0,i)|0)>>15;if((d|0)>32767){We[f>>2]=1;d=32767}Ve[t>>1]=Wt(Ve[t>>1]|0,d&65535,f)|0;c=c+1|0}while((c&65535)<<16>>16!=40)}cn(n,r,m,1,f);vt(m,p,E,8);fn(n,p,S,f);jr(e,m,S,l,w);d=qr(e,w,p,o,n,a,s,f)|0;if(!u){Ge=v;return d|0}c=h<<16>>16;i=b;do{t=o+(i<<1)|0;u=(Ze(Ve[o+(i-b<<1)>>1]|0,c)|0)>>15;if((u|0)>32767){We[f>>2]=1;u=32767}Ve[t>>1]=Wt(Ve[t>>1]|0,u&65535,f)|0;i=i+1|0}while((i&65535)<<16>>16!=40);Ge=v;return d|0}function jr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0;_=i+2|0;Ve[i>>1]=0;Ve[_>>1]=1;b=e<<16>>16<<1;o=1;v=0;e=-1;do{S=(v<<3)+b<<16>>16;l=Ve[t+(S<<1)>>1]|0;S=Ve[t+((S|1)<<1)>>1]|0;a=l<<16>>16;e:do{if(l<<16>>16<40){p=S<<16>>16;if(S<<16>>16<40)E=o;else while(1){if((e<<16>>16|0)<(0-(o<<16>>16)|0)){Ve[i>>1]=l;Ve[_>>1]=S;s=1;e=-1}else s=o;o=a+5|0;l=o&65535;if(l<<16>>16>=40){o=s;break e}else{a=o<<16>>16;o=s}}while(1){w=Ve[n+(a*80|0)+(a<<1)>>1]|0;h=Xe[r+(a<<1)>>1]|0;d=p;o=1;m=S;s=S;f=-1;while(1){c=(Xe[r+(d<<1)>>1]|0)+h<<16>>16;c=(Ze(c,c)|0)>>>15;u=(Ve[n+(a*80|0)+(d<<1)>>1]<<15)+32768+((Ve[n+(d*80|0)+(d<<1)>>1]|0)+w<<14)|0;if(((Ze(c<<16>>16,o<<16>>16)|0)-(Ze(u>>16,f<<16>>16)|0)<<1|0)>0){o=u>>>16&65535;s=m;f=c&65535}u=d+5|0;m=u&65535;if(m<<16>>16>=40)break;else d=u<<16>>16}if(((Ze(f<<16>>16,E<<16>>16)|0)-(Ze(o<<16>>16,e<<16>>16)|0)<<1|0)>0){Ve[i>>1]=l;Ve[_>>1]=s;e=f}else o=E;a=a+5|0;l=a&65535;if(l<<16>>16>=40)break;else{a=a<<16>>16;E=o}}}}while(0);v=v+1|0}while((v|0)!=2);return}function qr(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0;l=t;f=l+80|0;do{Ve[l>>1]=0;l=l+2|0}while((l|0)<(f|0));l=Ve[r>>1]|0;d=(l*6554|0)>>>15;f=d<<16>>16;c=(748250>>>((l+(Ze(f,-5)|0)<<16>>16)+((e<<16>>16)*5|0)|0)&1|0)==0;u=(Ve[n+(l<<1)>>1]|0)>0;h=u?32767:-32768;Ve[t+(l<<1)>>1]=u?8191:-8192;l=r+2|0;e=Ve[l>>1]|0;t=t+(e<<1)|0;if((Ve[n+(e<<1)>>1]|0)>0){Ve[t>>1]=8191;n=32767;t=(u&1|2)&65535}else{Ve[t>>1]=-8192;n=-32768;t=u&1}d=((e*6554|0)>>>15<<3)+(c?d:f+64|0)&65535;Ve[a>>1]=t;c=0;u=i+(0-(Ve[r>>1]|0)<<1)|0;t=i+(0-(Ve[l>>1]|0)<<1)|0;do{l=Ze(h,Ve[u>>1]|0)|0;u=u+2|0;if((l|0)==1073741824){We[s>>2]=1;e=2147483647}else e=l<<1;f=Ze(n,Ve[t>>1]|0)|0;t=t+2|0;if((f|0)!=1073741824){l=(f<<1)+e|0;if((f^e|0)>0&(l^e|0)<0){We[s>>2]=1;l=(e>>>31)+2147483647|0}}else{We[s>>2]=1;l=2147483647}Ve[o+(c<<1)>>1]=Ni(l,s)|0;c=c+1|0}while((c|0)!=40);return d|0}function Kr(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0;Y=Ge;Ge=Ge+3440|0;C=Y+3360|0;I=Y+3280|0;L=Y+3200|0;B=Y;x=(t&65535)<<17;z=n<<16>>16;U=n<<16>>16<40;if(U){n=x>>16;l=z;do{t=(Ze(Ve[r+(l-z<<1)>>1]|0,n)|0)>>15;if((t|0)>32767){We[s>>2]=1;t=32767}P=r+(l<<1)|0;Ve[P>>1]=Wt(Ve[P>>1]|0,t&65535,s)|0;l=l+1|0}while((l&65535)<<16>>16!=40)}cn(r,e,C,1,s);vt(C,L,I,6);fn(r,L,B,s);P=1;f=2;u=1;t=0;l=1;e=-1;c=1;while(1){N=2;w=2;while(1){O=0;T=0;D=c;y=w;while(1){if(T<<16>>16<40){M=D<<16>>16;g=D<<16>>16<40;R=y<<16>>16;A=y<<16>>16<40;k=T<<16>>16;F=T;while(1){if((Ve[I+(k<<1)>>1]|0)>-1){b=Ve[B+(k*80|0)+(k<<1)>>1]|0;if(g){v=Xe[C+(k<<1)>>1]|0;S=M;h=1;_=D;n=D;w=0;d=-1;while(1){E=(Xe[C+(S<<1)>>1]|0)+v|0;p=E<<16>>16;p=(Ze(p,p)|0)>>>15;m=(Ve[B+(k*80|0)+(S<<1)>>1]<<15)+32768+((Ve[B+(S*80|0)+(S<<1)>>1]|0)+b<<14)|0;if(((Ze(p<<16>>16,h<<16>>16)|0)-(Ze(m>>16,d<<16>>16)|0)<<1|0)>0){h=m>>>16&65535;n=_;w=E&65535;d=p&65535}m=S+5|0;_=m&65535;if(_<<16>>16>=40)break;else S=m<<16>>16}}else{h=1;n=D;w=0}if(A){v=w&65535;_=n<<16>>16;S=(h<<16>>16<<14)+32768|0;p=R;w=1;b=y;d=y;h=-1;while(1){E=(Xe[C+(p<<1)>>1]|0)+v<<16>>16;E=(Ze(E,E)|0)>>>15;m=S+(Ve[B+(p*80|0)+(p<<1)>>1]<<12)+((Ve[B+(k*80|0)+(p<<1)>>1]|0)+(Ve[B+(_*80|0)+(p<<1)>>1]|0)<<13)|0;if(((Ze(E<<16>>16,w<<16>>16)|0)-(Ze(m>>16,h<<16>>16)|0)<<1|0)>0){w=m>>>16&65535;d=b;h=E&65535}m=p+5|0;b=m&65535;if(b<<16>>16>=40){S=w;p=h;break}else p=m<<16>>16}}else{S=1;d=y;p=-1}w=Ze(p<<16>>16,l<<16>>16)|0;if((w|0)==1073741824){We[s>>2]=1;m=2147483647}else m=w<<1;w=Ze(S<<16>>16,e<<16>>16)|0;if((w|0)==1073741824){We[s>>2]=1;h=2147483647}else h=w<<1;w=m-h|0;if(((w^m)&(h^m)|0)<0){We[s>>2]=1;w=(m>>>31)+2147483647|0}_=(w|0)>0;f=_?d:f;u=_?n:u;t=_?F:t;l=_?S:l;e=_?p:e}w=k+5|0;F=w&65535;if(F<<16>>16>=40)break;else k=w<<16>>16}}O=O+1<<16>>16;if(O<<16>>16>=3)break;else{A=y;y=D;D=T;T=A}}n=N+2|0;w=n&65535;if(w<<16>>16>=5)break;else N=n&65535}n=P+2|0;c=n&65535;if(c<<16>>16<4)P=n&65535;else{w=f;f=u;break}}n=i;l=n+80|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(l|0));p=t<<16>>16;e=Ve[L+(p<<1)>>1]|0;t=(p*6554|0)>>>15;n=t<<16;l=p-(((n>>16)*327680|0)>>>16)|0;switch(l<<16>>16|0){case 1:{t=n>>12;break}case 2:{t=n>>8;l=2;break}case 3:{t=t<<20>>16|8;l=1;break}case 4:{t=t<<24>>16|128;l=2;break}default:{}}n=i+(p<<1)|0;if(e<<16>>16>0){Ve[n>>1]=8191;_=32767;u=65536<<(l<<16>>16)>>>16&65535}else{Ve[n>>1]=-8192;_=-32768;u=0}m=f<<16>>16;f=Ve[L+(m<<1)>>1]|0;n=(m*6554|0)>>>15;l=n<<16;e=m-(((l>>16)*327680|0)>>>16)|0;switch(e<<16>>16|0){case 1:{n=l>>12;break}case 2:{n=l>>8;e=2;break}case 3:{n=n<<20>>16|8;e=1;break}case 4:{n=n<<24>>16|128;e=2;break}default:{}}l=i+(m<<1)|0;if(f<<16>>16>0){Ve[l>>1]=8191;E=32767;u=(65536<<(e<<16>>16)>>>16)+(u&65535)&65535}else{Ve[l>>1]=-8192;E=-32768}c=n+t|0;h=w<<16>>16;f=Ve[L+(h<<1)>>1]|0;t=(h*6554|0)>>>15;n=t<<16;l=h-(((n>>16)*327680|0)>>>16)|0;switch(l<<16>>16|0){case 1:{n=n>>12;break}case 2:{n=n>>8;l=2;break}case 3:{n=t<<20>>16|8;l=1;break}case 4:{n=t<<24>>16|128;l=2;break}default:n=t}t=i+(h<<1)|0;if(f<<16>>16>0){Ve[t>>1]=8191;w=32767;t=(65536<<(l<<16>>16)>>>16)+(u&65535)&65535}else{Ve[t>>1]=-8192;w=-32768;t=u}d=c+n|0;Ve[a>>1]=t;u=0;c=r+(0-p<<1)|0;e=r+(0-m<<1)|0;f=r+(0-h<<1)|0;do{t=Ze(Ve[c>>1]|0,_)|0;c=c+2|0;if((t|0)!=1073741824?(H=t<<1,!((t|0)>0&(H|0)<0)):0)l=H;else{We[s>>2]=1;l=2147483647}t=Ze(Ve[e>>1]|0,E)|0;e=e+2|0;if((t|0)!=1073741824){n=(t<<1)+l|0;if((t^l|0)>0&(n^l|0)<0){We[s>>2]=1;n=(l>>>31)+2147483647|0}}else{We[s>>2]=1;n=2147483647}l=Ze(Ve[f>>1]|0,w)|0;f=f+2|0;if((l|0)!=1073741824){t=(l<<1)+n|0;if((l^n|0)>0&(t^n|0)<0){We[s>>2]=1;t=(n>>>31)+2147483647|0}}else{We[s>>2]=1;t=2147483647}Ve[o+(u<<1)>>1]=Ni(t,s)|0;u=u+1|0}while((u|0)!=40);t=d&65535;if(!U){Ge=Y;return t|0}l=x>>16;n=z;do{e=(Ze(Ve[i+(n-z<<1)>>1]|0,l)|0)>>15;if((e|0)>32767){We[s>>2]=1;e=32767}o=i+(n<<1)|0;Ve[o>>1]=Wt(Ve[o>>1]|0,e&65535,s)|0;n=n+1|0}while((n&65535)<<16>>16!=40);Ge=Y;return t|0}function Vr(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;var f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0;Q=Ge;Ge=Ge+3456|0;W=Q+3448|0;K=Q+3360|0;Y=Q+3368|0;j=Q+3280|0;V=Q+3200|0;q=Q;G=(t&65535)<<17;J=n<<16>>16;X=n<<16>>16<40;if(X){n=G>>16;f=J;do{t=(Ze(Ve[r+(f-J<<1)>>1]|0,n)|0)>>15;if((t|0)>32767){We[l>>2]=1;t=32767}z=r+(f<<1)|0;Ve[z>>1]=Wt(Ve[z>>1]|0,t&65535,l)|0;f=f+1|0}while((f&65535)<<16>>16!=40)}cn(r,e,Y,1,l);vt(Y,V,j,4);fn(r,V,q,l);x=K+2|0;Ve[K>>1]=0;H=K+4|0;Ve[x>>1]=1;z=K+6|0;Ve[H>>1]=2;Ve[z>>1]=3;h=3;c=2;u=1;t=0;n=1;f=-1;d=3;do{C=0;I=0;B=d;L=1;U=2;while(1){if(I<<16>>16<40){y=L<<16>>16;O=L<<16>>16<40;T=U<<16>>16;D=U<<16>>16<40;N=B<<16>>16;P=B<<16>>16<40;A=I<<16>>16;R=c;M=u;F=n;g=I;while(1){if((Ve[j+(A<<1)>>1]|0)>-1){m=Ve[q+(A*80|0)+(A<<1)>>1]|0;if(O){w=Xe[Y+(A<<1)>>1]|0;E=y;_=1;c=L;u=L;b=0;v=-1;while(1){S=(Xe[Y+(E<<1)>>1]|0)+w|0;p=S<<16>>16;p=(Ze(p,p)|0)>>>15;k=(Ve[q+(A*80|0)+(E<<1)>>1]<<15)+32768+((Ve[q+(E*80|0)+(E<<1)>>1]|0)+m<<14)|0;if(((Ze(p<<16>>16,_<<16>>16)|0)-(Ze(k>>16,v<<16>>16)|0)<<1|0)>0){_=k>>>16&65535;u=c;b=S&65535;v=p&65535}k=E+5|0;c=k&65535;if(c<<16>>16>=40)break;else E=k<<16>>16}}else{_=1;u=L;b=0}if(D){n=b&65535;e=u<<16>>16;m=(_<<16>>16<<14)+32768|0;E=T;k=1;w=U;c=U;v=0;b=-1;while(1){S=(Xe[Y+(E<<1)>>1]|0)+n|0;p=S<<16>>16;p=(Ze(p,p)|0)>>>15;_=m+(Ve[q+(E*80|0)+(E<<1)>>1]<<12)+((Ve[q+(A*80|0)+(E<<1)>>1]|0)+(Ve[q+(e*80|0)+(E<<1)>>1]|0)<<13)|0;if(((Ze(p<<16>>16,k<<16>>16)|0)-(Ze(_>>16,b<<16>>16)|0)<<1|0)>0){k=_>>>16&65535;c=w;v=S&65535;b=p&65535}_=E+5|0;w=_&65535;if(w<<16>>16>=40)break;else E=_<<16>>16}}else{k=1;c=U;v=0}if(P){m=v&65535;w=c<<16>>16;e=u<<16>>16;p=(k&65535)<<16|32768;S=N;n=1;E=B;_=B;k=-1;while(1){b=(Xe[Y+(S<<1)>>1]|0)+m<<16>>16;b=(Ze(b,b)|0)>>>15;v=(Ve[q+(S*80|0)+(S<<1)>>1]<<12)+p+((Ve[q+(e*80|0)+(S<<1)>>1]|0)+(Ve[q+(w*80|0)+(S<<1)>>1]|0)+(Ve[q+(A*80|0)+(S<<1)>>1]|0)<<13)|0;if(((Ze(b<<16>>16,n<<16>>16)|0)-(Ze(v>>16,k<<16>>16)|0)<<1|0)>0){n=v>>>16&65535;_=E;k=b&65535}v=S+5|0;E=v&65535;if(E<<16>>16>=40)break;else S=v<<16>>16}}else{n=1;_=B;k=-1}if(((Ze(k<<16>>16,F<<16>>16)|0)-(Ze(n<<16>>16,f<<16>>16)|0)<<1|0)>0){Ve[K>>1]=g;Ve[x>>1]=u;Ve[H>>1]=c;Ve[z>>1]=_;h=_;t=g;f=k}else{c=R;u=M;n=F}}else{c=R;u=M;n=F}S=A+5|0;g=S&65535;if(g<<16>>16>=40)break;else{A=S<<16>>16;R=c;M=u;F=n}}}C=C+1<<16>>16;if(C<<16>>16>=4)break;else{N=U;P=B;U=L;L=I;B=N;I=P}}d=d+1<<16>>16}while(d<<16>>16<5);k=h;_=c;v=u;b=t;t=i;n=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(n|0));e=b;n=0;f=0;t=0;while(1){c=e<<16>>16;d=Ve[V+(c<<1)>>1]|0;e=c*13108>>16;u=c-((e*327680|0)>>>16)|0;e=Ve[s+(e<<1)>>1]|0;switch(u<<16>>16|0){case 1:{h=e<<16>>16<<3&65535;break}case 2:{h=e<<16>>16<<6&65535;break}case 3:{h=e<<16>>16<<10&65535;break}case 4:{h=((e&65535)<<10|512)&65535;u=3;break}default:h=e}e=i+(c<<1)|0;if(d<<16>>16>0){Ve[e>>1]=8191;e=32767;t=(65536<<(u<<16>>16)>>>16)+(t&65535)&65535}else{Ve[e>>1]=-8192;e=-32768}Ve[W+(n<<1)>>1]=e;f=(h&65535)+(f&65535)|0;n=n+1|0;if((n|0)==4){S=f;break}e=Ve[K+(n<<1)>>1]|0}Ve[a>>1]=t;m=W+2|0;E=W+4|0;p=W+6|0;e=Ve[W>>1]|0;w=0;u=r+(0-(b<<16>>16)<<1)|0;c=r+(0-(v<<16>>16)<<1)|0;d=r+(0-(_<<16>>16)<<1)|0;h=r+(0-(k<<16>>16)<<1)|0;do{t=Ze(Ve[u>>1]|0,e)|0;u=u+2|0;if((t|0)!=1073741824?(Z=t<<1,!((t|0)>0&(Z|0)<0)):0)f=Z;else{We[l>>2]=1;f=2147483647}t=Ze(Ve[m>>1]|0,Ve[c>>1]|0)|0;c=c+2|0;if((t|0)!=1073741824){n=(t<<1)+f|0;if((t^f|0)>0&(n^f|0)<0){We[l>>2]=1;n=(f>>>31)+2147483647|0}}else{We[l>>2]=1;n=2147483647}t=Ze(Ve[E>>1]|0,Ve[d>>1]|0)|0;d=d+2|0;if((t|0)!=1073741824){f=(t<<1)+n|0;if((t^n|0)>0&(f^n|0)<0){We[l>>2]=1;f=(n>>>31)+2147483647|0}}else{We[l>>2]=1;f=2147483647}n=Ze(Ve[p>>1]|0,Ve[h>>1]|0)|0;h=h+2|0;if((n|0)!=1073741824){t=(n<<1)+f|0;if((n^f|0)>0&(t^f|0)<0){We[l>>2]=1;t=(f>>>31)+2147483647|0}}else{We[l>>2]=1;t=2147483647}Ve[o+(w<<1)>>1]=Ni(t,l)|0;w=w+1|0}while((w|0)!=40);t=S&65535;if(((J<<16)+-2621440|0)>-1|X^1){Ge=Q;return t|0}f=G>>16;n=J;do{e=(Ze(Ve[i+(n-J<<1)>>1]|0,f)|0)>>15;if((e|0)>32767){We[l>>2]=1;e=32767}o=i+(n<<1)|0;Ve[o>>1]=Wt(Ve[o>>1]|0,e&65535,l)|0;n=n+1|0}while((n&65535)<<16>>16!=40);Ge=Q;return t|0}function Wr(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0;P=Ge;Ge=Ge+3440|0;m=P+3424|0;y=P+3408|0;O=P+3240|0;E=P+3224|0;R=P+3328|0;w=P+3248|0;A=P+24|0;N=P+16|0;D=P;un(n,e,R,2,4,4,a);_t(R,r,w,O,4,y,4,a);fn(n,w,A,a);bt(8,4,4,R,A,y,O,E,a);r=t;e=r+80|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(e|0));Ve[D>>1]=-1;Ve[N>>1]=-1;M=D+2|0;Ve[M>>1]=-1;g=N+2|0;Ve[g>>1]=-1;R=D+4|0;Ve[R>>1]=-1;A=N+4|0;Ve[A>>1]=-1;O=D+6|0;Ve[O>>1]=-1;y=N+6|0;Ve[y>>1]=-1;d=0;do{u=Ve[E+(d<<1)>>1]|0;r=u>>>2;l=r&65535;e=u&3;f=(Ve[w+(u<<1)>>1]|0)>0;u=t+(u<<1)|0;h=f&1^1;Ve[u>>1]=(Xe[u>>1]|0)+(f?8191:57345);Ve[m+(d<<1)>>1]=f?32767:-32768;f=D+(e<<1)|0;u=Ve[f>>1]|0;do{if(u<<16>>16>=0){c=N+(e<<1)|0;s=(u<<16>>16|0)<=(r<<16>>16|0);r=D+((e|4)<<1)|0;if((h&65535|0)==(Xe[c>>1]&1|0))if(s){Ve[r>>1]=l;break}else{Ve[r>>1]=u;Ve[f>>1]=l;Ve[c>>1]=h;break}else if(s){Ve[r>>1]=u;Ve[f>>1]=l;Ve[c>>1]=h;break}else{Ve[r>>1]=l;break}}else{Ve[f>>1]=l;Ve[N+(e<<1)>>1]=h}}while(0);d=d+1|0}while((d|0)!=8);p=m+2|0;S=m+4|0;b=m+6|0;v=m+8|0;_=m+10|0;k=m+12|0;F=m+14|0;m=Ve[m>>1]|0;d=0;c=n+(0-(Ve[E>>1]|0)<<1)|0;u=n+(0-(Ve[E+2>>1]|0)<<1)|0;f=n+(0-(Ve[E+4>>1]|0)<<1)|0;l=n+(0-(Ve[E+6>>1]|0)<<1)|0;r=n+(0-(Ve[E+8>>1]|0)<<1)|0;e=n+(0-(Ve[E+10>>1]|0)<<1)|0;s=n+(0-(Ve[E+12>>1]|0)<<1)|0;n=n+(0-(Ve[E+14>>1]|0)<<1)|0;do{h=Ze(Ve[c>>1]|0,m)|0;c=c+2|0;if((h|0)!=1073741824?(T=h<<1,!((h|0)>0&(T|0)<0)):0)h=T;else{We[a>>2]=1;h=2147483647}w=Ze(Ve[p>>1]|0,Ve[u>>1]|0)|0;u=u+2|0;if((w|0)!=1073741824){t=(w<<1)+h|0;if((w^h|0)>0&(t^h|0)<0){We[a>>2]=1;h=(h>>>31)+2147483647|0}else h=t}else{We[a>>2]=1;h=2147483647}w=Ze(Ve[S>>1]|0,Ve[f>>1]|0)|0;f=f+2|0;if((w|0)!=1073741824){t=(w<<1)+h|0;if((w^h|0)>0&(t^h|0)<0){We[a>>2]=1;t=(h>>>31)+2147483647|0}}else{We[a>>2]=1;t=2147483647}w=Ze(Ve[b>>1]|0,Ve[l>>1]|0)|0;l=l+2|0;if((w|0)!=1073741824){h=(w<<1)+t|0;if((w^t|0)>0&(h^t|0)<0){We[a>>2]=1;h=(t>>>31)+2147483647|0}}else{We[a>>2]=1;h=2147483647}w=Ze(Ve[v>>1]|0,Ve[r>>1]|0)|0;r=r+2|0;if((w|0)!=1073741824){t=(w<<1)+h|0;if((w^h|0)>0&(t^h|0)<0){We[a>>2]=1;t=(h>>>31)+2147483647|0}}else{We[a>>2]=1;t=2147483647}w=Ze(Ve[_>>1]|0,Ve[e>>1]|0)|0;e=e+2|0;if((w|0)!=1073741824){h=(w<<1)+t|0;if((w^t|0)>0&(h^t|0)<0){We[a>>2]=1;h=(t>>>31)+2147483647|0}}else{We[a>>2]=1;h=2147483647}w=Ze(Ve[k>>1]|0,Ve[s>>1]|0)|0;s=s+2|0;if((w|0)!=1073741824){t=(w<<1)+h|0;if((w^h|0)>0&(t^h|0)<0){We[a>>2]=1;t=(h>>>31)+2147483647|0}}else{We[a>>2]=1;t=2147483647}w=Ze(Ve[F>>1]|0,Ve[n>>1]|0)|0;n=n+2|0;if((w|0)!=1073741824){h=(w<<1)+t|0;if((w^t|0)>0&(h^t|0)<0){We[a>>2]=1;h=(t>>>31)+2147483647|0}}else{We[a>>2]=1;h=2147483647}Ve[i+(d<<1)>>1]=Ni(h,a)|0;d=d+1|0}while((d|0)!=40);Ve[o>>1]=Ve[N>>1]|0;Ve[o+2>>1]=Ve[g>>1]|0;Ve[o+4>>1]=Ve[A>>1]|0;Ve[o+6>>1]=Ve[y>>1]|0;e=Ve[D>>1]|0;r=Ve[D+8>>1]|0;s=Ve[M>>1]|0;Ve[o+8>>1]=r<<1&2|e&1|s<<2&4|(((r>>1)*327680|0)+(e>>>1<<16)+(Ze(s>>1,1638400)|0)|0)>>>13&65528;s=Ve[R>>1]|0;e=Ve[D+12>>1]|0;r=Ve[D+10>>1]|0;Ve[o+10>>1]=e<<1&2|s&1|r<<2&4|(((e>>1)*327680|0)+(s>>>1<<16)+(Ze(r>>1,1638400)|0)|0)>>>13&65528;r=Ve[D+14>>1]|0;s=Ve[O>>1]|0;e=s<<16>>16>>>1;if(!(r&2)){i=e;a=r<<16>>16;N=a>>1;N=N*327680|0;i=i<<16;N=i+N|0;N=N<<5;N=N>>16;N=N|12;N=N*2622|0;N=N>>>16;i=s&65535;i=i&1;a=a<<17;a=a&131072;N=N<<18;a=N|a;a=a>>>16;i=a|i;i=i&65535;o=o+12|0;Ve[o>>1]=i;Ge=P;return}i=4-(e<<16>>16)|0;a=r<<16>>16;N=a>>1;N=N*327680|0;i=i<<16;N=i+N|0;N=N<<5;N=N>>16;N=N|12;N=N*2622|0;N=N>>>16;i=s&65535;i=i&1;a=a<<17;a=a&131072;N=N<<18;a=N|a;a=a>>>16;i=a|i;i=i&65535;o=o+12|0;Ve[o>>1]=i;Ge=P;return}function Xr(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0;m=n<<16>>16;o=0-m|0;n=i+(o<<2)|0;i=((m-(t<<16>>16)|0)>>>2)+1&65535;if(i<<16>>16<=0)return;m=r<<16>>16>>>1&65535;if(!(m<<16>>16)){while(1){We[n>>2]=0;We[n+4>>2]=0;We[n+8>>2]=0;We[n+12>>2]=0;if(i<<16>>16>1){n=n+16|0;i=i+-1<<16>>16}else break}return}w=e+(o<<1)|0;while(1){f=w+4|0;c=Ve[f>>1]|0;s=Ve[w>>1]|0;u=c;l=m;d=e;h=w;w=w+8|0;a=0;o=0;t=0;r=0;while(1){p=Ve[d>>1]|0;E=(Ze(s<<16>>16,p)|0)+a|0;a=Ve[h+2>>1]|0;o=(Ze(a,p)|0)+o|0;s=(Ze(u<<16>>16,p)|0)+t|0;t=Ve[h+6>>1]|0;u=(Ze(t,p)|0)+r|0;r=Ve[d+2>>1]|0;a=E+(Ze(r,a)|0)|0;o=o+(Ze(c<<16>>16,r)|0)|0;f=f+4|0;t=s+(Ze(r,t)|0)|0;s=Ve[f>>1]|0;r=u+(Ze(s<<16>>16,r)|0)|0;l=l+-1<<16>>16;if(!(l<<16>>16))break;p=c;u=s;c=Ve[h+8>>1]|0;d=d+4|0;h=h+4|0;s=p}We[n>>2]=a<<1;We[n+4>>2]=o<<1;We[n+8>>2]=t<<1;We[n+12>>2]=r<<1;if(i<<16>>16<=1)break;else{n=n+16|0;i=i+-1<<16>>16}}return}function Gr(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;var f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0;v=Ge;Ge=Ge+16|0;S=v+2|0;b=v;do{if(i<<16>>16>0){w=t<<16>>16;E=0;c=0;t=0;u=0;m=0;while(1){f=Ve[e+(E<<1)>>1]|0;d=f<<16>>16;c=(Ze(d,d)|0)+c|0;d=Ve[r+(E<<1)>>1]|0;t=(Ze(d,d)|0)+t|0;u=(Ze(Ve[n+(E<<1)>>1]|0,d)|0)+u|0;d=Ze(d,w)|0;if((d|0)==1073741824){We[l>>2]=1;h=2147483647}else h=d<<1;d=h<<1;d=(Bi(f,Ni((d>>1|0)==(h|0)?d:h>>31^2147483647,l)|0,l)|0)<<16>>16;d=Ze(d,d)|0;if((d|0)!=1073741824){f=(d<<1)+m|0;if((d^m|0)>0&(f^m|0)<0){We[l>>2]=1;f=(m>>>31)+2147483647|0}}else{We[l>>2]=1;f=2147483647}E=E+1|0;if((E&65535)<<16>>16==i<<16>>16){m=f;break}else m=f}c=c<<1;t=t<<1;u=u<<1;if((c|0)>=0){if((c|0)<400){f=m;p=14;break}}else{We[l>>2]=1;c=2147483647}h=bi(c)|0;d=h<<16>>16;if(h<<16>>16>0){f=c<>d|0)!=(c|0))f=c>>31^2147483647}else{f=0-d<<16;if((f|0)<2031616)f=c>>(f>>16);else f=0}Ve[o>>1]=f>>>16;c=t;w=u;f=m;t=15-(h&65535)&65535}else{t=0;u=0;f=0;p=14}}while(0);if((p|0)==14){Ve[o>>1]=0;c=t;w=u;t=-15}Ve[a>>1]=t;if((c|0)<0){We[l>>2]=1;c=2147483647}d=bi(c)|0;u=d<<16>>16;if(d<<16>>16>0){t=c<>u|0)!=(c|0))t=c>>31^2147483647}else{t=0-u<<16;if((t|0)<2031616)t=c>>(t>>16);else t=0}Ve[o+2>>1]=t>>>16;Ve[a+2>>1]=15-(d&65535);c=bi(w)|0;u=c<<16>>16;if(c<<16>>16>0){t=w<>u|0)!=(w|0))t=w>>31^2147483647}else{t=0-u<<16;if((t|0)<2031616)t=w>>(t>>16);else t=0}Ve[o+4>>1]=t>>>16;Ve[a+4>>1]=2-(c&65535);c=bi(f)|0;t=c<<16>>16;if(c<<16>>16>0){u=f<>t|0)!=(f|0))u=f>>31^2147483647}else{t=0-t<<16;if((t|0)<2031616)u=f>>(t>>16);else u=0}t=u>>>16&65535;f=15-(c&65535)&65535;Ve[o+6>>1]=t;Ve[a+6>>1]=f;if((u>>16|0)<=0){l=0;Ve[s>>1]=l;Ge=v;return}u=Ve[o>>1]|0;if(!(u<<16>>16)){l=0;Ve[s>>1]=l;Ge=v;return}t=Gt(Pi(u,1,l)|0,t)|0;t=(t&65535)<<16;u=((Bi(f,Ve[a>>1]|0,l)|0)&65535)+3|0;f=u&65535;u=u<<16>>16;if(f<<16>>16>0)f=f<<16>>16<31?t>>u:0;else{a=0-u<<16>>16;f=t<>a|0)==(t|0)?f:t>>31^2147483647}si(f,S,b,l);b=Un((Xe[S>>1]|0)+65509&65535,Ve[b>>1]|0,l)|0;S=b<<13;l=Ni((S>>13|0)==(b|0)?S:b>>31^2147483647,l)|0;Ve[s>>1]=l;Ge=v;return}function Zr(e,r,n,t,i,o,a,s,l,f,u){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;var c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0;v=Ge;Ge=Ge+80|0;p=v;Ve[a>>1]=Ve[o>>1]|0;Ve[s>>1]=Ve[o+2>>1]|0;h=Ve[o+4>>1]|0;if(h<<16>>16==-32768)h=32767;else h=0-(h&65535)&65535;Ve[a+2>>1]=h;Ve[s+2>>1]=(Xe[o+6>>1]|0)+1;switch(e|0){case 0:case 5:{E=0;d=0;c=0;m=0;break}default:{E=0;d=1;c=1;m=1}}while(1){w=(Ve[i+(E<<1)>>1]|0)>>>3;Ve[p+(E<<1)>>1]=w;w=w<<16>>16;h=Ze(w,w)|0;if((h|0)!=1073741824){o=(h<<1)+d|0;if((h^d|0)>0&(o^d|0)<0){We[u>>2]=1;d=(d>>>31)+2147483647|0}else d=o}else{We[u>>2]=1;d=2147483647}h=Ze(Ve[r+(E<<1)>>1]|0,w)|0;if((h|0)!=1073741824){o=(h<<1)+c|0;if((h^c|0)>0&(o^c|0)<0){We[u>>2]=1;c=(c>>>31)+2147483647|0}else c=o}else{We[u>>2]=1;c=2147483647}h=Ze(Ve[t+(E<<1)>>1]|0,w)|0;if((h|0)!=1073741824){o=(h<<1)+m|0;if((h^m|0)>0&(o^m|0)<0){We[u>>2]=1;o=(m>>>31)+2147483647|0}}else{We[u>>2]=1;o=2147483647}E=E+1|0;if((E|0)==40){t=o;w=c;break}else m=o}c=bi(d)|0;o=c<<16>>16;if(c<<16>>16>0){h=d<>o|0)!=(d|0))h=d>>31^2147483647}else{h=0-o<<16;if((h|0)<2031616)h=d>>(h>>16);else h=0}i=a+4|0;Ve[i>>1]=h>>>16;r=s+4|0;Ve[r>>1]=-3-(c&65535);d=bi(w)|0;o=d<<16>>16;if(d<<16>>16>0){h=w<>o|0)!=(w|0))h=w>>31^2147483647}else{h=0-o<<16;if((h|0)<2031616)h=w>>(h>>16);else h=0}o=h>>>16;Ve[a+6>>1]=(o|0)==32768?32767:0-o&65535;Ve[s+6>>1]=7-(d&65535);d=bi(t)|0;o=d<<16>>16;if(d<<16>>16>0){h=t<>o|0)!=(t|0))h=t>>31^2147483647}else{h=0-o<<16;if((h|0)<2031616)h=t>>(h>>16);else h=0}Ve[a+8>>1]=h>>>16;Ve[s+8>>1]=7-(d&65535);switch(e|0){case 0:case 5:{h=0;c=0;break}default:{Ge=v;return}}do{c=(Ze(Ve[p+(h<<1)>>1]|0,Ve[n+(h<<1)>>1]|0)|0)+c|0;h=h+1|0}while((h|0)!=40);o=c<<1;h=bi(o)|0;d=h<<16>>16;if(h<<16>>16>0){c=o<>d|0)==(o|0)){S=c;b=40}else{S=o>>31^2147483647;b=40}}else{c=0-d<<16;if((c|0)<2031616){S=o>>(c>>16);b=40}}if((b|0)==40?(S>>16|0)>=1:0){u=Pi(S>>>16&65535,1,u)|0;Ve[l>>1]=Gt(u,Ve[i>>1]|0)|0;Ve[f>>1]=65528-(h&65535)-(Xe[r>>1]|0);Ge=v;return}Ve[l>>1]=0;Ve[f>>1]=0;Ge=v;return}function Jr(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;o=0;i=0;do{a=Ve[e+(o<<1)>>1]|0;i=(Ze(a,a)|0)+i|0;o=o+1|0}while((o|0)!=40);if((i|0)<0){We[t>>2]=1;i=2147483647}t=bi(i)|0;e=t<<16>>16;if(t<<16>>16>0){o=i<>e|0)==(i|0))i=o;else i=i>>31^2147483647}else{e=0-e<<16;if((e|0)<2031616)i=i>>(e>>16);else i=0}Ve[n>>1]=i>>>16;Ve[r>>1]=16-(t&65535);return}function Qr(e,r,n,t,i,o,a,s,l,f,u,c,d){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;var h=0,w=0,m=0,E=0;w=Ge;Ge=Ge+16|0;h=w;if(f>>>0<2){a=Yr(u,e,r,n,t,a,s,h,We[c+76>>2]|0,d)|0;d=We[l>>2]|0;Ve[d>>1]=a;a=Ve[h>>1]|0;We[l>>2]=d+4;Ve[d+2>>1]=a;Ge=w;return}switch(f|0){case 2:{a=zr(e,r,n,t,a,s,h,d)|0;d=We[l>>2]|0;Ve[d>>1]=a;a=Ve[h>>1]|0;We[l>>2]=d+4;Ve[d+2>>1]=a;Ge=w;return}case 3:{a=Kr(e,r,n,t,a,s,h,d)|0;d=We[l>>2]|0;Ve[d>>1]=a;a=Ve[h>>1]|0;We[l>>2]=d+4;Ve[d+2>>1]=a;Ge=w;return}default:{if((f&-2|0)==4){a=Vr(e,r,n,t,a,s,h,We[c+36>>2]|0,d)|0;d=We[l>>2]|0;Ve[d>>1]=a;a=Ve[h>>1]|0;We[l>>2]=d+4;Ve[d+2>>1]=a;Ge=w;return}if((f|0)!=6){u=i<<16>>16;u=(u<<17>>17|0)==(u|0)?u<<1:u>>>15^32767;i=n<<16>>16<40;if(!i){Hr(e,o,r,a,s,We[l>>2]|0,We[c+36>>2]|0,d);We[l>>2]=(We[l>>2]|0)+20;Ge=w;return}h=n<<16>>16;f=u<<16>>16;t=h;do{E=(Ze(Ve[r+(t-h<<1)>>1]|0,f)|0)>>>15&65535;m=r+(t<<1)|0;Ve[m>>1]=Wt(Ve[m>>1]|0,E,d)|0;t=t+1|0}while((t&65535)<<16>>16!=40);Hr(e,o,r,a,s,We[l>>2]|0,We[c+36>>2]|0,d);We[l>>2]=(We[l>>2]|0)+20;if(!i){Ge=w;return}i=n<<16>>16;f=u<<16>>16;h=i;do{t=(Ze(Ve[a+(h-i<<1)>>1]|0,f)|0)>>15;if((t|0)>32767){We[d>>2]=1;t=32767}E=a+(h<<1)|0;Ve[E>>1]=Wt(Ve[E>>1]|0,t&65535,d)|0;h=h+1|0}while((h&65535)<<16>>16!=40);Ge=w;return}c=t<<16>>16;c=(c<<17>>17|0)==(c|0)?c<<1:c>>>15^32767;u=n<<16>>16<40;if(!u){Wr(e,o,r,a,s,We[l>>2]|0,d);We[l>>2]=(We[l>>2]|0)+14;Ge=w;return}h=n<<16>>16;f=c<<16>>16;t=h;do{i=(Ze(Ve[r+(t-h<<1)>>1]|0,f)|0)>>15;if((i|0)>32767){We[d>>2]=1;i=32767}E=r+(t<<1)|0;Ve[E>>1]=Wt(Ve[E>>1]|0,i&65535,d)|0;t=t+1|0}while((t&65535)<<16>>16!=40);Wr(e,o,r,a,s,We[l>>2]|0,d);We[l>>2]=(We[l>>2]|0)+14;if(!u){Ge=w;return}i=n<<16>>16;f=c<<16>>16;h=i;do{t=(Ze(Ve[a+(h-i<<1)>>1]|0,f)|0)>>15;if((t|0)>32767){We[d>>2]=1;t=32767}E=a+(h<<1)|0;Ve[E>>1]=Wt(Ve[E>>1]|0,t&65535,d)|0;h=h+1|0}while((h&65535)<<16>>16!=40);Ge=w;return}}}function $r(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(4)|0;if(!r){e=-1;return e|0}if(!((Zn(r)|0)<<16>>16)){Jn(We[r>>2]|0)|0;We[e>>2]=r;e=0;return e|0}else{Qn(r);Hi(r);e=-1;return e|0}return 0}function en(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Qn(r);Hi(We[e>>2]|0);We[e>>2]=0;return}function rn(e){e=e|0;if(!e){e=-1;return e|0}Jn(We[e>>2]|0)|0;e=0;return e|0}function nn(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m,E,p,S,b){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;E=E|0;p=p|0;S=S|0;b=b|0;var v=0,_=0,k=0,F=0;_=Ge;Ge=Ge+16|0;F=_+2|0;k=_;Ve[d>>1]=$n(We[e>>2]|0,n,i,a,l,o,40,t,h,k,F,b)|0;e=Ve[F>>1]|0;t=We[E>>2]|0;We[E>>2]=t+2;Ve[t>>1]=e;ki(a,Ve[d>>1]|0,Ve[h>>1]|0,40,Ve[k>>1]|0,b);ln(a,o,c,40);Ve[w>>1]=Pn(n,l,c,m,40,b)|0;Ve[p>>1]=32767;if(f<<16>>16!=0?(v=Ve[w>>1]|0,v<<16>>16>15565):0)v=Ct(r,v,b)|0;else v=0;if(n>>>0<2){F=Ve[w>>1]|0;Ve[w>>1]=F<<16>>16>13926?13926:F;if(v<<16>>16)Ve[p>>1]=15565}else{if(v<<16>>16){Ve[p>>1]=15565;Ve[w>>1]=15565}if((n|0)==7){k=pt(7,Ve[p>>1]|0,w,0,0,S,b)|0;F=We[E>>2]|0;We[E>>2]=F+2;Ve[F>>1]=k}}d=Ve[w>>1]|0;v=0;while(1){k=Ze(Ve[c>>1]|0,d)|0;Ve[u>>1]=(Xe[l>>1]|0)-(k>>>14);k=(Ze(Ve[a>>1]|0,d)|0)>>>14;F=s+(v<<1)|0;Ve[F>>1]=(Xe[F>>1]|0)-k;v=v+1|0;if((v|0)==40)break;else{a=a+2|0;l=l+2|0;u=u+2|0;c=c+2|0}}Ge=_;return}function tn(e,r){e=e|0;r=r|0;var n=0,t=0,i=0,o=0;o=Ge;Ge=Ge+16|0;i=o;if(!e){e=-1;Ge=o;return e|0}We[e>>2]=0;n=xi(2532)|0;We[i>>2]=n;if(!n){e=-1;Ge=o;return e|0}ei(n+2392|0);We[n+2188>>2]=0;We[(We[i>>2]|0)+2192>>2]=0;We[(We[i>>2]|0)+2196>>2]=0;We[(We[i>>2]|0)+2200>>2]=0;We[(We[i>>2]|0)+2204>>2]=0;We[(We[i>>2]|0)+2208>>2]=0;We[(We[i>>2]|0)+2212>>2]=0;We[(We[i>>2]|0)+2220>>2]=0;t=We[i>>2]|0;We[t+2216>>2]=r;We[t+2528>>2]=0;n=t;if(((((((($r(t+2196|0)|0)<<16>>16==0?(di(t+2192|0)|0)<<16>>16==0:0)?(yn(t+2200|0)|0)<<16>>16==0:0)?(nt(t+2204|0)|0)<<16>>16==0:0)?(Tt(t+2208|0)|0)<<16>>16==0:0)?(Bt(t+2212|0)|0)<<16>>16==0:0)?(hn(t+2220|0,We[t+2432>>2]|0)|0)<<16>>16==0:0)?(Kn(t+2188|0)|0)<<16>>16==0:0){an(t)|0;We[e>>2]=n;e=0;Ge=o;return e|0}on(i);e=-1;Ge=o;return e|0}function on(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Vn(r+2188|0);wi((We[e>>2]|0)+2192|0);On((We[e>>2]|0)+2200|0);en((We[e>>2]|0)+2196|0);it((We[e>>2]|0)+2204|0);Nt((We[e>>2]|0)+2208|0);Ut((We[e>>2]|0)+2212|0);mn((We[e>>2]|0)+2220|0);Hi(We[e>>2]|0);We[e>>2]=0;return}function an(e){e=e|0;var r=0,n=0,t=0,i=0;if(!e){i=-1;return i|0}We[e+652>>2]=e+320;We[e+640>>2]=e+240;We[e+644>>2]=e+160;We[e+648>>2]=e+80;We[e+1264>>2]=e+942;We[e+1912>>2]=e+1590;t=e+1938|0;We[e+2020>>2]=t;We[e+2384>>2]=e+2304;r=e+2028|0;We[e+2024>>2]=e+2108;We[e+2528>>2]=0;Vi(e|0,0,640)|0;Vi(e+1282|0,0,308)|0;Vi(e+656|0,0,286)|0;n=e+2224|0;i=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(i|0));t=r;i=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(i|0));r=e+1268|0;t=n;i=t+80|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(i|0));Ve[r>>1]=40;Ve[e+1270>>1]=40;Ve[e+1272>>1]=40;Ve[e+1274>>1]=40;Ve[e+1276>>1]=40;Wn(We[e+2188>>2]|0)|0;hi(We[e+2192>>2]|0)|0;rn(We[e+2196>>2]|0)|0;Tn(We[e+2200>>2]|0)|0;tt(We[e+2204>>2]|0)|0;Dt(We[e+2208>>2]|0)|0;Lt(We[e+2212>>2]|0)|0;wn(We[e+2220>>2]|0,We[e+2432>>2]|0)|0;Ve[e+2388>>1]=0;i=0;return i|0}function sn(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,se=0,le=0,fe=0,ue=0,ce=0,de=0,he=0;he=Ge;Ge=Ge+1184|0;Y=he;u=he+1096|0;c=he+1008|0;l=he+904|0;se=he+928|0;le=he+824|0;V=he+744|0;ue=he+664|0;ce=he+584|0;X=he+328|0;ie=he+504|0;oe=he+424|0;fe=he+344|0;de=he+248|0;W=he+168|0;ee=he+88|0;ne=he+68|0;te=he+48|0;re=he+28|0;ae=he+24|0;Q=he+22|0;Z=he+20|0;K=he+16|0;j=he+12|0;q=he+10|0;J=he+8|0;G=he+6|0;$=he+4|0;We[Y>>2]=t;z=e+2528|0;a=e+652|0;qi(We[a>>2]|0,n|0,320)|0;We[i>>2]=r;f=e+2216|0;if(!(We[f>>2]|0)){n=e+2220|0;t=0}else{t=jt(We[e+2212>>2]|0,We[a>>2]|0,z)|0;H=e+2220|0;n=H;t=Sn(We[H>>2]|0,t,i,z)|0}H=e+2392|0;Xn(We[e+2188>>2]|0,r,We[e+644>>2]|0,We[e+648>>2]|0,u,H,z);s=e+2192|0;mi(We[s>>2]|0,r,We[i>>2]|0,u,c,l,Y,z);pn(We[n>>2]|0,l,We[a>>2]|0,z);if((We[i>>2]|0)==8){En(We[n>>2]|0,t,We[(We[s>>2]|0)+40>>2]|0,(We[e+2200>>2]|0)+32|0,Y,z);Vi(e+1282|0,0,308)|0;a=e+2244|0;h=a+20|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(h|0));a=e+2284|0;h=a+20|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(h|0));a=We[e+2020>>2]|0;h=a+80|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(h|0));a=e+2028|0;h=a+80|0;do{Ve[a>>1]=0;a=a+2|0}while((a|0)<(h|0));hi(We[s>>2]|0)|0;a=We[s>>2]|0;n=l;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));a=(We[s>>2]|0)+20|0;n=l;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));rn(We[e+2196>>2]|0)|0;Ve[e+2388>>1]=0;x=0}else x=Pt(We[e+2208>>2]|0,We[s>>2]|0,z)|0;B=e+640|0;s=e+2264|0;a=e+1264|0;n=e+2204|0;t=e+2212|0;L=e+1268|0;U=e+1278|0;at(r,2842,2862,2882,u,0,We[B>>2]|0,s,We[a>>2]|0,z);if(r>>>0>1){Gn(We[n>>2]|0,We[t>>2]|0,r,We[a>>2]|0,K,L,U,0,We[f>>2]|0,z);at(r,2842,2862,2882,u,80,We[B>>2]|0,s,We[a>>2]|0,z);Gn(We[n>>2]|0,We[t>>2]|0,r,(We[a>>2]|0)+160|0,K+2|0,L,U,1,We[f>>2]|0,z)}else{at(r,2842,2862,2882,u,80,We[B>>2]|0,s,We[a>>2]|0,z);Gn(We[n>>2]|0,We[t>>2]|0,r,We[a>>2]|0,K,L,U,1,We[f>>2]|0,z);Ve[K+2>>1]=Ve[K>>1]|0}if(We[f>>2]|0)Yt(We[t>>2]|0,K,z);if((We[i>>2]|0)==8){ce=e+656|0;de=e+976|0;qi(ce|0,de|0,286)|0;de=e+320|0;qi(e|0,de|0,320)|0;Ge=he;return 0}k=e+2224|0;F=e+2244|0;M=e+2284|0;g=e+2388|0;R=e+2020|0;A=e+1916|0;y=e+1912|0;O=e+2024|0;T=e+2384|0;D=e+2196|0;N=e+2208|0;P=e+2464|0;C=e+2200|0;I=e+2224|0;b=e+2244|0;v=e+1270|0;_=e+1280|0;S=0;f=0;l=0;m=0;E=0;s=0;p=-1;while(1){d=p;p=p+1<<16>>16;m=1-(m<<16>>16)|0;t=m&65535;w=(m&65535|0)!=0;n=We[i>>2]|0;a=(n|0)==0;do{if(w)if(a){a=ne;n=k;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));a=te;n=F;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));a=re;n=M;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));Ve[ae>>1]=Ve[g>>1]|0;r=(We[B>>2]|0)+(S<<1)|0;a=20;break}else{r=(We[B>>2]|0)+(S<<1)|0;a=19;break}else{r=(We[B>>2]|0)+(S<<1)|0;if(a)a=20;else a=19}}while(0);if((a|0)==19)yt(n,2842,2862,2882,u,c,r,M,b,We[R>>2]|0,A,(We[y>>2]|0)+(S<<1)|0,We[O>>2]|0,se,ie,We[T>>2]|0);else if((a|0)==20?(0,yt(0,2842,2862,2882,u,c,r,M,te,We[R>>2]|0,A,(We[y>>2]|0)+(S<<1)|0,We[O>>2]|0,se,ie,We[T>>2]|0),w):0){a=ee;n=We[O>>2]|0;h=a+80|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0))}a=oe;n=ie;h=a+80|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));nn(We[D>>2]|0,We[N>>2]|0,We[i>>2]|0,E,K,We[O>>2]|0,(We[y>>2]|0)+(S<<1)|0,oe,se,x,le,ue,j,q,J,X,Y,$,We[P>>2]|0,z);switch(d<<16>>16){case-1:{if((Ve[U>>1]|0)>0)Ve[v>>1]=Ve[j>>1]|0;break}case 2:{if((Ve[_>>1]|0)>0)Ve[L>>1]=Ve[j>>1]|0;break}default:{}}Qr(le,We[O>>2]|0,Ve[j>>1]|0,Ve[g>>1]|0,Ve[J>>1]|0,oe,V,ce,Y,We[i>>2]|0,p,H,z);Dn(We[C>>2]|0,We[i>>2]|0,ie,(We[y>>2]|0)+(S<<1)|0,V,se,le,ue,ce,X,t,Ve[$>>1]|0,Q,Z,J,G,Y,H,z);It(We[N>>2]|0,Ve[J>>1]|0,z);r=We[i>>2]|0;do{if(!r)if(w){a=fe;n=se;h=a+80|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));a=de;n=ce;h=a+80|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));a=W;n=V;h=a+80|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));l=Ve[j>>1]|0;f=Ve[q>>1]|0;Ot(We[B>>2]|0,0,E,Ve[J>>1]|0,Ve[G>>1]|0,c,o,se,V,ue,ce,ne,M,te,We[y>>2]|0,g,z);Ve[g>>1]=Ve[ae>>1]|0;s=E;break}else{a=M;n=re;h=a+20|0;do{Ve[a>>1]=Ve[n>>1]|0;a=a+2|0;n=n+2|0}while((a|0)<(h|0));w=s<<16>>16;ki((We[y>>2]|0)+(w<<1)|0,l,f,40,1,z);ln((We[y>>2]|0)+(w<<1)|0,ee,ue,40);Ot(We[B>>2]|0,We[i>>2]|0,s,Ve[Q>>1]|0,Ve[Z>>1]|0,c+-22|0,o,fe,W,ue,de,I,M,b,We[y>>2]|0,ae,z);yt(We[i>>2]|0,2842,2862,2882,u,c,(We[B>>2]|0)+(S<<1)|0,M,b,We[R>>2]|0,A,(We[y>>2]|0)+(S<<1)|0,We[O>>2]|0,se,ie,We[T>>2]|0);ki((We[y>>2]|0)+(S<<1)|0,Ve[j>>1]|0,Ve[q>>1]|0,40,1,z);ln((We[y>>2]|0)+(S<<1)|0,We[O>>2]|0,ue,40);Ot(We[B>>2]|0,We[i>>2]|0,E,Ve[J>>1]|0,Ve[G>>1]|0,c,o,se,V,ue,ce,I,M,b,We[y>>2]|0,g,z);break}else Ot(We[B>>2]|0,r,E,Ve[J>>1]|0,Ve[G>>1]|0,c,o,se,V,ue,ce,I,M,b,We[y>>2]|0,g,z)}while(0);r=S+40|0;E=r&65535;if(E<<16>>16>=160)break;else{S=r<<16>>16;u=u+22|0;c=c+22|0}}qi(e+1282|0,e+1602|0,308)|0;ce=e+656|0;de=e+976|0;qi(ce|0,de|0,286)|0;de=e+320|0;qi(e|0,de|0,320)|0;Ge=he;return 0}function ln(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0;h=t<<16>>16;if(t<<16>>16>1)d=1;else return;while(1){i=Ve[e>>1]|0;s=r+(d+-1<<1)|0;t=Ze(Ve[r+(d<<1)>>1]|0,i)|0;f=Ve[s>>1]|0;i=Ze(f<<16>>16,i)|0;a=(d+131071|0)>>>1;l=a&65535;o=Ve[e+2>>1]|0;if(!(l<<16>>16)){r=s;a=f}else{u=(a<<1)+131070&131070;c=d-u|0;a=e;do{m=(Ze(f<<16>>16,o)|0)+t|0;w=a;a=a+4|0;t=Ve[s+-2>>1]|0;o=(Ze(t,o)|0)+i|0;i=Ve[a>>1]|0;s=s+-4|0;t=m+(Ze(i,t)|0)|0;f=Ve[s>>1]|0;i=o+(Ze(f<<16>>16,i)|0)|0;l=l+-1<<16>>16;o=Ve[w+6>>1]|0}while(l<<16>>16!=0);a=r+(c+-3<<1)|0;e=e+(u+2<<1)|0;r=a;a=Ve[a>>1]|0}t=(Ze(a<<16>>16,o)|0)+t|0;Ve[n>>1]=i>>>12;Ve[n+2>>1]=t>>>12;t=(d<<16)+131072>>16;if((t|0)<(h|0)){n=n+4|0;e=e+(1-d<<1)|0;d=t}else break}return}function fn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0;F=Ge;Ge=Ge+80|0;k=F;a=20;o=e;i=1;while(1){_=Ve[o>>1]|0;_=(Ze(_,_)|0)+i|0;i=Ve[o+2>>1]|0;i=_+(Ze(i,i)|0)|0;a=a+-1<<16>>16;if(!(a<<16>>16))break;else o=o+4|0}i=i<<1;if((i|0)<0){o=20;i=e;t=k;while(1){Ve[t>>1]=(Ve[i>>1]|0)>>>1;Ve[t+2>>1]=(Ve[i+2>>1]|0)>>>1;o=o+-1<<16>>16;if(!(o<<16>>16)){_=k;break}else{i=i+4|0;t=t+4|0}}}else{i=ai(i>>1,t)|0;if((i|0)<16777215)i=((i>>9)*32440|0)>>>15<<16>>16;else i=32440;a=20;o=e;t=k;while(1){Ve[t>>1]=((Ze(Ve[o>>1]|0,i)|0)+32|0)>>>6;Ve[t+2>>1]=((Ze(Ve[o+2>>1]|0,i)|0)+32|0)>>>6;a=a+-1<<16>>16;if(!(a<<16>>16)){_=k;break}else{o=o+4|0;t=t+4|0}}}a=20;o=_;t=n+3198|0;i=0;while(1){v=Ve[o>>1]|0;v=(Ze(v,v)|0)+i|0;Ve[t>>1]=(v+16384|0)>>>15;b=Ve[o+2>>1]|0;i=(Ze(b,b)|0)+v|0;Ve[t+-82>>1]=(i+16384|0)>>>15;a=a+-1<<16>>16;if(!(a<<16>>16))break;else{o=o+4|0;t=t+-164|0}}v=r+78|0;b=1;while(1){i=39-b|0;e=n+3120+(i<<1)|0;t=n+(i*80|0)+78|0;i=r+(i<<1)|0;l=k+(b<<1)|0;o=65575-b|0;s=o&65535;a=Ve[_>>1]|0;if(!(s<<16>>16)){s=v;o=0}else{m=o+65535&65535;p=m*41|0;S=(Ze(b,-40)|0)-p|0;E=0-b|0;p=E-p|0;E=E-m|0;w=b+m|0;h=Ve[l>>1]|0;c=_;d=v;f=n+((38-b|0)*80|0)+78|0;o=0;u=0;while(1){l=l+2|0;o=(Ze(h<<16>>16,a)|0)+o|0;c=c+2|0;h=Ve[l>>1]|0;u=(Ze(h<<16>>16,a)|0)+u|0;g=i;i=i+-2|0;a=Ve[i>>1]|0;M=Ve[d>>1]<<1;g=(Ze((Ze(M,Ve[g>>1]|0)|0)>>16,(o<<1)+32768>>16)|0)>>>15&65535;Ve[t>>1]=g;Ve[e>>1]=g;a=(Ze((Ze(M,a)|0)>>16,(u<<1)+32768>>16)|0)>>>15&65535;Ve[e+-2>>1]=a;Ve[f>>1]=a;s=s+-1<<16>>16;a=Ve[c>>1]|0;if(!(s<<16>>16))break;else{d=d+-2|0;e=e+-82|0;t=t+-82|0;f=f+-82|0}}l=k+(w+1<<1)|0;s=r+(38-m<<1)|0;i=r+(E+38<<1)|0;e=n+3040+(p+38<<1)|0;t=n+3040+(S+38<<1)|0}g=(Ze(Ve[l>>1]|0,a)|0)+o|0;g=(Ze((g<<1)+32768>>16,(Ze(Ve[s>>1]<<1,Ve[i>>1]|0)|0)>>16)|0)>>>15&65535;Ve[e>>1]=g;Ve[t>>1]=g;t=(b<<16)+131072|0;if((t|0)<2621440)b=t>>16;else break}Ge=F;return}function un(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0;w=Ge;Ge=Ge+160|0;h=w;if(i<<16>>16>0){c=o&65535;d=0;s=5;do{if((d|0)<40){u=d;f=d&65535;o=0;while(1){if(f<<16>>16<40){f=f<<16>>16;l=0;do{l=(Ze(Ve[e+(f-u<<1)>>1]|0,Ve[r+(f<<1)>>1]|0)|0)+l|0;f=f+1|0}while((f&65535)<<16>>16!=40)}else l=0;l=l<<1;We[h+(u<<2)>>2]=l;l=Bn(l)|0;o=(l|0)>(o|0)?l:o;l=u+c|0;f=l&65535;if(f<<16>>16>=40)break;else u=l<<16>>16}}else o=0;s=(o>>1)+s|0;d=d+1|0}while((d&65535)<<16>>16!=i<<16>>16)}else s=5;t=((bi(s)|0)&65535)-(t&65535)|0;o=t<<16>>16;l=0-o<<16;s=(l|0)<2031616;l=l>>16;if((t&65535)<<16>>16>0)if(s){s=0;do{t=We[h+(s<<2)>>2]|0;r=t<>1]=Ni((r>>o|0)==(t|0)?r:t>>31^2147483647,a)|0;s=s+1|0}while((s|0)!=40);Ge=w;return}else{s=0;do{t=We[h+(s<<2)>>2]|0;r=t<>1]=Ni((r>>o|0)==(t|0)?r:t>>31^2147483647,a)|0;s=s+1|0}while((s|0)!=40);Ge=w;return}else if(s){s=0;do{Ve[n+(s<<1)>>1]=Ni(We[h+(s<<2)>>2]>>l,a)|0;s=s+1|0}while((s|0)!=40);Ge=w;return}else{s=0;do{Ve[n+(s<<1)>>1]=Ni(0,a)|0;s=s+1|0}while((s|0)!=40);Ge=w;return}}function cn(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0;k=Ge;Ge=Ge+160|0;_=k;S=e+2|0;b=Ve[e>>1]|0;v=0;i=5;do{p=v;s=0;while(1){u=r+(p<<1)|0;E=40-p|0;o=(E+131071|0)>>>1&65535;l=r+(p+1<<1)|0;a=Ze(Ve[u>>1]<<1,b)|0;if(!(o<<16>>16))o=S;else{m=131111-p+131070&131070;w=p+m|0;h=S;d=e;c=u;while(1){f=c+4|0;u=d+4|0;a=(Ze(Ve[l>>1]<<1,Ve[h>>1]|0)|0)+a|0;o=o+-1<<16>>16;a=(Ze(Ve[f>>1]<<1,Ve[u>>1]|0)|0)+a|0;if(!(o<<16>>16))break;else{l=c+6|0;h=d+6|0;d=u;c=f}}l=r+(w+3<<1)|0;o=e+(m+3<<1)|0}if(!(E&1))a=(Ze(Ve[l>>1]<<1,Ve[o>>1]|0)|0)+a|0;We[_+(p<<2)>>2]=a;a=(a|0)<0?0-a|0:a;s=(a|0)>(s|0)?a:s;a=p+5|0;if((a&65535)<<16>>16<40)p=a<<16>>16;else break}i=(s>>1)+i|0;v=v+1|0}while((v|0)!=5);t=((bi(i)|0)&65535)-(t&65535)|0;a=t<<16>>16;i=0-a<<16;s=i>>16;if((t&65535)<<16>>16>0){o=20;i=_;while(1){_=We[i>>2]|0;t=_<>1]=(((t>>a|0)==(_|0)?t:_>>31^2147483647)+32768|0)>>>16;_=We[i+4>>2]|0;t=_<>1]=(((t>>a|0)==(_|0)?t:_>>31^2147483647)+32768|0)>>>16;o=o+-1<<16>>16;if(!(o<<16>>16))break;else{n=n+4|0;i=i+8|0}}Ge=k;return}if((i|0)<2031616){o=20;i=_;while(1){Ve[n>>1]=((We[i>>2]>>s)+32768|0)>>>16;Ve[n+2>>1]=((We[i+4>>2]>>s)+32768|0)>>>16;o=o+-1<<16>>16;if(!(o<<16>>16))break;else{n=n+4|0;i=i+8|0}}Ge=k;return}else{Ve[n>>1]=0;_=n+4|0;Ve[n+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;t=_+4|0;Ve[_+2>>1]=0;Ve[t>>1]=0;_=t+4|0;Ve[t+2>>1]=0;Ve[_>>1]=0;Ve[_+2>>1]=0;Ge=k;return}}function dn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;a=(Gt(16383,r)|0)<<16>>16;r=Ze(a,r<<16>>16)|0;if((r|0)==1073741824){We[t>>2]=1;i=2147483647}else i=r<<1;o=(Ze(a,n<<16>>16)|0)>>15;r=i+(o<<1)|0;if((i^o|0)>0&(r^i|0)<0){We[t>>2]=1;r=(i>>>31)+2147483647|0}i=2147483647-r|0;n=i>>16;r=Ze(n,a)|0;if((r|0)==1073741824){We[t>>2]=1;o=2147483647}else o=r<<1;a=(Ze((i>>>1)-(n<<15)<<16>>16,a)|0)>>15;r=o+(a<<1)|0;if((o^a|0)>0&(r^o|0)<0){We[t>>2]=1;r=(o>>>31)+2147483647|0}o=r>>16;a=e>>16;n=Ze(o,a)|0;n=(n|0)==1073741824?2147483647:n<<1;i=(Ze((r>>>1)-(o<<15)<<16>>16,a)|0)>>15;t=(i<<1)+n|0;t=(i^n|0)>0&(t^n|0)<0?(n>>>31)+2147483647|0:t;a=(Ze(o,(e>>>1)-(a<<15)<<16>>16)|0)>>15;e=t+(a<<1)|0;e=(t^a|0)>0&(e^t|0)<0?(t>>>31)+2147483647|0:e;t=e<<2;return((t>>2|0)==(e|0)?t:e>>31^2147483647)|0}function hn(e,r){e=e|0;r=r|0;var n=0,t=0,i=0,o=0;if(!e){o=-1;return o|0}We[e>>2]=0;n=xi(192)|0;if(!n){o=-1;return o|0}t=n+176|0;Ve[t>>1]=0;Ve[t+2>>1]=0;Ve[t+4>>1]=0;Ve[t+6>>1]=0;Ve[t+8>>1]=0;Ve[t+10>>1]=0;t=n;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+20|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+40|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+60|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+80|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+100|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+120|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+140|0;i=r;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=n+160|0;o=t+20|0;do{Ve[t>>1]=0;t=t+2|0}while((t|0)<(o|0));Ve[n+188>>1]=7;Ve[n+190>>1]=32767;We[e>>2]=n;o=0;return o|0}function wn(e,r){e=e|0;r=r|0;var n=0,t=0,i=0;if(!e){i=-1;return i|0}n=e+176|0;Ve[n>>1]=0;Ve[n+2>>1]=0;Ve[n+4>>1]=0;Ve[n+6>>1]=0;Ve[n+8>>1]=0;Ve[n+10>>1]=0;n=e;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+20|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+40|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+60|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+80|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+100|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+120|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+140|0;t=r;i=n+20|0;do{Ve[n>>1]=Ve[t>>1]|0;n=n+2|0;t=t+2|0}while((n|0)<(i|0));n=e+160|0;i=n+20|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(i|0));Ve[e+188>>1]=7;Ve[e+190>>1]=32767;i=1;return i|0}function mn(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function En(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0;g=Ge;Ge=Ge+112|0;k=g+80|0;F=g+60|0;M=g+40|0;_=g;if(r<<16>>16==0?(a=e+178|0,(Ve[a>>1]|0)!=0):0){M=e+180|0;o=e+182|0;n=a;M=Ve[M>>1]|0;t=We[i>>2]|0;F=t+2|0;Ve[t>>1]=M;o=Ve[o>>1]|0;M=t+4|0;Ve[F>>1]=o;F=e+184|0;F=Ve[F>>1]|0;o=t+6|0;Ve[M>>1]=F;M=e+186|0;M=Ve[M>>1]|0;e=t+8|0;Ve[o>>1]=M;n=Ve[n>>1]|0;t=t+10|0;We[i>>2]=t;Ve[e>>1]=n;Ge=g;return}m=_+36|0;E=_+32|0;p=_+28|0;S=_+24|0;b=_+20|0;v=_+16|0;d=_+12|0;h=_+8|0;w=_+4|0;r=_;a=r+40|0;do{We[r>>2]=0;r=r+4|0}while((r|0)<(a|0));c=7;r=0;while(1){u=Ve[e+160+(c<<1)>>1]|0;a=u<<16>>16;if(u<<16>>16<0)a=~((a^-4)>>2);else a=a>>>2;r=Wt(r,a&65535,o)|0;l=c*10|0;u=9;while(1){f=_+(u<<2)|0;s=We[f>>2]|0;R=Ve[e+(u+l<<1)>>1]|0;a=R+s|0;if((R^s|0)>-1&(a^s|0)<0){We[o>>2]=1;a=(s>>>31)+2147483647|0}We[f>>2]=a;if((u|0)>0)u=u+-1|0;else break}if((c|0)>0)c=c+-1|0;else break}a=r<<16>>16;if(r<<16>>16<0)a=~((a^-2)>>1);else a=a>>>1;Ve[F+18>>1]=(We[m>>2]|0)>>>3;Ve[F+16>>1]=(We[E>>2]|0)>>>3;Ve[F+14>>1]=(We[p>>2]|0)>>>3;Ve[F+12>>1]=(We[S>>2]|0)>>>3;Ve[F+10>>1]=(We[b>>2]|0)>>>3;Ve[F+8>>1]=(We[v>>2]|0)>>>3;Ve[F+6>>1]=(We[d>>2]|0)>>>3;Ve[F+4>>1]=(We[h>>2]|0)>>>3;Ve[F+2>>1]=(We[w>>2]|0)>>>3;Ve[F>>1]=(We[_>>2]|0)>>>3;r=e+178|0;a=(((a<<16)+167772160|0)>>>16)+128|0;Ve[r>>1]=a;a=a<<16;if((a|0)<0)a=~((a>>16^-256)>>8);else a=a>>24;Ve[r>>1]=a;if((a|0)<=63){if((a|0)<0){Ve[r>>1]=0;a=0}}else{Ve[r>>1]=63;a=63}R=Bi(a<<8&65535,11560,o)|0;R=R<<16>>16>0?0:R<<16>>16<-14436?-14436:R;Ve[t>>1]=R;Ve[t+2>>1]=R;Ve[t+4>>1]=R;Ve[t+6>>1]=R;R=((R<<16>>16)*5443|0)>>>15&65535;Ve[t+8>>1]=R;Ve[t+10>>1]=R;Ve[t+12>>1]=R;Ve[t+14>>1]=R;pi(F,k,10,o);Ti(k,205,10,o);Ei(k,F,10,o);t=e+182|0;R=e+180|0;Fi(n,8,F,M,t,R,o);o=t;t=r;R=Ve[R>>1]|0;n=We[i>>2]|0;M=n+2|0;Ve[n>>1]=R;o=Ve[o>>1]|0;R=n+4|0;Ve[M>>1]=o;M=e+184|0;M=Ve[M>>1]|0;o=n+6|0;Ve[R>>1]=M;e=e+186|0;e=Ve[e>>1]|0;R=n+8|0;Ve[o>>1]=e;e=Ve[t>>1]|0;n=n+10|0;We[i>>2]=n;Ve[R>>1]=e;Ge=g;return}function pn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0;f=Ge;Ge=Ge+16|0;a=f+2|0;l=f;s=e+176|0;o=(Xe[s>>1]|0)+1|0;o=(o&65535|0)==8?0:o&65535;Ve[s>>1]=o;o=e+((o<<16>>16)*10<<1)|0;i=o+20|0;do{Ve[o>>1]=Ve[r>>1]|0;o=o+2|0;r=r+2|0}while((o|0)<(i|0));r=0;i=160;while(1){o=Ve[n>>1]|0;r=(Ze(o<<1,o)|0)+r|0;if((r|0)<0){r=2147483647;break}i=i+-1<<16>>16;if(!(i<<16>>16))break;else n=n+2|0}si(r,a,l,t);r=Ve[a>>1]|0;a=r<<16>>16;n=a<<10;if((n|0)!=(a<<26>>16|0)){We[t>>2]=1;n=r<<16>>16>0?32767:-32768}Ve[e+160+(Ve[s>>1]<<1)>>1]=(((Ve[l>>1]|0)>>>5)+n<<16)+-558432256>>17;Ge=f;return}function Sn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;o=e+190|0;a=Wt(Ve[o>>1]|0,1,t)|0;Ve[o>>1]=a;i=e+188|0;do{if(!(r<<16>>16)){e=Ve[i>>1]|0;if(!(e<<16>>16)){Ve[o>>1]=0;We[n>>2]=8;e=1;break}o=(e&65535)+65535&65535;Ve[i>>1]=o;if((Wt(a,o,t)|0)<<16>>16<30){We[n>>2]=8;e=0}else e=0}else{Ve[i>>1]=7;e=0}}while(0);return e|0}function bn(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;if(!(o<<16>>16)){o=e<<16>>16;if(((o<<16)+-5570560|0)<65536){r=(o*3|0)+-58+(r<<16>>16)|0;r=r&65535;return r|0}else{r=o+112|0;r=r&65535;return r|0}}if(!(a<<16>>16)){s=(e&65535)-(t&65535)<<16;r=(r<<16>>16)+2+(s>>15)+(s>>16)|0;r=r&65535;return r|0}t=t<<16>>16;t=(((n&65535)-t<<16)+-327680|0)>0?t+5&65535:n;i=i<<16>>16;n=e<<16>>16;t=(((i-(t&65535)<<16)+-262144|0)>0?i+65532&65535:t)<<16>>16;i=t*196608|0;e=i+-393216>>16;o=((r&65535)<<16)+(n*196608|0)>>16;if(!(e-o&32768)){r=n+5-t|0;r=r&65535;return r|0}if((i+196608>>16|0)>(o|0)){r=o+3-e|0;r=r&65535;return r|0}else{r=n+11-t|0;r=r&65535;return r|0}return 0}function vn(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;i=e<<16>>16;do{if(!(t<<16>>16))if(e<<16>>16<95){i=((i*393216|0)+-6881280>>16)+(r<<16>>16)|0;break}else{i=i+368|0;break}else i=((((i-(n&65535)|0)*393216|0)+196608|0)>>>16)+(r&65535)|0}while(0);return i&65535|0}function _n(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0;i=We[t+96>>2]|0;if(e>>>0<8){l=(We[t+100>>2]|0)+(e<<2)|0;s=We[l>>2]|0;Ke[n>>0]=Ve[r+(Ve[s>>1]<<1)>>1]<<4|e|Ve[r+(Ve[s+2>>1]<<1)>>1]<<5|Ve[r+(Ve[s+4>>1]<<1)>>1]<<6|Ve[r+(Ve[s+6>>1]<<1)>>1]<<7;s=i+(e<<1)|0;t=Ve[s>>1]|0;if((t+-7|0)>4){i=4;a=4;e=1;while(1){f=Ve[r+(Ve[(We[l>>2]|0)+(i<<1)>>1]<<1)>>1]|0;t=n+(e<<16>>16)|0;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+((a|1)<<16>>16<<1)>>1]<<1)>>1]<<1|f&65535;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+((a|2)<<16>>16<<1)>>1]<<1)>>1]<<2|f;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+((a|3)<<16>>16<<1)>>1]<<1)>>1]<<3|f;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+(a+4<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<4|f;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+(a+5<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<5|f;Ke[t>>0]=f;f=Xe[r+(Ve[(We[l>>2]|0)+(a+6<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<6|f;Ke[t>>0]=f;o=a+8<<16>>16;e=e+1<<16>>16;Ke[t>>0]=Xe[r+(Ve[(We[l>>2]|0)+(a+7<<16>>16<<16>>16<<1)>>1]<<1)>>1]<<7|f;i=o<<16>>16;t=Ve[s>>1]|0;if((i|0)>=(t+-7|0))break;else a=o}}else{o=4;e=1}s=t+4&7;if(!s)return;i=n+(e<<16>>16)|0;Ke[i>>0]=0;t=0;a=0;e=0;while(1){a=(Xe[r+(Ve[(We[l>>2]|0)+(o<<16>>16<<1)>>1]<<1)>>1]&255)<>0]=a;e=e+1<<16>>16;t=e<<16>>16;if((t|0)>=(s|0))break;else o=o+1<<16>>16}return}if((e|0)==15){Ke[n>>0]=15;return}Ke[n>>0]=Ve[r>>1]<<4|e|Ve[r+2>>1]<<5|Ve[r+4>>1]<<6|Ve[r+6>>1]<<7;t=i+(e<<1)|0;e=Ve[t>>1]|0;i=((e&65535)<<16)+262144>>16;l=i&-8;a=(l+524281|0)>>>3&65535;if(a<<16>>16>0){i=((i&-8)+524281|0)>>>3;s=((i<<3)+524280&524280)+12|0;o=1;e=r+8|0;while(1){Ke[n+(o<<16>>16)>>0]=Xe[e+2>>1]<<1|Xe[e>>1]|Xe[e+4>>1]<<2|Xe[e+6>>1]<<3|Xe[e+8>>1]<<4|Xe[e+10>>1]<<5|Xe[e+12>>1]<<6|Xe[e+14>>1]<<7;if(a<<16>>16>1){a=a+-1<<16>>16;o=o+1<<16>>16;e=e+16|0}else break}e=Ve[t>>1]|0;o=(i<<16)+65536>>16}else{s=4;o=1}e=(0-l|4)+(e&65535)<<16;a=e>>16;if(!a)return;o=n+o|0;Ke[o>>0]=0;if((e|0)>0){e=0;i=0;t=0}else return;do{i=i&255|Ve[r+(s+e<<1)>>1]<>0]=i;t=t+1<<16>>16;e=t<<16>>16}while((e|0)<(a|0));return}function kn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0;u=We[t+100>>2]|0;f=We[t+96>>2]|0;Ke[n>>0]=e&15;f=f+(e<<1)|0;i=Ve[f>>1]|0;if(e>>>0>=8){s=((i&65535)<<16)+-458752|0;if((s|0)>0){l=1;a=r;while(1){r=a+16|0;t=l+1<<16>>16;Ke[n+(l<<16>>16)>>0]=Xe[a+14>>1]|Xe[a+12>>1]<<1|((Xe[a+2>>1]<<6|Xe[a>>1]<<7|Xe[a+4>>1]<<5|Xe[a+6>>1]<<4)&240|Xe[a+8>>1]<<3|Xe[a+10>>1]<<2)&252;s=s+-524288&-65536;if((s|0)<=0)break;else{l=t;a=r}}i=Ve[f>>1]|0}else t=1;l=i&7;i=n+(t<<16>>16)|0;Ke[i>>0]=0;if(!l)return;else{o=0;a=0;s=0;t=r}while(1){a=a&255|Ve[t>>1]<<7-o;Ke[i>>0]=a;s=s+1<<16>>16;o=s<<16>>16;if((o|0)>=(l|0))break;else t=t+2|0}return}a=i<<16>>16;if(i<<16>>16>7){i=u+(e<<2)|0;t=0;l=0;o=1;while(1){c=Xe[r+(Ve[(We[i>>2]|0)+(t<<1)>>1]<<1)>>1]<<7;a=n+(o<<16>>16)|0;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|1)<<16>>16<<1)>>1]<<1)>>1]<<6|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|2)<<16>>16<<1)>>1]<<1)>>1]<<5|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|3)<<16>>16<<1)>>1]<<1)>>1]<<4|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|4)<<16>>16<<1)>>1]<<1)>>1]<<3|c&240;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|5)<<16>>16<<1)>>1]<<1)>>1]<<2|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|6)<<16>>16<<1)>>1]<<1)>>1]<<1|c;Ke[a>>0]=c;s=l+8<<16>>16;o=o+1<<16>>16;Ke[a>>0]=c&254|Xe[r+(Ve[(We[i>>2]|0)+((l|7)<<16>>16<<1)>>1]<<1)>>1];t=s<<16>>16;a=Ve[f>>1]|0;if((t|0)>=(a+-7|0))break;else l=s}}else{s=0;o=1}f=a&7;l=n+(o<<16>>16)|0;Ke[l>>0]=0;if(!f)return;o=u+(e<<2)|0;i=0;t=0;a=0;while(1){t=(Xe[r+(Ve[(We[o>>2]|0)+(s<<16>>16<<1)>>1]<<1)>>1]&255)<<7-i|t&255;Ke[l>>0]=t;a=a+1<<16>>16;i=a<<16>>16;if((i|0)>=(f|0))break;else s=s+1<<16>>16}return}function Fn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0;u=We[t+100>>2]|0;f=We[t+96>>2]|0;Ke[n>>0]=e<<3;f=f+(e<<1)|0;i=Ve[f>>1]|0;if(e>>>0>=8){s=((i&65535)<<16)+-458752|0;if((s|0)>0){l=1;a=r;while(1){r=a+16|0;t=l+1<<16>>16;Ke[n+(l<<16>>16)>>0]=Xe[a+14>>1]|Xe[a+12>>1]<<1|((Xe[a+2>>1]<<6|Xe[a>>1]<<7|Xe[a+4>>1]<<5|Xe[a+6>>1]<<4)&240|Xe[a+8>>1]<<3|Xe[a+10>>1]<<2)&252;s=s+-524288&-65536;if((s|0)<=0)break;else{l=t;a=r}}i=Ve[f>>1]|0}else t=1;l=i&7;i=n+(t<<16>>16)|0;Ke[i>>0]=0;if(!l)return;else{o=0;a=0;s=0;t=r}while(1){a=a&255|Ve[t>>1]<<7-o;Ke[i>>0]=a;s=s+1<<16>>16;o=s<<16>>16;if((o|0)>=(l|0))break;else t=t+2|0}return}a=i<<16>>16;if(i<<16>>16>7){i=u+(e<<2)|0;t=0;l=0;o=1;while(1){c=Xe[r+(Ve[(We[i>>2]|0)+(t<<1)>>1]<<1)>>1]<<7;a=n+(o<<16>>16)|0;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|1)<<16>>16<<1)>>1]<<1)>>1]<<6|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|2)<<16>>16<<1)>>1]<<1)>>1]<<5|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|3)<<16>>16<<1)>>1]<<1)>>1]<<4|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|4)<<16>>16<<1)>>1]<<1)>>1]<<3|c&240;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|5)<<16>>16<<1)>>1]<<1)>>1]<<2|c;Ke[a>>0]=c;c=Xe[r+(Ve[(We[i>>2]|0)+((l|6)<<16>>16<<1)>>1]<<1)>>1]<<1|c;Ke[a>>0]=c;s=l+8<<16>>16;o=o+1<<16>>16;Ke[a>>0]=c&254|Xe[r+(Ve[(We[i>>2]|0)+((l|7)<<16>>16<<1)>>1]<<1)>>1];t=s<<16>>16;a=Ve[f>>1]|0;if((t|0)>=(a+-7|0))break;else l=s}}else{s=0;o=1}f=a&7;l=n+(o<<16>>16)|0;Ke[l>>0]=0;if(!f)return;o=u+(e<<2)|0;i=0;t=0;a=0;while(1){t=(Xe[r+(Ve[(We[o>>2]|0)+(s<<16>>16<<1)>>1]<<1)>>1]&255)<<7-i|t&255;Ke[l>>0]=t;a=a+1<<16>>16;i=a<<16>>16;if((i|0)>=(f|0))break;else s=s+1<<16>>16}return}function Mn(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(16)|0;if(!r){e=-1;return e|0}Ve[r>>1]=0;Ve[r+2>>1]=0;Ve[r+4>>1]=0;Ve[r+6>>1]=0;Ve[r+8>>1]=0;Ve[r+10>>1]=0;Ve[r+12>>1]=0;Ve[r+14>>1]=0;We[e>>2]=r;e=0;return e|0}function gn(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=0;Ve[e+2>>1]=0;Ve[e+4>>1]=0;Ve[e+6>>1]=0;Ve[e+8>>1]=0;Ve[e+10>>1]=0;Ve[e+12>>1]=0;Ve[e+14>>1]=0;e=0;return e|0}function Rn(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function An(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0;s=r<<16>>16<2722?0:r<<16>>16<5444?1:2;a=Ci(n,1,i)|0;f=e+4|0;if(!(n<<16>>16>200?a<<16>>16>(Ve[f>>1]|0):0)){a=Ve[e>>1]|0;if(a<<16>>16){o=a+-1<<16>>16;Ve[e>>1]=o;o=o<<16>>16!=0;l=5}}else{Ve[e>>1]=8;o=1;l=5}if((l|0)==5)if((s&65535)<2&o)s=(s&65535)+1&65535;l=e+6|0;Ve[l>>1]=r;o=ri(l,5)|0;if(!(s<<16>>16!=0|o<<16>>16>5443))if(o<<16>>16<0)o=16384;else{o=o<<16>>16;o=(((o<<18>>18|0)==(o|0)?o<<2:o>>>15^32767)<<16>>16)*24660>>15;if((o|0)>32767){We[i>>2]=1;o=32767}o=16384-o&65535}else o=0;a=e+2|0;if(!(Ve[a>>1]|0))o=Pi(o,1,i)|0;Ve[t>>1]=o;Ve[a>>1]=o;Ve[f>>1]=n;t=e+12|0;Ve[e+14>>1]=Ve[t>>1]|0;n=e+10|0;Ve[t>>1]=Ve[n>>1]|0;e=e+8|0;Ve[n>>1]=Ve[e>>1]|0;Ve[e>>1]=Ve[l>>1]|0;return}function yn(e){e=e|0;var r=0,n=0,t=0,i=0,o=0,a=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(68)|0;t=r;if(!r){e=-1;return e|0}We[r+28>>2]=0;i=r+64|0;We[i>>2]=0;o=r+32|0;if(((Zt(o)|0)<<16>>16==0?(a=r+48|0,(Zt(a)|0)<<16>>16==0):0)?(Mn(i)|0)<<16>>16==0:0){n=r+32|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(n|0));Zt(o)|0;Zt(a)|0;gn(We[i>>2]|0)|0;We[e>>2]=t;e=0;return e|0}Rn(i);Hi(r);e=-1;return e|0}function On(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Rn(r+64|0);Hi(We[e>>2]|0);We[e>>2]=0;return}function Tn(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}r=e+32|0;n=e;t=n+32|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));Zt(r)|0;Zt(e+48|0)|0;gn(We[e+64>>2]|0)|0;t=0;return t|0}function Dn(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m,E,p,S){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;E=E|0;p=p|0;S=S|0;var b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0;O=Ge;Ge=Ge+48|0;v=O+34|0;k=O+32|0;M=O+30|0;F=O+28|0;_=O+18|0;b=O+8|0;g=O+6|0;R=O+4|0;A=O+2|0;y=O;if(r){u=e+32|0;Jt(u,r,i,v,k,g,R,S);do{if((r|0)!=7){Zr(r,o,a,s,l,f,_,b,y,A,S);if((r|0)==5){mt(We[e+64>>2]|0,n,t,i,_,b,Ve[g>>1]|0,Ve[R>>1]|0,Ve[v>>1]|0,Ve[k>>1]|0,40,Ve[y>>1]|0,Ve[A>>1]|0,c,w,m,M,F,E,p,S);break}else{e=St(r,Ve[v>>1]|0,Ve[k>>1]|0,_,b,c,w,m,M,F,p,S)|0;o=We[E>>2]|0;We[E>>2]=o+2;Ve[o>>1]=e;break}}else{Ve[m>>1]=Nn(a,l,S)|0;e=Et(7,Ve[v>>1]|0,Ve[k>>1]|0,m,M,F,We[p+68>>2]|0,S)|0;o=We[E>>2]|0;We[E>>2]=o+2;Ve[o>>1]=e}}while(0);Qt(u,Ve[M>>1]|0,Ve[F>>1]|0);Ge=O;return}if(!(u<<16>>16)){Jt(e+48|0,0,i,v,k,g,R,S);Zr(0,o,a,s,l,f,_,b,y,A,S);Jr(o,g,R,S);o=ht(e+32|0,Ve[e>>1]|0,Ve[e+2>>1]|0,e+8|0,e+18|0,Ve[e+4>>1]|0,Ve[e+6>>1]|0,i,Ve[v>>1]|0,Ve[k>>1]|0,b,_,Ve[g>>1]|0,Ve[R>>1]|0,c,d,h,w,m,S)|0;Ve[We[e+28>>2]>>1]=o;Ge=O;return}u=We[E>>2]|0;We[E>>2]=u+2;We[e+28>>2]=u;u=e+48|0;n=e+32|0;d=n;d=Xe[d>>1]|Xe[d+2>>1]<<16;n=n+4|0;n=Xe[n>>1]|Xe[n+2>>1]<<16;E=u;h=E;Ve[h>>1]=d;Ve[h+2>>1]=d>>>16;E=E+4|0;Ve[E>>1]=n;Ve[E+2>>1]=n>>>16;E=e+40|0;n=E;n=Xe[n>>1]|Xe[n+2>>1]<<16;E=E+4|0;E=Xe[E>>1]|Xe[E+2>>1]<<16;h=e+56|0;d=h;Ve[d>>1]=n;Ve[d+2>>1]=n>>>16;h=h+4|0;Ve[h>>1]=E;Ve[h+2>>1]=E>>>16;h=e+2|0;Jt(u,0,i,e,h,g,R,S);Zr(0,o,a,s,l,f,e+18|0,e+8|0,y,A,S);s=(Xe[A>>1]|0)+1|0;E=Ve[y>>1]|0;d=s<<16>>16;if((s&65535)<<16>>16<0){p=0-d<<16;if((p|0)<983040)p=E<<16>>16>>(p>>16)&65535;else p=0}else{E=E<<16>>16;p=E<>16>>d|0)==(E|0))p=p&65535;else p=(E>>>15^32767)&65535}Ve[m>>1]=p;Jr(o,e+4|0,e+6|0,S);dt(u,Ve[e>>1]|0,Ve[h>>1]|0,Ve[A>>1]|0,Ve[y>>1]|0,S);Ge=O;return}function Nn(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;i=10;n=e;t=r;e=0;while(1){e=(Ze(Ve[t>>1]>>1,Ve[n>>1]|0)|0)+e|0;e=e+(Ze(Ve[t+2>>1]>>1,Ve[n+2>>1]|0)|0)|0;e=e+(Ze(Ve[t+4>>1]>>1,Ve[n+4>>1]|0)|0)|0;e=e+(Ze(Ve[t+6>>1]>>1,Ve[n+6>>1]|0)|0)|0;i=i+-1<<16>>16;if(!(i<<16>>16))break;else{n=n+8|0;t=t+8|0}}n=e<<1;i=bi(n|1)|0;o=i<<16>>16;n=(i<<16>>16<17?n>>17-o:n<>16<1){r=0;return r|0}else{i=20;t=r;e=0}while(1){r=Ve[t>>1]>>1;r=((Ze(r,r)|0)>>>2)+e|0;e=Ve[t+2>>1]>>1;e=r+((Ze(e,e)|0)>>>2)|0;i=i+-1<<16>>16;if(!(i<<16>>16))break;else t=t+4|0}e=e<<3;i=bi(e)|0;r=i<<16>>16;n=Gt(n,(i<<16>>16<16?e>>16-r:e<>16;if((r|0)>65536)e=n<<16>>16>>e+-1;else e=n<<16>>16<<1-e;r=e&65535;return r|0}function Pn(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0;We[o>>2]=0;u=i<<16>>16;l=u>>>2&65535;d=l<<16>>16==0;if(d)s=0;else{f=l;a=n;s=0;while(1){h=Ve[a>>1]|0;h=(Ze(h,h)|0)+s|0;s=Ve[a+2>>1]|0;s=h+(Ze(s,s)|0)|0;h=Ve[a+4>>1]|0;h=s+(Ze(h,h)|0)|0;s=Ve[a+6>>1]|0;s=h+(Ze(s,s)|0)|0;f=f+-1<<16>>16;if(!(f<<16>>16))break;else a=a+8|0}}if(!((s>>>31^1)&(s|0)<1073741824)){s=u>>>1&65535;if(!(s<<16>>16))s=1;else{a=s;f=n;s=0;while(1){h=Ve[f>>1]>>2;h=(Ze(h,h)|0)+s|0;s=Ve[f+2>>1]>>2;s=h+(Ze(s,s)|0)|0;a=a+-1<<16>>16;if(!(a<<16>>16))break;else f=f+4|0}s=s<<1|1}h=(bi(s)|0)<<16>>16;c=h+65532&65535;h=Ni(s<>16),o)|0}We[o>>2]=0;do{if(!(i<<16>>16)){s=1;w=14}else{u=i;f=r;s=n;i=0;while(1){m=Ze(Ve[s>>1]|0,Ve[f>>1]|0)|0;a=m+i|0;if((m^i|0)>0&(a^i|0)<0)break;u=u+-1<<16>>16;if(!(u<<16>>16)){w=13;break}else{f=f+2|0;s=s+2|0;i=a}}if((w|0)==13){s=a<<1|1;w=14;break}We[o>>2]=1;if(d)s=1;else{s=r;a=0;while(1){a=(Ze(Ve[n>>1]>>2,Ve[s>>1]|0)|0)+a|0;a=a+(Ze(Ve[n+2>>1]>>2,Ve[s+2>>1]|0)|0)|0;a=a+(Ze(Ve[n+4>>1]>>2,Ve[s+4>>1]|0)|0)|0;a=a+(Ze(Ve[n+6>>1]>>2,Ve[s+6>>1]|0)|0)|0;l=l+-1<<16>>16;if(!(l<<16>>16))break;else{s=s+8|0;n=n+8|0}}s=a<<1|1}n=(bi(s)|0)<<16>>16;a=n+65532&65535;n=Ni(s<>16),o)|0}Ve[t>>1]=h;s=c<<16>>16;Ve[t+2>>1]=15-s;Ve[t+4>>1]=n;a=a<<16>>16;Ve[t+6>>1]=15-a;if(n<<16>>16<4){m=0;return m|0}a=Pi(Gt(n<<16>>16>>>1&65535,h)|0,a-s&65535,o)|0;a=a<<16>>16>19661?19661:a;if((e|0)!=7){m=a;return m|0}m=a&65532;return m|0}function Cn(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0;l=(t&65535)+65535&65535;if(l<<16>>16>i<<16>>16){c=t+-1<<16>>16<<16>>16;t=-2147483648;while(1){f=We[e+(0-c<<2)>>2]|0;s=f<<1;f=(s>>1|0)==(f|0)?s:f>>31^2147483647;s=We[e+(~c<<2)>>2]|0;u=f-s|0;if(((u^f)&(f^s)|0)<0){We[a>>2]=1;u=(f>>>31)+2147483647|0}f=We[e+(1-c<<2)>>2]|0;s=u-f|0;if(((s^u)&(f^u)|0)<0){We[a>>2]=1;s=(u>>>31)+2147483647|0}u=Bn(s)|0;t=(u|0)<(t|0)?t:u;l=l+-1<<16>>16;if(l<<16>>16<=i<<16>>16){i=t;break}else c=c+-1|0}}else i=-2147483648;e=n<<16>>16>0;if(e){t=0;s=r;l=0;while(1){u=Ve[s>>1]|0;u=Ze(u,u)|0;if((u|0)!=1073741824){f=(u<<1)+l|0;if((u^l|0)>0&(f^l|0)<0){We[a>>2]=1;l=(l>>>31)+2147483647|0}else l=f}else{We[a>>2]=1;l=2147483647}t=t+1<<16>>16;if(t<<16>>16>=n<<16>>16)break;else s=s+2|0}if(e){e=0;c=r;t=r+-2|0;s=0;while(1){u=Ze(Ve[t>>1]|0,Ve[c>>1]|0)|0;if((u|0)!=1073741824){f=(u<<1)+s|0;if((u^s|0)>0&(f^s|0)<0){We[a>>2]=1;s=(s>>>31)+2147483647|0}else s=f}else{We[a>>2]=1;s=2147483647}e=e+1<<16>>16;if(e<<16>>16>=n<<16>>16)break;else{c=c+2|0;t=t+2|0}}}else s=0}else{l=0;s=0}t=l<<1;t=(t>>1|0)==(l|0)?t:l>>31^2147483647;n=s<<1;n=(n>>1|0)==(s|0)?n:s>>31^2147483647;l=t-n|0;if(((l^t)&(n^t)|0)<0){We[a>>2]=1;l=(t>>>31)+2147483647|0}e=Bn(l)|0;c=((bi(i)|0)&65535)+65535|0;l=c<<16>>16;if((c&65535)<<16>>16>0){t=i<>l|0)!=(i|0))t=i>>31^2147483647}else{l=0-l<<16;if((l|0)<2031616)t=i>>(l>>16);else t=0}u=bi(e)|0;s=u<<16>>16;if(u<<16>>16>0){l=e<>s|0)==(e|0))d=33;else{l=e>>31^2147483647;d=33}}else{l=0-s<<16;if((l|0)<2031616){l=e>>(l>>16);d=33}else f=0}if((d|0)==33)if(l>>>0>65535)f=Gt(t>>>16&65535,l>>>16&65535)|0;else f=0;l=u&65535;d=(c&65535)-l|0;t=d&65535;if(!(d&32768)){a=Pi(f,t,a)|0;Ve[o>>1]=a;return 0}if(t<<16>>16!=-32768){a=l-c|0;s=a<<16>>16;if((a&65535)<<16>>16<0){s=0-s<<16;if((s|0)>=983040){a=0;Ve[o>>1]=a;return 0}a=f<<16>>16>>(s>>16)&65535;Ve[o>>1]=a;return 0}}else s=32767;t=f<<16>>16;l=t<>16>>s|0)==(t|0)){a=l&65535;Ve[o>>1]=a;return 0}a=(t>>>15^32767)&65535;Ve[o>>1]=a;return 0}function In(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;if(n<<16>>16)r=r<<16>>16<<1&65535;if(r<<16>>16<0){e=e+-2|0;r=(r&65535)+6&65535}n=r<<16>>16;t=6-n<<16>>16;r=(Ze(Ve[3468+(n<<1)>>1]|0,Ve[e>>1]|0)|0)+16384|0;r=r+(Ze(Ve[3468+(t<<1)>>1]|0,Ve[e+2>>1]|0)|0)|0;r=r+(Ze(Ve[3468+(n+6<<1)>>1]|0,Ve[e+-2>>1]|0)|0)|0;r=r+(Ze(Ve[3468+(t+6<<1)>>1]|0,Ve[e+4>>1]|0)|0)|0;r=(Ze(Ve[3468+(n+12<<1)>>1]|0,Ve[e+-4>>1]|0)|0)+r|0;r=r+(Ze(Ve[3468+(t+12<<1)>>1]|0,Ve[e+6>>1]|0)|0)|0;n=r+(Ze(Ve[3468+(n+18<<1)>>1]|0,Ve[e+-6>>1]|0)|0)|0;return(n+(Ze(Ve[3468+(t+18<<1)>>1]|0,Ve[e+8>>1]|0)|0)|0)>>>15&65535|0}function Bn(e){e=e|0;e=e-(e>>>31)|0;return e>>31^e|0}function Ln(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0;if(!(e<<16>>16))return;else{i=3518;o=3538;t=n}while(1){t=t+2|0;r=r+2|0;l=Ve[r>>1]|0;s=Ve[i>>1]|0;n=Ze(s,l)|0;n=(n|0)==1073741824?2147483647:n<<1;l=(Ze(Ve[o>>1]|0,l)|0)>>15;a=(l<<1)+n|0;a=(n^l|0)>0&(a^n|0)<0?(n>>>31)+2147483647|0:a;s=(Ze(s,Ve[t>>1]|0)|0)>>15;n=a+(s<<1)|0;n=(a^s|0)>0&(n^a|0)<0?(a>>>31)+2147483647|0:n;Ve[r>>1]=n>>>16;Ve[t>>1]=(n>>>1)-(n>>16<<15);e=e+-1<<16>>16;if(!(e<<16>>16))break;else{i=i+2|0;o=o+2|0}}return}function Un(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0;t=e&65535;i=t<<16;r=r<<16>>16;e=(r<<1)+i|0;if(!((r^i|0)>0&(e^i|0)<0)){i=e;return i|0}We[n>>2]=1;i=(t>>>15)+2147483647|0;return i|0}function xn(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}We[e>>2]=0;r=xi(22)|0;if(!r){t=-1;return t|0}Ve[r>>1]=4096;n=r+2|0;t=n+20|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));We[e>>2]=r;t=0;return t|0}function Hn(e){e=e|0;var r=0;if(!e){r=-1;return r|0}Ve[e>>1]=4096;e=e+2|0;r=e+20|0;do{Ve[e>>1]=0;e=e+2|0}while((e|0)<(r|0));r=0;return r|0}function zn(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function Yn(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0;P=Ge;Ge=Ge+96|0;D=P+66|0;N=P+44|0;T=P+22|0;s=P;R=r+2|0;O=n+2|0;y=(Ve[O>>1]<<1)+(Xe[R>>1]<<16)|0;a=Bn(y)|0;a=dn(a,Ve[r>>1]|0,Ve[n>>1]|0,o)|0;if((y|0)>0)a=qn(a)|0;M=a>>16;Ve[i>>1]=Ni(a,o)|0;S=a>>20;A=D+2|0;Ve[A>>1]=S;y=N+2|0;Ve[y>>1]=(a>>>5)-(S<<15);S=Ze(M,M)|0;S=(S|0)==1073741824?2147483647:S<<1;M=(Ze((a>>>1)-(M<<15)<<16>>16,M)|0)>>15;g=M<<1;F=g+S|0;F=(M^S|0)>0&(F^S|0)<0?(S>>>31)+2147483647|0:F;g=F+g|0;g=2147483647-(Bn((F^M|0)>0&(g^F|0)<0?(F>>>31)+2147483647|0:g)|0)|0;F=g>>16;M=Ve[r>>1]|0;S=Ze(F,M)|0;S=(S|0)==1073741824?2147483647:S<<1;M=(Ze((g>>>1)-(F<<15)<<16>>16,M)|0)>>15;g=(M<<1)+S|0;g=(M^S|0)>0&(g^S|0)<0?(S>>>31)+2147483647|0:g;F=(Ze(Ve[n>>1]|0,F)|0)>>15;S=g+(F<<1)|0;S=(g^F|0)>0&(S^g|0)<0?(g>>>31)+2147483647|0:S;g=bi(S)|0;S=S<<(g<<16>>16);F=T+2|0;M=s+2|0;l=S;S=(S>>>1)-(S>>16<<15)|0;b=s+4|0;v=T+4|0;_=2;k=2;while(1){p=l>>>16;a=p&65535;w=S&65535;m=k+-1|0;u=D+(m<<1)|0;E=N+(m<<1)|0;h=1;d=u;c=E;f=R;s=O;l=0;while(1){C=Ve[f>>1]|0;I=((Ze(Ve[c>>1]|0,C)|0)>>15)+l|0;l=Ve[d>>1]|0;l=I+(Ze(l,C)|0)+((Ze(l,Ve[s>>1]|0)|0)>>15)|0;h=h+1<<16>>16;if((h<<16>>16|0)>=(k|0))break;else{d=d+-2|0;c=c+-2|0;f=f+2|0;s=s+2|0}}I=(Xe[r+(k<<1)>>1]<<16)+(l<<5)+(Ve[n+(k<<1)>>1]<<1)|0;l=dn(Bn(I)|0,a,w,o)|0;if((I|0)>0)l=qn(l)|0;s=g<<16>>16;if(g<<16>>16>0){a=l<>s|0)!=(l|0))a=l>>31^2147483647}else{s=0-s<<16;if((s|0)<2031616)a=l>>(s>>16);else a=0}h=a>>16;if((k|0)<5)Ve[i+(m<<1)>>1]=(a+32768|0)>>>16;I=(a>>>16)-(a>>>31)|0;if(((I<<16>>31^I)&65535)<<16>>16>32750){a=16;break}c=(a>>>1)-(h<<15)<<16>>16;d=1;l=E;s=F;f=M;while(1){C=(Ze(Ve[l>>1]|0,h)|0)>>15;E=Ve[u>>1]|0;I=(Ze(E,c)|0)>>15;E=Ze(E,h)|0;I=E+C+(Ve[N+(d<<1)>>1]|0)+(Ve[D+(d<<1)>>1]<<15)+I|0;Ve[s>>1]=I>>>15;Ve[f>>1]=I&32767;d=d+1|0;if((d&65535)<<16>>16==_<<16>>16)break;else{u=u+-2|0;l=l+-2|0;s=s+2|0;f=f+2|0}}Ve[v>>1]=a>>20;Ve[b>>1]=(a>>>5)-(Ve[T+(k<<1)>>1]<<15);C=Ze(h,h)|0;C=(C|0)==1073741824?2147483647:C<<1;a=(Ze(c,h)|0)>>15;I=a<<1;s=I+C|0;s=(a^C|0)>0&(s^C|0)<0?(C>>>31)+2147483647|0:s;I=s+I|0;I=2147483647-(Bn((s^a|0)>0&(I^s|0)<0?(s>>>31)+2147483647|0:I)|0)|0;s=I>>16;a=p<<16>>16;a=((Ze(s,S<<16>>16)|0)>>15)+(Ze(s,a)|0)+((Ze((I>>>1)-(s<<15)<<16>>16,a)|0)>>15)<<1;s=(bi(a)|0)<<16>>16;a=a<=11){a=20;break}else{g=s+(g&65535)&65535;l=a;S=(a>>1)-(a>>16<<15)|0;b=b+2|0;v=v+2|0;_=_+1<<16>>16}}if((a|0)==16){a=t+22|0;do{Ve[t>>1]=Ve[e>>1]|0;t=t+2|0;e=e+2|0}while((t|0)<(a|0));I=i;C=I;Ve[C>>1]=0;Ve[C+2>>1]=0>>>16;I=I+4|0;Ve[I>>1]=0;Ve[I+2>>1]=0>>>16;Ge=P;return 0}else if((a|0)==20){Ve[t>>1]=4096;I=((Ve[y>>1]|0)+8192+(Ve[A>>1]<<15)|0)>>>14&65535;Ve[t+2>>1]=I;Ve[e+2>>1]=I;I=((Ve[N+4>>1]|0)+8192+(Ve[D+4>>1]<<15)|0)>>>14&65535;Ve[t+4>>1]=I;Ve[e+4>>1]=I;I=((Ve[N+6>>1]|0)+8192+(Ve[D+6>>1]<<15)|0)>>>14&65535;Ve[t+6>>1]=I;Ve[e+6>>1]=I;I=((Ve[N+8>>1]|0)+8192+(Ve[D+8>>1]<<15)|0)>>>14&65535;Ve[t+8>>1]=I;Ve[e+8>>1]=I;I=((Ve[N+10>>1]|0)+8192+(Ve[D+10>>1]<<15)|0)>>>14&65535;Ve[t+10>>1]=I;Ve[e+10>>1]=I;I=((Ve[N+12>>1]|0)+8192+(Ve[D+12>>1]<<15)|0)>>>14&65535;Ve[t+12>>1]=I;Ve[e+12>>1]=I;I=((Ve[N+14>>1]|0)+8192+(Ve[D+14>>1]<<15)|0)>>>14&65535;Ve[t+14>>1]=I;Ve[e+14>>1]=I;I=((Ve[N+16>>1]|0)+8192+(Ve[D+16>>1]<<15)|0)>>>14&65535;Ve[t+16>>1]=I;Ve[e+16>>1]=I;I=((Ve[N+18>>1]|0)+8192+(Ve[D+18>>1]<<15)|0)>>>14&65535;Ve[t+18>>1]=I;Ve[e+18>>1]=I;I=((Ve[N+20>>1]|0)+8192+(Ve[D+20>>1]<<15)|0)>>>14&65535;Ve[t+20>>1]=I;Ve[e+20>>1]=I;Ge=P;return 0}return 0}function jn(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;t=e>>16;Ve[r>>1]=t;Ve[n>>1]=(e>>>1)-(t<<15);return}function qn(e){e=e|0;return((e|0)==-2147483648?2147483647:0-e|0)|0}function Kn(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(4)|0;if(!r){e=-1;return e|0}We[r>>2]=0;if(!((xn(r)|0)<<16>>16)){Hn(We[r>>2]|0)|0;We[e>>2]=r;e=0;return e|0}else{zn(r);Hi(r);e=-1;return e|0}return 0}function Vn(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;zn(r);Hi(We[e>>2]|0);We[e>>2]=0;return}function Wn(e){e=e|0;if(!e){e=-1;return e|0}Hn(We[e>>2]|0)|0;e=0;return e|0}function Xn(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0;u=Ge;Ge=Ge+64|0;f=u+48|0;l=u+22|0;s=u;if((r|0)==7){n=We[o+116>>2]|0;xr(t,10,s,l,We[o+112>>2]|0,a)|0;Ln(10,s,l,a);Yn(We[e>>2]|0,s,l,i+22|0,f,a)|0;xr(t,10,s,l,n,a)|0;Ln(10,s,l,a);Yn(We[e>>2]|0,s,l,i+66|0,f,a)|0;Ge=u;return}else{xr(n,10,s,l,We[o+108>>2]|0,a)|0;Ln(10,s,l,a);Yn(We[e>>2]|0,s,l,i+66|0,f,a)|0;Ge=u;return}}function Gn(e,r,n,t,i,o,a,s,l,f){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;if((n|0)==6){Ve[i>>1]=ot(e,r,t,20,143,80,o,a,s,l,f)|0;return}Ve[a>>1]=0;Ve[a+2>>1]=0;if(n>>>0<2){Ve[i>>1]=et(r,n,t,20,143,160,s,l,f)|0;return}if(n>>>0<6){Ve[i>>1]=et(r,n,t,20,143,80,s,l,f)|0;return}else{Ve[i>>1]=et(r,n,t,18,143,80,s,l,f)|0;return}}function Zn(e){e=e|0;var r=0;if((e|0)!=0?(We[e>>2]=0,r=xi(2)|0,(r|0)!=0):0){Ve[r>>1]=0;We[e>>2]=r;r=0}else r=-1;return r|0}function Jn(e){e=e|0;if(!e)e=-1;else{Ve[e>>1]=0;e=0}return e|0}function Qn(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function $n(e,r,n,t,i,o,a,s,l,f,u,c){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;var d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0;j=Ge;Ge=Ge+240|0;p=j+160|0;S=j+80|0;L=j;B=Ve[3558+(r*18|0)>>1]|0;Y=Ve[3558+(r*18|0)+2>>1]|0;d=Ve[3558+(r*18|0)+4>>1]|0;U=Ve[3558+(r*18|0)+6>>1]|0;m=Ve[3558+(r*18|0)+12>>1]|0;w=Ve[3558+(r*18|0)+14>>1]|0;h=Ve[3558+(r*18|0)+16>>1]|0;e:do{switch(s<<16>>16){case 0:case 80:if(r>>>0<2&s<<16>>16==80){x=(Xe[e>>1]|0)-(m&65535)|0;x=(x<<16>>16|0)<(h<<16>>16|0)?h:x&65535;I=w<<16>>16;H=(x&65535)+I&65535;z=H<<16>>16>143;x=z?143-I&65535:x;H=z?143:H;z=1;break e}else{x=(Xe[n+((s<<16>>16!=0&1)<<1)>>1]|0)-(Xe[3558+(r*18|0)+8>>1]|0)|0;x=(x<<16>>16|0)<(h<<16>>16|0)?h:x&65535;I=Ve[3558+(r*18|0)+10>>1]|0;H=(x&65535)+I&65535;z=H<<16>>16>143;x=z?143-I&65535:x;H=z?143:H;z=0;break e}default:{x=(Xe[e>>1]|0)-(m&65535)|0;x=(x<<16>>16|0)<(h<<16>>16|0)?h:x&65535;I=w<<16>>16;H=(x&65535)+I&65535;z=H<<16>>16>143;x=z?143-I&65535:x;H=z?143:H;z=1}}}while(0);C=x&65535;s=C+65532|0;E=s&65535;P=(H&65535)+4&65535;I=s<<16>>16;s=0-(s&65535)|0;m=s&65535;ln(t+(s<<16>>16<<1)|0,o,p,a);s=a<<16>>16;M=s>>>1&65535;b=M<<16>>16==0;if(b)a=1;else{a=M;h=p;n=S;w=0;while(1){N=Ve[h>>1]|0;Ve[n>>1]=N>>>2;N=(Ze(N,N)|0)+w|0;w=Ve[h+2>>1]|0;Ve[n+2>>1]=w>>>2;w=N+(Ze(w,w)|0)|0;a=a+-1<<16>>16;if(!(a<<16>>16))break;else{h=h+4|0;n=n+4|0}}a=(w|0)<33554433}N=a?0:2;F=a?p:S;v=a?p:S;e:do{if(E<<16>>16<=P<<16>>16){_=s+-1|0;O=F+(_<<1)|0;T=o+(_<<1)|0;D=F+(s+-2<<1)|0;R=_>>>1;A=R&65535;k=A<<16>>16==0;y=a?12:14;R=(R<<1)+131070&131070;n=s+-3-R|0;g=F+(n<<1)|0;R=F+(s+-4-R<<1)|0;o=o+(n<<1)|0;if(!b){b=I;while(1){S=M;p=v;h=i;w=0;a=0;while(1){S=S+-1<<16>>16;s=Ve[p>>1]|0;w=(Ze(s,Ve[h>>1]|0)|0)+w|0;s=(Ze(s,s)|0)+a|0;a=Ve[p+2>>1]|0;w=w+(Ze(a,Ve[h+2>>1]|0)|0)|0;a=s+(Ze(a,a)|0)|0;if(!(S<<16>>16))break;else{p=p+4|0;h=h+4|0}}p=ai(a<<1,c)|0;a=p>>16;h=w<<1>>16;S=Ze(a,h)|0;S=(S|0)==1073741824?2147483647:S<<1;h=(Ze((p>>>1)-(a<<15)<<16>>16,h)|0)>>15;p=(h<<1)+S|0;p=(h^S|0)>0&(p^S|0)<0?(S>>>31)+2147483647|0:p;a=(Ze(a,w&32767)|0)>>15;S=p+(a<<1)|0;Ve[L+(b-I<<1)>>1]=(p^a|0)>0&(S^p|0)<0?(p>>>31)+65535|0:S;if(E<<16>>16!=P<<16>>16){m=m+-1<<16>>16;S=Ve[t+(m<<16>>16<<1)>>1]|0;if(k){p=_;a=D;w=T;h=O}else{p=A;a=D;w=T;h=O;while(1){b=(Ze(Ve[w>>1]|0,S)|0)>>y;Ve[h>>1]=b+(Xe[a>>1]|0);b=(Ze(Ve[w+-2>>1]|0,S)|0)>>y;Ve[h+-2>>1]=b+(Xe[a+-2>>1]|0);p=p+-1<<16>>16;if(!(p<<16>>16)){p=n;a=R;w=o;h=g;break}else{a=a+-4|0;w=w+-4|0;h=h+-4|0}}}b=(Ze(Ve[w>>1]|0,S)|0)>>y;Ve[h>>1]=b+(Xe[a>>1]|0);Ve[F+(p+-1<<1)>>1]=S>>N}E=E+1<<16>>16;if(E<<16>>16>P<<16>>16)break e;else b=E<<16>>16}}if(k){a=F+(s+-2<<1)|0;w=I;while(1){ai(0,c)|0;Ve[L+(w-I<<1)>>1]=0;if(E<<16>>16!=P<<16>>16){m=m+-1<<16>>16;i=Ve[t+(m<<16>>16<<1)>>1]|0;A=(Ze(Ve[T>>1]|0,i)|0)>>y;Ve[O>>1]=A+(Xe[D>>1]|0);Ve[a>>1]=i>>N}E=E+1<<16>>16;if(E<<16>>16>P<<16>>16)break e;else w=E<<16>>16}}p=F+(n+-1<<1)|0;a=I;while(1){ai(0,c)|0;Ve[L+(a-I<<1)>>1]=0;if(E<<16>>16!=P<<16>>16){m=m+-1<<16>>16;a=Ve[t+(m<<16>>16<<1)>>1]|0;w=A;h=D;n=T;s=O;while(1){i=(Ze(Ve[n>>1]|0,a)|0)>>y;Ve[s>>1]=i+(Xe[h>>1]|0);i=(Ze(Ve[n+-2>>1]|0,a)|0)>>y;Ve[s+-2>>1]=i+(Xe[h+-2>>1]|0);w=w+-1<<16>>16;if(!(w<<16>>16))break;else{h=h+-4|0;n=n+-4|0;s=s+-4|0}}i=(Ze(Ve[o>>1]|0,a)|0)>>y;Ve[g>>1]=i+(Xe[R>>1]|0);Ve[p>>1]=a>>N}E=E+1<<16>>16;if(E<<16>>16>P<<16>>16)break;else a=E<<16>>16}}}while(0);E=x<<16>>16;n=C+1&65535;if(n<<16>>16>H<<16>>16)o=x;else{m=x;s=Ve[L+(E-I<<1)>>1]|0;while(1){w=Ve[L+((n<<16>>16)-I<<1)>>1]|0;h=w<<16>>16>16;m=h?m:n;n=n+1<<16>>16;if(n<<16>>16>H<<16>>16){o=m;break}else s=h?s:w}}e:do{if(!(z<<16>>16==0?o<<16>>16>B<<16>>16:0)){if(!(r>>>0<4&z<<16>>16!=0)){m=L+((o<<16>>16)-I<<1)|0;w=In(m,d,Y,c)|0;n=(d&65535)+1&65535;if(n<<16>>16<=U<<16>>16)while(1){h=In(m,n,Y,c)|0;s=h<<16>>16>w<<16>>16;d=s?n:d;n=n+1<<16>>16;if(n<<16>>16>U<<16>>16)break;else w=s?h:w}if((r+-7|0)>>>0<2){U=d<<16>>16==-3;n=(U<<31>>31)+o<<16>>16;d=U?3:d;break}switch(d<<16>>16){case-2:{n=o+-1<<16>>16;d=1;break e}case 2:{n=o+1<<16>>16;d=-1;break e}default:{n=o;break e}}}B=Ve[e>>1]|0;B=((B<<16>>16)-E|0)>5?E+5&65535:B;s=H<<16>>16;B=(s-(B<<16>>16)|0)>4?s+65532&65535:B;s=o<<16>>16;n=B<<16>>16;if((s|0)==(n+-1|0)?1:o<<16>>16==B<<16>>16){m=L+(s-I<<1)|0;s=In(m,d,Y,c)|0;n=(d&65535)+1&65535;if(n<<16>>16<=U<<16>>16)while(1){w=In(m,n,Y,c)|0;h=w<<16>>16>s<<16>>16;d=h?n:d;n=n+1<<16>>16;if(n<<16>>16>U<<16>>16)break;else s=h?w:s}if((r+-7|0)>>>0<2){U=d<<16>>16==-3;n=(U<<31>>31)+o<<16>>16;d=U?3:d;break}switch(d<<16>>16){case-2:{n=o+-1<<16>>16;d=1;break e}case 2:{n=o+1<<16>>16;d=-1;break e}default:{n=o;break e}}}if((s|0)==(n+-2|0)){n=L+(s-I<<1)|0;s=In(n,0,Y,c)|0;if((r|0)!=8){d=0;m=1;while(1){w=In(n,m,Y,c)|0;h=w<<16>>16>s<<16>>16;d=h?m:d;m=m+1<<16>>16;if(m<<16>>16>U<<16>>16)break;else s=h?w:s}if((r+-7|0)>>>0>=2)switch(d<<16>>16){case-2:{n=o+-1<<16>>16;d=1;break e}case 2:{n=o+1<<16>>16;d=-1;break e}default:{n=o;break e}}}else d=0;U=d<<16>>16==-3;n=(U<<31>>31)+o<<16>>16;d=U?3:d;break}if((s|0)==(n+1|0)){m=L+(s-I<<1)|0;n=In(m,d,Y,c)|0;s=(d&65535)+1&65535;if(s<<16>>16<=0)while(1){h=In(m,s,Y,c)|0;w=h<<16>>16>n<<16>>16;d=w?s:d;s=s+1<<16>>16;if(s<<16>>16>0)break;else n=w?h:n}if((r+-7|0)>>>0<2){U=d<<16>>16==-3;n=(U<<31>>31)+o<<16>>16;d=U?3:d;break}switch(d<<16>>16){case-2:{n=o+-1<<16>>16;d=1;break e}case 2:{n=o+1<<16>>16;d=-1;break e}default:{n=o;break e}}}else{n=o;d=0}}else{n=o;d=0}}while(0);if((r+-7|0)>>>0>1){U=e;e=bn(n,d,Ve[e>>1]|0,x,H,z,r>>>0<4&1,c)|0;Ve[u>>1]=e;Ve[U>>1]=n;Ve[f>>1]=Y;Ve[l>>1]=d;Ge=j;return n|0}else{c=vn(n,d,x,z,c)|0;Ve[u>>1]=c;Ve[e>>1]=n;Ve[f>>1]=Y;Ve[l>>1]=d;Ge=j;return n|0}return 0}function et(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;var f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0;R=Ge;Ge=Ge+1200|0;M=R+1188|0;F=R+580|0;g=R+578|0;k=R+576|0;S=R;v=R+582|0;_=(s|0)!=0;do{if(_)if(r>>>0<2){zt(e,1,l);break}else{zt(e,0,l);break}}while(0);b=i<<16>>16;c=0-b|0;u=n+(c<<1)|0;c=c&65535;m=o<<16>>16;do{if(c<<16>>16>16){w=c;h=u;c=0;while(1){E=Ve[h>>1]|0;c=(Ze(E<<1,E)|0)+c|0;if((c|0)<0)break;w=w+1<<16>>16;if(w<<16>>16>=o<<16>>16){p=14;break}else h=h+2|0}if((p|0)==14){if((c|0)<1048576){p=15;break}qi(v|0,u|0,m+b<<1|0)|0;E=0;break}f=m+b|0;d=f>>>1;w=d&65535;if(!(w<<16>>16))c=v;else{E=((d<<1)+131070&131070)+2|0;m=E-b|0;h=v;while(1){Ve[h>>1]=(Ve[u>>1]|0)>>>3;Ve[h+2>>1]=(Ve[u+2>>1]|0)>>>3;w=w+-1<<16>>16;if(!(w<<16>>16))break;else{u=u+4|0;h=h+4|0}}u=n+(m<<1)|0;c=v+(E<<1)|0}if(!(f&1))E=3;else{Ve[c>>1]=(Ve[u>>1]|0)>>>3;E=3}}else p=15}while(0);if((p|0)==15){E=m+b|0;c=E>>>1;d=c&65535;if(!(d<<16>>16))c=v;else{m=((c<<1)+131070&131070)+2|0;h=m-b|0;w=v;while(1){Ve[w>>1]=Ve[u>>1]<<3;Ve[w+2>>1]=Ve[u+2>>1]<<3;d=d+-1<<16>>16;if(!(d<<16>>16))break;else{u=u+4|0;w=w+4|0}}u=n+(h<<1)|0;c=v+(m<<1)|0}if(!(E&1))E=-3;else{Ve[c>>1]=Ve[u>>1]<<3;E=-3}}m=S+(b<<2)|0;h=v+(b<<1)|0;Xr(h,o,i,t,m);f=(r|0)==7&1;c=t<<16>>16;u=c<<2;if((u|0)!=(c<<18>>16|0)){We[l>>2]=1;u=t<<16>>16>0?32767:-32768}w=rt(e,m,h,E,f,o,i,u&65535,M,s,l)|0;c=c<<1;d=rt(e,m,h,E,f,o,u+65535&65535,c&65535,F,s,l)|0;c=rt(e,m,h,E,f,o,c+65535&65535,t,g,s,l)|0;if(a<<16>>16==1&_){Cn(m,h,o,i,t,k,l)|0;xt(e,Ve[k>>1]|0)}u=Ve[M>>1]|0;f=Ve[F>>1]|0;if(((u<<16>>16)*55706>>16|0)>=(f<<16>>16|0)){F=u;M=w;F=F<<16>>16;F=F*55706|0;F=F>>16;g=Ve[g>>1]|0;g=g<<16>>16;g=(F|0)<(g|0);g=g?c:M;Ge=R;return g|0}Ve[M>>1]=f;F=f;M=d;F=F<<16>>16;F=F*55706|0;F=F>>16;g=Ve[g>>1]|0;g=g<<16>>16;g=(F|0)<(g|0);g=g?c:M;Ge=R;return g|0}function rt(e,r,n,t,i,o,a,s,l,f,u){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;var c=0,d=0,h=0,w=0,m=0;if(a<<16>>16>16){s=-2147483648;h=a}else{h=a;c=-2147483648;d=r+(0-(a<<16>>16)<<2)|0;r=a;while(1){a=We[d>>2]|0;m=(a|0)<(c|0);r=m?r:h;c=m?c:a;h=h+-1<<16>>16;if(h<<16>>16>16){s=c;h=r;break}else d=d+4|0}}r=o<<16>>16>>>2&65535;if(!(r<<16>>16))r=0;else{c=r;a=n+(0-(h<<16>>16)<<1)|0;r=0;while(1){m=Ve[a>>1]|0;m=(Ze(m,m)|0)+r|0;r=Ve[a+2>>1]|0;r=m+(Ze(r,r)|0)|0;m=Ve[a+4>>1]|0;m=r+(Ze(m,m)|0)|0;r=Ve[a+6>>1]|0;r=m+(Ze(r,r)|0)|0;c=c+-1<<16>>16;if(!(c<<16>>16))break;else a=a+8|0}r=r<<1}if(f)Ht(e,s,r,u);r=ai(r,u)|0;a=i<<16>>16!=0;if(a)r=(r|0)>1073741823?2147483647:r<<1;i=s>>16;e=r>>16;u=Ze(e,i)|0;u=(u|0)==1073741824?2147483647:u<<1;r=(Ze((r>>>1)-(e<<15)<<16>>16,i)|0)>>15;m=(r<<1)+u|0;m=(r^u|0)>0&(m^u|0)<0?(u>>>31)+2147483647|0:m;i=(Ze(e,(s>>>1)-(i<<15)<<16>>16)|0)>>15;r=m+(i<<1)|0;r=(m^i|0)>0&(r^m|0)<0?(m>>>31)+2147483647|0:r;if(!a){Ve[l>>1]=r;return h|0}a=t<<16>>16;if(t<<16>>16>0)if(t<<16>>16<31){a=r>>a;w=16}else a=0;else{w=0-a<<16>>16;a=r<>w|0)==(r|0)?a:r>>31^2147483647;w=16}if((w|0)==16){if((a|0)>65535){Ve[l>>1]=32767;return h|0}if((a|0)<-65536){Ve[l>>1]=-32768;return h|0}}Ve[l>>1]=a>>>1;return h|0}function nt(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(6)|0;if(!r){e=-1;return e|0}Ve[r>>1]=40;Ve[r+2>>1]=0;Ve[r+4>>1]=0;We[e>>2]=r;e=0;return e|0}function tt(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=40;Ve[e+2>>1]=0;Ve[e+4>>1]=0;e=0;return e|0}function it(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function ot(e,r,n,t,i,o,a,s,l,f,u){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;var c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0;y=Ge;Ge=Ge+1200|0;b=y+1186|0;v=y+1184|0;A=y+1182|0;S=y;k=y+576|0;_=i<<16>>16;R=k+(_<<1)|0;c=(0-_&65535)<<16>>16>16;if(c){m=0-i<<16>>16<<16>>16;d=0;do{w=Ve[n+(m<<1)>>1]|0;w=Ze(w,w)|0;if((w|0)!=1073741824){h=(w<<1)+d|0;if((w^d|0)>0&(h^d|0)<0){We[u>>2]=1;d=(d>>>31)+2147483647|0}else d=h}else{We[u>>2]=1;d=2147483647}m=m+1|0}while((m&65535)<<16>>16!=o<<16>>16)}else d=0;if((2147483646-d&d|0)>=0)if((d|0)==2147483647){if(c){d=0-i<<16>>16<<16>>16;do{Ve[k+(d+_<<1)>>1]=Pi(Ve[n+(d<<1)>>1]|0,3,u)|0;d=d+1|0}while((d&65535)<<16>>16!=o<<16>>16)}}else E=14;else{We[u>>2]=1;E=14}do{if((E|0)==14){if((1048575-d&d|0)<0){We[u>>2]=1;d=(d>>>31)+2147483647|0}else d=d+-1048576|0;if((d|0)>=0){if(!c)break;g=0-i<<16>>16<<16>>16;qi(k+(_+g<<1)|0,n+(g<<1)|0,(((o+i<<16>>16)+-1&65535)<<1)+2|0)|0;break}if(c){d=0-i<<16>>16<<16>>16;do{g=Ve[n+(d<<1)>>1]|0;Ve[k+(d+_<<1)>>1]=(g<<19>>19|0)==(g|0)?g<<3:g>>>15^32767;d=d+1|0}while((d&65535)<<16>>16!=o<<16>>16)}}}while(0);M=S+(_<<2)|0;Xr(R,o,i,t,M);m=Ve[e>>1]|0;g=e+4|0;F=s+(l<<16>>16<<1)|0;e:do{if(i<<16>>16>16)p=i;else{if((Ve[g>>1]|0)<=0){n=i;s=-2147483648;w=i;E=3402;while(1){jn(We[S+(_-(n<<16>>16)<<2)>>2]|0,b,v,u);h=Ve[v>>1]|0;d=Ve[E>>1]|0;m=Ze(d,Ve[b>>1]|0)|0;if((m|0)==1073741824){We[u>>2]=1;c=2147483647}else c=m<<1;p=(Ze(d,h<<16>>16)|0)>>15;m=c+(p<<1)|0;if((c^p|0)>0&(m^c|0)<0){We[u>>2]=1;m=(c>>>31)+2147483647|0}h=(m|0)<(s|0);w=h?w:n;n=n+-1<<16>>16;if(n<<16>>16>16){p=w;break e}else{s=h?s:m;E=E+-2|0}}}s=i;c=-2147483648;w=i;p=2902+(_+123-(m<<16>>16)<<1)|0;n=3402;while(1){jn(We[S+(_-(s<<16>>16)<<2)>>2]|0,b,v,u);E=Ve[v>>1]|0;h=Ve[n>>1]|0;m=Ze(h,Ve[b>>1]|0)|0;if((m|0)==1073741824){We[u>>2]=1;d=2147483647}else d=m<<1;E=(Ze(h,E<<16>>16)|0)>>15;m=d+(E<<1)|0;if((d^E|0)>0&(m^d|0)<0){We[u>>2]=1;m=(d>>>31)+2147483647|0}jn(m,b,v,u);E=Ve[v>>1]|0;h=Ve[p>>1]|0;m=Ze(h,Ve[b>>1]|0)|0;if((m|0)==1073741824){We[u>>2]=1;d=2147483647}else d=m<<1;E=(Ze(h,E<<16>>16)|0)>>15;m=d+(E<<1)|0;if((d^E|0)>0&(m^d|0)<0){We[u>>2]=1;m=(d>>>31)+2147483647|0}h=(m|0)<(c|0);w=h?w:s;s=s+-1<<16>>16;if(s<<16>>16>16){p=w;break}else{c=h?c:m;p=p+-2|0;n=n+-2|0}}}}while(0);if(o<<16>>16>0){s=0;n=R;E=k+(_-(p<<16>>16)<<1)|0;w=0;d=0;while(1){m=Ve[E>>1]|0;h=Ze(m,Ve[n>>1]|0)|0;if((h|0)!=1073741824){c=(h<<1)+w|0;if((h^w|0)>0&(c^w|0)<0){We[u>>2]=1;w=(w>>>31)+2147483647|0}else w=c}else{We[u>>2]=1;w=2147483647}c=Ze(m,m)|0;if((c|0)!=1073741824){h=(c<<1)+d|0;if((c^d|0)>0&(h^d|0)<0){We[u>>2]=1;d=(d>>>31)+2147483647|0}else d=h}else{We[u>>2]=1;d=2147483647}s=s+1<<16>>16;if(s<<16>>16>=o<<16>>16)break;else{n=n+2|0;E=E+2|0}}}else{w=0;d=0}h=(f|0)==0;if(!h){zt(r,0,u);Ht(r,w,d,u)}c=(Ni(d,u)|0)<<16>>16;if((c*13107|0)==1073741824){We[u>>2]=1;d=2147483647}else d=c*26214|0;c=w-d|0;if(((c^w)&(d^w)|0)<0){We[u>>2]=1;c=(w>>>31)+2147483647|0}f=Ni(c,u)|0;Ve[F>>1]=f;if(f<<16>>16>0){c=a+6|0;Ve[a+8>>1]=Ve[c>>1]|0;f=a+4|0;Ve[c>>1]=Ve[f>>1]|0;c=a+2|0;Ve[f>>1]=Ve[c>>1]|0;Ve[c>>1]=Ve[a>>1]|0;Ve[a>>1]=p;Ve[e>>1]=ri(a,5)|0;Ve[e+2>>1]=32767;c=32767}else{Ve[e>>1]=p;e=e+2|0;c=((Ve[e>>1]|0)*29491|0)>>>15&65535;Ve[e>>1]=c}Ve[g>>1]=((Bi(c,9830,u)|0)&65535)>>>15^1;if(h){Ge=y;return p|0}if((Bi(l,1,u)|0)<<16>>16){Ge=y;return p|0}Cn(M,R,o,i,t,A,u)|0;xt(r,Ve[A>>1]|0);Ge=y;return p|0}function at(e,r,n,t,i,o,a,s,l,f){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;var u=0,c=0;f=Ge;Ge=Ge+48|0;c=f+22|0;u=f;r=e>>>0<6?r:n;n=o<<16>>16>0?22:0;e=i+(n<<1)|0;Ui(e,r,c);Ui(e,t,u);e=o<<16>>16;o=l+(e<<1)|0;Di(c,a+(e<<1)|0,o,40);Li(u,o,o,40,s,1);n=i+(((n<<16)+720896|0)>>>16<<1)|0;Ui(n,r,c);Ui(n,t,u);e=(e<<16)+2621440>>16;l=l+(e<<1)|0;Di(c,a+(e<<1)|0,l,40);Li(u,l,l,40,s,1);Ge=f;return}function st(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(12)|0;if(!r){e=-1;return e|0}Ve[r>>1]=0;Ve[r+2>>1]=0;Ve[r+4>>1]=0;Ve[r+6>>1]=0;Ve[r+8>>1]=0;Ve[r+10>>1]=0;We[e>>2]=r;e=0;return e|0}function lt(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=0;Ve[e+2>>1]=0;Ve[e+4>>1]=0;Ve[e+6>>1]=0;Ve[e+8>>1]=0;Ve[e+10>>1]=0;e=0;return e|0}function ft(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function ut(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0;c=e+10|0;i=Ve[c>>1]|0;d=e+8|0;t=Ve[d>>1]|0;if(!(n<<16>>16)){e=t;u=i;Ve[c>>1]=u;Ve[d>>1]=e;return}s=e+4|0;l=e+6|0;f=e+2|0;a=Ve[l>>1]|0;u=Ve[s>>1]|0;o=n;n=i;while(1){h=(Ze(Ve[e>>1]|0,-3733)|0)+(((u<<16>>16)*7807|0)+((a<<16>>16)*7807>>15))|0;Ve[e>>1]=u;h=h+((Ze(Ve[f>>1]|0,-3733)|0)>>15)|0;Ve[f>>1]=a;h=((n<<16>>16)*1899|0)+h+(Ze(t<<16>>16,-3798)|0)|0;n=Ve[r>>1]|0;h=h+((n<<16>>16)*1899|0)|0;Ve[r>>1]=(h+2048|0)>>>12;i=h>>>12;u=i&65535;Ve[s>>1]=u;a=(h<<3)-(i<<15)&65535;Ve[l>>1]=a;o=o+-1<<16>>16;if(!(o<<16>>16))break;else{h=t;r=r+2|0;t=n;n=h}}Ve[c>>1]=t;Ve[d>>1]=n;return}function ct(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0;i=Ve[(We[t+88>>2]|0)+(e<<1)>>1]|0;if(!(i<<16>>16))return;s=n;a=We[(We[t+92>>2]|0)+(e<<2)>>2]|0;while(1){n=Ve[a>>1]|0;if(!(n<<16>>16))n=0;else{e=Ve[r>>1]|0;o=n;t=s+((n<<16>>16)+-1<<1)|0;while(1){n=e<<16>>16;Ve[t>>1]=n&1;o=o+-1<<16>>16;if(!(o<<16>>16))break;else{e=n>>>1&65535;t=t+-2|0}}n=Ve[a>>1]|0}r=r+2|0;i=i+-1<<16>>16;if(!(i<<16>>16))break;else{s=s+(n<<16>>16<<1)|0;a=a+2|0}}return}function dt(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0;u=Ge;Ge=Ge+16|0;l=u+2|0;f=u;a=i<<16>>16;if(i<<16>>16<1){o=-5443;f=-32768;Qt(e,f,o);Ge=u;return}s=_i(14,n,o)|0;if((a|0)<(s<<16>>16|0))n=t;else{n=(t&65535)+1&65535;i=a>>>1&65535}t=Gt(i,s&65535)|0;Ve[f>>1]=t;si(t<<16>>16,l,f,o);Ve[l>>1]=((((n&65535)-(r&65535)<<16)+-65536|0)>>>16)+(Xe[l>>1]|0);t=Ci(Ve[f>>1]|0,5,o)|0;a=Ve[l>>1]|0;t=((a&65535)<<10)+(t&65535)&65535;if(t<<16>>16>18284){o=3037;f=18284;Qt(e,f,o);Ge=u;return}i=Ve[f>>1]|0;a=a<<16>>16;if((a*24660|0)==1073741824){We[o>>2]=1;n=2147483647}else n=a*49320|0;f=(i<<16>>16)*24660>>15;a=n+(f<<1)|0;if((n^f|0)>0&(a^n|0)<0){We[o>>2]=1;a=(n>>>31)+2147483647|0}f=a<<13;o=Ni((f>>13|0)==(a|0)?f:a>>31^2147483647,o)|0;f=t;Qt(e,f,o);Ge=u;return}function ht(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m,E,p,S,b){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;E=E|0;p=p|0;S=S|0;b=b|0;var v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0,$=0,ee=0,re=0,ne=0;ne=Ge;Ge=Ge+80|0;Q=ne+66|0;$=ne+64|0;ee=ne+62|0;re=ne+60|0;B=ne+40|0;L=ne+20|0;C=ne;Ve[Q>>1]=r;Ve[$>>1]=l;Ve[ee>>1]=f;P=_i(14,n,b)|0;J=P&65535;Ve[re>>1]=J;I=_i(14,f,b)|0;N=(Xe[t>>1]|0)+65523|0;Ve[C>>1]=N;R=(Xe[t+2>>1]|0)+65522|0;A=C+2|0;Ve[A>>1]=R;y=((r&65535)<<16)+-720896|0;F=y>>16;y=(y>>>15)+15+(Xe[t+4>>1]|0)|0;O=C+4|0;Ve[O>>1]=y;T=(Xe[t+6>>1]|0)+F|0;D=C+6|0;Ve[D>>1]=T;F=F+1+(Xe[t+8>>1]|0)|0;M=C+8|0;Ve[M>>1]=F;v=(Xe[u>>1]|0)+65523&65535;Ve[C+10>>1]=v;g=(Xe[u+2>>1]|0)+65522&65535;Ve[C+12>>1]=g;_=((l&65535)<<16)+-720896|0;t=_>>16;_=(_>>>15)+15+(Xe[u+4>>1]|0)&65535;Ve[C+14>>1]=_;k=(Xe[u+6>>1]|0)+t&65535;Ve[C+16>>1]=k;t=t+1+(Xe[u+8>>1]|0)&65535;Ve[C+18>>1]=t;G=(o&65535)-(d&65535)<<16;l=G>>16;if((G|0)>0){f=a;n=h<<16>>16>>l&65535}else{f=a<<16>>16>>0-l&65535;n=h}if((Ci(n,1,b)|0)<<16>>16>f<<16>>16)n=1;else n=(((f<<16>>16)+3>>2|0)>(n<<16>>16|0))<<31>>31;u=N+n&65535;Ve[C>>1]=u;G=R+n&65535;Ve[A>>1]=G;X=y+n&65535;Ve[O>>1]=X;W=T+n&65535;Ve[D>>1]=W;V=F+n&65535;Ve[M>>1]=V;l=t<<16>>16>u<<16>>16?t:u;l=k<<16>>16>l<<16>>16?k:l;l=_<<16>>16>l<<16>>16?_:l;l=g<<16>>16>l<<16>>16?g:l;l=v<<16>>16>l<<16>>16?v:l;l=V<<16>>16>l<<16>>16?V:l;l=W<<16>>16>l<<16>>16?W:l;l=X<<16>>16>l<<16>>16?X:l;l=(G<<16>>16>l<<16>>16?G:l)+1&65535;t=0;while(1){n=l-(u&65535)|0;u=n&65535;f=Xe[i>>1]<<16;n=n<<16>>16;if(u<<16>>16>0)u=u<<16>>16<31?f>>n:0;else{G=0-n<<16>>16;u=f<>G|0)==(f|0)?u:f>>31^2147483647}G=u>>16;Ve[B+(t<<1)>>1]=G;Ve[L+(t<<1)>>1]=(u>>>1)-(G<<15);t=t+1|0;if((t|0)==5){n=5;f=c;break}u=Ve[C+(t<<1)>>1]|0;i=i+2|0}while(1){t=l-(v&65535)|0;v=t&65535;u=Xe[f>>1]<<16;t=t<<16>>16;if(v<<16>>16>0)u=v<<16>>16<31?u>>t:0;else{X=0-t<<16>>16;G=u<>X|0)==(u|0)?G:u>>31^2147483647}G=u>>16;Ve[B+(n<<1)>>1]=G;Ve[L+(n<<1)>>1]=(u>>>1)-(G<<15);u=n+1|0;if((u&65535)<<16>>16==10)break;v=Ve[C+(u<<1)>>1]|0;n=u;f=f+2|0}U=P<<16>>16;x=Ve[B>>1]|0;H=Ve[L>>1]|0;z=Ve[B+2>>1]|0;Y=Ve[L+2>>1]|0;j=Ve[B+4>>1]|0;q=Ve[L+4>>1]|0;K=Ve[B+6>>1]|0;V=Ve[L+6>>1]|0;W=Ve[B+8>>1]|0;X=Ve[L+8>>1]|0;G=w&65535;d=I<<16>>16;o=Ve[B+10>>1]|0;k=Ve[L+10>>1]|0;_=Ve[B+12>>1]|0;i=Ve[L+12>>1]|0;n=Ve[B+14>>1]|0;f=Ve[L+14>>1]|0;t=Ve[B+16>>1]|0;v=Ve[L+16>>1]|0;F=Ve[B+18>>1]|0;L=Ve[L+18>>1]|0;l=2147483647;B=0;u=0;M=782;do{C=Ve[M>>1]|0;T=(Ze(U,Ve[M+2>>1]|0)|0)>>>15<<16;c=T>>16;y=C<<1;N=(Ze(y,C)|0)>>16;h=Ze(N,x)|0;if((h|0)==1073741824){We[b>>2]=1;D=2147483647}else D=h<<1;I=(Ze(H,N)|0)>>15;h=D+(I<<1)|0;if((D^I|0)>0&(h^D|0)<0){We[b>>2]=1;h=(D>>>31)+2147483647|0}N=Ze(z,C)|0;if((N|0)==1073741824){We[b>>2]=1;D=2147483647}else D=N<<1;I=(Ze(Y,C)|0)>>15;N=D+(I<<1)|0;if((D^I|0)>0&(N^D|0)<0){We[b>>2]=1;N=(D>>>31)+2147483647|0}T=(Ze(T>>15,c)|0)>>16;D=Ze(j,T)|0;if((D|0)==1073741824){We[b>>2]=1;O=2147483647}else O=D<<1;I=(Ze(q,T)|0)>>15;D=O+(I<<1)|0;if((O^I|0)>0&(D^O|0)<0){We[b>>2]=1;D=(O>>>31)+2147483647|0}T=Ze(K,c)|0;if((T|0)==1073741824){We[b>>2]=1;O=2147483647}else O=T<<1;I=(Ze(V,c)|0)>>15;T=O+(I<<1)|0;if((O^I|0)>0&(T^O|0)<0){We[b>>2]=1;I=(O>>>31)+2147483647|0}else I=T;O=(Ze(y,c)|0)>>16;T=Ze(W,O)|0;if((T|0)==1073741824){We[b>>2]=1;y=2147483647}else y=T<<1;P=(Ze(X,O)|0)>>15;T=y+(P<<1)|0;if((y^P|0)>0&(T^y|0)<0){We[b>>2]=1;T=(y>>>31)+2147483647|0}O=Ve[M+4>>1]|0;y=Ve[M+6>>1]|0;M=M+8|0;if((C-G&65535)<<16>>16<1?(Z=O<<16>>16,O<<16>>16<=w<<16>>16):0){R=(Ze(y<<16>>16,d)|0)>>>15<<16;C=R>>16;g=Z<<1;y=(Ze(g,Z)|0)>>16;O=Ze(o,y)|0;if((O|0)==1073741824){We[b>>2]=1;A=2147483647}else A=O<<1;P=(Ze(k,y)|0)>>15;O=A+(P<<1)|0;if((A^P|0)>0&(O^A|0)<0){We[b>>2]=1;O=(A>>>31)+2147483647|0}y=Ze(_,Z)|0;if((y|0)==1073741824){We[b>>2]=1;A=2147483647}else A=y<<1;P=(Ze(i,Z)|0)>>15;y=A+(P<<1)|0;if((A^P|0)>0&(y^A|0)<0){We[b>>2]=1;P=(A>>>31)+2147483647|0}else P=y;A=(Ze(R>>15,C)|0)>>16;y=Ze(n,A)|0;if((y|0)==1073741824){We[b>>2]=1;R=2147483647}else R=y<<1;c=(Ze(f,A)|0)>>15;y=R+(c<<1)|0;if((R^c|0)>0&(y^R|0)<0){We[b>>2]=1;c=(R>>>31)+2147483647|0}else c=y;y=Ze(t,C)|0;if((y|0)==1073741824){We[b>>2]=1;A=2147483647}else A=y<<1;R=(Ze(v,C)|0)>>15;y=A+(R<<1)|0;if((A^R|0)>0&(y^A|0)<0){We[b>>2]=1;a=(A>>>31)+2147483647|0}else a=y;A=(Ze(g,C)|0)>>16;y=Ze(F,A)|0;if((y|0)==1073741824){We[b>>2]=1;R=2147483647}else R=y<<1;C=(Ze(L,A)|0)>>15;y=R+(C<<1)|0;if((R^C|0)>0&(y^R|0)<0){We[b>>2]=1;y=(R>>>31)+2147483647|0}C=N+h+D+I+T+O+P+c+a+y|0;I=(C|0)<(l|0);l=I?C:l;u=I?B:u}B=B+1<<16>>16}while(B<<16>>16<256);w=(u&65535)<<18>>16;wt(e,782+(w<<1)|0,J,r,m,E,b);Jt(e,0,s,$,ee,Q,re,b);s=(_i(14,Ve[ee>>1]|0,b)|0)&65535;wt(e,782+((w|2)<<1)|0,s,Ve[$>>1]|0,p,S,b);Ge=ne;return u|0}function wt(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0;u=Ge;Ge=Ge+16|0;l=u+2|0;f=u;Ve[i>>1]=Ve[r>>1]|0;s=Ve[r+2>>1]|0;n=Ze(n<<16>>16<<1,s)|0;i=10-(t&65535)|0;r=i&65535;i=i<<16>>16;if(r<<16>>16>0)r=r<<16>>16<31?n>>i:0;else{i=0-i<<16>>16;r=n<>i|0)==(n|0)?r:n>>31^2147483647}Ve[o>>1]=r>>>16;si(s,l,f,a);Ve[l>>1]=(Xe[l>>1]|0)+65524;i=Ci(Ve[f>>1]|0,5,a)|0;t=Ve[l>>1]|0;i=((t&65535)<<10)+(i&65535)&65535;n=Ve[f>>1]|0;t=t<<16>>16;if((t*24660|0)==1073741824){We[a>>2]=1;r=2147483647}else r=t*49320|0;f=(n<<16>>16)*24660>>15;t=r+(f<<1)|0;if(!((r^f|0)>0&(t^r|0)<0)){a=t;a=a<<13;a=a+32768|0;a=a>>>16;a=a&65535;Qt(e,i,a);Ge=u;return}We[a>>2]=1;a=(r>>>31)+2147483647|0;a=a<<13;a=a+32768|0;a=a>>>16;a=a&65535;Qt(e,i,a);Ge=u;return}function mt(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m,E,p,S,b,v){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;E=E|0;p=p|0;S=S|0;b=b|0;v=v|0;var _=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0;ae=Ge;Ge=Ge+80|0;te=ae+72|0;ie=ae+70|0;oe=ae+68|0;re=ae+66|0;ne=ae+56|0;W=ae+24|0;V=ae+12|0;q=ae+48|0;K=ae+40|0;x=ae+34|0;z=ae+22|0;L=ae+6|0;U=ae;pt(5,h,w,L,U,We[b+72>>2]|0,v)|0;F=_i(14,f,v)|0;H=b+68|0;B=We[H>>2]|0;j=l<<16>>16;Y=j+65526|0;h=(Xe[o>>1]|0)+65523&65535;Ve[ne>>1]=h;b=(Xe[o+2>>1]|0)+65522&65535;Ve[ne+2>>1]=b;Q=Y<<16>>16;$=((Y<<17>>17|0)==(Q|0)?Y<<1:Q>>>15^32767)+15+(Xe[o+4>>1]|0)&65535;Ve[ne+4>>1]=$;ee=(Xe[o+6>>1]|0)+Q&65535;Ve[ne+6>>1]=ee;o=Q+1+(Xe[o+8>>1]|0)&65535;Ve[ne+8>>1]=o;b=b<<16>>16>h<<16>>16?b:h;b=$<<16>>16>b<<16>>16?$:b;b=ee<<16>>16>b<<16>>16?ee:b;b=(Wt(o<<16>>16>b<<16>>16?o:b,1,v)|0)&65535;o=h;h=0;while(1){f=b-(o&65535)|0;o=f&65535;k=Xe[i+(h<<1)>>1]<<16;f=f<<16>>16;if(o<<16>>16>0)f=o<<16>>16<31?k>>f:0;else{ee=0-f<<16>>16;f=k<>ee|0)==(k|0)?f:k>>31^2147483647}jn(f,W+(h<<1)|0,V+(h<<1)|0,v);f=h+1|0;if((f|0)==5)break;o=Ve[ne+(f<<1)>>1]|0;h=f}C=W+2|0;I=V+2|0;ee=F<<16>>16;X=W+4|0;G=V+4|0;Z=W+6|0;J=V+6|0;Q=W+8|0;$=V+8|0;R=0;o=2147483647;i=0;f=0;while(1){P=Ve[L+(i<<1)>>1]|0;F=Ze(P,P)|0;if(F>>>0>1073741823){We[v>>2]=1;F=32767}else F=F>>>15;b=Ve[V>>1]|0;k=F<<16>>16;F=Ze(k,Ve[W>>1]|0)|0;if((F|0)==1073741824){We[v>>2]=1;h=2147483647}else h=F<<1;N=(Ze(b<<16>>16,k)|0)>>15;F=h+(N<<1)|0;if((h^N|0)>0&(F^h|0)<0){We[v>>2]=1;F=(h>>>31)+2147483647|0}b=Ve[I>>1]|0;k=Ze(Ve[C>>1]|0,P)|0;if((k|0)!=1073741824){h=(k<<1)+F|0;if((k^F|0)>0&(h^F|0)<0){We[v>>2]=1;h=(F>>>31)+2147483647|0}}else{We[v>>2]=1;h=2147483647}F=(Ze(b<<16>>16,P)|0)>>15;if((F|0)>32767){We[v>>2]=1;F=32767}N=F<<16;F=(N>>15)+h|0;if((N>>16^h|0)>0&(F^h|0)<0){We[v>>2]=1;N=(h>>>31)+2147483647|0}else N=F;T=(N>>>31)+2147483647|0;D=i&65535;F=R;y=0;O=B;do{k=(Ze(Ve[O>>1]|0,ee)|0)>>15;O=O+6|0;if((k|0)>32767){We[v>>2]=1;k=32767}A=k<<16>>16;k=Ze(A,A)|0;if((k|0)==1073741824){We[v>>2]=1;g=2147483647}else g=k<<1;jn(g,te,ie,v);k=Ze(A,P)|0;if((k|0)==1073741824){We[v>>2]=1;g=2147483647}else g=k<<1;jn(g,oe,re,v);h=Ve[G>>1]|0;M=Ve[ie>>1]|0;k=Ve[X>>1]|0;b=Ve[te>>1]|0;R=Ze(b,k)|0;if((R|0)!=1073741824){g=(R<<1)+N|0;if((R^N|0)>0&(g^N|0)<0){We[v>>2]=1;g=T}}else{We[v>>2]=1;g=2147483647}R=(Ze(M<<16>>16,k)|0)>>15;if((R|0)>32767){We[v>>2]=1;R=32767}M=R<<16;R=(M>>15)+g|0;if((M>>16^g|0)>0&(R^g|0)<0){We[v>>2]=1;R=(g>>>31)+2147483647|0}g=(Ze(b,h<<16>>16)|0)>>15;if((g|0)>32767){We[v>>2]=1;g=32767}M=g<<16;g=(M>>15)+R|0;if((M>>16^R|0)>0&(g^R|0)<0){We[v>>2]=1;g=(R>>>31)+2147483647|0}k=Ve[J>>1]|0;R=Ze(Ve[Z>>1]|0,A)|0;if((R|0)!=1073741824){M=(R<<1)+g|0;if((R^g|0)>0&(M^g|0)<0){We[v>>2]=1;M=(g>>>31)+2147483647|0}}else{We[v>>2]=1;M=2147483647}k=(Ze(k<<16>>16,A)|0)>>15;if((k|0)>32767){We[v>>2]=1;k=32767}A=k<<16;k=(A>>15)+M|0;if((A>>16^M|0)>0&(k^M|0)<0){We[v>>2]=1;k=(M>>>31)+2147483647|0}b=Ve[$>>1]|0;M=Ve[re>>1]|0;h=Ve[Q>>1]|0;_=Ve[oe>>1]|0;R=Ze(_,h)|0;do{if((R|0)==1073741824){We[v>>2]=1;R=2147483647}else{g=(R<<1)+k|0;if(!((R^k|0)>0&(g^k|0)<0)){R=g;break}We[v>>2]=1;R=(k>>>31)+2147483647|0}}while(0);g=(Ze(M<<16>>16,h)|0)>>15;if((g|0)>32767){We[v>>2]=1;g=32767}A=g<<16;g=(A>>15)+R|0;if((A>>16^R|0)>0&(g^R|0)<0){We[v>>2]=1;g=(R>>>31)+2147483647|0}k=(Ze(_,b<<16>>16)|0)>>15;if((k|0)>32767){We[v>>2]=1;k=32767}A=k<<16;k=(A>>15)+g|0;if((A>>16^g|0)>0&(k^g|0)<0){We[v>>2]=1;k=(g>>>31)+2147483647|0}A=(k|0)<(o|0);F=A?y:F;f=A?D:f;o=A?k:o;y=y+1<<16>>16}while(y<<16>>16<32);i=i+1|0;if((i|0)==3){k=F;i=f;break}else R=F}I=(k<<16>>16)*3|0;o=Ve[B+(I<<1)>>1]|0;Ve[E>>1]=Ve[B+(I+1<<1)>>1]|0;Ve[p>>1]=Ve[B+(I+2<<1)>>1]|0;o=Ze(o<<16>>16,ee)|0;if((o|0)==1073741824){We[v>>2]=1;F=2147483647}else F=o<<1;I=9-j|0;B=I&65535;I=I<<16>>16;C=B<<16>>16>0;if(C)F=B<<16>>16<31?F>>I:0;else{N=0-I<<16>>16;P=F<>N|0)==(F|0)?P:F>>31^2147483647}Ve[m>>1]=F>>>16;P=i<<16>>16;L=Ve[L+(P<<1)>>1]|0;Ve[w>>1]=L;U=Ve[U+(P<<1)>>1]|0;Gr(r,n,t,L,u,q,K,x,v);An(e,Ve[x>>1]|0,Ve[m>>1]|0,z,v);if(!((Ve[q>>1]|0)!=0&(Ve[z>>1]|0)>0)){v=k;E=We[S>>2]|0;m=E+2|0;Ve[E>>1]=U;E=E+4|0;We[S>>2]=E;Ve[m>>1]=v;Ge=ae;return}A=q+6|0;Ve[A>>1]=s;g=K+6|0;Ve[g>>1]=a;l=((Bi(d,l,v)|0)&65535)+10|0;b=l<<16>>16;if((l&65535)<<16>>16<0){f=0-b<<16;if((f|0)<983040)c=c<<16>>16>>(f>>16)&65535;else c=0}else{f=c<<16>>16;h=f<>16>>b|0)==(f|0))c=h&65535;else c=(f>>>15^32767)&65535}o=Ve[w>>1]|0;F=Ve[z>>1]|0;H=We[H>>2]|0;h=Ve[m>>1]|0;z=10-j|0;b=z<<16>>16;if((z&65535)<<16>>16<0){f=0-b<<16;if((f|0)<983040)s=h<<16>>16>>(f>>16)&65535;else s=0}else{f=h<<16>>16;h=f<>16>>b|0)==(f|0))s=h&65535;else s=(f>>>15^32767)&65535}i=o<<16>>16;f=Ze(i,i)|0;if(f>>>0>1073741823){We[v>>2]=1;o=32767}else o=f>>>15;k=Wt(32767-(F&65535)&65535,1,v)|0;F=F<<16>>16;f=Ze(Ve[q+2>>1]|0,F)|0;if((f|0)==1073741824){We[v>>2]=1;f=2147483647}else f=f<<1;z=f<<1;f=Ze(((z>>1|0)==(f|0)?z:f>>31^2147418112)>>16,o<<16>>16)|0;if((f|0)==1073741824){We[v>>2]=1;R=2147483647}else R=f<<1;M=(Xe[K+2>>1]|0)+65521|0;b=M&65535;f=Ze(Ve[q+4>>1]|0,F)|0;if((f|0)==1073741824){We[v>>2]=1;o=2147483647}else o=f<<1;f=o<<1;f=(Ze(((f>>1|0)==(o|0)?f:o>>31^2147418112)>>16,i)|0)>>15;if((f|0)>32767){We[v>>2]=1;f=32767}Ve[X>>1]=f;o=Y&65535;Ve[te>>1]=o;o=Wt(Ve[K+4>>1]|0,o,v)|0;f=Ze(Ve[A>>1]|0,F)|0;if((f|0)==1073741824){We[v>>2]=1;f=2147483647}else f=f<<1;_=f<<1;Ve[Z>>1]=((_>>1|0)==(f|0)?_:f>>31^2147418112)>>>16;_=((j<<17>>17|0)==(j|0)?j<<1:j>>>15^32767)+65529&65535;Ve[te>>1]=_;_=Wt(Ve[g>>1]|0,_,v)|0;f=(Ze(Ve[A>>1]|0,k<<16>>16)|0)>>15;if((f|0)>32767){We[v>>2]=1;f=32767}Ve[Q>>1]=f;k=Wt(_,1,v)|0;h=Ze(Ve[q>>1]|0,F)|0;if((h|0)==1073741824){We[v>>2]=1;f=2147483647}else f=h<<1;g=Ii(f,te,v)|0;i=(Xe[te>>1]|0)+47|0;Ve[te>>1]=i;i=(Xe[K>>1]|0)-(i&65535)|0;F=i+31&65535;F=b<<16>>16>F<<16>>16?b:F;F=o<<16>>16>F<<16>>16?o:F;F=_<<16>>16>F<<16>>16?_:F;F=(k<<16>>16>F<<16>>16?k:F)<<16>>16;h=F-(M&65535)|0;f=h&65535;h=h<<16>>16;if(f<<16>>16>0)N=f<<16>>16<31?R>>h:0;else{K=0-h<<16>>16;N=R<>K|0)==(R|0)?N:R>>31^2147483647}b=F-(o&65535)|0;f=b&65535;h=Xe[X>>1]<<16;b=b<<16>>16;if(f<<16>>16>0)h=f<<16>>16<31?h>>b:0;else{q=0-b<<16>>16;K=h<>q|0)==(h|0)?K:h>>31^2147483647}jn(h,X,G,v);_=F-(_&65535)|0;h=_&65535;b=Xe[Z>>1]<<16;_=_<<16>>16;if(h<<16>>16>0)h=h<<16>>16<31?b>>_:0;else{K=0-_<<16>>16;h=b<>K|0)==(b|0)?h:b>>31^2147483647}jn(h,Z,J,v);_=F-(k&65535)|0;h=_&65535;b=Xe[Q>>1]<<16;_=_<<16>>16;if(h<<16>>16>0)h=h<<16>>16<31?b>>_:0;else{K=0-_<<16>>16;h=b<>K|0)==(b|0)?h:b>>31^2147483647}jn(h,Q,$,v);_=F+65505|0;Ve[te>>1]=_;_=_-(i&65535)|0;h=Pi(_&65535,1,v)|0;b=h<<16>>16;if(h<<16>>16>0)b=h<<16>>16<31?g>>b:0;else{K=0-b<<16>>16;b=g<>K|0)==(g|0)?b:g>>31^2147483647}do{if(!(_&1))R=b;else{jn(b,W,V,v);h=Ve[V>>1]|0;b=Ve[W>>1]|0;if((b*23170|0)==1073741824){We[v>>2]=1;_=2147483647}else _=b*46340|0;W=(h<<16>>16)*23170>>15;b=_+(W<<1)|0;if(!((_^W|0)>0&(b^_|0)<0)){R=b;break}We[v>>2]=1;R=(_>>>31)+2147483647|0}}while(0);A=(N>>>31)+2147483647|0;g=2147483647;M=0;b=0;y=H;while(1){h=(Ze(Ve[y>>1]|0,ee)|0)>>15;y=y+6|0;if((h|0)>32767){We[v>>2]=1;h=32767}_=h&65535;if(_<<16>>16>=s<<16>>16)break;o=h<<16>>16;h=Ze(o,o)|0;if((h|0)==1073741824){We[v>>2]=1;f=2147483647}else f=h<<1;jn(f,ie,oe,v);h=(Bi(_,c,v)|0)<<16>>16;h=Ze(h,h)|0;if((h|0)==1073741824){We[v>>2]=1;h=2147483647}else h=h<<1;jn(h,re,ne,v);_=Ve[G>>1]|0;f=Ze(Ve[X>>1]|0,o)|0;do{if((f|0)==1073741824){We[v>>2]=1;f=2147483647}else{h=(f<<1)+N|0;if(!((f^N|0)>0&(h^N|0)<0)){f=h;break}We[v>>2]=1;f=A}}while(0);h=(Ze(_<<16>>16,o)|0)>>15;if((h|0)>32767){We[v>>2]=1;h=32767}W=h<<16;h=(W>>15)+f|0;if((W>>16^f|0)>0&(h^f|0)<0){We[v>>2]=1;h=(f>>>31)+2147483647|0}i=Ve[J>>1]|0;k=Ve[oe>>1]|0;o=Ve[Z>>1]|0;F=Ve[ie>>1]|0;f=Ze(F,o)|0;do{if((f|0)==1073741824){We[v>>2]=1;_=2147483647}else{_=(f<<1)+h|0;if(!((f^h|0)>0&(_^h|0)<0))break;We[v>>2]=1;_=(h>>>31)+2147483647|0}}while(0);f=(Ze(k<<16>>16,o)|0)>>15;if((f|0)>32767){We[v>>2]=1;f=32767}W=f<<16;f=(W>>15)+_|0;if((W>>16^_|0)>0&(f^_|0)<0){We[v>>2]=1;f=(_>>>31)+2147483647|0}h=(Ze(F,i<<16>>16)|0)>>15;if((h|0)>32767){We[v>>2]=1;h=32767}W=h<<16;h=(W>>15)+f|0;if((W>>16^f|0)>0&(h^f|0)<0){We[v>>2]=1;h=(f>>>31)+2147483647|0}h=Ii(h,te,v)|0;_=Pi(Ve[te>>1]|0,1,v)|0;f=_<<16>>16;if(_<<16>>16>0)_=_<<16>>16<31?h>>f:0;else{W=0-f<<16>>16;_=h<>W|0)==(h|0)?_:h>>31^2147483647}h=_-R|0;if(((h^_)&(_^R)|0)<0){We[v>>2]=1;h=(_>>>31)+2147483647|0}h=(Ni(h,v)|0)<<16>>16;h=Ze(h,h)|0;if((h|0)==1073741824){We[v>>2]=1;_=2147483647}else _=h<<1;F=Ve[$>>1]|0;o=Ve[ne>>1]|0;k=Ve[Q>>1]|0;i=Ve[re>>1]|0;f=Ze(i,k)|0;do{if((f|0)==1073741824){We[v>>2]=1;h=2147483647}else{h=(f<<1)+_|0;if(!((f^_|0)>0&(h^_|0)<0))break;We[v>>2]=1;h=(_>>>31)+2147483647|0}}while(0);f=(Ze(o<<16>>16,k)|0)>>15;if((f|0)>32767){We[v>>2]=1;f=32767}W=f<<16;f=(W>>15)+h|0;if((W>>16^h|0)>0&(f^h|0)<0){We[v>>2]=1;f=(h>>>31)+2147483647|0}h=(Ze(i,F<<16>>16)|0)>>15;if((h|0)>32767){We[v>>2]=1;h=32767}W=h<<16;h=(W>>15)+f|0;if((W>>16^f|0)>0&(h^f|0)<0){We[v>>2]=1;h=(f>>>31)+2147483647|0}f=(h|0)<(g|0);b=f?M:b;M=M+1<<16>>16;if(M<<16>>16>=32)break;else g=f?h:g}oe=(b<<16>>16)*3|0;_=Ve[H+(oe<<1)>>1]|0;Ve[E>>1]=Ve[H+(oe+1<<1)>>1]|0;Ve[p>>1]=Ve[H+(oe+2<<1)>>1]|0;_=Ze(_<<16>>16,ee)|0;if((_|0)==1073741824){We[v>>2]=1;_=2147483647}else _=_<<1;if(C)_=B<<16>>16<31?_>>I:0;else{E=0-I<<16>>16;v=_<>E|0)==(_|0)?v:_>>31^2147483647}Ve[m>>1]=_>>>16;v=b;E=We[S>>2]|0;m=E+2|0;Ve[E>>1]=U;E=E+4|0;We[S>>2]=E;Ve[m>>1]=v;Ge=ae;return}function Et(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0;d=(e|0)==7;l=Ve[t>>1]|0;if(d){l=l<<16>>16>>>1&65535;c=_i(r,n,s)|0;r=c<<16;e=r>>16;if((c<<20>>20|0)==(e|0))e=r>>12;else e=e>>>15^32767}else{c=_i(r,n,s)|0;r=c<<16;e=r>>16;if((c<<21>>21|0)==(e|0))e=r>>11;else e=e>>>15^32767}c=e<<16>>16;s=l<<16>>16;r=s-((Ze(c,Ve[a>>1]|0)|0)>>>15&65535)|0;r=((r&32768|0)!=0?0-r|0:r)&65535;f=1;e=0;u=a;while(1){u=u+6|0;l=s-((Ze(Ve[u>>1]|0,c)|0)>>>15&65535)|0;n=l<<16;l=(n|0)<0?0-(n>>16)|0:l;n=(l<<16>>16|0)<(r<<16>>16|0);e=n?f:e;f=f+1<<16>>16;if(f<<16>>16>=32)break;else r=n?l&65535:r}u=(e<<16>>16)*196608>>16;Ve[t>>1]=(Ze(Ve[a+(u<<1)>>1]|0,c)|0)>>>15<<(d&1);Ve[i>>1]=Ve[a+(u+1<<1)>>1]|0;Ve[o>>1]=Ve[a+(u+2<<1)>>1]|0;return e|0}function pt(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0;s=Bi(Ve[n>>1]|0,Ve[o>>1]|0,a)|0;s=(s&65535)-((s&65535)>>>15&65535)|0;s=(s<<16>>31^s)&65535;f=0;u=1;while(1){l=Ve[o+(u<<1)>>1]|0;if(l<<16>>16>r<<16>>16)l=s;else{l=Bi(Ve[n>>1]|0,l,a)|0;l=(l&65535)-((l&65535)>>>15&65535)|0;l=(l<<16>>31^l)&65535;d=l<<16>>16>16;l=d?l:s;f=d?u&65535:f}u=u+1|0;if((u|0)==16)break;else s=l}if((e|0)!=5){s=Ve[o+(f<<16>>16<<1)>>1]|0;if((e|0)==7){Ve[n>>1]=s&65532;return f|0}else{Ve[n>>1]=s;return f|0}}l=f<<16>>16;switch(f<<16>>16){case 0:{s=0;break}case 15:{c=8;break}default:if((Ve[o+(l+1<<1)>>1]|0)>r<<16>>16)c=8;else s=l+65535&65535}if((c|0)==8)s=l+65534&65535;Ve[i>>1]=s;d=s<<16>>16;Ve[t>>1]=Ve[o+(d<<1)>>1]|0;d=d+1|0;Ve[i+2>>1]=d;d=d<<16>>16;Ve[t+2>>1]=Ve[o+(d<<1)>>1]|0;d=d+1|0;Ve[i+4>>1]=d;Ve[t+4>>1]=Ve[o+(d<<16>>16<<1)>>1]|0;Ve[n>>1]=Ve[o+(l<<1)>>1]|0;return f|0}function St(e,r,n,t,i,o,a,s,l,f,u,c){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;var d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0;N=Ge;Ge=Ge+32|0;w=N+20|0;m=N+10|0;h=N;switch(e|0){case 3:case 4:case 6:{u=u+84|0;D=128;break}default:{u=u+80|0;D=64}}T=We[u>>2]|0;d=_i(14,n,c)|0;O=r<<16>>16;y=O+65525|0;e=(Xe[i>>1]|0)+65523&65535;Ve[h>>1]=e;r=(Xe[i+2>>1]|0)+65522&65535;Ve[h+2>>1]=r;A=y<<16>>16;A=Wt(Ve[i+4>>1]|0,((y<<17>>17|0)==(A|0)?y<<1:A>>>15^32767)+15&65535,c)|0;Ve[h+4>>1]=A;y=Wt(Ve[i+6>>1]|0,y&65535,c)|0;Ve[h+6>>1]=y;i=Wt(Ve[i+8>>1]|0,O+65526&65535,c)|0;Ve[h+8>>1]=i;r=r<<16>>16>e<<16>>16?r:e;r=A<<16>>16>r<<16>>16?A:r;r=y<<16>>16>r<<16>>16?y:r;r=(i<<16>>16>r<<16>>16?i:r)+1&65535;i=0;while(1){n=r-(e&65535)|0;u=n&65535;e=Xe[t+(i<<1)>>1]<<16;n=n<<16>>16;if(u<<16>>16>0)u=u<<16>>16<31?e>>n:0;else{y=0-n<<16>>16;u=e<>y|0)==(e|0)?u:e>>31^2147483647}jn(u,w+(i<<1)|0,m+(i<<1)|0,c);u=i+1|0;if((u|0)==5)break;e=Ve[h+(u<<1)>>1]|0;i=u}y=d<<16>>16;v=Ve[w>>1]|0;_=Ve[m>>1]|0;k=Ve[w+2>>1]|0;F=Ve[m+2>>1]|0;M=Ve[w+4>>1]|0;g=Ve[m+4>>1]|0;R=Ve[w+6>>1]|0;A=Ve[m+6>>1]|0;b=Ve[w+8>>1]|0;E=Ve[m+8>>1]|0;r=2147483647;p=0;u=0;S=T;while(1){i=Ve[S>>1]|0;if(i<<16>>16>o<<16>>16)d=r;else{d=(Ze(Ve[S+2>>1]|0,y)|0)>>15;if((d|0)>32767){We[c>>2]=1;d=32767}m=i<<16>>16;i=Ze(m,m)|0;if(i>>>0>1073741823){We[c>>2]=1;h=32767}else h=i>>>15;n=d<<16>>16;d=Ze(n,n)|0;if(d>>>0>1073741823){We[c>>2]=1;w=32767}else w=d>>>15;t=(Ze(n,m)|0)>>15;if((t|0)>32767){We[c>>2]=1;t=32767}d=h<<16>>16;h=Ze(v,d)|0;if((h|0)==1073741824){We[c>>2]=1;i=2147483647}else i=h<<1;d=(Ze(_,d)|0)>>15;h=i+(d<<1)|0;if((i^d|0)>0&(h^i|0)<0){We[c>>2]=1;h=(i>>>31)+2147483647|0}d=Ze(k,m)|0;if((d|0)==1073741824){We[c>>2]=1;i=2147483647}else i=d<<1;m=(Ze(F,m)|0)>>15;d=i+(m<<1)|0;if((i^m|0)>0&(d^i|0)<0){We[c>>2]=1;d=(i>>>31)+2147483647|0}i=d+h|0;if((d^h|0)>-1&(i^h|0)<0){We[c>>2]=1;i=(h>>>31)+2147483647|0}d=w<<16>>16;h=Ze(M,d)|0;if((h|0)==1073741824){We[c>>2]=1;e=2147483647}else e=h<<1;m=(Ze(g,d)|0)>>15;h=e+(m<<1)|0;if((e^m|0)>0&(h^e|0)<0){We[c>>2]=1;h=(e>>>31)+2147483647|0}d=h+i|0;if((h^i|0)>-1&(d^i|0)<0){We[c>>2]=1;e=(i>>>31)+2147483647|0}else e=d;d=Ze(R,n)|0;if((d|0)==1073741824){We[c>>2]=1;h=2147483647}else h=d<<1;m=(Ze(A,n)|0)>>15;d=h+(m<<1)|0;if((h^m|0)>0&(d^h|0)<0){We[c>>2]=1;d=(h>>>31)+2147483647|0}i=d+e|0;if((d^e|0)>-1&(i^e|0)<0){We[c>>2]=1;h=(e>>>31)+2147483647|0}else h=i;i=t<<16>>16;d=Ze(b,i)|0;if((d|0)==1073741824){We[c>>2]=1;e=2147483647}else e=d<<1;m=(Ze(E,i)|0)>>15;d=e+(m<<1)|0;if((e^m|0)>0&(d^e|0)<0){We[c>>2]=1;i=(e>>>31)+2147483647|0}else i=d;d=i+h|0;if((i^h|0)>-1&(d^h|0)<0){We[c>>2]=1;d=(h>>>31)+2147483647|0}m=(d|0)<(r|0);d=m?d:r;u=m?p:u}S=S+8|0;p=p+1<<16>>16;if((p<<16>>16|0)>=(D|0))break;else r=d}o=u<<16>>16;o=((o<<18>>18|0)==(o|0)?o<<2:o>>>15^32767)<<16>>16;Ve[a>>1]=Ve[T+(o<<1)>>1]|0;r=Ve[T+(o+1<<1)>>1]|0;Ve[l>>1]=Ve[T+(o+2<<1)>>1]|0;Ve[f>>1]=Ve[T+(o+3<<1)>>1]|0;r=Ze(r<<16>>16,y)|0;if((r|0)==1073741824){We[c>>2]=1;e=2147483647}else e=r<<1;n=10-O|0;r=n&65535;n=n<<16>>16;if(r<<16>>16>0){c=r<<16>>16<31?e>>n:0;c=c>>>16;c=c&65535;Ve[s>>1]=c;Ge=N;return u|0}else{l=0-n<<16>>16;c=e<>l|0)==(e|0)?c:e>>31^2147483647;c=c>>>16;c=c&65535;Ve[s>>1]=c;Ge=N;return u|0}return 0}function bt(e,r,n,t,i,o,a,s,l){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;var f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0,W=0,X=0,G=0,Z=0,J=0,Q=0,$=0,ee=0,re=0,ne=0,te=0,ie=0,oe=0,ae=0,se=0,le=0,fe=0,ue=0,ce=0,de=0,he=0,we=0,me=0,Ee=0,pe=0,Se=0;Se=Ge;Ge=Ge+160|0;pe=Se;u=e<<16>>16;me=e<<16>>16==10;Ee=Ve[a+(Ve[o>>1]<<1)>>1]|0;if(e<<16>>16>0){l=0;f=s;while(1){Ve[f>>1]=l;l=l+1<<16>>16;if(l<<16>>16>=e<<16>>16)break;else f=f+2|0}}if(n<<16>>16<=1){Ge=Se;return}he=o+2|0;we=Ee<<16>>16;ue=t+(we<<1)|0;ce=i+(we*80|0)+(we<<1)|0;de=o+6|0;V=r&65535;W=o+4|0;X=o+10|0;G=o+8|0;Z=o+14|0;J=o+12|0;Q=o+18|0;$=o+16|0;ee=s+2|0;re=s+4|0;ne=s+6|0;te=s+8|0;ie=s+10|0;oe=s+12|0;ae=s+14|0;se=s+16|0;le=s+18|0;fe=e<<16>>16>2;q=o+(u+-1<<1)|0;Y=1;K=1;B=0;L=0;j=-1;while(1){z=Ve[a+(Ve[he>>1]<<1)>>1]|0;H=z<<16>>16;r=(Xe[t+(H<<1)>>1]|0)+(Xe[ue>>1]|0)|0;f=(Ve[i+(we*80|0)+(H<<1)>>1]<<13)+32768+((Ve[i+(H*80|0)+(H<<1)>>1]|0)+(Ve[ce>>1]|0)<<12)|0;u=Ve[de>>1]|0;if(u<<16>>16<40){u=u<<16>>16;c=pe;while(1){U=(Ve[i+(u*80|0)+(u<<1)>>1]|0)>>>1;I=Ve[i+(u*80|0)+(we<<1)>>1]|0;x=Ve[i+(u*80|0)+(H<<1)>>1]|0;Ve[c>>1]=r+(Xe[t+(u<<1)>>1]|0);Ve[c+2>>1]=(I+2+U+x|0)>>>2;u=u+V|0;if((u&65535)<<16>>16<40){u=u<<16>>16;c=c+4|0}else break}M=Ve[de>>1]|0}else M=u;r=Ve[W>>1]|0;F=f>>12;u=r<<16>>16;e:do{if(r<<16>>16<40){k=M<<16>>16;if(M<<16>>16<40){c=1;h=r;m=M;w=0;d=-1}else while(1){u=u+V|0;if((u&65535)<<16>>16<40)u=u<<16>>16;else{c=1;x=r;U=M;u=0;break e}}while(1){_=((Ve[i+(u*80|0)+(u<<1)>>1]|0)+F>>1)+(Ve[i+(u*80|0)+(we<<1)>>1]|0)+(Ve[i+(u*80|0)+(H<<1)>>1]|0)|0;v=Xe[t+(u<<1)>>1]|0;S=k;b=M;p=pe;E=w;while(1){f=(Xe[p>>1]|0)+v|0;l=f<<16>>16;l=(Ze(l,l)|0)>>>15;w=(_+(Ve[i+(u*80|0)+(S<<1)>>1]|0)>>2)+(Ve[p+2>>1]|0)>>1;if((Ze(l<<16>>16,c<<16>>16)|0)>(Ze(w,d<<16>>16)|0)){c=w&65535;h=r;m=b;w=f&65535;d=l&65535}else w=E;f=S+V|0;b=f&65535;if(b<<16>>16>=40)break;else{S=f<<16>>16;p=p+4|0;E=w}}u=u+V|0;r=u&65535;if(r<<16>>16<40)u=u<<16>>16;else{x=h;U=m;u=w;break}}}else{c=1;x=r;U=M;u=0}}while(0);h=c<<16>>16<<15;c=Ve[X>>1]|0;if(c<<16>>16<40){f=x<<16>>16;l=U<<16>>16;r=u&65535;c=c<<16>>16;u=pe;while(1){N=Ve[i+(c*80|0)+(c<<1)>>1]>>1;D=Ve[i+(c*80|0)+(we<<1)>>1]|0;P=Ve[i+(c*80|0)+(H<<1)>>1]|0;C=Ve[i+(c*80|0)+(f<<1)>>1]|0;I=Ve[i+(c*80|0)+(l<<1)>>1]|0;Ve[u>>1]=(Xe[t+(c<<1)>>1]|0)+r;Ve[u+2>>1]=(D+2+N+P+C+I|0)>>>2;c=c+V|0;if((c&65535)<<16>>16<40){c=c<<16>>16;u=u+4|0}else break}N=Ve[X>>1]|0}else N=c;d=Ve[G>>1]|0;c=d<<16>>16;e:do{if(d<<16>>16<40){g=x<<16>>16;R=U<<16>>16;A=N<<16>>16;M=h+32768|0;if(N<<16>>16<40){w=1;h=d;r=N;m=d;u=0;d=-1}else while(1){c=c+V|0;if((c&65535)<<16>>16<40)c=c<<16>>16;else{c=1;I=d;C=N;u=0;break e}}while(1){l=Xe[t+(c<<1)>>1]|0;F=(Ve[i+(c*80|0)+(H<<1)>>1]|0)+(Ve[i+(c*80|0)+(we<<1)>>1]|0)+(Ve[i+(c*80|0)+(g<<1)>>1]|0)+(Ve[i+(c*80|0)+(R<<1)>>1]|0)|0;k=M+(Ve[i+(c*80|0)+(c<<1)>>1]<<11)|0;v=A;S=N;_=pe;while(1){E=(Xe[_>>1]|0)+l|0;f=k+(Ve[_+2>>1]<<14)+(F+(Ve[i+(c*80|0)+(v<<1)>>1]|0)<<12)|0;p=E<<16>>16;p=(Ze(p,p)|0)>>>15;if((Ze(p<<16>>16,w<<16>>16)|0)>(Ze(f>>16,d<<16>>16)|0)){w=f>>>16&65535;b=m;r=S;u=E&65535;d=p&65535}else b=h;h=v+V|0;S=h&65535;if(S<<16>>16>=40){h=b;break}else{v=h<<16>>16;h=b;_=_+4|0}}c=c+V|0;m=c&65535;if(m<<16>>16<40)c=c<<16>>16;else{c=w;I=h;C=r;break}}}else{c=1;I=d;C=N;u=0}}while(0);w=c<<16>>16<<15;c=Ve[Z>>1]|0;if(c<<16>>16<40){f=x<<16>>16;l=U<<16>>16;d=I<<16>>16;h=C<<16>>16;r=u&65535;c=c<<16>>16;u=pe;while(1){y=Ve[i+(c*80|0)+(c<<1)>>1]>>1;A=Ve[i+(we*80|0)+(c<<1)>>1]|0;O=Ve[i+(H*80|0)+(c<<1)>>1]|0;T=Ve[i+(f*80|0)+(c<<1)>>1]|0;D=Ve[i+(l*80|0)+(c<<1)>>1]|0;N=Ve[i+(d*80|0)+(c<<1)>>1]|0;P=Ve[i+(h*80|0)+(c<<1)>>1]|0;Ve[u>>1]=(Xe[t+(c<<1)>>1]|0)+r;Ve[u+2>>1]=(A+4+y+O+T+D+N+P|0)>>>3;c=c+V|0;if((c&65535)<<16>>16<40){c=c<<16>>16;u=u+4|0}else break}r=Ve[Z>>1]|0}else r=c;m=Ve[J>>1]|0;if(m<<16>>16<40){N=x<<16>>16;y=U<<16>>16;A=I<<16>>16;R=C<<16>>16;g=r<<16>>16;M=r<<16>>16<40;O=w+32768|0;D=m<<16>>16;l=1;b=m;S=r;T=m;h=0;c=-1;while(1){if(M){w=Xe[t+(D<<1)>>1]|0;u=(Ve[i+(D*80|0)+(H<<1)>>1]|0)+(Ve[i+(D*80|0)+(we<<1)>>1]|0)+(Ve[i+(D*80|0)+(N<<1)>>1]|0)+(Ve[i+(D*80|0)+(y<<1)>>1]|0)+(Ve[i+(D*80|0)+(A<<1)>>1]|0)+(Ve[i+(D*80|0)+(R<<1)>>1]|0)|0;d=O+(Ve[i+(D*80|0)+(D<<1)>>1]<<10)|0;p=g;m=r;k=S;F=pe;while(1){_=(Xe[F>>1]|0)+w|0;S=d+(Ve[F+2>>1]<<14)+(u+(Ve[i+(D*80|0)+(p<<1)>>1]|0)<<11)|0;v=_<<16>>16;v=(Ze(v,v)|0)>>>15;if((Ze(v<<16>>16,l<<16>>16)|0)>(Ze(S>>16,c<<16>>16)|0)){l=S>>>16&65535;b=T;S=m;h=_&65535;c=v&65535}else S=k;E=p+V|0;m=E&65535;if(m<<16>>16>=40)break;else{p=E<<16>>16;k=S;F=F+4|0}}}m=D+V|0;T=m&65535;if(T<<16>>16>=40){P=S;break}else D=m<<16>>16}}else{l=1;b=m;P=r;h=0;c=-1}if(me){p=l<<16>>16<<15;c=Ve[Q>>1]|0;if(c<<16>>16<40){u=x<<16>>16;r=U<<16>>16;f=I<<16>>16;l=C<<16>>16;w=b<<16>>16;m=P<<16>>16;d=h&65535;c=c<<16>>16;h=pe;while(1){A=Ve[i+(c*80|0)+(c<<1)>>1]>>1;R=Ve[i+(we*80|0)+(c<<1)>>1]|0;y=Ve[i+(H*80|0)+(c<<1)>>1]|0;O=Ve[i+(u*80|0)+(c<<1)>>1]|0;T=Ve[i+(r*80|0)+(c<<1)>>1]|0;D=Ve[i+(f*80|0)+(c<<1)>>1]|0;N=Ve[i+(l*80|0)+(c<<1)>>1]|0;B=Ve[i+(w*80|0)+(c<<1)>>1]|0;L=Ve[i+(m*80|0)+(c<<1)>>1]|0;Ve[h>>1]=(Xe[t+(c<<1)>>1]|0)+d;Ve[h+2>>1]=(R+4+A+y+O+T+D+N+B+L|0)>>>3;c=c+V|0;if((c&65535)<<16>>16<40){c=c<<16>>16;h=h+4|0}else break}N=Ve[Q>>1]|0}else N=c;w=Ve[$>>1]|0;if(w<<16>>16<40){A=x<<16>>16;R=U<<16>>16;g=I<<16>>16;f=C<<16>>16;y=b<<16>>16;O=P<<16>>16;T=N<<16>>16;D=N<<16>>16<40;M=p+32768|0;u=w<<16>>16;l=1;m=w;h=N;r=w;c=-1;while(1){if(D){p=Xe[t+(u<<1)>>1]|0;d=(Ve[i+(H*80|0)+(u<<1)>>1]|0)+(Ve[i+(we*80|0)+(u<<1)>>1]|0)+(Ve[i+(A*80|0)+(u<<1)>>1]|0)+(Ve[i+(R*80|0)+(u<<1)>>1]|0)+(Ve[i+(g*80|0)+(u<<1)>>1]|0)+(Ve[i+(f*80|0)+(u<<1)>>1]|0)+(Ve[i+(y*80|0)+(u<<1)>>1]|0)+(Ve[i+(O*80|0)+(u<<1)>>1]|0)|0;w=M+(Ve[i+(u*80|0)+(u<<1)>>1]<<9)|0;F=T;v=N;k=pe;while(1){_=(Xe[k>>1]|0)+p<<16>>16;_=(Ze(_,_)|0)>>>15;S=w+(Ve[k+2>>1]<<13)+(d+(Ve[i+(u*80|0)+(F<<1)>>1]|0)<<10)|0;if((Ze(_<<16>>16,l<<16>>16)|0)>(Ze(S>>16,c<<16>>16)|0)){l=S>>>16&65535;m=r;h=v;c=_&65535}E=F+V|0;v=E&65535;if(v<<16>>16>=40)break;else{F=E<<16>>16;k=k+4|0}}}w=u+V|0;r=w&65535;if(r<<16>>16>=40)break;else u=w<<16>>16}}else{l=1;m=w;h=N;c=-1}}else{m=B;h=L}if((Ze(c<<16>>16,Y<<16>>16)|0)>(Ze(l<<16>>16,j<<16>>16)|0)){Ve[s>>1]=Ee;Ve[ee>>1]=z;Ve[re>>1]=x;Ve[ne>>1]=U;Ve[te>>1]=I;Ve[ie>>1]=C;Ve[oe>>1]=b;Ve[ae>>1]=P;if(me){Ve[se>>1]=m;Ve[le>>1]=h}}else{l=Y;c=j}u=Ve[he>>1]|0;if(fe){r=1;f=2;while(1){Ve[o+(r<<1)>>1]=Ve[o+(f<<1)>>1]|0;f=f+1|0;if((f&65535)<<16>>16==e<<16>>16)break;else r=r+1|0}}Ve[q>>1]=u;K=K+1<<16>>16;if(K<<16>>16>=n<<16>>16)break;else{Y=l;B=m;L=h;j=c}}Ge=Se;return}function vt(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0;s=39;while(1){a=e+(s<<1)|0;o=Ve[a>>1]|0;i=r+(s<<1)|0;if(o<<16>>16>-1)Ve[i>>1]=32767;else{Ve[i>>1]=-32767;if(o<<16>>16==-32768)o=32767;else o=0-(o&65535)&65535;Ve[a>>1]=o}Ve[n+(s<<1)>>1]=o;if((s|0)>0)s=s+-1|0;else break}f=8-(t<<16>>16)|0;if((f|0)>0){l=0;i=0}else return;do{t=0;e=0;a=32767;while(1){r=Ve[n+(t<<1)>>1]|0;s=r<<16>>16>-1?r<<16>>16>16:0;i=s?e:i;o=t+5|0;e=o&65535;if(e<<16>>16>=40)break;else{t=o<<16>>16;a=s?r:a}}Ve[n+(i<<16>>16<<1)>>1]=-1;l=l+1<<16>>16}while((l<<16>>16|0)<(f|0));l=0;do{r=1;e=1;o=32767;while(1){t=Ve[n+(r<<1)>>1]|0;s=t<<16>>16>-1?t<<16>>16>16:0;i=s?e:i;a=r+5|0;e=a&65535;if(e<<16>>16>=40)break;else{r=a<<16>>16;o=s?t:o}}Ve[n+(i<<16>>16<<1)>>1]=-1;l=l+1<<16>>16}while((l<<16>>16|0)<(f|0));l=0;do{r=2;e=2;o=32767;while(1){t=Ve[n+(r<<1)>>1]|0;s=t<<16>>16>-1?t<<16>>16>16:0;i=s?e:i;a=r+5|0;e=a&65535;if(e<<16>>16>=40)break;else{r=a<<16>>16;o=s?t:o}}Ve[n+(i<<16>>16<<1)>>1]=-1;l=l+1<<16>>16}while((l<<16>>16|0)<(f|0));l=0;while(1){r=3;e=3;o=32767;while(1){t=Ve[n+(r<<1)>>1]|0;s=t<<16>>16>-1?t<<16>>16>16:0;i=s?e:i;a=r+5|0;e=a&65535;if(e<<16>>16>=40){o=i;break}else{r=a<<16>>16;o=s?t:o}}Ve[n+(o<<16>>16<<1)>>1]=-1;l=l+1<<16>>16;if((l<<16>>16|0)>=(f|0)){i=0;break}else i=o}do{r=4;e=4;l=32767;while(1){t=Ve[n+(r<<1)>>1]|0;s=t<<16>>16>-1?t<<16>>16>16:0;o=s?e:o;a=r+5|0;e=a&65535;if(e<<16>>16>=40)break;else{r=a<<16>>16;l=s?t:l}}Ve[n+(o<<16>>16<<1)>>1]=-1;i=i+1<<16>>16}while((i<<16>>16|0)<(f|0));return}function _t(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0;_=Ge;Ge=Ge+80|0;v=_;d=40;h=r;w=e;f=256;u=256;while(1){l=Ve[h>>1]|0;h=h+2|0;l=Ze(l,l)|0;if((l|0)!=1073741824){c=(l<<1)+f|0;if((l^f|0)>0&(c^f|0)<0){We[s>>2]=1;f=(f>>>31)+2147483647|0}else f=c}else{We[s>>2]=1;f=2147483647}b=Ve[w>>1]|0;u=(Ze(b<<1,b)|0)+u|0;d=d+-1<<16>>16;if(!(d<<16>>16))break;else w=w+2|0}b=ai(f,s)|0;p=b<<5;b=((p>>5|0)==(b|0)?p:b>>31^2147418112)>>16;p=(ai(u,s)|0)<<5>>16;S=39;m=r+78|0;E=v+78|0;l=n+78|0;while(1){w=Ze(Ve[m>>1]|0,b)|0;m=m+-2|0;h=w<<1;r=e+(S<<1)|0;f=Ve[r>>1]|0;d=Ze(f<<16>>16,p)|0;if((d|0)!=1073741824){c=(d<<1)+h|0;if((d^h|0)>0&(c^h|0)<0){We[s>>2]=1;c=(w>>>30&1)+2147483647|0}}else{We[s>>2]=1;c=2147483647}u=c<<10;u=Ni((u>>10|0)==(c|0)?u:c>>31^2147483647,s)|0;if(u<<16>>16>-1)Ve[l>>1]=32767;else{Ve[l>>1]=-32767;if(u<<16>>16==-32768)u=32767;else u=0-(u&65535)&65535;if(f<<16>>16==-32768)c=32767;else c=0-(f&65535)&65535;Ve[r>>1]=c}l=l+-2|0;Ve[E>>1]=u;if((S|0)<=0)break;else{S=S+-1|0;E=E+-2|0}}r=i<<16>>16;if(i<<16>>16<=0){Ve[o+(r<<1)>>1]=Ve[o>>1]|0;Ge=_;return}w=a&65535;h=0;d=-1;l=0;while(1){if((h|0)<40){u=h;c=h&65535;f=-1;while(1){s=Ve[v+(u<<1)>>1]|0;a=s<<16>>16>f<<16>>16;f=a?s:f;l=a?c:l;u=u+w|0;c=u&65535;if(c<<16>>16>=40)break;else u=u<<16>>16}}else f=-1;Ve[t+(h<<1)>>1]=l;if(f<<16>>16>d<<16>>16)Ve[o>>1]=h;else f=d;h=h+1|0;if((h&65535)<<16>>16==i<<16>>16)break;else d=f}l=Ve[o>>1]|0;Ve[o+(r<<1)>>1]=l;if(i<<16>>16>1)f=1;else{Ge=_;return}do{t=l+1<<16>>16;l=t<<16>>16>=i<<16>>16?0:t;Ve[o+(f<<1)>>1]=l;Ve[o+(f+r<<1)>>1]=l;f=f+1|0}while((f&65535)<<16>>16!=i<<16>>16);Ge=_;return}function kt(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(12)|0;if(!r){e=-1;return e|0}Ve[r>>1]=8;We[e>>2]=r;Ve[r+2>>1]=3;Ve[r+4>>1]=0;We[r+8>>2]=0;e=0;return e|0}function Ft(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function Mt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;do{if((r|0)==8){t=e+2|0;i=(Ve[t>>1]|0)+-1<<16>>16;Ve[t>>1]=i;r=e+8|0;if(!(We[r>>2]|0)){We[n>>2]=1;Ve[t>>1]=3;break}o=e+4|0;if(i<<16>>16>2&(Ve[o>>1]|0)>0){We[n>>2]=2;Ve[o>>1]=(Ve[o>>1]|0)+-1<<16>>16;break}if(!(i<<16>>16)){We[n>>2]=2;Ve[t>>1]=Ve[e>>1]|0;break}else{We[n>>2]=3;break}}else{Ve[e+2>>1]=Ve[e>>1]|0;We[n>>2]=0;r=e+8|0}}while(0);We[r>>2]=We[n>>2];return}function gt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;if(!e){e=-1;return e|0}We[e>>2]=0;n=xi(12)|0;t=n;if(!n){e=-1;return e|0}We[n>>2]=0;i=n+4|0;We[i>>2]=0;o=n+8|0;We[o>>2]=r;if((st(n)|0)<<16>>16==0?(tn(i,We[o>>2]|0)|0)<<16>>16==0:0){lt(We[n>>2]|0)|0;an(We[i>>2]|0)|0;We[e>>2]=t;e=0;return e|0}ft(n);on(i);Hi(n);e=-1;return e|0}function Rt(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;ft(r);on((We[e>>2]|0)+4|0);Hi(We[e>>2]|0);We[e>>2]=0;return}function At(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0;l=Ge;Ge=Ge+448|0;a=l+320|0;s=l;Vi(t|0,0,488)|0;o=0;do{f=n+(o<<1)|0;Ve[f>>1]=(Xe[f>>1]|0)&65528;o=o+1|0}while((o|0)!=160);ut(We[e>>2]|0,n,160);f=e+4|0;sn(We[f>>2]|0,r,n,a,i,s)|0;ct(We[i>>2]|0,a,t,(We[f>>2]|0)+2392|0);Ge=l;return}function yt(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;var E=0,p=0,S=0;S=Ge;Ge=Ge+48|0;E=S+22|0;p=S;Ui(i,(e&-2|0)==6?n:r,E);Ui(i,t,p);n=u;r=E;i=n+22|0;do{Ve[n>>1]=Ve[r>>1]|0;n=n+2|0;r=r+2|0}while((n|0)<(i|0));Li(o,u,d,40,f,0);Li(p,d,d,40,f,0);Di(o,a,w,40);n=c;r=w;i=n+80|0;do{Ve[n>>1]=Ve[r>>1]|0;n=n+2|0;r=r+2|0}while((n|0)<(i|0));Li(o,c,m,40,s,0);Di(E,m,h,40);Li(p,h,h,40,l,0);Ge=S;return}function Ot(e,r,n,t,i,o,a,s,l,f,u,c,d,h,w,m,E){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;l=l|0;f=f|0;u=u|0;c=c|0;d=d|0;h=h|0;w=w|0;m=m|0;E=E|0;var p=0,S=0,b=0,v=0,_=0;if((r|0)==7){b=11;r=t<<16>>16>>>1&65535;p=2}else{b=13;r=t;p=1}Ve[m>>1]=t<<16>>16<13017?t:13017;S=n<<16>>16;w=w+(S<<1)|0;m=r<<16>>16;i=i<<16>>16;n=20;r=l;E=w;while(1){l=E+2|0;_=Ze(Ve[E>>1]|0,m)|0;v=Ze(Ve[l>>1]|0,m)|0;_=(Ze(Ve[r>>1]|0,i)|0)+_<<1;v=(Ze(Ve[r+2>>1]|0,i)|0)+v<<1<>1]=((_<>>16;Ve[l>>1]=(v+32768|0)>>>16;n=n+-1<<16>>16;if(!(n<<16>>16))break;else{r=r+4|0;E=E+4|0}}r=t<<16>>16;Li(o,w,a+(S<<1)|0,40,c,1);n=30;E=0;while(1){v=n+S|0;Ve[d+(E<<1)>>1]=(Xe[e+(v<<1)>>1]|0)-(Xe[a+(v<<1)>>1]|0);v=Ze(Ve[f+(n<<1)>>1]|0,r)|0;_=(Ze(Ve[u+(n<<1)>>1]|0,i)|0)>>b;Ve[h+(E<<1)>>1]=(Xe[s+(n<<1)>>1]|0)-(v>>>14)-_;E=E+1|0;if((E|0)==10)break;else n=n+1|0}return}function Tt(e){e=e|0;var r=0;if(!e){e=-1;return e|0}We[e>>2]=0;r=xi(16)|0;if(!r){e=-1;return e|0}Ve[r>>1]=0;Ve[r+2>>1]=0;Ve[r+4>>1]=0;Ve[r+6>>1]=0;Ve[r+8>>1]=0;Ve[r+10>>1]=0;Ve[r+12>>1]=0;Ve[r+14>>1]=0;We[e>>2]=r;e=0;return e|0}function Dt(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=0;Ve[e+2>>1]=0;Ve[e+4>>1]=0;Ve[e+6>>1]=0;Ve[e+8>>1]=0;Ve[e+10>>1]=0;Ve[e+12>>1]=0;Ve[e+14>>1]=0;e=0;return e|0}function Nt(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function Pt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0;t=Xe[r+6>>1]|0;n=Xe[r+8>>1]|0;i=t-n|0;i=(i&65535|0)!=32767?i&65535:32767;o=Xe[r+10>>1]|0;n=n-o|0;i=(n<<16>>16|0)<(i<<16>>16|0)?n&65535:i;n=Xe[r+12>>1]|0;o=o-n|0;i=(o<<16>>16|0)<(i<<16>>16|0)?o&65535:i;o=Xe[r+14>>1]|0;n=n-o|0;i=(n<<16>>16|0)<(i<<16>>16|0)?n&65535:i;o=o-(Xe[r+16>>1]|0)|0;n=Ve[r+2>>1]|0;a=Xe[r+4>>1]|0;r=(n&65535)-a|0;r=(r&65535|0)!=32767?r&65535:32767;t=a-t|0;if(((o<<16>>16|0)<(i<<16>>16|0)?o&65535:i)<<16>>16<1500?1:(((t<<16>>16|0)<(r<<16>>16|0)?t&65535:r)<<16>>16|0)<((n<<16>>16>32e3?600:n<<16>>16>30500?800:1100)|0)){o=(Ve[e>>1]|0)+1<<16>>16;a=o<<16>>16>11;Ve[e>>1]=a?12:o;return a&1|0}else{Ve[e>>1]=0;return 0}return 0}function Ct(e,r,n){e=e|0;r=r|0;n=n|0;r=Pi(r,3,n)|0;r=Wt(r,Ve[e+2>>1]|0,n)|0;r=Wt(r,Ve[e+4>>1]|0,n)|0;r=Wt(r,Ve[e+6>>1]|0,n)|0;r=Wt(r,Ve[e+8>>1]|0,n)|0;r=Wt(r,Ve[e+10>>1]|0,n)|0;r=Wt(r,Ve[e+12>>1]|0,n)|0;return(Wt(r,Ve[e+14>>1]|0,n)|0)<<16>>16>15565|0}function It(e,r,n){e=e|0;r=r|0;n=n|0;var t=0;n=e+4|0;Ve[e+2>>1]=Ve[n>>1]|0;t=e+6|0;Ve[n>>1]=Ve[t>>1]|0;n=e+8|0;Ve[t>>1]=Ve[n>>1]|0;t=e+10|0;Ve[n>>1]=Ve[t>>1]|0;n=e+12|0;Ve[t>>1]=Ve[n>>1]|0;e=e+14|0;Ve[n>>1]=Ve[e>>1]|0;Ve[e>>1]=r<<16>>16>>>3;return}function Bt(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}We[e>>2]=0;r=xi(128)|0;if(!r){t=-1;return t|0}n=r+72|0;t=n+46|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));Ve[r>>1]=150;Ve[r+36>>1]=150;Ve[r+18>>1]=150;Ve[r+54>>1]=0;Ve[r+2>>1]=150;Ve[r+38>>1]=150;Ve[r+20>>1]=150;Ve[r+56>>1]=0;Ve[r+4>>1]=150;Ve[r+40>>1]=150;Ve[r+22>>1]=150;Ve[r+58>>1]=0;Ve[r+6>>1]=150;Ve[r+42>>1]=150;Ve[r+24>>1]=150;Ve[r+60>>1]=0;Ve[r+8>>1]=150;Ve[r+44>>1]=150;Ve[r+26>>1]=150;Ve[r+62>>1]=0;Ve[r+10>>1]=150;Ve[r+46>>1]=150;Ve[r+28>>1]=150;Ve[r+64>>1]=0;Ve[r+12>>1]=150;Ve[r+48>>1]=150;Ve[r+30>>1]=150;Ve[r+66>>1]=0;Ve[r+14>>1]=150;Ve[r+50>>1]=150;Ve[r+32>>1]=150;Ve[r+68>>1]=0;Ve[r+16>>1]=150;Ve[r+52>>1]=150;Ve[r+34>>1]=150;Ve[r+70>>1]=0;Ve[r+118>>1]=13106;Ve[r+120>>1]=0;Ve[r+122>>1]=0;Ve[r+124>>1]=0;Ve[r+126>>1]=13106;We[e>>2]=r;t=0;return t|0}function Lt(e){e=e|0;var r=0,n=0;if(!e){n=-1;return n|0}r=e+72|0;n=r+46|0;do{Ve[r>>1]=0;r=r+2|0}while((r|0)<(n|0));Ve[e>>1]=150;Ve[e+36>>1]=150;Ve[e+18>>1]=150;Ve[e+54>>1]=0;Ve[e+2>>1]=150;Ve[e+38>>1]=150;Ve[e+20>>1]=150;Ve[e+56>>1]=0;Ve[e+4>>1]=150;Ve[e+40>>1]=150;Ve[e+22>>1]=150;Ve[e+58>>1]=0;Ve[e+6>>1]=150;Ve[e+42>>1]=150;Ve[e+24>>1]=150;Ve[e+60>>1]=0;Ve[e+8>>1]=150;Ve[e+44>>1]=150;Ve[e+26>>1]=150;Ve[e+62>>1]=0;Ve[e+10>>1]=150;Ve[e+46>>1]=150;Ve[e+28>>1]=150;Ve[e+64>>1]=0;Ve[e+12>>1]=150;Ve[e+48>>1]=150;Ve[e+30>>1]=150;Ve[e+66>>1]=0;Ve[e+14>>1]=150;Ve[e+50>>1]=150;Ve[e+32>>1]=150;Ve[e+68>>1]=0;Ve[e+16>>1]=150;Ve[e+52>>1]=150;Ve[e+34>>1]=150;Ve[e+70>>1]=0;Ve[e+118>>1]=13106;Ve[e+120>>1]=0;Ve[e+122>>1]=0;Ve[e+124>>1]=0;Ve[e+126>>1]=13106;n=0;return n|0}function Ut(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function xt(e,r){e=e|0;r=r|0;Ve[e+118>>1]=r;return}function Ht(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0;n=Ni(n,t)|0;if(n<<16>>16<=0)return;n=n<<16>>16;if((n*21298|0)==1073741824){We[t>>2]=1;i=2147483647}else i=n*42596|0;n=r-i|0;if(((n^r)&(i^r)|0)<0){We[t>>2]=1;n=(r>>>31)+2147483647|0}if((n|0)<=0)return;e=e+104|0;Ve[e>>1]=Xe[e>>1]|0|16384;return}function zt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0;e=e+104|0;t=Pi(Ve[e>>1]|0,1,n)|0;Ve[e>>1]=t;if(!(r<<16>>16))return;Ve[e>>1]=(Pi(t,1,n)|0)&65535|8192;return}function Yt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;i=e+112|0;t=Bi(Ve[i>>1]|0,Ve[r>>1]|0,n)|0;t=(t&65535)-((t&65535)>>>15&65535)|0;t=((t<<16>>31^t)&65535)<<16>>16<4;o=Ve[r>>1]|0;Ve[i>>1]=o;r=r+2|0;o=Bi(o,Ve[r>>1]|0,n)|0;o=(o&65535)-((o&65535)>>>15&65535)|0;t=((o<<16>>31^o)&65535)<<16>>16<4?t?2:1:t&1;Ve[i>>1]=Ve[r>>1]|0;i=e+102|0;Ve[i>>1]=Pi(Ve[i>>1]|0,1,n)|0;r=e+110|0;if((Wt(Ve[r>>1]|0,t,n)|0)<<16>>16<=3){Ve[r>>1]=t;return}Ve[i>>1]=Xe[i>>1]|0|16384;Ve[r>>1]=t;return}function jt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0;g=Ge;Ge=Ge+352|0;f=g+24|0;F=g;a=0;i=0;do{t=Ve[r+(a+-40<<1)>>1]|0;t=Ze(t,t)|0;if((t|0)!=1073741824){o=(t<<1)+i|0;if((t^i|0)>0&(o^i|0)<0){We[n>>2]=1;i=(i>>>31)+2147483647|0}else i=o}else{We[n>>2]=1;i=2147483647}a=a+1|0}while((a|0)!=160);u=i;if((343039-u&u|0)<0){We[n>>2]=1;i=(u>>>31)+2147483647|0}else i=u+-343040|0;if((i|0)<0){k=e+102|0;Ve[k>>1]=Xe[k>>1]&16383}l=u+-15e3|0;c=(14999-u&u|0)<0;if(c){We[n>>2]=1;o=(u>>>31)+2147483647|0}else o=l;if((o|0)<0){k=e+108|0;Ve[k>>1]=Xe[k>>1]&16383}t=e+72|0;s=e+74|0;o=Ve[t>>1]|0;a=Ve[s>>1]|0;i=0;do{k=i<<2;v=Bi((Ve[r+(k<<1)>>1]|0)>>>2&65535,((o<<16>>16)*21955|0)>>>15&65535,n)|0;p=((v<<16>>16)*21955|0)>>>15&65535;E=Wt(o,p,n)|0;b=k|1;_=Bi((Ve[r+(b<<1)>>1]|0)>>>2&65535,((a<<16>>16)*6390|0)>>>15&65535,n)|0;S=((_<<16>>16)*6390|0)>>>15&65535;o=Wt(a,S,n)|0;Ve[f+(k<<1)>>1]=Wt(E,o,n)|0;Ve[f+(b<<1)>>1]=Bi(E,o,n)|0;b=k|2;o=Bi((Ve[r+(b<<1)>>1]|0)>>>2&65535,p,n)|0;v=Wt(v,((o<<16>>16)*21955|0)>>>15&65535,n)|0;k=k|3;a=Bi((Ve[r+(k<<1)>>1]|0)>>>2&65535,S,n)|0;_=Wt(_,((a<<16>>16)*6390|0)>>>15&65535,n)|0;Ve[f+(b<<1)>>1]=Wt(v,_,n)|0;Ve[f+(k<<1)>>1]=Bi(v,_,n)|0;i=i+1|0}while((i|0)!=40);Ve[t>>1]=o;Ve[s>>1]=a;a=e+76|0;o=e+80|0;i=0;do{k=i<<2;qt(f+(k<<1)|0,f+((k|2)<<1)|0,a,n);qt(f+((k|1)<<1)|0,f+((k|3)<<1)|0,o,n);i=i+1|0}while((i|0)!=40);a=e+84|0;o=e+86|0;i=e+92|0;t=0;do{k=t<<3;Kt(f+(k<<1)|0,f+((k|4)<<1)|0,a,n);Kt(f+((k|2)<<1)|0,f+((k|6)<<1)|0,o,n);Kt(f+((k|3)<<1)|0,f+((k|7)<<1)|0,i,n);t=t+1|0}while((t|0)!=20);a=e+88|0;o=e+90|0;i=0;do{k=i<<4;Kt(f+(k<<1)|0,f+((k|8)<<1)|0,a,n);Kt(f+((k|4)<<1)|0,f+((k|12)<<1)|0,o,n);i=i+1|0}while((i|0)!=10);m=Vt(f,e+70|0,32,40,4,1,15,n)|0;Ve[F+16>>1]=m;E=Vt(f,e+68|0,16,20,8,7,16,n)|0;Ve[F+14>>1]=E;p=Vt(f,e+66|0,16,20,8,3,16,n)|0;Ve[F+12>>1]=p;S=Vt(f,e+64|0,16,20,8,2,16,n)|0;Ve[F+10>>1]=S;b=Vt(f,e+62|0,16,20,8,6,16,n)|0;Ve[F+8>>1]=b;v=Vt(f,e+60|0,8,10,16,4,16,n)|0;Ve[F+6>>1]=v;_=Vt(f,e+58|0,8,10,16,12,16,n)|0;Ve[F+4>>1]=_;k=Vt(f,e+56|0,8,10,16,8,16,n)|0;Ve[F+2>>1]=k;w=Vt(f,e+54|0,8,10,16,0,16,n)|0;Ve[F>>1]=w;a=0;t=0;do{o=e+(t<<1)|0;r=vi(Ve[o>>1]|0)|0;o=Ve[o>>1]|0;i=r<<16>>16;if(r<<16>>16<0){s=0-i<<16;if((s|0)<983040)s=o<<16>>16>>(s>>16)&65535;else s=0}else{s=o<<16>>16;o=s<>16>>i|0)==(s|0))s=o&65535;else s=(s>>>15^32767)&65535}o=Gt(Pi(Ve[F+(t<<1)>>1]|0,1,n)|0,s)|0;h=Bi(r,5,n)|0;i=h<<16>>16;if(h<<16>>16<0){s=0-i<<16;if((s|0)<983040)s=o<<16>>16>>(s>>16);else s=0}else{o=o<<16>>16;s=o<>16>>i|0)!=(o|0))s=o>>>15^32767}s=s<<16>>16;s=Ze(s,s)|0;if((s|0)!=1073741824){o=(s<<1)+a|0;if((s^a|0)>0&(o^a|0)<0){We[n>>2]=1;a=(a>>>31)+2147483647|0}else a=o}else{We[n>>2]=1;a=2147483647}t=t+1|0}while((t|0)!=9);h=a<<6;a=(((h>>6|0)==(a|0)?h:a>>31^2147418112)>>16)*3641>>15;if((a|0)>32767){We[n>>2]=1;a=32767}h=Ve[e>>1]|0;s=h<<16>>16;d=Ve[e+2>>1]|0;o=(d<<16>>16)+s|0;if((d^h)<<16>>16>-1&(o^s|0)<0){We[n>>2]=1;o=(s>>>31)+2147483647|0}h=Ve[e+4>>1]|0;s=h+o|0;if((h^o|0)>-1&(s^o|0)<0){We[n>>2]=1;s=(o>>>31)+2147483647|0}h=Ve[e+6>>1]|0;o=h+s|0;if((h^s|0)>-1&(o^s|0)<0){We[n>>2]=1;o=(s>>>31)+2147483647|0}h=Ve[e+8>>1]|0;s=h+o|0;if((h^o|0)>-1&(s^o|0)<0){We[n>>2]=1;s=(o>>>31)+2147483647|0}h=Ve[e+10>>1]|0;o=h+s|0;if((h^s|0)>-1&(o^s|0)<0){We[n>>2]=1;o=(s>>>31)+2147483647|0}h=Ve[e+12>>1]|0;s=h+o|0;if((h^o|0)>-1&(s^o|0)<0){We[n>>2]=1;s=(o>>>31)+2147483647|0}h=Ve[e+14>>1]|0;o=h+s|0;if((h^s|0)>-1&(o^s|0)<0){We[n>>2]=1;o=(s>>>31)+2147483647|0}h=Ve[e+16>>1]|0;s=h+o|0;if((h^o|0)>-1&(s^o|0)<0){We[n>>2]=1;s=(o>>>31)+2147483647|0}d=s<<13;d=((d>>13|0)==(s|0)?d:s>>31^2147418112)>>>16&65535;s=(Ze((Bi(d,0,n)|0)<<16>>16,-2808)|0)>>15;if((s|0)>32767){We[n>>2]=1;s=32767}f=Wt(s&65535,1260,n)|0;h=e+100|0;s=Pi(Ve[h>>1]|0,1,n)|0;if((a<<16>>16|0)>((f<<16>>16<720?720:f<<16>>16)|0))s=(s&65535|16384)&65535;Ve[h>>1]=s;if(c){We[n>>2]=1;l=(u>>>31)+2147483647|0}i=Ve[e+118>>1]|0;c=e+126|0;s=Ve[c>>1]|0;t=s<<16>>16<19660;t=i<<16>>16>16?t?2621:6553:t?2621:655;r=s&65535;a=r<<16;s=Ze(t,s<<16>>16)|0;if((s|0)==1073741824){We[n>>2]=1;s=2147483647}else s=s<<1;o=a-s|0;if(((o^a)&(s^a)|0)<0){We[n>>2]=1;o=(r>>>15)+2147483647|0}a=Ze(t,i<<16>>16)|0;do{if((a|0)==1073741824){We[n>>2]=1;s=2147483647}else{s=o+(a<<1)|0;if(!((o^a|0)>0&(s^o|0)<0))break;We[n>>2]=1;s=(o>>>31)+2147483647|0}}while(0);r=Ni(s,n)|0;u=(l|0)>-1;Ve[c>>1]=u?r<<16>>16<13106?13106:r:13106;r=e+106|0;Ve[r>>1]=Pi(Ve[r>>1]|0,1,n)|0;o=e+108|0;s=Pi(Ve[o>>1]|0,1,n)|0;Ve[o>>1]=s;a=Ve[c>>1]|0;e:do{if(u){do{if(a<<16>>16>19660)Ve[r>>1]=Xe[r>>1]|16384;else{if(a<<16>>16>16383)break;a=e+116|0;s=0;break e}}while(0);Ve[o>>1]=s&65535|16384;M=62}else M=62}while(0);do{if((M|0)==62){s=e+116|0;if(a<<16>>16<=22936){a=s;s=0;break}a=s;s=Wt(Ve[s>>1]|0,1,n)|0}}while(0);Ve[a>>1]=s;if((Ve[r>>1]&32640)!=32640){f=(Ve[o>>1]&32767)==32767;Ve[e+122>>1]=f&1;if(f)M=67}else{Ve[e+122>>1]=1;M=67}do{if((M|0)==67){a=e+98|0;if((Ve[a>>1]|0)>=5)break;Ve[a>>1]=5}}while(0);f=e+102|0;do{if((Ve[f>>1]&24576)==24576)M=71;else{if((Ve[e+104>>1]&31744)==31744){M=71;break}if(!(Ve[h>>1]&32640)){Ve[e+98>>1]=20;o=32767;break}else{o=w;a=0;s=0}while(1){t=Ve[e+18+(a<<1)>>1]|0;i=o<<16>>16>t<<16>>16;l=i?o:t;o=i?t:o;l=l<<16>>16<184?184:l;o=o<<16>>16<184?184:o;t=vi(o)|0;i=t<<16>>16;do{if(t<<16>>16<0){r=0-i<<16;if((r|0)>=983040){r=0;break}r=o<<16>>16>>(r>>16)&65535}else{r=o<<16>>16;o=r<>16>>i|0)==(r|0)){r=o&65535;break}r=(r>>>15^32767)&65535}}while(0);l=Gt(Pi(l,1,n)|0,r)|0;s=Wt(s,Pi(l,Bi(8,t,n)|0,n)|0,n)|0;a=a+1|0;if((a|0)==9)break;o=Ve[F+(a<<1)>>1]|0}if(s<<16>>16>1e3){Ve[e+98>>1]=20;o=32767;break}o=Ve[h>>1]|0;a=e+98|0;s=Ve[a>>1]|0;do{if(!(o&16384))M=86;else{if(!(s<<16>>16)){s=o;break}s=Bi(s,1,n)|0;Ve[a>>1]=s;M=86}}while(0);if((M|0)==86){if(s<<16>>16==20){o=32767;break}s=Ve[h>>1]|0}o=(s&16384)==0?16383:3276}}while(0);if((M|0)==71){Ve[e+98>>1]=20;o=32767}a=w;s=0;while(1){l=e+18+(s<<1)|0;r=Si(o,Bi(a,Ve[l>>1]|0,n)|0,n)|0;Ve[l>>1]=Wt(Ve[l>>1]|0,r,n)|0;s=s+1|0;if((s|0)==9)break;a=Ve[F+(s<<1)>>1]|0}do{if(!(Ve[h>>1]&30720)){if(Ve[f>>1]&30720){M=95;break}if(!(Ve[e+114>>1]|0)){i=2097;t=1638;r=2}else M=95}else M=95}while(0);do{if((M|0)==95){if((Ve[e+98>>1]|0)==0?(Ve[e+114>>1]|0)==0:0){i=1867;t=491;r=2;break}i=1638;t=0;r=0}}while(0);o=0;do{a=e+(o<<1)|0;s=Bi(Ve[e+36+(o<<1)>>1]|0,Ve[a>>1]|0,n)|0;if(s<<16>>16<0){s=Si(i,s,n)|0;s=Wt(-2,Wt(Ve[a>>1]|0,s,n)|0,n)|0;s=s<<16>>16<40?40:s}else{s=Si(t,s,n)|0;s=Wt(r,Wt(Ve[a>>1]|0,s,n)|0,n)|0;s=s<<16>>16>16e3?16e3:s}Ve[a>>1]=s;o=o+1|0}while((o|0)!=9);Ve[e+36>>1]=w;Ve[e+38>>1]=k;Ve[e+40>>1]=_;Ve[e+42>>1]=v;Ve[e+44>>1]=b;Ve[e+46>>1]=S;Ve[e+48>>1]=p;Ve[e+50>>1]=E;Ve[e+52>>1]=m;a=d<<16>>16>100;o=a?7:4;a=a?4:5;if(!u){Ve[e+94>>1]=0;Ve[e+96>>1]=0;Ve[e+114>>1]=0;Ve[e+116>>1]=0;n=0;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}i=e+114|0;t=Ve[i>>1]|0;do{if((Ve[e+116>>1]|0)<=100){if(t<<16>>16)break;t=Ve[h>>1]|0;do{if(!(t&16368)){if((Ve[c>>1]|0)>21298)t=1;else break;e=e+120|0;Ve[e>>1]=t;Ge=g;return t|0}}while(0);i=e+94|0;if(!(t&16384)){Ve[i>>1]=0;t=e+96|0;i=Ve[t>>1]|0;if(i<<16>>16<=0){n=0;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}Ve[t>>1]=Bi(i,1,n)|0;n=1;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}else{n=Wt(Ve[i>>1]|0,1,n)|0;Ve[i>>1]=n;if((n<<16>>16|0)<(a|0)){n=1;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}Ve[e+96>>1]=o;n=1;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}}else{if(t<<16>>16>=250)break;Ve[i>>1]=250;t=250}}while(0);Ve[e+94>>1]=4;Ve[i>>1]=Bi(t,1,n)|0;n=1;e=e+120|0;Ve[e>>1]=n;Ge=g;return n|0}function qt(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;i=(Ve[n>>1]|0)*21955>>15;if((i|0)>32767){We[t>>2]=1;i=32767}o=Bi(Ve[e>>1]|0,i&65535,t)|0;i=(o<<16>>16)*21955>>15;if((i|0)>32767){We[t>>2]=1;i=32767}a=Wt(Ve[n>>1]|0,i&65535,t)|0;Ve[n>>1]=o;n=n+2|0;i=(Ve[n>>1]|0)*6390>>15;if((i|0)>32767){We[t>>2]=1;i=32767}o=Bi(Ve[r>>1]|0,i&65535,t)|0;i=(o<<16>>16)*6390>>15;if((i|0)>32767){We[t>>2]=1;i=32767}i=Wt(Ve[n>>1]|0,i&65535,t)|0;Ve[n>>1]=o;Ve[e>>1]=Pi(Wt(a,i,t)|0,1,t)|0;Ve[r>>1]=Pi(Bi(a,i,t)|0,1,t)|0;return}function Kt(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0;i=(Ve[n>>1]|0)*13363>>15;if((i|0)>32767){We[t>>2]=1;i=32767}o=Bi(Ve[r>>1]|0,i&65535,t)|0;i=(o<<16>>16)*13363>>15;if((i|0)>32767){We[t>>2]=1;i=32767}i=Wt(Ve[n>>1]|0,i&65535,t)|0;Ve[n>>1]=o;Ve[r>>1]=Pi(Bi(Ve[e>>1]|0,i,t)|0,1,t)|0;Ve[e>>1]=Pi(Wt(Ve[e>>1]|0,i,t)|0,1,t)|0;return}function Vt(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0;if(n<<16>>16>16){c=i<<16>>16;l=o<<16>>16;d=n<<16>>16;f=0;do{h=Ve[e+((Ze(d,c)|0)+l<<1)>>1]|0;h=(h&65535)-((h&65535)>>>15&65535)|0;h=(h<<16>>31^h)<<16;u=(h>>15)+f|0;if((h>>16^f|0)>0&(u^f|0)<0){We[s>>2]=1;f=(f>>>31)+2147483647|0}else f=u;d=d+1|0}while((d&65535)<<16>>16!=t<<16>>16);d=f}else d=0;f=Ve[r>>1]|0;h=Bi(16,a,s)|0;l=h<<16>>16;if(h<<16>>16>0){t=f<>l|0)!=(f|0))t=f>>31^2147483647}else{l=0-l<<16;if((l|0)<2031616)t=f>>(l>>16);else t=0}l=t+d|0;if((t^d|0)>-1&(l^d|0)<0){We[s>>2]=1;l=(d>>>31)+2147483647|0}h=a<<16>>16;a=a<<16>>16>0;if(a){t=d<>h|0)!=(d|0))t=d>>31^2147483647}else{t=0-h<<16;if((t|0)<2031616)t=d>>(t>>16);else t=0}Ve[r>>1]=t>>>16;if(n<<16>>16>0){c=i<<16>>16;f=o<<16>>16;u=0;do{o=Ve[e+((Ze(u,c)|0)+f<<1)>>1]|0;o=(o&65535)-((o&65535)>>>15&65535)|0;o=(o<<16>>31^o)<<16;t=(o>>15)+l|0;if((o>>16^l|0)>0&(t^l|0)<0){We[s>>2]=1;l=(l>>>31)+2147483647|0}else l=t;u=u+1|0}while((u&65535)<<16>>16!=n<<16>>16)}if(a){t=l<>h|0)==(l|0)){s=t;s=s>>>16;s=s&65535;return s|0}s=l>>31^2147483647;s=s>>>16;s=s&65535;return s|0}else{t=0-h<<16;if((t|0)>=2031616){s=0;s=s>>>16;s=s&65535;return s|0}s=l>>(t>>16);s=s>>>16;s=s&65535;return s|0}return 0}function Wt(e,r,n){e=e|0;r=r|0;n=n|0;e=(r<<16>>16)+(e<<16>>16)|0;if((e|0)<=32767){if((e|0)<-32768){We[n>>2]=1;e=-32768}}else{We[n>>2]=1;e=32767}return e&65535|0}function Xt(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0;k=Ge;Ge=Ge+32|0;v=k+12|0;_=k;Ve[v>>1]=1024;Ve[_>>1]=1024;l=Ve[e+2>>1]|0;a=Ve[e+20>>1]|0;t=((a+l|0)>>>2)+64512|0;Ve[v+2>>1]=t;a=((l-a|0)>>>2)+1024|0;Ve[_+2>>1]=a;l=Ve[e+4>>1]|0;i=Ve[e+18>>1]|0;t=((i+l|0)>>>2)-t|0;Ve[v+4>>1]=t;a=((l-i|0)>>>2)+a|0;Ve[_+4>>1]=a;i=Ve[e+6>>1]|0;l=Ve[e+16>>1]|0;t=((l+i|0)>>>2)-t|0;Ve[v+6>>1]=t;a=((i-l|0)>>>2)+a|0;Ve[_+6>>1]=a;l=Ve[e+8>>1]|0;i=Ve[e+14>>1]|0;t=((i+l|0)>>>2)-t|0;Ve[v+8>>1]=t;a=((l-i|0)>>>2)+a|0;Ve[_+8>>1]=a;i=Ve[e+10>>1]|0;l=Ve[e+12>>1]|0;t=((l+i|0)>>>2)-t|0;Ve[v+10>>1]=t;Ve[_+10>>1]=((i-l|0)>>>2)+a;a=Ve[3454]|0;l=a<<16>>16;e=Ve[v+2>>1]|0;i=(e<<16>>16<<14)+(l<<10)|0;E=i&-65536;i=(i>>>1)-(i>>16<<15)<<16;b=(((Ze(i>>16,l)|0)>>15)+(Ze(E>>16,l)|0)<<2)+-16777216|0;b=(Ve[v+4>>1]<<14)+b|0;s=b>>16;b=(b>>>1)-(s<<15)<<16;E=(((Ze(b>>16,l)|0)>>15)+(Ze(s,l)|0)<<2)-((i>>15)+E)|0;E=(Ve[v+6>>1]<<14)+E|0;i=E>>16;E=(E>>>1)-(i<<15)<<16;s=(((Ze(E>>16,l)|0)>>15)+(Ze(i,l)|0)<<2)-((b>>15)+(s<<16))|0;s=(Ve[v+8>>1]<<14)+s|0;b=s>>16;i=(t<<16>>3)+((((Ze((s>>>1)-(b<<15)<<16>>16,l)|0)>>15)+(Ze(b,l)|0)<<1)-((E>>15)+(i<<16)))|0;E=v+4|0;l=v;b=0;s=0;t=0;m=v+10|0;i=(i+33554432|0)>>>0<67108863?i>>>10&65535:(i|0)>33554431?32767:-32768;e:while(1){p=e<<16>>16<<14;w=l+6|0;h=l+8|0;d=s<<16>>16;while(1){if((d|0)>=60)break e;l=(d&65535)+1<<16>>16;f=Ve[6908+(l<<16>>16<<1)>>1]|0;S=f<<16>>16;s=p+(S<<10)|0;o=s&-65536;s=(s>>>1)-(s>>16<<15)<<16;u=(((Ze(s>>16,S)|0)>>15)+(Ze(o>>16,S)|0)<<2)+-16777216|0;c=Ve[E>>1]|0;u=(c<<16>>16<<14)+u|0;g=u>>16;u=(u>>>1)-(g<<15)<<16;o=(((Ze(u>>16,S)|0)>>15)+(Ze(g,S)|0)<<2)-((s>>15)+o)|0;s=Ve[w>>1]|0;o=(s<<16>>16<<14)+o|0;e=o>>16;o=(o>>>1)-(e<<15)<<16;g=(((Ze(o>>16,S)|0)>>15)+(Ze(e,S)|0)<<2)-((u>>15)+(g<<16))|0;u=Ve[h>>1]|0;g=(u<<16>>16<<14)+g|0;M=g>>16;e=(((Ze((g>>>1)-(M<<15)<<16>>16,S)|0)>>15)+(Ze(M,S)|0)<<1)-((o>>15)+(e<<16))|0;o=Ve[m>>1]|0;e=(o<<16>>16<<13)+e|0;e=(e+33554432|0)>>>0<67108863?e>>>10&65535:(e|0)>33554431?32767:-32768;if((Ze(e<<16>>16,i<<16>>16)|0)<1){S=l;l=c;break}else{d=d+1|0;a=f;i=e}}E=o<<16>>16<<13;m=l<<16>>16<<14;c=s<<16>>16<<14;h=u<<16>>16<<14;o=f<<16>>16;d=4;while(1){M=(a<<16>>16>>>1)+(o>>>1)|0;o=M<<16;w=o>>16;o=p+(o>>6)|0;g=o&-65536;o=(o>>>1)-(o>>16<<15)<<16;u=m+((((Ze(o>>16,w)|0)>>15)+(Ze(g>>16,w)|0)<<2)+-16777216)|0;l=u>>16;u=(u>>>1)-(l<<15)<<16;g=c+((((Ze(u>>16,w)|0)>>15)+(Ze(l,w)|0)<<2)-((o>>15)+g))|0;o=g>>16;g=(g>>>1)-(o<<15)<<16;l=h+((((Ze(g>>16,w)|0)>>15)+(Ze(o,w)|0)<<2)-((u>>15)+(l<<16)))|0;u=l>>16;M=M&65535;o=E+((((Ze((l>>>1)-(u<<15)<<16>>16,w)|0)>>15)+(Ze(u,w)|0)<<1)-((g>>15)+(o<<16)))|0;o=(o+33554432|0)>>>0<67108863?o>>>10&65535:(o|0)>33554431?32767:-32768;g=(Ze(o<<16>>16,e<<16>>16)|0)<1;w=g?f:M;e=g?e:o;a=g?M:a;i=g?o:i;d=d+-1<<16>>16;o=w<<16>>16;if(!(d<<16>>16)){f=o;s=a;a=w;break}else f=w}l=t<<16>>16;o=e<<16>>16;e=(i&65535)-o|0;i=e<<16;if(i){g=(e&65535)-(e>>>15&1)|0;g=g<<16>>31^g;e=(vi(g&65535)|0)<<16>>16;e=(Ze((Gt(16383,g<<16>>16<>16,(s&65535)-f<<16>>16)|0)>>19-e;if((i|0)<0)e=0-(e<<16>>16)|0;a=f-((Ze(e<<16>>16,o)|0)>>>10)&65535}Ve[r+(l<<1)>>1]=a;i=b<<16>>16==0?_:v;M=a<<16>>16;e=Ve[i+2>>1]|0;o=(e<<16>>16<<14)+(M<<10)|0;g=o&-65536;o=(o>>>1)-(o>>16<<15)<<16;p=(((Ze(o>>16,M)|0)>>15)+(Ze(g>>16,M)|0)<<2)+-16777216|0;p=(Ve[i+4>>1]<<14)+p|0;E=p>>16;p=(p>>>1)-(E<<15)<<16;g=(((Ze(p>>16,M)|0)>>15)+(Ze(E,M)|0)<<2)-((o>>15)+g)|0;g=(Ve[i+6>>1]<<14)+g|0;o=g>>16;g=(g>>>1)-(o<<15)<<16;E=(((Ze(g>>16,M)|0)>>15)+(Ze(o,M)|0)<<2)-((p>>15)+(E<<16))|0;E=(Ve[i+8>>1]<<14)+E|0;p=E>>16;t=t+1<<16>>16;o=(((Ze((E>>>1)-(p<<15)<<16>>16,M)|0)>>15)+(Ze(p,M)|0)<<1)-((g>>15)+(o<<16))|0;o=(Ve[i+10>>1]<<13)+o|0;if(t<<16>>16<10){E=i+4|0;l=i;b=b^1;s=S;m=i+10|0;i=(o+33554432|0)>>>0<67108863?o>>>10&65535:(o|0)>33554431?32767:-32768}else{F=13;break}}if((F|0)==13){Ge=k;return}Ve[r>>1]=Ve[n>>1]|0;Ve[r+2>>1]=Ve[n+2>>1]|0;Ve[r+4>>1]=Ve[n+4>>1]|0;Ve[r+6>>1]=Ve[n+6>>1]|0;Ve[r+8>>1]=Ve[n+8>>1]|0;Ve[r+10>>1]=Ve[n+10>>1]|0;Ve[r+12>>1]=Ve[n+12>>1]|0;Ve[r+14>>1]=Ve[n+14>>1]|0;Ve[r+16>>1]=Ve[n+16>>1]|0;Ve[r+18>>1]=Ve[n+18>>1]|0;Ge=k;return}function Gt(e,r){e=e|0;r=r|0;var n=0,t=0,i=0,o=0,a=0,s=0;i=r<<16>>16;if(e<<16>>16<1?1:e<<16>>16>r<<16>>16){i=0;return i|0}if(e<<16>>16==r<<16>>16){i=32767;return i|0}t=i<<1;n=i<<2;o=e<<16>>16<<3;e=(o|0)<(n|0);o=o-(e?0:n)|0;e=e?0:4;a=(o|0)<(t|0);o=o-(a?0:t)|0;r=(o|0)<(i|0);e=(r&1|(a?e:e|2))<<3^8;r=o-(r?0:i)<<3;if((r|0)>=(n|0)){r=r-n|0;e=e&65528|4}o=(r|0)<(t|0);a=r-(o?0:t)|0;r=(a|0)<(i|0);e=(r&1^1|(o?e:e|2))<<16>>13;r=a-(r?0:i)<<3;if((r|0)>=(n|0)){r=r-n|0;e=e&65528|4}o=(r|0)<(t|0);a=r-(o?0:t)|0;r=(a|0)<(i|0);e=(r&1^1|(o?e:e|2))<<16>>13;r=a-(r?0:i)<<3;if((r|0)>=(n|0)){r=r-n|0;e=e&65528|4}s=(r|0)<(t|0);o=r-(s?0:t)|0;a=(o|0)<(i|0);r=(a&1^1|(s?e:e|2))<<16>>13;e=o-(a?0:i)<<3;if((e|0)>=(n|0)){e=e-n|0;r=r&65528|4}s=(e|0)<(t|0);s=((e-(s?0:t)|0)>=(i|0)|(s?r:r|2))&65535;return s|0}function Zt(e){e=e|0;if(!e){e=-1;return e|0}Ve[e>>1]=-14336;Ve[e+8>>1]=-2381;Ve[e+2>>1]=-14336;Ve[e+10>>1]=-2381;Ve[e+4>>1]=-14336;Ve[e+12>>1]=-2381;Ve[e+6>>1]=-14336;Ve[e+14>>1]=-2381;e=0;return e|0}function Jt(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0;h=Ge;Ge=Ge+16|0;c=h+2|0;d=h;l=0;f=10;while(1){u=Ve[n>>1]|0;u=((Ze(u,u)|0)>>>3)+l|0;l=Ve[n+2>>1]|0;l=u+((Ze(l,l)|0)>>>3)|0;u=Ve[n+4>>1]|0;u=l+((Ze(u,u)|0)>>>3)|0;l=Ve[n+6>>1]|0;l=u+((Ze(l,l)|0)>>>3)|0;f=f+-1<<16>>16;if(!(f<<16>>16))break;else n=n+8|0}f=l<<4;f=(f|0)<0?2147483647:f;if((r|0)==7){si(((Ni(f,s)|0)<<16>>16)*52428|0,c,d,s);u=Xe[c>>1]<<16;f=Ve[d>>1]<<1;r=Ve[e+8>>1]|0;l=(r<<16>>16)*88|0;if(r<<16>>16>-1&(l|0)<-783741){We[s>>2]=1;n=2147483647}else n=l+783741|0;r=(Ve[e+10>>1]|0)*74|0;l=r+n|0;if((r^n|0)>-1&(l^n|0)<0){We[s>>2]=1;n=(n>>>31)+2147483647|0}else n=l;r=(Ve[e+12>>1]|0)*44|0;l=r+n|0;if((r^n|0)>-1&(l^n|0)<0){We[s>>2]=1;n=(n>>>31)+2147483647|0}else n=l;e=(Ve[e+14>>1]|0)*24|0;l=e+n|0;if((e^n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}e=u+-1966080+f|0;n=l-e|0;if(((n^l)&(l^e)|0)<0){We[s>>2]=1;n=(l>>>31)+2147483647|0}s=n>>17;Ve[t>>1]=s;s=(n>>2)-(s<<15)|0;s=s&65535;Ve[i>>1]=s;Ge=h;return}u=bi(f)|0;l=u<<16>>16;if(u<<16>>16>0){n=f<>l|0)==(f|0))f=n;else f=f>>31^2147483647}else{l=0-l<<16;if((l|0)<2031616)f=f>>(l>>16);else f=0}li(f,u,c,d);c=Ze(Ve[c>>1]|0,-49320)|0;l=(Ze(Ve[d>>1]|0,-24660)|0)>>15;l=(l&65536|0)==0?l:l|-65536;d=l<<1;n=d+c|0;if((d^c|0)>-1&(n^d|0)<0){We[s>>2]=1;n=(l>>>30&1)+2147483647|0}switch(r|0){case 6:{l=n+2134784|0;if((n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}break}case 5:{Ve[a>>1]=f>>>16;Ve[o>>1]=-11-(u&65535);l=n+2183936|0;if((n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}break}case 4:{l=n+2085632|0;if((n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}break}case 3:{l=n+2065152|0;if((n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}break}default:{l=n+2134784|0;if((n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}}}do{if((l|0)<=2097151)if((l|0)<-2097152){We[s>>2]=1;n=-2147483648;break}else{n=l<<10;break}else{We[s>>2]=1;n=2147483647}}while(0);a=(Ve[e>>1]|0)*11142|0;l=a+n|0;if((a^n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}a=(Ve[e+2>>1]|0)*9502|0;n=a+l|0;if((a^l|0)>-1&(n^l|0)<0){We[s>>2]=1;n=(l>>>31)+2147483647|0}a=(Ve[e+4>>1]|0)*5570|0;l=a+n|0;if((a^n|0)>-1&(l^n|0)<0){We[s>>2]=1;l=(n>>>31)+2147483647|0}e=(Ve[e+6>>1]|0)*3112|0;n=e+l|0;if((e^l|0)>-1&(n^l|0)<0){We[s>>2]=1;n=(l>>>31)+2147483647|0}n=Ze(n>>16,(r|0)==4?10878:10886)|0;if((n|0)<0)n=~((n^-256)>>8);else n=n>>8;Ve[t>>1]=n>>>16;if((n|0)<0)l=~((n^-2)>>1);else l=n>>1;t=n>>16<<15;n=l-t|0;if(((n^l)&(t^l)|0)>=0){s=n;s=s&65535;Ve[i>>1]=s;Ge=h;return}We[s>>2]=1;s=(l>>>31)+2147483647|0;s=s&65535;Ve[i>>1]=s;Ge=h;return}function Qt(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;i=e+4|0;Ve[e+6>>1]=Ve[i>>1]|0;o=e+12|0;Ve[e+14>>1]=Ve[o>>1]|0;t=e+2|0;Ve[i>>1]=Ve[t>>1]|0;i=e+10|0;Ve[o>>1]=Ve[i>>1]|0;Ve[t>>1]=Ve[e>>1]|0;t=e+8|0;Ve[i>>1]=Ve[t>>1]|0;Ve[t>>1]=r;Ve[e>>1]=n;return}function $t(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0;o=Wt(0,Ve[e+8>>1]|0,t)|0;o=Wt(o,Ve[e+10>>1]|0,t)|0;o=Wt(o,Ve[e+12>>1]|0,t)|0;o=Wt(o,Ve[e+14>>1]|0,t)|0;i=o<<16>>16>>2;i=(o<<16>>16<0?i|49152:i)&65535;Ve[r>>1]=i<<16>>16<-2381?-2381:i;r=Wt(0,Ve[e>>1]|0,t)|0;r=Wt(r,Ve[e+2>>1]|0,t)|0;r=Wt(r,Ve[e+4>>1]|0,t)|0;t=Wt(r,Ve[e+6>>1]|0,t)|0;e=t<<16>>16>>2;e=(t<<16>>16<0?e|49152:e)&65535;Ve[n>>1]=e<<16>>16<-14336?-14336:e;return}function ei(e){e=e|0;We[e>>2]=6892;We[e+4>>2]=8180;We[e+8>>2]=21e3;We[e+12>>2]=9716;We[e+16>>2]=22024;We[e+20>>2]=12788;We[e+24>>2]=24072;We[e+28>>2]=26120;We[e+32>>2]=28168;We[e+36>>2]=6876;We[e+40>>2]=7452;We[e+44>>2]=8140;We[e+48>>2]=20980;We[e+52>>2]=16884;We[e+56>>2]=17908;We[e+60>>2]=7980;We[e+64>>2]=8160;We[e+68>>2]=6678;We[e+72>>2]=6646;We[e+76>>2]=6614;We[e+80>>2]=29704;We[e+84>>2]=28680;We[e+88>>2]=3720;We[e+92>>2]=8;We[e+96>>2]=4172;We[e+100>>2]=44;We[e+104>>2]=3436;We[e+108>>2]=30316;We[e+112>>2]=30796;We[e+116>>2]=31276;We[e+120>>2]=7472;We[e+124>>2]=7552;We[e+128>>2]=7632;We[e+132>>2]=7712;return}function ri(e,r){e=e|0;r=r|0;var n=0,t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0;c=Ge;Ge=Ge+48|0;f=c+18|0;u=c;l=r<<16>>16;qi(u|0,e|0,l<<1|0)|0;if(r<<16>>16>0){n=0;t=0}else{u=l>>1;u=f+(u<<1)|0;u=Ve[u>>1]|0;u=u<<16>>16;u=e+(u<<1)|0;u=Ve[u>>1]|0;Ge=c;return u|0}do{s=0;a=-32767;while(1){i=Ve[u+(s<<1)>>1]|0;o=i<<16>>16>16;t=o?t:s&65535;s=s+1|0;if((s&65535)<<16>>16==r<<16>>16)break;else a=o?a:i}Ve[u+(t<<16>>16<<1)>>1]=-32768;Ve[f+(n<<1)>>1]=t;n=n+1|0}while((n&65535)<<16>>16!=r<<16>>16);u=l>>1;u=f+(u<<1)|0;u=Ve[u>>1]|0;u=u<<16>>16;u=e+(u<<1)|0;u=Ve[u>>1]|0;Ge=c;return u|0}function ni(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0;o=Ge;Ge=Ge+32|0;a=o;M=r+2|0;F=a+2|0;Ve[a>>1]=((Ve[r>>1]|0)>>>1)+((Ve[e>>1]|0)>>>1);k=r+4|0;_=a+4|0;Ve[F>>1]=((Ve[M>>1]|0)>>>1)+((Ve[e+2>>1]|0)>>>1);v=r+6|0;b=a+6|0;Ve[_>>1]=((Ve[k>>1]|0)>>>1)+((Ve[e+4>>1]|0)>>>1);S=r+8|0;p=a+8|0;Ve[b>>1]=((Ve[v>>1]|0)>>>1)+((Ve[e+6>>1]|0)>>>1);E=r+10|0;m=a+10|0;Ve[p>>1]=((Ve[S>>1]|0)>>>1)+((Ve[e+8>>1]|0)>>>1);w=r+12|0;h=a+12|0;Ve[m>>1]=((Ve[E>>1]|0)>>>1)+((Ve[e+10>>1]|0)>>>1);d=r+14|0;c=a+14|0;Ve[h>>1]=((Ve[w>>1]|0)>>>1)+((Ve[e+12>>1]|0)>>>1);u=r+16|0;f=a+16|0;Ve[c>>1]=((Ve[d>>1]|0)>>>1)+((Ve[e+14>>1]|0)>>>1);l=r+18|0;s=a+18|0;Ve[f>>1]=((Ve[u>>1]|0)>>>1)+((Ve[e+16>>1]|0)>>>1);Ve[s>>1]=((Ve[l>>1]|0)>>>1)+((Ve[e+18>>1]|0)>>>1);ci(a,t,i);ci(r,t+22|0,i);Ve[a>>1]=((Ve[n>>1]|0)>>>1)+((Ve[r>>1]|0)>>>1);Ve[F>>1]=((Ve[n+2>>1]|0)>>>1)+((Ve[M>>1]|0)>>>1);Ve[_>>1]=((Ve[n+4>>1]|0)>>>1)+((Ve[k>>1]|0)>>>1);Ve[b>>1]=((Ve[n+6>>1]|0)>>>1)+((Ve[v>>1]|0)>>>1);Ve[p>>1]=((Ve[n+8>>1]|0)>>>1)+((Ve[S>>1]|0)>>>1);Ve[m>>1]=((Ve[n+10>>1]|0)>>>1)+((Ve[E>>1]|0)>>>1);Ve[h>>1]=((Ve[n+12>>1]|0)>>>1)+((Ve[w>>1]|0)>>>1);Ve[c>>1]=((Ve[n+14>>1]|0)>>>1)+((Ve[d>>1]|0)>>>1);Ve[f>>1]=((Ve[n+16>>1]|0)>>>1)+((Ve[u>>1]|0)>>>1);Ve[s>>1]=((Ve[n+18>>1]|0)>>>1)+((Ve[l>>1]|0)>>>1);ci(a,t+44|0,i);ci(n,t+66|0,i);Ge=o;return}function ti(e,r,n,t,i){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;var o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0;o=Ge;Ge=Ge+32|0;a=o;M=r+2|0;F=a+2|0;Ve[a>>1]=((Ve[r>>1]|0)>>>1)+((Ve[e>>1]|0)>>>1);k=r+4|0;_=a+4|0;Ve[F>>1]=((Ve[M>>1]|0)>>>1)+((Ve[e+2>>1]|0)>>>1);v=r+6|0;b=a+6|0;Ve[_>>1]=((Ve[k>>1]|0)>>>1)+((Ve[e+4>>1]|0)>>>1);S=r+8|0;p=a+8|0;Ve[b>>1]=((Ve[v>>1]|0)>>>1)+((Ve[e+6>>1]|0)>>>1);E=r+10|0;m=a+10|0;Ve[p>>1]=((Ve[S>>1]|0)>>>1)+((Ve[e+8>>1]|0)>>>1);w=r+12|0;h=a+12|0;Ve[m>>1]=((Ve[E>>1]|0)>>>1)+((Ve[e+10>>1]|0)>>>1);d=r+14|0;c=a+14|0;Ve[h>>1]=((Ve[w>>1]|0)>>>1)+((Ve[e+12>>1]|0)>>>1);u=r+16|0;f=a+16|0;Ve[c>>1]=((Ve[d>>1]|0)>>>1)+((Ve[e+14>>1]|0)>>>1);l=r+18|0;s=a+18|0;Ve[f>>1]=((Ve[u>>1]|0)>>>1)+((Ve[e+16>>1]|0)>>>1);Ve[s>>1]=((Ve[l>>1]|0)>>>1)+((Ve[e+18>>1]|0)>>>1);ci(a,t,i);Ve[a>>1]=((Ve[n>>1]|0)>>>1)+((Ve[r>>1]|0)>>>1);Ve[F>>1]=((Ve[n+2>>1]|0)>>>1)+((Ve[M>>1]|0)>>>1);Ve[_>>1]=((Ve[n+4>>1]|0)>>>1)+((Ve[k>>1]|0)>>>1);Ve[b>>1]=((Ve[n+6>>1]|0)>>>1)+((Ve[v>>1]|0)>>>1);Ve[p>>1]=((Ve[n+8>>1]|0)>>>1)+((Ve[S>>1]|0)>>>1);Ve[m>>1]=((Ve[n+10>>1]|0)>>>1)+((Ve[E>>1]|0)>>>1);Ve[h>>1]=((Ve[n+12>>1]|0)>>>1)+((Ve[w>>1]|0)>>>1);Ve[c>>1]=((Ve[n+14>>1]|0)>>>1)+((Ve[d>>1]|0)>>>1);Ve[f>>1]=((Ve[n+16>>1]|0)>>>1)+((Ve[u>>1]|0)>>>1);Ve[s>>1]=((Ve[n+18>>1]|0)>>>1)+((Ve[l>>1]|0)>>>1);ci(a,t+44|0,i);Ge=o;return}function ii(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0;i=Ge;Ge=Ge+32|0;o=i;D=Ve[e>>1]|0;Ve[o>>1]=D-(D>>>2)+((Ve[r>>1]|0)>>>2);D=e+2|0;y=Ve[D>>1]|0;N=r+2|0;T=o+2|0;Ve[T>>1]=y-(y>>>2)+((Ve[N>>1]|0)>>>2);y=e+4|0;g=Ve[y>>1]|0;O=r+4|0;A=o+4|0;Ve[A>>1]=g-(g>>>2)+((Ve[O>>1]|0)>>>2);g=e+6|0;k=Ve[g>>1]|0;R=r+6|0;M=o+6|0;Ve[M>>1]=k-(k>>>2)+((Ve[R>>1]|0)>>>2);k=e+8|0;b=Ve[k>>1]|0;F=r+8|0;_=o+8|0;Ve[_>>1]=b-(b>>>2)+((Ve[F>>1]|0)>>>2);b=e+10|0;E=Ve[b>>1]|0;v=r+10|0;S=o+10|0;Ve[S>>1]=E-(E>>>2)+((Ve[v>>1]|0)>>>2);E=e+12|0;h=Ve[E>>1]|0;p=r+12|0;m=o+12|0;Ve[m>>1]=h-(h>>>2)+((Ve[p>>1]|0)>>>2);h=e+14|0;u=Ve[h>>1]|0;w=r+14|0;d=o+14|0;Ve[d>>1]=u-(u>>>2)+((Ve[w>>1]|0)>>>2);u=e+16|0;s=Ve[u>>1]|0;c=r+16|0;f=o+16|0;Ve[f>>1]=s-(s>>>2)+((Ve[c>>1]|0)>>>2);s=e+18|0;P=Ve[s>>1]|0;l=r+18|0;a=o+18|0;Ve[a>>1]=P-(P>>>2)+((Ve[l>>1]|0)>>>2);ci(o,n,t);Ve[o>>1]=((Ve[e>>1]|0)>>>1)+((Ve[r>>1]|0)>>>1);Ve[T>>1]=((Ve[D>>1]|0)>>>1)+((Ve[N>>1]|0)>>>1);Ve[A>>1]=((Ve[y>>1]|0)>>>1)+((Ve[O>>1]|0)>>>1);Ve[M>>1]=((Ve[g>>1]|0)>>>1)+((Ve[R>>1]|0)>>>1);Ve[_>>1]=((Ve[k>>1]|0)>>>1)+((Ve[F>>1]|0)>>>1);Ve[S>>1]=((Ve[b>>1]|0)>>>1)+((Ve[v>>1]|0)>>>1);Ve[m>>1]=((Ve[E>>1]|0)>>>1)+((Ve[p>>1]|0)>>>1);Ve[d>>1]=((Ve[h>>1]|0)>>>1)+((Ve[w>>1]|0)>>>1);Ve[f>>1]=((Ve[u>>1]|0)>>>1)+((Ve[c>>1]|0)>>>1);Ve[a>>1]=((Ve[s>>1]|0)>>>1)+((Ve[l>>1]|0)>>>1);ci(o,n+22|0,t);P=Ve[r>>1]|0;Ve[o>>1]=P-(P>>>2)+((Ve[e>>1]|0)>>>2);e=Ve[N>>1]|0;Ve[T>>1]=e-(e>>>2)+((Ve[D>>1]|0)>>>2);e=Ve[O>>1]|0;Ve[A>>1]=e-(e>>>2)+((Ve[y>>1]|0)>>>2);e=Ve[R>>1]|0;Ve[M>>1]=e-(e>>>2)+((Ve[g>>1]|0)>>>2);e=Ve[F>>1]|0;Ve[_>>1]=e-(e>>>2)+((Ve[k>>1]|0)>>>2);e=Ve[v>>1]|0;Ve[S>>1]=e-(e>>>2)+((Ve[b>>1]|0)>>>2);e=Ve[p>>1]|0;Ve[m>>1]=e-(e>>>2)+((Ve[E>>1]|0)>>>2);e=Ve[w>>1]|0;Ve[d>>1]=e-(e>>>2)+((Ve[h>>1]|0)>>>2);e=Ve[c>>1]|0;Ve[f>>1]=e-(e>>>2)+((Ve[u>>1]|0)>>>2);e=Ve[l>>1]|0;Ve[a>>1]=e-(e>>>2)+((Ve[s>>1]|0)>>>2);ci(o,n+44|0,t);ci(r,n+66|0,t);Ge=i;return}function oi(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0;i=Ge;Ge=Ge+32|0;o=i;D=Ve[e>>1]|0;Ve[o>>1]=D-(D>>>2)+((Ve[r>>1]|0)>>>2);D=e+2|0;y=Ve[D>>1]|0;N=r+2|0;T=o+2|0;Ve[T>>1]=y-(y>>>2)+((Ve[N>>1]|0)>>>2);y=e+4|0;g=Ve[y>>1]|0;O=r+4|0;A=o+4|0;Ve[A>>1]=g-(g>>>2)+((Ve[O>>1]|0)>>>2);g=e+6|0;k=Ve[g>>1]|0;R=r+6|0;M=o+6|0;Ve[M>>1]=k-(k>>>2)+((Ve[R>>1]|0)>>>2);k=e+8|0;b=Ve[k>>1]|0;F=r+8|0;_=o+8|0;Ve[_>>1]=b-(b>>>2)+((Ve[F>>1]|0)>>>2);b=e+10|0;E=Ve[b>>1]|0;v=r+10|0;S=o+10|0;Ve[S>>1]=E-(E>>>2)+((Ve[v>>1]|0)>>>2);E=e+12|0;h=Ve[E>>1]|0;p=r+12|0;m=o+12|0;Ve[m>>1]=h-(h>>>2)+((Ve[p>>1]|0)>>>2);h=e+14|0;u=Ve[h>>1]|0;w=r+14|0;d=o+14|0;Ve[d>>1]=u-(u>>>2)+((Ve[w>>1]|0)>>>2);u=e+16|0;s=Ve[u>>1]|0;c=r+16|0;f=o+16|0;Ve[f>>1]=s-(s>>>2)+((Ve[c>>1]|0)>>>2);s=e+18|0;P=Ve[s>>1]|0;l=r+18|0;a=o+18|0;Ve[a>>1]=P-(P>>>2)+((Ve[l>>1]|0)>>>2);ci(o,n,t);Ve[o>>1]=((Ve[e>>1]|0)>>>1)+((Ve[r>>1]|0)>>>1);Ve[T>>1]=((Ve[D>>1]|0)>>>1)+((Ve[N>>1]|0)>>>1);Ve[A>>1]=((Ve[y>>1]|0)>>>1)+((Ve[O>>1]|0)>>>1);Ve[M>>1]=((Ve[g>>1]|0)>>>1)+((Ve[R>>1]|0)>>>1);Ve[_>>1]=((Ve[k>>1]|0)>>>1)+((Ve[F>>1]|0)>>>1);Ve[S>>1]=((Ve[b>>1]|0)>>>1)+((Ve[v>>1]|0)>>>1);Ve[m>>1]=((Ve[E>>1]|0)>>>1)+((Ve[p>>1]|0)>>>1);Ve[d>>1]=((Ve[h>>1]|0)>>>1)+((Ve[w>>1]|0)>>>1);Ve[f>>1]=((Ve[u>>1]|0)>>>1)+((Ve[c>>1]|0)>>>1);Ve[a>>1]=((Ve[s>>1]|0)>>>1)+((Ve[l>>1]|0)>>>1);ci(o,n+22|0,t);r=Ve[r>>1]|0;Ve[o>>1]=r-(r>>>2)+((Ve[e>>1]|0)>>>2);e=Ve[N>>1]|0;Ve[T>>1]=e-(e>>>2)+((Ve[D>>1]|0)>>>2);e=Ve[O>>1]|0;Ve[A>>1]=e-(e>>>2)+((Ve[y>>1]|0)>>>2);e=Ve[R>>1]|0;Ve[M>>1]=e-(e>>>2)+((Ve[g>>1]|0)>>>2);e=Ve[F>>1]|0;Ve[_>>1]=e-(e>>>2)+((Ve[k>>1]|0)>>>2);e=Ve[v>>1]|0;Ve[S>>1]=e-(e>>>2)+((Ve[b>>1]|0)>>>2);e=Ve[p>>1]|0;Ve[m>>1]=e-(e>>>2)+((Ve[E>>1]|0)>>>2);e=Ve[w>>1]|0;Ve[d>>1]=e-(e>>>2)+((Ve[h>>1]|0)>>>2);e=Ve[c>>1]|0;Ve[f>>1]=e-(e>>>2)+((Ve[u>>1]|0)>>>2);e=Ve[l>>1]|0;Ve[a>>1]=e-(e>>>2)+((Ve[s>>1]|0)>>>2);ci(o,n+44|0,t);Ge=i;return}function ai(e,r){e=e|0;r=r|0;var n=0,t=0;if((e|0)<1){r=1073741823;return r|0}n=(bi(e)|0)<<16>>16;r=30-n|0;e=e<>(r&1^1);n=(e>>25<<16)+-1048576>>16;t=Ve[7030+(n<<1)>>1]|0;r=(t<<16)-(Ze(t-(Xe[7030+(n+1<<1)>>1]|0)<<16>>15,e>>>10&32767)|0)>>(r<<16>>17)+1;return r|0}function si(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;t=bi(e)|0;li(e<<(t<<16>>16),t,r,n);return}function li(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;if((e|0)<1){Ve[n>>1]=0;n=0;Ve[t>>1]=n;return}else{Ve[n>>1]=30-(r&65535);n=(e>>25<<16)+-2097152>>16;r=Ve[7128+(n<<1)>>1]|0;n=((r<<16)-(Ze(e>>>9&65534,r-(Xe[7128+(n+1<<1)>>1]|0)<<16>>16)|0)|0)>>>16&65535;Ve[t>>1]=n;return}}function fi(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0;t=e+2|0;n=Ve[t>>1]|0;Ve[r>>1]=n;i=e+4|0;Ve[r+2>>1]=(Xe[i>>1]|0)-(Xe[e>>1]|0);Ve[r+4>>1]=(Xe[e+6>>1]|0)-(Xe[t>>1]|0);t=e+8|0;Ve[r+6>>1]=(Xe[t>>1]|0)-(Xe[i>>1]|0);Ve[r+8>>1]=(Xe[e+10>>1]|0)-(Xe[e+6>>1]|0);i=e+12|0;Ve[r+10>>1]=(Xe[i>>1]|0)-(Xe[t>>1]|0);Ve[r+12>>1]=(Xe[e+14>>1]|0)-(Xe[e+10>>1]|0);Ve[r+14>>1]=(Xe[e+16>>1]|0)-(Xe[i>>1]|0);Ve[r+16>>1]=(Xe[e+18>>1]|0)-(Xe[e+14>>1]|0);Ve[r+18>>1]=16384-(Xe[e+16>>1]|0);e=10;i=r;while(1){n=n<<16>>16;r=(n<<16)+-120782848|0;if((r|0)>0)r=1843-((r>>16)*12484>>16)|0;else r=3427-((n*56320|0)>>>16)|0;t=i+2|0;Ve[i>>1]=r<<3;e=e+-1<<16>>16;if(!(e<<16>>16))break;n=Ve[t>>1]|0;i=t}return}function ui(e,r,n){e=e|0;r=r|0;n=n|0;n=r<<16>>16;if(r<<16>>16>31){r=0;return r|0}if(r<<16>>16>0)return((1<>16<31?e>>n:0)|0;n=0-n<<16>>16;r=e<>n|0)==(e|0)?r:e>>31^2147483647;return r|0}function ci(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0;m=Ge;Ge=Ge+48|0;h=m+24|0;w=m;c=h+4|0;We[h>>2]=16777216;t=0-(Ve[e>>1]|0)|0;d=h+8|0;We[c>>2]=t<<10;i=Ve[e+4>>1]|0;l=t>>6;We[d>>2]=33554432-(((Ze((t<<9)-(l<<15)<<16>>16,i)|0)>>15)+(Ze(l,i)|0)<<2);l=h+4|0;i=(We[l>>2]|0)-(i<<10)|0;We[l>>2]=i;l=h+12|0;t=h+4|0;We[l>>2]=i;n=Ve[e+8>>1]|0;o=i;f=1;while(1){s=l+-4|0;a=We[s>>2]|0;u=a>>16;We[l>>2]=o+i-(((Ze((a>>>1)-(u<<15)<<16>>16,n)|0)>>15)+(Ze(u,n)|0)<<2);if((f|0)==2)break;o=We[l+-12>>2]|0;l=s;i=a;f=f+1|0}We[t>>2]=(We[t>>2]|0)-(n<<10);n=h+16|0;t=We[h+8>>2]|0;We[n>>2]=t;s=Ve[e+12>>1]|0;i=t;l=1;while(1){a=n+-4|0;o=We[a>>2]|0;u=o>>16;We[n>>2]=i+t-(((Ze((o>>>1)-(u<<15)<<16>>16,s)|0)>>15)+(Ze(u,s)|0)<<2);if((l|0)==3)break;i=We[n+-12>>2]|0;n=a;t=o;l=l+1|0}n=h+4|0;We[n>>2]=(We[n>>2]|0)-(s<<10);n=h+20|0;i=We[h+12>>2]|0;We[n>>2]=i;t=Ve[e+16>>1]|0;o=i;l=1;while(1){s=n+-4|0;a=We[s>>2]|0;u=a>>16;We[n>>2]=o+i-(((Ze((a>>>1)-(u<<15)<<16>>16,t)|0)>>15)+(Ze(u,t)|0)<<2);if((l|0)==4)break;o=We[n+-12>>2]|0;n=s;i=a;l=l+1|0}l=h+4|0;We[l>>2]=(We[l>>2]|0)-(t<<10);We[w>>2]=16777216;l=0-(Ve[e+2>>1]|0)|0;u=w+8|0;We[w+4>>2]=l<<10;t=Ve[e+6>>1]|0;f=l>>6;We[u>>2]=33554432-(((Ze((l<<9)-(f<<15)<<16>>16,t)|0)>>15)+(Ze(f,t)|0)<<2);f=w+4|0;t=(We[f>>2]|0)-(t<<10)|0;We[f>>2]=t;f=w+12|0;l=w+4|0;We[f>>2]=t;s=Ve[e+10>>1]|0;i=t;n=1;while(1){a=f+-4|0;o=We[a>>2]|0;E=o>>16;We[f>>2]=i+t-(((Ze((o>>>1)-(E<<15)<<16>>16,s)|0)>>15)+(Ze(E,s)|0)<<2);if((n|0)==2)break;i=We[f+-12>>2]|0;f=a;t=o;n=n+1|0}We[l>>2]=(We[l>>2]|0)-(s<<10);l=w+16|0;t=We[w+8>>2]|0;We[l>>2]=t;s=Ve[e+14>>1]|0;i=t;n=1;while(1){a=l+-4|0;o=We[a>>2]|0;E=o>>16;We[l>>2]=i+t-(((Ze((o>>>1)-(E<<15)<<16>>16,s)|0)>>15)+(Ze(E,s)|0)<<2);if((n|0)==3)break;i=We[l+-12>>2]|0;l=a;t=o;n=n+1|0}n=w+4|0;We[n>>2]=(We[n>>2]|0)-(s<<10);n=w+20|0;s=We[w+12>>2]|0;We[n>>2]=s;t=Ve[e+18>>1]|0;a=s;l=1;while(1){i=n+-4|0;o=We[i>>2]|0;E=o>>16;We[n>>2]=a+s-(((Ze((o>>>1)-(E<<15)<<16>>16,t)|0)>>15)+(Ze(E,t)|0)<<2);if((l|0)==4)break;a=We[n+-12>>2]|0;n=i;s=o;l=l+1|0}a=(We[w+4>>2]|0)-(t<<10)|0;f=h+20|0;s=w+20|0;l=We[h+16>>2]|0;e=(We[f>>2]|0)+l|0;We[f>>2]=e;f=We[w+16>>2]|0;E=(We[s>>2]|0)-f|0;We[s>>2]=E;s=We[h+12>>2]|0;l=l+s|0;We[h+16>>2]=l;o=We[w+12>>2]|0;f=f-o|0;We[w+16>>2]=f;t=We[d>>2]|0;s=s+t|0;We[h+12>>2]=s;i=We[u>>2]|0;d=o-i|0;We[w+12>>2]=d;o=We[c>>2]|0;u=t+o|0;We[h+8>>2]=u;c=i-a|0;We[w+8>>2]=c;h=o+(We[h>>2]|0)|0;w=a-(We[w>>2]|0)|0;Ve[r>>1]=4096;h=h+4096|0;Ve[r+2>>1]=(h+w|0)>>>13;Ve[r+20>>1]=(h-w|0)>>>13;w=u+4096|0;Ve[r+4>>1]=(w+c|0)>>>13;Ve[r+18>>1]=(w-c|0)>>>13;w=s+4096|0;Ve[r+6>>1]=(w+d|0)>>>13;Ve[r+16>>1]=(w-d|0)>>>13;w=l+4096|0;Ve[r+8>>1]=(w+f|0)>>>13;Ve[r+14>>1]=(w-f|0)>>>13;w=e+4096|0;Ve[r+10>>1]=(w+E|0)>>>13;Ve[r+12>>1]=(w-E|0)>>>13;Ge=m;return}function di(e){e=e|0;var r=0,n=0,t=0,i=0,o=0;if(!e){o=-1;return o|0}We[e>>2]=0;r=xi(44)|0;if(!r){o=-1;return o|0}n=r+40|0;if((Ai(n)|0)<<16>>16){o=-1;return o|0}t=r;i=7452;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));t=r+20|0;i=7452;o=t+20|0;do{Ve[t>>1]=Ve[i>>1]|0;t=t+2|0;i=i+2|0}while((t|0)<(o|0));yi(We[n>>2]|0)|0;We[e>>2]=r;o=0;return o|0}function hi(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}r=e;n=7452;t=r+20|0;do{Ve[r>>1]=Ve[n>>1]|0;r=r+2|0;n=n+2|0}while((r|0)<(t|0));r=e+20|0;n=7452;t=r+20|0;do{Ve[r>>1]=Ve[n>>1]|0;r=r+2|0;n=n+2|0}while((r|0)<(t|0));yi(We[e+40>>2]|0)|0;t=0;return t|0}function wi(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Oi(r+40|0);Hi(We[e>>2]|0);We[e>>2]=0;return}function mi(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0;d=Ge;Ge=Ge+64|0;c=d+44|0;l=d+24|0;f=d+4|0;u=d;if((r|0)==7){Xt(t+22|0,l,e,s);Xt(t+66|0,o,l,s);ti(e,l,o,t,s);if((n|0)==8)t=6;else{gi(We[e+40>>2]|0,l,o,f,c,We[a>>2]|0,s);ni(e+20|0,f,c,i,s);i=(We[a>>2]|0)+10|0;t=7}}else{Xt(t+66|0,o,e,s);oi(e,o,t,s);if((n|0)==8)t=6;else{Fi(We[e+40>>2]|0,r,o,c,We[a>>2]|0,u,s);ii(e+20|0,c,i,s);i=(We[a>>2]|0)+6|0;t=7}}if((t|0)==6){t=e;i=t+20|0;do{Ve[t>>1]=Ve[o>>1]|0;t=t+2|0;o=o+2|0}while((t|0)<(i|0));Ge=d;return}else if((t|0)==7){We[a>>2]=i;t=e;i=t+20|0;do{Ve[t>>1]=Ve[o>>1]|0;t=t+2|0;o=o+2|0}while((t|0)<(i|0));t=e+20|0;o=c;i=t+20|0;do{Ve[t>>1]=Ve[o>>1]|0;t=t+2|0;o=o+2|0}while((t|0)<(i|0));Ge=d;return}}function Ei(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;if(n<<16>>16>0)t=0;else return;do{o=Ve[e+(t<<1)>>1]|0;a=o>>8;i=Ve[7194+(a<<1)>>1]|0;Ve[r+(t<<1)>>1]=((Ze((Ve[7194+(a+1<<1)>>1]|0)-i|0,o&255)|0)>>>8)+i;t=t+1|0}while((t&65535)<<16>>16!=n<<16>>16);return}function pi(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;t=(n<<16>>16)+-1|0;n=t&65535;if(n<<16>>16<=-1)return;i=63;a=r+(t<<1)|0;o=e+(t<<1)|0;while(1){e=Ve[o>>1]|0;r=i;while(1){t=r<<16>>16;i=Ve[7194+(t<<1)>>1]|0;if(e<<16>>16>i<<16>>16)r=r+-1<<16>>16;else break}Ve[a>>1]=(((Ze(Ve[7324+(t<<1)>>1]|0,(e<<16>>16)-(i<<16>>16)|0)|0)+2048|0)>>>12)+(t<<8);n=n+-1<<16>>16;if(n<<16>>16>-1){i=r;a=a+-2|0;o=o+-2|0}else break}return}function Si(e,r,n){e=e|0;r=r|0;n=n|0;e=(Ze(r<<16>>16,e<<16>>16)|0)+16384>>15;e=e|0-(e&65536);if((e|0)<=32767){if((e|0)<-32768){We[n>>2]=1;e=-32768}}else{We[n>>2]=1;e=32767}return e&65535|0}function bi(e){e=e|0;var r=0;e:do{if((e|0)!=0?(r=e-(e>>>31)|0,r=r>>31^r,(r&1073741824|0)==0):0){e=r;r=0;while(1){if(e&536870912){e=7;break}if(e&268435456){e=8;break}if(e&134217728){e=9;break}r=r+4<<16>>16;e=e<<4;if(e&1073741824)break e}if((e|0)==7){r=r|1;break}else if((e|0)==8){r=r|2;break}else if((e|0)==9){r=r|3;break}}else r=0}while(0);return r|0}function vi(e){e=e|0;var r=0,n=0;if(!(e<<16>>16)){n=0;return n|0}r=(e&65535)-((e&65535)>>>15&65535)|0;r=(r<<16>>31^r)<<16;e=r>>16;if(!(e&16384)){n=r;r=0}else{n=0;return n|0}while(1){if(e&8192){e=r;n=7;break}if(e&4096){e=r;n=8;break}if(e&2048){e=r;n=9;break}r=r+4<<16>>16;n=n<<4;e=n>>16;if(e&16384){e=r;n=10;break}}if((n|0)==7){n=e|1;return n|0}else if((n|0)==8){n=e|2;return n|0}else if((n|0)==9){n=e|3;return n|0}else if((n|0)==10)return e|0;return 0}function _i(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;r=r<<16>>16;if((r&134217727|0)==33554432){We[n>>2]=1;r=2147483647}else r=r<<6;t=r>>>16&31;o=Ve[7792+(t<<1)>>1]|0;i=o<<16;r=Ze(o-(Xe[7792+(t+1<<1)>>1]|0)<<16>>16,r>>>1&32767)|0;if((r|0)==1073741824){We[n>>2]=1;t=2147483647}else t=r<<1;r=i-t|0;if(((r^i)&(t^i)|0)>=0){o=r;e=e&65535;e=30-e|0;e=e&65535;n=ui(o,e,n)|0;return n|0}We[n>>2]=1;o=(o>>>15&1)+2147483647|0;e=e&65535;e=30-e|0;e=e&65535;n=ui(o,e,n)|0;return n|0}function ki(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0;d=Ge;Ge=Ge+48|0;c=d;u=0-(n&65535)|0;u=i<<16>>16==0?u:u<<1&131070;n=u&65535;u=(n<<16>>16<0?u+6|0:u)<<16>>16;o=6-u|0;Ve[c>>1]=Ve[7858+(u<<1)>>1]|0;Ve[c+2>>1]=Ve[7858+(o<<1)>>1]|0;Ve[c+4>>1]=Ve[7858+(u+6<<1)>>1]|0;Ve[c+6>>1]=Ve[7858+(o+6<<1)>>1]|0;Ve[c+8>>1]=Ve[7858+(u+12<<1)>>1]|0;Ve[c+10>>1]=Ve[7858+(o+12<<1)>>1]|0;Ve[c+12>>1]=Ve[7858+(u+18<<1)>>1]|0;Ve[c+14>>1]=Ve[7858+(o+18<<1)>>1]|0;Ve[c+16>>1]=Ve[7858+(u+24<<1)>>1]|0;Ve[c+18>>1]=Ve[7858+(o+24<<1)>>1]|0;Ve[c+20>>1]=Ve[7858+(u+30<<1)>>1]|0;Ve[c+22>>1]=Ve[7858+(o+30<<1)>>1]|0;Ve[c+24>>1]=Ve[7858+(u+36<<1)>>1]|0;Ve[c+26>>1]=Ve[7858+(o+36<<1)>>1]|0;Ve[c+28>>1]=Ve[7858+(u+42<<1)>>1]|0;Ve[c+30>>1]=Ve[7858+(o+42<<1)>>1]|0;Ve[c+32>>1]=Ve[7858+(u+48<<1)>>1]|0;Ve[c+34>>1]=Ve[7858+(o+48<<1)>>1]|0;Ve[c+36>>1]=Ve[7858+(u+54<<1)>>1]|0;Ve[c+38>>1]=Ve[7858+(o+54<<1)>>1]|0;o=t<<16>>16>>>1&65535;if(!(o<<16>>16)){Ge=d;return}u=e+((n<<16>>16>>15<<16>>16)-(r<<16>>16)<<1)|0;while(1){f=u+2|0;a=Ve[f>>1]|0;r=a;t=u;s=5;l=c;i=16384;n=16384;while(1){w=Ve[l>>1]|0;m=(Ze(w,r<<16>>16)|0)+n|0;h=Ve[f+-2>>1]|0;n=(Ze(h,w)|0)+i|0;w=t;t=t+4|0;E=Ve[l+2>>1]|0;n=n+(Ze(E,a<<16>>16)|0)|0;i=Ve[t>>1]|0;E=m+(Ze(i,E)|0)|0;f=f+-4|0;m=Ve[l+4>>1]|0;h=E+(Ze(m,h)|0)|0;r=Ve[f>>1]|0;m=n+(Ze(r<<16>>16,m)|0)|0;n=Ve[l+6>>1]|0;i=m+(Ze(n,i)|0)|0;a=Ve[w+6>>1]|0;n=h+(Ze(a<<16>>16,n)|0)|0;if(s<<16>>16<=1)break;else{s=s+-1<<16>>16;l=l+8|0}}Ve[e>>1]=i>>>15;Ve[e+2>>1]=n>>>15;o=o+-1<<16>>16;if(!(o<<16>>16))break;else{u=u+4|0;e=e+4|0}}Ge=d;return}function Fi(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0;g=Ge;Ge=Ge+144|0;E=g+120|0;_=g+100|0;F=g+80|0;M=g+60|0;k=g+40|0;h=g+20|0;w=g;pi(n,E,10,a);fi(E,_,a);if((r|0)==8){Ve[o>>1]=0;l=2147483647;m=0;while(1){u=m*10|0;n=0;f=0;do{v=(Xe[7980+(f+u<<1)>>1]|0)+(Xe[8140+(f<<1)>>1]|0)|0;Ve[w+(f<<1)>>1]=v;v=(Xe[E+(f<<1)>>1]|0)-(v&65535)|0;Ve[h+(f<<1)>>1]=v;v=v<<16;n=(Ze(v>>15,v>>16)|0)+n|0;f=f+1|0}while((f|0)!=10);if((n|0)<(l|0)){p=M;d=h;c=p+20|0;do{Ve[p>>1]=Ve[d>>1]|0;p=p+2|0;d=d+2|0}while((p|0)<(c|0));p=F;d=w;c=p+20|0;do{Ve[p>>1]=Ve[d>>1]|0;p=p+2|0;d=d+2|0}while((p|0)<(c|0));p=e;d=7980+(u<<1)|0;c=p+20|0;do{Ve[p>>1]=Ve[d>>1]|0;p=p+2|0;d=d+2|0}while((p|0)<(c|0));Ve[o>>1]=m}else n=l;m=m+1|0;if((m|0)==8)break;else l=n}}else{n=0;do{v=Ze(Ve[8160+(n<<1)>>1]|0,Ve[e+(n<<1)>>1]|0)|0;v=(v>>>15)+(Xe[8140+(n<<1)>>1]|0)|0;Ve[F+(n<<1)>>1]=v;Ve[M+(n<<1)>>1]=(Xe[E+(n<<1)>>1]|0)-v;n=n+1|0}while((n|0)!=10)}do{if(r>>>0>=2){v=M+2|0;b=M+4|0;S=Xe[M>>1]|0;p=Ve[_>>1]<<1;E=Xe[v>>1]|0;h=Ve[_+2>>1]<<1;d=Xe[b>>1]|0;c=Ve[_+4>>1]<<1;if((r|0)==5){w=2147483647;o=0;n=0;m=17908;while(1){f=(Ze(S-(Xe[m>>1]|0)<<16>>16,p)|0)>>16;f=Ze(f,f)|0;u=(Ze(E-(Xe[m+2>>1]|0)<<16>>16,h)|0)>>16;f=(Ze(u,u)|0)+f|0;u=(Ze(d-(Xe[m+4>>1]|0)<<16>>16,c)|0)>>16;u=f+(Ze(u,u)|0)|0;f=(u|0)<(w|0);n=f?o:n;o=o+1<<16>>16;if(o<<16>>16>=512)break;else{w=f?u:w;m=m+6|0}}u=(n<<16>>16)*3|0;Ve[M>>1]=Ve[17908+(u<<1)>>1]|0;Ve[v>>1]=Ve[17908+(u+1<<1)>>1]|0;Ve[b>>1]=Ve[17908+(u+2<<1)>>1]|0;Ve[i>>1]=n;u=M+6|0;f=M+8|0;S=M+10|0;m=Xe[u>>1]|0;o=Ve[_+6>>1]<<1;w=Xe[f>>1]|0;h=Ve[_+8>>1]<<1;d=Xe[S>>1]|0;c=Ve[_+10>>1]<<1;s=2147483647;E=0;n=0;p=9716;while(1){l=(Ze(o,m-(Xe[p>>1]|0)<<16>>16)|0)>>16;l=Ze(l,l)|0;r=(Ze(h,w-(Xe[p+2>>1]|0)<<16>>16)|0)>>16;l=(Ze(r,r)|0)+l|0;r=(Ze(c,d-(Xe[p+4>>1]|0)<<16>>16)|0)>>16;r=l+(Ze(r,r)|0)|0;l=(r|0)<(s|0);n=l?E:n;E=E+1<<16>>16;if(E<<16>>16>=512)break;else{s=l?r:s;p=p+6|0}}s=(n<<16>>16)*3|0;Ve[u>>1]=Ve[9716+(s<<1)>>1]|0;Ve[f>>1]=Ve[9716+(s+1<<1)>>1]|0;Ve[S>>1]=Ve[9716+(s+2<<1)>>1]|0;Ve[i+2>>1]=n;s=M+12|0;Ve[i+4>>1]=Mi(s,12788,_+12|0,512)|0;E=v;m=b;n=S;l=M;break}else{w=2147483647;o=0;n=0;m=8180;while(1){f=(Ze(S-(Xe[m>>1]|0)<<16>>16,p)|0)>>16;f=Ze(f,f)|0;u=(Ze(E-(Xe[m+2>>1]|0)<<16>>16,h)|0)>>16;f=(Ze(u,u)|0)+f|0;u=(Ze(d-(Xe[m+4>>1]|0)<<16>>16,c)|0)>>16;u=f+(Ze(u,u)|0)|0;f=(u|0)<(w|0);n=f?o:n;o=o+1<<16>>16;if(o<<16>>16>=256)break;else{w=f?u:w;m=m+6|0}}u=(n<<16>>16)*3|0;Ve[M>>1]=Ve[8180+(u<<1)>>1]|0;Ve[v>>1]=Ve[8180+(u+1<<1)>>1]|0;Ve[b>>1]=Ve[8180+(u+2<<1)>>1]|0;Ve[i>>1]=n;u=M+6|0;f=M+8|0;S=M+10|0;m=Xe[u>>1]|0;o=Ve[_+6>>1]<<1;w=Xe[f>>1]|0;h=Ve[_+8>>1]<<1;d=Xe[S>>1]|0;c=Ve[_+10>>1]<<1;s=2147483647;E=0;n=0;p=9716;while(1){l=(Ze(o,m-(Xe[p>>1]|0)<<16>>16)|0)>>16;l=Ze(l,l)|0;r=(Ze(h,w-(Xe[p+2>>1]|0)<<16>>16)|0)>>16;l=(Ze(r,r)|0)+l|0;r=(Ze(c,d-(Xe[p+4>>1]|0)<<16>>16)|0)>>16;r=l+(Ze(r,r)|0)|0;l=(r|0)<(s|0);n=l?E:n;E=E+1<<16>>16;if(E<<16>>16>=512)break;else{s=l?r:s;p=p+6|0}}s=(n<<16>>16)*3|0;Ve[u>>1]=Ve[9716+(s<<1)>>1]|0;Ve[f>>1]=Ve[9716+(s+1<<1)>>1]|0;Ve[S>>1]=Ve[9716+(s+2<<1)>>1]|0;Ve[i+2>>1]=n;s=M+12|0;Ve[i+4>>1]=Mi(s,12788,_+12|0,512)|0;E=v;m=b;n=S;l=M;break}}else{b=M+2|0;v=M+4|0;u=Xe[M>>1]|0;f=Ve[_>>1]<<1;l=Xe[b>>1]|0;s=Ve[_+2>>1]<<1;r=Xe[v>>1]|0;c=Ve[_+4>>1]<<1;w=2147483647;o=0;n=0;m=8180;while(1){h=(Ze(f,u-(Xe[m>>1]|0)<<16>>16)|0)>>16;h=Ze(h,h)|0;d=(Ze(s,l-(Xe[m+2>>1]|0)<<16>>16)|0)>>16;h=(Ze(d,d)|0)+h|0;d=(Ze(c,r-(Xe[m+4>>1]|0)<<16>>16)|0)>>16;d=h+(Ze(d,d)|0)|0;h=(d|0)<(w|0);n=h?o:n;o=o+1<<16>>16;if(o<<16>>16>=256)break;else{w=h?d:w;m=m+6|0}}u=(n<<16>>16)*3|0;Ve[M>>1]=Ve[8180+(u<<1)>>1]|0;Ve[b>>1]=Ve[8180+(u+1<<1)>>1]|0;Ve[v>>1]=Ve[8180+(u+2<<1)>>1]|0;Ve[i>>1]=n;u=M+6|0;f=M+8|0;S=M+10|0;m=Xe[u>>1]|0;o=Ve[_+6>>1]<<1;w=Xe[f>>1]|0;h=Ve[_+8>>1]<<1;d=Xe[S>>1]|0;c=Ve[_+10>>1]<<1;s=2147483647;E=0;n=0;p=9716;while(1){l=(Ze(o,m-(Xe[p>>1]|0)<<16>>16)|0)>>16;l=Ze(l,l)|0;r=(Ze(h,w-(Xe[p+2>>1]|0)<<16>>16)|0)>>16;l=(Ze(r,r)|0)+l|0;r=(Ze(c,d-(Xe[p+4>>1]|0)<<16>>16)|0)>>16;r=l+(Ze(r,r)|0)|0;l=(r|0)<(s|0);n=l?E:n;E=E+1<<16>>16;if(E<<16>>16>=256)break;else{s=l?r:s;p=p+12|0}}s=(n<<16>>16)*6|0;Ve[u>>1]=Ve[9716+(s<<1)>>1]|0;Ve[f>>1]=Ve[9716+((s|1)<<1)>>1]|0;Ve[S>>1]=Ve[9716+(s+2<<1)>>1]|0;Ve[i+2>>1]=n;s=M+12|0;Ve[i+4>>1]=Mi(s,16884,_+12|0,128)|0;E=b;m=v;n=S;l=M}}while(0);p=e;d=M;c=p+20|0;do{Ve[p>>1]=Ve[d>>1]|0;p=p+2|0;d=d+2|0}while((p|0)<(c|0));Ve[k>>1]=(Xe[F>>1]|0)+(Xe[l>>1]|0);Ve[k+2>>1]=(Xe[F+2>>1]|0)+(Xe[E>>1]|0);Ve[k+4>>1]=(Xe[F+4>>1]|0)+(Xe[m>>1]|0);Ve[k+6>>1]=(Xe[F+6>>1]|0)+(Xe[u>>1]|0);Ve[k+8>>1]=(Xe[F+8>>1]|0)+(Xe[f>>1]|0);Ve[k+10>>1]=(Xe[F+10>>1]|0)+(Xe[n>>1]|0);Ve[k+12>>1]=(Xe[F+12>>1]|0)+(Xe[s>>1]|0);Ve[k+14>>1]=(Xe[F+14>>1]|0)+(Xe[M+14>>1]|0);Ve[k+16>>1]=(Xe[F+16>>1]|0)+(Xe[M+16>>1]|0);Ve[k+18>>1]=(Xe[F+18>>1]|0)+(Xe[M+18>>1]|0);Ti(k,205,10,a);Ei(k,t,10,a);Ge=g;return}function Mi(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0;p=e+2|0;S=e+4|0;b=e+6|0;if(t<<16>>16>0){u=Xe[e>>1]|0;c=Ve[n>>1]<<1;d=Xe[p>>1]|0;h=Ve[n+2>>1]<<1;w=Xe[S>>1]|0;m=Ve[n+4>>1]<<1;E=Xe[b>>1]|0;i=Ve[n+6>>1]<<1;s=2147483647;l=0;n=0;f=r;while(1){o=(Ze(c,u-(Xe[f>>1]|0)<<16>>16)|0)>>16;o=Ze(o,o)|0;a=(Ze(h,d-(Xe[f+2>>1]|0)<<16>>16)|0)>>16;o=(Ze(a,a)|0)+o|0;a=(Ze(m,w-(Xe[f+4>>1]|0)<<16>>16)|0)>>16;a=o+(Ze(a,a)|0)|0;o=(Ze(i,E-(Xe[f+6>>1]|0)<<16>>16)|0)>>16;o=a+(Ze(o,o)|0)|0;a=(o|0)<(s|0);n=a?l:n;l=l+1<<16>>16;if(l<<16>>16>=t<<16>>16)break;else{s=a?o:s;f=f+8|0}}}else n=0;t=n<<16>>16<<2;E=t|1;Ve[e>>1]=Ve[r+(t<<1)>>1]|0;Ve[p>>1]=Ve[r+(E<<1)>>1]|0;Ve[S>>1]=Ve[r+(E+1<<1)>>1]|0;Ve[b>>1]=Ve[r+((t|3)<<1)>>1]|0;return n|0}function gi(e,r,n,t,i,o,a){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;var s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0;D=Ge;Ge=Ge+192|0;f=D+160|0;l=D+140|0;g=D+120|0;R=D+100|0;A=D+80|0;y=D+60|0;s=D+40|0;O=D+20|0;T=D;pi(r,f,10,a);pi(n,l,10,a);fi(f,g,a);fi(l,R,a);u=0;n=A;r=y;c=s;while(1){M=(((Ve[e+(u<<1)>>1]|0)*21299|0)>>>15)+(Xe[20980+(u<<1)>>1]|0)|0;Ve[n>>1]=M;Ve[r>>1]=(Xe[f>>1]|0)-M;Ve[c>>1]=(Xe[l>>1]|0)-M;u=u+1|0;if((u|0)==10)break;else{f=f+2|0;l=l+2|0;n=n+2|0;r=r+2|0;c=c+2|0}}Ve[o>>1]=Ri(y,s,21e3,Ve[g>>1]|0,Ve[g+2>>1]|0,Ve[R>>1]|0,Ve[R+2>>1]|0,128)|0;Ve[o+2>>1]=Ri(y+4|0,s+4|0,22024,Ve[g+4>>1]|0,Ve[g+6>>1]|0,Ve[R+4>>1]|0,Ve[R+6>>1]|0,256)|0;_=y+8|0;k=s+8|0;F=y+10|0;M=s+10|0;n=Ve[_>>1]|0;d=Ve[g+8>>1]<<1;h=Ve[F>>1]|0;w=Ve[g+10>>1]<<1;m=Ve[k>>1]|0;E=Ve[R+8>>1]<<1;p=Ve[M>>1]|0;S=Ve[R+10>>1]<<1;l=2147483647;b=0;c=0;v=24072;r=0;while(1){f=Ve[v>>1]|0;u=(Ze(n-f<<16>>16,d)|0)>>16;u=Ze(u,u)|0;f=(Ze(f+n<<16>>16,d)|0)>>16;f=Ze(f,f)|0;N=Ve[v+2>>1]|0;P=(Ze(h-N<<16>>16,w)|0)>>16;u=(Ze(P,P)|0)+u|0;N=(Ze(N+h<<16>>16,w)|0)>>16;f=(Ze(N,N)|0)+f|0;if((u|0)<(l|0)|(f|0)<(l|0)){P=Ve[v+4>>1]|0;N=(Ze(m-P<<16>>16,E)|0)>>16;N=(Ze(N,N)|0)+u|0;P=(Ze(P+m<<16>>16,E)|0)>>16;P=(Ze(P,P)|0)+f|0;f=Ve[v+6>>1]|0;u=(Ze(p-f<<16>>16,S)|0)>>16;u=N+(Ze(u,u)|0)|0;f=(Ze(f+p<<16>>16,S)|0)>>16;f=P+(Ze(f,f)|0)|0;P=(u|0)<(l|0);u=P?u:l;N=(f|0)<(u|0);u=N?f:u;c=P|N?b:c;r=N?1:P?0:r}else u=l;b=b+1<<16>>16;if(b<<16>>16>=256)break;else{l=u;v=v+8|0}}u=c<<16>>16;f=u<<2;c=f|1;l=24072+(c<<1)|0;n=Ve[24072+(f<<1)>>1]|0;if(!(r<<16>>16)){Ve[_>>1]=n;Ve[F>>1]=Ve[l>>1]|0;Ve[k>>1]=Ve[24072+(c+1<<1)>>1]|0;Ve[M>>1]=Ve[24072+((f|3)<<1)>>1]|0;r=u<<1}else{Ve[_>>1]=0-(n&65535);Ve[F>>1]=0-(Xe[l>>1]|0);Ve[k>>1]=0-(Xe[24072+(c+1<<1)>>1]|0);Ve[M>>1]=0-(Xe[24072+((f|3)<<1)>>1]|0);r=u<<1&65534|1}Ve[o+4>>1]=r;Ve[o+6>>1]=Ri(y+12|0,s+12|0,26120,Ve[g+12>>1]|0,Ve[g+14>>1]|0,Ve[R+12>>1]|0,Ve[R+14>>1]|0,256)|0;Ve[o+8>>1]=Ri(y+16|0,s+16|0,28168,Ve[g+16>>1]|0,Ve[g+18>>1]|0,Ve[R+16>>1]|0,Ve[R+18>>1]|0,64)|0;l=0;f=O;u=T;n=A;r=y;while(1){N=Xe[n>>1]|0;Ve[f>>1]=N+(Xe[r>>1]|0);P=Ve[s>>1]|0;Ve[u>>1]=N+(P&65535);Ve[e+(l<<1)>>1]=P;l=l+1|0;if((l|0)==10)break;else{f=f+2|0;u=u+2|0;n=n+2|0;r=r+2|0;s=s+2|0}}Ti(O,205,10,a);Ti(T,205,10,a);Ei(O,t,10,a);Ei(T,i,10,a);Ge=D;return}function Ri(e,r,n,t,i,o,a,s){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;a=a|0;s=s|0;var l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0;h=Ve[e>>1]|0;b=e+2|0;m=Ve[b>>1]|0;p=Ve[r>>1]|0;v=r+2|0;S=Ve[v>>1]|0;if(s<<16>>16>0){d=t<<16>>16<<1;c=i<<16>>16<<1;u=o<<16>>16<<1;i=a<<16>>16<<1;o=2147483647;l=0;t=0;f=n;while(1){a=(Ze(d,h-(Ve[f>>1]|0)|0)|0)>>16;a=Ze(a,a)|0;if(((a|0)<(o|0)?(w=(Ze(c,m-(Ve[f+2>>1]|0)|0)|0)>>16,w=(Ze(w,w)|0)+a|0,(w|0)<(o|0)):0)?(E=(Ze(u,p-(Ve[f+4>>1]|0)|0)|0)>>16,E=(Ze(E,E)|0)+w|0,(E|0)<(o|0)):0){a=(Ze(i,S-(Ve[f+6>>1]|0)|0)|0)>>16;a=(Ze(a,a)|0)+E|0;_=(a|0)<(o|0);a=_?a:o;t=_?l:t}else a=o;l=l+1<<16>>16;if(l<<16>>16>=s<<16>>16)break;else{o=a;f=f+8|0}}}else t=0;_=t<<16>>16<<2;s=_|1;Ve[e>>1]=Ve[n+(_<<1)>>1]|0;Ve[b>>1]=Ve[n+(s<<1)>>1]|0;Ve[r>>1]=Ve[n+(s+1<<1)>>1]|0;Ve[v>>1]=Ve[n+((_|3)<<1)>>1]|0;return t|0}function Ai(e){e=e|0;var r=0,n=0,t=0;if(!e){t=-1;return t|0}We[e>>2]=0;r=xi(20)|0;if(!r){t=-1;return t|0}n=r;t=n+20|0;do{Ve[n>>1]=0;n=n+2|0}while((n|0)<(t|0));We[e>>2]=r;t=0;return t|0}function yi(e){e=e|0;var r=0;if(!e){r=-1;return r|0}r=e+20|0;do{Ve[e>>1]=0;e=e+2|0}while((e|0)<(r|0));r=0;return r|0}function Oi(e){e=e|0;var r=0;if(!e)return;r=We[e>>2]|0;if(!r)return;Hi(r);We[e>>2]=0;return}function Ti(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0;if(n<<16>>16<=0)return;i=r<<16>>16;o=r&65535;a=0;while(1){t=Ve[e>>1]|0;if(t<<16>>16>16){Ve[e>>1]=r;t=(r<<16>>16)+i|0}else t=(t&65535)+o|0;a=a+1<<16>>16;if(a<<16>>16>=n<<16>>16)break;else{r=t&65535;e=e+2|0}}return}function Di(e,r,n,t){e=e|0;r=r|0;n=n|0;t=t|0;var i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0;i=t<<16>>16;t=i>>>2&65535;if(!(t<<16>>16))return;d=i+-1|0;S=e+20|0;w=r+(i+-4<<1)|0;m=r+(i+-3<<1)|0;E=r+(i+-2<<1)|0;p=r+(d<<1)|0;h=r+(i+-11<<1)|0;d=n+(d<<1)|0;while(1){r=Ve[S>>1]|0;a=5;s=S;l=h;f=h+-2|0;u=h+-4|0;c=h+-6|0;o=2048;e=2048;i=2048;n=2048;while(1){o=(Ze(Ve[l>>1]|0,r)|0)+o|0;e=(Ze(Ve[f>>1]|0,r)|0)+e|0;i=(Ze(Ve[u>>1]|0,r)|0)+i|0;r=(Ze(Ve[c>>1]|0,r)|0)+n|0;n=Ve[s+-2>>1]|0;o=o+(Ze(Ve[l+2>>1]|0,n)|0)|0;e=e+(Ze(Ve[f+2>>1]|0,n)|0)|0;i=i+(Ze(Ve[u+2>>1]|0,n)|0)|0;s=s+-4|0;n=r+(Ze(Ve[c+2>>1]|0,n)|0)|0;a=a+-1<<16>>16;r=Ve[s>>1]|0;if(!(a<<16>>16))break;else{l=l+4|0;f=f+4|0;u=u+4|0;c=c+4|0}}l=(Ze(Ve[p>>1]|0,r)|0)+o|0;f=(Ze(Ve[E>>1]|0,r)|0)+e|0;u=(Ze(Ve[m>>1]|0,r)|0)+i|0;c=(Ze(Ve[w>>1]|0,r)|0)+n|0;Ve[d>>1]=l>>>12;Ve[d+-2>>1]=f>>>12;Ve[d+-4>>1]=u>>>12;Ve[d+-6>>1]=c>>>12;t=t+-1<<16>>16;if(!(t<<16>>16))break;else{w=w+-8|0;m=m+-8|0;E=E+-8|0;p=p+-8|0;h=h+-8|0;d=d+-8|0}}return}function Ni(e,r){e=e|0;r=r|0;var n=0;n=e+32768|0;if((e|0)>-1&(n^e|0)<0){We[r>>2]=1;n=(e>>>31)+2147483647|0}return n>>>16&65535|0}function Pi(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0;t=r<<16>>16;if(!(r<<16>>16))return e|0;if(r<<16>>16>0){e=e<<16>>16>>(r<<16>>16>15?15:t)&65535;return e|0}i=0-t|0;r=e<<16>>16;i=(i&65535)<<16>>16>15?15:i<<16>>16;t=r<>16>>i|0)==(r|0)){i=t&65535;return i|0}We[n>>2]=1;i=e<<16>>16>0?32767:-32768;return i|0}function Ci(e,r,n){e=e|0;r=r|0;n=n|0;if(r<<16>>16>15){r=0;return r|0}n=Pi(e,r,n)|0;if(r<<16>>16>0)return n+((1<<(r<<16>>16)+-1&e<<16>>16|0)!=0&1)<<16>>16|0;else{r=n;return r|0}return 0}function Ii(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0;if((e|0)<1){Ve[r>>1]=0;n=0;return n|0}i=(bi(e)|0)&65534;o=i&65535;i=i<<16>>16;if(o<<16>>16>0){t=e<>i|0)!=(e|0))t=e>>31^2147483647}else{i=0-i<<16;if((i|0)<2031616)t=e>>(i>>16);else t=0}Ve[r>>1]=o;r=t>>>25&63;r=r>>>0>15?r+-16|0:r;o=Ve[30216+(r<<1)>>1]|0;e=o<<16;t=Ze(o-(Xe[30216+(r+1<<1)>>1]|0)<<16>>16,t>>>10&32767)|0;if((t|0)==1073741824){We[n>>2]=1;i=2147483647}else i=t<<1;t=e-i|0;if(((t^e)&(i^e)|0)>=0){n=t;return n|0}We[n>>2]=1;n=(o>>>15&1)+2147483647|0;return n|0}function Bi(e,r,n){e=e|0;r=r|0;n=n|0;e=(e<<16>>16)-(r<<16>>16)|0;if((e+32768|0)>>>0<=65535){n=e;n=n&65535;return n|0}We[n>>2]=1;n=(e|0)>32767?32767:-32768;n=n&65535;return n|0}function Li(e,r,n,t,i,o){e=e|0;r=r|0;n=n|0;t=t|0;i=i|0;o=o|0;var a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0;M=Ge;Ge=Ge+48|0;d=M;l=d;a=i;s=l+20|0;do{Ve[l>>1]=Ve[a>>1]|0;l=l+2|0;a=a+2|0}while((l|0)<(s|0));c=d+18|0;E=e+2|0;p=e+4|0;h=r+20|0;S=e+6|0;b=e+8|0;v=e+10|0;_=e+12|0;k=e+14|0;F=e+16|0;w=e+18|0;m=e+20|0;s=Ve[c>>1]|0;a=5;f=r;u=n;l=d+20|0;while(1){A=Ve[e>>1]|0;R=(Ze(A,Ve[f>>1]|0)|0)+2048|0;A=(Ze(Ve[f+2>>1]|0,A)|0)+2048|0;d=s<<16>>16;R=R-(Ze(d,Ve[E>>1]|0)|0)|0;g=Ve[p>>1]|0;d=A-(Ze(d,g)|0)|0;A=Ve[c+-2>>1]|0;g=R-(Ze(A,g)|0)|0;R=Ve[S>>1]|0;A=d-(Ze(R,A)|0)|0;d=Ve[c+-4>>1]|0;R=g-(Ze(d,R)|0)|0;g=Ve[b>>1]|0;d=A-(Ze(g,d)|0)|0;A=Ve[c+-6>>1]|0;g=R-(Ze(A,g)|0)|0;R=Ve[v>>1]|0;A=d-(Ze(A,R)|0)|0;d=Ve[c+-8>>1]|0;R=g-(Ze(d,R)|0)|0;g=Ve[_>>1]|0;d=A-(Ze(g,d)|0)|0;A=Ve[c+-10>>1]|0;g=R-(Ze(A,g)|0)|0;R=Ve[k>>1]|0;A=d-(Ze(R,A)|0)|0;d=Ve[c+-12>>1]|0;R=g-(Ze(d,R)|0)|0;g=Ve[F>>1]|0;d=A-(Ze(d,g)|0)|0;A=Ve[c+-14>>1]|0;g=R-(Ze(A,g)|0)|0;R=Ve[w>>1]|0;A=d-(Ze(R,A)|0)|0;d=Ve[c+-16>>1]|0;R=g-(Ze(d,R)|0)|0;g=Ve[m>>1]|0;d=A-(Ze(g,d)|0)|0;g=R-(Ze(Ve[c+-18>>1]|0,g)|0)|0;g=(g+134217728|0)>>>0<268435455?g>>>12&65535:(g|0)>134217727?32767:-32768;d=d-(Ze(Ve[E>>1]|0,g<<16>>16)|0)|0;c=l+2|0;Ve[l>>1]=g;Ve[u>>1]=g;s=(d+134217728|0)>>>0<268435455?d>>>12&65535:(d|0)>134217727?32767:-32768;Ve[c>>1]=s;Ve[u+2>>1]=s;a=a+-1<<16>>16;if(!(a<<16>>16))break;else{f=f+4|0;u=u+4|0;l=l+4|0}}t=(t<<16>>16)+-10|0;l=t>>>1&65535;if(l<<16>>16){d=n+18|0;s=r+16|0;c=Ve[d>>1]|0;f=h;a=n+20|0;while(1){g=Ve[e>>1]|0;u=(Ze(g,Ve[f>>1]|0)|0)+2048|0;g=(Ze(Ve[s+6>>1]|0,g)|0)+2048|0;s=Ve[E>>1]|0;R=c<<16>>16;u=u-(Ze(R,s)|0)|0;A=Ve[p>>1]|0;R=g-(Ze(R,A)|0)|0;g=Ve[d+-2>>1]|0;A=u-(Ze(g,A)|0)|0;u=Ve[S>>1]|0;g=R-(Ze(u,g)|0)|0;R=Ve[d+-4>>1]|0;u=A-(Ze(R,u)|0)|0;A=Ve[b>>1]|0;R=g-(Ze(A,R)|0)|0;g=Ve[d+-6>>1]|0;A=u-(Ze(g,A)|0)|0;u=Ve[v>>1]|0;g=R-(Ze(g,u)|0)|0;R=Ve[d+-8>>1]|0;u=A-(Ze(R,u)|0)|0;A=Ve[_>>1]|0;R=g-(Ze(A,R)|0)|0;g=Ve[d+-10>>1]|0;A=u-(Ze(g,A)|0)|0;u=Ve[k>>1]|0;g=R-(Ze(u,g)|0)|0;R=Ve[d+-12>>1]|0;u=A-(Ze(R,u)|0)|0;A=Ve[F>>1]|0;R=g-(Ze(R,A)|0)|0;g=Ve[d+-14>>1]|0;A=u-(Ze(g,A)|0)|0;u=Ve[w>>1]|0;g=R-(Ze(u,g)|0)|0;R=Ve[d+-16>>1]|0;u=A-(Ze(R,u)|0)|0;A=Ve[m>>1]|0;R=g-(Ze(A,R)|0)|0;A=u-(Ze(Ve[d+-18>>1]|0,A)|0)|0;u=f+4|0;A=(A+134217728|0)>>>0<268435455?A>>>12&65535:(A|0)>134217727?32767:-32768;s=R-(Ze(s,A<<16>>16)|0)|0;d=a+2|0;Ve[a>>1]=A;do{if((s+134217728|0)>>>0>=268435455){a=a+4|0;if((s|0)>134217727){Ve[d>>1]=32767;s=32767;break}else{Ve[d>>1]=-32768;s=-32768;break}}else{s=s>>>12&65535;Ve[d>>1]=s;a=a+4|0}}while(0);l=l+-1<<16>>16;if(!(l<<16>>16))break;else{A=f;c=s;f=u;s=A}}}if(!(o<<16>>16)){Ge=M;return}l=i;a=n+(t<<1)|0;s=l+20|0;do{Ve[l>>1]=Ve[a>>1]|0;l=l+2|0;a=a+2|0}while((l|0)<(s|0));Ge=M;return}function Ui(e,r,n){e=e|0;r=r|0;n=n|0;Ve[n>>1]=Ve[e>>1]|0;Ve[n+2>>1]=((Ze(Ve[r>>1]|0,Ve[e+2>>1]|0)|0)+16384|0)>>>15;Ve[n+4>>1]=((Ze(Ve[r+2>>1]|0,Ve[e+4>>1]|0)|0)+16384|0)>>>15;Ve[n+6>>1]=((Ze(Ve[r+4>>1]|0,Ve[e+6>>1]|0)|0)+16384|0)>>>15;Ve[n+8>>1]=((Ze(Ve[r+6>>1]|0,Ve[e+8>>1]|0)|0)+16384|0)>>>15;Ve[n+10>>1]=((Ze(Ve[r+8>>1]|0,Ve[e+10>>1]|0)|0)+16384|0)>>>15;Ve[n+12>>1]=((Ze(Ve[r+10>>1]|0,Ve[e+12>>1]|0)|0)+16384|0)>>>15;Ve[n+14>>1]=((Ze(Ve[r+12>>1]|0,Ve[e+14>>1]|0)|0)+16384|0)>>>15;Ve[n+16>>1]=((Ze(Ve[r+14>>1]|0,Ve[e+16>>1]|0)|0)+16384|0)>>>15;Ve[n+18>>1]=((Ze(Ve[r+16>>1]|0,Ve[e+18>>1]|0)|0)+16384|0)>>>15;Ve[n+20>>1]=((Ze(Ve[r+18>>1]|0,Ve[e+20>>1]|0)|0)+16384|0)>>>15;return}function xi(e){e=e|0;var r=0,n=0,t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0,A=0,y=0,O=0,T=0,D=0,N=0,P=0,C=0,I=0,B=0,L=0,U=0,x=0,H=0,z=0,Y=0,j=0,q=0,K=0,V=0;do{if(e>>>0<245){p=e>>>0<11?16:e+11&-8;e=p>>>3;c=We[26]|0;l=c>>>e;if(l&3){t=(l&1^1)+e|0;r=t<<1;n=144+(r<<2)|0;r=144+(r+2<<2)|0;i=We[r>>2]|0;o=i+8|0;a=We[o>>2]|0;do{if((n|0)==(a|0))We[26]=c&~(1<>>0>=(We[30]|0)>>>0?(u=a+12|0,(We[u>>2]|0)==(i|0)):0){We[u>>2]=n;We[r>>2]=a;break}re()}}while(0);K=t<<3;We[i+4>>2]=K|3;K=i+(K|4)|0;We[K>>2]=We[K>>2]|1;break}r=We[28]|0;if(p>>>0>r>>>0){if(l){i=2<>>12&16;i=i>>>o;t=i>>>5&8;i=i>>>t;n=i>>>2&4;i=i>>>n;a=i>>>1&2;i=i>>>a;s=i>>>1&1;s=(t|o|n|a|s)+(i>>>s)|0;i=s<<1;a=144+(i<<2)|0;i=144+(i+2<<2)|0;n=We[i>>2]|0;o=n+8|0;t=We[o>>2]|0;do{if((a|0)==(t|0)){We[26]=c&~(1<>>0>=(We[30]|0)>>>0?(f=t+12|0,(We[f>>2]|0)==(n|0)):0){We[f>>2]=a;We[i>>2]=t;d=We[28]|0;break}re()}}while(0);K=s<<3;r=K-p|0;We[n+4>>2]=p|3;l=n+p|0;We[n+(p|4)>>2]=r|1;We[n+K>>2]=r;if(d){n=We[31]|0;t=d>>>3;a=t<<1;s=144+(a<<2)|0;i=We[26]|0;t=1<>2]|0;if(a>>>0<(We[30]|0)>>>0)re();else{w=i;m=a}}else{We[26]=i|t;w=144+(a+2<<2)|0;m=s}We[w>>2]=n;We[m+12>>2]=n;We[n+8>>2]=m;We[n+12>>2]=s}We[28]=r;We[31]=l;break}e=We[27]|0;if(e){i=(e&0-e)+-1|0;q=i>>>12&16;i=i>>>q;j=i>>>5&8;i=i>>>j;K=i>>>2&4;i=i>>>K;a=i>>>1&2;i=i>>>a;l=i>>>1&1;l=We[408+((j|q|K|a|l)+(i>>>l)<<2)>>2]|0;i=(We[l+4>>2]&-8)-p|0;a=l;while(1){s=We[a+16>>2]|0;if(!s){s=We[a+20>>2]|0;if(!s){r=i;break}}a=(We[s+4>>2]&-8)-p|0;K=a>>>0>>0;i=K?a:i;a=s;l=K?s:l}e=We[30]|0;if(l>>>0>=e>>>0?(v=l+p|0,l>>>0>>0):0){t=We[l+24>>2]|0;s=We[l+12>>2]|0;do{if((s|0)==(l|0)){a=l+20|0;s=We[a>>2]|0;if(!s){a=l+16|0;s=We[a>>2]|0;if(!s){S=0;break}}while(1){o=s+20|0;i=We[o>>2]|0;if(i){s=i;a=o;continue}o=s+16|0;i=We[o>>2]|0;if(!i)break;else{s=i;a=o}}if(a>>>0>>0)re();else{We[a>>2]=0;S=s;break}}else{a=We[l+8>>2]|0;if((a>>>0>=e>>>0?(n=a+12|0,(We[n>>2]|0)==(l|0)):0)?(h=s+8|0,(We[h>>2]|0)==(l|0)):0){We[n>>2]=s;We[h>>2]=a;S=s;break}re()}}while(0);do{if(t){a=We[l+28>>2]|0;o=408+(a<<2)|0;if((l|0)==(We[o>>2]|0)){We[o>>2]=S;if(!S){We[27]=We[27]&~(1<>>0<(We[30]|0)>>>0)re();a=t+16|0;if((We[a>>2]|0)==(l|0))We[a>>2]=S;else We[t+20>>2]=S;if(!S)break}o=We[30]|0;if(S>>>0>>0)re();We[S+24>>2]=t;a=We[l+16>>2]|0;do{if(a)if(a>>>0>>0)re();else{We[S+16>>2]=a;We[a+24>>2]=S;break}}while(0);a=We[l+20>>2]|0;if(a)if(a>>>0<(We[30]|0)>>>0)re();else{We[S+20>>2]=a;We[a+24>>2]=S;break}}}while(0);if(r>>>0<16){K=r+p|0;We[l+4>>2]=K|3;K=l+(K+4)|0;We[K>>2]=We[K>>2]|1}else{We[l+4>>2]=p|3;We[l+(p|4)>>2]=r|1;We[l+(r+p)>>2]=r;t=We[28]|0;if(t){n=We[31]|0;i=t>>>3;a=i<<1;s=144+(a<<2)|0;o=We[26]|0;i=1<>2]|0;if(o>>>0<(We[30]|0)>>>0)re();else{b=a;_=o}}else{We[26]=o|i;b=144+(a+2<<2)|0;_=s}We[b>>2]=n;We[_+12>>2]=n;We[n+8>>2]=_;We[n+12>>2]=s}We[28]=r;We[31]=v}o=l+8|0;break}re()}else V=154}else V=154}else if(e>>>0<=4294967231){e=e+11|0;_=e&-8;c=We[27]|0;if(c){l=0-_|0;e=e>>>8;if(e)if(_>>>0>16777215)u=31;else{v=(e+1048320|0)>>>16&8;V=e<>>16&4;V=V<>>16&2;u=14-(b|v|u)+(V<>>15)|0;u=_>>>(u+7|0)&1|u<<1}else u=0;e=We[408+(u<<2)>>2]|0;e:do{if(!e){s=0;e=0;V=86}else{n=l;s=0;r=_<<((u|0)==31?0:25-(u>>>1)|0);f=e;e=0;while(1){t=We[f+4>>2]&-8;l=t-_|0;if(l>>>0>>0)if((t|0)==(_|0)){t=f;e=f;V=90;break e}else e=f;else l=n;V=We[f+20>>2]|0;f=We[f+16+(r>>>31<<2)>>2]|0;s=(V|0)==0|(V|0)==(f|0)?s:V;if(!f){V=86;break}else{n=l;r=r<<1}}}}while(0);if((V|0)==86){if((s|0)==0&(e|0)==0){e=2<>>12&16;e=e>>>S;m=e>>>5&8;e=e>>>m;b=e>>>2&4;e=e>>>b;v=e>>>1&2;e=e>>>v;s=e>>>1&1;s=We[408+((m|S|b|v|s)+(e>>>s)<<2)>>2]|0;e=0}if(!s){m=l;w=e}else{t=s;V=90}}if((V|0)==90)while(1){V=0;v=(We[t+4>>2]&-8)-_|0;s=v>>>0>>0;l=s?v:l;e=s?t:e;s=We[t+16>>2]|0;if(s){t=s;V=90;continue}t=We[t+20>>2]|0;if(!t){m=l;w=e;break}else V=90}if((w|0)!=0?m>>>0<((We[28]|0)-_|0)>>>0:0){e=We[30]|0;if(w>>>0>=e>>>0?(N=w+_|0,w>>>0>>0):0){l=We[w+24>>2]|0;s=We[w+12>>2]|0;do{if((s|0)==(w|0)){a=w+20|0;s=We[a>>2]|0;if(!s){a=w+16|0;s=We[a>>2]|0;if(!s){F=0;break}}while(1){o=s+20|0;i=We[o>>2]|0;if(i){s=i;a=o;continue}o=s+16|0;i=We[o>>2]|0;if(!i)break;else{s=i;a=o}}if(a>>>0>>0)re();else{We[a>>2]=0;F=s;break}}else{a=We[w+8>>2]|0;if((a>>>0>=e>>>0?(E=a+12|0,(We[E>>2]|0)==(w|0)):0)?(p=s+8|0,(We[p>>2]|0)==(w|0)):0){We[E>>2]=s;We[p>>2]=a;F=s;break}re()}}while(0);do{if(l){s=We[w+28>>2]|0;a=408+(s<<2)|0;if((w|0)==(We[a>>2]|0)){We[a>>2]=F;if(!F){We[27]=We[27]&~(1<>>0<(We[30]|0)>>>0)re();a=l+16|0;if((We[a>>2]|0)==(w|0))We[a>>2]=F;else We[l+20>>2]=F;if(!F)break}s=We[30]|0;if(F>>>0>>0)re();We[F+24>>2]=l;a=We[w+16>>2]|0;do{if(a)if(a>>>0>>0)re();else{We[F+16>>2]=a;We[a+24>>2]=F;break}}while(0);a=We[w+20>>2]|0;if(a)if(a>>>0<(We[30]|0)>>>0)re();else{We[F+20>>2]=a;We[a+24>>2]=F;break}}}while(0);e:do{if(m>>>0>=16){We[w+4>>2]=_|3;We[w+(_|4)>>2]=m|1;We[w+(m+_)>>2]=m;s=m>>>3;if(m>>>0<256){o=s<<1;t=144+(o<<2)|0;i=We[26]|0;a=1<>2]|0;if(o>>>0<(We[30]|0)>>>0)re();else{M=a;g=o}}else{We[26]=i|a;M=144+(o+2<<2)|0;g=t}We[M>>2]=N;We[g+12>>2]=N;We[w+(_+8)>>2]=g;We[w+(_+12)>>2]=t;break}n=m>>>8;if(n)if(m>>>0>16777215)s=31;else{q=(n+1048320|0)>>>16&8;K=n<>>16&4;K=K<>>16&2;s=14-(j|q|s)+(K<>>15)|0;s=m>>>(s+7|0)&1|s<<1}else s=0;a=408+(s<<2)|0;We[w+(_+28)>>2]=s;We[w+(_+20)>>2]=0;We[w+(_+16)>>2]=0;o=We[27]|0;i=1<>2]=N;We[w+(_+24)>>2]=a;We[w+(_+12)>>2]=N;We[w+(_+8)>>2]=N;break}n=We[a>>2]|0;r:do{if((We[n+4>>2]&-8|0)!=(m|0)){s=m<<((s|0)==31?0:25-(s>>>1)|0);while(1){r=n+16+(s>>>31<<2)|0;a=We[r>>2]|0;if(!a)break;if((We[a+4>>2]&-8|0)==(m|0)){A=a;break r}else{s=s<<1;n=a}}if(r>>>0<(We[30]|0)>>>0)re();else{We[r>>2]=N;We[w+(_+24)>>2]=n;We[w+(_+12)>>2]=N;We[w+(_+8)>>2]=N;break e}}else A=n}while(0);n=A+8|0;r=We[n>>2]|0;K=We[30]|0;if(r>>>0>=K>>>0&A>>>0>=K>>>0){We[r+12>>2]=N;We[n>>2]=N;We[w+(_+8)>>2]=r;We[w+(_+12)>>2]=A;We[w+(_+24)>>2]=0;break}else re()}else{K=m+_|0;We[w+4>>2]=K|3;K=w+(K+4)|0;We[K>>2]=We[K>>2]|1}}while(0);o=w+8|0;break}re()}else{p=_;V=154}}else{p=_;V=154}}else{p=-1;V=154}}while(0);e:do{if((V|0)==154){e=We[28]|0;if(e>>>0>=p>>>0){r=e-p|0;n=We[31]|0;if(r>>>0>15){We[31]=n+p;We[28]=r;We[n+(p+4)>>2]=r|1;We[n+e>>2]=r;We[n+4>>2]=p|3}else{We[28]=0;We[31]=0;We[n+4>>2]=e|3;V=n+(e+4)|0;We[V>>2]=We[V>>2]|1}o=n+8|0;break}e=We[29]|0;if(e>>>0>p>>>0){V=e-p|0;We[29]=V;o=We[32]|0;We[32]=o+p;We[o+(p+4)>>2]=V|1;We[o+4>>2]=p|3;o=o+8|0;break}if(!(We[144]|0))Yi();c=p+48|0;n=We[146]|0;u=p+47|0;t=n+u|0;n=0-n|0;f=t&n;if(f>>>0>p>>>0){e=We[136]|0;if((e|0)!=0?(A=We[134]|0,N=A+f|0,N>>>0<=A>>>0|N>>>0>e>>>0):0){o=0;break}r:do{if(!(We[137]&4)){e=We[32]|0;n:do{if(e){s=552;while(1){l=We[s>>2]|0;if(l>>>0<=e>>>0?(k=s+4|0,(l+(We[k>>2]|0)|0)>>>0>e>>>0):0){o=s;e=k;break}s=We[s+8>>2]|0;if(!s){V=172;break n}}l=t-(We[29]|0)&n;if(l>>>0<2147483647){s=te(l|0)|0;N=(s|0)==((We[o>>2]|0)+(We[e>>2]|0)|0);e=N?l:0;if(N){if((s|0)!=(-1|0)){g=s;S=e;V=192;break r}}else V=182}else e=0}else V=172}while(0);do{if((V|0)==172){o=te(0)|0;if((o|0)!=(-1|0)){e=o;l=We[145]|0;s=l+-1|0;if(!(s&e))l=f;else l=f-e+(s+e&0-l)|0;e=We[134]|0;s=e+l|0;if(l>>>0>p>>>0&l>>>0<2147483647){N=We[136]|0;if((N|0)!=0?s>>>0<=e>>>0|s>>>0>N>>>0:0){e=0;break}s=te(l|0)|0;V=(s|0)==(o|0);e=V?l:0;if(V){g=o;S=e;V=192;break r}else V=182}else e=0}else e=0}}while(0);n:do{if((V|0)==182){o=0-l|0;do{if(c>>>0>l>>>0&(l>>>0<2147483647&(s|0)!=(-1|0))?(R=We[146]|0,R=u-l+R&0-R,R>>>0<2147483647):0)if((te(R|0)|0)==(-1|0)){te(o|0)|0;break n}else{l=R+l|0;break}}while(0);if((s|0)!=(-1|0)){g=s;S=l;V=192;break r}}}while(0);We[137]=We[137]|4;V=189}else{e=0;V=189}}while(0);if((((V|0)==189?f>>>0<2147483647:0)?(y=te(f|0)|0,O=te(0)|0,y>>>0>>0&((y|0)!=(-1|0)&(O|0)!=(-1|0))):0)?(T=O-y|0,D=T>>>0>(p+40|0)>>>0,D):0){g=y;S=D?T:e;V=192}if((V|0)==192){l=(We[134]|0)+S|0;We[134]=l;if(l>>>0>(We[135]|0)>>>0)We[135]=l;m=We[32]|0;r:do{if(m){o=552;do{e=We[o>>2]|0;l=o+4|0;s=We[l>>2]|0;if((g|0)==(e+s|0)){P=e;C=l;I=s;B=o;V=202;break}o=We[o+8>>2]|0}while((o|0)!=0);if(((V|0)==202?(We[B+12>>2]&8|0)==0:0)?m>>>0>>0&m>>>0>=P>>>0:0){We[C>>2]=I+S;V=(We[29]|0)+S|0;K=m+8|0;K=(K&7|0)==0?0:0-K&7;q=V-K|0;We[32]=m+K;We[29]=q;We[m+(K+4)>>2]=q|1;We[m+(V+4)>>2]=40;We[33]=We[148];break}l=We[30]|0;if(g>>>0>>0){We[30]=g;l=g}s=g+S|0;e=552;while(1){if((We[e>>2]|0)==(s|0)){o=e;s=e;V=210;break}e=We[e+8>>2]|0;if(!e){s=552;break}}if((V|0)==210)if(!(We[s+12>>2]&8)){We[o>>2]=g;h=s+4|0;We[h>>2]=(We[h>>2]|0)+S;h=g+8|0;h=(h&7|0)==0?0:0-h&7;u=g+(S+8)|0;u=(u&7|0)==0?0:0-u&7;s=g+(u+S)|0;w=h+p|0;d=g+w|0;e=s-(g+h)-p|0;We[g+(h+4)>>2]=p|3;n:do{if((s|0)!=(m|0)){if((s|0)==(We[31]|0)){V=(We[28]|0)+e|0;We[28]=V;We[31]=d;We[g+(w+4)>>2]=V|1;We[g+(V+w)>>2]=V;break}r=S+4|0;a=We[g+(r+u)>>2]|0;if((a&3|0)==1){f=a&-8;t=a>>>3;t:do{if(a>>>0>=256){n=We[g+((u|24)+S)>>2]|0;o=We[g+(S+12+u)>>2]|0;i:do{if((o|0)==(s|0)){i=u|16;o=g+(r+i)|0;a=We[o>>2]|0;if(!a){o=g+(i+S)|0;a=We[o>>2]|0;if(!a){Y=0;break}}while(1){i=a+20|0;t=We[i>>2]|0;if(t){a=t;o=i;continue}i=a+16|0;t=We[i>>2]|0;if(!t)break;else{a=t;o=i}}if(o>>>0>>0)re();else{We[o>>2]=0;Y=a;break}}else{i=We[g+((u|8)+S)>>2]|0;do{if(i>>>0>=l>>>0){l=i+12|0;if((We[l>>2]|0)!=(s|0))break;a=o+8|0;if((We[a>>2]|0)!=(s|0))break;We[l>>2]=o;We[a>>2]=i;Y=o;break i}}while(0);re()}}while(0);if(!n)break;l=We[g+(S+28+u)>>2]|0;a=408+(l<<2)|0;do{if((s|0)!=(We[a>>2]|0)){if(n>>>0<(We[30]|0)>>>0)re();a=n+16|0;if((We[a>>2]|0)==(s|0))We[a>>2]=Y;else We[n+20>>2]=Y;if(!Y)break t}else{We[a>>2]=Y;if(Y)break;We[27]=We[27]&~(1<>>0>>0)re();We[Y+24>>2]=n;s=u|16;a=We[g+(s+S)>>2]|0;do{if(a)if(a>>>0>>0)re();else{We[Y+16>>2]=a;We[a+24>>2]=Y;break}}while(0);s=We[g+(r+s)>>2]|0;if(!s)break;if(s>>>0<(We[30]|0)>>>0)re();else{We[Y+20>>2]=s;We[s+24>>2]=Y;break}}else{a=We[g+((u|8)+S)>>2]|0;o=We[g+(S+12+u)>>2]|0;i=144+(t<<1<<2)|0;do{if((a|0)!=(i|0)){if(a>>>0>=l>>>0?(We[a+12>>2]|0)==(s|0):0)break;re()}}while(0);if((o|0)==(a|0)){We[26]=We[26]&~(1<>>0>=l>>>0?(U=o+8|0,(We[U>>2]|0)==(s|0)):0){L=U;break}re()}}while(0);We[a+12>>2]=o;We[L>>2]=a}}while(0);s=g+((f|u)+S)|0;e=f+e|0}s=s+4|0;We[s>>2]=We[s>>2]&-2;We[g+(w+4)>>2]=e|1;We[g+(e+w)>>2]=e;s=e>>>3;if(e>>>0<256){o=s<<1;t=144+(o<<2)|0;i=We[26]|0;a=1<>2]|0;if(o>>>0>=(We[30]|0)>>>0){j=a;q=o;break}re()}}while(0);We[j>>2]=d;We[q+12>>2]=d;We[g+(w+8)>>2]=q;We[g+(w+12)>>2]=t;break}n=e>>>8;do{if(!n)s=0;else{if(e>>>0>16777215){s=31;break}q=(n+1048320|0)>>>16&8;V=n<>>16&4;V=V<>>16&2;s=14-(j|q|s)+(V<>>15)|0;s=e>>>(s+7|0)&1|s<<1}}while(0);a=408+(s<<2)|0;We[g+(w+28)>>2]=s;We[g+(w+20)>>2]=0;We[g+(w+16)>>2]=0;o=We[27]|0;i=1<>2]=d;We[g+(w+24)>>2]=a;We[g+(w+12)>>2]=d;We[g+(w+8)>>2]=d;break}n=We[a>>2]|0;t:do{if((We[n+4>>2]&-8|0)!=(e|0)){s=e<<((s|0)==31?0:25-(s>>>1)|0);while(1){r=n+16+(s>>>31<<2)|0;a=We[r>>2]|0;if(!a)break;if((We[a+4>>2]&-8|0)==(e|0)){K=a;break t}else{s=s<<1;n=a}}if(r>>>0<(We[30]|0)>>>0)re();else{We[r>>2]=d;We[g+(w+24)>>2]=n;We[g+(w+12)>>2]=d;We[g+(w+8)>>2]=d;break n}}else K=n}while(0);n=K+8|0;r=We[n>>2]|0;V=We[30]|0;if(r>>>0>=V>>>0&K>>>0>=V>>>0){We[r+12>>2]=d;We[n>>2]=d;We[g+(w+8)>>2]=r;We[g+(w+12)>>2]=K;We[g+(w+24)>>2]=0;break}else re()}else{V=(We[29]|0)+e|0;We[29]=V;We[32]=d;We[g+(w+4)>>2]=V|1}}while(0);o=g+(h|8)|0;break e}else s=552;while(1){o=We[s>>2]|0;if(o>>>0<=m>>>0?(a=We[s+4>>2]|0,i=o+a|0,i>>>0>m>>>0):0)break;s=We[s+8>>2]|0}s=o+(a+-39)|0;s=o+(a+-47+((s&7|0)==0?0:0-s&7))|0;l=m+16|0;s=s>>>0>>0?m:s;a=s+8|0;o=g+8|0;o=(o&7|0)==0?0:0-o&7;V=S+-40-o|0;We[32]=g+o;We[29]=V;We[g+(o+4)>>2]=V|1;We[g+(S+-36)>>2]=40;We[33]=We[148];o=s+4|0;We[o>>2]=27;We[a>>2]=We[138];We[a+4>>2]=We[139];We[a+8>>2]=We[140];We[a+12>>2]=We[141];We[138]=g;We[139]=S;We[141]=0;We[140]=a;a=s+28|0;We[a>>2]=7;if((s+32|0)>>>0>>0)do{V=a;a=a+4|0;We[a>>2]=7}while((V+8|0)>>>0>>0);if((s|0)!=(m|0)){e=s-m|0;We[o>>2]=We[o>>2]&-2;We[m+4>>2]=e|1;We[s>>2]=e;i=e>>>3;if(e>>>0<256){a=i<<1;s=144+(a<<2)|0;o=We[26]|0;t=1<>2]|0;if(r>>>0<(We[30]|0)>>>0)re();else{x=n;H=r}}else{We[26]=o|t;x=144+(a+2<<2)|0;H=s}We[x>>2]=m;We[H+12>>2]=m;We[m+8>>2]=H;We[m+12>>2]=s;break}n=e>>>8;if(n)if(e>>>0>16777215)a=31;else{K=(n+1048320|0)>>>16&8;V=n<>>16&4;V=V<>>16&2;a=14-(q|K|a)+(V<>>15)|0;a=e>>>(a+7|0)&1|a<<1}else a=0;t=408+(a<<2)|0;We[m+28>>2]=a;We[m+20>>2]=0;We[l>>2]=0;n=We[27]|0;r=1<>2]=m;We[m+24>>2]=t;We[m+12>>2]=m;We[m+8>>2]=m;break}n=We[t>>2]|0;n:do{if((We[n+4>>2]&-8|0)!=(e|0)){a=e<<((a|0)==31?0:25-(a>>>1)|0);while(1){r=n+16+(a>>>31<<2)|0;t=We[r>>2]|0;if(!t)break;if((We[t+4>>2]&-8|0)==(e|0)){z=t;break n}else{a=a<<1;n=t}}if(r>>>0<(We[30]|0)>>>0)re();else{We[r>>2]=m;We[m+24>>2]=n;We[m+12>>2]=m;We[m+8>>2]=m;break r}}else z=n}while(0);n=z+8|0;r=We[n>>2]|0;V=We[30]|0;if(r>>>0>=V>>>0&z>>>0>=V>>>0){We[r+12>>2]=m;We[n>>2]=m;We[m+8>>2]=r;We[m+12>>2]=z;We[m+24>>2]=0;break}else re()}}else{V=We[30]|0;if((V|0)==0|g>>>0>>0)We[30]=g;We[138]=g;We[139]=S;We[141]=0;We[35]=We[144];We[34]=-1;n=0;do{V=n<<1;K=144+(V<<2)|0;We[144+(V+3<<2)>>2]=K;We[144+(V+2<<2)>>2]=K;n=n+1|0}while((n|0)!=32);V=g+8|0;V=(V&7|0)==0?0:0-V&7;K=S+-40-V|0;We[32]=g+V;We[29]=K;We[g+(V+4)>>2]=K|1;We[g+(S+-36)>>2]=40;We[33]=We[148]}}while(0);r=We[29]|0;if(r>>>0>p>>>0){V=r-p|0;We[29]=V;o=We[32]|0;We[32]=o+p;We[o+(p+4)>>2]=V|1;We[o+4>>2]=p|3;o=o+8|0;break}}We[(zi()|0)>>2]=12;o=0}else o=0}}while(0);return o|0}function Hi(e){e=e|0;var r=0,n=0,t=0,i=0,o=0,a=0,s=0,l=0,f=0,u=0,c=0,d=0,h=0,w=0,m=0,E=0,p=0,S=0,b=0,v=0,_=0,k=0,F=0,M=0,g=0,R=0;e:do{if(e){i=e+-8|0;f=We[30]|0;r:do{if(i>>>0>=f>>>0?(t=We[e+-4>>2]|0,n=t&3,(n|0)!=1):0){v=t&-8;_=e+(v+-8)|0;do{if(!(t&1)){i=We[i>>2]|0;if(!n)break e;u=-8-i|0;d=e+u|0;h=i+v|0;if(d>>>0>>0)break r;if((d|0)==(We[31]|0)){o=e+(v+-4)|0;i=We[o>>2]|0;if((i&3|0)!=3){R=d;o=h;break}We[28]=h;We[o>>2]=i&-2;We[e+(u+4)>>2]=h|1;We[_>>2]=h;break e}n=i>>>3;if(i>>>0<256){t=We[e+(u+8)>>2]|0;o=We[e+(u+12)>>2]|0;i=144+(n<<1<<2)|0;do{if((t|0)!=(i|0)){if(t>>>0>=f>>>0?(We[t+12>>2]|0)==(d|0):0)break;re()}}while(0);if((o|0)==(t|0)){We[26]=We[26]&~(1<>>0>=f>>>0?(a=o+8|0,(We[a>>2]|0)==(d|0)):0){r=a;break}re()}}while(0);We[t+12>>2]=o;We[r>>2]=t;R=d;o=h;break}a=We[e+(u+24)>>2]|0;i=We[e+(u+12)>>2]|0;do{if((i|0)==(d|0)){t=e+(u+20)|0;i=We[t>>2]|0;if(!i){t=e+(u+16)|0;i=We[t>>2]|0;if(!i){c=0;break}}while(1){n=i+20|0;r=We[n>>2]|0;if(r){i=r;t=n;continue}n=i+16|0;r=We[n>>2]|0;if(!r)break;else{i=r;t=n}}if(t>>>0>>0)re();else{We[t>>2]=0;c=i;break}}else{t=We[e+(u+8)>>2]|0;if((t>>>0>=f>>>0?(s=t+12|0,(We[s>>2]|0)==(d|0)):0)?(l=i+8|0,(We[l>>2]|0)==(d|0)):0){We[s>>2]=i;We[l>>2]=t;c=i;break}re()}}while(0);if(a){i=We[e+(u+28)>>2]|0;t=408+(i<<2)|0;if((d|0)==(We[t>>2]|0)){We[t>>2]=c;if(!c){We[27]=We[27]&~(1<>>0<(We[30]|0)>>>0)re();i=a+16|0;if((We[i>>2]|0)==(d|0))We[i>>2]=c;else We[a+20>>2]=c;if(!c){R=d;o=h;break}}t=We[30]|0;if(c>>>0>>0)re();We[c+24>>2]=a;i=We[e+(u+16)>>2]|0;do{if(i)if(i>>>0>>0)re();else{We[c+16>>2]=i;We[i+24>>2]=c;break}}while(0);i=We[e+(u+20)>>2]|0;if(i)if(i>>>0<(We[30]|0)>>>0)re();else{We[c+20>>2]=i;We[i+24>>2]=c;R=d;o=h;break}else{R=d;o=h}}else{R=d;o=h}}else{R=i;o=v}}while(0);if(R>>>0<_>>>0?(w=e+(v+-4)|0,m=We[w>>2]|0,(m&1|0)!=0):0){if(!(m&2)){if((_|0)==(We[32]|0)){g=(We[29]|0)+o|0;We[29]=g;We[32]=R;We[R+4>>2]=g|1;if((R|0)!=(We[31]|0))break e;We[31]=0;We[28]=0;break e}if((_|0)==(We[31]|0)){g=(We[28]|0)+o|0;We[28]=g;We[31]=R;We[R+4>>2]=g|1;We[R+g>>2]=g;break e}l=(m&-8)+o|0;n=m>>>3;do{if(m>>>0>=256){r=We[e+(v+16)>>2]|0;o=We[e+(v|4)>>2]|0;do{if((o|0)==(_|0)){i=e+(v+12)|0;o=We[i>>2]|0;if(!o){i=e+(v+8)|0;o=We[i>>2]|0;if(!o){k=0;break}}while(1){t=o+20|0;n=We[t>>2]|0;if(n){o=n;i=t;continue}t=o+16|0;n=We[t>>2]|0;if(!n)break;else{o=n;i=t}}if(i>>>0<(We[30]|0)>>>0)re();else{We[i>>2]=0;k=o;break}}else{i=We[e+v>>2]|0;if((i>>>0>=(We[30]|0)>>>0?(S=i+12|0,(We[S>>2]|0)==(_|0)):0)?(b=o+8|0,(We[b>>2]|0)==(_|0)):0){We[S>>2]=o;We[b>>2]=i;k=o;break}re()}}while(0);if(r){o=We[e+(v+20)>>2]|0;i=408+(o<<2)|0;if((_|0)==(We[i>>2]|0)){We[i>>2]=k;if(!k){We[27]=We[27]&~(1<>>0<(We[30]|0)>>>0)re();o=r+16|0;if((We[o>>2]|0)==(_|0))We[o>>2]=k;else We[r+20>>2]=k;if(!k)break}o=We[30]|0;if(k>>>0>>0)re();We[k+24>>2]=r;i=We[e+(v+8)>>2]|0;do{if(i)if(i>>>0>>0)re();else{We[k+16>>2]=i;We[i+24>>2]=k;break}}while(0);n=We[e+(v+12)>>2]|0;if(n)if(n>>>0<(We[30]|0)>>>0)re();else{We[k+20>>2]=n;We[n+24>>2]=k;break}}}else{t=We[e+v>>2]|0;o=We[e+(v|4)>>2]|0;i=144+(n<<1<<2)|0;do{if((t|0)!=(i|0)){if(t>>>0>=(We[30]|0)>>>0?(We[t+12>>2]|0)==(_|0):0)break;re()}}while(0);if((o|0)==(t|0)){We[26]=We[26]&~(1<>>0>=(We[30]|0)>>>0?(p=o+8|0,(We[p>>2]|0)==(_|0)):0){E=p;break}re()}}while(0);We[t+12>>2]=o;We[E>>2]=t}}while(0);We[R+4>>2]=l|1;We[R+l>>2]=l;if((R|0)==(We[31]|0)){We[28]=l;break e}else o=l}else{We[w>>2]=m&-2;We[R+4>>2]=o|1;We[R+o>>2]=o}i=o>>>3;if(o>>>0<256){t=i<<1;o=144+(t<<2)|0;r=We[26]|0;n=1<>2]|0;if(r>>>0<(We[30]|0)>>>0)re();else{F=n;M=r}}else{We[26]=r|n;F=144+(t+2<<2)|0;M=o}We[F>>2]=R;We[M+12>>2]=R;We[R+8>>2]=M;We[R+12>>2]=o;break e}r=o>>>8;if(r)if(o>>>0>16777215)i=31;else{F=(r+1048320|0)>>>16&8;M=r<>>16&4;M=M<>>16&2;i=14-(e|F|i)+(M<>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;n=408+(i<<2)|0;We[R+28>>2]=i;We[R+20>>2]=0;We[R+16>>2]=0;r=We[27]|0;t=1<>2]|0;t:do{if((We[n+4>>2]&-8|0)!=(o|0)){i=o<<((i|0)==31?0:25-(i>>>1)|0);while(1){r=n+16+(i>>>31<<2)|0;t=We[r>>2]|0;if(!t)break;if((We[t+4>>2]&-8|0)==(o|0)){g=t;break t}else{i=i<<1;n=t}}if(r>>>0<(We[30]|0)>>>0)re();else{We[r>>2]=R;We[R+24>>2]=n;We[R+12>>2]=R;We[R+8>>2]=R;break n}}else g=n}while(0);r=g+8|0;n=We[r>>2]|0;M=We[30]|0;if(n>>>0>=M>>>0&g>>>0>=M>>>0){We[n+12>>2]=R;We[r>>2]=R;We[R+8>>2]=n;We[R+12>>2]=g;We[R+24>>2]=0;break}else re()}else{We[27]=r|t;We[n>>2]=R;We[R+24>>2]=n;We[R+12>>2]=R;We[R+8>>2]=R}}while(0);R=(We[34]|0)+-1|0;We[34]=R;if(!R)r=560;else break e;while(1){r=We[r>>2]|0;if(!r)break;else r=r+8|0}We[34]=-1;break e}}}while(0);re()}}while(0);return}function zi(){var e=0;if(!0)e=600;else e=We[(ee()|0)+60>>2]|0;return e|0}function Yi(){var e=0;do{if(!(We[144]|0)){e=$(30)|0;if(!(e+-1&e)){We[146]=e;We[145]=e;We[147]=-1;We[148]=-1;We[149]=0;We[137]=0;We[144]=(ie(0)|0)&-16^1431655768;break}else re()}}while(0);return}function ji(){}function qi(e,r,n){e=e|0;r=r|0;n=n|0;var t=0;if((n|0)>=4096)return ae(e|0,r|0,n|0)|0;t=e|0;if((e&3)==(r&3)){while(e&3){if(!n)return t|0;Ke[e>>0]=Ke[r>>0]|0;e=e+1|0;r=r+1|0;n=n-1|0}while((n|0)>=4){We[e>>2]=We[r>>2];e=e+4|0;r=r+4|0;n=n-4|0}}while((n|0)>0){Ke[e>>0]=Ke[r>>0]|0;e=e+1|0;r=r+1|0;n=n-1|0}return t|0}function Ki(e,r,n){e=e|0;r=r|0;n=n|0;var t=0;if((r|0)<(e|0)&(e|0)<(r+n|0)){t=e;r=r+n|0;e=e+n|0;while((n|0)>0){e=e-1|0;r=r-1|0;n=n-1|0;Ke[e>>0]=Ke[r>>0]|0}e=t}else qi(e,r,n)|0;return e|0}function Vi(e,r,n){e=e|0;r=r|0;n=n|0;var t=0,i=0,o=0,a=0;t=e+n|0;if((n|0)>=20){r=r&255;o=e&3;a=r|r<<8|r<<16|r<<24;i=t&~3;if(o){o=e+4-o|0;while((e|0)<(o|0)){Ke[e>>0]=r;e=e+1|0}}while((e|0)<(i|0)){We[e>>2]=a;e=e+4|0}}while((e|0)<(t|0)){Ke[e>>0]=r;e=e+1|0}return e-n|0}return{_free:Hi,___errno_location:zi,_memmove:Ki,_Decoder_Interface_Decode:ve,_Decoder_Interface_exit:be,_Encoder_Interface_init:_e,_memset:Vi,_malloc:xi,_memcpy:qi,_Encoder_Interface_exit:ke,_Decoder_Interface_init:Se,_Encoder_Interface_Encode:Fe,runPostSets:ji,stackAlloc:fe,stackSave:ue,stackRestore:ce,establishStackSpace:de,setThrew:he,setTempRet0:Ee,getTempRet0:pe}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_Encoder_Interface_Encode=Module._Encoder_Interface_Encode=asm._Encoder_Interface_Encode,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,_memmove=Module._memmove=asm._memmove,_Decoder_Interface_exit=Module._Decoder_Interface_exit=asm._Decoder_Interface_exit,_Encoder_Interface_init=Module._Encoder_Interface_init=asm._Encoder_Interface_init,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_memcpy=Module._memcpy=asm._memcpy,_Decoder_Interface_Decode=Module._Decoder_Interface_Decode=asm._Decoder_Interface_Decode,_Decoder_Interface_init=Module._Decoder_Interface_init=asm._Decoder_Interface_init,_Encoder_Interface_exit=Module._Encoder_Interface_exit=asm._Encoder_Interface_exit,___errno_location=Module.___errno_location=asm.___errno_location,initialStackTop;function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0,ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var preloadStartTime=null,calledMain=!1;function run(e){function r(){Module.calledRun||(Module.calledRun=!0,ABORT||(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(e),postRun()))}e=e||Module.arguments,null===preloadStartTime&&(preloadStartTime=Date.now()),0>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + var processedWords; + + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; +}(Math)); + +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } +}()); + + +/** + * Cipher core components. + */ +CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + var block; + + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + var modeCreator; + + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + var finalProcessedBlocks; + + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + var wordArray; + + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + var salt; + + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); +}()); + +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + var t; + + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); +}()); + +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); +}(Math)); + + diff --git a/yunshop-front-master/public/static/app/decode_common/aes.js b/yunshop-front-master/public/static/app/decode_common/aes.js new file mode 100644 index 0000000..0ce114b --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/aes.js @@ -0,0 +1,214 @@ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var BlockCipher = C_lib.BlockCipher; + var C_algo = C.algo; + + // Lookup tables + var SBOX = []; + var INV_SBOX = []; + var SUB_MIX_0 = []; + var SUB_MIX_1 = []; + var SUB_MIX_2 = []; + var SUB_MIX_3 = []; + var INV_SUB_MIX_0 = []; + var INV_SUB_MIX_1 = []; + var INV_SUB_MIX_2 = []; + var INV_SUB_MIX_3 = []; + + // Compute lookup tables + (function () { + // Compute double table + var d = []; + for (var i = 0; i < 256; i++) { + if (i < 128) { + d[i] = i << 1; + } else { + d[i] = (i << 1) ^ 0x11b; + } + } + + // Walk GF(2^8) + var x = 0; + var xi = 0; + for (var i = 0; i < 256; i++) { + // Compute sbox + var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); + sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; + SBOX[x] = sx; + INV_SBOX[sx] = x; + + // Compute multiplication + var x2 = d[x]; + var x4 = d[x2]; + var x8 = d[x4]; + + // Compute sub bytes, mix columns tables + var t = (d[sx] * 0x101) ^ (sx * 0x1010100); + SUB_MIX_0[x] = (t << 24) | (t >>> 8); + SUB_MIX_1[x] = (t << 16) | (t >>> 16); + SUB_MIX_2[x] = (t << 8) | (t >>> 24); + SUB_MIX_3[x] = t; + + // Compute inv sub bytes, inv mix columns tables + var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); + INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); + INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); + INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); + INV_SUB_MIX_3[sx] = t; + + // Compute next counter + if (!x) { + x = xi = 1; + } else { + x = x2 ^ d[d[d[x8 ^ x2]]]; + xi ^= d[d[xi]]; + } + } + }()); + + // Precomputed Rcon lookup + var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; + + /** + * AES block cipher algorithm. + */ + var AES = C_algo.AES = BlockCipher.extend({ + _doReset: function () { + var t; + + // Skip reset of nRounds has been set before and key did not change + if (this._nRounds && this._keyPriorReset === this._key) { + return; + } + + // Shortcuts + var key = this._keyPriorReset = this._key; + var keyWords = key.words; + var keySize = key.sigBytes / 4; + + // Compute number of rounds + var nRounds = this._nRounds = keySize + 6; + + // Compute number of key schedule rows + var ksRows = (nRounds + 1) * 4; + + // Compute key schedule + var keySchedule = this._keySchedule = []; + for (var ksRow = 0; ksRow < ksRows; ksRow++) { + if (ksRow < keySize) { + keySchedule[ksRow] = keyWords[ksRow]; + } else { + t = keySchedule[ksRow - 1]; + + if (!(ksRow % keySize)) { + // Rot word + t = (t << 8) | (t >>> 24); + + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + + // Mix Rcon + t ^= RCON[(ksRow / keySize) | 0] << 24; + } else if (keySize > 6 && ksRow % keySize == 4) { + // Sub word + t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; + } + + keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; + } + } + + // Compute inv key schedule + var invKeySchedule = this._invKeySchedule = []; + for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { + var ksRow = ksRows - invKsRow; + + if (invKsRow % 4) { + var t = keySchedule[ksRow]; + } else { + var t = keySchedule[ksRow - 4]; + } + + if (invKsRow < 4 || ksRow <= 4) { + invKeySchedule[invKsRow] = t; + } else { + invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ + INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; + } + } + }, + + encryptBlock: function (M, offset) { + this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); + }, + + decryptBlock: function (M, offset) { + // Swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + + this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); + + // Inv swap 2nd and 4th rows + var t = M[offset + 1]; + M[offset + 1] = M[offset + 3]; + M[offset + 3] = t; + }, + + _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { + // Shortcut + var nRounds = this._nRounds; + + // Get input, add round key + var s0 = M[offset] ^ keySchedule[0]; + var s1 = M[offset + 1] ^ keySchedule[1]; + var s2 = M[offset + 2] ^ keySchedule[2]; + var s3 = M[offset + 3] ^ keySchedule[3]; + + // Key schedule row counter + var ksRow = 4; + + // Rounds + for (var round = 1; round < nRounds; round++) { + // Shift rows, sub bytes, mix columns, add round key + var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; + var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; + var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; + var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; + + // Update state + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + // Shift rows, sub bytes, add round key + var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; + var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; + var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; + var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; + + // Set output + M[offset] = t0; + M[offset + 1] = t1; + M[offset + 2] = t2; + M[offset + 3] = t3; + }, + + keySize: 256/32 + }); + + /** + * Shortcut functions to the cipher's object interface. + * + * @example + * + * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); + * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); + */ + C.AES = BlockCipher._createHelper(AES); +}()); diff --git a/yunshop-front-master/public/static/app/decode_common/cipher-core.js b/yunshop-front-master/public/static/app/decode_common/cipher-core.js new file mode 100644 index 0000000..3e9de09 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/cipher-core.js @@ -0,0 +1,872 @@ +/** + * Cipher core components. + */ +CryptoJS.lib.Cipher || (function (undefined) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var Base = C_lib.Base; + var WordArray = C_lib.WordArray; + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; + var C_enc = C.enc; + var Utf8 = C_enc.Utf8; + var Base64 = C_enc.Base64; + var C_algo = C.algo; + var EvpKDF = C_algo.EvpKDF; + + /** + * Abstract base cipher template. + * + * @property {number} keySize This cipher's key size. Default: 4 (128 bits) + * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) + * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. + * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. + */ + var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + * + * @property {WordArray} iv The IV to use for this operation. + */ + cfg: Base.extend(), + + /** + * Creates this cipher in encryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); + */ + createEncryptor: function (key, cfg) { + return this.create(this._ENC_XFORM_MODE, key, cfg); + }, + + /** + * Creates this cipher in decryption mode. + * + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {Cipher} A cipher instance. + * + * @static + * + * @example + * + * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); + */ + createDecryptor: function (key, cfg) { + return this.create(this._DEC_XFORM_MODE, key, cfg); + }, + + /** + * Initializes a newly created cipher. + * + * @param {number} xformMode Either the encryption or decryption transormation mode constant. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @example + * + * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); + */ + init: function (xformMode, key, cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Store transform mode and key + this._xformMode = xformMode; + this._key = key; + + // Set initial values + this.reset(); + }, + + /** + * Resets this cipher to its initial state. + * + * @example + * + * cipher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-cipher logic + this._doReset(); + }, + + /** + * Adds data to be encrypted or decrypted. + * + * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. + * + * @return {WordArray} The data after processing. + * + * @example + * + * var encrypted = cipher.process('data'); + * var encrypted = cipher.process(wordArray); + */ + process: function (dataUpdate) { + // Append + this._append(dataUpdate); + + // Process available blocks + return this._process(); + }, + + /** + * Finalizes the encryption or decryption process. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. + * + * @return {WordArray} The data after final processing. + * + * @example + * + * var encrypted = cipher.finalize(); + * var encrypted = cipher.finalize('data'); + * var encrypted = cipher.finalize(wordArray); + */ + finalize: function (dataUpdate) { + // Final data update + if (dataUpdate) { + this._append(dataUpdate); + } + + // Perform concrete-cipher logic + var finalProcessedData = this._doFinalize(); + + return finalProcessedData; + }, + + keySize: 128/32, + + ivSize: 128/32, + + _ENC_XFORM_MODE: 1, + + _DEC_XFORM_MODE: 2, + + /** + * Creates shortcut functions to a cipher's object interface. + * + * @param {Cipher} cipher The cipher to create a helper for. + * + * @return {Object} An object with encrypt and decrypt shortcut functions. + * + * @static + * + * @example + * + * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); + */ + _createHelper: (function () { + function selectCipherStrategy(key) { + if (typeof key == 'string') { + return PasswordBasedCipher; + } else { + return SerializableCipher; + } + } + + return function (cipher) { + return { + encrypt: function (message, key, cfg) { + return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); + }, + + decrypt: function (ciphertext, key, cfg) { + return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); + } + }; + }; + }()) + }); + + /** + * Abstract base stream cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) + */ + var StreamCipher = C_lib.StreamCipher = Cipher.extend({ + _doFinalize: function () { + // Process partial blocks + var finalProcessedBlocks = this._process(!!'flush'); + + return finalProcessedBlocks; + }, + + blockSize: 1 + }); + + /** + * Mode namespace. + */ + var C_mode = C.mode = {}; + + /** + * Abstract base block cipher mode template. + */ + var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ + /** + * Creates this mode for encryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); + */ + createEncryptor: function (cipher, iv) { + return this.Encryptor.create(cipher, iv); + }, + + /** + * Creates this mode for decryption. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @static + * + * @example + * + * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); + */ + createDecryptor: function (cipher, iv) { + return this.Decryptor.create(cipher, iv); + }, + + /** + * Initializes a newly created mode. + * + * @param {Cipher} cipher A block cipher instance. + * @param {Array} iv The IV words. + * + * @example + * + * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); + */ + init: function (cipher, iv) { + this._cipher = cipher; + this._iv = iv; + } + }); + + /** + * Cipher Block Chaining mode. + */ + var CBC = C_mode.CBC = (function () { + /** + * Abstract base CBC mode. + */ + var CBC = BlockCipherMode.extend(); + + /** + * CBC encryptor. + */ + CBC.Encryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // XOR and encrypt + xorBlock.call(this, words, offset, blockSize); + cipher.encryptBlock(words, offset); + + // Remember this block to use with next block + this._prevBlock = words.slice(offset, offset + blockSize); + } + }); + + /** + * CBC decryptor. + */ + CBC.Decryptor = CBC.extend({ + /** + * Processes the data block at offset. + * + * @param {Array} words The data words to operate on. + * @param {number} offset The offset where the block starts. + * + * @example + * + * mode.processBlock(data.words, offset); + */ + processBlock: function (words, offset) { + // Shortcuts + var cipher = this._cipher; + var blockSize = cipher.blockSize; + + // Remember this block to use with next block + var thisBlock = words.slice(offset, offset + blockSize); + + // Decrypt and XOR + cipher.decryptBlock(words, offset); + xorBlock.call(this, words, offset, blockSize); + + // This block becomes the previous block + this._prevBlock = thisBlock; + } + }); + + function xorBlock(words, offset, blockSize) { + var block; + + // Shortcut + var iv = this._iv; + + // Choose mixing block + if (iv) { + block = iv; + + // Remove IV for subsequent blocks + this._iv = undefined; + } else { + block = this._prevBlock; + } + + // XOR blocks + for (var i = 0; i < blockSize; i++) { + words[offset + i] ^= block[i]; + } + } + + return CBC; + }()); + + /** + * Padding namespace. + */ + var C_pad = C.pad = {}; + + /** + * PKCS #5/7 padding strategy. + */ + var Pkcs7 = C_pad.Pkcs7 = { + /** + * Pads data using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to pad. + * @param {number} blockSize The multiple that the data should be padded to. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.pad(wordArray, 4); + */ + pad: function (data, blockSize) { + // Shortcut + var blockSizeBytes = blockSize * 4; + + // Count padding bytes + var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; + + // Create padding word + var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes; + + // Create padding + var paddingWords = []; + for (var i = 0; i < nPaddingBytes; i += 4) { + paddingWords.push(paddingWord); + } + var padding = WordArray.create(paddingWords, nPaddingBytes); + + // Add padding + data.concat(padding); + }, + + /** + * Unpads data that had been padded using the algorithm defined in PKCS #5/7. + * + * @param {WordArray} data The data to unpad. + * + * @static + * + * @example + * + * CryptoJS.pad.Pkcs7.unpad(wordArray); + */ + unpad: function (data) { + // Get number of padding bytes from last byte + var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff; + + // Remove padding + data.sigBytes -= nPaddingBytes; + } + }; + + /** + * Abstract base block cipher template. + * + * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) + */ + var BlockCipher = C_lib.BlockCipher = Cipher.extend({ + /** + * Configuration options. + * + * @property {Mode} mode The block mode to use. Default: CBC + * @property {Padding} padding The padding strategy to use. Default: Pkcs7 + */ + cfg: Cipher.cfg.extend({ + mode: CBC, + padding: Pkcs7 + }), + + reset: function () { + var modeCreator; + + // Reset cipher + Cipher.reset.call(this); + + // Shortcuts + var cfg = this.cfg; + var iv = cfg.iv; + var mode = cfg.mode; + + // Reset block mode + if (this._xformMode == this._ENC_XFORM_MODE) { + modeCreator = mode.createEncryptor; + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + modeCreator = mode.createDecryptor; + // Keep at least one block in the buffer for unpadding + this._minBufferSize = 1; + } + + if (this._mode && this._mode.__creator == modeCreator) { + this._mode.init(this, iv && iv.words); + } else { + this._mode = modeCreator.call(mode, this, iv && iv.words); + this._mode.__creator = modeCreator; + } + }, + + _doProcessBlock: function (words, offset) { + this._mode.processBlock(words, offset); + }, + + _doFinalize: function () { + var finalProcessedBlocks; + + // Shortcut + var padding = this.cfg.padding; + + // Finalize + if (this._xformMode == this._ENC_XFORM_MODE) { + // Pad data + padding.pad(this._data, this.blockSize); + + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { + // Process final blocks + finalProcessedBlocks = this._process(!!'flush'); + + // Unpad data + padding.unpad(finalProcessedBlocks); + } + + return finalProcessedBlocks; + }, + + blockSize: 128/32 + }); + + /** + * A collection of cipher parameters. + * + * @property {WordArray} ciphertext The raw ciphertext. + * @property {WordArray} key The key to this ciphertext. + * @property {WordArray} iv The IV used in the ciphering operation. + * @property {WordArray} salt The salt used with a key derivation function. + * @property {Cipher} algorithm The cipher algorithm. + * @property {Mode} mode The block mode used in the ciphering operation. + * @property {Padding} padding The padding scheme used in the ciphering operation. + * @property {number} blockSize The block size of the cipher. + * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. + */ + var CipherParams = C_lib.CipherParams = Base.extend({ + /** + * Initializes a newly created cipher params object. + * + * @param {Object} cipherParams An object with any of the possible cipher parameters. + * + * @example + * + * var cipherParams = CryptoJS.lib.CipherParams.create({ + * ciphertext: ciphertextWordArray, + * key: keyWordArray, + * iv: ivWordArray, + * salt: saltWordArray, + * algorithm: CryptoJS.algo.AES, + * mode: CryptoJS.mode.CBC, + * padding: CryptoJS.pad.PKCS7, + * blockSize: 4, + * formatter: CryptoJS.format.OpenSSL + * }); + */ + init: function (cipherParams) { + this.mixIn(cipherParams); + }, + + /** + * Converts this cipher params object to a string. + * + * @param {Format} formatter (Optional) The formatting strategy to use. + * + * @return {string} The stringified cipher params. + * + * @throws Error If neither the formatter nor the default formatter is set. + * + * @example + * + * var string = cipherParams + ''; + * var string = cipherParams.toString(); + * var string = cipherParams.toString(CryptoJS.format.OpenSSL); + */ + toString: function (formatter) { + return (formatter || this.formatter).stringify(this); + } + }); + + /** + * Format namespace. + */ + var C_format = C.format = {}; + + /** + * OpenSSL formatting strategy. + */ + var OpenSSLFormatter = C_format.OpenSSL = { + /** + * Converts a cipher params object to an OpenSSL-compatible string. + * + * @param {CipherParams} cipherParams The cipher params object. + * + * @return {string} The OpenSSL-compatible string. + * + * @static + * + * @example + * + * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); + */ + stringify: function (cipherParams) { + var wordArray; + + // Shortcuts + var ciphertext = cipherParams.ciphertext; + var salt = cipherParams.salt; + + // Format + if (salt) { + wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); + } else { + wordArray = ciphertext; + } + + return wordArray.toString(Base64); + }, + + /** + * Converts an OpenSSL-compatible string to a cipher params object. + * + * @param {string} openSSLStr The OpenSSL-compatible string. + * + * @return {CipherParams} The cipher params object. + * + * @static + * + * @example + * + * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); + */ + parse: function (openSSLStr) { + var salt; + + // Parse base64 + var ciphertext = Base64.parse(openSSLStr); + + // Shortcut + var ciphertextWords = ciphertext.words; + + // Test for salt + if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { + // Extract salt + salt = WordArray.create(ciphertextWords.slice(2, 4)); + + // Remove salt from ciphertext + ciphertextWords.splice(0, 4); + ciphertext.sigBytes -= 16; + } + + return CipherParams.create({ ciphertext: ciphertext, salt: salt }); + } + }; + + /** + * A cipher wrapper that returns ciphertext as a serializable cipher params object. + */ + var SerializableCipher = C_lib.SerializableCipher = Base.extend({ + /** + * Configuration options. + * + * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL + */ + cfg: Base.extend({ + format: OpenSSLFormatter + }), + + /** + * Encrypts a message. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); + * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Encrypt + var encryptor = cipher.createEncryptor(key, cfg); + var ciphertext = encryptor.finalize(message); + + // Shortcut + var cipherCfg = encryptor.cfg; + + // Create and return serializable cipher params + return CipherParams.create({ + ciphertext: ciphertext, + key: key, + iv: cipherCfg.iv, + algorithm: cipher, + mode: cipherCfg.mode, + padding: cipherCfg.padding, + blockSize: cipher.blockSize, + formatter: cfg.format + }); + }, + + /** + * Decrypts serialized ciphertext. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {WordArray} key The key. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, key, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Decrypt + var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); + + return plaintext; + }, + + /** + * Converts serialized ciphertext to CipherParams, + * else assumed CipherParams already and returns ciphertext unchanged. + * + * @param {CipherParams|string} ciphertext The ciphertext. + * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. + * + * @return {CipherParams} The unserialized ciphertext. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); + */ + _parse: function (ciphertext, format) { + if (typeof ciphertext == 'string') { + return format.parse(ciphertext, this); + } else { + return ciphertext; + } + } + }); + + /** + * Key derivation function namespace. + */ + var C_kdf = C.kdf = {}; + + /** + * OpenSSL key derivation function. + */ + var OpenSSLKdf = C_kdf.OpenSSL = { + /** + * Derives a key and IV from a password. + * + * @param {string} password The password to derive from. + * @param {number} keySize The size in words of the key to generate. + * @param {number} ivSize The size in words of the IV to generate. + * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. + * + * @return {CipherParams} A cipher params object with the key, IV, and salt. + * + * @static + * + * @example + * + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); + * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); + */ + execute: function (password, keySize, ivSize, salt) { + // Generate random salt + if (!salt) { + salt = WordArray.random(64/8); + } + + // Derive key and IV + var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); + + // Separate key and IV + var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); + key.sigBytes = keySize * 4; + + // Return params + return CipherParams.create({ key: key, iv: iv, salt: salt }); + } + }; + + /** + * A serializable cipher wrapper that derives the key from a password, + * and returns ciphertext as a serializable cipher params object. + */ + var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ + /** + * Configuration options. + * + * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL + */ + cfg: SerializableCipher.cfg.extend({ + kdf: OpenSSLKdf + }), + + /** + * Encrypts a message using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {WordArray|string} message The message to encrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {CipherParams} A cipher params object. + * + * @static + * + * @example + * + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); + * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); + */ + encrypt: function (cipher, message, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Encrypt + var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); + + // Mix in derived params + ciphertext.mixIn(derivedParams); + + return ciphertext; + }, + + /** + * Decrypts serialized ciphertext using a password. + * + * @param {Cipher} cipher The cipher algorithm to use. + * @param {CipherParams|string} ciphertext The ciphertext to decrypt. + * @param {string} password The password. + * @param {Object} cfg (Optional) The configuration options to use for this operation. + * + * @return {WordArray} The plaintext. + * + * @static + * + * @example + * + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); + * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); + */ + decrypt: function (cipher, ciphertext, password, cfg) { + // Apply config defaults + cfg = this.cfg.extend(cfg); + + // Convert string to CipherParams + ciphertext = this._parse(ciphertext, cfg.format); + + // Derive key and other params + var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); + + // Add IV to config + cfg.iv = derivedParams.iv; + + // Decrypt + var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); + + return plaintext; + } + }); +}()); diff --git a/yunshop-front-master/public/static/app/decode_common/city.js b/yunshop-front-master/public/static/app/decode_common/city.js new file mode 100644 index 0000000..4c2e2b0 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/city.js @@ -0,0 +1,1255 @@ +let Cityarea = [ + { + title: "A", + items: [ + { + full_address: "阿拉善盟 " + }, + { + full_address: "鞍山市 " + }, + { + full_address: "安庆市 " + }, + { + full_address: "安阳市 " + }, + { + full_address: "阿坝藏族羌族自治州 " + }, + { + full_address: "安顺市 " + }, + { + full_address: "安康市 " + }, + { + full_address: "阿克苏地区 " + }, + { + full_address: "阿勒泰地区 " + }, + { + full_address: "阿拉尔市 " + }, + { + full_address: "澳门特别行政区 " + } + ] + }, + { + title: "B", + items: [ + { + full_address: "北京市 " + }, + { + full_address: "保定市 " + }, + { + full_address: "包头市 " + }, + { + full_address: "巴彦淖尔市 " + }, + { + full_address: "本溪市 " + }, + { + full_address: "白山市 " + }, + { + full_address: "白城市 " + }, + { + full_address: "蚌埠市 " + }, + { + full_address: "亳州市 " + }, + { + full_address: "滨州市 " + }, + { + full_address: "北海市 " + }, + { + full_address: "百色市 " + }, + { + full_address: "白沙黎族自治县 " + }, + { + full_address: "保亭黎族苗族自治县 " + }, + { + full_address: "巴中市 " + }, + { + full_address: "毕节市 " + }, + { + full_address: "保山市 " + }, + { + full_address: "宝鸡市 " + }, + { + full_address: "白银市 " + }, + { + full_address: "博尔塔拉蒙古自治州 " + }, + { + full_address: "巴音郭楞蒙古自治州 " + } + ] + }, + { + title: "C", + items: [ + { + full_address: "承德市 " + }, + { + full_address: "沧州市 " + }, + { + full_address: "长治市 " + }, + { + full_address: "赤峰市 " + }, + { + full_address: "长春市 " + }, + { + full_address: "常州市 " + }, + { + full_address: "滁州市 " + }, + { + full_address: "池州市 " + }, + { + full_address: "长沙市 " + }, + { + full_address: "常德市 " + }, + { + full_address: "郴州市 " + }, + { + full_address: "潮州市 " + }, + { + full_address: "崇左市 " + }, + { + full_address: "澄迈县 " + }, + { + full_address: "昌江黎族自治县 " + }, + { + full_address: "重庆市 " + }, + { + full_address: "成都市 " + }, + { + full_address: "楚雄彝族自治州 " + }, + { + full_address: "昌都地区 " + }, + { + full_address: "昌吉回族自治州 " + } + ] + }, + { + title: "D", + items: [ + { + full_address: "大同市 " + }, + { + full_address: "大连市 " + }, + { + full_address: "丹东市 " + }, + { + full_address: "大庆市 " + }, + { + full_address: "大兴安岭地区 " + }, + { + full_address: "东营市 " + }, + { + full_address: "德州市 " + }, + { + full_address: "东莞市 " + }, + { + full_address: "东沙群岛 " + }, + { + full_address: "儋州市 " + }, + { + full_address: "东方市 " + }, + { + full_address: "定安县 " + }, + { + full_address: "德阳市 " + }, + { + full_address: "达州市 " + }, + { + full_address: "大理白族自治州 " + }, + { + full_address: "德宏傣族景颇族自治州 " + }, + { + full_address: "迪庆藏族自治州 " + }, + { + full_address: "定西市 " + } + ] + }, + { + title: "E", + items: [ + { + full_address: "鄂尔多斯市 " + }, + { + full_address: "鄂州市 " + }, + { + full_address: "恩施土家族苗族自治州 " + } + ] + }, + { + title: "F", + items: [ + { + full_address: "抚顺市 " + }, + { + full_address: "阜新市 " + }, + { + full_address: "阜阳市 " + }, + { + full_address: "抚州市 " + }, + { + full_address: "佛山市 " + }, + { + full_address: "防城港市 " + } + ] + }, + { + title: "G", + items: [ + { + full_address: "赣州市 " + }, + { + full_address: "广州市 " + }, + { + full_address: "桂林市 " + }, + { + full_address: "贵港市 " + }, + { + full_address: "广元市 " + }, + { + full_address: "防城港市 " + }, + { + full_address: "广安市 " + }, + { + full_address: "甘孜藏族自治州 " + }, + { + full_address: "贵阳市 " + }, + { + full_address: "甘南藏族自治州 " + }, + { + full_address: "果洛藏族自治州 " + }, + { + full_address: "固原市 " + }, + { + full_address: "高雄市 " + } + ] + }, + { + title: "H", + items: [ + { + full_address: "邯郸市 " + }, + { + full_address: "衡水市 " + }, + { + full_address: "呼和浩特市 " + }, + { + full_address: "呼伦贝尔市 " + }, + { + full_address: "葫芦岛市 " + }, + { + full_address: "哈尔滨市 " + }, + { + full_address: "鹤岗市 " + }, + { + full_address: "黑河市 " + }, + { + full_address: "淮安市 " + }, + { + full_address: "杭州市 " + }, + { + full_address: "湖州市 " + }, + { + full_address: "合肥市 " + }, + { + full_address: "淮南市 " + }, + { + full_address: "淮北市 " + }, + { + full_address: "黄山市 " + }, + { + full_address: "菏泽市 " + }, + { + full_address: "鹤壁市 " + }, + { + full_address: "黄石市 " + }, + { + full_address: "黄冈市 " + }, + { + full_address: "衡阳市 " + }, + { + full_address: "怀化市 " + }, + { + full_address: "惠州市 " + }, + { + full_address: "河源市 " + }, + { + full_address: "贺州市 " + }, + { + full_address: "河池市 " + }, + { + full_address: "海口市 " + }, + { + full_address: "汉中市 " + }, + { + full_address: "海东市 " + }, + { + full_address: "海北藏族自治州 " + }, + { + full_address: "黄南藏族自治州 " + }, + { + full_address: "海南藏族自治州 " + }, + { + full_address: "海西蒙古族藏族自治州 " + }, + { + full_address: "哈密地区 " + }, + { + full_address: "和田地区 " + }, + { + full_address: "花莲县 " + } + ] + }, + { + title: "J", + items: [ + { + full_address: "晋城市 " + }, + { + full_address: "晋中市 " + }, + { + full_address: "锦州市 " + }, + { + full_address: "吉林市 " + }, + { + full_address: "鸡西市 " + }, + { + full_address: "佳木斯市 " + }, + { + full_address: "嘉兴市 " + }, + { + full_address: "金华市 " + }, + { + full_address: "景德镇市 " + }, + { + full_address: "九江市 " + }, + { + full_address: "吉安市 " + }, + { + full_address: "济南市 " + }, + { + full_address: "济宁市 " + }, + { + full_address: "焦作市 " + }, + { + full_address: "济源市 " + }, + { + full_address: "荆门市 " + }, + { + full_address: "荆州市 " + }, + { + full_address: "江门市 " + }, + { + full_address: "揭阳市 " + }, + { + full_address: "嘉峪关市 " + }, + { + full_address: "金昌市 " + }, + { + full_address: "酒泉市 " + }, + { + full_address: "金门县 " + }, + { + full_address: "基隆市 " + }, + { + full_address: "嘉义市 " + }, + { + full_address: "嘉义县 " + } + ] + }, + { + title: "K", + items: [ + { + full_address: "开封市 " + }, + { + full_address: "昆明市 " + }, + { + full_address: "克拉玛依市 " + }, + { + full_address: "克孜勒苏柯尔克孜自治州 " + }, + { + full_address: "喀什地区 " + } + ] + }, + { + title: "L", + items: [ + { + full_address: "廊坊市 " + }, + { + full_address: "临汾市 " + }, + { + full_address: "吕梁市 " + }, + { + full_address: "辽阳市 " + }, + { + full_address: "辽源市 " + }, + { + full_address: "连云港市 " + }, + { + full_address: "丽水市 " + }, + { + full_address: "六安市 " + }, + { + full_address: "龙岩市 " + }, + { + full_address: "莱芜市 " + }, + { + full_address: "临沂市 " + }, + { + full_address: "聊城市 " + }, + { + full_address: "洛阳市 " + }, + { + full_address: "娄底市 " + }, + { + full_address: "柳州市 " + }, + { + full_address: "来宾市 " + }, + { + full_address: "临高县 " + }, + { + full_address: "乐东黎族自治县 " + }, + { + full_address: "陵水黎族自治县 " + }, + { + full_address: "泸州市 " + }, + { + full_address: "乐山市 " + }, + { + full_address: "凉山彝族自治州 " + }, + { + full_address: "六盘水市 " + }, + { + full_address: "丽江市 " + }, + { + full_address: "临沧市 " + }, + { + full_address: "拉萨市 " + }, + { + full_address: "林芝地区 " + }, + { + full_address: "兰州市 " + }, + { + full_address: "陇南市 " + }, + { + full_address: "临夏回族自治州 " + }, + { + full_address: "连江县 " + } + ] + }, + { + title: "M", + items: [ + { + full_address: "牡丹江市 " + }, + { + full_address: "马鞍山市 " + }, + { + full_address: "茂名市 " + }, + { + full_address: "梅州市 " + }, + { + full_address: "绵阳市 " + }, + { + full_address: "眉山市 " + }, + { + full_address: "苗栗县 " + } + ] + }, + { + title: "N", + items: [ + { + full_address: "南京市 " + }, + { + full_address: "南通市 " + }, + { + full_address: "宁波市 " + }, + { + full_address: "南平市 " + }, + { + full_address: "宁德市 " + }, + { + full_address: "南昌市 " + }, + { + full_address: "南阳市 " + }, + { + full_address: "南宁市 " + }, + { + full_address: "内江市 " + }, + { + full_address: "南充市 " + }, + { + full_address: "怒江傈僳族自治州 " + }, + { + full_address: "那曲地区 " + }, + { + full_address: "南投县 " + } + ] + }, + { + title: "P", + items: [ + { + full_address: "盘锦市 " + }, + { + full_address: "莆田市 " + }, + { + full_address: "萍乡市 " + }, + { + full_address: "平顶山市 " + }, + { + full_address: "濮阳市 " + }, + { + full_address: "攀枝花市 " + }, + { + full_address: "普洱市 " + }, + { + full_address: "平凉市 " + }, + { + full_address: "屏东县 " + }, + { + full_address: "澎湖县 " + } + ] + }, + { + title: "Q", + items: [ + { + full_address: "秦皇岛市 " + }, + { + full_address: "齐齐哈尔市 " + }, + { + full_address: "七台河市 " + }, + { + full_address: "衢州市 " + }, + { + full_address: "泉州市 " + }, + { + full_address: "青岛市 " + }, + { + full_address: "潜江市 " + }, + { + full_address: "清远市 " + }, + { + full_address: "钦州市 " + }, + { + full_address: "琼海市 " + }, + { + full_address: "琼中黎族苗族自治县 " + }, + { + full_address: "黔西南布依族苗族自治州 " + }, + { + full_address: "黔东南苗族侗族自治州 " + }, + { + full_address: "曲靖市 " + }, + { + full_address: "庆阳市 " + } + ] + }, + { + title: "R", + "ri-zhao-shi": "日照市", + "ri-ka-ze-di-qu": "日喀则地区", + items: [ + { + full_address: "日照市 " + }, + { + full_address: "日喀则地区 " + } + ] + }, + { + title: "S", + items: [ + { + full_address: "石家庄市 " + }, + { + full_address: "朔州市 " + }, + { + full_address: "沈阳市 " + }, + { + full_address: "四平市 " + }, + { + full_address: "松原市 " + }, + { + full_address: "双鸭山市 " + }, + { + full_address: "绥化市 " + }, + { + full_address: "上海市 " + }, + { + full_address: "宿州市 " + }, + { + full_address: "宿迁市 " + }, + { + full_address: "绍兴市 " + }, + { + full_address: "三明市 " + }, + { + full_address: "上饶市 " + }, + { + full_address: "三门峡市 " + }, + { + full_address: "商丘市 " + }, + { + full_address: "十堰市 " + }, + { + full_address: "随州市 " + }, + { + full_address: "神农架林区 " + }, + { + full_address: "邵阳市 " + }, + { + full_address: "韶关市 " + }, + { + full_address: "深圳市 " + }, + { + full_address: "汕头市 " + }, + { + full_address: "汕尾市 " + }, + { + full_address: "三亚市 " + }, + { + full_address: "三沙市 " + }, + { + full_address: "遂宁市 " + }, + { + full_address: "山南地区 " + }, + { + full_address: "商洛市 " + }, + { + full_address: "石嘴山市 " + }, + { + full_address: "石河子市 " + } + ] + }, + { + title: "T", + items: [ + { + full_address: "天津市 " + }, + { + full_address: "唐山市 " + }, + { + full_address: "太原市 " + }, + { + full_address: "通辽市 " + }, + { + full_address: "铁岭市 " + }, + { + full_address: "通化市 " + }, + { + full_address: "台州市 " + }, + { + full_address: "铜陵市 " + }, + { + full_address: "泰安市 " + }, + { + full_address: "漯河市 " + }, + { + full_address: "天门市 " + }, + { + full_address: "屯昌县 " + }, + { + full_address: "铜仁市 " + }, + { + full_address: "铜川市 " + }, + { + full_address: "天水市 " + }, + { + full_address: "吐鲁番地区 " + }, + { + full_address: "塔城地区 " + }, + { + full_address: "图木舒克市 " + }, + { + full_address: "台北市 " + }, + { + full_address: "台南市 " + }, + { + full_address: "台中市 " + }, + { + full_address: "桃园县 " + }, + { + full_address: "台东县 " + } + ] + }, + { + title: "W", + items: [ + { + full_address: "乌海市 " + }, + { + full_address: "乌兰察布市 " + }, + { + full_address: "无锡市 " + }, + { + full_address: "温州市 " + }, + { + full_address: "芜湖市 " + }, + { + full_address: "潍坊市 " + }, + { + full_address: "威海市 " + }, + { + full_address: "武汉市 " + }, + { + full_address: "梧州市 " + }, + { + full_address: "五指山市 " + }, + { + full_address: "文昌市 " + }, + { + full_address: "万宁市 " + }, + { + full_address: "文山壮族苗族自治州 " + }, + { + full_address: "渭南市 " + }, + { + full_address: "武威市 " + }, + { + full_address: "吴忠市 " + }, + { + full_address: "乌鲁木齐市 " + }, + { + full_address: "五家渠市 " + } + ] + }, + { + title: "X", + items: [ + { + full_address: "邢台市 " + }, + { + full_address: "忻州市 " + }, + { + full_address: "兴安盟 " + }, + { + full_address: "锡林郭勒盟 " + }, + { + full_address: "徐州市 " + }, + { + full_address: "宣城市 " + }, + { + full_address: "厦门市 " + }, + { + full_address: "新余市 " + }, + { + full_address: "新乡市 " + }, + { + full_address: "许昌市 " + }, + { + full_address: "信阳市 " + }, + { + full_address: "襄阳市 " + }, + { + full_address: "孝感市 " + }, + { + full_address: "咸宁市 " + }, + { + full_address: "仙桃市 " + }, + { + full_address: "湘潭市 " + }, + { + full_address: "湘西土家族苗族自治州 " + }, + { + full_address: "西双版纳傣族自治州 " + }, + { + full_address: "西安市 " + }, + { + full_address: "咸阳市 " + }, + { + full_address: "西宁市 " + }, + { + full_address: "新竹市 " + }, + { + full_address: "新北市 " + }, + { + full_address: "新竹县 " + }, + { + full_address: "香港特别行政区 " + } + ] + }, + { + title: "Y", + items: [ + { + full_address: "阳泉市 " + }, + { + full_address: "运城市 " + }, + { + full_address: "营口市 " + }, + { + full_address: "延边朝鲜族自治州 " + }, + { + full_address: "宜春市 " + }, + { + full_address: "盐城市 " + }, + { + full_address: "扬州市 " + }, + { + full_address: "鹰潭市 " + }, + { + full_address: "烟台市 " + }, + { + full_address: "宜昌市 " + }, + { + full_address: "岳阳市 " + }, + { + full_address: "益阳市 " + }, + { + full_address: "永州市 " + }, + { + full_address: "阳江市 " + }, + { + full_address: "云浮市 " + }, + { + full_address: "榆林市 " + }, + { + full_address: "宜宾市 " + }, + { + full_address: "雅安市 " + }, + { + full_address: "玉溪市 " + }, + { + full_address: "延安市 " + }, + { + full_address: "玉树藏族自治州 " + }, + { + full_address: "银川市 " + }, + { + full_address: "伊犁哈萨克自治州 " + }, + { + full_address: "宜兰县 " + }, + { + full_address: "云林县 " + } + ] + }, + { + title: "Z", + items: [ + { + full_address: "张家口市 " + }, + { + full_address: "朝阳市 " + }, + { + full_address: "镇江市 " + }, + { + full_address: "舟山市 " + }, + { + full_address: "漳州市 " + }, + { + full_address: "淄博市 " + }, + { + full_address: "枣庄市 " + }, + { + full_address: "郑州市 " + }, + { + full_address: "周口市 " + }, + { + full_address: "驻马店市 " + }, + { + full_address: "株洲市 " + }, + { + full_address: "张家界市 " + }, + { + full_address: "珠海市 " + }, + { + full_address: "湛江市 " + }, + { + full_address: "肇庆市 " + }, + { + full_address: "中山市 " + }, + { + full_address: "自贡市 " + }, + { + full_address: "资阳市 " + }, + { + full_address: "遵义市 " + }, + { + full_address: "昭通市 " + }, + { + full_address: "张掖市 " + }, + { + full_address: "中卫市 " + }, + { + full_address: "彰化县 " + } + ] + } +]; +export default Cityarea; diff --git a/yunshop-front-master/public/static/app/decode_common/core.js b/yunshop-front-master/public/static/app/decode_common/core.js new file mode 100644 index 0000000..5748755 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/core.js @@ -0,0 +1,777 @@ +/*globals window, global, require*/ + +/** + * CryptoJS core components. + */ +var CryptoJS = CryptoJS || (function (Math, undefined) { + + var crypto; + + // Native crypto from window (Browser) + if (typeof window !== 'undefined' && window.crypto) { + crypto = window.crypto; + } + + // Native (experimental IE 11) crypto from window (Browser) + if (!crypto && typeof window !== 'undefined' && window.msCrypto) { + crypto = window.msCrypto; + } + + // Native crypto from global (NodeJS) + if (!crypto && typeof global !== 'undefined' && global.crypto) { + crypto = global.crypto; + } + + // Native crypto import via require (NodeJS) + if (!crypto && typeof require === 'function') { + try { + crypto = require('crypto'); + } catch (err) {} + } + + /* + * Cryptographically secure pseudorandom number generator + * + * As Math.random() is cryptographically not safe to use + */ + var cryptoSecureRandomInt = function () { + if (crypto) { + // Use getRandomValues method (Browser) + if (typeof crypto.getRandomValues === 'function') { + try { + return crypto.getRandomValues(new Uint32Array(1))[0]; + } catch (err) {} + } + + // Use randomBytes method (NodeJS) + if (typeof crypto.randomBytes === 'function') { + try { + return crypto.randomBytes(4).readInt32LE(); + } catch (err) {} + } + } + + throw new Error('Native crypto module could not be used to get secure random number.'); + }; + + /* + * Local polyfill of Object.create + + */ + var create = Object.create || (function () { + function F() {} + + return function (obj) { + var subtype; + + F.prototype = obj; + + subtype = new F(); + + F.prototype = null; + + return subtype; + }; + }()) + + /** + * CryptoJS namespace. + */ + var C = {}; + + /** + * Library namespace. + */ + var C_lib = C.lib = {}; + + /** + * Base object for prototypal inheritance. + */ + var Base = C_lib.Base = (function () { + + + return { + /** + * Creates a new object that inherits from this object. + * + * @param {Object} overrides Properties to copy into the new object. + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * field: 'value', + * + * method: function () { + * } + * }); + */ + extend: function (overrides) { + // Spawn + var subtype = create(this); + + // Augment + if (overrides) { + subtype.mixIn(overrides); + } + + // Create default initializer + if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { + subtype.init = function () { + subtype.$super.init.apply(this, arguments); + }; + } + + // Initializer's prototype is the subtype object + subtype.init.prototype = subtype; + + // Reference supertype + subtype.$super = this; + + return subtype; + }, + + /** + * Extends this object and runs the init method. + * Arguments to create() will be passed to init(). + * + * @return {Object} The new object. + * + * @static + * + * @example + * + * var instance = MyType.create(); + */ + create: function () { + var instance = this.extend(); + instance.init.apply(instance, arguments); + + return instance; + }, + + /** + * Initializes a newly created object. + * Override this method to add some logic when your objects are created. + * + * @example + * + * var MyType = CryptoJS.lib.Base.extend({ + * init: function () { + * // ... + * } + * }); + */ + init: function () { + }, + + /** + * Copies properties into this object. + * + * @param {Object} properties The properties to mix in. + * + * @example + * + * MyType.mixIn({ + * field: 'value' + * }); + */ + mixIn: function (properties) { + for (var propertyName in properties) { + if (properties.hasOwnProperty(propertyName)) { + this[propertyName] = properties[propertyName]; + } + } + + // IE won't copy toString using the loop above + if (properties.hasOwnProperty('toString')) { + this.toString = properties.toString; + } + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = instance.clone(); + */ + clone: function () { + return this.init.prototype.extend(this); + } + }; + }()); + + /** + * An array of 32-bit words. + * + * @property {Array} words The array of 32-bit words. + * @property {number} sigBytes The number of significant bytes in this word array. + */ + var WordArray = C_lib.WordArray = Base.extend({ + /** + * Initializes a newly created word array. + * + * @param {Array} words (Optional) An array of 32-bit words. + * @param {number} sigBytes (Optional) The number of significant bytes in the words. + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.create(); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); + * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); + */ + init: function (words, sigBytes) { + words = this.words = words || []; + + if (sigBytes != undefined) { + this.sigBytes = sigBytes; + } else { + this.sigBytes = words.length * 4; + } + }, + + /** + * Converts this word array to a string. + * + * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex + * + * @return {string} The stringified word array. + * + * @example + * + * var string = wordArray + ''; + * var string = wordArray.toString(); + * var string = wordArray.toString(CryptoJS.enc.Utf8); + */ + toString: function (encoder) { + return (encoder || Hex).stringify(this); + }, + + /** + * Concatenates a word array to this word array. + * + * @param {WordArray} wordArray The word array to append. + * + * @return {WordArray} This word array. + * + * @example + * + * wordArray1.concat(wordArray2); + */ + concat: function (wordArray) { + // Shortcuts + var thisWords = this.words; + var thatWords = wordArray.words; + var thisSigBytes = this.sigBytes; + var thatSigBytes = wordArray.sigBytes; + + // Clamp excess bits + this.clamp(); + + // Concat + if (thisSigBytes % 4) { + // Copy one byte at a time + for (var i = 0; i < thatSigBytes; i++) { + var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8); + } + } else { + // Copy one word at a time + for (var i = 0; i < thatSigBytes; i += 4) { + thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2]; + } + } + this.sigBytes += thatSigBytes; + + // Chainable + return this; + }, + + /** + * Removes insignificant bits. + * + * @example + * + * wordArray.clamp(); + */ + clamp: function () { + // Shortcuts + var words = this.words; + var sigBytes = this.sigBytes; + + // Clamp + words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8); + words.length = Math.ceil(sigBytes / 4); + }, + + /** + * Creates a copy of this word array. + * + * @return {WordArray} The clone. + * + * @example + * + * var clone = wordArray.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone.words = this.words.slice(0); + + return clone; + }, + + /** + * Creates a word array filled with random bytes. + * + * @param {number} nBytes The number of random bytes to generate. + * + * @return {WordArray} The random word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.lib.WordArray.random(16); + */ + random: function (nBytes) { + var words = []; + + for (var i = 0; i < nBytes; i += 4) { + words.push(cryptoSecureRandomInt()); + } + + return new WordArray.init(words, nBytes); + } + }); + + /** + * Encoder namespace. + */ + var C_enc = C.enc = {}; + + /** + * Hex encoding strategy. + */ + var Hex = C_enc.Hex = { + /** + * Converts a word array to a hex string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The hex string. + * + * @static + * + * @example + * + * var hexString = CryptoJS.enc.Hex.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var hexChars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + hexChars.push((bite >>> 4).toString(16)); + hexChars.push((bite & 0x0f).toString(16)); + } + + return hexChars.join(''); + }, + + /** + * Converts a hex string to a word array. + * + * @param {string} hexStr The hex string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Hex.parse(hexString); + */ + parse: function (hexStr) { + // Shortcut + var hexStrLength = hexStr.length; + + // Convert + var words = []; + for (var i = 0; i < hexStrLength; i += 2) { + words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); + } + + return new WordArray.init(words, hexStrLength / 2); + } + }; + + /** + * Latin1 encoding strategy. + */ + var Latin1 = C_enc.Latin1 = { + /** + * Converts a word array to a Latin1 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Latin1 string. + * + * @static + * + * @example + * + * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + + // Convert + var latin1Chars = []; + for (var i = 0; i < sigBytes; i++) { + var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + latin1Chars.push(String.fromCharCode(bite)); + } + + return latin1Chars.join(''); + }, + + /** + * Converts a Latin1 string to a word array. + * + * @param {string} latin1Str The Latin1 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); + */ + parse: function (latin1Str) { + // Shortcut + var latin1StrLength = latin1Str.length; + + // Convert + var words = []; + for (var i = 0; i < latin1StrLength; i++) { + words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8); + } + + return new WordArray.init(words, latin1StrLength); + } + }; + + /** + * UTF-8 encoding strategy. + */ + var Utf8 = C_enc.Utf8 = { + /** + * Converts a word array to a UTF-8 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The UTF-8 string. + * + * @static + * + * @example + * + * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); + */ + stringify: function (wordArray) { + try { + return decodeURIComponent(escape(Latin1.stringify(wordArray))); + } catch (e) { + throw new Error('Malformed UTF-8 data'); + } + }, + + /** + * Converts a UTF-8 string to a word array. + * + * @param {string} utf8Str The UTF-8 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); + */ + parse: function (utf8Str) { + return Latin1.parse(unescape(encodeURIComponent(utf8Str))); + } + }; + + /** + * Abstract buffered block algorithm template. + * + * The property blockSize must be implemented in a concrete subtype. + * + * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 + */ + var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ + /** + * Resets this block algorithm's data buffer to its initial state. + * + * @example + * + * bufferedBlockAlgorithm.reset(); + */ + reset: function () { + // Initial values + this._data = new WordArray.init(); + this._nDataBytes = 0; + }, + + /** + * Adds new data to this block algorithm's buffer. + * + * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. + * + * @example + * + * bufferedBlockAlgorithm._append('data'); + * bufferedBlockAlgorithm._append(wordArray); + */ + _append: function (data) { + // Convert string to WordArray, else assume WordArray already + if (typeof data == 'string') { + data = Utf8.parse(data); + } + + // Append + this._data.concat(data); + this._nDataBytes += data.sigBytes; + }, + + /** + * Processes available data blocks. + * + * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. + * + * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. + * + * @return {WordArray} The processed data. + * + * @example + * + * var processedData = bufferedBlockAlgorithm._process(); + * var processedData = bufferedBlockAlgorithm._process(!!'flush'); + */ + _process: function (doFlush) { + var processedWords; + + // Shortcuts + var data = this._data; + var dataWords = data.words; + var dataSigBytes = data.sigBytes; + var blockSize = this.blockSize; + var blockSizeBytes = blockSize * 4; + + // Count blocks ready + var nBlocksReady = dataSigBytes / blockSizeBytes; + if (doFlush) { + // Round up to include partial blocks + nBlocksReady = Math.ceil(nBlocksReady); + } else { + // Round down to include only full blocks, + // less the number of blocks that must remain in the buffer + nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); + } + + // Count words ready + var nWordsReady = nBlocksReady * blockSize; + + // Count bytes ready + var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); + + // Process blocks + if (nWordsReady) { + for (var offset = 0; offset < nWordsReady; offset += blockSize) { + // Perform concrete-algorithm logic + this._doProcessBlock(dataWords, offset); + } + + // Remove processed words + processedWords = dataWords.splice(0, nWordsReady); + data.sigBytes -= nBytesReady; + } + + // Return processed words + return new WordArray.init(processedWords, nBytesReady); + }, + + /** + * Creates a copy of this object. + * + * @return {Object} The clone. + * + * @example + * + * var clone = bufferedBlockAlgorithm.clone(); + */ + clone: function () { + var clone = Base.clone.call(this); + clone._data = this._data.clone(); + + return clone; + }, + + _minBufferSize: 0 + }); + + /** + * Abstract hasher template. + * + * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) + */ + var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ + /** + * Configuration options. + */ + cfg: Base.extend(), + + /** + * Initializes a newly created hasher. + * + * @param {Object} cfg (Optional) The configuration options to use for this hash computation. + * + * @example + * + * var hasher = CryptoJS.algo.SHA256.create(); + */ + init: function (cfg) { + // Apply config defaults + this.cfg = this.cfg.extend(cfg); + + // Set initial values + this.reset(); + }, + + /** + * Resets this hasher to its initial state. + * + * @example + * + * hasher.reset(); + */ + reset: function () { + // Reset data buffer + BufferedBlockAlgorithm.reset.call(this); + + // Perform concrete-hasher logic + this._doReset(); + }, + + /** + * Updates this hasher with a message. + * + * @param {WordArray|string} messageUpdate The message to append. + * + * @return {Hasher} This hasher. + * + * @example + * + * hasher.update('message'); + * hasher.update(wordArray); + */ + update: function (messageUpdate) { + // Append + this._append(messageUpdate); + + // Update the hash + this._process(); + + // Chainable + return this; + }, + + /** + * Finalizes the hash computation. + * Note that the finalize operation is effectively a destructive, read-once operation. + * + * @param {WordArray|string} messageUpdate (Optional) A final message update. + * + * @return {WordArray} The hash. + * + * @example + * + * var hash = hasher.finalize(); + * var hash = hasher.finalize('message'); + * var hash = hasher.finalize(wordArray); + */ + finalize: function (messageUpdate) { + // Final message update + if (messageUpdate) { + this._append(messageUpdate); + } + + // Perform concrete-hasher logic + var hash = this._doFinalize(); + + return hash; + }, + + blockSize: 512/32, + + /** + * Creates a shortcut function to a hasher's object interface. + * + * @param {Hasher} hasher The hasher to create a helper for. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); + */ + _createHelper: function (hasher) { + return function (message, cfg) { + return new hasher.init(cfg).finalize(message); + }; + }, + + /** + * Creates a shortcut function to the HMAC's object interface. + * + * @param {Hasher} hasher The hasher to use in this HMAC helper. + * + * @return {Function} The shortcut function. + * + * @static + * + * @example + * + * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); + */ + _createHmacHelper: function (hasher) { + return function (message, key) { + return new C_algo.HMAC.init(hasher, key).finalize(message); + }; + } + }); + + /** + * Algorithm namespace. + */ + var C_algo = C.algo = {}; + + return C; +}(Math)); diff --git a/yunshop-front-master/public/static/app/decode_common/enc-base64.js b/yunshop-front-master/public/static/app/decode_common/enc-base64.js new file mode 100644 index 0000000..a32b9a4 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/enc-base64.js @@ -0,0 +1,116 @@ +(function () { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var C_enc = C.enc; + + /** + * Base64 encoding strategy. + */ + var Base64 = C_enc.Base64 = { + /** + * Converts a word array to a Base64 string. + * + * @param {WordArray} wordArray The word array. + * + * @return {string} The Base64 string. + * + * @static + * + * @example + * + * var base64String = CryptoJS.enc.Base64.stringify(wordArray); + */ + stringify: function (wordArray) { + // Shortcuts + var words = wordArray.words; + var sigBytes = wordArray.sigBytes; + var map = this._map; + + // Clamp excess bits + wordArray.clamp(); + + // Convert + var base64Chars = []; + for (var i = 0; i < sigBytes; i += 3) { + var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + var reverseMap = this._reverseMap; + + if (!reverseMap) { + reverseMap = this._reverseMap = []; + for (var j = 0; j < map.length; j++) { + reverseMap[map.charCodeAt(j)] = j; + } + } + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex !== -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + return parseLoop(base64Str, base64StrLength, reverseMap); + + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; + + function parseLoop(base64Str, base64StrLength, reverseMap) { + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2); + var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2); + var bitsCombined = bits1 | bits2; + words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + return WordArray.create(words, nBytes); + } +}()); diff --git a/yunshop-front-master/public/static/app/decode_common/locales/en.json b/yunshop-front-master/public/static/app/decode_common/locales/en.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/locales/en.json @@ -0,0 +1 @@ +{} diff --git a/yunshop-front-master/public/static/app/decode_common/locales/index.js b/yunshop-front-master/public/static/app/decode_common/locales/index.js new file mode 100644 index 0000000..539c846 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/locales/index.js @@ -0,0 +1,41 @@ +import Vue from 'vue' +import VueI18n from 'vue-i18n' + +Vue.use(VueI18n) + +const DEFAULT_LANG = 'zh' +const LOCALE_KEY = 'localeLanguage' + +const locales = { + zh: require('./zh.json'), + en: require('./en.json'), +} + +const i18n = new VueI18n({ + locale: DEFAULT_LANG, + messages: locales, +}) + + +export const setup = lang => { + if (lang === undefined) { + lang = window.localStorage.getItem(LOCALE_KEY) + if (locales[lang] === undefined) { + lang = DEFAULT_LANG + } + } + window.localStorage.setItem(LOCALE_KEY, lang) + + Object.keys(locales).forEach(lang => { + document.body.classList.remove(`lang-${lang}`) + }) + document.body.classList.add(`lang-${lang}`) + document.body.setAttribute('lang', lang) + + Vue.config.lang = lang + i18n.locale = lang +} + +setup("en") +window.$i18n = i18n; +export default i18n diff --git a/yunshop-front-master/public/static/app/decode_common/locales/language.json b/yunshop-front-master/public/static/app/decode_common/locales/language.json new file mode 100644 index 0000000..8497502 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/locales/language.json @@ -0,0 +1,114 @@ +{ + "en":{ + "home": { + "输入关键词搜索": "输入关键词搜索", + "品牌优选": "品牌优选", + "限时优惠": "限时优惠", + "用最低价格买好物": "用最低价格买好物", + "限时价": "限时价", + "人气推荐": "人气推荐", + "精选最适合您的商品": "精选最适合您的商品", + "推荐商品": "推荐商品", + "选择区域": "选择区域", + "当前区域": "当前区域", + "已开放城市": "已开放城市", + "选择城市": "选择城市" + }, + "category": { + "搜索商品": "搜索商品", + "未检测到子分类数据": "未检测到子分类数据", + "选择分类": "选择分类", + "三级分类": "三级分类", + "暂无其他分类": "暂无其他分类", + "已售": "已售", + "选规格": "选规格", + "去租赁": "去租赁", + "推荐品牌": "推荐品牌", + "推荐分类": "推荐分类", + "加入购物车": "加入购物车" + }, + "extension": { + "会员": "会员", + "分享": "分享", + "累计": "累计", + "可": "可", + "去": "去", + "日自动": "日自动", + "领取收益": "领取收益", + "明细": "明细", + "营业额": "营业额", + "权限": "权限", + "更多权限": "更多权限" + }, + "cart": { + "购物车": "购物车", + "编辑": "编辑", + "完成": "完成", + "租赁": "租赁", + "购买": "购买", + "吊牌价": "吊牌价", + "近期热租": "近期热租", + "看看其他宝宝都再想什么": "看看其他宝宝都再想什么", + "不含运费": "不含运费", + "天起": "天起", + "合计": "合计", + "结算": "结算", + "删除": "删除", + "购物车快饿瘪了": "购物车快饿瘪了", + "主人快去给我找点东西吧": "主人快去给我找点东西吧", + "个人中心": "个人中心", + "去逛逛": "去逛逛" + }, + "member": { + "退出登录": "退出登录", + "邀请码": "邀请码", + "复制": "复制", + "订单": "订单", + "我的订单": "我的订单", + "待付款": "待付款", + "待发货": "待发货", + "待收货": "待收货", + "售后列表": "售后列表", + "待确认": "待确认", + "待入住": "待入住", + "待退房": "待退房", + "拼团订单": "拼团订单", + "网约车订单": "网约车订单", + "待审核": "待审核", + "待贷款": "待贷款", + "待提车": "待提车", + "租赁订单": "租赁订单", + "待支付": "待支付", + "待归还": "待归还", + "实用工具": "实用工具", + "收藏": "收藏", + "足迹": "足迹", + "地址管理": "地址管理", + "设置": "设置", + "消息通知": "消息通知", + "商家管理": "商家管理", + "营销互动": "营销互动", + "二维码": "二维码", + "评论": "评论", + "客户": "客户", + "优惠券": "优惠券", + "资产权益": "资产权益", + "聚合cps": "聚合cps", + "二维码生成中": "二维码生成中 请稍候查看" + }, + "我的推广": "我的推广", + "预估收益": "预估收益", + "天": "天", + "搜索": "搜索", + "加载更多": "加载更多", + "没有更多了": "没有更多了", + "money": "¥", + "元": "元", + "全选": "全选", + "下架": "下架", + "售罄": "售罄", + "已下架": "已下架", + "不存在": "不存在", + "失效": "失效" + } +} diff --git a/yunshop-front-master/public/static/app/decode_common/locales/zh.json b/yunshop-front-master/public/static/app/decode_common/locales/zh.json new file mode 100644 index 0000000..80df9d0 --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/locales/zh.json @@ -0,0 +1,108 @@ +{ + "home": { + "输入关键词搜索": "输入关键词搜索", + "品牌优选": "品牌优选", + "限时优惠": "限时优惠", + "用最低价格买好物": "用最低价格买好物", + "限时价": "限时价", + "人气推荐": "人气推荐", + "精选最适合您的商品": "精选最适合您的商品", + "推荐商品": "推荐商品", + "选择区域": "选择区域", + "当前区域": "当前区域", + "已开放城市": "已开放城市", + "选择城市": "选择城市" + }, + "category": { + "搜索商品": "搜索商品", + "未检测到子分类数据": "未检测到子分类数据", + "选择分类": "选择分类", + "三级分类": "三级分类", + "暂无其他分类": "暂无其他分类", + "已售": "已售", + "选规格": "选规格", + "去租赁": "去租赁", + "推荐品牌": "推荐品牌", + "推荐分类": "推荐分类", + "加入购物车": "加入购物车" + }, + "extension": { + "会员": "会员", + "分享": "分享", + "累计": "累计", + "可": "可", + "去": "去", + "日自动": "日自动", + "领取收益": "领取收益", + "明细": "明细", + "营业额": "营业额", + "权限": "权限", + "更多权限": "更多权限" + }, + "cart": { + "购物车": "购物车", + "编辑": "编辑", + "完成": "完成", + "租赁": "租赁", + "购买": "购买", + "吊牌价": "吊牌价", + "近期热租": "近期热租", + "看看其他宝宝都再想什么": "看看其他宝宝都再想什么", + "不含运费": "不含运费", + "天起": "天起", + "合计": "合计", + "结算": "结算", + "删除": "删除", + "购物车快饿瘪了": "购物车快饿瘪了", + "主人快去给我找点东西吧": "主人快去给我找点东西吧", + "个人中心": "个人中心", + "去逛逛": "去逛逛" + }, + "member": { + "退出登录": "退出登录", + "邀请码": "邀请码", + "复制": "复制", + "订单": "订单", + "我的订单": "我的订单", + "待付款": "待付款", + "待发货": "待发货", + "待收货": "待收货", + "售后列表": "售后列表", + "待确认": "待确认", + "待入住": "待入住", + "待退房": "待退房", + "拼团订单": "拼团订单", + "网约车订单": "网约车订单", + "待审核": "待审核", + "待贷款": "待贷款", + "待提车": "待提车", + "租赁订单": "租赁订单", + "待支付": "待支付", + "待归还": "待归还", + "实用工具": "实用工具", + "收藏": "收藏", + "足迹": "足迹", + "地址管理": "地址管理", + "设置": "设置", + "消息通知": "消息通知", + "商家管理": "商家管理", + "营销互动": "营销互动", + "二维码": "二维码", + "评论": "评论", + "客户": "客户", + "优惠券": "优惠券", + "资产权益": "资产权益", + "聚合cps": "聚合cps", + "二维码生成中": "二维码生成中 请稍候查看" + }, + "我的推广": "我的推广", + "预估收益": "预估收益", + "天": "天", + "搜索": "搜索", + "加载更多": "加载更多", + "没有更多了": "没有更多了", + "money": "{{$i18n.t('money')}}", + "元": "元", + "全选": "全选", + "天起": "天起" +} diff --git a/yunshop-front-master/public/static/app/decode_common/md5.js b/yunshop-front-master/public/static/app/decode_common/md5.js new file mode 100644 index 0000000..6d3954e --- /dev/null +++ b/yunshop-front-master/public/static/app/decode_common/md5.js @@ -0,0 +1,248 @@ +(function (Math) { + // Shortcuts + var C = CryptoJS; + var C_lib = C.lib; + var WordArray = C_lib.WordArray; + var Hasher = C_lib.Hasher; + var C_algo = C.algo; + + // Constants table + var T = []; + + // Compute constants + (function () { + for (var i = 0; i < 64; i++) { + T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0; + } + }()); + + /** + * MD5 hash algorithm. + */ + var MD5 = C_algo.MD5 = Hasher.extend({ + _doReset: function () { + this._hash = new WordArray.init([ + 0x67452301, 0xefcdab89, + 0x98badcfe, 0x10325476 + ]); + }, + + _doProcessBlock: function (M, offset) { + // Swap endian + for (var i = 0; i < 16; i++) { + // Shortcuts + var offset_i = offset + i; + var M_offset_i = M[offset_i]; + + M[offset_i] = ( + (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | + (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00) + ); + } + + // Shortcuts + var H = this._hash.words; + + var M_offset_0 = M[offset + 0]; + var M_offset_1 = M[offset + 1]; + var M_offset_2 = M[offset + 2]; + var M_offset_3 = M[offset + 3]; + var M_offset_4 = M[offset + 4]; + var M_offset_5 = M[offset + 5]; + var M_offset_6 = M[offset + 6]; + var M_offset_7 = M[offset + 7]; + var M_offset_8 = M[offset + 8]; + var M_offset_9 = M[offset + 9]; + var M_offset_10 = M[offset + 10]; + var M_offset_11 = M[offset + 11]; + var M_offset_12 = M[offset + 12]; + var M_offset_13 = M[offset + 13]; + var M_offset_14 = M[offset + 14]; + var M_offset_15 = M[offset + 15]; + + // Working varialbes + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + + // Computation + a = FF(a, b, c, d, M_offset_0, 7, T[0]); + d = FF(d, a, b, c, M_offset_1, 12, T[1]); + c = FF(c, d, a, b, M_offset_2, 17, T[2]); + b = FF(b, c, d, a, M_offset_3, 22, T[3]); + a = FF(a, b, c, d, M_offset_4, 7, T[4]); + d = FF(d, a, b, c, M_offset_5, 12, T[5]); + c = FF(c, d, a, b, M_offset_6, 17, T[6]); + b = FF(b, c, d, a, M_offset_7, 22, T[7]); + a = FF(a, b, c, d, M_offset_8, 7, T[8]); + d = FF(d, a, b, c, M_offset_9, 12, T[9]); + c = FF(c, d, a, b, M_offset_10, 17, T[10]); + b = FF(b, c, d, a, M_offset_11, 22, T[11]); + a = FF(a, b, c, d, M_offset_12, 7, T[12]); + d = FF(d, a, b, c, M_offset_13, 12, T[13]); + c = FF(c, d, a, b, M_offset_14, 17, T[14]); + b = FF(b, c, d, a, M_offset_15, 22, T[15]); + + a = GG(a, b, c, d, M_offset_1, 5, T[16]); + d = GG(d, a, b, c, M_offset_6, 9, T[17]); + c = GG(c, d, a, b, M_offset_11, 14, T[18]); + b = GG(b, c, d, a, M_offset_0, 20, T[19]); + a = GG(a, b, c, d, M_offset_5, 5, T[20]); + d = GG(d, a, b, c, M_offset_10, 9, T[21]); + c = GG(c, d, a, b, M_offset_15, 14, T[22]); + b = GG(b, c, d, a, M_offset_4, 20, T[23]); + a = GG(a, b, c, d, M_offset_9, 5, T[24]); + d = GG(d, a, b, c, M_offset_14, 9, T[25]); + c = GG(c, d, a, b, M_offset_3, 14, T[26]); + b = GG(b, c, d, a, M_offset_8, 20, T[27]); + a = GG(a, b, c, d, M_offset_13, 5, T[28]); + d = GG(d, a, b, c, M_offset_2, 9, T[29]); + c = GG(c, d, a, b, M_offset_7, 14, T[30]); + b = GG(b, c, d, a, M_offset_12, 20, T[31]); + + a = HH(a, b, c, d, M_offset_5, 4, T[32]); + d = HH(d, a, b, c, M_offset_8, 11, T[33]); + c = HH(c, d, a, b, M_offset_11, 16, T[34]); + b = HH(b, c, d, a, M_offset_14, 23, T[35]); + a = HH(a, b, c, d, M_offset_1, 4, T[36]); + d = HH(d, a, b, c, M_offset_4, 11, T[37]); + c = HH(c, d, a, b, M_offset_7, 16, T[38]); + b = HH(b, c, d, a, M_offset_10, 23, T[39]); + a = HH(a, b, c, d, M_offset_13, 4, T[40]); + d = HH(d, a, b, c, M_offset_0, 11, T[41]); + c = HH(c, d, a, b, M_offset_3, 16, T[42]); + b = HH(b, c, d, a, M_offset_6, 23, T[43]); + a = HH(a, b, c, d, M_offset_9, 4, T[44]); + d = HH(d, a, b, c, M_offset_12, 11, T[45]); + c = HH(c, d, a, b, M_offset_15, 16, T[46]); + b = HH(b, c, d, a, M_offset_2, 23, T[47]); + + a = II(a, b, c, d, M_offset_0, 6, T[48]); + d = II(d, a, b, c, M_offset_7, 10, T[49]); + c = II(c, d, a, b, M_offset_14, 15, T[50]); + b = II(b, c, d, a, M_offset_5, 21, T[51]); + a = II(a, b, c, d, M_offset_12, 6, T[52]); + d = II(d, a, b, c, M_offset_3, 10, T[53]); + c = II(c, d, a, b, M_offset_10, 15, T[54]); + b = II(b, c, d, a, M_offset_1, 21, T[55]); + a = II(a, b, c, d, M_offset_8, 6, T[56]); + d = II(d, a, b, c, M_offset_15, 10, T[57]); + c = II(c, d, a, b, M_offset_6, 15, T[58]); + b = II(b, c, d, a, M_offset_13, 21, T[59]); + a = II(a, b, c, d, M_offset_4, 6, T[60]); + d = II(d, a, b, c, M_offset_11, 10, T[61]); + c = II(c, d, a, b, M_offset_2, 15, T[62]); + b = II(b, c, d, a, M_offset_9, 21, T[63]); + + // Intermediate hash value + H[0] = (H[0] + a) | 0; + H[1] = (H[1] + b) | 0; + H[2] = (H[2] + c) | 0; + H[3] = (H[3] + d) | 0; + }, + + _doFinalize: function () { + // Shortcuts + var data = this._data; + var dataWords = data.words; + + var nBitsTotal = this._nDataBytes * 8; + var nBitsLeft = data.sigBytes * 8; + + // Add padding + dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); + + var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); + var nBitsTotalL = nBitsTotal; + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( + (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | + (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00) + ); + dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( + (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | + (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00) + ); + + data.sigBytes = (dataWords.length + 1) * 4; + + // Hash final blocks + this._process(); + + // Shortcuts + var hash = this._hash; + var H = hash.words; + + // Swap endian + for (var i = 0; i < 4; i++) { + // Shortcut + var H_i = H[i]; + + H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | + (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); + } + + // Return final computed hash + return hash; + }, + + clone: function () { + var clone = Hasher.clone.call(this); + clone._hash = this._hash.clone(); + + return clone; + } + }); + + function FF(a, b, c, d, x, s, t) { + var n = a + ((b & c) | (~b & d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function GG(a, b, c, d, x, s, t) { + var n = a + ((b & d) | (c & ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function HH(a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + function II(a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + x + t; + return ((n << s) | (n >>> (32 - s))) + b; + } + + /** + * Shortcut function to the hasher's object interface. + * + * @param {WordArray|string} message The message to hash. + * + * @return {WordArray} The hash. + * + * @static + * + * @example + * + * var hash = CryptoJS.MD5('message'); + * var hash = CryptoJS.MD5(wordArray); + */ + C.MD5 = Hasher._createHelper(MD5); + + /** + * Shortcut function to the HMAC's object interface. + * + * @param {WordArray|string} message The message to hash. + * @param {WordArray|string} key The secret key. + * + * @return {WordArray} The HMAC. + * + * @static + * + * @example + * + * var hmac = CryptoJS.HmacMD5(message, key); + */ + C.HmacMD5 = Hasher._createHmacHelper(MD5); +}(Math)); diff --git a/yunshop-front-master/public/static/app/fixifmheight.js b/yunshop-front-master/public/static/app/fixifmheight.js new file mode 100644 index 0000000..7520b1d --- /dev/null +++ b/yunshop-front-master/public/static/app/fixifmheight.js @@ -0,0 +1,7 @@ + +(function(){var each=function(ary,cb){var key=0;if(ary&&ary.length){while(ary[key]){if(false===cb.call(ary[key],ary[key],key)){return;} + key+=1;}}},gW=function(a){var b='width',c,d,e;if(document.defaultView&&document.defaultView.getComputedStyle){b=b.replace(/([A-Z]|^ms)/g,"-$1").toLowerCase();if((d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))){c=e.getPropertyValue(b)} + return c}else if(document.documentElement.currentStyle){d=a.currentStyle&&a.currentStyle[b];e=a.style;if(d===null&&e&&(c=e[b])){d=c} + return d}};setTimeout(function(){each(document.getElementsByTagName('iframe'),function(ifm){var ifmSrc=(ifm.src||'').toLowerCase();if(ifmSrc.indexOf('play.video.qcloud.com')<0&&ifmSrc.indexOf('playvideo.qcloud.com')<0){return;} + var search=ifm.src,map={};each((search.split('?')[1]||'').split('&'),function(str){var sp=str.split('=');map[sp[0]]=sp[1];});if(!!map['$fileid']){var tw=(gW(ifm)+'').toLowerCase().replace('px','')-0;if(tw>1){if(tw>map['$sw']){tw=map['$sw']-0;} + var pureGH=tw*(map['$sh']/map['$sw']);ifm.height=pureGH>190?(pureGH|0):190;}}});},300);})();/* |xGv00|a0b12c29b3a13431306c9a14bac6af98 */ diff --git a/yunshop-front-master/public/static/app/flutter-hearts-zmt.js b/yunshop-front-master/public/static/app/flutter-hearts-zmt.js new file mode 100644 index 0000000..aa4c4cf --- /dev/null +++ b/yunshop-front-master/public/static/app/flutter-hearts-zmt.js @@ -0,0 +1,159 @@ +/** + * @ProjectName flutter-hearts-zmt + * @Version 0.0.0 + * @Author Jiangshilong(https://github.com/JSL8023) + * @Update 2018-03-22 17:24 pm + */ +! function(t, e) { + "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.BubbleHearts = e() +}(this, function() { + "use strict"; + + function t(t, n, r) { + var i = e.uniformDiscrete(89, 91) / 100, + o = 1 - i, + u = (e.uniformDiscrete(45, 60) + e.uniformDiscrete(45, 60)) / 100, + a = function(t) { + return t > i ? Math.max(((1 - t) / o).toFixed(2), .1) * u : u + }, + c = e.uniformDiscrete(-30, 30), + f = function(t) { + return c + }, + h = 10, + s = n.width / 2 + e.uniformDiscrete(-h, h), + d = (n.width - Math.sqrt(Math.pow(t.width, 2) + Math.pow(t.height, 2))) / 2 - h, + l = e.uniformDiscrete(.8 * d, d) * (e.uniformDiscrete(0, 1) ? 1 : -1), + m = e.uniformDiscrete(250, 400), + w = function(t) { + return t > i ? s : s + l * Math.sin(m * (i - t) * Math.PI / 180) + }, + v = function(e) { + return t.height / 2 + (n.height - t.height / 2) * e + }, + p = e.uniformDiscrete(14, 18) / 100, + g = function(t) { + return t > p ? 1 : 1 - ((p - t) / p).toFixed(2) + }; + return function(e) { + if(!(e >= 0)) return !0; + r.save(); + var n = a(e), + i = f(e), + o = w(e), + u = v(e); + r.translate(o, u), r.scale(n, n), r.rotate(i * Math.PI / 180), r.globalAlpha = g(e), r.drawImage(t, -t.width / 2, -t.height / 2, 30, 30), r.restore() + } + } + var e = function(t) { + var e = t, + n = Math.floor, + r = Math.random; + return t.uniform = function(t, e) { + return t + (e - t) * r() + }, t.uniformDiscrete = function(t, r) { + return t + n((r - t + 1) * e.uniform(0, 1)) + }, t + }({}), + n = function(t, e) { + if(!(t instanceof e)) throw new TypeError("Cannot call a class as a function") + }, + r = function() { + function t(t, e) { + for(var n = 0; n < e.length; n++) { + var r = e[n]; + r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r) + } + } + return function(e, n, r) { + return n && t(e.prototype, n), r && t(e, r), e + } + }(), + i = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(t) { + return setTimeout(t, 16) + }, + o = function() { + function o() { + n(this, o); + var t = this.canvas = document.getElementById('likeId'), + e = this.context = t.getContext("2d"), + r = this._children = [], + u = function n() { + i(n), e.clearRect(0, 0, t.width, t.height); + for(var o = 0, u = r.length; o < u;) { + var a = r[o]; + a.render.call(null, (a.timestamp + a.duration - new Date) / a.duration) ? (r.splice(o, 1), u--) : o++ + } + }; + i(u) + } + return r(o, [{ + key: "bubble", + value: function(n) { + var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e.uniformDiscrete(2400, 3600), + i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : t(n, this.canvas, this.context); + return this._children.push({ + render: i, + duration: r, + timestamp: +new Date + }), this + } + }]), o + }(); + return o +}); +// 图片地址在此处更换 可换成你的图片 +var bg = document.getElementById('canvasImg'); +console.log("sssssssssssssssssssss",bg) +var assets = [ + bg.src +]; +assets.forEach(function(src, index) { + assets[index] = new Promise(function(resolve) { + var img = new Image(); + img.onload = resolve.bind(null, img); + img.src = src; + }); +}); + +Promise.all(assets).then(function(images) { + var random = { + uniform: function(min, max) { + return min + (max - min) * Math.random(); + }, + uniformDiscrete: function(i, j) { + return i + Math.floor((j - i + 1) * random.uniform(0, 1)); + }, + }; + var stage = new BubbleHearts(); + var canvas = stage.canvas; + // canvas.width = 170; + // canvas.height = 300; + // canvas.style['width'] = '170px'; + // canvas.style['height'] = '300px'; + // document.body.appendChild(canvas); + //journal-reward 为触发的按钮 + document.getElementsByClassName('journal-reward')[0].addEventListener('click', function() { + //随机飘动 + stage.bubble(images[random.uniformDiscrete(0, images.length - 1)]); + + //垂直向上飘动效果 + // let image = images[random.uniformDiscrete(0, images.length - 1)]; + // stage.bubble(image, 3000, function(lifespan) { + // if(lifespan >= 0) { + // stage.context.drawImage( + // image, + // (canvas.width - image.width) / 2, + // (canvas.height - image.height) * lifespan, + // image.width, + // image.height + // ); + // } else { + // return true; + // } + // }); + }, false); + +}).catch((error) => { + console.log('失败 了 ') +}); diff --git a/yunshop-front-master/public/static/app/gov_province_city_area_id.js b/yunshop-front-master/public/static/app/gov_province_city_area_id.js new file mode 100644 index 0000000..2cb7e84 --- /dev/null +++ b/yunshop-front-master/public/static/app/gov_province_city_area_id.js @@ -0,0 +1 @@ +var district =[{"v":110000,"n":"北京","c":[{"v":110100,"n":"北京市","c":[{"v":110101,"n":"东城区","c":[]},{"v":110102,"n":"西城区","c":[]},{"v":110105,"n":"朝阳区","c":[]},{"v":110106,"n":"丰台区","c":[]},{"v":110107,"n":"石景山区","c":[]},{"v":110108,"n":"海淀区","c":[]},{"v":110109,"n":"门头沟区","c":[]},{"v":110111,"n":"房山区","c":[]},{"v":110112,"n":"通州区","c":[]},{"v":110113,"n":"顺义区","c":[]},{"v":110114,"n":"昌平区","c":[]},{"v":110115,"n":"大兴区","c":[]},{"v":110116,"n":"怀柔区","c":[]},{"v":110117,"n":"平谷区","c":[]},{"v":110228,"n":"密云县","c":[]},{"v":110229,"n":"延庆县","c":[]}]}]},{"v":120000,"n":"天津","c":[{"v":120100,"n":"天津市","c":[{"v":120101,"n":"和平区","c":[]},{"v":120102,"n":"河东区","c":[]},{"v":120103,"n":"河西区","c":[]},{"v":120104,"n":"南开区","c":[]},{"v":120105,"n":"河北区","c":[]},{"v":120106,"n":"红桥区","c":[]},{"v":120110,"n":"东丽区","c":[]},{"v":120111,"n":"西青区","c":[]},{"v":120112,"n":"津南区","c":[]},{"v":120113,"n":"北辰区","c":[]},{"v":120114,"n":"武清区","c":[]},{"v":120115,"n":"宝坻区","c":[]},{"v":120116,"n":"滨海新区","c":[]},{"v":120221,"n":"宁河县","c":[]},{"v":120223,"n":"静海县","c":[]},{"v":120225,"n":"蓟县","c":[]}]}]},{"v":130000,"n":"河北省","c":[{"v":130100,"n":"石家庄市","c":[{"v":130102,"n":"长安区","c":[]},{"v":130103,"n":"桥东区","c":[]},{"v":130104,"n":"桥西区","c":[]},{"v":130105,"n":"新华区","c":[]},{"v":130107,"n":"井陉矿区","c":[]},{"v":130108,"n":"裕华区","c":[]},{"v":130121,"n":"井陉县","c":[]},{"v":130123,"n":"正定县","c":[]},{"v":130124,"n":"栾城县","c":[]},{"v":130125,"n":"行唐县","c":[]},{"v":130126,"n":"灵寿县","c":[]},{"v":130127,"n":"高邑县","c":[]},{"v":130128,"n":"深泽县","c":[]},{"v":130129,"n":"赞皇县","c":[]},{"v":130130,"n":"无极县","c":[]},{"v":130131,"n":"平山县","c":[]},{"v":130132,"n":"元氏县","c":[]},{"v":130133,"n":"赵县","c":[]},{"v":130181,"n":"辛集市","c":[]},{"v":130182,"n":"藁城市","c":[]},{"v":130183,"n":"晋州市","c":[]},{"v":130184,"n":"新乐市","c":[]},{"v":130185,"n":"鹿泉市","c":[]}]},{"v":130200,"n":"唐山市","c":[{"v":130202,"n":"路南区","c":[]},{"v":130203,"n":"路北区","c":[]},{"v":130204,"n":"古冶区","c":[]},{"v":130205,"n":"开平区","c":[]},{"v":130207,"n":"丰南区","c":[]},{"v":130208,"n":"丰润区","c":[]},{"v":130223,"n":"滦县","c":[]},{"v":130224,"n":"滦南县","c":[]},{"v":130225,"n":"乐亭县","c":[]},{"v":130227,"n":"迁西县","c":[]},{"v":130229,"n":"玉田县","c":[]},{"v":130230,"n":"曹妃甸区","c":[]},{"v":130281,"n":"遵化市","c":[]},{"v":130283,"n":"迁安市","c":[]}]},{"v":130300,"n":"秦皇岛市","c":[{"v":130302,"n":"海港区","c":[]},{"v":130303,"n":"山海关区","c":[]},{"v":130304,"n":"北戴河区","c":[]},{"v":130321,"n":"青龙满族自治县","c":[]},{"v":130322,"n":"昌黎县","c":[]},{"v":130323,"n":"抚宁县","c":[]},{"v":130324,"n":"卢龙县","c":[]}]},{"v":130400,"n":"邯郸市","c":[{"v":130402,"n":"邯山区","c":[]},{"v":130403,"n":"丛台区","c":[]},{"v":130404,"n":"复兴区","c":[]},{"v":130406,"n":"峰峰矿区","c":[]},{"v":130421,"n":"邯郸县","c":[]},{"v":130423,"n":"临漳县","c":[]},{"v":130424,"n":"成安县","c":[]},{"v":130425,"n":"大名县","c":[]},{"v":130426,"n":"涉县","c":[]},{"v":130427,"n":"磁县","c":[]},{"v":130428,"n":"肥乡县","c":[]},{"v":130429,"n":"永年县","c":[]},{"v":130430,"n":"邱县","c":[]},{"v":130431,"n":"鸡泽县","c":[]},{"v":130432,"n":"广平县","c":[]},{"v":130433,"n":"馆陶县","c":[]},{"v":130434,"n":"魏县","c":[]},{"v":130435,"n":"曲周县","c":[]},{"v":130481,"n":"武安市","c":[]}]},{"v":130500,"n":"邢台市","c":[{"v":130502,"n":"桥东区","c":[]},{"v":130503,"n":"桥西区","c":[]},{"v":130521,"n":"邢台县","c":[]},{"v":130522,"n":"临城县","c":[]},{"v":130523,"n":"内丘县","c":[]},{"v":130524,"n":"柏乡县","c":[]},{"v":130525,"n":"隆尧县","c":[]},{"v":130526,"n":"任县","c":[]},{"v":130527,"n":"南和县","c":[]},{"v":130528,"n":"宁晋县","c":[]},{"v":130529,"n":"巨鹿县","c":[]},{"v":130530,"n":"新河县","c":[]},{"v":130531,"n":"广宗县","c":[]},{"v":130532,"n":"平乡县","c":[]},{"v":130533,"n":"威县","c":[]},{"v":130534,"n":"清河县","c":[]},{"v":130535,"n":"临西县","c":[]},{"v":130581,"n":"南宫市","c":[]},{"v":130582,"n":"沙河市","c":[]}]},{"v":130600,"n":"保定市","c":[{"v":130602,"n":"新市区","c":[]},{"v":130603,"n":"北市区","c":[]},{"v":130604,"n":"南市区","c":[]},{"v":130621,"n":"满城县","c":[]},{"v":130622,"n":"清苑县","c":[]},{"v":130623,"n":"涞水县","c":[]},{"v":130624,"n":"阜平县","c":[]},{"v":130625,"n":"徐水县","c":[]},{"v":130626,"n":"定兴县","c":[]},{"v":130627,"n":"唐县","c":[]},{"v":130628,"n":"高阳县","c":[]},{"v":130629,"n":"容城县","c":[]},{"v":130630,"n":"涞源县","c":[]},{"v":130631,"n":"望都县","c":[]},{"v":130632,"n":"安新县","c":[]},{"v":130633,"n":"易县","c":[]},{"v":130634,"n":"曲阳县","c":[]},{"v":130635,"n":"蠡县","c":[]},{"v":130636,"n":"顺平县","c":[]},{"v":130637,"n":"博野县","c":[]},{"v":130638,"n":"雄县","c":[]},{"v":130681,"n":"涿州市","c":[]},{"v":130682,"n":"定州市","c":[]},{"v":130683,"n":"安国市","c":[]},{"v":130684,"n":"高碑店市","c":[]}]},{"v":130700,"n":"张家口市","c":[{"v":130702,"n":"桥东区","c":[]},{"v":130703,"n":"桥西区","c":[]},{"v":130705,"n":"宣化区","c":[]},{"v":130706,"n":"下花园区","c":[]},{"v":130721,"n":"宣化县","c":[]},{"v":130722,"n":"张北县","c":[]},{"v":130723,"n":"康保县","c":[]},{"v":130724,"n":"沽源县","c":[]},{"v":130725,"n":"尚义县","c":[]},{"v":130726,"n":"蔚县","c":[]},{"v":130727,"n":"阳原县","c":[]},{"v":130728,"n":"怀安县","c":[]},{"v":130729,"n":"万全县","c":[]},{"v":130730,"n":"怀来县","c":[]},{"v":130731,"n":"涿鹿县","c":[]},{"v":130732,"n":"赤城县","c":[]},{"v":130733,"n":"崇礼县","c":[]}]},{"v":130800,"n":"承德市","c":[{"v":130802,"n":"双桥区","c":[]},{"v":130803,"n":"双滦区","c":[]},{"v":130804,"n":"鹰手营子矿区","c":[]},{"v":130821,"n":"承德县","c":[]},{"v":130822,"n":"兴隆县","c":[]},{"v":130823,"n":"平泉县","c":[]},{"v":130824,"n":"滦平县","c":[]},{"v":130825,"n":"隆化县","c":[]},{"v":130826,"n":"丰宁满族自治县","c":[]},{"v":130827,"n":"宽城满族自治县","c":[]},{"v":130828,"n":"围场满族蒙古族自治县","c":[]}]},{"v":130900,"n":"沧州市","c":[{"v":130902,"n":"新华区","c":[]},{"v":130903,"n":"运河区","c":[]},{"v":130921,"n":"沧县","c":[]},{"v":130922,"n":"青县","c":[]},{"v":130923,"n":"东光县","c":[]},{"v":130924,"n":"海兴县","c":[]},{"v":130925,"n":"盐山县","c":[]},{"v":130926,"n":"肃宁县","c":[]},{"v":130927,"n":"南皮县","c":[]},{"v":130928,"n":"吴桥县","c":[]},{"v":130929,"n":"献县","c":[]},{"v":130930,"n":"孟村回族自治县","c":[]},{"v":130981,"n":"泊头市","c":[]},{"v":130982,"n":"任丘市","c":[]},{"v":130983,"n":"黄骅市","c":[]},{"v":130984,"n":"河间市","c":[]}]},{"v":131000,"n":"廊坊市","c":[{"v":131002,"n":"安次区","c":[]},{"v":131003,"n":"广阳区","c":[]},{"v":131022,"n":"固安县","c":[]},{"v":131023,"n":"永清县","c":[]},{"v":131024,"n":"香河县","c":[]},{"v":131025,"n":"大城县","c":[]},{"v":131026,"n":"文安县","c":[]},{"v":131028,"n":"大厂回族自治县","c":[]},{"v":131081,"n":"霸州市","c":[]},{"v":131082,"n":"三河市","c":[]}]},{"v":131100,"n":"衡水市","c":[{"v":131102,"n":"桃城区","c":[]},{"v":131121,"n":"枣强县","c":[]},{"v":131122,"n":"武邑县","c":[]},{"v":131123,"n":"武强县","c":[]},{"v":131124,"n":"饶阳县","c":[]},{"v":131125,"n":"安平县","c":[]},{"v":131126,"n":"故城县","c":[]},{"v":131127,"n":"景县","c":[]},{"v":131128,"n":"阜城县","c":[]},{"v":131181,"n":"冀州市","c":[]},{"v":131182,"n":"深州市","c":[]}]}]},{"v":140000,"n":"山西省","c":[{"v":140100,"n":"太原市","c":[{"v":140105,"n":"小店区","c":[]},{"v":140106,"n":"迎泽区","c":[]},{"v":140107,"n":"杏花岭区","c":[]},{"v":140108,"n":"尖草坪区","c":[]},{"v":140109,"n":"万柏林区","c":[]},{"v":140110,"n":"晋源区","c":[]},{"v":140121,"n":"清徐县","c":[]},{"v":140122,"n":"阳曲县","c":[]},{"v":140123,"n":"娄烦县","c":[]},{"v":140181,"n":"古交市","c":[]}]},{"v":140200,"n":"大同市","c":[{"v":140202,"n":"城区","c":[]},{"v":140203,"n":"矿区","c":[]},{"v":140211,"n":"南郊区","c":[]},{"v":140212,"n":"新荣区","c":[]},{"v":140221,"n":"阳高县","c":[]},{"v":140222,"n":"天镇县","c":[]},{"v":140223,"n":"广灵县","c":[]},{"v":140224,"n":"灵丘县","c":[]},{"v":140225,"n":"浑源县","c":[]},{"v":140226,"n":"左云县","c":[]},{"v":140227,"n":"大同县","c":[]}]},{"v":140300,"n":"阳泉市","c":[{"v":140302,"n":"城区","c":[]},{"v":140303,"n":"矿区","c":[]},{"v":140311,"n":"郊区","c":[]},{"v":140321,"n":"平定县","c":[]},{"v":140322,"n":"盂县","c":[]}]},{"v":140400,"n":"长治市","c":[{"v":140421,"n":"长治县","c":[]},{"v":140423,"n":"襄垣县","c":[]},{"v":140424,"n":"屯留县","c":[]},{"v":140425,"n":"平顺县","c":[]},{"v":140426,"n":"黎城县","c":[]},{"v":140427,"n":"壶关县","c":[]},{"v":140428,"n":"长子县","c":[]},{"v":140429,"n":"武乡县","c":[]},{"v":140430,"n":"沁县","c":[]},{"v":140431,"n":"沁源县","c":[]},{"v":140481,"n":"潞城市","c":[]},{"v":140482,"n":"城区","c":[]},{"v":140483,"n":"郊区","c":[]}]},{"v":140500,"n":"晋城市","c":[{"v":140502,"n":"城区","c":[]},{"v":140521,"n":"沁水县","c":[]},{"v":140522,"n":"阳城县","c":[]},{"v":140524,"n":"陵川县","c":[]},{"v":140525,"n":"泽州县","c":[]},{"v":140581,"n":"高平市","c":[]}]},{"v":140600,"n":"朔州市","c":[{"v":140602,"n":"朔城区","c":[]},{"v":140603,"n":"平鲁区","c":[]},{"v":140621,"n":"山阴县","c":[]},{"v":140622,"n":"应县","c":[]},{"v":140623,"n":"右玉县","c":[]},{"v":140624,"n":"怀仁县","c":[]}]},{"v":140700,"n":"晋中市","c":[{"v":140702,"n":"榆次区","c":[]},{"v":140721,"n":"榆社县","c":[]},{"v":140722,"n":"左权县","c":[]},{"v":140723,"n":"和顺县","c":[]},{"v":140724,"n":"昔阳县","c":[]},{"v":140725,"n":"寿阳县","c":[]},{"v":140726,"n":"太谷县","c":[]},{"v":140727,"n":"祁县","c":[]},{"v":140728,"n":"平遥县","c":[]},{"v":140729,"n":"灵石县","c":[]},{"v":140781,"n":"介休市","c":[]}]},{"v":140800,"n":"运城市","c":[{"v":140802,"n":"盐湖区","c":[]},{"v":140821,"n":"临猗县","c":[]},{"v":140822,"n":"万荣县","c":[]},{"v":140823,"n":"闻喜县","c":[]},{"v":140824,"n":"稷山县","c":[]},{"v":140825,"n":"新绛县","c":[]},{"v":140826,"n":"绛县","c":[]},{"v":140827,"n":"垣曲县","c":[]},{"v":140828,"n":"夏县","c":[]},{"v":140829,"n":"平陆县","c":[]},{"v":140830,"n":"芮城县","c":[]},{"v":140881,"n":"永济市","c":[]},{"v":140882,"n":"河津市","c":[]}]},{"v":140900,"n":"忻州市","c":[{"v":140902,"n":"忻府区","c":[]},{"v":140921,"n":"定襄县","c":[]},{"v":140922,"n":"五台县","c":[]},{"v":140923,"n":"代县","c":[]},{"v":140924,"n":"繁峙县","c":[]},{"v":140925,"n":"宁武县","c":[]},{"v":140926,"n":"静乐县","c":[]},{"v":140927,"n":"神池县","c":[]},{"v":140928,"n":"五寨县","c":[]},{"v":140929,"n":"岢岚县","c":[]},{"v":140930,"n":"河曲县","c":[]},{"v":140931,"n":"保德县","c":[]},{"v":140932,"n":"偏关县","c":[]},{"v":140981,"n":"原平市","c":[]}]},{"v":141000,"n":"临汾市","c":[{"v":141002,"n":"尧都区","c":[]},{"v":141021,"n":"曲沃县","c":[]},{"v":141022,"n":"翼城县","c":[]},{"v":141023,"n":"襄汾县","c":[]},{"v":141024,"n":"洪洞县","c":[]},{"v":141025,"n":"古县","c":[]},{"v":141026,"n":"安泽县","c":[]},{"v":141027,"n":"浮山县","c":[]},{"v":141028,"n":"吉县","c":[]},{"v":141029,"n":"乡宁县","c":[]},{"v":141030,"n":"大宁县","c":[]},{"v":141031,"n":"隰县","c":[]},{"v":141032,"n":"永和县","c":[]},{"v":141033,"n":"蒲县","c":[]},{"v":141034,"n":"汾西县","c":[]},{"v":141081,"n":"侯马市","c":[]},{"v":141082,"n":"霍州市","c":[]}]},{"v":141100,"n":"吕梁市","c":[{"v":141102,"n":"离石区","c":[]},{"v":141121,"n":"文水县","c":[]},{"v":141122,"n":"交城县","c":[]},{"v":141123,"n":"兴县","c":[]},{"v":141124,"n":"临县","c":[]},{"v":141125,"n":"柳林县","c":[]},{"v":141126,"n":"石楼县","c":[]},{"v":141127,"n":"岚县","c":[]},{"v":141128,"n":"方山县","c":[]},{"v":141129,"n":"中阳县","c":[]},{"v":141130,"n":"交口县","c":[]},{"v":141181,"n":"孝义市","c":[]},{"v":141182,"n":"汾阳市","c":[]}]}]},{"v":150000,"n":"内蒙古自治区","c":[{"v":150100,"n":"呼和浩特市","c":[{"v":150102,"n":"新城区","c":[]},{"v":150103,"n":"回民区","c":[]},{"v":150104,"n":"玉泉区","c":[]},{"v":150105,"n":"赛罕区","c":[]},{"v":150121,"n":"土默特左旗","c":[]},{"v":150122,"n":"托克托县","c":[]},{"v":150123,"n":"和林格尔县","c":[]},{"v":150124,"n":"清水河县","c":[]},{"v":150125,"n":"武川县","c":[]}]},{"v":150200,"n":"包头市","c":[{"v":150202,"n":"东河区","c":[]},{"v":150203,"n":"昆都仑区","c":[]},{"v":150204,"n":"青山区","c":[]},{"v":150205,"n":"石拐区","c":[]},{"v":150206,"n":"白云鄂博矿区","c":[]},{"v":150207,"n":"九原区","c":[]},{"v":150221,"n":"土默特右旗","c":[]},{"v":150222,"n":"固阳县","c":[]},{"v":150223,"n":"达尔罕茂明安联合旗","c":[]}]},{"v":150300,"n":"乌海市","c":[{"v":150302,"n":"海勃湾区","c":[]},{"v":150303,"n":"海南区","c":[]},{"v":150304,"n":"乌达区","c":[]}]},{"v":150400,"n":"赤峰市","c":[{"v":150402,"n":"红山区","c":[]},{"v":150403,"n":"元宝山区","c":[]},{"v":150404,"n":"松山区","c":[]},{"v":150421,"n":"阿鲁科尔沁旗","c":[]},{"v":150422,"n":"巴林左旗","c":[]},{"v":150423,"n":"巴林右旗","c":[]},{"v":150424,"n":"林西县","c":[]},{"v":150425,"n":"克什克腾旗","c":[]},{"v":150426,"n":"翁牛特旗","c":[]},{"v":150428,"n":"喀喇沁旗","c":[]},{"v":150429,"n":"宁城县","c":[]},{"v":150430,"n":"敖汉旗","c":[]}]},{"v":150500,"n":"通辽市","c":[{"v":150502,"n":"科尔沁区","c":[]},{"v":150521,"n":"科尔沁左翼中旗","c":[]},{"v":150522,"n":"科尔沁左翼后旗","c":[]},{"v":150523,"n":"开鲁县","c":[]},{"v":150524,"n":"库伦旗","c":[]},{"v":150525,"n":"奈曼旗","c":[]},{"v":150526,"n":"扎鲁特旗","c":[]},{"v":150581,"n":"霍林郭勒市","c":[]}]},{"v":150600,"n":"鄂尔多斯市","c":[{"v":150602,"n":"东胜区","c":[]},{"v":150621,"n":"达拉特旗","c":[]},{"v":150622,"n":"准格尔旗","c":[]},{"v":150623,"n":"鄂托克前旗","c":[]},{"v":150624,"n":"鄂托克旗","c":[]},{"v":150625,"n":"杭锦旗","c":[]},{"v":150626,"n":"乌审旗","c":[]},{"v":150627,"n":"伊金霍洛旗","c":[]}]},{"v":150700,"n":"呼伦贝尔市","c":[{"v":150702,"n":"海拉尔区","c":[]},{"v":150703,"n":"扎赉诺尔区","c":[]},{"v":150721,"n":"阿荣旗","c":[]},{"v":150722,"n":"莫力达瓦达斡尔族自治旗","c":[]},{"v":150723,"n":"鄂伦春自治旗","c":[]},{"v":150724,"n":"鄂温克族自治旗","c":[]},{"v":150725,"n":"陈巴尔虎旗","c":[]},{"v":150726,"n":"新巴尔虎左旗","c":[]},{"v":150727,"n":"新巴尔虎右旗","c":[]},{"v":150781,"n":"满洲里市","c":[]},{"v":150782,"n":"牙克石市","c":[]},{"v":150783,"n":"扎兰屯市","c":[]},{"v":150784,"n":"额尔古纳市","c":[]},{"v":150785,"n":"根河市","c":[]}]},{"v":150800,"n":"巴彦淖尔市","c":[{"v":150802,"n":"临河区","c":[]},{"v":150821,"n":"五原县","c":[]},{"v":150822,"n":"磴口县","c":[]},{"v":150823,"n":"乌拉特前旗","c":[]},{"v":150824,"n":"乌拉特中旗","c":[]},{"v":150825,"n":"乌拉特后旗","c":[]},{"v":150826,"n":"杭锦后旗","c":[]}]},{"v":150900,"n":"乌兰察布市","c":[{"v":150902,"n":"集宁区","c":[]},{"v":150921,"n":"卓资县","c":[]},{"v":150922,"n":"化德县","c":[]},{"v":150923,"n":"商都县","c":[]},{"v":150924,"n":"兴和县","c":[]},{"v":150925,"n":"凉城县","c":[]},{"v":150926,"n":"察哈尔右翼前旗","c":[]},{"v":150927,"n":"察哈尔右翼中旗","c":[]},{"v":150928,"n":"察哈尔右翼后旗","c":[]},{"v":150929,"n":"四子王旗","c":[]},{"v":150981,"n":"丰镇市","c":[]}]},{"v":152200,"n":"兴安盟","c":[{"v":152201,"n":"乌兰浩特市","c":[]},{"v":152202,"n":"阿尔山市","c":[]},{"v":152221,"n":"科尔沁右翼前旗","c":[]},{"v":152222,"n":"科尔沁右翼中旗","c":[]},{"v":152223,"n":"扎赉特旗","c":[]},{"v":152224,"n":"突泉县","c":[]}]},{"v":152500,"n":"锡林郭勒盟","c":[{"v":152501,"n":"二连浩特市","c":[]},{"v":152502,"n":"锡林浩特市","c":[]},{"v":152522,"n":"阿巴嘎旗","c":[]},{"v":152523,"n":"苏尼特左旗","c":[]},{"v":152524,"n":"苏尼特右旗","c":[]},{"v":152525,"n":"东乌珠穆沁旗","c":[]},{"v":152526,"n":"西乌珠穆沁旗","c":[]},{"v":152527,"n":"太仆寺旗","c":[]},{"v":152528,"n":"镶黄旗","c":[]},{"v":152529,"n":"正镶白旗","c":[]},{"v":152530,"n":"正蓝旗","c":[]},{"v":152531,"n":"多伦县","c":[]}]},{"v":152900,"n":"阿拉善盟","c":[{"v":152921,"n":"阿拉善左旗","c":[]},{"v":152922,"n":"阿拉善右旗","c":[]},{"v":152923,"n":"额济纳旗","c":[]}]}]},{"v":210000,"n":"辽宁省","c":[{"v":210100,"n":"沈阳市","c":[{"v":210102,"n":"和平区","c":[]},{"v":210103,"n":"沈河区","c":[]},{"v":210104,"n":"大东区","c":[]},{"v":210105,"n":"皇姑区","c":[]},{"v":210106,"n":"铁西区","c":[]},{"v":210111,"n":"苏家屯区","c":[]},{"v":210112,"n":"浑南区","c":[]},{"v":210114,"n":"于洪区","c":[]},{"v":210122,"n":"辽中县","c":[]},{"v":210123,"n":"康平县","c":[]},{"v":210124,"n":"法库县","c":[]},{"v":210181,"n":"新民市","c":[]},{"v":210184,"n":"沈北新区","c":[]}]},{"v":210200,"n":"大连市","c":[{"v":210202,"n":"中山区","c":[]},{"v":210203,"n":"西岗区","c":[]},{"v":210204,"n":"沙河口区","c":[]},{"v":210211,"n":"甘井子区","c":[]},{"v":210212,"n":"旅顺口区","c":[]},{"v":210213,"n":"金州区","c":[]},{"v":210224,"n":"长海县","c":[]},{"v":210281,"n":"瓦房店市","c":[]},{"v":210282,"n":"普兰店市","c":[]},{"v":210283,"n":"庄河市","c":[]}]},{"v":210300,"n":"鞍山市","c":[{"v":210302,"n":"铁东区","c":[]},{"v":210303,"n":"铁西区","c":[]},{"v":210304,"n":"立山区","c":[]},{"v":210311,"n":"千山区","c":[]},{"v":210321,"n":"台安县","c":[]},{"v":210323,"n":"岫岩满族自治县","c":[]},{"v":210381,"n":"海城市","c":[]}]},{"v":210400,"n":"抚顺市","c":[{"v":210402,"n":"新抚区","c":[]},{"v":210403,"n":"东洲区","c":[]},{"v":210404,"n":"望花区","c":[]},{"v":210411,"n":"顺城区","c":[]},{"v":210421,"n":"抚顺县","c":[]},{"v":210422,"n":"新宾满族自治县","c":[]},{"v":210423,"n":"清原满族自治县","c":[]}]},{"v":210500,"n":"本溪市","c":[{"v":210502,"n":"平山区","c":[]},{"v":210503,"n":"溪湖区","c":[]},{"v":210504,"n":"明山区","c":[]},{"v":210505,"n":"南芬区","c":[]},{"v":210521,"n":"本溪满族自治县","c":[]},{"v":210522,"n":"桓仁满族自治县","c":[]}]},{"v":210600,"n":"丹东市","c":[{"v":210602,"n":"元宝区","c":[]},{"v":210603,"n":"振兴区","c":[]},{"v":210604,"n":"振安区","c":[]},{"v":210624,"n":"宽甸满族自治县","c":[]},{"v":210681,"n":"东港市","c":[]},{"v":210682,"n":"凤城市","c":[]}]},{"v":210700,"n":"锦州市","c":[{"v":210702,"n":"古塔区","c":[]},{"v":210703,"n":"凌河区","c":[]},{"v":210711,"n":"太和区","c":[]},{"v":210726,"n":"黑山县","c":[]},{"v":210727,"n":"义县","c":[]},{"v":210781,"n":"凌海市","c":[]},{"v":210782,"n":"北镇市","c":[]}]},{"v":210800,"n":"营口市","c":[{"v":210802,"n":"站前区","c":[]},{"v":210803,"n":"西市区","c":[]},{"v":210804,"n":"鲅鱼圈区","c":[]},{"v":210811,"n":"老边区","c":[]},{"v":210881,"n":"盖州市","c":[]},{"v":210882,"n":"大石桥市","c":[]}]},{"v":210900,"n":"阜新市","c":[{"v":210902,"n":"海州区","c":[]},{"v":210903,"n":"新邱区","c":[]},{"v":210904,"n":"太平区","c":[]},{"v":210905,"n":"清河门区","c":[]},{"v":210911,"n":"细河区","c":[]},{"v":210921,"n":"阜新蒙古族自治县","c":[]},{"v":210922,"n":"彰武县","c":[]}]},{"v":211000,"n":"辽阳市","c":[{"v":211002,"n":"白塔区","c":[]},{"v":211003,"n":"文圣区","c":[]},{"v":211004,"n":"宏伟区","c":[]},{"v":211005,"n":"弓长岭区","c":[]},{"v":211011,"n":"太子河区","c":[]},{"v":211021,"n":"辽阳县","c":[]},{"v":211081,"n":"灯塔市","c":[]}]},{"v":211100,"n":"盘锦市","c":[{"v":211102,"n":"双台子区","c":[]},{"v":211103,"n":"兴隆台区","c":[]},{"v":211121,"n":"大洼县","c":[]},{"v":211122,"n":"盘山县","c":[]}]},{"v":211200,"n":"铁岭市","c":[{"v":211202,"n":"银州区","c":[]},{"v":211204,"n":"清河区","c":[]},{"v":211221,"n":"铁岭县","c":[]},{"v":211223,"n":"西丰县","c":[]},{"v":211224,"n":"昌图县","c":[]},{"v":211281,"n":"调兵山市","c":[]},{"v":211282,"n":"开原市","c":[]}]},{"v":211300,"n":"朝阳市","c":[{"v":211302,"n":"双塔区","c":[]},{"v":211303,"n":"龙城区","c":[]},{"v":211321,"n":"朝阳县","c":[]},{"v":211322,"n":"建平县","c":[]},{"v":211324,"n":"喀喇沁左翼蒙古族自治县","c":[]},{"v":211381,"n":"北票市","c":[]},{"v":211382,"n":"凌源市","c":[]}]},{"v":211400,"n":"葫芦岛市","c":[{"v":211402,"n":"连山区","c":[]},{"v":211403,"n":"龙港区","c":[]},{"v":211404,"n":"南票区","c":[]},{"v":211421,"n":"绥中县","c":[]},{"v":211422,"n":"建昌县","c":[]},{"v":211481,"n":"兴城市","c":[]}]}]},{"v":220000,"n":"吉林省","c":[{"v":220100,"n":"长春市","c":[{"v":220102,"n":"南关区","c":[]},{"v":220103,"n":"宽城区","c":[]},{"v":220104,"n":"朝阳区","c":[]},{"v":220105,"n":"二道区","c":[]},{"v":220106,"n":"绿园区","c":[]},{"v":220112,"n":"双阳区","c":[]},{"v":220122,"n":"农安县","c":[]},{"v":220181,"n":"九台市","c":[]},{"v":220182,"n":"榆树市","c":[]},{"v":220183,"n":"德惠市","c":[]}]},{"v":220200,"n":"吉林市","c":[{"v":220202,"n":"昌邑区","c":[]},{"v":220203,"n":"龙潭区","c":[]},{"v":220204,"n":"船营区","c":[]},{"v":220211,"n":"丰满区","c":[]},{"v":220221,"n":"永吉县","c":[]},{"v":220281,"n":"蛟河市","c":[]},{"v":220282,"n":"桦甸市","c":[]},{"v":220283,"n":"舒兰市","c":[]},{"v":220284,"n":"磐石市","c":[]}]},{"v":220300,"n":"四平市","c":[{"v":220302,"n":"铁西区","c":[]},{"v":220303,"n":"铁东区","c":[]},{"v":220322,"n":"梨树县","c":[]},{"v":220323,"n":"伊通满族自治县","c":[]},{"v":220381,"n":"公主岭市","c":[]},{"v":220382,"n":"双辽市","c":[]}]},{"v":220400,"n":"辽源市","c":[{"v":220402,"n":"龙山区","c":[]},{"v":220403,"n":"西安区","c":[]},{"v":220421,"n":"东丰县","c":[]},{"v":220422,"n":"东辽县","c":[]}]},{"v":220500,"n":"通化市","c":[{"v":220502,"n":"东昌区","c":[]},{"v":220503,"n":"二道江区","c":[]},{"v":220521,"n":"通化县","c":[]},{"v":220523,"n":"辉南县","c":[]},{"v":220524,"n":"柳河县","c":[]},{"v":220581,"n":"梅河口市","c":[]},{"v":220582,"n":"集安市","c":[]}]},{"v":220600,"n":"白山市","c":[{"v":220602,"n":"浑江区","c":[]},{"v":220621,"n":"抚松县","c":[]},{"v":220622,"n":"靖宇县","c":[]},{"v":220623,"n":"长白朝鲜族自治县","c":[]},{"v":220625,"n":"江源区","c":[]},{"v":220681,"n":"临江市","c":[]}]},{"v":220700,"n":"松原市","c":[{"v":220702,"n":"宁江区","c":[]},{"v":220721,"n":"前郭尔罗斯蒙古族自治县","c":[]},{"v":220722,"n":"长岭县","c":[]},{"v":220723,"n":"乾安县","c":[]},{"v":220724,"n":"扶余市","c":[]}]},{"v":220800,"n":"白城市","c":[{"v":220802,"n":"洮北区","c":[]},{"v":220821,"n":"镇赉县","c":[]},{"v":220822,"n":"通榆县","c":[]},{"v":220881,"n":"洮南市","c":[]},{"v":220882,"n":"大安市","c":[]}]},{"v":222400,"n":"延边朝鲜族自治州","c":[{"v":222401,"n":"延吉市","c":[]},{"v":222402,"n":"图们市","c":[]},{"v":222403,"n":"敦化市","c":[]},{"v":222404,"n":"珲春市","c":[]},{"v":222405,"n":"龙井市","c":[]},{"v":222406,"n":"和龙市","c":[]},{"v":222424,"n":"汪清县","c":[]},{"v":222426,"n":"安图县","c":[]}]}]},{"v":230000,"n":"黑龙江省","c":[{"v":230100,"n":"哈尔滨市","c":[{"v":230102,"n":"道里区","c":[]},{"v":230103,"n":"南岗区","c":[]},{"v":230104,"n":"道外区","c":[]},{"v":230106,"n":"香坊区","c":[]},{"v":230108,"n":"平房区","c":[]},{"v":230109,"n":"松北区","c":[]},{"v":230111,"n":"呼兰区","c":[]},{"v":230123,"n":"依兰县","c":[]},{"v":230124,"n":"方正县","c":[]},{"v":230125,"n":"宾县","c":[]},{"v":230126,"n":"巴彦县","c":[]},{"v":230127,"n":"木兰县","c":[]},{"v":230128,"n":"通河县","c":[]},{"v":230129,"n":"延寿县","c":[]},{"v":230181,"n":"阿城区","c":[]},{"v":230182,"n":"双城市","c":[]},{"v":230183,"n":"尚志市","c":[]},{"v":230184,"n":"五常市","c":[]}]},{"v":230200,"n":"齐齐哈尔市","c":[{"v":230202,"n":"龙沙区","c":[]},{"v":230203,"n":"建华区","c":[]},{"v":230204,"n":"铁锋区","c":[]},{"v":230205,"n":"昂昂溪区","c":[]},{"v":230206,"n":"富拉尔基区","c":[]},{"v":230207,"n":"碾子山区","c":[]},{"v":230208,"n":"梅里斯达斡尔族区","c":[]},{"v":230221,"n":"龙江县","c":[]},{"v":230223,"n":"依安县","c":[]},{"v":230224,"n":"泰来县","c":[]},{"v":230225,"n":"甘南县","c":[]},{"v":230227,"n":"富裕县","c":[]},{"v":230229,"n":"克山县","c":[]},{"v":230230,"n":"克东县","c":[]},{"v":230231,"n":"拜泉县","c":[]},{"v":230281,"n":"讷河市","c":[]}]},{"v":230300,"n":"鸡西市","c":[{"v":230302,"n":"鸡冠区","c":[]},{"v":230303,"n":"恒山区","c":[]},{"v":230304,"n":"滴道区","c":[]},{"v":230305,"n":"梨树区","c":[]},{"v":230306,"n":"城子河区","c":[]},{"v":230307,"n":"麻山区","c":[]},{"v":230321,"n":"鸡东县","c":[]},{"v":230381,"n":"虎林市","c":[]},{"v":230382,"n":"密山市","c":[]}]},{"v":230400,"n":"鹤岗市","c":[{"v":230402,"n":"向阳区","c":[]},{"v":230403,"n":"工农区","c":[]},{"v":230404,"n":"南山区","c":[]},{"v":230405,"n":"兴安区","c":[]},{"v":230406,"n":"东山区","c":[]},{"v":230407,"n":"兴山区","c":[]},{"v":230421,"n":"萝北县","c":[]},{"v":230422,"n":"绥滨县","c":[]}]},{"v":230500,"n":"双鸭山市","c":[{"v":230502,"n":"尖山区","c":[]},{"v":230503,"n":"岭东区","c":[]},{"v":230505,"n":"四方台区","c":[]},{"v":230506,"n":"宝山区","c":[]},{"v":230521,"n":"集贤县","c":[]},{"v":230522,"n":"友谊县","c":[]},{"v":230523,"n":"宝清县","c":[]},{"v":230524,"n":"饶河县","c":[]}]},{"v":230600,"n":"大庆市","c":[{"v":230602,"n":"萨尔图区","c":[]},{"v":230603,"n":"龙凤区","c":[]},{"v":230604,"n":"让胡路区","c":[]},{"v":230605,"n":"红岗区","c":[]},{"v":230606,"n":"大同区","c":[]},{"v":230621,"n":"肇州县","c":[]},{"v":230622,"n":"肇源县","c":[]},{"v":230623,"n":"林甸县","c":[]},{"v":230624,"n":"杜尔伯特蒙古族自治县","c":[]}]},{"v":230700,"n":"伊春市","c":[{"v":230702,"n":"伊春区","c":[]},{"v":230703,"n":"南岔区","c":[]},{"v":230704,"n":"友好区","c":[]},{"v":230705,"n":"西林区","c":[]},{"v":230706,"n":"翠峦区","c":[]},{"v":230707,"n":"新青区","c":[]},{"v":230708,"n":"美溪区","c":[]},{"v":230709,"n":"金山屯区","c":[]},{"v":230710,"n":"五营区","c":[]},{"v":230711,"n":"乌马河区","c":[]},{"v":230712,"n":"汤旺河区","c":[]},{"v":230713,"n":"带岭区","c":[]},{"v":230714,"n":"乌伊岭区","c":[]},{"v":230715,"n":"红星区","c":[]},{"v":230716,"n":"上甘岭区","c":[]},{"v":230722,"n":"嘉荫县","c":[]},{"v":230781,"n":"铁力市","c":[]}]},{"v":230800,"n":"佳木斯市","c":[{"v":230803,"n":"向阳区","c":[]},{"v":230804,"n":"前进区","c":[]},{"v":230805,"n":"东风区","c":[]},{"v":230811,"n":"郊区","c":[]},{"v":230822,"n":"桦南县","c":[]},{"v":230826,"n":"桦川县","c":[]},{"v":230828,"n":"汤原县","c":[]},{"v":230833,"n":"抚远县","c":[]},{"v":230881,"n":"同江市","c":[]},{"v":230882,"n":"富锦市","c":[]}]},{"v":230900,"n":"七台河市","c":[{"v":230902,"n":"新兴区","c":[]},{"v":230903,"n":"桃山区","c":[]},{"v":230904,"n":"茄子河区","c":[]},{"v":230921,"n":"勃利县","c":[]}]},{"v":231000,"n":"牡丹江市","c":[{"v":231002,"n":"东安区","c":[]},{"v":231003,"n":"阳明区","c":[]},{"v":231004,"n":"爱民区","c":[]},{"v":231005,"n":"西安区","c":[]},{"v":231024,"n":"东宁县","c":[]},{"v":231025,"n":"林口县","c":[]},{"v":231081,"n":"绥芬河市","c":[]},{"v":231083,"n":"海林市","c":[]},{"v":231084,"n":"宁安市","c":[]},{"v":231085,"n":"穆棱市","c":[]}]},{"v":231100,"n":"黑河市","c":[{"v":231102,"n":"爱辉区","c":[]},{"v":231121,"n":"嫩江县","c":[]},{"v":231123,"n":"逊克县","c":[]},{"v":231124,"n":"孙吴县","c":[]},{"v":231181,"n":"北安市","c":[]},{"v":231182,"n":"五大连池市","c":[]}]},{"v":231200,"n":"绥化市","c":[{"v":231202,"n":"北林区","c":[]},{"v":231221,"n":"望奎县","c":[]},{"v":231222,"n":"兰西县","c":[]},{"v":231223,"n":"青冈县","c":[]},{"v":231224,"n":"庆安县","c":[]},{"v":231225,"n":"明水县","c":[]},{"v":231226,"n":"绥棱县","c":[]},{"v":231281,"n":"安达市","c":[]},{"v":231282,"n":"肇东市","c":[]},{"v":231283,"n":"海伦市","c":[]}]},{"v":232700,"n":"大兴安岭地区","c":[{"v":232702,"n":"松岭区","c":[]},{"v":232703,"n":"新林区","c":[]},{"v":232704,"n":"呼中区","c":[]},{"v":232721,"n":"呼玛县","c":[]},{"v":232722,"n":"塔河县","c":[]},{"v":232723,"n":"漠河县","c":[]},{"v":232724,"n":"加格达奇区","c":[]}]}]},{"v":310000,"n":"上海","c":[{"v":310100,"n":"上海市","c":[{"v":310101,"n":"黄浦区","c":[]},{"v":310104,"n":"徐汇区","c":[]},{"v":310105,"n":"长宁区","c":[]},{"v":310106,"n":"静安区","c":[]},{"v":310107,"n":"普陀区","c":[]},{"v":310108,"n":"闸北区","c":[]},{"v":310109,"n":"虹口区","c":[]},{"v":310110,"n":"杨浦区","c":[]},{"v":310112,"n":"闵行区","c":[]},{"v":310113,"n":"宝山区","c":[]},{"v":310114,"n":"嘉定区","c":[]},{"v":310115,"n":"浦东新区","c":[]},{"v":310116,"n":"金山区","c":[]},{"v":310117,"n":"松江区","c":[]},{"v":310118,"n":"青浦区","c":[]},{"v":310120,"n":"奉贤区","c":[]},{"v":310230,"n":"崇明县","c":[]}]}]},{"v":320000,"n":"江苏省","c":[{"v":320100,"n":"南京市","c":[{"v":320102,"n":"玄武区","c":[]},{"v":320104,"n":"秦淮区","c":[]},{"v":320105,"n":"建邺区","c":[]},{"v":320106,"n":"鼓楼区","c":[]},{"v":320111,"n":"浦口区","c":[]},{"v":320113,"n":"栖霞区","c":[]},{"v":320114,"n":"雨花台区","c":[]},{"v":320115,"n":"江宁区","c":[]},{"v":320116,"n":"六合区","c":[]},{"v":320124,"n":"溧水区","c":[]},{"v":320125,"n":"高淳区","c":[]}]},{"v":320200,"n":"无锡市","c":[{"v":320202,"n":"崇安区","c":[]},{"v":320203,"n":"南长区","c":[]},{"v":320204,"n":"北塘区","c":[]},{"v":320205,"n":"锡山区","c":[]},{"v":320206,"n":"惠山区","c":[]},{"v":320211,"n":"滨湖区","c":[]},{"v":320214,"n":"新吴区","c":[]},{"v":320281,"n":"江阴市","c":[]},{"v":320282,"n":"宜兴市","c":[]}]},{"v":320300,"n":"徐州市","c":[{"v":320302,"n":"鼓楼区","c":[]},{"v":320303,"n":"云龙区","c":[]},{"v":320305,"n":"贾汪区","c":[]},{"v":320311,"n":"泉山区","c":[]},{"v":320321,"n":"丰县","c":[]},{"v":320322,"n":"沛县","c":[]},{"v":320323,"n":"铜山区","c":[]},{"v":320324,"n":"睢宁县","c":[]},{"v":320381,"n":"新沂市","c":[]},{"v":320382,"n":"邳州市","c":[]}]},{"v":320400,"n":"常州市","c":[{"v":320402,"n":"天宁区","c":[]},{"v":320404,"n":"钟楼区","c":[]},{"v":320405,"n":"戚墅堰区","c":[]},{"v":320411,"n":"新北区","c":[]},{"v":320412,"n":"武进区","c":[]},{"v":320481,"n":"溧阳市","c":[]},{"v":320482,"n":"金坛市","c":[]}]},{"v":320500,"n":"苏州市","c":[{"v":320505,"n":"虎丘区","c":[]},{"v":320506,"n":"吴中区","c":[]},{"v":320507,"n":"相城区","c":[]},{"v":320508,"n":"姑苏区","c":[]},{"v":320581,"n":"常熟市","c":[]},{"v":320582,"n":"张家港市","c":[]},{"v":320583,"n":"昆山市","c":[]},{"v":320584,"n":"吴江区","c":[]},{"v":320585,"n":"太仓市","c":[]}]},{"v":320600,"n":"南通市","c":[{"v":320602,"n":"崇川区","c":[]},{"v":320611,"n":"港闸区","c":[]},{"v":320612,"n":"通州区","c":[]},{"v":320621,"n":"海安县","c":[]},{"v":320623,"n":"如东县","c":[]},{"v":320681,"n":"启东市","c":[]},{"v":320682,"n":"如皋市","c":[]},{"v":320684,"n":"海门市","c":[]}]},{"v":320700,"n":"连云港市","c":[{"v":320703,"n":"连云区","c":[]},{"v":320705,"n":"新浦区","c":[]},{"v":320706,"n":"海州区","c":[]},{"v":320721,"n":"赣榆县","c":[]},{"v":320722,"n":"东海县","c":[]},{"v":320723,"n":"灌云县","c":[]},{"v":320724,"n":"灌南县","c":[]}]},{"v":320800,"n":"淮安市","c":[{"v":320802,"n":"清河区","c":[]},{"v":320803,"n":"淮安区","c":[]},{"v":320804,"n":"淮阴区","c":[]},{"v":320811,"n":"清浦区","c":[]},{"v":320826,"n":"涟水县","c":[]},{"v":320829,"n":"洪泽县","c":[]},{"v":320830,"n":"盱眙县","c":[]},{"v":320831,"n":"金湖县","c":[]}]},{"v":320900,"n":"盐城市","c":[{"v":320902,"n":"亭湖区","c":[]},{"v":320903,"n":"盐都区","c":[]},{"v":320921,"n":"响水县","c":[]},{"v":320922,"n":"滨海县","c":[]},{"v":320923,"n":"阜宁县","c":[]},{"v":320924,"n":"射阳县","c":[]},{"v":320925,"n":"建湖县","c":[]},{"v":320981,"n":"东台市","c":[]},{"v":320982,"n":"大丰市","c":[]}]},{"v":321000,"n":"扬州市","c":[{"v":321002,"n":"广陵区","c":[]},{"v":321003,"n":"邗江区","c":[]},{"v":321023,"n":"宝应县","c":[]},{"v":321081,"n":"仪征市","c":[]},{"v":321084,"n":"高邮市","c":[]},{"v":321088,"n":"江都区","c":[]}]},{"v":321100,"n":"镇江市","c":[{"v":321102,"n":"京口区","c":[]},{"v":321111,"n":"润州区","c":[]},{"v":321112,"n":"丹徒区","c":[]},{"v":321181,"n":"丹阳市","c":[]},{"v":321182,"n":"扬中市","c":[]},{"v":321183,"n":"句容市","c":[]}]},{"v":321200,"n":"泰州市","c":[{"v":321202,"n":"海陵区","c":[]},{"v":321203,"n":"高港区","c":[]},{"v":321281,"n":"兴化市","c":[]},{"v":321282,"n":"靖江市","c":[]},{"v":321283,"n":"泰兴市","c":[]},{"v":321284,"n":"姜堰区","c":[]}]},{"v":321300,"n":"宿迁市","c":[{"v":321302,"n":"宿城区","c":[]},{"v":321311,"n":"宿豫区","c":[]},{"v":321322,"n":"沭阳县","c":[]},{"v":321323,"n":"泗阳县","c":[]},{"v":321324,"n":"泗洪县","c":[]}]}]},{"v":330000,"n":"浙江省","c":[{"v":330100,"n":"杭州市","c":[{"v":330102,"n":"上城区","c":[]},{"v":330103,"n":"下城区","c":[]},{"v":330104,"n":"江干区","c":[]},{"v":330105,"n":"拱墅区","c":[]},{"v":330106,"n":"西湖区","c":[]},{"v":330108,"n":"滨江区","c":[]},{"v":330109,"n":"萧山区","c":[]},{"v":330110,"n":"余杭区","c":[]},{"v":330122,"n":"桐庐县","c":[]},{"v":330127,"n":"淳安县","c":[]},{"v":330182,"n":"建德市","c":[]},{"v":330183,"n":"富阳市","c":[]},{"v":330185,"n":"临安市","c":[]}]},{"v":330200,"n":"宁波市","c":[{"v":330203,"n":"海曙区","c":[]},{"v":330204,"n":"江东区","c":[]},{"v":330205,"n":"江北区","c":[]},{"v":330206,"n":"北仑区","c":[]},{"v":330211,"n":"镇海区","c":[]},{"v":330212,"n":"鄞州区","c":[]},{"v":330225,"n":"象山县","c":[]},{"v":330226,"n":"宁海县","c":[]},{"v":330281,"n":"余姚市","c":[]},{"v":330282,"n":"慈溪市","c":[]},{"v":330283,"n":"奉化市","c":[]}]},{"v":330300,"n":"温州市","c":[{"v":330302,"n":"鹿城区","c":[]},{"v":330303,"n":"龙湾区","c":[]},{"v":330304,"n":"瓯海区","c":[]},{"v":330322,"n":"洞头县","c":[]},{"v":330324,"n":"永嘉县","c":[]},{"v":330326,"n":"平阳县","c":[]},{"v":330327,"n":"苍南县","c":[]},{"v":330328,"n":"文成县","c":[]},{"v":330329,"n":"泰顺县","c":[]},{"v":330381,"n":"瑞安市","c":[]},{"v":330382,"n":"乐清市","c":[]}]},{"v":330400,"n":"嘉兴市","c":[{"v":330402,"n":"南湖区","c":[]},{"v":330411,"n":"秀洲区","c":[]},{"v":330421,"n":"嘉善县","c":[]},{"v":330424,"n":"海盐县","c":[]},{"v":330481,"n":"海宁市","c":[]},{"v":330482,"n":"平湖市","c":[]},{"v":330483,"n":"桐乡市","c":[]}]},{"v":330500,"n":"湖州市","c":[{"v":330502,"n":"吴兴区","c":[]},{"v":330503,"n":"南浔区","c":[]},{"v":330521,"n":"德清县","c":[]},{"v":330522,"n":"长兴县","c":[]},{"v":330523,"n":"安吉县","c":[]}]},{"v":330600,"n":"绍兴市","c":[{"v":330602,"n":"越城区","c":[]},{"v":330621,"n":"绍兴县","c":[]},{"v":330624,"n":"新昌县","c":[]},{"v":330681,"n":"诸暨市","c":[]},{"v":330682,"n":"上虞市","c":[]},{"v":330683,"n":"嵊州市","c":[]},{"v":659004537,"n":"柯桥区","c":[]}]},{"v":330700,"n":"金华市","c":[{"v":330702,"n":"婺城区","c":[]},{"v":330703,"n":"金东区","c":[]},{"v":330723,"n":"武义县","c":[]},{"v":330726,"n":"浦江县","c":[]},{"v":330727,"n":"磐安县","c":[]},{"v":330781,"n":"兰溪市","c":[]},{"v":330782,"n":"义乌市","c":[]},{"v":330783,"n":"东阳市","c":[]},{"v":330784,"n":"永康市","c":[]}]},{"v":330800,"n":"衢州市","c":[{"v":330802,"n":"柯城区","c":[]},{"v":330803,"n":"衢江区","c":[]},{"v":330822,"n":"常山县","c":[]},{"v":330824,"n":"开化县","c":[]},{"v":330825,"n":"龙游县","c":[]},{"v":330881,"n":"江山市","c":[]}]},{"v":330900,"n":"舟山市","c":[{"v":330902,"n":"定海区","c":[]},{"v":330903,"n":"普陀区","c":[]},{"v":330921,"n":"岱山县","c":[]},{"v":330922,"n":"嵊泗县","c":[]}]},{"v":331000,"n":"台州市","c":[{"v":331002,"n":"椒江区","c":[]},{"v":331003,"n":"黄岩区","c":[]},{"v":331004,"n":"路桥区","c":[]},{"v":331021,"n":"玉环县","c":[]},{"v":331022,"n":"三门县","c":[]},{"v":331023,"n":"天台县","c":[]},{"v":331024,"n":"仙居县","c":[]},{"v":331081,"n":"温岭市","c":[]},{"v":331082,"n":"临海市","c":[]}]},{"v":331100,"n":"丽水市","c":[{"v":331102,"n":"莲都区","c":[]},{"v":331121,"n":"青田县","c":[]},{"v":331122,"n":"缙云县","c":[]},{"v":331123,"n":"遂昌县","c":[]},{"v":331124,"n":"松阳县","c":[]},{"v":331125,"n":"云和县","c":[]},{"v":331126,"n":"庆元县","c":[]},{"v":331127,"n":"景宁畲族自治县","c":[]},{"v":331181,"n":"龙泉市","c":[]}]}]},{"v":340000,"n":"安徽省","c":[{"v":340100,"n":"合肥市","c":[{"v":340102,"n":"瑶海区","c":[]},{"v":340103,"n":"庐阳区","c":[]},{"v":340104,"n":"蜀山区","c":[]},{"v":340111,"n":"包河区","c":[]},{"v":340121,"n":"长丰县","c":[]},{"v":340122,"n":"肥东县","c":[]},{"v":340123,"n":"肥西县","c":[]},{"v":341400,"n":"巢湖市","c":[]},{"v":341421,"n":"庐江县","c":[]}]},{"v":340200,"n":"芜湖市","c":[{"v":340202,"n":"镜湖区","c":[]},{"v":340203,"n":"弋江区","c":[]},{"v":340207,"n":"鸠江区","c":[]},{"v":340208,"n":"三山区","c":[]},{"v":340221,"n":"芜湖县","c":[]},{"v":340222,"n":"繁昌县","c":[]},{"v":340223,"n":"南陵县","c":[]},{"v":341422,"n":"无为县","c":[]}]},{"v":340300,"n":"蚌埠市","c":[{"v":340302,"n":"龙子湖区","c":[]},{"v":340303,"n":"蚌山区","c":[]},{"v":340304,"n":"禹会区","c":[]},{"v":340311,"n":"淮上区","c":[]},{"v":340321,"n":"怀远县","c":[]},{"v":340322,"n":"五河县","c":[]},{"v":340323,"n":"固镇县","c":[]}]},{"v":340400,"n":"淮南市","c":[{"v":340402,"n":"大通区","c":[]},{"v":340403,"n":"田家庵区","c":[]},{"v":340404,"n":"谢家集区","c":[]},{"v":340405,"n":"八公山区","c":[]},{"v":340406,"n":"潘集区","c":[]},{"v":340421,"n":"凤台县","c":[]}]},{"v":340500,"n":"马鞍山市","c":[{"v":340503,"n":"花山区","c":[]},{"v":340504,"n":"雨山区","c":[]},{"v":340506,"n":"博望区","c":[]},{"v":340521,"n":"当涂县","c":[]},{"v":341423,"n":"含山县","c":[]},{"v":341424,"n":"和县","c":[]}]},{"v":340600,"n":"淮北市","c":[{"v":340602,"n":"杜集区","c":[]},{"v":340603,"n":"相山区","c":[]},{"v":340604,"n":"烈山区","c":[]},{"v":340621,"n":"濉溪县","c":[]}]},{"v":340700,"n":"铜陵市","c":[{"v":340702,"n":"铜官山区","c":[]},{"v":340703,"n":"狮子山区","c":[]},{"v":340711,"n":"郊区","c":[]},{"v":340721,"n":"铜陵县","c":[]}]},{"v":340800,"n":"安庆市","c":[{"v":340802,"n":"迎江区","c":[]},{"v":340803,"n":"大观区","c":[]},{"v":340811,"n":"宜秀区","c":[]},{"v":340822,"n":"怀宁县","c":[]},{"v":340823,"n":"枞阳县","c":[]},{"v":340824,"n":"潜山县","c":[]},{"v":340825,"n":"太湖县","c":[]},{"v":340826,"n":"宿松县","c":[]},{"v":340827,"n":"望江县","c":[]},{"v":340828,"n":"岳西县","c":[]},{"v":340881,"n":"桐城市","c":[]}]},{"v":341000,"n":"黄山市","c":[{"v":341002,"n":"屯溪区","c":[]},{"v":341003,"n":"黄山区","c":[]},{"v":341004,"n":"徽州区","c":[]},{"v":341021,"n":"歙县","c":[]},{"v":341022,"n":"休宁县","c":[]},{"v":341023,"n":"黟县","c":[]},{"v":341024,"n":"祁门县","c":[]}]},{"v":341100,"n":"滁州市","c":[{"v":341102,"n":"琅琊区","c":[]},{"v":341103,"n":"南谯区","c":[]},{"v":341122,"n":"来安县","c":[]},{"v":341124,"n":"全椒县","c":[]},{"v":341125,"n":"定远县","c":[]},{"v":341126,"n":"凤阳县","c":[]},{"v":341181,"n":"天长市","c":[]},{"v":341182,"n":"明光市","c":[]}]},{"v":341200,"n":"阜阳市","c":[{"v":341202,"n":"颍州区","c":[]},{"v":341203,"n":"颍东区","c":[]},{"v":341204,"n":"颍泉区","c":[]},{"v":341221,"n":"临泉县","c":[]},{"v":341222,"n":"太和县","c":[]},{"v":341225,"n":"阜南县","c":[]},{"v":341226,"n":"颍上县","c":[]},{"v":341282,"n":"界首市","c":[]}]},{"v":341300,"n":"宿州市","c":[{"v":341302,"n":"埇桥区","c":[]},{"v":341321,"n":"砀山县","c":[]},{"v":341322,"n":"萧县","c":[]},{"v":341323,"n":"灵璧县","c":[]},{"v":341324,"n":"泗县","c":[]}]},{"v":341500,"n":"六安市","c":[{"v":341502,"n":"金安区","c":[]},{"v":341503,"n":"裕安区","c":[]},{"v":341521,"n":"寿县","c":[]},{"v":341522,"n":"霍邱县","c":[]},{"v":341523,"n":"舒城县","c":[]},{"v":341524,"n":"金寨县","c":[]},{"v":341525,"n":"霍山县","c":[]}]},{"v":341600,"n":"亳州市","c":[{"v":341602,"n":"谯城区","c":[]},{"v":341621,"n":"涡阳县","c":[]},{"v":341622,"n":"蒙城县","c":[]},{"v":341623,"n":"利辛县","c":[]}]},{"v":341700,"n":"池州市","c":[{"v":341702,"n":"贵池区","c":[]},{"v":341721,"n":"东至县","c":[]},{"v":341722,"n":"石台县","c":[]},{"v":341723,"n":"青阳县","c":[]}]},{"v":341800,"n":"宣城市","c":[{"v":341802,"n":"宣州区","c":[]},{"v":341821,"n":"郎溪县","c":[]},{"v":341822,"n":"广德县","c":[]},{"v":341823,"n":"泾县","c":[]},{"v":341824,"n":"绩溪县","c":[]},{"v":341825,"n":"旌德县","c":[]},{"v":341881,"n":"宁国市","c":[]}]}]},{"v":350000,"n":"福建省","c":[{"v":350100,"n":"福州市","c":[{"v":350102,"n":"鼓楼区","c":[]},{"v":350103,"n":"台江区","c":[]},{"v":350104,"n":"仓山区","c":[]},{"v":350105,"n":"马尾区","c":[]},{"v":350111,"n":"晋安区","c":[]},{"v":350121,"n":"闽侯县","c":[]},{"v":350122,"n":"连江县","c":[]},{"v":350123,"n":"罗源县","c":[]},{"v":350124,"n":"闽清县","c":[]},{"v":350125,"n":"永泰县","c":[]},{"v":350128,"n":"平潭县","c":[]},{"v":350181,"n":"福清市","c":[]},{"v":350182,"n":"长乐市","c":[]}]},{"v":350200,"n":"厦门市","c":[{"v":350203,"n":"思明区","c":[]},{"v":350205,"n":"海沧区","c":[]},{"v":350206,"n":"湖里区","c":[]},{"v":350211,"n":"集美区","c":[]},{"v":350212,"n":"同安区","c":[]},{"v":350213,"n":"翔安区","c":[]}]},{"v":350300,"n":"莆田市","c":[{"v":350302,"n":"城厢区","c":[]},{"v":350303,"n":"涵江区","c":[]},{"v":350304,"n":"荔城区","c":[]},{"v":350305,"n":"秀屿区","c":[]},{"v":350322,"n":"仙游县","c":[]}]},{"v":350400,"n":"三明市","c":[{"v":350402,"n":"梅列区","c":[]},{"v":350403,"n":"三元区","c":[]},{"v":350421,"n":"明溪县","c":[]},{"v":350423,"n":"清流县","c":[]},{"v":350424,"n":"宁化县","c":[]},{"v":350425,"n":"大田县","c":[]},{"v":350426,"n":"尤溪县","c":[]},{"v":350427,"n":"沙县","c":[]},{"v":350428,"n":"将乐县","c":[]},{"v":350429,"n":"泰宁县","c":[]},{"v":350430,"n":"建宁县","c":[]},{"v":350481,"n":"永安市","c":[]}]},{"v":350500,"n":"泉州市","c":[{"v":350502,"n":"鲤城区","c":[]},{"v":350503,"n":"丰泽区","c":[]},{"v":350504,"n":"洛江区","c":[]},{"v":350505,"n":"泉港区","c":[]},{"v":350521,"n":"惠安县","c":[]},{"v":350524,"n":"安溪县","c":[]},{"v":350525,"n":"永春县","c":[]},{"v":350526,"n":"德化县","c":[]},{"v":350527,"n":"金门县","c":[]},{"v":350581,"n":"石狮市","c":[]},{"v":350582,"n":"晋江市","c":[]},{"v":350583,"n":"南安市","c":[]}]},{"v":350600,"n":"漳州市","c":[{"v":350602,"n":"芗城区","c":[]},{"v":350603,"n":"龙文区","c":[]},{"v":350622,"n":"云霄县","c":[]},{"v":350623,"n":"漳浦县","c":[]},{"v":350624,"n":"诏安县","c":[]},{"v":350625,"n":"长泰县","c":[]},{"v":350626,"n":"东山县","c":[]},{"v":350627,"n":"南靖县","c":[]},{"v":350628,"n":"平和县","c":[]},{"v":350629,"n":"华安县","c":[]},{"v":350681,"n":"龙海市","c":[]}]},{"v":350700,"n":"南平市","c":[{"v":350702,"n":"延平区","c":[]},{"v":350721,"n":"顺昌县","c":[]},{"v":350722,"n":"浦城县","c":[]},{"v":350723,"n":"光泽县","c":[]},{"v":350724,"n":"松溪县","c":[]},{"v":350725,"n":"政和县","c":[]},{"v":350781,"n":"邵武市","c":[]},{"v":350782,"n":"武夷山市","c":[]},{"v":350783,"n":"建瓯市","c":[]},{"v":350784,"n":"建阳市","c":[]}]},{"v":350800,"n":"龙岩市","c":[{"v":350802,"n":"新罗区","c":[]},{"v":350821,"n":"长汀县","c":[]},{"v":350822,"n":"永定县","c":[]},{"v":350823,"n":"上杭县","c":[]},{"v":350824,"n":"武平县","c":[]},{"v":350825,"n":"连城县","c":[]},{"v":350881,"n":"漳平市","c":[]}]},{"v":350900,"n":"宁德市","c":[{"v":350902,"n":"蕉城区","c":[]},{"v":350921,"n":"霞浦县","c":[]},{"v":350922,"n":"古田县","c":[]},{"v":350923,"n":"屏南县","c":[]},{"v":350924,"n":"寿宁县","c":[]},{"v":350925,"n":"周宁县","c":[]},{"v":350926,"n":"柘荣县","c":[]},{"v":350981,"n":"福安市","c":[]},{"v":350982,"n":"福鼎市","c":[]}]}]},{"v":360000,"n":"江西省","c":[{"v":360100,"n":"南昌市","c":[{"v":360102,"n":"东湖区","c":[]},{"v":360103,"n":"西湖区","c":[]},{"v":360104,"n":"青云谱区","c":[]},{"v":360105,"n":"湾里区","c":[]},{"v":360111,"n":"青山湖区","c":[]},{"v":360121,"n":"南昌县","c":[]},{"v":360122,"n":"新建县","c":[]},{"v":360123,"n":"安义县","c":[]},{"v":360124,"n":"进贤县","c":[]}]},{"v":360200,"n":"景德镇市","c":[{"v":360202,"n":"昌江区","c":[]},{"v":360203,"n":"珠山区","c":[]},{"v":360222,"n":"浮梁县","c":[]},{"v":360281,"n":"乐平市","c":[]}]},{"v":360300,"n":"萍乡市","c":[{"v":360302,"n":"安源区","c":[]},{"v":360313,"n":"湘东区","c":[]},{"v":360321,"n":"莲花县","c":[]},{"v":360322,"n":"上栗县","c":[]},{"v":360323,"n":"芦溪县","c":[]}]},{"v":360400,"n":"九江市","c":[{"v":360402,"n":"庐山区","c":[]},{"v":360403,"n":"浔阳区","c":[]},{"v":360421,"n":"九江县","c":[]},{"v":360423,"n":"武宁县","c":[]},{"v":360424,"n":"修水县","c":[]},{"v":360425,"n":"永修县","c":[]},{"v":360426,"n":"德安县","c":[]},{"v":360427,"n":"星子县","c":[]},{"v":360428,"n":"都昌县","c":[]},{"v":360429,"n":"湖口县","c":[]},{"v":360430,"n":"彭泽县","c":[]},{"v":360481,"n":"瑞昌市","c":[]},{"v":360483,"n":"共青城市","c":[]}]},{"v":360500,"n":"新余市","c":[{"v":360502,"n":"渝水区","c":[]},{"v":360521,"n":"分宜县","c":[]}]},{"v":360600,"n":"鹰潭市","c":[{"v":360602,"n":"月湖区","c":[]},{"v":360622,"n":"余江县","c":[]},{"v":360681,"n":"贵溪市","c":[]}]},{"v":360700,"n":"赣州市","c":[{"v":360702,"n":"章贡区","c":[]},{"v":360721,"n":"赣县","c":[]},{"v":360722,"n":"信丰县","c":[]},{"v":360723,"n":"大余县","c":[]},{"v":360724,"n":"上犹县","c":[]},{"v":360725,"n":"崇义县","c":[]},{"v":360726,"n":"安远县","c":[]},{"v":360727,"n":"龙南县","c":[]},{"v":360728,"n":"定南县","c":[]},{"v":360729,"n":"全南县","c":[]},{"v":360730,"n":"宁都县","c":[]},{"v":360731,"n":"于都县","c":[]},{"v":360732,"n":"兴国县","c":[]},{"v":360733,"n":"会昌县","c":[]},{"v":360734,"n":"寻乌县","c":[]},{"v":360735,"n":"石城县","c":[]},{"v":360781,"n":"瑞金市","c":[]},{"v":360782,"n":"南康市","c":[]}]},{"v":360800,"n":"吉安市","c":[{"v":360802,"n":"吉州区","c":[]},{"v":360803,"n":"青原区","c":[]},{"v":360821,"n":"吉安县","c":[]},{"v":360822,"n":"吉水县","c":[]},{"v":360823,"n":"峡江县","c":[]},{"v":360824,"n":"新干县","c":[]},{"v":360825,"n":"永丰县","c":[]},{"v":360826,"n":"泰和县","c":[]},{"v":360827,"n":"遂川县","c":[]},{"v":360828,"n":"万安县","c":[]},{"v":360829,"n":"安福县","c":[]},{"v":360830,"n":"永新县","c":[]},{"v":360881,"n":"井冈山市","c":[]}]},{"v":360900,"n":"宜春市","c":[{"v":360902,"n":"袁州区","c":[]},{"v":360921,"n":"奉新县","c":[]},{"v":360922,"n":"万载县","c":[]},{"v":360923,"n":"上高县","c":[]},{"v":360924,"n":"宜丰县","c":[]},{"v":360925,"n":"靖安县","c":[]},{"v":360926,"n":"铜鼓县","c":[]},{"v":360981,"n":"丰城市","c":[]},{"v":360982,"n":"樟树市","c":[]},{"v":360983,"n":"高安市","c":[]}]},{"v":361000,"n":"抚州市","c":[{"v":361002,"n":"临川区","c":[]},{"v":361021,"n":"南城县","c":[]},{"v":361022,"n":"黎川县","c":[]},{"v":361023,"n":"南丰县","c":[]},{"v":361024,"n":"崇仁县","c":[]},{"v":361025,"n":"乐安县","c":[]},{"v":361026,"n":"宜黄县","c":[]},{"v":361027,"n":"金溪县","c":[]},{"v":361028,"n":"资溪县","c":[]},{"v":361029,"n":"东乡县","c":[]},{"v":361030,"n":"广昌县","c":[]}]},{"v":361100,"n":"上饶市","c":[{"v":361102,"n":"信州区","c":[]},{"v":361121,"n":"上饶县","c":[]},{"v":361122,"n":"广丰县","c":[]},{"v":361123,"n":"玉山县","c":[]},{"v":361124,"n":"铅山县","c":[]},{"v":361125,"n":"横峰县","c":[]},{"v":361126,"n":"弋阳县","c":[]},{"v":361127,"n":"余干县","c":[]},{"v":361128,"n":"鄱阳县","c":[]},{"v":361129,"n":"万年县","c":[]},{"v":361130,"n":"婺源县","c":[]},{"v":361181,"n":"德兴市","c":[]}]}]},{"v":370000,"n":"山东省","c":[{"v":370100,"n":"济南市","c":[{"v":370102,"n":"历下区","c":[]},{"v":370103,"n":"市中区","c":[]},{"v":370104,"n":"槐荫区","c":[]},{"v":370105,"n":"天桥区","c":[]},{"v":370112,"n":"历城区","c":[]},{"v":370113,"n":"长清区","c":[]},{"v":370124,"n":"平阴县","c":[]},{"v":370125,"n":"济阳县","c":[]},{"v":370126,"n":"商河县","c":[]},{"v":370181,"n":"章丘市","c":[]}]},{"v":370200,"n":"青岛市","c":[{"v":370202,"n":"市南区","c":[]},{"v":370203,"n":"市北区","c":[]},{"v":370211,"n":"黄岛区","c":[]},{"v":370212,"n":"崂山区","c":[]},{"v":370213,"n":"李沧区","c":[]},{"v":370214,"n":"城阳区","c":[]},{"v":370281,"n":"胶州市","c":[]},{"v":370282,"n":"即墨市","c":[]},{"v":370283,"n":"平度市","c":[]},{"v":370285,"n":"莱西市","c":[]}]},{"v":370300,"n":"淄博市","c":[{"v":370302,"n":"淄川区","c":[]},{"v":370303,"n":"张店区","c":[]},{"v":370304,"n":"博山区","c":[]},{"v":370305,"n":"临淄区","c":[]},{"v":370306,"n":"周村区","c":[]},{"v":370321,"n":"桓台县","c":[]},{"v":370322,"n":"高青县","c":[]},{"v":370323,"n":"沂源县","c":[]}]},{"v":370400,"n":"枣庄市","c":[{"v":370402,"n":"市中区","c":[]},{"v":370403,"n":"薛城区","c":[]},{"v":370404,"n":"峄城区","c":[]},{"v":370405,"n":"台儿庄区","c":[]},{"v":370406,"n":"山亭区","c":[]},{"v":370481,"n":"滕州市","c":[]}]},{"v":370500,"n":"东营市","c":[{"v":370502,"n":"东营区","c":[]},{"v":370503,"n":"河口区","c":[]},{"v":370521,"n":"垦利县","c":[]},{"v":370522,"n":"利津县","c":[]},{"v":370523,"n":"广饶县","c":[]}]},{"v":370600,"n":"烟台市","c":[{"v":370602,"n":"芝罘区","c":[]},{"v":370611,"n":"福山区","c":[]},{"v":370612,"n":"牟平区","c":[]},{"v":370613,"n":"莱山区","c":[]},{"v":370634,"n":"长岛县","c":[]},{"v":370681,"n":"龙口市","c":[]},{"v":370682,"n":"莱阳市","c":[]},{"v":370683,"n":"莱州市","c":[]},{"v":370684,"n":"蓬莱市","c":[]},{"v":370685,"n":"招远市","c":[]},{"v":370686,"n":"栖霞市","c":[]},{"v":370687,"n":"海阳市","c":[]}]},{"v":370700,"n":"潍坊市","c":[{"v":370702,"n":"潍城区","c":[]},{"v":370703,"n":"寒亭区","c":[]},{"v":370704,"n":"坊子区","c":[]},{"v":370705,"n":"奎文区","c":[]},{"v":370724,"n":"临朐县","c":[]},{"v":370725,"n":"昌乐县","c":[]},{"v":370781,"n":"青州市","c":[]},{"v":370782,"n":"诸城市","c":[]},{"v":370783,"n":"寿光市","c":[]},{"v":370784,"n":"安丘市","c":[]},{"v":370785,"n":"高密市","c":[]},{"v":370786,"n":"昌邑市","c":[]},{"v":659004538,"n":"高新区","c":[]}]},{"v":370800,"n":"济宁市","c":[{"v":370802,"n":"市中区","c":[]},{"v":370811,"n":"任城区","c":[]},{"v":370826,"n":"微山县","c":[]},{"v":370827,"n":"鱼台县","c":[]},{"v":370828,"n":"金乡县","c":[]},{"v":370829,"n":"嘉祥县","c":[]},{"v":370830,"n":"汶上县","c":[]},{"v":370831,"n":"泗水县","c":[]},{"v":370832,"n":"梁山县","c":[]},{"v":370881,"n":"曲阜市","c":[]},{"v":370882,"n":"兖州市","c":[]},{"v":370883,"n":"邹城市","c":[]}]},{"v":370900,"n":"泰安市","c":[{"v":370902,"n":"泰山区","c":[]},{"v":370903,"n":"岱岳区","c":[]},{"v":370921,"n":"宁阳县","c":[]},{"v":370923,"n":"东平县","c":[]},{"v":370982,"n":"新泰市","c":[]},{"v":370983,"n":"肥城市","c":[]}]},{"v":371000,"n":"威海市","c":[{"v":371002,"n":"环翠区","c":[]},{"v":371081,"n":"文登市","c":[]},{"v":371082,"n":"荣成市","c":[]},{"v":371083,"n":"乳山市","c":[]}]},{"v":371100,"n":"日照市","c":[{"v":371102,"n":"东港区","c":[]},{"v":371103,"n":"岚山区","c":[]},{"v":371121,"n":"五莲县","c":[]},{"v":371122,"n":"莒县","c":[]}]},{"v":371200,"n":"莱芜市","c":[{"v":371202,"n":"莱城区","c":[]},{"v":371203,"n":"钢城区","c":[]}]},{"v":371300,"n":"临沂市","c":[{"v":371302,"n":"兰山区","c":[]},{"v":371311,"n":"罗庄区","c":[]},{"v":371312,"n":"河东区","c":[]},{"v":371321,"n":"沂南县","c":[]},{"v":371322,"n":"郯城县","c":[]},{"v":371323,"n":"沂水县","c":[]},{"v":371324,"n":"苍山县","c":[]},{"v":371325,"n":"费县","c":[]},{"v":371326,"n":"平邑县","c":[]},{"v":371327,"n":"莒南县","c":[]},{"v":371328,"n":"蒙阴县","c":[]},{"v":371329,"n":"临沭县","c":[]}]},{"v":371400,"n":"德州市","c":[{"v":371402,"n":"德城区","c":[]},{"v":371421,"n":"陵县","c":[]},{"v":371422,"n":"宁津县","c":[]},{"v":371423,"n":"庆云县","c":[]},{"v":371424,"n":"临邑县","c":[]},{"v":371425,"n":"齐河县","c":[]},{"v":371426,"n":"平原县","c":[]},{"v":371427,"n":"夏津县","c":[]},{"v":371428,"n":"武城县","c":[]},{"v":371481,"n":"乐陵市","c":[]},{"v":371482,"n":"禹城市","c":[]}]},{"v":371500,"n":"聊城市","c":[{"v":371502,"n":"东昌府区","c":[]},{"v":371521,"n":"阳谷县","c":[]},{"v":371522,"n":"莘县","c":[]},{"v":371523,"n":"茌平县","c":[]},{"v":371524,"n":"东阿县","c":[]},{"v":371525,"n":"冠县","c":[]},{"v":371526,"n":"高唐县","c":[]},{"v":371581,"n":"临清市","c":[]}]},{"v":371600,"n":"滨州市","c":[{"v":371602,"n":"滨城区","c":[]},{"v":371621,"n":"惠民县","c":[]},{"v":371622,"n":"阳信县","c":[]},{"v":371623,"n":"无棣县","c":[]},{"v":371624,"n":"沾化县","c":[]},{"v":371625,"n":"博兴县","c":[]},{"v":371626,"n":"邹平县","c":[]}]},{"v":371700,"n":"菏泽市","c":[{"v":371702,"n":"牡丹区","c":[]},{"v":371721,"n":"曹县","c":[]},{"v":371722,"n":"单县","c":[]},{"v":371723,"n":"成武县","c":[]},{"v":371724,"n":"巨野县","c":[]},{"v":371725,"n":"郓城县","c":[]},{"v":371726,"n":"鄄城县","c":[]},{"v":371727,"n":"定陶县","c":[]},{"v":371728,"n":"东明县","c":[]}]}]},{"v":410000,"n":"河南省","c":[{"v":410100,"n":"郑州市","c":[{"v":410102,"n":"中原区","c":[]},{"v":410103,"n":"二七区","c":[]},{"v":410104,"n":"管城回族区","c":[]},{"v":410105,"n":"金水区","c":[]},{"v":410106,"n":"上街区","c":[]},{"v":410108,"n":"惠济区","c":[]},{"v":410122,"n":"中牟县","c":[]},{"v":410181,"n":"巩义市","c":[]},{"v":410182,"n":"荥阳市","c":[]},{"v":410183,"n":"新密市","c":[]},{"v":410184,"n":"新郑市","c":[]},{"v":410185,"n":"登封市","c":[]}]},{"v":410200,"n":"开封市","c":[{"v":410202,"n":"龙亭区","c":[]},{"v":410203,"n":"顺河回族区","c":[]},{"v":410204,"n":"鼓楼区","c":[]},{"v":410205,"n":"禹王台区","c":[]},{"v":410211,"n":"金明区","c":[]},{"v":410221,"n":"杞县","c":[]},{"v":410222,"n":"通许县","c":[]},{"v":410223,"n":"尉氏县","c":[]},{"v":410224,"n":"开封县","c":[]},{"v":410225,"n":"兰考县","c":[]}]},{"v":410300,"n":"洛阳市","c":[{"v":410302,"n":"老城区","c":[]},{"v":410303,"n":"西工区","c":[]},{"v":410304,"n":"瀍河回族区","c":[]},{"v":410305,"n":"涧西区","c":[]},{"v":410306,"n":"吉利区","c":[]},{"v":410307,"n":"洛龙区","c":[]},{"v":410322,"n":"孟津县","c":[]},{"v":410323,"n":"新安县","c":[]},{"v":410324,"n":"栾川县","c":[]},{"v":410325,"n":"嵩县","c":[]},{"v":410326,"n":"汝阳县","c":[]},{"v":410327,"n":"宜阳县","c":[]},{"v":410328,"n":"洛宁县","c":[]},{"v":410329,"n":"伊川县","c":[]},{"v":410381,"n":"偃师市","c":[]}]},{"v":410400,"n":"平顶山市","c":[{"v":410402,"n":"新华区","c":[]},{"v":410403,"n":"卫东区","c":[]},{"v":410404,"n":"石龙区","c":[]},{"v":410411,"n":"湛河区","c":[]},{"v":410421,"n":"宝丰县","c":[]},{"v":410422,"n":"叶县","c":[]},{"v":410423,"n":"鲁山县","c":[]},{"v":410425,"n":"郏县","c":[]},{"v":410481,"n":"舞钢市","c":[]},{"v":410482,"n":"汝州市","c":[]}]},{"v":410500,"n":"安阳市","c":[{"v":410502,"n":"文峰区","c":[]},{"v":410503,"n":"北关区","c":[]},{"v":410505,"n":"殷都区","c":[]},{"v":410506,"n":"龙安区","c":[]},{"v":410522,"n":"安阳县","c":[]},{"v":410523,"n":"汤阴县","c":[]},{"v":410526,"n":"滑县","c":[]},{"v":410527,"n":"内黄县","c":[]},{"v":410581,"n":"林州市","c":[]}]},{"v":410600,"n":"鹤壁市","c":[{"v":410602,"n":"鹤山区","c":[]},{"v":410603,"n":"山城区","c":[]},{"v":410611,"n":"淇滨区","c":[]},{"v":410621,"n":"浚县","c":[]},{"v":410622,"n":"淇县","c":[]}]},{"v":410700,"n":"新乡市","c":[{"v":410702,"n":"红旗区","c":[]},{"v":410703,"n":"卫滨区","c":[]},{"v":410704,"n":"凤泉区","c":[]},{"v":410711,"n":"牧野区","c":[]},{"v":410721,"n":"新乡县","c":[]},{"v":410724,"n":"获嘉县","c":[]},{"v":410725,"n":"原阳县","c":[]},{"v":410726,"n":"延津县","c":[]},{"v":410727,"n":"封丘县","c":[]},{"v":410728,"n":"长垣县","c":[]},{"v":410781,"n":"卫辉市","c":[]},{"v":410782,"n":"辉县市","c":[]}]},{"v":410800,"n":"焦作市","c":[{"v":410802,"n":"解放区","c":[]},{"v":410803,"n":"中站区","c":[]},{"v":410804,"n":"马村区","c":[]},{"v":410811,"n":"山阳区","c":[]},{"v":410821,"n":"修武县","c":[]},{"v":410822,"n":"博爱县","c":[]},{"v":410823,"n":"武陟县","c":[]},{"v":410825,"n":"温县","c":[]},{"v":410882,"n":"沁阳市","c":[]},{"v":410883,"n":"孟州市","c":[]}]},{"v":410881,"n":"济源市","c":[{"v":659004525,"n":"济源市","c":[]}]},{"v":410900,"n":"濮阳市","c":[{"v":410902,"n":"华龙区","c":[]},{"v":410922,"n":"清丰县","c":[]},{"v":410923,"n":"南乐县","c":[]},{"v":410926,"n":"范县","c":[]},{"v":410927,"n":"台前县","c":[]},{"v":410928,"n":"濮阳县","c":[]}]},{"v":411000,"n":"许昌市","c":[{"v":411002,"n":"魏都区","c":[]},{"v":411023,"n":"许昌县","c":[]},{"v":411024,"n":"鄢陵县","c":[]},{"v":411025,"n":"襄城县","c":[]},{"v":411081,"n":"禹州市","c":[]},{"v":411082,"n":"长葛市","c":[]}]},{"v":411100,"n":"漯河市","c":[{"v":411102,"n":"源汇区","c":[]},{"v":411103,"n":"郾城区","c":[]},{"v":411104,"n":"召陵区","c":[]},{"v":411121,"n":"舞阳县","c":[]},{"v":411122,"n":"临颍县","c":[]}]},{"v":411200,"n":"三门峡市","c":[{"v":411202,"n":"湖滨区","c":[]},{"v":411221,"n":"渑池县","c":[]},{"v":411222,"n":"陕县","c":[]},{"v":411224,"n":"卢氏县","c":[]},{"v":411281,"n":"义马市","c":[]},{"v":411282,"n":"灵宝市","c":[]}]},{"v":411300,"n":"南阳市","c":[{"v":411302,"n":"宛城区","c":[]},{"v":411303,"n":"卧龙区","c":[]},{"v":411321,"n":"南召县","c":[]},{"v":411322,"n":"方城县","c":[]},{"v":411323,"n":"西峡县","c":[]},{"v":411324,"n":"镇平县","c":[]},{"v":411325,"n":"内乡县","c":[]},{"v":411326,"n":"淅川县","c":[]},{"v":411327,"n":"社旗县","c":[]},{"v":411328,"n":"唐河县","c":[]},{"v":411329,"n":"新野县","c":[]},{"v":411330,"n":"桐柏县","c":[]},{"v":411381,"n":"邓州市","c":[]}]},{"v":411400,"n":"商丘市","c":[{"v":411402,"n":"梁园区","c":[]},{"v":411403,"n":"睢阳区","c":[]},{"v":411421,"n":"民权县","c":[]},{"v":411422,"n":"睢县","c":[]},{"v":411423,"n":"宁陵县","c":[]},{"v":411424,"n":"柘城县","c":[]},{"v":411425,"n":"虞城县","c":[]},{"v":411426,"n":"夏邑县","c":[]},{"v":411481,"n":"永城市","c":[]}]},{"v":411500,"n":"信阳市","c":[{"v":411502,"n":"浉河区","c":[]},{"v":411503,"n":"平桥区","c":[]},{"v":411521,"n":"罗山县","c":[]},{"v":411522,"n":"光山县","c":[]},{"v":411523,"n":"新县","c":[]},{"v":411524,"n":"商城县","c":[]},{"v":411525,"n":"固始县","c":[]},{"v":411526,"n":"潢川县","c":[]},{"v":411527,"n":"淮滨县","c":[]},{"v":411528,"n":"息县","c":[]}]},{"v":411600,"n":"周口市","c":[{"v":411602,"n":"川汇区","c":[]},{"v":411621,"n":"扶沟县","c":[]},{"v":411622,"n":"西华县","c":[]},{"v":411623,"n":"商水县","c":[]},{"v":411624,"n":"沈丘县","c":[]},{"v":411625,"n":"郸城县","c":[]},{"v":411626,"n":"淮阳县","c":[]},{"v":411627,"n":"太康县","c":[]},{"v":411628,"n":"鹿邑县","c":[]},{"v":411681,"n":"项城市","c":[]}]},{"v":411700,"n":"驻马店市","c":[{"v":411702,"n":"驿城区","c":[]},{"v":411721,"n":"西平县","c":[]},{"v":411722,"n":"上蔡县","c":[]},{"v":411723,"n":"平舆县","c":[]},{"v":411724,"n":"正阳县","c":[]},{"v":411725,"n":"确山县","c":[]},{"v":411726,"n":"泌阳县","c":[]},{"v":411727,"n":"汝南县","c":[]},{"v":411728,"n":"遂平县","c":[]},{"v":411729,"n":"新蔡县","c":[]}]}]},{"v":420000,"n":"湖北省","c":[{"v":420100,"n":"武汉市","c":[{"v":420102,"n":"江岸区","c":[]},{"v":420103,"n":"江汉区","c":[]},{"v":420104,"n":"硚口区","c":[]},{"v":420105,"n":"汉阳区","c":[]},{"v":420106,"n":"武昌区","c":[]},{"v":420107,"n":"青山区","c":[]},{"v":420111,"n":"洪山区","c":[]},{"v":420112,"n":"东西湖区","c":[]},{"v":420113,"n":"汉南区","c":[]},{"v":420114,"n":"蔡甸区","c":[]},{"v":420115,"n":"江夏区","c":[]},{"v":420116,"n":"黄陂区","c":[]},{"v":420117,"n":"新洲区","c":[]}]},{"v":420200,"n":"黄石市","c":[{"v":420202,"n":"黄石港区","c":[]},{"v":420203,"n":"西塞山区","c":[]},{"v":420204,"n":"下陆区","c":[]},{"v":420205,"n":"铁山区","c":[]},{"v":420222,"n":"阳新县","c":[]},{"v":420281,"n":"大冶市","c":[]}]},{"v":420300,"n":"十堰市","c":[{"v":420302,"n":"茅箭区","c":[]},{"v":420303,"n":"张湾区","c":[]},{"v":420321,"n":"郧县","c":[]},{"v":420322,"n":"郧西县","c":[]},{"v":420323,"n":"竹山县","c":[]},{"v":420324,"n":"竹溪县","c":[]},{"v":420325,"n":"房县","c":[]},{"v":420381,"n":"丹江口市","c":[]}]},{"v":420500,"n":"宜昌市","c":[{"v":420502,"n":"西陵区","c":[]},{"v":420503,"n":"伍家岗区","c":[]},{"v":420504,"n":"点军区","c":[]},{"v":420505,"n":"猇亭区","c":[]},{"v":420506,"n":"夷陵区","c":[]},{"v":420525,"n":"远安县","c":[]},{"v":420526,"n":"兴山县","c":[]},{"v":420527,"n":"秭归县","c":[]},{"v":420528,"n":"长阳土家族自治县","c":[]},{"v":420529,"n":"五峰土家族自治县","c":[]},{"v":420581,"n":"宜都市","c":[]},{"v":420582,"n":"当阳市","c":[]},{"v":420583,"n":"枝江市","c":[]}]},{"v":420600,"n":"襄阳市","c":[{"v":420602,"n":"襄城区","c":[]},{"v":420606,"n":"樊城区","c":[]},{"v":420607,"n":"襄州区","c":[]},{"v":420624,"n":"南漳县","c":[]},{"v":420625,"n":"谷城县","c":[]},{"v":420626,"n":"保康县","c":[]},{"v":420682,"n":"老河口市","c":[]},{"v":420683,"n":"枣阳市","c":[]},{"v":420684,"n":"宜城市","c":[]}]},{"v":420700,"n":"鄂州市","c":[{"v":420702,"n":"梁子湖区","c":[]},{"v":420703,"n":"华容区","c":[]},{"v":420704,"n":"鄂城区","c":[]}]},{"v":420800,"n":"荆门市","c":[{"v":420802,"n":"东宝区","c":[]},{"v":420804,"n":"掇刀区","c":[]},{"v":420821,"n":"京山县","c":[]},{"v":420822,"n":"沙洋县","c":[]},{"v":420881,"n":"钟祥市","c":[]}]},{"v":420900,"n":"孝感市","c":[{"v":420902,"n":"孝南区","c":[]},{"v":420921,"n":"孝昌县","c":[]},{"v":420922,"n":"大悟县","c":[]},{"v":420923,"n":"云梦县","c":[]},{"v":420981,"n":"应城市","c":[]},{"v":420982,"n":"安陆市","c":[]},{"v":420984,"n":"汉川市","c":[]}]},{"v":421000,"n":"荆州市","c":[{"v":421002,"n":"沙市区","c":[]},{"v":421003,"n":"荆州区","c":[]},{"v":421022,"n":"公安县","c":[]},{"v":421023,"n":"监利县","c":[]},{"v":421024,"n":"江陵县","c":[]},{"v":421081,"n":"石首市","c":[]},{"v":421083,"n":"洪湖市","c":[]},{"v":421087,"n":"松滋市","c":[]}]},{"v":421100,"n":"黄冈市","c":[{"v":421102,"n":"黄州区","c":[]},{"v":421121,"n":"团风县","c":[]},{"v":421122,"n":"红安县","c":[]},{"v":421123,"n":"罗田县","c":[]},{"v":421124,"n":"英山县","c":[]},{"v":421125,"n":"浠水县","c":[]},{"v":421126,"n":"蕲春县","c":[]},{"v":421127,"n":"黄梅县","c":[]},{"v":421181,"n":"麻城市","c":[]},{"v":421182,"n":"武穴市","c":[]}]},{"v":421200,"n":"咸宁市","c":[{"v":421202,"n":"咸安区","c":[]},{"v":421221,"n":"嘉鱼县","c":[]},{"v":421222,"n":"通城县","c":[]},{"v":421223,"n":"崇阳县","c":[]},{"v":421224,"n":"通山县","c":[]},{"v":421281,"n":"赤壁市","c":[]}]},{"v":421300,"n":"随州市","c":[{"v":421302,"n":"曾都区","c":[]},{"v":421321,"n":"随县","c":[]},{"v":421381,"n":"广水市","c":[]}]},{"v":422800,"n":"恩施土家族苗族自治州","c":[{"v":422801,"n":"恩施市","c":[]},{"v":422802,"n":"利川市","c":[]},{"v":422822,"n":"建始县","c":[]},{"v":422823,"n":"巴东县","c":[]},{"v":422825,"n":"宣恩县","c":[]},{"v":422826,"n":"咸丰县","c":[]},{"v":422827,"n":"来凤县","c":[]},{"v":422828,"n":"鹤峰县","c":[]}]},{"v":429004,"n":"仙桃市","c":[{"v":659004526,"n":"仙桃市","c":[]}]},{"v":429005,"n":"潜江市","c":[{"v":659004527,"n":"潜江市","c":[]}]},{"v":429006,"n":"天门市","c":[{"v":659004528,"n":"天门市","c":[]}]},{"v":429021,"n":"神农架林区","c":[{"v":659004529,"n":"神农架林区","c":[]}]}]},{"v":430000,"n":"湖南省","c":[{"v":430100,"n":"长沙市","c":[{"v":430102,"n":"芙蓉区","c":[]},{"v":430103,"n":"天心区","c":[]},{"v":430104,"n":"岳麓区","c":[]},{"v":430105,"n":"开福区","c":[]},{"v":430111,"n":"雨花区","c":[]},{"v":430121,"n":"长沙县","c":[]},{"v":430122,"n":"望城区","c":[]},{"v":430124,"n":"宁乡县","c":[]},{"v":430181,"n":"浏阳市","c":[]}]},{"v":430200,"n":"株洲市","c":[{"v":430202,"n":"荷塘区","c":[]},{"v":430203,"n":"芦淞区","c":[]},{"v":430204,"n":"石峰区","c":[]},{"v":430211,"n":"天元区","c":[]},{"v":430221,"n":"株洲县","c":[]},{"v":430223,"n":"攸县","c":[]},{"v":430224,"n":"茶陵县","c":[]},{"v":430225,"n":"炎陵县","c":[]},{"v":430281,"n":"醴陵市","c":[]}]},{"v":430300,"n":"湘潭市","c":[{"v":430302,"n":"雨湖区","c":[]},{"v":430304,"n":"岳塘区","c":[]},{"v":430321,"n":"湘潭县","c":[]},{"v":430381,"n":"湘乡市","c":[]},{"v":430382,"n":"韶山市","c":[]}]},{"v":430400,"n":"衡阳市","c":[{"v":430405,"n":"珠晖区","c":[]},{"v":430406,"n":"雁峰区","c":[]},{"v":430407,"n":"石鼓区","c":[]},{"v":430408,"n":"蒸湘区","c":[]},{"v":430412,"n":"南岳区","c":[]},{"v":430421,"n":"衡阳县","c":[]},{"v":430422,"n":"衡南县","c":[]},{"v":430423,"n":"衡山县","c":[]},{"v":430424,"n":"衡东县","c":[]},{"v":430426,"n":"祁东县","c":[]},{"v":430481,"n":"耒阳市","c":[]},{"v":430482,"n":"常宁市","c":[]}]},{"v":430500,"n":"邵阳市","c":[{"v":430502,"n":"双清区","c":[]},{"v":430503,"n":"大祥区","c":[]},{"v":430511,"n":"北塔区","c":[]},{"v":430521,"n":"邵东县","c":[]},{"v":430522,"n":"新邵县","c":[]},{"v":430523,"n":"邵阳县","c":[]},{"v":430524,"n":"隆回县","c":[]},{"v":430525,"n":"洞口县","c":[]},{"v":430527,"n":"绥宁县","c":[]},{"v":430528,"n":"新宁县","c":[]},{"v":430529,"n":"城步苗族自治县","c":[]},{"v":430581,"n":"武冈市","c":[]}]},{"v":430600,"n":"岳阳市","c":[{"v":430602,"n":"岳阳楼区","c":[]},{"v":430603,"n":"云溪区","c":[]},{"v":430611,"n":"君山区","c":[]},{"v":430621,"n":"岳阳县","c":[]},{"v":430623,"n":"华容县","c":[]},{"v":430624,"n":"湘阴县","c":[]},{"v":430626,"n":"平江县","c":[]},{"v":430681,"n":"汨罗市","c":[]},{"v":430682,"n":"临湘市","c":[]}]},{"v":430700,"n":"常德市","c":[{"v":430702,"n":"武陵区","c":[]},{"v":430703,"n":"鼎城区","c":[]},{"v":430721,"n":"安乡县","c":[]},{"v":430722,"n":"汉寿县","c":[]},{"v":430723,"n":"澧县","c":[]},{"v":430724,"n":"临澧县","c":[]},{"v":430725,"n":"桃源县","c":[]},{"v":430726,"n":"石门县","c":[]},{"v":430781,"n":"津市市","c":[]}]},{"v":430800,"n":"张家界市","c":[{"v":430802,"n":"永定区","c":[]},{"v":430811,"n":"武陵源区","c":[]},{"v":430821,"n":"慈利县","c":[]},{"v":430822,"n":"桑植县","c":[]}]},{"v":430900,"n":"益阳市","c":[{"v":430902,"n":"资阳区","c":[]},{"v":430903,"n":"赫山区","c":[]},{"v":430921,"n":"南县","c":[]},{"v":430922,"n":"桃江县","c":[]},{"v":430923,"n":"安化县","c":[]},{"v":430981,"n":"沅江市","c":[]}]},{"v":431000,"n":"郴州市","c":[{"v":431002,"n":"北湖区","c":[]},{"v":431003,"n":"苏仙区","c":[]},{"v":431021,"n":"桂阳县","c":[]},{"v":431022,"n":"宜章县","c":[]},{"v":431023,"n":"永兴县","c":[]},{"v":431024,"n":"嘉禾县","c":[]},{"v":431025,"n":"临武县","c":[]},{"v":431026,"n":"汝城县","c":[]},{"v":431027,"n":"桂东县","c":[]},{"v":431028,"n":"安仁县","c":[]},{"v":431081,"n":"资兴市","c":[]}]},{"v":431100,"n":"永州市","c":[{"v":431102,"n":"零陵区","c":[]},{"v":431103,"n":"冷水滩区","c":[]},{"v":431121,"n":"祁阳县","c":[]},{"v":431122,"n":"东安县","c":[]},{"v":431123,"n":"双牌县","c":[]},{"v":431124,"n":"道县","c":[]},{"v":431125,"n":"江永县","c":[]},{"v":431126,"n":"宁远县","c":[]},{"v":431127,"n":"蓝山县","c":[]},{"v":431128,"n":"新田县","c":[]},{"v":431129,"n":"江华瑶族自治县","c":[]}]},{"v":431200,"n":"怀化市","c":[{"v":431202,"n":"鹤城区","c":[]},{"v":431221,"n":"中方县","c":[]},{"v":431222,"n":"沅陵县","c":[]},{"v":431223,"n":"辰溪县","c":[]},{"v":431224,"n":"溆浦县","c":[]},{"v":431225,"n":"会同县","c":[]},{"v":431226,"n":"麻阳苗族自治县","c":[]},{"v":431227,"n":"新晃侗族自治县","c":[]},{"v":431228,"n":"芷江侗族自治县","c":[]},{"v":431229,"n":"靖州苗族侗族自治县","c":[]},{"v":431230,"n":"通道侗族自治县","c":[]},{"v":431281,"n":"洪江市","c":[]}]},{"v":431300,"n":"娄底市","c":[{"v":431302,"n":"娄星区","c":[]},{"v":431321,"n":"双峰县","c":[]},{"v":431322,"n":"新化县","c":[]},{"v":431381,"n":"冷水江市","c":[]},{"v":431382,"n":"涟源市","c":[]}]},{"v":433100,"n":"湘西土家族苗族自治州","c":[{"v":433101,"n":"吉首市","c":[]},{"v":433122,"n":"泸溪县","c":[]},{"v":433123,"n":"凤凰县","c":[]},{"v":433124,"n":"花垣县","c":[]},{"v":433125,"n":"保靖县","c":[]},{"v":433126,"n":"古丈县","c":[]},{"v":433127,"n":"永顺县","c":[]},{"v":433130,"n":"龙山县","c":[]}]}]},{"v":440000,"n":"广东省","c":[{"v":440100,"n":"广州市","c":[{"v":440103,"n":"荔湾区","c":[]},{"v":440104,"n":"越秀区","c":[]},{"v":440105,"n":"海珠区","c":[]},{"v":440106,"n":"天河区","c":[]},{"v":440111,"n":"白云区","c":[]},{"v":440112,"n":"黄埔区","c":[]},{"v":440113,"n":"番禺区","c":[]},{"v":440114,"n":"花都区","c":[]},{"v":440115,"n":"南沙区","c":[]},{"v":440116,"n":"萝岗区","c":[]},{"v":440183,"n":"增城市","c":[]},{"v":440184,"n":"从化市","c":[]}]},{"v":440200,"n":"韶关市","c":[{"v":440203,"n":"武江区","c":[]},{"v":440204,"n":"浈江区","c":[]},{"v":440205,"n":"曲江区","c":[]},{"v":440222,"n":"始兴县","c":[]},{"v":440224,"n":"仁化县","c":[]},{"v":440229,"n":"翁源县","c":[]},{"v":440232,"n":"乳源瑶族自治县","c":[]},{"v":440233,"n":"新丰县","c":[]},{"v":440281,"n":"乐昌市","c":[]},{"v":440282,"n":"南雄市","c":[]}]},{"v":440300,"n":"深圳市","c":[{"v":440303,"n":"罗湖区","c":[]},{"v":440304,"n":"福田区","c":[]},{"v":440305,"n":"南山区","c":[]},{"v":440306,"n":"宝安区","c":[]},{"v":440307,"n":"龙岗区","c":[]},{"v":440308,"n":"盐田区","c":[]},{"v":440320,"n":"光明新区","c":[]},{"v":440321,"n":"坪山新区","c":[]},{"v":440322,"n":"大鹏新区","c":[]},{"v":440323,"n":"龙华新区","c":[]}]},{"v":440400,"n":"珠海市","c":[{"v":440402,"n":"香洲区","c":[]},{"v":440403,"n":"斗门区","c":[]},{"v":440404,"n":"金湾区","c":[]}]},{"v":440500,"n":"汕头市","c":[{"v":440507,"n":"龙湖区","c":[]},{"v":440511,"n":"金平区","c":[]},{"v":440512,"n":"濠江区","c":[]},{"v":440513,"n":"潮阳区","c":[]},{"v":440514,"n":"潮南区","c":[]},{"v":440515,"n":"澄海区","c":[]},{"v":440523,"n":"南澳县","c":[]}]},{"v":440600,"n":"佛山市","c":[{"v":440604,"n":"禅城区","c":[]},{"v":440605,"n":"南海区","c":[]},{"v":440606,"n":"顺德区","c":[]},{"v":440607,"n":"三水区","c":[]},{"v":440608,"n":"高明区","c":[]}]},{"v":440700,"n":"江门市","c":[{"v":440703,"n":"蓬江区","c":[]},{"v":440704,"n":"江海区","c":[]},{"v":440705,"n":"新会区","c":[]},{"v":440781,"n":"台山市","c":[]},{"v":440783,"n":"开平市","c":[]},{"v":440784,"n":"鹤山市","c":[]},{"v":440785,"n":"恩平市","c":[]}]},{"v":440800,"n":"湛江市","c":[{"v":440802,"n":"赤坎区","c":[]},{"v":440803,"n":"霞山区","c":[]},{"v":440804,"n":"坡头区","c":[]},{"v":440811,"n":"麻章区","c":[]},{"v":440823,"n":"遂溪县","c":[]},{"v":440825,"n":"徐闻县","c":[]},{"v":440881,"n":"廉江市","c":[]},{"v":440882,"n":"雷州市","c":[]},{"v":440883,"n":"吴川市","c":[]}]},{"v":440900,"n":"茂名市","c":[{"v":440902,"n":"茂南区","c":[]},{"v":440903,"n":"茂港区","c":[]},{"v":440923,"n":"电白县","c":[]},{"v":440981,"n":"高州市","c":[]},{"v":440982,"n":"化州市","c":[]},{"v":440983,"n":"信宜市","c":[]}]},{"v":441200,"n":"肇庆市","c":[{"v":441202,"n":"端州区","c":[]},{"v":441203,"n":"鼎湖区","c":[]},{"v":441223,"n":"广宁县","c":[]},{"v":441224,"n":"怀集县","c":[]},{"v":441225,"n":"封开县","c":[]},{"v":441226,"n":"德庆县","c":[]},{"v":441283,"n":"高要市","c":[]},{"v":441284,"n":"四会市","c":[]}]},{"v":441300,"n":"惠州市","c":[{"v":441302,"n":"惠城区","c":[]},{"v":441303,"n":"惠阳区","c":[]},{"v":441322,"n":"博罗县","c":[]},{"v":441323,"n":"惠东县","c":[]},{"v":441324,"n":"龙门县","c":[]}]},{"v":441400,"n":"梅州市","c":[{"v":441402,"n":"梅江区","c":[]},{"v":441421,"n":"梅县","c":[]},{"v":441422,"n":"大埔县","c":[]},{"v":441423,"n":"丰顺县","c":[]},{"v":441424,"n":"五华县","c":[]},{"v":441426,"n":"平远县","c":[]},{"v":441427,"n":"蕉岭县","c":[]},{"v":441481,"n":"兴宁市","c":[]}]},{"v":441500,"n":"汕尾市","c":[{"v":441502,"n":"城区","c":[]},{"v":441521,"n":"海丰县","c":[]},{"v":441523,"n":"陆河县","c":[]},{"v":441581,"n":"陆丰市","c":[]}]},{"v":441600,"n":"河源市","c":[{"v":441602,"n":"源城区","c":[]},{"v":441621,"n":"紫金县","c":[]},{"v":441622,"n":"龙川县","c":[]},{"v":441623,"n":"连平县","c":[]},{"v":441624,"n":"和平县","c":[]},{"v":441625,"n":"东源县","c":[]}]},{"v":441700,"n":"阳江市","c":[{"v":441702,"n":"江城区","c":[]},{"v":441721,"n":"阳西县","c":[]},{"v":441723,"n":"阳东县","c":[]},{"v":441781,"n":"阳春市","c":[]}]},{"v":441800,"n":"清远市","c":[{"v":441802,"n":"清城区","c":[]},{"v":441821,"n":"佛冈县","c":[]},{"v":441823,"n":"阳山县","c":[]},{"v":441825,"n":"连山壮族瑶族自治县","c":[]},{"v":441826,"n":"连南瑶族自治县","c":[]},{"v":441827,"n":"清新区","c":[]},{"v":441881,"n":"英德市","c":[]},{"v":441882,"n":"连州市","c":[]}]},{"v":441900,"n":"东莞市","c":[{"v":659004523,"n":"东莞市","c":[]}]},{"v":442000,"n":"中山市","c":[{"v":659004524,"n":"中山市","c":[]}]},{"v":442101,"n":"东沙群岛","c":[{"v":659004504,"n":"东沙群岛","c":[]}]},{"v":445100,"n":"潮州市","c":[{"v":445102,"n":"湘桥区","c":[]},{"v":445121,"n":"潮安区","c":[]},{"v":445122,"n":"饶平县","c":[]}]},{"v":445200,"n":"揭阳市","c":[{"v":445202,"n":"榕城区","c":[]},{"v":445221,"n":"揭东区","c":[]},{"v":445222,"n":"揭西县","c":[]},{"v":445224,"n":"惠来县","c":[]},{"v":445281,"n":"普宁市","c":[]}]},{"v":445300,"n":"云浮市","c":[{"v":445302,"n":"云城区","c":[]},{"v":445321,"n":"新兴县","c":[]},{"v":445322,"n":"郁南县","c":[]},{"v":445323,"n":"云安县","c":[]},{"v":445381,"n":"罗定市","c":[]}]}]},{"v":450000,"n":"广西壮族自治区","c":[{"v":450100,"n":"南宁市","c":[{"v":450102,"n":"兴宁区","c":[]},{"v":450103,"n":"青秀区","c":[]},{"v":450105,"n":"江南区","c":[]},{"v":450107,"n":"西乡塘区","c":[]},{"v":450108,"n":"良庆区","c":[]},{"v":450109,"n":"邕宁区","c":[]},{"v":450122,"n":"武鸣县","c":[]},{"v":450123,"n":"隆安县","c":[]},{"v":450124,"n":"马山县","c":[]},{"v":450125,"n":"上林县","c":[]},{"v":450126,"n":"宾阳县","c":[]},{"v":450127,"n":"横县","c":[]}]},{"v":450200,"n":"柳州市","c":[{"v":450202,"n":"城中区","c":[]},{"v":450203,"n":"鱼峰区","c":[]},{"v":450204,"n":"柳南区","c":[]},{"v":450205,"n":"柳北区","c":[]},{"v":450221,"n":"柳江县","c":[]},{"v":450222,"n":"柳城县","c":[]},{"v":450223,"n":"鹿寨县","c":[]},{"v":450224,"n":"融安县","c":[]},{"v":450225,"n":"融水苗族自治县","c":[]},{"v":450226,"n":"三江侗族自治县","c":[]}]},{"v":450300,"n":"桂林市","c":[{"v":450302,"n":"秀峰区","c":[]},{"v":450303,"n":"叠彩区","c":[]},{"v":450304,"n":"象山区","c":[]},{"v":450305,"n":"七星区","c":[]},{"v":450311,"n":"雁山区","c":[]},{"v":450321,"n":"阳朔县","c":[]},{"v":450322,"n":"临桂区","c":[]},{"v":450323,"n":"灵川县","c":[]},{"v":450324,"n":"全州县","c":[]},{"v":450325,"n":"兴安县","c":[]},{"v":450326,"n":"永福县","c":[]},{"v":450327,"n":"灌阳县","c":[]},{"v":450328,"n":"龙胜各族自治县","c":[]},{"v":450329,"n":"资源县","c":[]},{"v":450330,"n":"平乐县","c":[]},{"v":450331,"n":"荔浦县","c":[]},{"v":450332,"n":"恭城瑶族自治县","c":[]}]},{"v":450400,"n":"梧州市","c":[{"v":450403,"n":"万秀区","c":[]},{"v":450405,"n":"长洲区","c":[]},{"v":450406,"n":"龙圩区","c":[]},{"v":450421,"n":"苍梧县","c":[]},{"v":450422,"n":"藤县","c":[]},{"v":450423,"n":"蒙山县","c":[]},{"v":450481,"n":"岑溪市","c":[]}]},{"v":450500,"n":"北海市","c":[{"v":450502,"n":"海城区","c":[]},{"v":450503,"n":"银海区","c":[]},{"v":450512,"n":"铁山港区","c":[]},{"v":450521,"n":"合浦县","c":[]}]},{"v":450600,"n":"防城港市","c":[{"v":450602,"n":"港口区","c":[]},{"v":450603,"n":"防城区","c":[]},{"v":450621,"n":"上思县","c":[]},{"v":450681,"n":"东兴市","c":[]}]},{"v":450700,"n":"钦州市","c":[{"v":450702,"n":"钦南区","c":[]},{"v":450703,"n":"钦北区","c":[]},{"v":450721,"n":"灵山县","c":[]},{"v":450722,"n":"浦北县","c":[]}]},{"v":450800,"n":"贵港市","c":[{"v":450802,"n":"港北区","c":[]},{"v":450803,"n":"港南区","c":[]},{"v":450804,"n":"覃塘区","c":[]},{"v":450821,"n":"平南县","c":[]},{"v":450881,"n":"桂平市","c":[]}]},{"v":450900,"n":"玉林市","c":[{"v":450902,"n":"玉州区","c":[]},{"v":450903,"n":"福绵区","c":[]},{"v":450921,"n":"容县","c":[]},{"v":450922,"n":"陆川县","c":[]},{"v":450923,"n":"博白县","c":[]},{"v":450924,"n":"兴业县","c":[]},{"v":450981,"n":"北流市","c":[]}]},{"v":451000,"n":"百色市","c":[{"v":451002,"n":"右江区","c":[]},{"v":451021,"n":"田阳县","c":[]},{"v":451022,"n":"田东县","c":[]},{"v":451023,"n":"平果县","c":[]},{"v":451024,"n":"德保县","c":[]},{"v":451025,"n":"靖西县","c":[]},{"v":451026,"n":"那坡县","c":[]},{"v":451027,"n":"凌云县","c":[]},{"v":451028,"n":"乐业县","c":[]},{"v":451029,"n":"田林县","c":[]},{"v":451030,"n":"西林县","c":[]},{"v":451031,"n":"隆林各族自治县","c":[]}]},{"v":451100,"n":"贺州市","c":[{"v":451102,"n":"八步区","c":[]},{"v":451119,"n":"平桂管理区","c":[]},{"v":451121,"n":"昭平县","c":[]},{"v":451122,"n":"钟山县","c":[]},{"v":451123,"n":"富川瑶族自治县","c":[]}]},{"v":451200,"n":"河池市","c":[{"v":451202,"n":"金城江区","c":[]},{"v":451221,"n":"南丹县","c":[]},{"v":451222,"n":"天峨县","c":[]},{"v":451223,"n":"凤山县","c":[]},{"v":451224,"n":"东兰县","c":[]},{"v":451225,"n":"罗城仫佬族自治县","c":[]},{"v":451226,"n":"环江毛南族自治县","c":[]},{"v":451227,"n":"巴马瑶族自治县","c":[]},{"v":451228,"n":"都安瑶族自治县","c":[]},{"v":451229,"n":"大化瑶族自治县","c":[]},{"v":451281,"n":"宜州市","c":[]}]},{"v":451300,"n":"来宾市","c":[{"v":451302,"n":"兴宾区","c":[]},{"v":451321,"n":"忻城县","c":[]},{"v":451322,"n":"象州县","c":[]},{"v":451323,"n":"武宣县","c":[]},{"v":451324,"n":"金秀瑶族自治县","c":[]},{"v":451381,"n":"合山市","c":[]}]},{"v":451400,"n":"崇左市","c":[{"v":451402,"n":"江州区","c":[]},{"v":451421,"n":"扶绥县","c":[]},{"v":451422,"n":"宁明县","c":[]},{"v":451423,"n":"龙州县","c":[]},{"v":451424,"n":"大新县","c":[]},{"v":451425,"n":"天等县","c":[]},{"v":451481,"n":"凭祥市","c":[]}]}]},{"v":460000,"n":"海南省","c":[{"v":460100,"n":"海口市","c":[{"v":460105,"n":"秀英区","c":[]},{"v":460106,"n":"龙华区","c":[]},{"v":460107,"n":"琼山区","c":[]},{"v":460108,"n":"美兰区","c":[]}]},{"v":460200,"n":"三亚市","c":[{"v":659004505,"n":"三亚市","c":[]}]},{"v":460300,"n":"三沙市","c":[{"v":659004506,"n":"三沙市","c":[]}]},{"v":469001,"n":"五指山市","c":[{"v":659004507,"n":"五指山市","c":[]}]},{"v":469002,"n":"琼海市","c":[{"v":659004508,"n":"琼海市","c":[]}]},{"v":469003,"n":"儋州市","c":[{"v":659004509,"n":"儋州市","c":[]}]},{"v":469005,"n":"文昌市","c":[{"v":659004510,"n":"文昌市","c":[]}]},{"v":469006,"n":"万宁市","c":[{"v":659004511,"n":"万宁市","c":[]}]},{"v":469007,"n":"东方市","c":[{"v":659004512,"n":"东方市","c":[]}]},{"v":469025,"n":"定安县","c":[{"v":659004513,"n":"定安县","c":[]}]},{"v":469026,"n":"屯昌县","c":[{"v":659004514,"n":"屯昌县","c":[]}]},{"v":469027,"n":"澄迈县","c":[{"v":659004515,"n":"澄迈县","c":[]}]},{"v":469028,"n":"临高县","c":[{"v":659004516,"n":"临高县","c":[]}]},{"v":469030,"n":"白沙黎族自治县","c":[{"v":659004517,"n":"白沙黎族自治县","c":[]}]},{"v":469031,"n":"昌江黎族自治县","c":[{"v":659004518,"n":"昌江黎族自治县","c":[]}]},{"v":469033,"n":"乐东黎族自治县","c":[{"v":659004519,"n":"乐东黎族自治县","c":[]}]},{"v":469034,"n":"陵水黎族自治县","c":[{"v":659004520,"n":"陵水黎族自治县","c":[]}]},{"v":469035,"n":"保亭黎族苗族自治县","c":[{"v":659004521,"n":"保亭黎族苗族自治县","c":[]}]},{"v":469036,"n":"琼中黎族苗族自治县","c":[{"v":659004522,"n":"琼中黎族苗族自治县","c":[]}]}]},{"v":500000,"n":"重庆","c":[{"v":500100,"n":"重庆市","c":[{"v":500101,"n":"万州区","c":[]},{"v":500102,"n":"涪陵区","c":[]},{"v":500103,"n":"渝中区","c":[]},{"v":500104,"n":"大渡口区","c":[]},{"v":500105,"n":"江北区","c":[]},{"v":500106,"n":"沙坪坝区","c":[]},{"v":500107,"n":"九龙坡区","c":[]},{"v":500108,"n":"南岸区","c":[]},{"v":500109,"n":"北碚区","c":[]},{"v":500112,"n":"渝北区","c":[]},{"v":500113,"n":"巴南区","c":[]},{"v":500114,"n":"黔江区","c":[]},{"v":500115,"n":"长寿区","c":[]},{"v":500222,"n":"綦江区","c":[]},{"v":500223,"n":"潼南县","c":[]},{"v":500224,"n":"铜梁县","c":[]},{"v":500225,"n":"大足区","c":[]},{"v":500226,"n":"荣昌县","c":[]},{"v":500227,"n":"璧山县","c":[]},{"v":500228,"n":"梁平县","c":[]},{"v":500229,"n":"城口县","c":[]},{"v":500230,"n":"丰都县","c":[]},{"v":500231,"n":"垫江县","c":[]},{"v":500232,"n":"武隆县","c":[]},{"v":500233,"n":"忠县","c":[]},{"v":500234,"n":"开县","c":[]},{"v":500235,"n":"云阳县","c":[]},{"v":500236,"n":"奉节县","c":[]},{"v":500237,"n":"巫山县","c":[]},{"v":500238,"n":"巫溪县","c":[]},{"v":500240,"n":"石柱土家族自治县","c":[]},{"v":500241,"n":"秀山土家族苗族自治县","c":[]},{"v":500242,"n":"酉阳土家族苗族自治县","c":[]},{"v":500243,"n":"彭水苗族土家族自治县","c":[]},{"v":500381,"n":"江津区","c":[]},{"v":500382,"n":"合川区","c":[]},{"v":500383,"n":"永川区","c":[]},{"v":500384,"n":"南川区","c":[]}]}]},{"v":510000,"n":"四川省","c":[{"v":510100,"n":"成都市","c":[{"v":510104,"n":"锦江区","c":[]},{"v":510105,"n":"青羊区","c":[]},{"v":510106,"n":"金牛区","c":[]},{"v":510107,"n":"武侯区","c":[]},{"v":510108,"n":"成华区","c":[]},{"v":510112,"n":"龙泉驿区","c":[]},{"v":510113,"n":"青白江区","c":[]},{"v":510114,"n":"新都区","c":[]},{"v":510115,"n":"温江区","c":[]},{"v":510121,"n":"金堂县","c":[]},{"v":510122,"n":"双流县","c":[]},{"v":510124,"n":"郫县","c":[]},{"v":510129,"n":"大邑县","c":[]},{"v":510131,"n":"蒲江县","c":[]},{"v":510132,"n":"新津县","c":[]},{"v":510181,"n":"都江堰市","c":[]},{"v":510182,"n":"彭州市","c":[]},{"v":510183,"n":"邛崃市","c":[]},{"v":510184,"n":"崇州市","c":[]}]},{"v":510300,"n":"自贡市","c":[{"v":510302,"n":"自流井区","c":[]},{"v":510303,"n":"贡井区","c":[]},{"v":510304,"n":"大安区","c":[]},{"v":510311,"n":"沿滩区","c":[]},{"v":510321,"n":"荣县","c":[]},{"v":510322,"n":"富顺县","c":[]}]},{"v":510400,"n":"攀枝花市","c":[{"v":510402,"n":"东区","c":[]},{"v":510403,"n":"西区","c":[]},{"v":510411,"n":"仁和区","c":[]},{"v":510421,"n":"米易县","c":[]},{"v":510422,"n":"盐边县","c":[]}]},{"v":510500,"n":"泸州市","c":[{"v":510502,"n":"江阳区","c":[]},{"v":510503,"n":"纳溪区","c":[]},{"v":510504,"n":"龙马潭区","c":[]},{"v":510521,"n":"泸县","c":[]},{"v":510522,"n":"合江县","c":[]},{"v":510524,"n":"叙永县","c":[]},{"v":510525,"n":"古蔺县","c":[]}]},{"v":510600,"n":"德阳市","c":[{"v":510603,"n":"旌阳区","c":[]},{"v":510623,"n":"中江县","c":[]},{"v":510626,"n":"罗江县","c":[]},{"v":510681,"n":"广汉市","c":[]},{"v":510682,"n":"什邡市","c":[]},{"v":510683,"n":"绵竹市","c":[]}]},{"v":510700,"n":"绵阳市","c":[{"v":510703,"n":"涪城区","c":[]},{"v":510704,"n":"游仙区","c":[]},{"v":510722,"n":"三台县","c":[]},{"v":510723,"n":"盐亭县","c":[]},{"v":510724,"n":"安县","c":[]},{"v":510725,"n":"梓潼县","c":[]},{"v":510726,"n":"北川羌族自治县","c":[]},{"v":510727,"n":"平武县","c":[]},{"v":510781,"n":"江油市","c":[]}]},{"v":510800,"n":"广元市","c":[{"v":510802,"n":"利州区","c":[]},{"v":510811,"n":"昭化区","c":[]},{"v":510812,"n":"朝天区","c":[]},{"v":510821,"n":"旺苍县","c":[]},{"v":510822,"n":"青川县","c":[]},{"v":510823,"n":"剑阁县","c":[]},{"v":510824,"n":"苍溪县","c":[]}]},{"v":510900,"n":"遂宁市","c":[{"v":510903,"n":"船山区","c":[]},{"v":510904,"n":"安居区","c":[]},{"v":510921,"n":"蓬溪县","c":[]},{"v":510922,"n":"射洪县","c":[]},{"v":510923,"n":"大英县","c":[]}]},{"v":511000,"n":"内江市","c":[{"v":511002,"n":"市中区","c":[]},{"v":511011,"n":"东兴区","c":[]},{"v":511024,"n":"威远县","c":[]},{"v":511025,"n":"资中县","c":[]},{"v":511028,"n":"隆昌县","c":[]}]},{"v":511100,"n":"乐山市","c":[{"v":511102,"n":"市中区","c":[]},{"v":511111,"n":"沙湾区","c":[]},{"v":511112,"n":"五通桥区","c":[]},{"v":511113,"n":"金口河区","c":[]},{"v":511123,"n":"犍为县","c":[]},{"v":511124,"n":"井研县","c":[]},{"v":511126,"n":"夹江县","c":[]},{"v":511129,"n":"沐川县","c":[]},{"v":511132,"n":"峨边彝族自治县","c":[]},{"v":511133,"n":"马边彝族自治县","c":[]},{"v":511181,"n":"峨眉山市","c":[]}]},{"v":511300,"n":"南充市","c":[{"v":511302,"n":"顺庆区","c":[]},{"v":511303,"n":"高坪区","c":[]},{"v":511304,"n":"嘉陵区","c":[]},{"v":511321,"n":"南部县","c":[]},{"v":511322,"n":"营山县","c":[]},{"v":511323,"n":"蓬安县","c":[]},{"v":511324,"n":"仪陇县","c":[]},{"v":511325,"n":"西充县","c":[]},{"v":511381,"n":"阆中市","c":[]}]},{"v":511400,"n":"眉山市","c":[{"v":511402,"n":"东坡区","c":[]},{"v":511421,"n":"仁寿县","c":[]},{"v":511422,"n":"彭山县","c":[]},{"v":511423,"n":"洪雅县","c":[]},{"v":511424,"n":"丹棱县","c":[]},{"v":511425,"n":"青神县","c":[]}]},{"v":511500,"n":"宜宾市","c":[{"v":511502,"n":"翠屏区","c":[]},{"v":511521,"n":"宜宾县","c":[]},{"v":511522,"n":"南溪区","c":[]},{"v":511523,"n":"江安县","c":[]},{"v":511524,"n":"长宁县","c":[]},{"v":511525,"n":"高县","c":[]},{"v":511526,"n":"珙县","c":[]},{"v":511527,"n":"筠连县","c":[]},{"v":511528,"n":"兴文县","c":[]},{"v":511529,"n":"屏山县","c":[]}]},{"v":511600,"n":"广安市","c":[{"v":511602,"n":"广安区","c":[]},{"v":511603,"n":"前锋区","c":[]},{"v":511621,"n":"岳池县","c":[]},{"v":511622,"n":"武胜县","c":[]},{"v":511623,"n":"邻水县","c":[]},{"v":511681,"n":"华蓥市","c":[]}]},{"v":511700,"n":"达州市","c":[{"v":511702,"n":"通川区","c":[]},{"v":511721,"n":"达川区","c":[]},{"v":511722,"n":"宣汉县","c":[]},{"v":511723,"n":"开江县","c":[]},{"v":511724,"n":"大竹县","c":[]},{"v":511725,"n":"渠县","c":[]},{"v":511781,"n":"万源市","c":[]}]},{"v":511800,"n":"雅安市","c":[{"v":511802,"n":"雨城区","c":[]},{"v":511821,"n":"名山区","c":[]},{"v":511822,"n":"荥经县","c":[]},{"v":511823,"n":"汉源县","c":[]},{"v":511824,"n":"石棉县","c":[]},{"v":511825,"n":"天全县","c":[]},{"v":511826,"n":"芦山县","c":[]},{"v":511827,"n":"宝兴县","c":[]}]},{"v":511900,"n":"巴中市","c":[{"v":511902,"n":"巴州区","c":[]},{"v":511903,"n":"恩阳区","c":[]},{"v":511921,"n":"通江县","c":[]},{"v":511922,"n":"南江县","c":[]},{"v":511923,"n":"平昌县","c":[]}]},{"v":512000,"n":"资阳市","c":[{"v":512002,"n":"雁江区","c":[]},{"v":512021,"n":"安岳县","c":[]},{"v":512022,"n":"乐至县","c":[]},{"v":512081,"n":"简阳市","c":[]}]},{"v":513200,"n":"阿坝藏族羌族自治州","c":[{"v":513221,"n":"汶川县","c":[]},{"v":513222,"n":"理县","c":[]},{"v":513223,"n":"茂县","c":[]},{"v":513224,"n":"松潘县","c":[]},{"v":513225,"n":"九寨沟县","c":[]},{"v":513226,"n":"金川县","c":[]},{"v":513227,"n":"小金县","c":[]},{"v":513228,"n":"黑水县","c":[]},{"v":513229,"n":"马尔康县","c":[]},{"v":513230,"n":"壤塘县","c":[]},{"v":513231,"n":"阿坝县","c":[]},{"v":513232,"n":"若尔盖县","c":[]},{"v":513233,"n":"红原县","c":[]}]},{"v":513300,"n":"甘孜藏族自治州","c":[{"v":513321,"n":"康定县","c":[]},{"v":513322,"n":"泸定县","c":[]},{"v":513323,"n":"丹巴县","c":[]},{"v":513324,"n":"九龙县","c":[]},{"v":513325,"n":"雅江县","c":[]},{"v":513326,"n":"道孚县","c":[]},{"v":513327,"n":"炉霍县","c":[]},{"v":513328,"n":"甘孜县","c":[]},{"v":513329,"n":"新龙县","c":[]},{"v":513330,"n":"德格县","c":[]},{"v":513331,"n":"白玉县","c":[]},{"v":513332,"n":"石渠县","c":[]},{"v":513333,"n":"色达县","c":[]},{"v":513334,"n":"理塘县","c":[]},{"v":513335,"n":"巴塘县","c":[]},{"v":513336,"n":"乡城县","c":[]},{"v":513337,"n":"稻城县","c":[]},{"v":513338,"n":"得荣县","c":[]}]},{"v":513400,"n":"凉山彝族自治州","c":[{"v":513401,"n":"西昌市","c":[]},{"v":513422,"n":"木里藏族自治县","c":[]},{"v":513423,"n":"盐源县","c":[]},{"v":513424,"n":"德昌县","c":[]},{"v":513425,"n":"会理县","c":[]},{"v":513426,"n":"会东县","c":[]},{"v":513427,"n":"宁南县","c":[]},{"v":513428,"n":"普格县","c":[]},{"v":513429,"n":"布拖县","c":[]},{"v":513430,"n":"金阳县","c":[]},{"v":513431,"n":"昭觉县","c":[]},{"v":513432,"n":"喜德县","c":[]},{"v":513433,"n":"冕宁县","c":[]},{"v":513434,"n":"越西县","c":[]},{"v":513435,"n":"甘洛县","c":[]},{"v":513436,"n":"美姑县","c":[]},{"v":513437,"n":"雷波县","c":[]}]}]},{"v":520000,"n":"贵州省","c":[{"v":520100,"n":"贵阳市","c":[{"v":520102,"n":"南明区","c":[]},{"v":520103,"n":"云岩区","c":[]},{"v":520111,"n":"花溪区","c":[]},{"v":520112,"n":"乌当区","c":[]},{"v":520113,"n":"白云区","c":[]},{"v":520121,"n":"开阳县","c":[]},{"v":520122,"n":"息烽县","c":[]},{"v":520123,"n":"修文县","c":[]},{"v":520151,"n":"观山湖区","c":[]},{"v":520181,"n":"清镇市","c":[]}]},{"v":520200,"n":"六盘水市","c":[{"v":520201,"n":"钟山区","c":[]},{"v":520203,"n":"六枝特区","c":[]},{"v":520221,"n":"水城县","c":[]},{"v":520222,"n":"盘县","c":[]}]},{"v":520300,"n":"遵义市","c":[{"v":520302,"n":"红花岗区","c":[]},{"v":520303,"n":"汇川区","c":[]},{"v":520321,"n":"遵义县","c":[]},{"v":520322,"n":"桐梓县","c":[]},{"v":520323,"n":"绥阳县","c":[]},{"v":520324,"n":"正安县","c":[]},{"v":520325,"n":"道真仡佬族苗族自治县","c":[]},{"v":520326,"n":"务川仡佬族苗族自治县","c":[]},{"v":520327,"n":"凤冈县","c":[]},{"v":520328,"n":"湄潭县","c":[]},{"v":520329,"n":"余庆县","c":[]},{"v":520330,"n":"习水县","c":[]},{"v":520381,"n":"赤水市","c":[]},{"v":520382,"n":"仁怀市","c":[]}]},{"v":520400,"n":"安顺市","c":[{"v":520402,"n":"西秀区","c":[]},{"v":520421,"n":"平坝县","c":[]},{"v":520422,"n":"普定县","c":[]},{"v":520423,"n":"镇宁布依族苗族自治县","c":[]},{"v":520424,"n":"关岭布依族苗族自治县","c":[]},{"v":520425,"n":"紫云苗族布依族自治县","c":[]}]},{"v":522200,"n":"铜仁市","c":[{"v":522201,"n":"碧江区","c":[]},{"v":522222,"n":"江口县","c":[]},{"v":522223,"n":"玉屏侗族自治县","c":[]},{"v":522224,"n":"石阡县","c":[]},{"v":522225,"n":"思南县","c":[]},{"v":522226,"n":"印江土家族苗族自治县","c":[]},{"v":522227,"n":"德江县","c":[]},{"v":522228,"n":"沿河土家族自治县","c":[]},{"v":522229,"n":"松桃苗族自治县","c":[]},{"v":522230,"n":"万山区","c":[]}]},{"v":522300,"n":"黔西南布依族苗族自治州","c":[{"v":522301,"n":"兴义市","c":[]},{"v":522322,"n":"兴仁县","c":[]},{"v":522323,"n":"普安县","c":[]},{"v":522324,"n":"晴隆县","c":[]},{"v":522325,"n":"贞丰县","c":[]},{"v":522326,"n":"望谟县","c":[]},{"v":522327,"n":"册亨县","c":[]},{"v":522328,"n":"安龙县","c":[]}]},{"v":522400,"n":"毕节市","c":[{"v":522401,"n":"七星关区","c":[]},{"v":522422,"n":"大方县","c":[]},{"v":522423,"n":"黔西县","c":[]},{"v":522424,"n":"金沙县","c":[]},{"v":522425,"n":"织金县","c":[]},{"v":522426,"n":"纳雍县","c":[]},{"v":522427,"n":"威宁彝族回族苗族自治县","c":[]},{"v":522428,"n":"赫章县","c":[]},{"v":659004503,"n":"金海湖新区","c":[]}]},{"v":522600,"n":"黔东南苗族侗族自治州","c":[{"v":522601,"n":"凯里市","c":[]},{"v":522622,"n":"黄平县","c":[]},{"v":522623,"n":"施秉县","c":[]},{"v":522624,"n":"三穗县","c":[]},{"v":522625,"n":"镇远县","c":[]},{"v":522626,"n":"岑巩县","c":[]},{"v":522627,"n":"天柱县","c":[]},{"v":522628,"n":"锦屏县","c":[]},{"v":522629,"n":"剑河县","c":[]},{"v":522630,"n":"台江县","c":[]},{"v":522631,"n":"黎平县","c":[]},{"v":522632,"n":"榕江县","c":[]},{"v":522633,"n":"从江县","c":[]},{"v":522634,"n":"雷山县","c":[]},{"v":522635,"n":"麻江县","c":[]},{"v":522636,"n":"丹寨县","c":[]}]},{"v":522700,"n":"黔南布依族苗族自治州","c":[{"v":522701,"n":"都匀市","c":[]},{"v":522702,"n":"福泉市","c":[]},{"v":522722,"n":"荔波县","c":[]},{"v":522723,"n":"贵定县","c":[]},{"v":522725,"n":"瓮安县","c":[]},{"v":522726,"n":"独山县","c":[]},{"v":522727,"n":"平塘县","c":[]},{"v":522728,"n":"罗甸县","c":[]},{"v":522729,"n":"长顺县","c":[]},{"v":522730,"n":"龙里县","c":[]},{"v":522731,"n":"惠水县","c":[]},{"v":522732,"n":"三都水族自治县","c":[]}]}]},{"v":530000,"n":"云南省","c":[{"v":530100,"n":"昆明市","c":[{"v":530102,"n":"五华区","c":[]},{"v":530103,"n":"盘龙区","c":[]},{"v":530111,"n":"官渡区","c":[]},{"v":530112,"n":"西山区","c":[]},{"v":530113,"n":"东川区","c":[]},{"v":530121,"n":"呈贡区","c":[]},{"v":530122,"n":"晋宁县","c":[]},{"v":530124,"n":"富民县","c":[]},{"v":530125,"n":"宜良县","c":[]},{"v":530126,"n":"石林彝族自治县","c":[]},{"v":530127,"n":"嵩明县","c":[]},{"v":530128,"n":"禄劝彝族苗族自治县","c":[]},{"v":530129,"n":"寻甸回族彝族自治县","c":[]},{"v":530181,"n":"安宁市","c":[]}]},{"v":530300,"n":"曲靖市","c":[{"v":530302,"n":"麒麟区","c":[]},{"v":530321,"n":"马龙县","c":[]},{"v":530322,"n":"陆良县","c":[]},{"v":530323,"n":"师宗县","c":[]},{"v":530324,"n":"罗平县","c":[]},{"v":530325,"n":"富源县","c":[]},{"v":530326,"n":"会泽县","c":[]},{"v":530328,"n":"沾益县","c":[]},{"v":530381,"n":"宣威市","c":[]}]},{"v":530400,"n":"玉溪市","c":[{"v":530402,"n":"红塔区","c":[]},{"v":530421,"n":"江川县","c":[]},{"v":530422,"n":"澄江县","c":[]},{"v":530423,"n":"通海县","c":[]},{"v":530424,"n":"华宁县","c":[]},{"v":530425,"n":"易门县","c":[]},{"v":530426,"n":"峨山彝族自治县","c":[]},{"v":530427,"n":"新平彝族傣族自治县","c":[]},{"v":530428,"n":"元江哈尼族彝族傣族自治县","c":[]}]},{"v":530500,"n":"保山市","c":[{"v":530502,"n":"隆阳区","c":[]},{"v":530521,"n":"施甸县","c":[]},{"v":530522,"n":"腾冲县","c":[]},{"v":530523,"n":"龙陵县","c":[]},{"v":530524,"n":"昌宁县","c":[]}]},{"v":530600,"n":"昭通市","c":[{"v":530602,"n":"昭阳区","c":[]},{"v":530621,"n":"鲁甸县","c":[]},{"v":530622,"n":"巧家县","c":[]},{"v":530623,"n":"盐津县","c":[]},{"v":530624,"n":"大关县","c":[]},{"v":530625,"n":"永善县","c":[]},{"v":530626,"n":"绥江县","c":[]},{"v":530627,"n":"镇雄县","c":[]},{"v":530628,"n":"彝良县","c":[]},{"v":530629,"n":"威信县","c":[]},{"v":530630,"n":"水富县","c":[]}]},{"v":530700,"n":"丽江市","c":[{"v":530702,"n":"古城区","c":[]},{"v":530721,"n":"玉龙纳西族自治县","c":[]},{"v":530722,"n":"永胜县","c":[]},{"v":530723,"n":"华坪县","c":[]},{"v":530724,"n":"宁蒗彝族自治县","c":[]}]},{"v":530800,"n":"普洱市","c":[{"v":530802,"n":"思茅区","c":[]},{"v":530821,"n":"宁洱哈尼族彝族自治县","c":[]},{"v":530822,"n":"墨江哈尼族自治县","c":[]},{"v":530823,"n":"景东彝族自治县","c":[]},{"v":530824,"n":"景谷傣族彝族自治县","c":[]},{"v":530825,"n":"镇沅彝族哈尼族拉祜族自治县","c":[]},{"v":530826,"n":"江城哈尼族彝族自治县","c":[]},{"v":530827,"n":"孟连傣族拉祜族佤族自治县","c":[]},{"v":530828,"n":"澜沧拉祜族自治县","c":[]},{"v":530829,"n":"西盟佤族自治县","c":[]}]},{"v":530900,"n":"临沧市","c":[{"v":530902,"n":"临翔区","c":[]},{"v":530921,"n":"凤庆县","c":[]},{"v":530922,"n":"云县","c":[]},{"v":530923,"n":"永德县","c":[]},{"v":530924,"n":"镇康县","c":[]},{"v":530925,"n":"双江拉祜族佤族布朗族傣族自治县","c":[]},{"v":530926,"n":"耿马傣族佤族自治县","c":[]},{"v":530927,"n":"沧源佤族自治县","c":[]}]},{"v":532300,"n":"楚雄彝族自治州","c":[{"v":532301,"n":"楚雄市","c":[]},{"v":532322,"n":"双柏县","c":[]},{"v":532323,"n":"牟定县","c":[]},{"v":532324,"n":"南华县","c":[]},{"v":532325,"n":"姚安县","c":[]},{"v":532326,"n":"大姚县","c":[]},{"v":532327,"n":"永仁县","c":[]},{"v":532328,"n":"元谋县","c":[]},{"v":532329,"n":"武定县","c":[]},{"v":532331,"n":"禄丰县","c":[]}]},{"v":532500,"n":"红河哈尼族彝族自治州","c":[{"v":532501,"n":"个旧市","c":[]},{"v":532502,"n":"开远市","c":[]},{"v":532522,"n":"蒙自市","c":[]},{"v":532523,"n":"屏边苗族自治县","c":[]},{"v":532524,"n":"建水县","c":[]},{"v":532525,"n":"石屏县","c":[]},{"v":532526,"n":"弥勒市","c":[]},{"v":532527,"n":"泸西县","c":[]},{"v":532528,"n":"元阳县","c":[]},{"v":532529,"n":"红河县","c":[]},{"v":532530,"n":"金平苗族瑶族傣族自治县","c":[]},{"v":532531,"n":"绿春县","c":[]},{"v":532532,"n":"河口瑶族自治县","c":[]}]},{"v":532600,"n":"文山壮族苗族自治州","c":[{"v":532621,"n":"文山市","c":[]},{"v":532622,"n":"砚山县","c":[]},{"v":532623,"n":"西畴县","c":[]},{"v":532624,"n":"麻栗坡县","c":[]},{"v":532625,"n":"马关县","c":[]},{"v":532626,"n":"丘北县","c":[]},{"v":532627,"n":"广南县","c":[]},{"v":532628,"n":"富宁县","c":[]}]},{"v":532800,"n":"西双版纳傣族自治州","c":[{"v":532801,"n":"景洪市","c":[]},{"v":532822,"n":"勐海县","c":[]},{"v":532823,"n":"勐腊县","c":[]}]},{"v":532900,"n":"大理白族自治州","c":[{"v":532901,"n":"大理市","c":[]},{"v":532922,"n":"漾濞彝族自治县","c":[]},{"v":532923,"n":"祥云县","c":[]},{"v":532924,"n":"宾川县","c":[]},{"v":532925,"n":"弥渡县","c":[]},{"v":532926,"n":"南涧彝族自治县","c":[]},{"v":532927,"n":"巍山彝族回族自治县","c":[]},{"v":532928,"n":"永平县","c":[]},{"v":532929,"n":"云龙县","c":[]},{"v":532930,"n":"洱源县","c":[]},{"v":532931,"n":"剑川县","c":[]},{"v":532932,"n":"鹤庆县","c":[]}]},{"v":533100,"n":"德宏傣族景颇族自治州","c":[{"v":533102,"n":"瑞丽市","c":[]},{"v":533103,"n":"芒市","c":[]},{"v":533122,"n":"梁河县","c":[]},{"v":533123,"n":"盈江县","c":[]},{"v":533124,"n":"陇川县","c":[]}]},{"v":533300,"n":"怒江傈僳族自治州","c":[{"v":533321,"n":"泸水县","c":[]},{"v":533323,"n":"福贡县","c":[]},{"v":533324,"n":"贡山独龙族怒族自治县","c":[]},{"v":533325,"n":"兰坪白族普米族自治县","c":[]}]},{"v":533400,"n":"迪庆藏族自治州","c":[{"v":533421,"n":"香格里拉县","c":[]},{"v":533422,"n":"德钦县","c":[]},{"v":533423,"n":"维西傈僳族自治县","c":[]}]}]},{"v":540000,"n":"西藏自治区","c":[{"v":540100,"n":"拉萨市","c":[{"v":540102,"n":"城关区","c":[]},{"v":540121,"n":"林周县","c":[]},{"v":540122,"n":"当雄县","c":[]},{"v":540123,"n":"尼木县","c":[]},{"v":540124,"n":"曲水县","c":[]},{"v":540125,"n":"堆龙德庆县","c":[]},{"v":540126,"n":"达孜县","c":[]},{"v":540127,"n":"墨竹工卡县","c":[]}]},{"v":542100,"n":"昌都地区","c":[{"v":542121,"n":"昌都县","c":[]},{"v":542122,"n":"江达县","c":[]},{"v":542123,"n":"贡觉县","c":[]},{"v":542124,"n":"类乌齐县","c":[]},{"v":542125,"n":"丁青县","c":[]},{"v":542126,"n":"察雅县","c":[]},{"v":542127,"n":"八宿县","c":[]},{"v":542128,"n":"左贡县","c":[]},{"v":542129,"n":"芒康县","c":[]},{"v":542132,"n":"洛隆县","c":[]},{"v":542133,"n":"边坝县","c":[]}]},{"v":542200,"n":"山南地区","c":[{"v":542221,"n":"乃东县","c":[]},{"v":542222,"n":"扎囊县","c":[]},{"v":542223,"n":"贡嘎县","c":[]},{"v":542224,"n":"桑日县","c":[]},{"v":542225,"n":"琼结县","c":[]},{"v":542226,"n":"曲松县","c":[]},{"v":542227,"n":"措美县","c":[]},{"v":542228,"n":"洛扎县","c":[]},{"v":542229,"n":"加查县","c":[]},{"v":542231,"n":"隆子县","c":[]},{"v":542232,"n":"错那县","c":[]},{"v":542233,"n":"浪卡子县","c":[]}]},{"v":542300,"n":"日喀则地区","c":[{"v":542301,"n":"日喀则市","c":[]},{"v":542322,"n":"南木林县","c":[]},{"v":542323,"n":"江孜县","c":[]},{"v":542324,"n":"定日县","c":[]},{"v":542325,"n":"萨迦县","c":[]},{"v":542326,"n":"拉孜县","c":[]},{"v":542327,"n":"昂仁县","c":[]},{"v":542328,"n":"谢通门县","c":[]},{"v":542329,"n":"白朗县","c":[]},{"v":542330,"n":"仁布县","c":[]},{"v":542331,"n":"康马县","c":[]},{"v":542332,"n":"定结县","c":[]},{"v":542333,"n":"仲巴县","c":[]},{"v":542334,"n":"亚东县","c":[]},{"v":542335,"n":"吉隆县","c":[]},{"v":542336,"n":"聂拉木县","c":[]},{"v":542337,"n":"萨嘎县","c":[]},{"v":542338,"n":"岗巴县","c":[]}]},{"v":542400,"n":"那曲地区","c":[{"v":542421,"n":"那曲县","c":[]},{"v":542422,"n":"嘉黎县","c":[]},{"v":542423,"n":"比如县","c":[]},{"v":542424,"n":"聂荣县","c":[]},{"v":542425,"n":"安多县","c":[]},{"v":542426,"n":"申扎县","c":[]},{"v":542427,"n":"索县","c":[]},{"v":542428,"n":"班戈县","c":[]},{"v":542429,"n":"巴青县","c":[]},{"v":542430,"n":"尼玛县","c":[]},{"v":542432,"n":"双湖县","c":[]}]},{"v":542500,"n":"阿里地区","c":[{"v":542521,"n":"普兰县","c":[]},{"v":542522,"n":"札达县","c":[]},{"v":542523,"n":"噶尔县","c":[]},{"v":542524,"n":"日土县","c":[]},{"v":542525,"n":"革吉县","c":[]},{"v":542526,"n":"改则县","c":[]},{"v":542527,"n":"措勤县","c":[]}]},{"v":542600,"n":"林芝地区","c":[{"v":542621,"n":"林芝县","c":[]},{"v":542622,"n":"工布江达县","c":[]},{"v":542623,"n":"米林县","c":[]},{"v":542624,"n":"墨脱县","c":[]},{"v":542625,"n":"波密县","c":[]},{"v":542626,"n":"察隅县","c":[]},{"v":542627,"n":"朗县","c":[]}]}]},{"v":610000,"n":"陕西省","c":[{"v":610100,"n":"西安市","c":[{"v":610102,"n":"新城区","c":[]},{"v":610103,"n":"碑林区","c":[]},{"v":610104,"n":"莲湖区","c":[]},{"v":610111,"n":"灞桥区","c":[]},{"v":610112,"n":"未央区","c":[]},{"v":610113,"n":"雁塔区","c":[]},{"v":610114,"n":"阎良区","c":[]},{"v":610115,"n":"临潼区","c":[]},{"v":610116,"n":"长安区","c":[]},{"v":610122,"n":"蓝田县","c":[]},{"v":610124,"n":"周至县","c":[]},{"v":610125,"n":"户县","c":[]},{"v":610126,"n":"高陵县","c":[]}]},{"v":610200,"n":"铜川市","c":[{"v":610202,"n":"王益区","c":[]},{"v":610203,"n":"印台区","c":[]},{"v":610204,"n":"耀州区","c":[]},{"v":610222,"n":"宜君县","c":[]}]},{"v":610300,"n":"宝鸡市","c":[{"v":610302,"n":"渭滨区","c":[]},{"v":610303,"n":"金台区","c":[]},{"v":610304,"n":"陈仓区","c":[]},{"v":610322,"n":"凤翔县","c":[]},{"v":610323,"n":"岐山县","c":[]},{"v":610324,"n":"扶风县","c":[]},{"v":610326,"n":"眉县","c":[]},{"v":610327,"n":"陇县","c":[]},{"v":610328,"n":"千阳县","c":[]},{"v":610329,"n":"麟游县","c":[]},{"v":610330,"n":"凤县","c":[]},{"v":610331,"n":"太白县","c":[]}]},{"v":610400,"n":"咸阳市","c":[{"v":610402,"n":"秦都区","c":[]},{"v":610403,"n":"杨陵区","c":[]},{"v":610404,"n":"渭城区","c":[]},{"v":610422,"n":"三原县","c":[]},{"v":610423,"n":"泾阳县","c":[]},{"v":610424,"n":"乾县","c":[]},{"v":610425,"n":"礼泉县","c":[]},{"v":610426,"n":"永寿县","c":[]},{"v":610427,"n":"彬县","c":[]},{"v":610428,"n":"长武县","c":[]},{"v":610429,"n":"旬邑县","c":[]},{"v":610430,"n":"淳化县","c":[]},{"v":610431,"n":"武功县","c":[]},{"v":610481,"n":"兴平市","c":[]}]},{"v":610500,"n":"渭南市","c":[{"v":610502,"n":"临渭区","c":[]},{"v":610521,"n":"华县","c":[]},{"v":610522,"n":"潼关县","c":[]},{"v":610523,"n":"大荔县","c":[]},{"v":610524,"n":"合阳县","c":[]},{"v":610525,"n":"澄城县","c":[]},{"v":610526,"n":"蒲城县","c":[]},{"v":610527,"n":"白水县","c":[]},{"v":610528,"n":"富平县","c":[]},{"v":610581,"n":"韩城市","c":[]},{"v":610582,"n":"华阴市","c":[]}]},{"v":610600,"n":"延安市","c":[{"v":610602,"n":"宝塔区","c":[]},{"v":610621,"n":"延长县","c":[]},{"v":610622,"n":"延川县","c":[]},{"v":610623,"n":"子长县","c":[]},{"v":610624,"n":"安塞县","c":[]},{"v":610625,"n":"志丹县","c":[]},{"v":610626,"n":"吴起县","c":[]},{"v":610627,"n":"甘泉县","c":[]},{"v":610628,"n":"富县","c":[]},{"v":610629,"n":"洛川县","c":[]},{"v":610630,"n":"宜川县","c":[]},{"v":610631,"n":"黄龙县","c":[]},{"v":610632,"n":"黄陵县","c":[]}]},{"v":610700,"n":"汉中市","c":[{"v":610702,"n":"汉台区","c":[]},{"v":610721,"n":"南郑县","c":[]},{"v":610722,"n":"城固县","c":[]},{"v":610723,"n":"洋县","c":[]},{"v":610724,"n":"西乡县","c":[]},{"v":610725,"n":"勉县","c":[]},{"v":610726,"n":"宁强县","c":[]},{"v":610727,"n":"略阳县","c":[]},{"v":610728,"n":"镇巴县","c":[]},{"v":610729,"n":"留坝县","c":[]},{"v":610730,"n":"佛坪县","c":[]}]},{"v":610800,"n":"榆林市","c":[{"v":610802,"n":"榆阳区","c":[]},{"v":610821,"n":"神木县","c":[]},{"v":610822,"n":"府谷县","c":[]},{"v":610823,"n":"横山县","c":[]},{"v":610824,"n":"靖边县","c":[]},{"v":610825,"n":"定边县","c":[]},{"v":610826,"n":"绥德县","c":[]},{"v":610827,"n":"米脂县","c":[]},{"v":610828,"n":"佳县","c":[]},{"v":610829,"n":"吴堡县","c":[]},{"v":610830,"n":"清涧县","c":[]},{"v":610831,"n":"子洲县","c":[]}]},{"v":610900,"n":"安康市","c":[{"v":610902,"n":"汉滨区","c":[]},{"v":610921,"n":"汉阴县","c":[]},{"v":610922,"n":"石泉县","c":[]},{"v":610923,"n":"宁陕县","c":[]},{"v":610924,"n":"紫阳县","c":[]},{"v":610925,"n":"岚皋县","c":[]},{"v":610926,"n":"平利县","c":[]},{"v":610927,"n":"镇坪县","c":[]},{"v":610928,"n":"旬阳县","c":[]},{"v":610929,"n":"白河县","c":[]}]},{"v":611000,"n":"商洛市","c":[{"v":611002,"n":"商州区","c":[]},{"v":611021,"n":"洛南县","c":[]},{"v":611022,"n":"丹凤县","c":[]},{"v":611023,"n":"商南县","c":[]},{"v":611024,"n":"山阳县","c":[]},{"v":611025,"n":"镇安县","c":[]},{"v":611026,"n":"柞水县","c":[]}]}]},{"v":620000,"n":"甘肃省","c":[{"v":620100,"n":"兰州市","c":[{"v":620102,"n":"城关区","c":[]},{"v":620103,"n":"七里河区","c":[]},{"v":620104,"n":"西固区","c":[]},{"v":620105,"n":"安宁区","c":[]},{"v":620111,"n":"红古区","c":[]},{"v":620121,"n":"永登县","c":[]},{"v":620122,"n":"皋兰县","c":[]},{"v":620123,"n":"榆中县","c":[]}]},{"v":620200,"n":"嘉峪关市","c":[{"v":659004530,"n":"嘉峪关市","c":[]}]},{"v":620300,"n":"金昌市","c":[{"v":620302,"n":"金川区","c":[]},{"v":620321,"n":"永昌县","c":[]}]},{"v":620400,"n":"白银市","c":[{"v":620402,"n":"白银区","c":[]},{"v":620403,"n":"平川区","c":[]},{"v":620421,"n":"靖远县","c":[]},{"v":620422,"n":"会宁县","c":[]},{"v":620423,"n":"景泰县","c":[]}]},{"v":620500,"n":"天水市","c":[{"v":620502,"n":"秦州区","c":[]},{"v":620503,"n":"麦积区","c":[]},{"v":620521,"n":"清水县","c":[]},{"v":620522,"n":"秦安县","c":[]},{"v":620523,"n":"甘谷县","c":[]},{"v":620524,"n":"武山县","c":[]},{"v":620525,"n":"张家川回族自治县","c":[]}]},{"v":620600,"n":"武威市","c":[{"v":620602,"n":"凉州区","c":[]},{"v":620621,"n":"民勤县","c":[]},{"v":620622,"n":"古浪县","c":[]},{"v":620623,"n":"天祝藏族自治县","c":[]}]},{"v":620700,"n":"张掖市","c":[{"v":620702,"n":"甘州区","c":[]},{"v":620721,"n":"肃南裕固族自治县","c":[]},{"v":620722,"n":"民乐县","c":[]},{"v":620723,"n":"临泽县","c":[]},{"v":620724,"n":"高台县","c":[]},{"v":620725,"n":"山丹县","c":[]}]},{"v":620800,"n":"平凉市","c":[{"v":620802,"n":"崆峒区","c":[]},{"v":620821,"n":"泾川县","c":[]},{"v":620822,"n":"灵台县","c":[]},{"v":620823,"n":"崇信县","c":[]},{"v":620824,"n":"华亭县","c":[]},{"v":620825,"n":"庄浪县","c":[]},{"v":620826,"n":"静宁县","c":[]}]},{"v":620900,"n":"酒泉市","c":[{"v":620902,"n":"肃州区","c":[]},{"v":620921,"n":"金塔县","c":[]},{"v":620922,"n":"瓜州县","c":[]},{"v":620923,"n":"肃北蒙古族自治县","c":[]},{"v":620924,"n":"阿克塞哈萨克族自治县","c":[]},{"v":620981,"n":"玉门市","c":[]},{"v":620982,"n":"敦煌市","c":[]}]},{"v":621000,"n":"庆阳市","c":[{"v":621002,"n":"西峰区","c":[]},{"v":621021,"n":"庆城县","c":[]},{"v":621022,"n":"环县","c":[]},{"v":621023,"n":"华池县","c":[]},{"v":621024,"n":"合水县","c":[]},{"v":621025,"n":"正宁县","c":[]},{"v":621026,"n":"宁县","c":[]},{"v":621027,"n":"镇原县","c":[]}]},{"v":621100,"n":"定西市","c":[{"v":621102,"n":"安定区","c":[]},{"v":621121,"n":"通渭县","c":[]},{"v":621122,"n":"陇西县","c":[]},{"v":621123,"n":"渭源县","c":[]},{"v":621124,"n":"临洮县","c":[]},{"v":621125,"n":"漳县","c":[]},{"v":621126,"n":"岷县","c":[]}]},{"v":621200,"n":"陇南市","c":[{"v":621202,"n":"武都区","c":[]},{"v":621221,"n":"成县","c":[]},{"v":621222,"n":"文县","c":[]},{"v":621223,"n":"宕昌县","c":[]},{"v":621224,"n":"康县","c":[]},{"v":621225,"n":"西和县","c":[]},{"v":621226,"n":"礼县","c":[]},{"v":621227,"n":"徽县","c":[]},{"v":621228,"n":"两当县","c":[]}]},{"v":622900,"n":"临夏回族自治州","c":[{"v":622901,"n":"临夏市","c":[]},{"v":622921,"n":"临夏县","c":[]},{"v":622922,"n":"康乐县","c":[]},{"v":622923,"n":"永靖县","c":[]},{"v":622924,"n":"广河县","c":[]},{"v":622925,"n":"和政县","c":[]},{"v":622926,"n":"东乡族自治县","c":[]},{"v":622927,"n":"积石山保安族东乡族撒拉族自治县","c":[]}]},{"v":623000,"n":"甘南藏族自治州","c":[{"v":623001,"n":"合作市","c":[]},{"v":623021,"n":"临潭县","c":[]},{"v":623022,"n":"卓尼县","c":[]},{"v":623023,"n":"舟曲县","c":[]},{"v":623024,"n":"迭部县","c":[]},{"v":623025,"n":"玛曲县","c":[]},{"v":623026,"n":"碌曲县","c":[]},{"v":623027,"n":"夏河县","c":[]}]}]},{"v":630000,"n":"青海省","c":[{"v":630100,"n":"西宁市","c":[{"v":630102,"n":"城东区","c":[]},{"v":630103,"n":"城中区","c":[]},{"v":630104,"n":"城西区","c":[]},{"v":630105,"n":"城北区","c":[]},{"v":630121,"n":"大通回族土族自治县","c":[]},{"v":630122,"n":"湟中县","c":[]},{"v":630123,"n":"湟源县","c":[]}]},{"v":632100,"n":"海东市","c":[{"v":632121,"n":"平安县","c":[]},{"v":632122,"n":"民和回族土族自治县","c":[]},{"v":632123,"n":"乐都区","c":[]},{"v":632126,"n":"互助土族自治县","c":[]},{"v":632127,"n":"化隆回族自治县","c":[]},{"v":632128,"n":"循化撒拉族自治县","c":[]}]},{"v":632200,"n":"海北藏族自治州","c":[{"v":632221,"n":"门源回族自治县","c":[]},{"v":632222,"n":"祁连县","c":[]},{"v":632223,"n":"海晏县","c":[]},{"v":632224,"n":"刚察县","c":[]}]},{"v":632300,"n":"黄南藏族自治州","c":[{"v":632321,"n":"同仁县","c":[]},{"v":632322,"n":"尖扎县","c":[]},{"v":632323,"n":"泽库县","c":[]},{"v":632324,"n":"河南蒙古族自治县","c":[]}]},{"v":632500,"n":"海南藏族自治州","c":[{"v":632521,"n":"共和县","c":[]},{"v":632522,"n":"同德县","c":[]},{"v":632523,"n":"贵德县","c":[]},{"v":632524,"n":"兴海县","c":[]},{"v":632525,"n":"贵南县","c":[]}]},{"v":632600,"n":"果洛藏族自治州","c":[{"v":632621,"n":"玛沁县","c":[]},{"v":632622,"n":"班玛县","c":[]},{"v":632623,"n":"甘德县","c":[]},{"v":632624,"n":"达日县","c":[]},{"v":632625,"n":"久治县","c":[]},{"v":632626,"n":"玛多县","c":[]}]},{"v":632700,"n":"玉树藏族自治州","c":[{"v":632721,"n":"玉树市","c":[]},{"v":632722,"n":"杂多县","c":[]},{"v":632723,"n":"称多县","c":[]},{"v":632724,"n":"治多县","c":[]},{"v":632725,"n":"囊谦县","c":[]},{"v":632726,"n":"曲麻莱县","c":[]}]},{"v":632800,"n":"海西蒙古族藏族自治州","c":[{"v":632801,"n":"格尔木市","c":[]},{"v":632802,"n":"德令哈市","c":[]},{"v":632821,"n":"乌兰县","c":[]},{"v":632822,"n":"都兰县","c":[]},{"v":632823,"n":"天峻县","c":[]}]}]},{"v":640000,"n":"宁夏回族自治区","c":[{"v":640100,"n":"银川市","c":[{"v":640104,"n":"兴庆区","c":[]},{"v":640105,"n":"西夏区","c":[]},{"v":640106,"n":"金凤区","c":[]},{"v":640121,"n":"永宁县","c":[]},{"v":640122,"n":"贺兰县","c":[]},{"v":640181,"n":"灵武市","c":[]}]},{"v":640200,"n":"石嘴山市","c":[{"v":640202,"n":"大武口区","c":[]},{"v":640205,"n":"惠农区","c":[]},{"v":640221,"n":"平罗县","c":[]}]},{"v":640300,"n":"吴忠市","c":[{"v":640302,"n":"利通区","c":[]},{"v":640303,"n":"红寺堡区","c":[]},{"v":640323,"n":"盐池县","c":[]},{"v":640324,"n":"同心县","c":[]},{"v":640381,"n":"青铜峡市","c":[]}]},{"v":640400,"n":"固原市","c":[{"v":640402,"n":"原州区","c":[]},{"v":640422,"n":"西吉县","c":[]},{"v":640423,"n":"隆德县","c":[]},{"v":640424,"n":"泾源县","c":[]},{"v":640425,"n":"彭阳县","c":[]}]},{"v":640500,"n":"中卫市","c":[{"v":640502,"n":"沙坡头区","c":[]},{"v":640521,"n":"中宁县","c":[]},{"v":640522,"n":"海原县","c":[]}]}]},{"v":650000,"n":"新疆维吾尔自治区","c":[{"v":650100,"n":"乌鲁木齐市","c":[{"v":650102,"n":"天山区","c":[]},{"v":650103,"n":"沙依巴克区","c":[]},{"v":650104,"n":"新市区","c":[]},{"v":650105,"n":"水磨沟区","c":[]},{"v":650106,"n":"头屯河区","c":[]},{"v":650107,"n":"达坂城区","c":[]},{"v":650109,"n":"米东区","c":[]},{"v":650121,"n":"乌鲁木齐县","c":[]}]},{"v":650200,"n":"克拉玛依市","c":[{"v":650202,"n":"独山子区","c":[]},{"v":650203,"n":"克拉玛依区","c":[]},{"v":650204,"n":"白碱滩区","c":[]},{"v":650205,"n":"乌尔禾区","c":[]}]},{"v":652100,"n":"吐鲁番地区","c":[{"v":652101,"n":"吐鲁番市","c":[]},{"v":652122,"n":"鄯善县","c":[]},{"v":652123,"n":"托克逊县","c":[]}]},{"v":652200,"n":"哈密地区","c":[{"v":652201,"n":"哈密市","c":[]},{"v":652222,"n":"巴里坤哈萨克自治县","c":[]},{"v":652223,"n":"伊吾县","c":[]}]},{"v":652300,"n":"昌吉回族自治州","c":[{"v":652301,"n":"昌吉市","c":[]},{"v":652302,"n":"阜康市","c":[]},{"v":652323,"n":"呼图壁县","c":[]},{"v":652324,"n":"玛纳斯县","c":[]},{"v":652325,"n":"奇台县","c":[]},{"v":652327,"n":"吉木萨尔县","c":[]},{"v":652328,"n":"木垒哈萨克自治县","c":[]}]},{"v":652700,"n":"博尔塔拉蒙古自治州","c":[{"v":652701,"n":"博乐市","c":[]},{"v":652702,"n":"阿拉山口市","c":[]},{"v":652722,"n":"精河县","c":[]},{"v":652723,"n":"温泉县","c":[]}]},{"v":652800,"n":"巴音郭楞蒙古自治州","c":[{"v":652801,"n":"库尔勒市","c":[]},{"v":652822,"n":"轮台县","c":[]},{"v":652823,"n":"尉犁县","c":[]},{"v":652824,"n":"若羌县","c":[]},{"v":652825,"n":"且末县","c":[]},{"v":652826,"n":"焉耆回族自治县","c":[]},{"v":652827,"n":"和静县","c":[]},{"v":652828,"n":"和硕县","c":[]},{"v":652829,"n":"博湖县","c":[]}]},{"v":652900,"n":"阿克苏地区","c":[{"v":652901,"n":"阿克苏市","c":[]},{"v":652922,"n":"温宿县","c":[]},{"v":652923,"n":"库车县","c":[]},{"v":652924,"n":"沙雅县","c":[]},{"v":652925,"n":"新和县","c":[]},{"v":652926,"n":"拜城县","c":[]},{"v":652927,"n":"乌什县","c":[]},{"v":652928,"n":"阿瓦提县","c":[]},{"v":652929,"n":"柯坪县","c":[]}]},{"v":653000,"n":"克孜勒苏柯尔克孜自治州","c":[{"v":653001,"n":"阿图什市","c":[]},{"v":653022,"n":"阿克陶县","c":[]},{"v":653023,"n":"阿合奇县","c":[]},{"v":653024,"n":"乌恰县","c":[]}]},{"v":653100,"n":"喀什地区","c":[{"v":653101,"n":"喀什市","c":[]},{"v":653121,"n":"疏附县","c":[]},{"v":653122,"n":"疏勒县","c":[]},{"v":653123,"n":"英吉沙县","c":[]},{"v":653124,"n":"泽普县","c":[]},{"v":653125,"n":"莎车县","c":[]},{"v":653126,"n":"叶城县","c":[]},{"v":653127,"n":"麦盖提县","c":[]},{"v":653128,"n":"岳普湖县","c":[]},{"v":653129,"n":"伽师县","c":[]},{"v":653130,"n":"巴楚县","c":[]},{"v":653131,"n":"塔什库尔干塔吉克自治县","c":[]}]},{"v":653200,"n":"和田地区","c":[{"v":653201,"n":"和田市","c":[]},{"v":653221,"n":"和田县","c":[]},{"v":653222,"n":"墨玉县","c":[]},{"v":653223,"n":"皮山县","c":[]},{"v":653224,"n":"洛浦县","c":[]},{"v":653225,"n":"策勒县","c":[]},{"v":653226,"n":"于田县","c":[]},{"v":653227,"n":"民丰县","c":[]}]},{"v":654000,"n":"伊犁哈萨克自治州","c":[{"v":654002,"n":"伊宁市","c":[]},{"v":654003,"n":"奎屯市","c":[]},{"v":654021,"n":"伊宁县","c":[]},{"v":654022,"n":"察布查尔锡伯自治县","c":[]},{"v":654023,"n":"霍城县","c":[]},{"v":654024,"n":"巩留县","c":[]},{"v":654025,"n":"新源县","c":[]},{"v":654026,"n":"昭苏县","c":[]},{"v":654027,"n":"特克斯县","c":[]},{"v":654028,"n":"尼勒克县","c":[]}]},{"v":654200,"n":"塔城地区","c":[{"v":654201,"n":"塔城市","c":[]},{"v":654202,"n":"乌苏市","c":[]},{"v":654221,"n":"额敏县","c":[]},{"v":654223,"n":"沙湾县","c":[]},{"v":654224,"n":"托里县","c":[]},{"v":654225,"n":"裕民县","c":[]},{"v":654226,"n":"和布克赛尔蒙古自治县","c":[]}]},{"v":654300,"n":"阿勒泰地区","c":[{"v":654301,"n":"阿勒泰市","c":[]},{"v":654321,"n":"布尔津县","c":[]},{"v":654322,"n":"富蕴县","c":[]},{"v":654323,"n":"福海县","c":[]},{"v":654324,"n":"哈巴河县","c":[]},{"v":654325,"n":"青河县","c":[]},{"v":654326,"n":"吉木乃县","c":[]}]},{"v":659001,"n":"石河子市","c":[{"v":659004531,"n":"石河子市","c":[]}]},{"v":659002,"n":"阿拉尔市","c":[{"v":659004532,"n":"阿拉尔市","c":[]}]},{"v":659003,"n":"图木舒克市","c":[{"v":659004533,"n":"图木舒克市","c":[]}]},{"v":659004,"n":"五家渠市","c":[{"v":659004534,"n":"五家渠市","c":[]}]}]},{"v":710000,"n":"台湾","c":[{"v":710100,"n":"台北市","c":[{"v":710101,"n":"中正区","c":[]},{"v":710102,"n":"大同区","c":[]},{"v":710103,"n":"中山区","c":[]},{"v":710104,"n":"松山区","c":[]},{"v":710105,"n":"大安区","c":[]},{"v":710106,"n":"万华区","c":[]},{"v":710107,"n":"信义区","c":[]},{"v":710108,"n":"士林区","c":[]},{"v":710109,"n":"北投区","c":[]},{"v":710110,"n":"内湖区","c":[]},{"v":710111,"n":"南港区","c":[]},{"v":710112,"n":"文山区","c":[]}]},{"v":710200,"n":"高雄市","c":[{"v":710201,"n":"新兴区","c":[]},{"v":710202,"n":"前金区","c":[]},{"v":710203,"n":"芩雅区","c":[]},{"v":710204,"n":"盐埕区","c":[]},{"v":710205,"n":"鼓山区","c":[]},{"v":710206,"n":"旗津区","c":[]},{"v":710207,"n":"前镇区","c":[]},{"v":710208,"n":"三民区","c":[]},{"v":710209,"n":"左营区","c":[]},{"v":710210,"n":"楠梓区","c":[]},{"v":710211,"n":"小港区","c":[]},{"v":710241,"n":"苓雅区","c":[]},{"v":710242,"n":"仁武区","c":[]},{"v":710243,"n":"大社区","c":[]},{"v":710244,"n":"冈山区","c":[]},{"v":710245,"n":"路竹区","c":[]},{"v":710246,"n":"阿莲区","c":[]},{"v":710247,"n":"田寮区","c":[]},{"v":710248,"n":"燕巢区","c":[]},{"v":710249,"n":"桥头区","c":[]},{"v":710250,"n":"梓官区","c":[]},{"v":710251,"n":"弥陀区","c":[]},{"v":710252,"n":"永安区","c":[]},{"v":710253,"n":"湖内区","c":[]},{"v":710254,"n":"凤山区","c":[]},{"v":710255,"n":"大寮区","c":[]},{"v":710256,"n":"林园区","c":[]},{"v":710257,"n":"鸟松区","c":[]},{"v":710258,"n":"大树区","c":[]},{"v":710259,"n":"旗山区","c":[]},{"v":710260,"n":"美浓区","c":[]},{"v":710261,"n":"六龟区","c":[]},{"v":710262,"n":"内门区","c":[]},{"v":710263,"n":"杉林区","c":[]},{"v":710264,"n":"甲仙区","c":[]},{"v":710265,"n":"桃源区","c":[]},{"v":710266,"n":"那玛夏区","c":[]},{"v":710267,"n":"茂林区","c":[]},{"v":710268,"n":"茄萣区","c":[]}]},{"v":710300,"n":"台南市","c":[{"v":710301,"n":"中西区","c":[]},{"v":710302,"n":"东区","c":[]},{"v":710303,"n":"南区","c":[]},{"v":710304,"n":"北区","c":[]},{"v":710305,"n":"安平区","c":[]},{"v":710306,"n":"安南区","c":[]},{"v":710339,"n":"永康区","c":[]},{"v":710340,"n":"归仁区","c":[]},{"v":710341,"n":"新化区","c":[]},{"v":710342,"n":"左镇区","c":[]},{"v":710343,"n":"玉井区","c":[]},{"v":710344,"n":"楠西区","c":[]},{"v":710345,"n":"南化区","c":[]},{"v":710346,"n":"仁德区","c":[]},{"v":710347,"n":"关庙区","c":[]},{"v":710348,"n":"龙崎区","c":[]},{"v":710349,"n":"官田区","c":[]},{"v":710350,"n":"麻豆区","c":[]},{"v":710351,"n":"佳里区","c":[]},{"v":710352,"n":"西港区","c":[]},{"v":710353,"n":"七股区","c":[]},{"v":710354,"n":"将军区","c":[]},{"v":710355,"n":"学甲区","c":[]},{"v":710356,"n":"北门区","c":[]},{"v":710357,"n":"新营区","c":[]},{"v":710358,"n":"后壁区","c":[]},{"v":710359,"n":"白河区","c":[]},{"v":710360,"n":"东山区","c":[]},{"v":710361,"n":"六甲区","c":[]},{"v":710362,"n":"下营区","c":[]},{"v":710363,"n":"柳营区","c":[]},{"v":710364,"n":"盐水区","c":[]},{"v":710365,"n":"善化区","c":[]},{"v":710366,"n":"大内区","c":[]},{"v":710367,"n":"山上区","c":[]},{"v":710368,"n":"新市区","c":[]},{"v":710369,"n":"安定区","c":[]}]},{"v":710400,"n":"台中市","c":[{"v":710401,"n":"中区","c":[]},{"v":710402,"n":"东区","c":[]},{"v":710403,"n":"南区","c":[]},{"v":710404,"n":"西区","c":[]},{"v":710405,"n":"北区","c":[]},{"v":710406,"n":"北屯区","c":[]},{"v":710407,"n":"西屯区","c":[]},{"v":710408,"n":"南屯区","c":[]},{"v":710431,"n":"太平区","c":[]},{"v":710432,"n":"大里区","c":[]},{"v":710433,"n":"雾峰区","c":[]},{"v":710434,"n":"乌日区","c":[]},{"v":710435,"n":"丰原区","c":[]},{"v":710436,"n":"后里区","c":[]},{"v":710437,"n":"石冈区","c":[]},{"v":710438,"n":"东势区","c":[]},{"v":710439,"n":"和平区","c":[]},{"v":710440,"n":"新社区","c":[]},{"v":710441,"n":"潭子区","c":[]},{"v":710442,"n":"大雅区","c":[]},{"v":710443,"n":"神冈区","c":[]},{"v":710444,"n":"大肚区","c":[]},{"v":710445,"n":"沙鹿区","c":[]},{"v":710446,"n":"龙井区","c":[]},{"v":710447,"n":"梧栖区","c":[]},{"v":710448,"n":"清水区","c":[]},{"v":710449,"n":"大甲区","c":[]},{"v":710450,"n":"外埔区","c":[]},{"v":710451,"n":"大安区","c":[]}]},{"v":710500,"n":"金门县","c":[{"v":710507,"n":"金沙镇","c":[]},{"v":710508,"n":"金湖镇","c":[]},{"v":710509,"n":"金宁乡","c":[]},{"v":710510,"n":"金城镇","c":[]},{"v":710511,"n":"烈屿乡","c":[]},{"v":710512,"n":"乌坵乡","c":[]}]},{"v":710600,"n":"南投县","c":[{"v":710614,"n":"南投市","c":[]},{"v":710615,"n":"中寮乡","c":[]},{"v":710616,"n":"草屯镇","c":[]},{"v":710617,"n":"国姓乡","c":[]},{"v":710618,"n":"埔里镇","c":[]},{"v":710619,"n":"仁爱乡","c":[]},{"v":710620,"n":"名间乡","c":[]},{"v":710621,"n":"集集镇","c":[]},{"v":710622,"n":"水里乡","c":[]},{"v":710623,"n":"鱼池乡","c":[]},{"v":710624,"n":"信义乡","c":[]},{"v":710625,"n":"竹山镇","c":[]},{"v":710626,"n":"鹿谷乡","c":[]}]},{"v":710700,"n":"基隆市","c":[{"v":710701,"n":"仁爱区","c":[]},{"v":710702,"n":"信义区","c":[]},{"v":710703,"n":"中正区","c":[]},{"v":710704,"n":"中山区","c":[]},{"v":710705,"n":"安乐区","c":[]},{"v":710706,"n":"暖暖区","c":[]},{"v":710707,"n":"七堵区","c":[]}]},{"v":710800,"n":"新竹市","c":[{"v":710801,"n":"东区","c":[]},{"v":710802,"n":"北区","c":[]},{"v":710803,"n":"香山区","c":[]}]},{"v":710900,"n":"嘉义市","c":[{"v":710901,"n":"东区","c":[]},{"v":710902,"n":"西区","c":[]}]},{"v":711100,"n":"新北市","c":[{"v":711130,"n":"万里区","c":[]},{"v":711131,"n":"金山区","c":[]},{"v":711132,"n":"板桥区","c":[]},{"v":711133,"n":"汐止区","c":[]},{"v":711134,"n":"深坑区","c":[]},{"v":711135,"n":"石碇区","c":[]},{"v":711136,"n":"瑞芳区","c":[]},{"v":711137,"n":"平溪区","c":[]},{"v":711138,"n":"双溪区","c":[]},{"v":711139,"n":"贡寮区","c":[]},{"v":711140,"n":"新店区","c":[]},{"v":711141,"n":"坪林区","c":[]},{"v":711142,"n":"乌来区","c":[]},{"v":711143,"n":"永和区","c":[]},{"v":711144,"n":"中和区","c":[]},{"v":711145,"n":"土城区","c":[]},{"v":711146,"n":"三峡区","c":[]},{"v":711147,"n":"树林区","c":[]},{"v":711148,"n":"莺歌区","c":[]},{"v":711149,"n":"三重区","c":[]},{"v":711150,"n":"新庄区","c":[]},{"v":711151,"n":"泰山区","c":[]},{"v":711152,"n":"林口区","c":[]},{"v":711153,"n":"芦洲区","c":[]},{"v":711154,"n":"五股区","c":[]},{"v":711155,"n":"八里区","c":[]},{"v":711156,"n":"淡水区","c":[]},{"v":711157,"n":"三芝区","c":[]},{"v":711158,"n":"石门区","c":[]}]},{"v":711200,"n":"宜兰县","c":[{"v":711214,"n":"宜兰市","c":[]},{"v":711215,"n":"头城镇","c":[]},{"v":711216,"n":"礁溪乡","c":[]},{"v":711217,"n":"壮围乡","c":[]},{"v":711218,"n":"员山乡","c":[]},{"v":711219,"n":"罗东镇","c":[]},{"v":711220,"n":"三星乡","c":[]},{"v":711221,"n":"大同乡","c":[]},{"v":711222,"n":"五结乡","c":[]},{"v":711223,"n":"冬山乡","c":[]},{"v":711224,"n":"苏澳镇","c":[]},{"v":711225,"n":"南澳乡","c":[]},{"v":711226,"n":"钓鱼台","c":[]}]},{"v":711300,"n":"新竹县","c":[{"v":711314,"n":"竹北市","c":[]},{"v":711315,"n":"湖口乡","c":[]},{"v":711316,"n":"新丰乡","c":[]},{"v":711317,"n":"新埔镇","c":[]},{"v":711318,"n":"关西镇","c":[]},{"v":711319,"n":"芎林乡","c":[]},{"v":711320,"n":"宝山乡","c":[]},{"v":711321,"n":"竹东镇","c":[]},{"v":711322,"n":"五峰乡","c":[]},{"v":711323,"n":"横山乡","c":[]},{"v":711324,"n":"尖石乡","c":[]},{"v":711325,"n":"北埔乡","c":[]},{"v":711326,"n":"峨眉乡","c":[]}]},{"v":711400,"n":"桃园县","c":[{"v":711414,"n":"中坜市","c":[]},{"v":711415,"n":"平镇市","c":[]},{"v":711416,"n":"龙潭乡","c":[]},{"v":711417,"n":"杨梅市","c":[]},{"v":711418,"n":"新屋乡","c":[]},{"v":711419,"n":"观音乡","c":[]},{"v":711420,"n":"桃园市","c":[]},{"v":711421,"n":"龟山乡","c":[]},{"v":711422,"n":"八德市","c":[]},{"v":711423,"n":"大溪镇","c":[]},{"v":711424,"n":"复兴乡","c":[]},{"v":711425,"n":"大园乡","c":[]},{"v":711426,"n":"芦竹乡","c":[]}]},{"v":711500,"n":"苗栗县","c":[{"v":711519,"n":"竹南镇","c":[]},{"v":711520,"n":"头份镇","c":[]},{"v":711521,"n":"三湾乡","c":[]},{"v":711522,"n":"南庄乡","c":[]},{"v":711523,"n":"狮潭乡","c":[]},{"v":711524,"n":"后龙镇","c":[]},{"v":711525,"n":"通霄镇","c":[]},{"v":711526,"n":"苑里镇","c":[]},{"v":711527,"n":"苗栗市","c":[]},{"v":711528,"n":"造桥乡","c":[]},{"v":711529,"n":"头屋乡","c":[]},{"v":711530,"n":"公馆乡","c":[]},{"v":711531,"n":"大湖乡","c":[]},{"v":711532,"n":"泰安乡","c":[]},{"v":711533,"n":"铜锣乡","c":[]},{"v":711534,"n":"三义乡","c":[]},{"v":711535,"n":"西湖乡","c":[]},{"v":711536,"n":"卓兰镇","c":[]}]},{"v":711700,"n":"彰化县","c":[{"v":711727,"n":"彰化市","c":[]},{"v":711728,"n":"芬园乡","c":[]},{"v":711729,"n":"花坛乡","c":[]},{"v":711730,"n":"秀水乡","c":[]},{"v":711731,"n":"鹿港镇","c":[]},{"v":711732,"n":"福兴乡","c":[]},{"v":711733,"n":"线西乡","c":[]},{"v":711734,"n":"和美镇","c":[]},{"v":711735,"n":"伸港乡","c":[]},{"v":711736,"n":"员林镇","c":[]},{"v":711737,"n":"社头乡","c":[]},{"v":711738,"n":"永靖乡","c":[]},{"v":711739,"n":"埔心乡","c":[]},{"v":711740,"n":"溪湖镇","c":[]},{"v":711741,"n":"大村乡","c":[]},{"v":711742,"n":"埔盐乡","c":[]},{"v":711743,"n":"田中镇","c":[]},{"v":711744,"n":"北斗镇","c":[]},{"v":711745,"n":"田尾乡","c":[]},{"v":711746,"n":"埤头乡","c":[]},{"v":711747,"n":"溪州乡","c":[]},{"v":711748,"n":"竹塘乡","c":[]},{"v":711749,"n":"二林镇","c":[]},{"v":711750,"n":"大城乡","c":[]},{"v":711751,"n":"芳苑乡","c":[]},{"v":711752,"n":"二水乡","c":[]}]},{"v":711900,"n":"嘉义县","c":[{"v":711919,"n":"番路乡","c":[]},{"v":711920,"n":"梅山乡","c":[]},{"v":711921,"n":"竹崎乡","c":[]},{"v":711922,"n":"阿里山乡","c":[]},{"v":711923,"n":"中埔乡","c":[]},{"v":711924,"n":"大埔乡","c":[]},{"v":711925,"n":"水上乡","c":[]},{"v":711926,"n":"鹿草乡","c":[]},{"v":711927,"n":"太保市","c":[]},{"v":711928,"n":"朴子市","c":[]},{"v":711929,"n":"东石乡","c":[]},{"v":711930,"n":"六脚乡","c":[]},{"v":711931,"n":"新港乡","c":[]},{"v":711932,"n":"民雄乡","c":[]},{"v":711933,"n":"大林镇","c":[]},{"v":711934,"n":"溪口乡","c":[]},{"v":711935,"n":"义竹乡","c":[]},{"v":711936,"n":"布袋镇","c":[]}]},{"v":712100,"n":"云林县","c":[{"v":712121,"n":"斗南镇","c":[]},{"v":712122,"n":"大埤乡","c":[]},{"v":712123,"n":"虎尾镇","c":[]},{"v":712124,"n":"土库镇","c":[]},{"v":712125,"n":"褒忠乡","c":[]},{"v":712126,"n":"东势乡","c":[]},{"v":712127,"n":"台西乡","c":[]},{"v":712128,"n":"仑背乡","c":[]},{"v":712129,"n":"麦寮乡","c":[]},{"v":712130,"n":"斗六市","c":[]},{"v":712131,"n":"林内乡","c":[]},{"v":712132,"n":"古坑乡","c":[]},{"v":712133,"n":"莿桐乡","c":[]},{"v":712134,"n":"西螺镇","c":[]},{"v":712135,"n":"二仑乡","c":[]},{"v":712136,"n":"北港镇","c":[]},{"v":712137,"n":"水林乡","c":[]},{"v":712138,"n":"口湖乡","c":[]},{"v":712139,"n":"四湖乡","c":[]},{"v":712140,"n":"元长乡","c":[]}]},{"v":712400,"n":"屏东县","c":[{"v":712434,"n":"屏东市","c":[]},{"v":712435,"n":"三地门乡","c":[]},{"v":712436,"n":"雾台乡","c":[]},{"v":712437,"n":"玛家乡","c":[]},{"v":712438,"n":"九如乡","c":[]},{"v":712439,"n":"里港乡","c":[]},{"v":712440,"n":"高树乡","c":[]},{"v":712441,"n":"盐埔乡","c":[]},{"v":712442,"n":"长治乡","c":[]},{"v":712443,"n":"麟洛乡","c":[]},{"v":712444,"n":"竹田乡","c":[]},{"v":712445,"n":"内埔乡","c":[]},{"v":712446,"n":"万丹乡","c":[]},{"v":712447,"n":"潮州镇","c":[]},{"v":712448,"n":"泰武乡","c":[]},{"v":712449,"n":"来义乡","c":[]},{"v":712450,"n":"万峦乡","c":[]},{"v":712451,"n":"崁顶乡","c":[]},{"v":712452,"n":"新埤乡","c":[]},{"v":712453,"n":"南州乡","c":[]},{"v":712454,"n":"林边乡","c":[]},{"v":712455,"n":"东港镇","c":[]},{"v":712456,"n":"琉球乡","c":[]},{"v":712457,"n":"佳冬乡","c":[]},{"v":712458,"n":"新园乡","c":[]},{"v":712459,"n":"枋寮乡","c":[]},{"v":712460,"n":"枋山乡","c":[]},{"v":712461,"n":"春日乡","c":[]},{"v":712462,"n":"狮子乡","c":[]},{"v":712463,"n":"车城乡","c":[]},{"v":712464,"n":"牡丹乡","c":[]},{"v":712465,"n":"恒春镇","c":[]},{"v":712466,"n":"满州乡","c":[]}]},{"v":712500,"n":"台东县","c":[{"v":712517,"n":"台东市","c":[]},{"v":712518,"n":"绿岛乡","c":[]},{"v":712519,"n":"兰屿乡","c":[]},{"v":712520,"n":"延平乡","c":[]},{"v":712521,"n":"卑南乡","c":[]},{"v":712522,"n":"鹿野乡","c":[]},{"v":712523,"n":"关山镇","c":[]},{"v":712524,"n":"海端乡","c":[]},{"v":712525,"n":"池上乡","c":[]},{"v":712526,"n":"东河乡","c":[]},{"v":712527,"n":"成功镇","c":[]},{"v":712528,"n":"长滨乡","c":[]},{"v":712529,"n":"金峰乡","c":[]},{"v":712530,"n":"大武乡","c":[]},{"v":712531,"n":"达仁乡","c":[]},{"v":712532,"n":"太麻里乡","c":[]}]},{"v":712600,"n":"花莲县","c":[{"v":712615,"n":"花莲市","c":[]},{"v":712616,"n":"新城乡","c":[]},{"v":712617,"n":"太鲁阁","c":[]},{"v":712618,"n":"秀林乡","c":[]},{"v":712619,"n":"吉安乡","c":[]},{"v":712620,"n":"寿丰乡","c":[]},{"v":712621,"n":"凤林镇","c":[]},{"v":712622,"n":"光复乡","c":[]},{"v":712623,"n":"丰滨乡","c":[]},{"v":712624,"n":"瑞穗乡","c":[]},{"v":712625,"n":"万荣乡","c":[]},{"v":712626,"n":"玉里镇","c":[]},{"v":712627,"n":"卓溪乡","c":[]},{"v":712628,"n":"富里乡","c":[]}]},{"v":712700,"n":"澎湖县","c":[{"v":712707,"n":"马公市","c":[]},{"v":712708,"n":"西屿乡","c":[]},{"v":712709,"n":"望安乡","c":[]},{"v":712710,"n":"七美乡","c":[]},{"v":712711,"n":"白沙乡","c":[]},{"v":712712,"n":"湖西乡","c":[]}]},{"v":712800,"n":"连江县","c":[{"v":712805,"n":"南竿乡","c":[]},{"v":712806,"n":"北竿乡","c":[]},{"v":712807,"n":"莒光乡","c":[]},{"v":712808,"n":"东引乡","c":[]}]}]},{"v":810000,"n":"香港特别行政区","c":[{"v":659004535,"n":"香港特别行政区","c":[{"v":810100,"n":"香港岛","c":[]},{"v":810200,"n":"九龙","c":[]},{"v":810300,"n":"新界","c":[]}]}]},{"v":820000,"n":"澳门特别行政区","c":[{"v":659004536,"n":"澳门特别行政区","c":[{"v":820100,"n":"澳门半岛","c":[]},{"v":820200,"n":"离岛","c":[]}]}]}];if (typeof define === "function") {define(district)} else {window.YDUI_DISTRICT = district} diff --git a/yunshop-front-master/public/static/app/hammer.min.js b/yunshop-front-master/public/static/app/hammer.min.js new file mode 100644 index 0000000..80da44d --- /dev/null +++ b/yunshop-front-master/public/static/app/hammer.min.js @@ -0,0 +1,8 @@ +/*! Hammer.JS - v2.0.8 - 2016-09-30 + * http://hammerjs.github.io/ + * + * Copyright (c) Jorik Tangelder; + * Licensed under the MIT license */ +(function(window,document,exportName,undefined){"use strict";function ifUndefined(val1,val2){return val1===undefined?val2:val1}var VENDOR_PREFIXES=["","webkit","Moz","MS","ms","o"];var TEST_ELEMENT=document.createElement("div");var TYPE_FUNCTION="function";var round=Math.round;var abs=Math.abs;var now=Date.now;function prefixed(obj,property){var prefix=void 0;var prop=void 0;var camelProp=property[0].toUpperCase()+property.slice(1);var i=0;while(i-1){this.requireFail.splice(index,1)}return this}},{key:"hasRequireFailures",value:function hasRequireFailures(){return this.requireFail.length>0}},{key:"canRecognizeWith",value:function canRecognizeWith(otherRecognizer){return!!this.simultaneous[otherRecognizer.id]}},{key:"emit",value:function emit(input){var self=this;var state=this.state;function emit(event){self.manager.emit(event,input)}if(state=STATE_ENDED){emit(self.options.event+stateStr(state))}}},{key:"tryEmit",value:function tryEmit(input){if(this.canEmit()){return this.emit(input)}this.state=STATE_FAILED}},{key:"canEmit",value:function canEmit(){var i=0;while(ithis.options.threshold||this.state&STATE_BEGAN)}}]);return RotateRecognizer}(AttrRecognizer);RotateRecognizer.prototype.defaults={event:"rotate",threshold:0,pointers:2};var PinchRecognizer=function(_AttrRecognizer){inherits(PinchRecognizer,_AttrRecognizer);function PinchRecognizer(){classCallCheck(this,PinchRecognizer);return possibleConstructorReturn(this,(PinchRecognizer.__proto__||Object.getPrototypeOf(PinchRecognizer)).apply(this,arguments))}createClass(PinchRecognizer,[{key:"getTouchAction",value:function getTouchAction(){return[TOUCH_ACTION_NONE]}},{key:"attrTest",value:function attrTest(input){return get(PinchRecognizer.prototype.__proto__||Object.getPrototypeOf(PinchRecognizer.prototype),"attrTest",this).call(this,input)&&(Math.abs(input.scale-1)>this.options.threshold||this.state&STATE_BEGAN)}},{key:"emit",value:function emit(input){if(input.scale!==1){var inOut=input.scale<1?"in":"out";input.additionalEvent=this.options.event+inOut}get(PinchRecognizer.prototype.__proto__||Object.getPrototypeOf(PinchRecognizer.prototype),"emit",this).call(this,input)}}]);return PinchRecognizer}(AttrRecognizer);PinchRecognizer.prototype.defaults={event:"pinch",threshold:0,pointers:2};function directionStr(direction){if(direction===DIRECTION_DOWN){return"down"}else if(direction===DIRECTION_UP){return"up"}else if(direction===DIRECTION_LEFT){return"left"}else if(direction===DIRECTION_RIGHT){return"right"}return""}var PanRecognizer=function(_AttrRecognizer){inherits(PanRecognizer,_AttrRecognizer);function PanRecognizer(){classCallCheck(this,PanRecognizer);var _this=possibleConstructorReturn(this,(PanRecognizer.__proto__||Object.getPrototypeOf(PanRecognizer)).apply(this,arguments));_this.pX=null;_this.pY=null;return _this}createClass(PanRecognizer,[{key:"getTouchAction",value:function getTouchAction(){var direction=this.options.direction;var actions=[];if(direction&DIRECTION_HORIZONTAL){actions.push(TOUCH_ACTION_PAN_Y)}if(direction&DIRECTION_VERTICAL){actions.push(TOUCH_ACTION_PAN_X)}return actions}},{key:"directionTest",value:function directionTest(input){var options=this.options;var hasMoved=true;var distance=input.distance;var direction=input.direction;var x=input.deltaX;var y=input.deltaY;if(!(direction&options.direction)){if(options.direction&DIRECTION_HORIZONTAL){direction=x===0?DIRECTION_NONE:x<0?DIRECTION_LEFT:DIRECTION_RIGHT;hasMoved=x!==this.pX;distance=Math.abs(input.deltaX)}else{direction=y===0?DIRECTION_NONE:y<0?DIRECTION_UP:DIRECTION_DOWN;hasMoved=y!==this.pY;distance=Math.abs(input.deltaY)}}input.direction=direction;return hasMoved&&distance>options.threshold&&direction&options.direction}},{key:"attrTest",value:function attrTest(input){return AttrRecognizer.prototype.attrTest.call(this,input)&&(this.state&STATE_BEGAN||!(this.state&STATE_BEGAN)&&this.directionTest(input))}},{key:"emit",value:function emit(input){this.pX=input.deltaX;this.pY=input.deltaY;var direction=directionStr(input.direction);if(direction){input.additionalEvent=this.options.event+direction}get(PanRecognizer.prototype.__proto__||Object.getPrototypeOf(PanRecognizer.prototype),"emit",this).call(this,input)}}]);return PanRecognizer}(AttrRecognizer);PanRecognizer.prototype.defaults={event:"pan",threshold:10,pointers:1,direction:DIRECTION_ALL};var SwipeRecognizer=function(_AttrRecognizer){inherits(SwipeRecognizer,_AttrRecognizer);function SwipeRecognizer(){classCallCheck(this,SwipeRecognizer);return possibleConstructorReturn(this,(SwipeRecognizer.__proto__||Object.getPrototypeOf(SwipeRecognizer)).apply(this,arguments))}createClass(SwipeRecognizer,[{key:"getTouchAction",value:function getTouchAction(){return PanRecognizer.prototype.getTouchAction.call(this)}},{key:"attrTest",value:function attrTest(input){var direction=this.options.direction;var velocity=void 0;if(direction&(DIRECTION_HORIZONTAL|DIRECTION_VERTICAL)){velocity=input.overallVelocity}else if(direction&DIRECTION_HORIZONTAL){velocity=input.overallVelocityX}else if(direction&DIRECTION_VERTICAL){velocity=input.overallVelocityY}return get(SwipeRecognizer.prototype.__proto__||Object.getPrototypeOf(SwipeRecognizer.prototype),"attrTest",this).call(this,input)&&direction&input.offsetDirection&&input.distance>this.options.threshold&&input.maxPointers===this.options.pointers&&abs(velocity)>this.options.velocity&&input.eventType&INPUT_END}},{key:"emit",value:function emit(input){var direction=directionStr(input.offsetDirection);if(direction){this.manager.emit(this.options.event+direction,input)}this.manager.emit(this.options.event,input)}}]);return SwipeRecognizer}(AttrRecognizer);SwipeRecognizer.prototype.defaults={event:"swipe",threshold:10,velocity:.3,direction:DIRECTION_HORIZONTAL|DIRECTION_VERTICAL,pointers:1};function bindFn(fn,context){return function boundFn(){return fn.apply(context,arguments)}}function setTimeoutContext(fn,timeout,context){return setTimeout(bindFn(fn,context),timeout)}function getDistance(p1,p2,props){if(!props){props=PROPS_XY}var x=p2[props[0]]-p1[props[0]];var y=p2[props[1]]-p1[props[1]];return Math.sqrt(x*x+y*y)}var TapRecognizer=function(_Recognizer){inherits(TapRecognizer,_Recognizer);function TapRecognizer(){classCallCheck(this,TapRecognizer);var _this=possibleConstructorReturn(this,(TapRecognizer.__proto__||Object.getPrototypeOf(TapRecognizer)).apply(this,arguments));_this.pTime=false;_this.pCenter=false;_this._timer=null;_this._input=null;_this.count=0;return _this}createClass(TapRecognizer,[{key:"getTouchAction",value:function getTouchAction(){return[TOUCH_ACTION_MANIPULATION]}},{key:"process",value:function process(input){var _this2=this;var options=this.options;var validPointers=input.pointers.length===options.pointers;var validMovement=input.distanceoptions.time;this._input=input;if(!validMovement||!validPointers||input.eventType&(INPUT_END|INPUT_CANCEL)&&!validTime){this.reset()}else if(input.eventType&INPUT_START){this.reset();this._timer=setTimeoutContext(function(){_this2.state=STATE_RECOGNIZED;_this2.tryEmit()},options.time,this)}else if(input.eventType&INPUT_END){return STATE_RECOGNIZED}return STATE_FAILED}},{key:"reset",value:function reset(){clearTimeout(this._timer)}},{key:"emit",value:function emit(input){if(this.state!==STATE_RECOGNIZED){return}if(input&&input.eventType&INPUT_END){this.manager.emit(this.options.event+"up",input)}else{this._input.timeStamp=now();this.manager.emit(this.options.event,this._input)}}}]);return PressRecognizer}(Recognizer);PressRecognizer.prototype.defaults={event:"press",pointers:1,time:251,threshold:9};function inStr(str,find){return str.indexOf(find)>-1}function cleanTouchActions(actions){if(inStr(actions,TOUCH_ACTION_NONE)){return TOUCH_ACTION_NONE}var hasPanX=inStr(actions,TOUCH_ACTION_PAN_X);var hasPanY=inStr(actions,TOUCH_ACTION_PAN_Y);if(hasPanX&&hasPanY){return TOUCH_ACTION_NONE}if(hasPanX||hasPanY){return hasPanX?TOUCH_ACTION_PAN_X:TOUCH_ACTION_PAN_Y}if(inStr(actions,TOUCH_ACTION_MANIPULATION)){return TOUCH_ACTION_MANIPULATION}return TOUCH_ACTION_AUTO}var TouchAction=function(){function TouchAction(manager,value){classCallCheck(this,TouchAction);this.manager=manager;this.set(value)}createClass(TouchAction,[{key:"set",value:function set(value){if(value===TOUCH_ACTION_COMPUTE){value=this.compute()}if(NATIVE_TOUCH_ACTION&&this.manager.element.style&&TOUCH_ACTION_MAP[value]){this.manager.element.style[PREFIXED_TOUCH_ACTION]=value}this.actions=value.toLowerCase().trim()}},{key:"update",value:function update(){this.set(this.manager.options.touchAction)}},{key:"compute",value:function compute(){var actions=[];each(this.manager.recognizers,function(recognizer){if(boolOrFn(recognizer.options.enable,[recognizer])){actions=actions.concat(recognizer.getTouchAction())}});return cleanTouchActions(actions.join(" "))}},{key:"preventDefaults",value:function preventDefaults(input){var srcEvent=input.srcEvent;var direction=input.offsetDirection;if(this.manager.session.prevented){srcEvent.preventDefault();return}var actions=this.actions;var hasNone=inStr(actions,TOUCH_ACTION_NONE)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];var hasPanY=inStr(actions,TOUCH_ACTION_PAN_Y)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];var hasPanX=inStr(actions,TOUCH_ACTION_PAN_X)&&!TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];if(hasNone){var isTapPointer=input.pointers.length===1;var isTapMovement=input.distance<2;var isTapTouchTime=input.deltaTime<250;if(isTapPointer&&isTapMovement&&isTapTouchTime){return}}if(hasPanX&&hasPanY){return}if(hasNone||hasPanY&&direction&DIRECTION_HORIZONTAL||hasPanX&&direction&DIRECTION_VERTICAL){return this.preventSrc(srcEvent)}}},{key:"preventSrc",value:function preventSrc(srcEvent){this.manager.session.prevented=true;srcEvent.preventDefault()}}]);return TouchAction}();function hasParent(node,parent){while(node){if(node===parent){return true}node=node.parentNode}return false}function getCenter(pointers){var pointersLength=pointers.length;if(pointersLength===1){return{x:round(pointers[0].clientX),y:round(pointers[0].clientY)}}var x=0;var y=0;var i=0;while(i=abs(y)){return x<0?DIRECTION_LEFT:DIRECTION_RIGHT}return y<0?DIRECTION_UP:DIRECTION_DOWN}function computeDeltaXY(session,input){var center=input.center;var offset=session.offsetDelta||{};var prevDelta=session.prevDelta||{};var prevInput=session.prevInput||{};if(input.eventType===INPUT_START||prevInput.eventType===INPUT_END){prevDelta=session.prevDelta={x:prevInput.deltaX||0,y:prevInput.deltaY||0};offset=session.offsetDelta={x:center.x,y:center.y}}input.deltaX=prevDelta.x+(center.x-offset.x);input.deltaY=prevDelta.y+(center.y-offset.y)}function getVelocity(deltaTime,x,y){return{x:x/deltaTime||0,y:y/deltaTime||0}}function getScale(start,end){return getDistance(end[0],end[1],PROPS_CLIENT_XY)/getDistance(start[0],start[1],PROPS_CLIENT_XY)}function getRotation(start,end){return getAngle(end[1],end[0],PROPS_CLIENT_XY)+getAngle(start[1],start[0],PROPS_CLIENT_XY)}function computeIntervalInputData(session,input){var last=session.lastInterval||input;var deltaTime=input.timeStamp-last.timeStamp;var velocity=void 0;var velocityX=void 0;var velocityY=void 0;var direction=void 0;if(input.eventType!==INPUT_CANCEL&&(deltaTime>COMPUTE_INTERVAL||last.velocity===undefined)){var deltaX=input.deltaX-last.deltaX;var deltaY=input.deltaY-last.deltaY;var v=getVelocity(deltaTime,deltaX,deltaY);velocityX=v.x;velocityY=v.y;velocity=abs(v.x)>abs(v.y)?v.x:v.y;direction=getDirection(deltaX,deltaY);session.lastInterval=input}else{velocity=last.velocity;velocityX=last.velocityX;velocityY=last.velocityY;direction=last.direction}input.velocity=velocity;input.velocityX=velocityX;input.velocityY=velocityY;input.direction=direction}function computeInputData(manager,input){var session=manager.session;var pointers=input.pointers;var pointersLength=pointers.length;if(!session.firstInput){session.firstInput=simpleCloneInputData(input)}if(pointersLength>1&&!session.firstMultiple){session.firstMultiple=simpleCloneInputData(input)}else if(pointersLength===1){session.firstMultiple=false}var firstInput=session.firstInput;var firstMultiple=session.firstMultiple;var offsetCenter=firstMultiple?firstMultiple.center:firstInput.center;var center=input.center=getCenter(pointers);input.timeStamp=now();input.deltaTime=input.timeStamp-firstInput.timeStamp;input.angle=getAngle(offsetCenter,center);input.distance=getDistance(offsetCenter,center);computeDeltaXY(session,input);input.offsetDirection=getDirection(input.deltaX,input.deltaY);var overallVelocity=getVelocity(input.deltaTime,input.deltaX,input.deltaY);input.overallVelocityX=overallVelocity.x;input.overallVelocityY=overallVelocity.y;input.overallVelocity=abs(overallVelocity.x)>abs(overallVelocity.y)?overallVelocity.x:overallVelocity.y;input.scale=firstMultiple?getScale(firstMultiple.pointers,pointers):1;input.rotation=firstMultiple?getRotation(firstMultiple.pointers,pointers):0;input.maxPointers=!session.prevInput?input.pointers.length:input.pointers.length>session.prevInput.maxPointers?input.pointers.length:session.prevInput.maxPointers;computeIntervalInputData(session,input);var target=manager.element;if(hasParent(input.srcEvent.target,target)){target=input.srcEvent.target}input.target=target}function inputHandler(manager,eventType,input){var pointersLen=input.pointers.length;var changedPointersLen=input.changedPointers.length;var isFirst=eventType&INPUT_START&&pointersLen-changedPointersLen===0;var isFinal=eventType&(INPUT_END|INPUT_CANCEL)&&pointersLen-changedPointersLen===0;input.isFirst=!!isFirst;input.isFinal=!!isFinal;if(isFirst){manager.session={}}input.eventType=eventType;computeInputData(manager,input);manager.emit("hammer.input",input);manager.recognize(input);manager.session.prevInput=input}function splitStr(str){return str.trim().split(/\s+/g)}function addEventListeners(target,types,handler){each(splitStr(types),function(type){target.addEventListener(type,handler,false)})}function removeEventListeners(target,types,handler){each(splitStr(types),function(type){target.removeEventListener(type,handler,false)})}function getWindowForElement(element){var doc=element.ownerDocument||element;return doc.defaultView||doc.parentWindow||window}var Input=function(){function Input(manager,callback){classCallCheck(this,Input);var self=this;this.manager=manager;this.callback=callback;this.element=manager.element;this.target=manager.options.inputTarget;this.domHandler=function(ev){if(boolOrFn(manager.options.enable,[manager])){self.handler(ev)}};this.init()}createClass(Input,[{key:"handler",value:function handler(){}},{key:"init",value:function init(){this.evEl&&addEventListeners(this.element,this.evEl,this.domHandler);this.evTarget&&addEventListeners(this.target,this.evTarget,this.domHandler);this.evWin&&addEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}},{key:"destroy",value:function destroy(){this.evEl&&removeEventListeners(this.element,this.evEl,this.domHandler);this.evTarget&&removeEventListeners(this.target,this.evTarget,this.domHandler);this.evWin&&removeEventListeners(getWindowForElement(this.element),this.evWin,this.domHandler)}}]);return Input}();var POINTER_INPUT_MAP={pointerdown:INPUT_START,pointermove:INPUT_MOVE,pointerup:INPUT_END,pointercancel:INPUT_CANCEL,pointerout:INPUT_CANCEL};var IE10_POINTER_TYPE_ENUM={2:INPUT_TYPE_TOUCH,3:INPUT_TYPE_PEN,4:INPUT_TYPE_MOUSE,5:INPUT_TYPE_KINECT};var POINTER_ELEMENT_EVENTS="pointerdown";var POINTER_WINDOW_EVENTS="pointermove pointerup pointercancel";if(window.MSPointerEvent&&!window.PointerEvent){POINTER_ELEMENT_EVENTS="MSPointerDown";POINTER_WINDOW_EVENTS="MSPointerMove MSPointerUp MSPointerCancel"}var PointerEventInput=function(_Input){inherits(PointerEventInput,_Input);function PointerEventInput(){classCallCheck(this,PointerEventInput);var _this=possibleConstructorReturn(this,(PointerEventInput.__proto__||Object.getPrototypeOf(PointerEventInput)).apply(this,arguments));_this.evEl=POINTER_ELEMENT_EVENTS;_this.evWin=POINTER_WINDOW_EVENTS;_this.store=_this.manager.session.pointerEvents=[];return _this}createClass(PointerEventInput,[{key:"handler",value:function handler(ev){var store=this.store;var removePointer=false;var eventTypeNormalized=ev.type.toLowerCase().replace("ms","");var eventType=POINTER_INPUT_MAP[eventTypeNormalized];var pointerType=IE10_POINTER_TYPE_ENUM[ev.pointerType]||ev.pointerType;var isTouch=pointerType===INPUT_TYPE_TOUCH;var storeIndex=inArray(store,ev.pointerId,"pointerId");if(eventType&INPUT_START&&(ev.button===0||isTouch)){if(storeIndex<0){store.push(ev);storeIndex=store.length-1}}else if(eventType&(INPUT_END|INPUT_CANCEL)){removePointer=true}if(storeIndex<0){return}store[storeIndex]=ev;this.callback(this.manager,eventType,{pointers:store,changedPointers:[ev],pointerType:pointerType,srcEvent:ev});if(removePointer){store.splice(storeIndex,1)}}}]);return PointerEventInput}(Input);function toArray$1(obj){return Array.prototype.slice.call(obj,0)}function uniqueArray(src,key,sort){var results=[];var values=[];var i=0;while(ib[key]})}}return results}var TOUCH_INPUT_MAP={touchstart:INPUT_START,touchmove:INPUT_MOVE,touchend:INPUT_END,touchcancel:INPUT_CANCEL};var TOUCH_TARGET_EVENTS="touchstart touchmove touchend touchcancel";var TouchInput=function(_Input){inherits(TouchInput,_Input);function TouchInput(){classCallCheck(this,TouchInput);TouchInput.prototype.evTarget=TOUCH_TARGET_EVENTS; +TouchInput.prototype.targetIds={};var _this=possibleConstructorReturn(this,(TouchInput.__proto__||Object.getPrototypeOf(TouchInput)).apply(this,arguments));_this.evTarget=TOUCH_TARGET_EVENTS;_this.targetIds={};return _this}createClass(TouchInput,[{key:"handler",value:function handler(ev){var type=TOUCH_INPUT_MAP[ev.type];var touches=getTouches.call(this,ev,type);if(!touches){return}this.callback(this.manager,type,{pointers:touches[0],changedPointers:touches[1],pointerType:INPUT_TYPE_TOUCH,srcEvent:ev})}}]);return TouchInput}(Input);function getTouches(ev,type){var allTouches=toArray$1(ev.touches);var targetIds=this.targetIds;if(type&(INPUT_START|INPUT_MOVE)&&allTouches.length===1){targetIds[allTouches[0].identifier]=true;return[allTouches,allTouches]}var i=void 0;var targetTouches=void 0;var changedTouches=toArray$1(ev.changedTouches);var changedTargetTouches=[];var target=this.target;targetTouches=allTouches.filter(function(touch){return hasParent(touch.target,target)});if(type===INPUT_START){i=0;while(i-1){lts.splice(i,1)}};setTimeout(removeLastTouch,DEDUP_TIMEOUT)})()}}function isSyntheticEvent(eventData){var x=eventData.srcEvent.clientX;var y=eventData.srcEvent.clientY;for(var i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace";var log=window.console&&(window.console.warn||window.console.log);if(log){log.call(window.console,deprecationMessage,stack)}return method.apply(this,arguments)}}var extend=deprecate(function(dest,src,merge){var keys=Object.keys(src);var i=0;while(i + + + +Created by FontForge 20120731 at Tue Sep 6 12:16:07 2016 + By admin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yunshop-front-master/public/static/app/images/ewm.png b/yunshop-front-master/public/static/app/images/ewm.png new file mode 100644 index 0000000..3595a0b Binary files /dev/null and b/yunshop-front-master/public/static/app/images/ewm.png differ diff --git a/yunshop-front-master/public/static/app/images/fontawesome-webfont.912ec66.svg b/yunshop-front-master/public/static/app/images/fontawesome-webfont.912ec66.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/yunshop-front-master/public/static/app/images/fontawesome-webfont.912ec66.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/yunshop-front-master/public/static/app/images/footprint.png b/yunshop-front-master/public/static/app/images/footprint.png new file mode 100644 index 0000000..14e6bce Binary files /dev/null and b/yunshop-front-master/public/static/app/images/footprint.png differ diff --git a/yunshop-front-master/public/static/app/images/heart.png b/yunshop-front-master/public/static/app/images/heart.png new file mode 100644 index 0000000..ca3f0e3 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/heart.png differ diff --git a/yunshop-front-master/public/static/app/images/img_default.png b/yunshop-front-master/public/static/app/images/img_default.png new file mode 100644 index 0000000..960dea3 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/img_default.png differ diff --git a/yunshop-front-master/public/static/app/images/img_loading.gif b/yunshop-front-master/public/static/app/images/img_loading.gif new file mode 100644 index 0000000..942a742 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/img_loading.gif differ diff --git a/yunshop-front-master/public/static/app/images/init-image-7.png b/yunshop-front-master/public/static/app/images/init-image-7.png new file mode 100644 index 0000000..e877a8f Binary files /dev/null and b/yunshop-front-master/public/static/app/images/init-image-7.png differ diff --git a/yunshop-front-master/public/static/app/images/jd-sprites.fb1e8d8.png b/yunshop-front-master/public/static/app/images/jd-sprites.fb1e8d8.png new file mode 100644 index 0000000..7e93e91 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/jd-sprites.fb1e8d8.png differ diff --git a/yunshop-front-master/public/static/app/images/logo.jpg b/yunshop-front-master/public/static/app/images/logo.jpg new file mode 100644 index 0000000..5e19a5d Binary files /dev/null and b/yunshop-front-master/public/static/app/images/logo.jpg differ diff --git a/yunshop-front-master/public/static/app/images/message.png b/yunshop-front-master/public/static/app/images/message.png new file mode 100644 index 0000000..3cba7ec Binary files /dev/null and b/yunshop-front-master/public/static/app/images/message.png differ diff --git a/yunshop-front-master/public/static/app/images/mine.png b/yunshop-front-master/public/static/app/images/mine.png new file mode 100644 index 0000000..405b4e9 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/mine.png differ diff --git a/yunshop-front-master/public/static/app/images/myextension.31925f6.png b/yunshop-front-master/public/static/app/images/myextension.31925f6.png new file mode 100644 index 0000000..10f39b4 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/myextension.31925f6.png differ diff --git a/yunshop-front-master/public/static/app/images/news.png b/yunshop-front-master/public/static/app/images/news.png new file mode 100644 index 0000000..ed369ca Binary files /dev/null and b/yunshop-front-master/public/static/app/images/news.png differ diff --git a/yunshop-front-master/public/static/app/images/personal_center.png b/yunshop-front-master/public/static/app/images/personal_center.png new file mode 100644 index 0000000..0fc2284 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/personal_center.png differ diff --git a/yunshop-front-master/public/static/app/images/phone.png b/yunshop-front-master/public/static/app/images/phone.png new file mode 100644 index 0000000..5a737d8 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/phone.png differ diff --git a/yunshop-front-master/public/static/app/images/photo-mr.jpg b/yunshop-front-master/public/static/app/images/photo-mr.jpg new file mode 100644 index 0000000..fc2f8a4 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/photo-mr.jpg differ diff --git a/yunshop-front-master/public/static/app/images/video-loading.gif b/yunshop-front-master/public/static/app/images/video-loading.gif new file mode 100644 index 0000000..9307071 Binary files /dev/null and b/yunshop-front-master/public/static/app/images/video-loading.gif differ diff --git a/yunshop-front-master/public/static/app/img/agreen_video@2x.png b/yunshop-front-master/public/static/app/img/agreen_video@2x.png new file mode 100644 index 0000000..79466ad Binary files /dev/null and b/yunshop-front-master/public/static/app/img/agreen_video@2x.png differ diff --git a/yunshop-front-master/public/static/app/img/bg_1@2x.png b/yunshop-front-master/public/static/app/img/bg_1@2x.png new file mode 100644 index 0000000..deb7532 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/bg_1@2x.png differ diff --git a/yunshop-front-master/public/static/app/img/bg_2@2x.png b/yunshop-front-master/public/static/app/img/bg_2@2x.png new file mode 100644 index 0000000..ffcca5e Binary files /dev/null and b/yunshop-front-master/public/static/app/img/bg_2@2x.png differ diff --git a/yunshop-front-master/public/static/app/img/bg_redenvelope@2x.png b/yunshop-front-master/public/static/app/img/bg_redenvelope@2x.png new file mode 100644 index 0000000..7a18937 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/bg_redenvelope@2x.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/banner.png b/yunshop-front-master/public/static/app/img/lottery/banner.png new file mode 100644 index 0000000..2f89753 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/banner.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/btn.png b/yunshop-front-master/public/static/app/img/lottery/btn.png new file mode 100644 index 0000000..6b2d717 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/btn.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/circleLight.png b/yunshop-front-master/public/static/app/img/lottery/circleLight.png new file mode 100644 index 0000000..ce0f0af Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/circleLight.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/close.png b/yunshop-front-master/public/static/app/img/lottery/close.png new file mode 100644 index 0000000..7770d65 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/close.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/noprizeXF.png b/yunshop-front-master/public/static/app/img/lottery/noprizeXF.png new file mode 100644 index 0000000..7c3cd43 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/noprizeXF.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/prizeIcon.png b/yunshop-front-master/public/static/app/img/lottery/prizeIcon.png new file mode 100644 index 0000000..9bd255f Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/prizeIcon.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/prizeInfo.png b/yunshop-front-master/public/static/app/img/lottery/prizeInfo.png new file mode 100644 index 0000000..5f833fd Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/prizeInfo.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/prizers.png b/yunshop-front-master/public/static/app/img/lottery/prizers.png new file mode 100644 index 0000000..4490338 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/prizers.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/prizinig.png b/yunshop-front-master/public/static/app/img/lottery/prizinig.png new file mode 100644 index 0000000..1a3f66f Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/prizinig.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/receivedXF1.png b/yunshop-front-master/public/static/app/img/lottery/receivedXF1.png new file mode 100644 index 0000000..33c285b Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/receivedXF1.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/three.png b/yunshop-front-master/public/static/app/img/lottery/three.png new file mode 100644 index 0000000..d68cb8f Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/three.png differ diff --git a/yunshop-front-master/public/static/app/img/lottery/yellowCycle.png b/yunshop-front-master/public/static/app/img/lottery/yellowCycle.png new file mode 100644 index 0000000..06a33f3 Binary files /dev/null and b/yunshop-front-master/public/static/app/img/lottery/yellowCycle.png differ diff --git a/yunshop-front-master/public/static/app/javascript.html b/yunshop-front-master/public/static/app/javascript.html new file mode 100644 index 0000000..0dab79c --- /dev/null +++ b/yunshop-front-master/public/static/app/javascript.html @@ -0,0 +1,51 @@ + +
+ + +
+ +

js回调Test

+
+
+ + + + + + + + + +
+
+

暂无回调

+ + \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/jsbridge.js b/yunshop-front-master/public/static/app/jsbridge.js new file mode 100644 index 0000000..015e17e --- /dev/null +++ b/yunshop-front-master/public/static/app/jsbridge.js @@ -0,0 +1,373 @@ +var ANDROID = 1; +var IOS = 2; +var curApp = ""; +var ua = window.navigator.userAgent.toLowerCase(); +if (/android/.test(ua)) { + curApp = ANDROID; +} else if (/(iphone|ipad|ipod|ios)/.test(ua)) { + curApp = IOS; +} else { + document.write("curApp => 其他类型 => " + ua); +} +if (curApp === ANDROID) { + var bridge = { + //default:this, + call: function (b, a, c) { + var e = ""; + "function" == typeof a && ((c = a), (a = {})); + a = { + data: void 0 === a ? null : a, + }; + if ("function" == typeof c) { + var g = "dscb" + window.dscb++; + window[g] = c; + a._dscbstub = g; + } + a = JSON.stringify(a); + if (window._dsbridge) e = _dsbridge.call(b, a); + else if (window._dswk || -1 != navigator.userAgent.indexOf("_dsbridge")) + e = prompt("_dsbridge=" + b, a); + return JSON.parse(e || "{}").data; + }, + register: function (b, a, c) { + c = c ? window._dsaf : window._dsf; + window._dsInit || + ((window._dsInit = !0), + setTimeout(function () { + bridge.call("_dsb.dsinit"); + }, 0)); + "object" == typeof a ? (c._obs[b] = a) : (c[b] = a); + }, + registerAsyn: function (b, a) { + this.register(b, a, !0); + }, + hasNativeMethod: function (b, a) { + return this.call("_dsb.hasNativeMethod", { + name: b, + type: a || "all", + }); + }, + disableJavascriptDialogBlock: function (b) { + this.call("_dsb.disableJavascriptDialogBlock", { + disable: !1 !== b, + }); + }, + }; + !(function () { + //!function "执行" + if (!window._dsf) { + var b = { + _dsf: { + _obs: {}, + }, + _dsaf: { + _obs: {}, + }, + dscb: 0, + dsBridge: bridge, + close: function () { + bridge.call("_dsb.closePage"); + }, + _handleMessageFromNative: function (a) { + var e = JSON.parse(a.data), + b = { + id: a.callbackId, + complete: !0, + }, + c = this._dsf[a.method], + d = this._dsaf[a.method], + h = function (a, c) { + b.data = a.apply(c, e); + bridge.call("_dsb.returnValue", b); + }, + k = function (a, c) { + e.push(function (a, c) { + b.data = a; + b.complete = !1 !== c; + bridge.call("_dsb.returnValue", b); + }); + a.apply(c, e); + }; + if (c) h(c, this._dsf); + else if (d) k(d, this._dsaf); + else if (((c = a.method.split(".")), !(2 > c.length))) { + a = c.pop(); + var c = c.join("."), + d = this._dsf._obs, + d = d[c] || {}, + f = d[a]; + f && "function" == typeof f + ? h(f, d) + : ((d = this._dsaf._obs), + (d = d[c] || {}), + (f = d[a]) && "function" == typeof f && k(f, d)); + } + }, + }, + a; + for (a in b) window[a] = b[a]; + bridge.register("_hasJavascriptMethod", function (a, b) { + b = a.split("."); + if (2 > b.length) return !(!_dsf[b] && !_dsaf[b]); + a = b.pop(); + b = b.join("."); + return (b = _dsf._obs[b] || _dsaf._obs[b]) && !!b[a]; + }); + } + })(); +} else if (curApp == IOS) { + var jsBridge = function (bridgeName, bridgeScheme) { + this.bridgeName = bridgeName || "WebViewJavascriptBridge"; + this.bridgeScheme = bridgeScheme || "https"; + var ua = navigator.userAgent || navigator.vendor || window.opera; + var ANDROID = 1; + var IOS = 2; + var SUCCESS_CODE = 0; + ua = ua.toLowerCase(); + if (/android/.test(ua)) { + this.app = ANDROID; + } else if (/(iphone|ipad|ipod|ios)/.test(ua)) { + this.app = IOS; + } + + /* 获取 bridge */ + this.getBridge = function (callback) { + if (window[this.bridgeName]) { + callback(window[this.bridgeName]); + return; + } + if (this.app === ANDROID) { + document.addEventListener( + "WebViewJavascriptBridgeReady", + function () { + callback(window[this.bridgeName]); + }, + false + ); + } else if (this.app === IOS) { + // WebViewJavascriptBridge 由native在注入 + // https://github.com/marcuswestin/WebViewJavascriptBridge + if (window.WVJBCallbacks) { + return window.WVJBCallbacks.push(callback); + } + window.WVJBCallbacks = [callback]; + var WVJBIframe = document.createElement("iframe"); + WVJBIframe.style.display = "none"; + WVJBIframe.src = "https://__bridge_loaded__"; + document.documentElement.appendChild(WVJBIframe); + setTimeout(function () { + document.documentElement.removeChild(WVJBIframe); + }, 0); + } + }; + /** + * 给ios和android注册事件监听 + * + * @memberof jsBridge + */ + this.on = function (event, jsHandler) { + this.registHandler(event, jsHandler); + }; + + /** + * 默认监听事件 + * + * @memberof jsBridge + */ + this.registDefaultHandlerForApp = function () { + this.on("reload", function () { + location.reload(); + }); + }; + + /** + * 注册事件逻辑 + * + * @memberof jsBridge + */ + this.registHandler = function (event, jsHandler) { + this.getBridge(function (bridge) { + if ( + bridge && + bridge.registerHandler && + typeof bridge.registerHandler === "function" + ) { + bridge.registerHandler(event, function (data2js, responseCallback) { + responseCallback = responseCallback || function () {}; + jsHandler(data2js, responseCallback); + }); + } + }); + }; + /** + * 调用 app + * @param {string} event + * @param {object} params + * @param {fun} callback + * @return JSON对象 + */ + this.callHandler = function (event, params, callback) { + this.getBridge(function (bridge) { + if ( + bridge && + bridge.registerHandler && + typeof bridge.registerHandler === "function" + ) { + bridge.callHandler(event, params, callback); + } + }); + }; + this.registDefaultHandlerForApp(); + + return this; + }; +} + +if (!jsBridge) { + jsBridge = function () {}; +} +jsBridge.prototype.curApp = curApp; +/** + * 扫码 + */ +jsBridge.prototype.scanQRCode = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("scanQRCode", params, success); + } else if (this.curApp == IOS) { + this.callHandler("scanQRCode", params, success); + } +}; +/** + * 获取BTY地址 + */ +jsBridge.prototype.getCurrentBTYAddress = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("getCurrentBTYAddress", params, success); + } else if (this.curApp == IOS) { + this.callHandler("getCurrentBTYAddress", params, success); + } +}; +/** + * 获取所有币种的地址:getAddress + * 入参:cointype为BTC,ETH,TRX,BTY等主链 + */ +jsBridge.prototype.getAddress = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("getAddress", params, success); + } else if (this.curApp == IOS) { + this.callHandler("getAddress", params, success); + } +}; +/** + * 设置标题 + */ +jsBridge.prototype.setTitle = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("setTitle", params, success); + } else if (this.curApp == IOS) { + this.callHandler("setTitle", params, success); + } +}; +/** + * 获取当前语言 + */ +jsBridge.prototype.getLang = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("getLang", params, success); + } else if (this.curApp == IOS) { + this.callHandler("getLang", params, success); + } +}; +/** + * 返回上一个网页 + */ +jsBridge.prototype.closeCurrentWebview = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("closeCurrentWebview", params, success); + } else if (this.curApp == IOS) { + this.callHandler("closeCurrentWebview", params, success); + } +}; +/** + * 获取设备id:getDeviceId + */ +jsBridge.prototype.getDeviceId = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("getDeviceId", params, success); + } else if (this.curApp == IOS) { + this.callHandler("getDeviceId", params, success); + } +}; +/** + * 跳转钱包 gotoWallet + */ +jsBridge.prototype.gotoWallet = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("gotoWallet", params, success); + } else if (this.curApp == IOS) { + this.callHandler("gotoWallet", params, success); + } +}; +/** + * 微信分享 + */ +jsBridge.prototype.wechatShare = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("wechatShare", params, success); + } else if (this.curApp == IOS) { + this.callHandler("wechatShare", params, success); + } +}; +/** + * 构造数据:create + */ +jsBridge.prototype.create = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("create", params, success); + } else if (this.curApp == IOS) { + this.callHandler("create", params, success); + } +}; +/** + * 普通签名:sign + */ +jsBridge.prototype.sign = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("sign", params, success); + } else if (this.curApp == IOS) { + this.callHandler("sign", params, success); + } +}; +/** + * 交易组签名:signTxGroup + * 入参:交易组只支持BTY + */ +jsBridge.prototype.signTxGroup = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("signTxGroup", params, success); + } else if (this.curApp == IOS) { + this.callHandler("signTxGroup", params, success); + } +}; +/** + * 发送交易:send + * cointype为BTC,ETH,TRX,BTY等主链 + */ +jsBridge.prototype.send = function (params, success) { + if (this.curApp == ANDROID) { + dsBridge.call("send", params, success); + } else if (this.curApp == IOS) { + this.callHandler("send", params, success); + } +}; +//===================================================================================== +//==================================增加新的应用方法==================================== +//===================================================================================== +if (/wallet/.test(ua)) { + console.log("在钱包环境"); +} else { + console.log("不是在钱包环境"); +} + +//export default new jsBridge(); +var jsBridge = new jsBridge(); diff --git a/yunshop-front-master/public/static/app/jweixin-1.2.0.js b/yunshop-front-master/public/static/app/jweixin-1.2.0.js new file mode 100644 index 0000000..8054cb1 --- /dev/null +++ b/yunshop-front-master/public/static/app/jweixin-1.2.0.js @@ -0,0 +1 @@ +!function(e,n){"function"==typeof define&&(define.amd||define.cmd)?define(function(){return n(e)}):n(e,!0)}(this,function(e,n){function i(n,i,t){e.WeixinJSBridge?WeixinJSBridge.invoke(n,o(i),function(e){c(n,e,t)}):l(n,t)}function t(n,i,t){e.WeixinJSBridge?WeixinJSBridge.on(n,function(e){t&&t.trigger&&t.trigger(e),c(n,e,i)}):t?l(n,t):l(n,i)}function o(e){return e=e||{},e.appId=A.appId,e.verifyAppId=A.appId,e.verifySignType="sha1",e.verifyTimestamp=A.timestamp+"",e.verifyNonceStr=A.nonceStr,e.verifySignature=A.signature,e}function r(e){return{timeStamp:e.timestamp+"",nonceStr:e.nonceStr,package:e.package,paySign:e.paySign,signType:e.signType||"SHA1"}}function a(e){return e.postalCode=e.addressPostalCode,delete e.addressPostalCode,e.provinceName=e.proviceFirstStageName,delete e.proviceFirstStageName,e.cityName=e.addressCitySecondStageName,delete e.addressCitySecondStageName,e.countryName=e.addressCountiesThirdStageName,delete e.addressCountiesThirdStageName,e.detailInfo=e.addressDetailInfo,delete e.addressDetailInfo,e}function c(e,n,i){"openEnterpriseChat"==e&&(n.errCode=n.err_code),delete n.err_code,delete n.err_desc,delete n.err_detail;var t=n.errMsg;t||(t=n.err_msg,delete n.err_msg,t=s(e,t),n.errMsg=t),(i=i||{})._complete&&(i._complete(n),delete i._complete),t=n.errMsg||"",A.debug&&!i.isInnerInvoke&&alert(JSON.stringify(n));var o=t.indexOf(":");switch(t.substring(o+1)){case"ok":i.success&&i.success(n);break;case"cancel":i.cancel&&i.cancel(n);break;default:i.fail&&i.fail(n)}i.complete&&i.complete(n)}function s(e,n){var i=e,t=h[i];t&&(i=t);var o="ok";if(n){var r=n.indexOf(":");"confirm"==(o=n.substring(r+1))&&(o="ok"),"failed"==o&&(o="fail"),-1!=o.indexOf("failed_")&&(o=o.substring(7)),-1!=o.indexOf("fail_")&&(o=o.substring(5)),"access denied"!=(o=(o=o.replace(/_/g," ")).toLowerCase())&&"no permission to execute"!=o||(o="permission denied"),"config"==i&&"function not exist"==o&&(o="ok"),""==o&&(o="fail")}return n=i+":"+o}function d(e){if(e){for(var n=0,i=e.length;n0){var n=O.shift();wx.getLocalImgData(n)}},e))):O.push(e)},getNetworkType:function(e){var n=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),o=n.substring(t+1);switch(o){case"wifi":case"edge":case"wwan":e.networkType=o;break;default:e.errMsg="getNetworkType:fail"}}return e};i("getNetworkType",{},(e._complete=function(e){e=n(e)},e))},openLocation:function(e){i("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){e=e||{},i(g.getLocation,{type:e.type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){i("hideOptionMenu",{},e)},showOptionMenu:function(e){i("showOptionMenu",{},e)},closeWindow:function(e){i("closeWindow",{},e=e||{})},hideMenuItems:function(e){i("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){i("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){i("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){i("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){i("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(x){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){i(g.openAddress,{},(e._complete=function(e){e=a(e)},e))},openProductSpecificView:function(e){i(g.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,t=[],o=0,r=n.length;o0){var n=e.split("?")[0],i=e.split("?")[1];return n+=".html",void 0!==i?n+"?"+i:n}}if(!e.jWeixin){var h={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},v=function(){var e={};for(var n in h)e[h[n]]=n;return e}(),I=e.document,S=I.title,y=navigator.userAgent.toLowerCase(),_=navigator.platform.toLowerCase(),w=!(!_.match("mac")&&!_.match("win")),T=-1!=y.indexOf("wxdebugger"),k=-1!=y.indexOf("micromessenger"),M=-1!=y.indexOf("android"),P=-1!=y.indexOf("iphone")||-1!=y.indexOf("ipad"),x=function(){var e=y.match(/micromessenger\/(\d+\.\d+\.\d+)/)||y.match(/micromessenger\/(\d+\.\d+)/);return e?e[1]:""}(),A={initStartTime:p(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},V={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:P?1:M?2:-1,clientVersion:x,url:encodeURIComponent(location.href)},C={},L={_completes:[]},B={state:0,data:{}};f(function(){A.initEndTime=p()});var O=!1,E=[],N={config:function(e){C=e,u("config",e);var n=!1!==C.check;f(function(){if(n)i(h.config,{verifyJsApiList:d(C.jsApiList)},function(){L._complete=function(e){A.preVerifyEndTime=p(),B.state=1,B.data=e},L.success=function(e){V.isPreVerifyOk=0},L.fail=function(e){L._fail?L._fail(e):B.state=-1};var e=L._completes;return e.push(function(){l()}),L.complete=function(n){for(var i=0,t=e.length;i0){var n=E.shift();wx.getLocalImgData(n)}},e))):E.push(e)},getNetworkType:function(e){var n=function(e){var n=e.errMsg;e.errMsg="getNetworkType:ok";var i=e.subtype;if(delete e.subtype,i)e.networkType=i;else{var t=n.indexOf(":"),o=n.substring(t+1);switch(o){case"wifi":case"edge":case"wwan":e.networkType=o;break;default:e.errMsg="getNetworkType:fail"}}return e};i("getNetworkType",{},(e._complete=function(e){e=n(e)},e))},openLocation:function(e){i("openLocation",{latitude:e.latitude,longitude:e.longitude,name:e.name||"",address:e.address||"",scale:e.scale||28,infoUrl:e.infoUrl||""},e)},getLocation:function(e){e=e||{},i(h.getLocation,{type:e.type||"wgs84"},(e._complete=function(e){delete e.type},e))},hideOptionMenu:function(e){i("hideOptionMenu",{},e)},showOptionMenu:function(e){i("showOptionMenu",{},e)},closeWindow:function(e){i("closeWindow",{},e=e||{})},hideMenuItems:function(e){i("hideMenuItems",{menuList:e.menuList},e)},showMenuItems:function(e){i("showMenuItems",{menuList:e.menuList},e)},hideAllNonBaseMenuItem:function(e){i("hideAllNonBaseMenuItem",{},e)},showAllNonBaseMenuItem:function(e){i("showAllNonBaseMenuItem",{},e)},scanQRCode:function(e){i("scanQRCode",{needResult:(e=e||{}).needResult||0,scanType:e.scanType||["qrCode","barCode"]},(e._complete=function(e){if(P){var n=e.resultStr;if(n){var i=JSON.parse(n);e.resultStr=i&&i.scan_code&&i.scan_code.scan_result}}},e))},openAddress:function(e){i(h.openAddress,{},(e._complete=function(e){e=a(e)},e))},openProductSpecificView:function(e){i(h.openProductSpecificView,{pid:e.productId,view_type:e.viewType||0,ext_info:e.extInfo},e)},addCard:function(e){for(var n=e.cardList,t=[],o=0,r=n.length;o=0&&n.splice(r,1)}}function k(e,t,n){if(void 0===n&&(n=!1),j.hasOwnProperty(e))if(n){var r={type:e,detail:t};j[e].forEach((function(e){try{e(r)}catch(e){}}))}else k(e,t,!0)}function T(e,t){return function(){try{return t.apply(this,arguments)}catch(t){R(t,e),k("error",t)}}}e={captureException:R};var M=F(A,E),P=F((function(){}),S);function R(e,t){S("["+t+"] "+N(e))}function F(e,t){return function(){for(var n=[],r=0,i=arguments.length;r0?Oe(Ce,e,n-1):(delete Ce[e],t.push(e))})),t.length&&P("[callback] timeout, callbackIds: "+t.join(",")),Me()}}),2e3))}var Pe=new Image,Re=!1,Fe=null,qe=[];function Ne(){var e=qe;qe=[],ee(e,(function(e){e(Fe)}))}ae(Pe,"load",(function(){Re=!0,Z(Ne,1)})),ae(Pe,"error",(function(){Fe=new Error("Failed to load crossorigin image"),Z(Ne,1)})),re(Pe,"https://wwcdn.weixin.qq.com/node/wework/images/1x1-00000000.91e42db1c6.png");var Ie="\ufeff",We=String.fromCharCode(8204),Le=String.fromCharCode(8205),Ue=String.fromCharCode(8203),Je=[String.fromCharCode(8206),String.fromCharCode(8207),We,Le,Ue],ze={},He=0;function Be(e){var t=be(e,"encrypt_token");if(t)return t;var n=be(e,"data"),r=be(e,"encrypt_text_data");if(n&&r){for(var i=(He++).toString(5),o="",a=0,c=i.length;a
([^<]+)<\/a>$/.exec(a);return b.from(d).bind(function(d){var e=c(d[1],a);return d[1]===d[2]?b.some(e):b.none()})};return{isAbsoluteUrl:d,isImageUrl:e,parseUrlFromLinkHtml:f}}),g("u",["g","n","23","24"],function(a,b,c,d){var e=function(a){return"extra"in a.undoManager},f=function(a,c,d){return e(a)?(a.undoManager.extra(function(){k(a,c)},d),b.some(!0)):b.none()},g=function(a,b){return f(a,b.html(),function(){a.insertContent('')})},h=function(a,b){return f(a,b.html(),function(){a.execCommand("mceInsertLink",!1,b.url())})},i=function(a,c){return d.parseUrlFromLinkHtml(c).bind(function(c){var e=a.selection.isCollapsed()===!1&&d.isAbsoluteUrl(c.url());return e?h(a,c):b.none()})},j=function(a,c){return d.parseUrlFromLinkHtml(c).bind(function(c){return d.isImageUrl(c.url())?g(a,c):b.none()})},k=function(a,c){return a.insertContent(c,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),b.some(!0)},l=function(a,b,d){var e=function(c){return c(a,b)};return c.findMap(d,e)};return{until:l,linkSelection:i,insertImage:j,insertContent:k}}),g("8",[],function(){var a=function(a,b){return a.hasEventListeners(b)},b=function(a,b){return a.fire("PastePreProcess",{content:b}).content},c=function(a,b){var c=a.dom.add(a.getBody(),"div",{style:"display:none"},b),d=a.fire("PastePostProcess",{node:c}).node.innerHTML;return a.dom.remove(c),d},d=function(c,d){return a(c,"PastePreProcess")?b(c,d):d},e=function(b,d){return a(b,"PastePostProcess")?c(b,d):d},f=function(a,b){return e(a,d(a,b))},g=function(a){var b=a.settings,c=a.plugins.powerpaste;b.paste_preprocess&&a.on("PastePreProcess",function(d){b.paste_preprocess.call(a,c,d)}),b.paste_postprocess&&a.on("PastePostProcess",function(d){b.paste_postprocess.call(a,c,d)})};return{process:f,registerEvents:g}}),g("6",["l","m","g","n","o","p","d","q","r","s","t","u","8","v","w","k","x","2"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){return function(s,t,u,v,w){var x,y,z,A,B;B=(v?v.jsUrl:u)+"/js",y=(v?v.swfUrl:u)+"/flash/textboxpaste.swf",z=(v?v.imgUrl:u)+"/img/spinner_96.gif",A=(v?v.cssUrl:u)+"/css/editorcss.css";var C=function(a){return a.settings.smart_paste!==!1},D=function(a){return function(b,c){return b.undoManager.transact(function(){l.insertContent(b,c),n.restoreStyleAttrs(b.getBody()),w.prepareImages(a)}),d.some(!0)}},E=function(a,b,c){var d=C(a)?[l.linkSelection,l.insertImage]:[];l.until(a,b,d.concat([D(c)]))},F=function(){x&&s.selection.moveToBookmark(x),x=null};s.on("init",function(d){i.injectStyles(z),s.dom.loadCSS(A);var l={baseUrl:B,swf:y,officeStyles:s.settings.powerpaste_word_import||h.officeStyles,htmlStyles:s.settings.powerpaste_html_import||h.htmlStyles,translations:g.translate,allowLocalImages:s.settings.powerpaste_allow_local_images!==!1,enableFlashImport:s.settings.powerpaste_enable_flash_import!==!1,preprocessor:function(a){return e.pure(a)}},r=k(s),u=p.fromDom(s.getBody()),v=function(a){a.events.cancel.bind(function(){F()}),a.events.error.bind(function(a){F(),s.notificationManager?s.notificationManager.open({text:g.translate(a.message()),type:"error"}):j.showDialog(s,g.translate(a.message()))}),a.events.insert.bind(function(a){var b=c.map(a.elements(),function(a){return n.nodeToString(a.dom())}).join("");s.focus(),q(function(){F(),E(s,m.process(s,b),a.assets()),w.uploadImages(a.assets())},1)})},C=a(u,r.createDialog,f.noop,l),D=b();c.each([C,D],v),o.bind(u,"paste",function(a){x||(x=s.selection.getBookmark());var b=t.isText()?D:C;b.paste(a.raw()),t.reset(),q(function(){s.windowManager.windows[0]&&s.windowManager.windows[0].getEl()&&s.windowManager.windows[0].getEl().focus()},1)})}),s.on("remove",function(a){1===r.editors.length&&i.removeStyles()})}}),g("7",["y","z"],function(a,b){var c=function(a){return tinymce.util.VK.metaKeyPressed(a)&&86==a.keyCode&&a.shiftKey};return function(d){var e=b(d.settings.paste_as_text),f=b(!1);d.on("keydown",function(a){c(a)&&(f.set(!0),tinymce.Env.ie&&tinymce.Env.ie<10&&(a.preventDefault(),d.fire("paste",{})))});var g=a(function(){var a=d.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");d.notificationManager.open({text:a,type:"info"})}),h=function(){var a=this,b=!e.get();a.active(b),e.set(b),d.fire("PastePlainTextToggle",{state:b}),b===!0&&0!=d.settings.paste_plaintext_inform&&g(),d.focus()},i=function(){f.set(!1)},j=function(){return f.get()||e.get()};return{toggle:h,reset:i,isText:j}}}),g("10",[],function(){var a=0,b=1,c=-1,d=function(a){return parseInt(a,10)},e=function(a){return function(){return a}},f=function(a,b,c){return{major:e(a),minor:e(b),patch:e(c)}},g=function(a){var b=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(a);return b?f(d(b[1]),d(b[2]),d(b[3])):f(0,0,0)},h=function(d,e){var f=d-e;return 0===f?a:f>0?b:c},i=function(b,c){var d=h(b.major(),c.major());if(d!==a)return d;var e=h(b.minor(),c.minor());if(e!==a)return e;var f=h(b.patch(),c.patch());return f!==a?f:a};return{nu:f,parse:g,compare:i}}),g("9",["10"],function(a){var b=function(a){var b=[a.majorVersion,a.minorVersion].join(".");return b.split(".").slice(0,3).join(".")},c=function(c){return c?a.parse(b(c)):null},d=function(b,d){return a.compare(c(b),a.parse(d))<0};return{getVersion:c,isLessThan:d}}),g("a",["11"],function(a){var b=function(a,b){return function(){var c=a.console;c&&b in c&&c[b].apply(c,arguments)}};return{log:b(a,"log"),error:b(a,"error"),warn:b(a,"warm")}}),g("1",["3","4","5","6","7","8","9","a","2"],function(a,b,c,d,e,f,g,h,i){return function(j){return g.isLessThan(i,"4.0.0")?(h.error('The "powerpaste" plugin requires at least 4.0.0 version of TinyMCE.'),function(){}):function(g,h){var k=e(g),l=function(){var b=a(g);d(g,k,h,j,b),g.settings.powerpaste_block_drop||c(g,h,j,b)},m=function(){b(g,k,j)},n=function(){var a=this;a.active(k.isText()),g.on("PastePlainTextToggle",function(b){a.active(b.state)})};i.Env.ie&&i.Env.ie<10?m():l();var o=function(a){g.dom.bind(a,"drop dragstart dragend dragover dragenter dragleave dragdrop draggesture",function(a){return i.dom.Event.cancel(a)})};g.settings.powerpaste_block_drop&&g.on("init",function(a){o(g.getBody()),o(g.getDoc())}),f.registerEvents(g),g.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:k.toggle,onPostRender:n}),g.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,onclick:k.toggle,onPostRender:n})}}}),g("0",["1","2"],function(a,b){return function(c){b.PluginManager.requireLangPack("powerpaste","ar,ca,cs,da,de,el,es,fa,fi,fr_FR,he_IL,hr,hu_HU,it,ja,kk,ko_KR,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,zh_CN,zh_TW"),b.PluginManager.add("powerpaste",a(c))}}),d("0")()}(); diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/powerpaste/plugin.min.js b/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/powerpaste/plugin.min.js new file mode 100644 index 0000000..df366b9 --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/powerpaste/plugin.min.js @@ -0,0 +1,13 @@ +/* Ephox PowerPaste plugin + * + * Copyright 2010-2016 Ephox Corporation. All rights reserved. + * + * Version: 2.1.10-115 + */ + +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i-1},f=function(a,b){return r(a,b)>-1},g=function(a,b){for(var c=[],d=0;dMore information on paste for Safari':b()},d=function(){return'Safari does not support direct paste of images. More information on image pasting for Safari'},e={"cement.dialog.paste.title":"Paste Formatting Options","cement.dialog.paste.instructions":"Choose to keep or remove formatting in the pasted content.","cement.dialog.paste.merge":"Keep Formatting","cement.dialog.paste.clean":"Remove Formatting","cement.dialog.flash.title":"Additional step needed to paste images","cement.dialog.flash.trigger-paste":"Your browser requires you to take one more action to paste the images in your content. Please press the below keys to complete the image paste:","cement.dialog.flash.missing":'Adobe Flash is required to import images from Microsoft Office. Install the Adobe Flash Player.',"cement.dialog.flash.press-escape":'Press "Close" to paste your content without images.',"loading.wait":"Please wait...","flash.clipboard.no.rtf":c(),"safari.imagepaste":d(),"webview.imagepaste":d(),"error.code.images.not.found":"The images service was not found: (","error.imageupload":"Image failed to upload: (","error.full.stop":").","errors.local.images.disallowed":"Local image paste has been disabled. Local images have been removed from pasted content.","flash.crashed":"Images have not been imported as Adobe Flash appears to have crashed. This may be caused by pasting large documents.","errors.imageimport.failed":"Some images failed to import.","errors.imageimport.unsupported":"Unsupported image type.","errors.imageimport.invalid":"Image is invalid."},f=function(a){return e[a]},g=function(b){return a.translate(f(b))};return{translate:g}}),g("s",[],function(){return{showDialog:function(a,b){var c=function(){win.close()},d=[{text:"Ok",onclick:c}],e={title:"Error",spacing:10,padding:10,items:[{type:"container",html:b}],buttons:d};win=a.windowManager.open(e)}}}),g("15",["y","d","s"],function(a,b,c){return function(d,e){var f=function(){return b.translate("error.code.images.not.found")+e+b.translate("error.full.stop")},g=function(){return b.translate("error.imageupload")+e+b.translate("error.full.stop")},h=function(a){var b=a.status(),e=0===b||b>=400||b<500,h=e?f:g;c.showDialog(d,h())},i=function(){return a(h)};return{instance:i}}}),g("3g",["g"],function(a){var b=function(b){var e=c(b),f=function(b){var c=b.split(" "),f=a.map(c,function(a){return d(e,a)});return f.join(" ")};return{resolve:f}},c=function(a){return a.replace(/\./g,"-")},d=function(a,b){return a+"-"+b};return{create:b,cssNamespace:c,cssClass:d}}),g("2d",["3g"],function(a){var b=a.create("ephox-salmon");return{resolve:b.resolve}}),g("26",["p","2d"],function(a,b){var c=b.resolve("upload-image-in-progress"),d="data-"+b.resolve("image-blob");return{uploadInProgress:a.constant(c),blobId:a.constant(d)}}),g("3h",[],function(){return function(a,b,c){var d=c||!1,e=function(){b(),d=!0},f=function(){a(),d=!1},g=function(){var a=d?f:e;a()},h=function(){return d};return{on:e,off:f,toggle:g,isOn:h}}}),g("1b",["12","13"],function(a,b){var c=function(c){if(null===c)return"null";var d=typeof c;return"object"===d&&a.prototype.isPrototypeOf(c)?"array":"object"===d&&b.prototype.isPrototypeOf(c)?"string":d},d=function(a){return function(b){return c(b)===a}};return{isString:d("string"),isObject:d("object"),isArray:d("array"),isNull:d("null"),isBoolean:d("boolean"),isUndefined:d("undefined"),isFunction:d("function"),isNumber:d("number")}}),g("1c",["14"],function(a){var b=function(){var b=a.keys,c=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b};return void 0===b?c:b}(),c=function(a,c){for(var d=b(a),e=0,f=d.length;e0?b.set(d,e,g.join(" ")):b.remove(d,e)};return{read:c,add:d,remove:e}}),g("3i",["g","5z"],function(a,b){var c=function(a){return void 0!==a.dom().classList},d=function(a){return b.read(a,"class")},e=function(a,c){return b.add(a,"class",c)},f=function(a,c){return b.remove(a,"class",c)},g=function(b,c){a.contains(d(b),c)?f(b,c):e(b,c)};return{get:d,add:e,remove:f,toggle:g,supports:c}}),g("27",["3h","j","3i"],function(a,b,c){var d=function(a,b){c.supports(a)?a.dom().classList.add(b):c.add(a,b)},e=function(a){var d=c.supports(a)?a.dom().classList:c.get(a);0===d.length&&b.remove(a,"class")},f=function(a,b){if(c.supports(a)){var d=a.dom().classList;d.remove(b)}else c.remove(a,b);e(a)},g=function(a,b){return c.supports(a)?a.dom().classList.toggle(b):c.toggle(a,b)},h=function(b,d){var e=c.supports(b),f=b.dom().classList,g=function(){e?f.remove(d):c.remove(b,d)},h=function(){e?f.add(d):c.add(b,d)};return a(g,h,i(b,d))},i=function(a,b){return c.supports(a)&&a.dom().classList.contains(b)};return{add:d,remove:f,toggle:g,toggler:h,has:i}}),h("1g",document),g("k",["p","1e","1f","1g"],function(a,b,c,d){var e=function(a,b){var e=b||d,f=e.createElement("div");if(f.innerHTML=a,!f.hasChildNodes()||f.childNodes.length>1)throw c.error("HTML does not have a single root node",a),"HTML must have a single root node";return h(f.childNodes[0])},f=function(a,b){var c=b||d,e=c.createElement(a);return h(e)},g=function(a,b){var c=b||d,e=c.createTextNode(a);return h(e)},h=function(c){if(null===c||void 0===c)throw new b("Node cannot be null or undefined");return{dom:a.constant(c)}};return{fromHtml:e,fromTag:f,fromText:g,fromDom:h}}),g("3k",["g","1c","p","12"],function(a,b,c,d){var e=function(e,f){var g=function(){for(var b=new d(arguments.length),f=0;f0&&e.unsuppMessage(m);var n={};return a.each(g,function(a){n[a]=c.constant(j[a])}),a.each(h,function(a){n[a]=c.constant(f.prototype.hasOwnProperty.call(j,a)?d.some(j[a]):d.none())}),n}}}),g("2c",["3j","3k","3l"],function(a,b,c){return{immutable:a,immutable2:b,immutableBag:c}}),g("3m",[],function(){var a=function(a,b){var c=[],d=function(a){return c.push(a),b(a)},e=b(a);do e=e.bind(d);while(e.isSome());return c};return{toArray:a}}),g("4j",["p"],function(a){return function(b,c,d){var e=b.isiOS()&&/ipad/i.test(d)===!0,f=b.isiOS()&&!e,g=b.isAndroid()&&3===b.version.major,h=b.isAndroid()&&4===b.version.major,i=e||g||h&&/mobile/i.test(d)===!0,j=b.isiOS()||b.isAndroid(),k=j&&!i,l=c.isSafari()&&b.isiOS()&&/safari/i.test(d)===!1;return{isiPad:a.constant(e),isiPhone:a.constant(f),isTablet:a.constant(i),isPhone:a.constant(k),isTouch:a.constant(j),isAndroid:b.isAndroid,isiOS:b.isiOS,isWebView:a.constant(l)}}}),g("4k",[],function(){var a=function(a,b,c){return{browser:{current:a,version:b},os:{current:c}}};return{create:a}}),g("61",[],function(){var a=function(a){return function(){return a}},b=function(b,c,d){for(var e=0;e=e?c:b(c,F(d,e-f))}},H=G(function(a,b){return b+a}),I=G(function(a,b){return a+b});return{supplant:c,startsWith:e,startsWithIgnoringCase:f,endsWith:g,endsWithIgnoringCase:h,first:i,last:j,removeLeading:l,removeTrailing:m,ensureLeading:q,ensureTrailing:r,trim:s,lTrim:t,rTrim:u,contains:v,containsIgnoringCase:w,htmlEncodeDoubleQuotes:x,equals:y,equalsIgnoringCase:z,head:A,repead:F,padLeft:H,padRight:I,toe:B,tail:C,torso:D,capitalize:E}}),g("4m",["37"],function(a){var b=a.contains,c=function(a){return function(c){return b(c,a)}},d=function(){try{var a=new ActiveXObject("ChromeTab.ChromeFrame");return!!a}catch(b){return!1}},e=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,f=function(a){var d=[{name:"Spartan",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(a){var c=b(a,"edge/")&&b(a,"chrome")&&b(a,"safari")&&b(a,"applewebkit");return c}},{name:"ChromeFrame",versionRegexes:[/.*?chromeframe\/([0-9]+)\.([0-9]+).*/,e],search:function(c){return!!b(c,"chromeframe")&&a()}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,e],search:function(a){return b(a,"chrome")&&!b(a,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(c){var d=b(c,"msie")||b(c,"trident"),e=b(c,"chromeframe");return e?d&&!a():d}},{name:"Opera",versionRegexes:[e,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:c("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:c("firefox")},{name:"Safari",versionRegexes:[e,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(a){return(b(a,"safari")||b(a,"mobile/"))&&b(a,"applewebkit")}},{name:"Envjs",versionRegexes:[/.*?envjs\/\ ?([0-9]+)\.([0-9]+).*/],search:c("envjs")}],f=[{name:"Windows",search:c("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(a){return b(a,"iphone")||b(a,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:c("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:c("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:c("linux")},{name:"Solaris",search:c("sunos")},{name:"FreeBSD",search:c("freebsd")}];return{browsers:d,oses:f}};return{create:f,chromeFrameChecker:d}}),g("4n",[],function(){var a=function(a,b){var c=typeof a;if("boolean"===c)return!!a;if("object"===c){var d=a.minimum;return b.major>d.major||b.major===d.major&&b.minor>=d.minor}throw"invalid spec"};return{meetsSpec:a}}),g("66",[],function(){var a=function(a,b,c){for(var d=0;d-1?d.some(f):d.none()})},n=function(b,d){for(var e=a.isFunction(d)?d:c.constant(!1),f=b.dom(),g=[];null!==f.parentNode&&void 0!==f.parentNode;){var i=f.parentNode,j=h.fromDom(i);if(g.push(j),e(j)===!0)break;f=i}return g},o=function(a){var c=function(c){return b.filter(c,function(b){return!g.eq(a,b)})};return l(a).map(u).map(c).getOr([])},p=function(a){var b=a.dom();return d.from(b.offsetParent).map(h.fromDom)},q=function(a){var b=a.dom();return d.from(b.previousSibling).map(h.fromDom)},r=function(a){var b=a.dom();return d.from(b.nextSibling).map(h.fromDom)},s=function(a){return b.reverse(f.toArray(a,q))},t=function(a){return f.toArray(a,r)},u=function(a){var c=a.dom();return b.map(c.childNodes,h.fromDom)},v=function(a,b){var c=a.dom().childNodes;return d.from(c[b]).map(h.fromDom)},w=function(a){return v(a,0)},x=function(a){return v(a,a.dom().childNodes.length-1)},y=e.immutable("element","offset"),z=function(a,b){var c=u(a);return c.length>0&&b0},q=function(c){return a.contains(b,c)};return{findById:i,findAll:j,register:k, +report:n,inProgress:p,isActive:q,events:g.registry}}}),g("1l",["1b","12"],function(a,b){var c=function(a,b){return b},d=function(b,c){var d=a.isObject(b)&&a.isObject(c);return d?f(b,c):c},e=function(a){return function(){for(var c=new b(arguments.length),d=0;d=c.length&&b(d)}};0===c.length?b([]):a.each(c,function(a,b){a.get(f(b))})})},e=function(b,c){return d(a.map(b,c))},f=function(a,c,d){return b(function(b){var e=!1,f=!1,g=void 0,h=void 0,i=function(){if(e&&f){var a=d(g,h);b(a)}};a.get(function(a){g=a,e=!0,i()}),c.get(function(a){h=a,f=!0,i()})})},g=function(a,b){return function(c){return b(c).bind(a)}};return{nu:b,pure:c,par:d,mapM:e,lift2:f,compose:g}}}),g("o",["1u","1v","1w"],function(a,b,c){var d=function(c){var e=function(b){c(a.bounce(b))};return b(d,e)};return c(d)}),g("2u",["3p"],function(a){return function(){var b=a.getOrDie("FileReader");return new b}}),g("73",["o","2u"],function(a,b){return function(c){return a.nu(function(a){var d=b();d.onload=function(b){var c=b.target;a(c.result)},d.readAsText(c)})}}),g("74",["3p"],function(a){return function(){var b=a.getOrDie("XMLHttpRequest");return new b}}),g("69",["1b","1c","1l","73","o","74","n","2f","37","1f"],function(a,b,c,d,e,f,g,h,i,j){var k={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},l=function(l,m,n,o){var p={url:l,contentType:"application/json",processData:!1,type:"GET"},q=c.merge(p,o),r=f();r.open(q.type.toUpperCase(),q.url,!0),"blob"===q.responseType&&(r.responseType=q.responseType),a.isString(q.contentType)&&r.setRequestHeader("Content-Type",q.contentType);var s=q.dataType,t=a.isString(s)&&"*"!==s?k[s]+", "+k["*"]+"; q=0.01":k["*"];r.setRequestHeader("Accept",t),void 0!==q.xhrFields&&q.xhrFields.withCredentials===!0&&(r.withCredentials=!0),a.isObject(q.headers)&&b.each(q.headers,function(b,c){a.isString(c)||a.isString(b)?r.setRequestHeader(c,b):j.error("Request header data was not a string: ",c," -> ",b)});var u=function(a,b,c){m(a)},v=function(){return"blob"===q.responseType?g.from(r.response).map(d).getOr(e.pure("no response content")):e.pure(r.responseText)},w=function(){v().get(function(a){0===r.status?n("Unknown HTTP error (possible cross-domain request)",r.status,a):n('Could not load url "'+l+'": '+r.statusText,r.status,a)})},x=function(){try{return h.value(JSON.parse(r.response))}catch(a){return h.error({status:r.status,statusText:"Response was not JSON",responseText:r.responseText})}},y=function(){var a="json"===s?x(r):h.value(r.response);a.fold(w,function(a){u(a,r.statusText,r)})},z=function(){0===r.status?i.startsWith(q.url,"file:")?y():w():r.status<100||r.status>=400?w():y()};r.onerror=w,r.onload=z,void 0===q.data?r.send():r.send(q.data)};return{ajax:l}}),g("3u",["3p"],function(a){var b=function(){return a.getOrDie("JSON")},c=function(a){return b().parse(a)},d=function(a,c,d){return b().stringify(a,c,d)};return{parse:c,stringify:d}}),g("3t",["1l","69","3u"],function(a,b,c){var d=function(c,d,e,f){b.ajax(c,d,e,a.merge({dataType:"text",type:"GET"},f))},e=function(d,e,f,g,h){b.ajax(d,f,g,a.merge({dataType:"text",data:c.stringify(e),type:"POST"},h))};return{get:d,post:e}}),g("6a",[],function(){var a=function(a){var b="";return""!==a.protocol&&(b+=a.protocol,b+=":"),""!==a.authority&&(b+="//",b+=a.authority),b+=a.path,""!==a.query&&(b+="?",b+=a.query),""!==a.anchor&&(b+="#",b+=a.anchor),b};return{recompose:a}}),g("75",["1l"],function(a){var b={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@\/]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*)(?::([^:@\/]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},c=function(a,b){for(var c=b,d=c.parser[c.strictMode?"strict":"loose"].exec(a),e={},f=14;f--;)e[c.key[f]]=d[f]||"";return e[c.q.name]={},e[c.key[12]].replace(c.q.parser,function(a,b,d){b&&(e[c.q.name][b]=d)}),e},d=function(d,e){var f=a.merge(b,e);return c(d,f)};return{parse:d}}),g("76",["37"],function(a){var b=function(b){return a.removeTrailing(b,d(b))},c=function(a){return a.match(/(^\/?.*?)(\/|$)/)[1]},d=function(a){return a.substring(a.lastIndexOf("/"))},e=function(d){for(var e=d,f="";""!==e;)if(a.startsWith(e,"../"))e=a.removeLeading(e,"../");else if(a.startsWith(e,"./"))e=a.removeLeading(e,"./");else if(a.startsWith(e,"/./"))e="/"+a.removeLeading(e,"/./");else if("/."===e)e="/";else if(a.startsWith(e,"/../"))e="/"+a.removeLeading(e,"/../"),f=b(f);else if("/.."===e)e="/",f=b(f);else if("."===e||".."===e)e="";else{var g=c(e);e=a.removeLeading(e,g),f+=g}return f};return{remove:e}}),g("77",["37"],function(a){var b=function(b,c,d){if(""!==d&&""===b)return"/"+c;var e=b.substring(b.lastIndexOf("/")+1);return a.removeTrailing(b,e)+c};return{merge:b}}),g("6b",["37","75","76","77"],function(a,b,c,d){var e=function(e,f){var g={strictMode:!0},h=b.parse(e,g),i=b.parse(f,g),j={};return""!==i.protocol?(j.protocol=i.protocol,j.authority=i.authority,j.path=c.remove(i.path),j.query=i.query):(""!==i.authority?(j.authority=i.authority,j.path=c.remove(i.path),j.query=i.query):(""===i.path?(j.path=h.path,""!==i.query?j.query=i.query:j.query=h.query):(a.startsWith(i.path,"/")?j.path=c.remove(i.path):(j.path=d.merge(h.path,i.path,e.authority),j.path=c.remove(j.path)),j.query=i.query),j.authority=h.authority),j.protocol=h.protocol),j.anchor=i.anchor,j};return{transform:e}}),g("3v",["6a","6b"],function(a,b){var c=function(c,d){var e=b.transform(c,d);return a.recompose(e)};return{resolve:c}}),g("2k",["1b","1l","3t","3u","2f","2j","37","3v"],function(a,b,c,d,e,f,g,h){return function(i){var j=function(){var a=i.url,b=a.lastIndexOf("/"),c=b>0?a.substr(0,b):a,d=void 0===i.basePath?c:i.basePath;return g.endsWith(d,"/")?d:d+"/"},k=j(),l=function(a,b){var c=a.split(/\s+/),d=1===c.length&&""!==c[0]?c[0]:b;return h.resolve(k,d)},m=function(g,h,j){var k=g.blob(),m=function(a,b,c){j(e.error(f.failureObject(a,b,c)))},n=f.getFilename(k,h),o=i.credentials!==!0?{}:{xhrFields:{withCredentials:!0}},p=b.merge(o,f.buildExtra("image",k,n)),q=function(b){var c;try{var f=d.parse(b);if(!a.isString(f.location))return void m("JSON response did not contain a string location",500,b);c=f.location}catch(g){c=b}var h=l(c,n);j(e.value({location:h}))};c.post(i.url,{},q,m,p)};return{upload:m}}}),h("x",setTimeout),g("2l",["1b","2f","2j","2c","1f","x"],function(a,b,c,d,e,f){var g=d.immutable("id","filename","blob","base64");return function(d){var h=function(h,i,j){var k=function(a){j(b.error(a))},l=function(c){a.isString(c)?j(b.value({location:c})):(e.error("Image upload result was not a string"),k(""))},m=c.getFilename(h.blob(),i),n=g(i,m,h.blob(),h.data().result);f(function(){d(n,l,k)},0)};return{upload:h}}}),g("1a",["2j","2k","2l"],function(a,b,c){var d=function(a){return b(a)},e=function(a){return c(a)},f=function(b,c,d){return a.failureObject(b,c,d)},g=function(b,c){return a.getFilename(b,c)},h=function(b,c,d){return a.buildExtra(b,c,d)};return{direct:d,custom:e,failureObject:f,getFilename:g,buildExtra:h}}),g("b",["g","p","n","c","15","16","17","18","19","1a","j","k"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=function(d,m){var n=g(),o=h(),p=(e(),e(d,m.url)),q=j.direct(m),r=function(){return l.fromDom(d.getBody())},s=function(b,c,e){a.each(c,function(a){k.set(a,"data-mce-src",b.location)}),f.resrcHistory(d,e,b)};o.events.complete.bind(function(a){f.unwrapHistory(d)});var t=function(a,b,c){i.handleUpload(q,o,n,r(),a,b,function(a){a.fold(function(a){c(a)},s)})},u=function(a,b){i.prepareForUpload(o,a.blobInfo().id(),a.image()).each(function(c){t(c,a.blobInfo(),b)})},v=function(b){var c=p.instance(),d=i.registerAssets(n,r(),b);a.each(d,function(a){a.fold(function(a){console.error(a)},function(a){u(a,c)})})},w=function(){var b=p.instance(),d=i.findBlobs(o,n,r());a.each(d,function(a){a.fold(function(a){o.report(a,c.none(),!1)},function(a){u(a,b)})})},x=function(a){w(),v(a)},y=function(a,b,c,d){return c};return{uploadImages:x,prepareImages:b.noop,getLocalURL:y}},n=function(a){var c=d(a);return{uploadImages:b.noop,prepareImages:c.prepareImages,getLocalURL:c.getLocalURL}};return function(a,b){return b?m(a,b):n(a)}}),g("3",["b","c"],function(a,b){return function(c){var d=!c.uploadImages&&c.settings.images_upload_url?{url:c.settings.images_upload_url,basePath:c.settings.images_upload_base_path,credentials:c.settings.images_upload_credentials}:null;return c.uploadImages?b(c):a(c,d)}}),g("1h",[],function(){var a=function(a,b){return function(){return a.apply(b,arguments)}},b=function(a){return a.ownerDocument.defaultView?a.ownerDocument.defaultView.getComputedStyle(a,null):a.currentStyle||{}},c=function(a){"undefined"!=typeof console&&console.log&&console.log(a)},d=function(a){var b=Array.prototype.slice.call(a).reverse();return function(a){for(var c=a,d=0;d/i),p=null===o?n:o[0];return c(p)}if(!l.get("_mcePaste")){if(f=l.add(m,"div",{id:"_mcePaste","class":"mcePaste"},'\ufeff
'),i=m!=b.getDoc().body?l.getPos(b.selection.getStart(),m).y:m.scrollTop,l.setStyles(f,{position:"absolute",left:-1e4,top:i,width:1,height:1,overflow:"hidden"}),tinymce.isIE)return h=l.doc.body.createTextRange(),h.moveToElementText(f),h.execCommand("Paste"),l.remove(f),"\ufeff"===f.innerHTML?(b.execCommand("mcePasteWord"),void e.preventDefault()):(c(j?f.innerText:f.innerHTML),tinymce.dom.Event.cancel(e));var q=function(a){a.preventDefault()};l.bind(b.getDoc(),"mousedown",q),l.bind(b.getDoc(),"keydown",q),tinymce.isGecko&&(h=b.selection.getRng(!0),h.startContainer==h.endContainer&&3==h.startContainer.nodeType&&(nodes=l.select("p,h1,h2,h3,h4,h5,h6,pre",f),1==nodes.length&&l.remove(nodes.reverse(),!0))),g=b.selection.getRng(),f=f.firstChild,h=b.getDoc().createRange(),h.setStart(f,0),h.setEnd(f,1),k.setRng(h),window.setTimeout(function(){var d="",e=l.select("div.mcePaste");a.each(e,function(b){var c=b.firstChild;c&&"DIV"==c.nodeName&&c.style.marginTop&&c.style.backgroundColor&&l.remove(c,1),a.each(l.select("div.mcePaste",b),function(a){l.remove(a,1)}),a.each(l.select("span.Apple-style-span",b),function(a){l.remove(a,1)}),a.each(l.select("br[_mce_bogus]",b),function(a){l.remove(a)}),d+=b.innerHTML}),a.each(e,function(a){l.remove(a)}),g&&k.setRng(g),c(d),l.unbind(b.getDoc(),"mousedown",q),l.unbind(b.getDoc(),"keydown",q)},0)}}),c=function(a,c,d){return function(e){b(a,c,d,e)}},d=function(a,c,d){return function(e){(tinymce.isOpera||navigator.userAgent.indexOf("Firefox/2")>0)&&((tinymce.isMac?e.metaKey:e.ctrlKey)&&86==e.keyCode||e.shiftKey&&45==e.keyCode)&&b(a,c,d,e)}};return{getOnPasteFunction:c,getOnKeyDownFunction:d}}),g("1i",[],function(){var a=function(a,b){var c,d=b.getDoc(),e="ephoxInsertMarker",f=b.selection,g=b.dom;f.setContent(' '),c=g.get(e);for(var h=d.createDocumentFragment();a.firstChild&&!g.isBlock(a.firstChild);)h.appendChild(a.firstChild);for(var i=d.createDocumentFragment();a.lastChild&&!g.isBlock(a.lastChild);)i.appendChild(a.lastChild);if(c.parentNode.insertBefore(h,c),g.insertAfter(i,c),a.firstChild){if(g.isBlock(a.firstChild)){for(;!g.isBlock(c.parentNode)&&c.parentNode!==g.getRoot();)c=g.split(c.parentNode,c);g.is(c.parentNode,"td,th")||c.parentNode===g.getRoot()||(c=g.split(c.parentNode,c))}g.replace(a,c)}else g.remove(c)};return{insert:a}}),g("1j",["1h"],function(a){var b={strip_class_attributes:"all",retain_style_properties:"none"},c={strip_class_attributes:"none",retain_style_properties:"valid"},d=function(a,d){if(a&&"string"!=typeof a)return a;switch(a){case"clean":return b;case"merge":return c;default:return d}},e=function(b,c,e){var f=d(b,c);return f=a.extend(f,{base_64_images:e})},f=function(a,d,f){var g=e(a,b,f),h=e(d,c,f),i=h,j=function(a){i=a?g:h},k=function(a){return i[a]};return{setWordContent:j,get:k}};return{create:f}}),g("6c",["1h"],function(a){var b=function(a){return a.specified!==!1||"name"===a.nodeName&&""!==a.value},c=function(a,b){return a&&b?function(c,d){return b(c,a(c,d))}:a||b},d=function(d){var e,f,g=0,h=function(){return e},i=function(){return f()};f=function(){return e={},g=0,a.each(d.attributes,function(a){var c=a.nodeName,d=a.value;b(a)&&null!==d&&void 0!==d&&(e[c]=d,g++)}),void 0===e.style&&d.style.cssText&&(e.style=d.style.cssText,g++),f=h,e};var j,k,l=function(){return f(),g},m=function(a){j||(k=f),j=c(j,a),f=function(){return f=k,o(function(a,b){var c=j(a,b);null===c?(d.removeAttribute(a),delete e[a],g--):c!==b&&("class"===a?d.className=c:d.setAttribute(a,c),e[a]=c)}),f=h,e}},n=function(a){return f()[a]},o=function(b){a.each(f(),function(a,c){b(c,a)})};return{get:n,each:o,filter:m,getAttributes:i,getAttributeCount:l}};return{manager:d}}),g("3w",["6c","1h"],function(a,b,c){var d="startElement",e="endElement",f="text",g="comment",h=a.manager,i=function(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})},j=function(a){return a.replace(/([A-Z])/g,function(a,b){return"-"+b.toLowerCase()})},k=!1,l=function(a,c,d){var e,f,g;a.style.length;g=c||a.getAttribute("style"),void 0!==g&&null!==g&&g.split||(g=a.style.cssText),b.each(g.split(";"),function(a){var c=a.indexOf(":");c>0&&(e=b.trim(a.substring(0,c)),e.toUpperCase()===e&&(e=e.toLowerCase()),e=j(e),f=b.trim(a.substring(c+1)),k||(k=0===e.indexOf("mso-")),d(e,f))}),k||(f=a.style["mso-list"],f&&d("mso-list",f))},m=function(a,c,j){var k,m,n,o,p;switch(a.nodeType){case 1:c?k=e:(k=d,o=h(a),p={},l(a,j,function(a,b){p[a]=b})),m="HTML"!==a.scopeName&&a.scopeName&&a.tagName&&a.tagName.indexOf(":")<=0?(a.scopeName+":"+a.tagName).toUpperCase():a.tagName;break;case 3:k=f,n=a.nodeValue;break;case 8:k=g,n=a.nodeValue;break;default:b.log("WARNING: Unsupported node type encountered: "+a.nodeType)}var q=function(){return o&&o.getAttributes(),a},r=function(){return m},s=function(){return k},t=function(){return n},u=function(){return"Type: "+k+", Tag: "+m+" Text: "+n},v=function(a){return o.get(a.toLowerCase())},w=function(a){k===d&&o.filter(a)},x=function(c){if(s()===d){var e="";b.each(p,function(b,d){var f=c(d,b);null===f?(a.style.removeProperty?a.style.removeProperty(i(d)):a.style.removeAttribute(i(d)),delete p[d]):(e+=d+": "+f+"; ",p[d]=f)}),e=e?e:null,w(function(a,b){return"style"===a?e:b}),a.style.cssText=e}},y=function(){return o.getAttributeCount()},z=function(a){o.each(a)},A=function(a){return p[a]},B=function(a){b.each(p,function(b,c){a(c,b)})},C=function(){return b.ephoxGetComputedStyle(a)},D=function(){return k===f&&/^[\s\u00A0]*$/.test(n)};return{getNode:q,tag:r,type:s,text:t,toString:u,getAttribute:v,filterAttributes:w,filterStyles:x,getAttributeCount:y,attributes:z,getStyle:A,styles:B,getComputedStyle:C,isWhitespace:D}},n=function(a,c,d,e){var f=e.createElement(a),g="";return b.each(c,function(a,b){f.setAttribute(b,a)}),b.each(d,function(a,b){g+=b+":"+a+";",f.style[i(b)]=a}),m(f,!1,""!==g?g:null)},o=function(a,b){return m(b.createElement(a),!0)},p=function(a,b){return m(b.createComment(a),!1)},q=function(a,b){return m(b.createTextNode(a))},r=o("HTML",window.document);return{START_ELEMENT_TYPE:d,END_ELEMENT_TYPE:e,TEXT_TYPE:f,COMMENT_TYPE:g,FINISHED:r,token:m,createStartElement:n,createEndElement:o,createComment:p,createText:q}}),g("2m",["3w"],function(a){var b=function(b){var c=b.createDocumentFragment(),d=c,e=function(a){g(a),c=a},f=function(){c=c.parentNode},g=function(a){c.appendChild(a)},h=function(c){var d=function(a){var b=a.getNode().cloneNode(!1);e(b)},h=function(a,c){var d=b.createTextNode(a.text());g(d)};switch(c.type()){case a.START_ELEMENT_TYPE:d(c);break;case a.TEXT_TYPE:h(c);break;case a.END_ELEMENT_TYPE:f();break;case a.COMMENT_TYPE:break;default:throw{message:"Unsupported token type: "+c.type()}}};return{dom:d,receive:h}};return{create:b}}),g("2n",["3w"],function(a){var b=function(b,c){var d;c=c||window.document,d=c.createElement("div"),c.body.appendChild(d),d.style.position="absolute",d.style.left="-10000px",d.innerHTML=b,nextNode=d.firstChild||a.FINISHED;var e=[];endNode=!1;var f=function(b,c){return b===a.FINISHED?b:b?a.token(b,c):void 0},g=function(){var b=nextNode,g=endNode;return!endNode&&nextNode.firstChild?(e.push(nextNode),nextNode=nextNode.firstChild):endNode||1!==nextNode.nodeType?nextNode.nextSibling?(nextNode=nextNode.nextSibling,endNode=!1):(nextNode=e.pop(),endNode=!0):endNode=!0,b===a.FINISHED||nextNode||(c.body.removeChild(d),nextNode=a.FINISHED),f(b,g)},h=function(){return void 0!==nextNode};return{hasNext:h,next:g}};return{tokenize:b}}),g("3x",["3w","1h"],function(a,b){var c=function(c,d){var e=function(e,f,g){var h,i,j,k=!1,l=function(){d&&d(w),k=!1,i=[],j=[]},m=function(a){b.each(a,function(a){e.receive(a)})},n=function(a){k?j.push(a):e.receive(a)},o=function(b){d&&i.push(b),c(w,b),b===a.FINISHED&&r()},p=function(){k=!0},q=function(){m(i),l()},r=function(){u(),m(j),l()},s=function(a){h=h||[],h.push(a)},t=function(){return h&&h.length>0},u=function(){b.each(h,function(a){n(a)}),v()},v=function(){h=[]},w={document:g||window.document,settings:f||{},emit:n,receive:o,startTransaction:p,rollback:q,commit:r,defer:s,hasDeferred:t,emitDeferred:u,dropDeferred:v};return l(),w};return e},d=function(a){return c(function(c,d){d.filterAttributes(b.bind(a,c)),c.emit(d)})};return{createFilter:c,createAttributeFilter:d}}),g("2o",["3x","3w"],function(a,b){var c=/^(P|H[1-6]|T[DH]|LI|DIV|BLOCKQUOTE|PRE|ADDRESS|FIELDSET|DD|DT|CENTER)$/,d=function(a){return c.test(a.tag())},e=function(){return null},f=!1;return a.createFilter(function(a,c){var g=function(){f||(a.emit(b.createStartElement("P",{},{},a.document)),f=!0)};switch(c.type()){case b.TEXT_TYPE:g(),a.emit(c);break;case b.END_ELEMENT_TYPE:f&&(d(c)||c===b.FINISHED)?(a.emit(b.createEndElement("P",a.document)),f=!1):"BR"===c.tag()&&a.emit(c);break;case b.START_ELEMENT_TYPE:"BR"===c.tag()?(c.filterAttributes(e),c.filterStyles(e),a.emit(c)):"IMG"===c.tag()&&c.getAttribute("alt")&&(g(),a.emit(b.createText(c.getAttribute("alt"),a.document)))}c===b.FINISHED&&a.emit(c)})}),g("3y",["3w"],function(a){var b=function(){if(navigator.userAgent.indexOf("Gecko")>0&&navigator.userAgent.indexOf("WebKit")<0)return!1;var b=document.createElement("div");try{b.innerHTML='

 

'}catch(c){return!1}return"Ignore"===a.token(b.firstChild).getStyle("mso-list")},c=b(),d=function(a){return"A"===a.tag()||"SPAN"===a.tag()},e=function(a){var b=a.getStyle("mso-list");return b&&"skip"!==b},f=function(b,c){return b.type()===a.START_ELEMENT_TYPE?0===b.getAttributeCount()||c&&1===b.getAttributeCount()&&null!==b.getAttribute("style")&&void 0!==b.getAttribute("style"):b.type()===a.END_ELEMENT_TYPE};return{hasNoAttributes:f,supportsCustomStyles:c,spanOrA:d,hasMsoListStyle:e}}),g("42",["3w","1h"],function(a,b){var c=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"OL",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"OL",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"OL",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"OL"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"OL",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"OL",type:"upper-alpha"}}],d={"\u2022":{tag:"UL",type:"disc"},"\xb7":{tag:"UL",type:"disc"},"\xa7":{tag:"UL",type:"square"}},e={o:{tag:"UL",type:"circle"},"-":{tag:"UL",type:"disc"},"\u25cf":{tag:"UL",type:"disc"}},f=function(a,b){var c={tag:a.tag,type:a.type,variant:b};return a.start&&(c.start=a.start),a.type||delete c.type,c},g=function(a,g,i){var j,k,l,m=null;return a&&(j=a.text,k=a.symbolFont),j=b.trim(j),m=e[j],m?m=f(m,j):k?(m=d[j],m=m?f(m,j):{tag:"UL",variant:j}):(b.each(c,function(a){if(a.regex.test(j)){if(g&&h(a.type,g,!0))return m=a.type,m.start=parseInt(j),!1;m||(m=a.type),m.start=parseInt(j)}}),m&&!m.variant&&(l="("===j.charAt(0)?"()":")"===j.charAt(j.length-1)?")":".",m=f(m,l))),m&&"OL"===m.tag&&i&&("P"!==i.tag()||/^MsoHeading/.test(i.getAttribute("class")))&&(m=null),m},h=function(a,b,c){return a===b||a&&b&&a.tag===b.tag&&a.type===b.type&&(c||a.variant===b.variant)},i=function(b,c){return b.type()==a.START_ELEMENT_TYPE&&(font=b.getStyle("font-family"),font?c="Wingdings"===font||"Symbol"===font:/^(P|H[1-6]|DIV)$/.test(b.tag())&&(c=!1)),c};return{guessListType:g,eqListType:h,checkFont:i}}),g("3z",["3w","42","1h"],function(a,b,c){var d=function(d,e){var f,g,h,i=!1,j=function(a){var b=a.style.fontFamily;b&&(i="Wingdings"===b||"Symbol"===b)};if(d.type()===a.START_ELEMENT_TYPE&&e.openedTag&&"SPAN"===d.tag()){for(f=e.openedTag.getNode(),j(f),f.childNodes.length>1&&"A"===f.firstChild.tagName&&""===f.firstChild.textContent&&(f=f.childNodes[1]);f.firstChild&&("SPAN"===f.firstChild.tagName||"A"===f.firstChild.tagName);)f=f.firstChild,j(f);if(f=f.firstChild,!f||3!==f.nodeType)return f&&"IMG"===f.tagName;if(g=f.value,c.trim(g)||(f=f.parentNode.nextSibling,g=f?f.value:""),!f||c.trim(f.parentNode.textContent)!=g)return!1;if(h=b.guessListType({text:g,symbolFont:i},null,e.originalToken))return f.nextSibling&&"SPAN"===f.nextSibling.tagName&&/^[\u00A0\s]/.test(f.nextSibling.firstChild.value)&&("P"===e.openedTag.tag()||"UL"===h.tag)}return!1},e=function(a,b){var c,d=0;for(c=a.parentNode;null!==c&&void 0!==c&&c!==b.parentNode;)d+=c.offsetLeft,c=c.offsetParent;return d},f=function(a){var b={};return function(c,d){var e,f=c+","+d;return b.hasOwnProperty(f)?b[f]:(e=a.call(null,c,d),b[f]=e,e)}},g=function(a){var b=a.indexOf(".");if(b>=0&&c.trim(a.substring(b+1))===className)return match=results[2],!1},h=f(function(a,b){var d,e,f,h,i=/([^{]+){([^}]+)}/g;for(i.lastIndex=0;null!==(d=i.exec(a))&&!e;)c.each(d[1].split(","),g(selector));return!!e&&(f=document.createElement("p"),f.setAttribute("style",e),h=c.ephoxGetComputedStyle(f),!!h&&""+h.marginLeft)}),i=function(){var a,b,c=function(c,d,f,g){var i,j,k=1;return g&&/^([0-9]+\.)+[0-9]+\.?$/.test(g.text)?g.text.replace(/([0-9]+|\.$)/g,"").length+1:(i=b||parseInt(h(f,d.getAttribute("class"))),j=e(c.getNode(),d.getNode()),i?a?j+=a:0===j&&(a=i,j+=i):i=48,b=i=Math.min(j,i),k=Math.max(1,Math.floor(j/i))||1)};return{guessIndentLevel:c}},j=function(){var b=!1,c="",d=function(d){return b&&d.type()===a.TEXT_TYPE?(c+=d.text(),!0):d.type()===a.START_ELEMENT_TYPE&&"STYLE"===d.tag()?(b=!0,!0):d.type()===a.END_ELEMENT_TYPE&&"STYLE"===d.tag()&&(b=!1,!0)};return{check:d}};return{isListWithoutCommentsOrStyles:d,indentGuesser:i,styles:j}}),g("40",["3w","42"],function(a,b){var c=["disc","circle","square"],d=function(a,b){return"UL"===a.tag&&c[b-1]===a.type&&(a={tag:"UL"}),a};return function(c,e){var f,g=[],h=[],i=0,j=function(b,d){var h={},j={};i++,d&&b.type&&(h={"list-style-type":b.type}),b.start&&b.start>1&&(j={start:b.start}),g.push(b),c.emit(a.createStartElement(b.tag,j,h,e)),f=b},k=function(){c.emit(a.createEndElement(g.pop().tag,e)),i--,f=g[g.length-1]},l=function(){for(;i>0;)m(),k();c.commit()},m=function(){var b=h?h.pop():"P";"P"!=b&&c.emit(a.createEndElement(b,e)),c.emit(a.createEndElement("LI",e))},n=function(d,g,i){var l={};if(d){var m=d.getStyle("margin-left");void 0!==m&&(l["margin-left"]=m)}else l["list-style-type"]="none";f&&!b.eqListType(f,g)&&(k(),i&&(c.emit(a.createStartElement("P",{},{},e)),c.emit(a.createText("\xa0",e)),c.emit(a.createEndElement("P",e))),j(g,!0)),c.emit(a.createStartElement("LI",{},l,e)),d&&"P"!=d.tag()?(h.push(d.tag()),d.filterStyles(function(){return null}),c.emit(d)):h.push("P")},o=function(b,f,g,l){if(g){for(i||(i=0);i>b;)m(),k();if(g=d(g,b),i==b)m(),n(f,g,l);else for(b>1&&h.length>0&&"P"!==h[h.length-1]&&(c.emit(a.createEndElement(h[h.length-1],e)),h[h.length-1]="P");i0;)c.emit(h.spanCount.shift());a&&c.emit(i)}else e.log("Unknown list type: "+h.bulletInfo.text+" Symbol font? "+h.bulletInfo.symbolFont),c.rollback()};i.type()===b.TEXT_TYPE||i.type()===b.START_ELEMENT_TYPE?j(!0):i.type()===b.COMMENT_TYPE?j("[endif]"!==i.text()):i.type()===b.END_ELEMENT_TYPE?a.spanOrA(i)&&h.spanCount.pop():f(c,i)},q=function(a,c,d){d.type()===b.END_ELEMENT_TYPE&&d.tag()===c.originalToken.tag()?(c.nextFilter=h,c.skippedPara=!1):a.emit(d)},r=j;return{initial:r}}),g("2p",["3x","3y","3w","3z","40","41","42","1h"],function(a,b,c,d,e,f,g,h){var i={},j=function(a){i.nextFilter=f.initial,i.itemLevel=0,i.originalToken=null,i.commentMode=!1,i.openedTag=null,i.symbolFont=!1,i.listType=null,i.indentGuesser=d.indentGuesser(),i.emitter=e(a,a.document),i.styles=d.styles(),i.spanCount=[],i.skippedPara=!1,i.styleLevelAdjust=0,i.bulletInfo=void 0};j({});var k=function(a){j(a)},l=function(a,b){i.styles.check(b)||(i.symbolFont=g.checkFont(b,i.symbolFont),i.nextFilter(a,i,b))};return a.createFilter(l,k)}),g("2q",["1h"],function(a){var b=function(a){var b=a,c=65279===b.charCodeAt(b.length-1);return c?b.substring(0,b.length-1):a},c=function(a){return/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(a)?a.replace(/(?:
 [\s\r\n]+|
)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:
 [\s\r\n]+|
)*/g,"$1"):a},d=function(a){return a.replace(/

/g,"

")},e=function(a){return a.replace(/
/g," ")},f=function(a){return a.replace(/

/g,"
")},g=[b],h=tinymce.isIE&&document.documentMode>=9?[f,e,d,c].concat(g):g,i=a.compose(h);return{all:i,textOnly:b}}),g("43",["3x"],function(a){var b=/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/,c=function(a){return function(c,d){var e=!1;switch(a){case"all":case"*":e=!0;break;case"valid":e=!b.test(c);break;case void 0:case"none":e="list-style-type"===c;break;default:e=(","+a+",").indexOf(","+c+",")>=0}return e?d:null}};return a.createFilter(function(a,b){var d=a.settings.get("retain_style_properties");b.filterStyles(c(d)),a.emit(b)})}),g("44",["3x","3w"],function(a,b){return a.createFilter(function(a,c){a.seenList?a.emit(c):a.inferring?("LI"===c.tag()&&(c.type()===b.START_ELEMENT_TYPE?a.inferring++:(a.inferring--,a.inferring||(a.needsClosing=!0))),a.emit(c)):("OL"===c.tag()||"UL"===c.tag()?a.seenList=!0:"LI"===c.tag()&&(a.inferring=1,a.needsClosing||a.emit(b.createStartElement("UL",{},{},a.document))),!a.needsClosing||a.inferring||c.isWhitespace()||(a.needsClosing=!1,a.emit(b.createEndElement("UL",a.document))),a.emit(c))})}),g("45",["3x"],function(a){return a.createAttributeFilter(function(a,b){return"name"===a||"id"===a?null:b})}),g("46",["3x"],function(a){return a.createAttributeFilter(function(a,b){var c;if("class"===a)switch(c=this.settings.get("strip_class_attributes")){case"mso":return 0===b.indexOf("Mso")?null:b;case"none":return b;default:return null}return b})}),g("47",["3x","3y","3w"],function(a,b,c){var d=[],e=[],f=!1,g=function(a,b){var e,f,g=1;for(e=b+1;e=0&&b.hasNoAttributes(a,!0))};0===d.length?e.type()===c.START_ELEMENT_TYPE?h(e)?a.emit(e):i(a,e):a.emit(e):(f||(f=h(e)),i(a,e))})}),g("48",["3x"],function(a){return a.createAttributeFilter(function(a,b){return"style"===a&&""===b?null:b})}),g("49",["3x"],function(a){return a.createAttributeFilter(function(a,b){return"lang"===a?null:b})}),g("4a",["3x","3w"],function(a,b){return a.createFilter(function(a,c){if("IMG"===c.tag()){if(c.type()===b.END_ELEMENT_TYPE&&a.skipEnd)return void(a.skipEnd=!1);if(c.type()===b.START_ELEMENT_TYPE){if(/^file:/.test(c.getAttribute("src")))return void(a.skipEnd=!0);if(a.settings.get("base_64_images")&&/^data:image\/.*;base64/.test(c.getAttribute("src")))return void(a.skipEnd=!0)}}a.emit(c)})}),g("4b",["3x"],function(a){return a.createFilter(function(a,b){"META"!==b.tag()&&"LINK"!==b.tag()&&a.emit(b)})}),g("4c",["3x","3y","3w"],function(a,b,c){var d=function(a){return!b.hasNoAttributes(a)&&!/^OLE_LINK/.test(a.getAttribute("name"))},e=[];return a.createFilter(function(a,b){var f;b.type()===c.START_ELEMENT_TYPE&&"A"===b.tag()?(e.push(b),d(b)&&a.defer(b)):b.type()===c.END_ELEMENT_TYPE&&"A"===b.tag()?(f=e.pop(),d(f)&&a.defer(b),0===e.length&&a.emitDeferred()):a.hasDeferred()?a.defer(b):a.emit(b)})}),g("4d",["3x","3w"],function(a,b){var c=!1;return a.createFilter(function(a,d){"SCRIPT"===d.tag()?c=d.type()===b.START_ELEMENT_TYPE:c||(d.filterAttributes(function(a,b){return/^on/.test(a)||"language"===a?null:b}),a.emit(d))})}),g("2r",["43","44","45","46","47","48","49","4a","4b","4c","4d"],function(a,b,c,d,e,f,g,h,i,j,k){return[k,c,h,a,g,f,d,j,e,i,b]}),g("4e",["3x"],function(a){return a.createFilter(function(a,b){b.filterAttributes(function(a,c){return"align"===a?null:"UL"!==b.tag()&&"OL"!==b.tag()||"type"!==a?c:null}),a.emit(b)})}),g("4f",["3x"],function(a){return a.createAttributeFilter(function(a,b){return/^xmlns(:|$)/.test(a)?null:b})}),g("4g",["3x"],function(a){return a.createFilter(function(a,b){b.tag&&/^([OVWXP]|U[0-9]+|ST[0-9]+):/.test(b.tag())||a.emit(b)})}),g("4h",["3x"],function(a){return a.createAttributeFilter(function(a,b){return"href"===a&&(b.indexOf("#_Toc")>=0||b.indexOf("#_mso")>=0)?null:b})}),g("4i",["3x"],function(a){return a.createAttributeFilter(function(a,b){return/^v:/.test(a)?null:b})}),g("2s",["4e","4f","4g","4h","4i","2p"],function(a,b,c,d,e,f){return[c,f,d,e,b,a]}),g("1k",["2m","2n","2o","2p","2q","2r","2s"],function(a,b,c,d,e,f,g){var h=function(a,b,c,d){var e,f=b;for(e=a.length-1;e>=0;e--)f=a[e](f,c,d);return f},i=function(c,d,e,f){var g=a.create(e),i=b.tokenize(c,e);for(pipeline=h(f,g,d,e);i.hasNext();)pipeline.receive(i.next());return g.dom},j=function(a,b,c){var d=e.all(a),h=l(d);b.setWordContent(h);var j=f;return h&&(j=g.concat(f)),i(d,b,c,j)},k=function(a,b,d){var f=e.textOnly(a);return i(f,b,d,[c])},l=function(a){return a.indexOf("")>=0||a.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")>=0||a.indexOf("MsoListParagraphCxSpFirst")>=0||a.indexOf("")>=0};return{filter:j,filterPlainText:k,isWordContent:l}}),g("f",["1i","1j","1k","x"],function(a,b,c,d){return function(e,f){var g=function(g){var h=function(d){var f={content:g};e.fire("PastePreProcess",f);var h=b.create(d||e.settings.powerpaste_word_import,d||e.settings.powerpaste_html_import,!0),i=c.filter(f.content,h,e.getDoc());e.fire("PastePostProcess",i),e.undoManager.transact(function(){a.insert(i,e)})},i=function(a){return"clean"===a||"merge"===a},j=function(){var a,b=function(){a.close(),h("clean")},c=function(){a.close(),h("merge")},g=[{text:f("cement.dialog.paste.clean"),onclick:b},{text:f("cement.dialog.paste.merge"),onclick:c}],i={title:f("cement.dialog.paste.title"),spacing:10,padding:10,items:[{type:"container",html:f("cement.dialog.paste.instructions")}],buttons:g};a=e.windowManager.open(i),d(function(){a&&a.getEl().focus()},1)};c.isWordContent(g)&&!i(e.settings.powerpaste_word_import)?j():i(e.settings.powerpaste_html_import)?h():j()};return{showDialog:g}}}),g("4",["d","e","f"],function(a,b,c){return function(d,e,f){var g,h,i=this,j=c(d,a.translate),k=function(a){return function(b){a(b)}};g=b.getOnPasteFunction(d,j.showDialog,e),d.on("paste",k(g)),h=b.getOnKeyDownFunction(d,j.showDialog,e),d.on("keydown",k(h)),d.addCommand("mceInsertClipboardContent",function(a,b){j.showDialog(b.content||b)}),d.settings.paste_preprocess&&d.on("PastePreProcess",function(a){d.settings.paste_preprocess.call(i,i,a)})}}),g("1s",[],function(){var a=0,b=function(b){var c=new Date,d=c.getTime(),e=Math.floor(1e9*Math.random());return a++,b+"_"+e+a+String(d)};return{generate:b}}),g("1n",["g","1s","2t","h","o","2u","2b","j"],function(a,b,c,d,e,f,g,h){var i=c.detect(),j=function(a){var b=g.createObjectURL(a);return k(a,b)},k=function(a,c){return e.nu(function(e){var g=f();g.onload=function(f){var g=b.generate("image"),h=f.target,i=d.blob(g,a,c,h);e(i)},g.readAsDataURL(a)})},l=function(a){return 0===a.length?e.pure([]):e.mapM(a,j)},m=function(a){return a.raw().target.files||a.raw().dataTransfer.files},n=function(b){return 1===b.length&&a.contains(b,"Files")},o=function(b){return!a.contains(b,"text/_moz_htmlcontext")},p=function(b){return a.contains(b,"Files")},q=function(a){return!0},r=function(){return i.browser.isChrome()||i.browser.isSafari()||i.browser.isOpera()?p:i.browser.isFirefox()?o:i.browser.isIE()?n:q},s=r(),t=function(c){var f=a.map(c,function(a){var c=b.generate("image");return d.url(c,h.get(a,"src"),a)});return e.pure(f)};return{multiple:l,toFiles:m,isFiles:s,fromImages:t,single:j,singleWithUrl:k}}),g("i",["1n"],function(a){var b=function(b){return a.multiple(b)},c=function(b){return a.single(b)},d=function(b,c){return a.singleWithUrl(b,c)};return{multiple:b,single:c,singleWithUrl:d}}),g("5",["g","h","i","j","k","d","f","2"],function(a,b,c,d,e,f,g,h){return function(i,j,k,l){var m,n=/^image\/(jpe?g|png|gif|bmp)$/i;i.on("dragstart dragend",function(a){m="dragstart"===a.type}),i.on("dragover dragend dragleave",function(a){a.preventDefault()});var o=function(a){var b={};if(a){if(a.getData){var c=a.getData("Text");c&&c.length>0&&(b["text/plain"]=c)}if(a.types)for(var d=0;d0},q=function(a){return!r(a)&&(p(a,"text/html")||p(a,"text/plain"))},r=function(a){var b=a["text/plain"];return!!b&&0===b.indexOf("file://")},s=function(b){var c=b.target.files||b.dataTransfer.files;return a.filter(c,function(a){return n.test(a.type)})},t=function(c){return a.map(c,function(a){var c=e.fromTag("img"),f=b.cata(a,l.getLocalURL,function(a,b,c){return b});return d.set(c,"src",f),c.dom().outerHTML}).join("")},u=function(a){c.multiple(a).get(function(a){var b=t(a);i.insertContent(b,{merge:i.settings.paste_merge_formats!==!1}),l.uploadImages(a)})};i.on("drop",function(a){if(!m){if(h.dom.RangeUtils&&h.dom.RangeUtils.getCaretRangeFromPoint){var b=h.dom.RangeUtils.getCaretRangeFromPoint(a.clientX,a.clientY,i.getDoc());b&&i.selection.setRng(b)}var c=s(a);if(c.length>0)return u(c),void a.preventDefault();var d=o(a.dataTransfer);if(q(d)){var e=g(i,f.translate);e.showDialog(d["text/html"]||d["text/plain"]),a.preventDefault()}}})}}),g("4r",["g","2c","1f"],function(a,b,c){var d=["officeStyles","htmlStyles","isWord","proxyBin","isInternal","backgroundAssets"],e=function(b,c){var e={};return a.each(d,function(a){var d=c[a]().or(b[a]());d.each(function(b){e[a]=b})}),f(e)},f=b.immutableBag([],d);return{nu:f,merge:e}}),g("2w",["n","1m"],function(a,b){var c=b.generate([{error:["message"]},{paste:["elements","assets","correlated"]},{cancel:[]},{incomplete:["elements","assets","correlated","message"]}]),d=function(a,b,c,d,e){return a.fold(b,c,d,e)},e=function(b,e){return d(b,a.none,a.none,a.none,function(b,f,g,h){return d(e,a.none,function(b,d,e){return a.some(c.incomplete(b,d,e,h))},a.none,a.none)}).getOr(e)};return{error:c.error,paste:c.paste,cancel:c.cancel,incomplete:c.incomplete,cata:d,carry:e}}),g("4q",["4r","2w","1v","2c"],function(a,b,c,d){var e=d.immutableBag(["response","bundle"],[]),f=function(a){return l(function(b){var c=e(a);b(c)})},g=function(a,b){a(e(b))},h=function(a){return f({response:a.response(),bundle:a.bundle()})},i=function(c){return f({response:b.error(c),bundle:a.nu({})})},j=function(){return f({response:b.cancel(),bundle:a.nu({})})},k=function(){return f({response:b.paste([],[],[]),bundle:a.nu({})})},l=function(a){var b=function(b){a(b)};return c(l,b)};return{call:g,sync:l,pure:f,pass:h,done:e,error:i,initial:k,cancel:j}}),g("23",["n"],function(a){var b=function(a){for(var b=[],c=function(a){b.push(a)},d=0;d0){var j=c.mapM(h,function(a){var c=d.createObjectURL(a);return i.apply(g,[a,"specified",c]),b.singleWithUrl(a,c)});return e.some(j)}return e.none()};return{convert:g}}),g("30",["4u","o","p","n"],function(a,b,c,d){var e=function(){var c=d.none(),e=function(b){c=a.convert(b)},f=function(a){return c.fold(function(){return b.nu(function(a){a([])})},function(a){return a}).get(a)},g=function(){c=d.none()};return{convert:e,listen:f,clear:g}},f=function(){return{convert:d.none,listen:function(a){a([])},clear:c.noop}};return{background:e,ignore:f}}),h("4v",RegExp),g("31",["n","23","4v"],function(a,b,c){var d=function(a){return void 0!==a&&void 0!==a.types&&null!==a.types},e=function(a,c){return b.findMap(a,function(a){return f(c,a)})},f=function(d,e){var f=new c(e,"i");return b.findMap(d,function(b){return null!==b.match(f)?a.some({type:b,flavor:e}):a.none()})};return{isValidData:d,getPreferredFlavor:e,getFlavor:f}}),g("4x",["1l","1m"],function(a,b){var c=b.generate([{none:[]},{error:["message "]},{blob:["blob"]}]),d=function(a,b,c,d){return a.fold(b,c,d)};return a.merge(c,{cata:d})}),g("78",["3p"],function(a){return function(b,c){var d=a.getOrDie("Blob");return new d(b,c)}}),g("79",["3p"],function(a){return function(b){var c=a.getOrDie("Uint8Array");return new c(b)}}),g("7a",["3p"],function(a){var b=function(b){var c=a.getOrDie("requestAnimationFrame");c(b)},c=function(b){var c=a.getOrDie("atob");return c(b)};return{atob:c,requestAnimationFrame:b}}),g("6d",["4x","78","79","7a","n","2f","37","12","62"],function(a,b,c,d,e,f,g,h,i){var j=function(a,e){for(var f=1024,g=d.atob(a),j=g.length,k=i.ceil(j/f),l=new h(k),m=0;m"data:image/".length},l=function(b){if(!k(b))return a.none();var c=b.indexOf(";"),d=b.substr("data:".length,c-"data:".length),e=b.substr(c+";base64,".length);try{var f=a.blob(j(e,d));return f}catch(g){return a.error(g)}};return{convert:l}}),g("4w",["6d"],function(a){var b=function(b){return a.convert(b)};return{toBlob:b}}),g("4y",["2w","g","h","p","2c","j","k","1d","2a","1f"],function(a,b,c,d,e,f,g,h,i,j){var k=e.immutable("asset","image"),l=function(a,e){var g=[];return b.each(a,function(a,b){c.cata(a,function(c,d,h,i){var j=e[b];f.set(j,"src",h),g.push(k(a,j))},d.noop)}),g},m=function(a,e){var g=[],j=b.bind(a,function(a){return"img"===h.name(a)?[a]:i.descendants(a,"img")});return b.each(e,function(a){c.cata(a,function(c,d,e,h){b.each(j,function(b){f.get(b,"src")===e&&g.push(k(a,b))})},d.noop)}),g},n=function(d){var e=[],h=[],i=[];return b.each(d,function(a){return c.cata(a,function(b,c,d,j){var l=g.fromTag("img");f.set(l,"src",d),e.push(l),h.push(a),i.push(k(a,l))},function(a,b,c){j.error("Internal error: Paste operation produced an image URL instead of a Data URI: ",b)})}),a.paste(e,h,i)};return{createImages:n,findImages:m,updateSources:l}}),g("1y",["g","29","3f"],function(a,b,c){var d=function(b){b.dom().textContent="",a.each(c.children(b),function(a){e(a)})},e=function(a){var b=a.dom();null!==b.parentNode&&b.parentNode.removeChild(b)},f=function(a){var d=c.children(a);d.length>0&&b.before(a,d),e(a)};return{empty:d,remove:e,unwrap:f}}),g("32",["4w","4x","4q","4y","2w","g","i","n","2c","j","k","1d","1y","29","2a"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=i.immutable("blob","image"),q=function(c,d){var e=a.toBlob(d);return b.cata(e,h.none,h.none,function(a){return h.some(p(a,c))})},r=function(a){var b=k.fromTag("div");return n.append(b,a),o.descendants(b,"img[src]")},s=function(a){return 0===a.indexOf("data:")&&a.indexOf("base64")>-1},t=function(a){return 0===a.indexOf("blob:")},u=function(a){return s(a)||t(a)},v=function(a){var b=j.get(a,"src");return u(b)},w=function(a){return f.bind(r(a),function(a){var b=j.get(a,"src");return u(b)?q(a,b).toArray():[]})},x=function(a){var b=f.filter(a,function(a){return"img"!==l.name(a)||!v(a)});return e.incomplete(b,[],[],"errors.local.images.disallowed")};return function(a){return function(b,h){return c.sync(function(b){var i=function(){c.call(b,{response:h.response(),bundle:h.bundle()})},j=function(a){var i=w(a),j=f.map(i,function(a){return a.blob()});g.multiple(j).get(function(g){var j=f.map(i,function(a){return a.image()}),k=d.updateSources(g,j);c.call(b,{response:e.paste(a,g,k),bundle:h.bundle()})})},k=function(a){var d=f.filter(r(a),v);f.each(d,m.remove),c.call(b,{response:d.length>0?x(a):h.response(),bundle:h.bundle()})},l=function(b,c,d,e){a.allowLocalImages===!1?k(b):0===c.length?j(b):i()};e.cata(h.response(),i,l,i,l)})}}}),g("4z",["4q","2w","o","1f"],function(a,b,c,d){var e=function(c){var e=function(e,f){return c.proxyBin().fold(function(){return d.error(e),a.pure({response:b.cancel(),bundle:{}})},f)};return{handle:e}},f=function(a){return c.nu(function(b){a.backgroundAssets().fold(function(){b([])},function(a){a.listen(b)})})},g=function(a){var b=j(a);return b&&h(a)||!b&&i(a)},h=function(a){return a.officeStyles().getOr(!0)},i=function(a){return a.htmlStyles().getOr(!1)},j=function(a){return a.isWord().getOr(!1)},k=function(a){return a.isInternal().getOr(!1)};return{proxyBin:e,backgroundAssets:f,merging:g,mergeOffice:h,mergeNormal:i,isWord:j,isInternal:k}}),g("5c",["3g"],function(a){var b=a.create("ephox-cement");return{resolve:b.resolve}}),g("50",["5c","1l","p","n","27","k","28","1x","29"],function(a,b,c,d,e,f,g,h,i){return function(j,k){var l=k.translations,m=function(a,c,e){e(d.some(b.merge(c,{officeStyles:a,htmlStyles:a})))},n=function(b,c){var k=function(){t(),m(!1,b,c)},n=function(){t(),m(!0,b,c)},o=f.fromTag("div");e.add(o,a.resolve("styles-dialog-content"));var p=f.fromTag("p"),q=g.fromHtml(l("cement.dialog.paste.instructions"));i.append(p,q),h.append(o,p);var r={text:l("cement.dialog.paste.clean"),tabindex:0,className:a.resolve("clean-styles"),click:k},s={text:l("cement.dialog.paste.merge"),tabindex:1,className:a.resolve("merge-styles"),click:n},t=function(){v.destroy()},u=function(){c(d.none()),t()},v=j(!0);v.setTitle(l("cement.dialog.paste.title")),v.setContent(o),v.setButtons([r,s]),v.show(),v.events.close.bind(u)},o=function(a,b){var c=a?"officeStyles":"htmlStyles",d=k[c];"clean"===d?m(!1,k,b):"merge"===d?m(!0,k,b):n(k,b)};return{get:o,destroy:c.noop}}}),g("33",["4q","4r","4z","50","2w"],function(a,b,c,d,e){var f=function(f,g){var h=d(f,g);return function(d,f){var g=f.bundle(),i=f.response();return a.sync(function(d){h.get(c.isWord(g),function(c){var g=c.fold(function(){return{response:e.cancel(),bundle:f.bundle()}},function(a){return{response:i,bundle:b.nu({officeStyles:a.officeStyles,htmlStyles:a.htmlStyles})}});a.call(d,g)})})}},g=function(d,e){return function(g,h){return c.isInternal(h.bundle())?a.pure({response:h.response(),bundle:b.nu({officeStyles:!0,htmlStyles:!0})}):f(d,e)(g,h)}},h=function(c,d){return function(e,f){return a.pure({response:f.response(),bundle:b.nu({officeStyles:c,htmlStyles:d})})}};return{fixed:h,fromConfig:f,fromConfigIfExternal:g}}),g("7r",["2t","p","k","1g"],function(a,b,c,d){var e=function(a){for(var b=[];null!==a.nextNode();)b.push(c.fromDom(a.currentNode));return b},f=function(a){try{return e(a)}catch(b){return[]}},g=a.detect().browser,h=g.isIE()||g.isSpartan()?f:e,i=b.constant(b.constant(!0)),j=function(a,b){var c=b.fold(i,function(a){return function(b){return a(b.nodeValue)}});c.acceptNode=c;var e=d.createTreeWalker(a.dom(),NodeFilter.SHOW_COMMENT,c,!1);return h(e)};return{find:j}}),g("7b",["n","7r","37","1g"],function(a,b,c,d){var e=function(d){return b.find(d,a.some(function(a){return c.startsWith(a,"[if gte vml 1]")}))};return{find:e}}),g("6q",[],function(){var a=function(a){return void 0!==a.style};return{isSupported:a}}),h("11",window),g("5d",["1b","g","1c","n","j","5i","k","1d","6q","37","1e","1f","11"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=function(b,c,d){if(!a.isString(d))throw l.error("Invalid call to CSS.set. Property ",c,":: Value ",d,":: Element ",b),new k("CSS value must be a string: "+d);i.isSupported(b)&&b.style.setProperty(c,d)},o=function(a,b){i.isSupported(a)&&a.style.removeProperty(b)},p=function(a,b,c){var d=a.dom();n(d,b,c)},q=function(a,b){var d=a.dom();c.each(b,function(a,b){n(d,b,a)})},r=function(a,b){var d=a.dom();c.each(b,function(a,b){a.fold(function(){o(d,b)},function(a){n(d,b,a)})})},s=function(a,b){var c=a.dom(),d=m.getComputedStyle(c),e=d.getPropertyValue(b),g=""!==e||f.inBody(a)?e:t(c,b);return null===g?void 0:g},t=function(a,b){return i.isSupported(a)?a.style.getPropertyValue(b):""},u=function(a,b){var c=a.dom(),e=t(c,b);return d.from(e).filter(function(a){return a.length>0})},v=function(a,b,c){var d=g.fromTag(a);p(d,b,c);var e=u(d,b);return e.isSome()},w=function(a,b){var c=a.dom();o(c,b),e.has(a,"style")&&""===j.trim(e.get(a,"style"))&&e.remove(a,"style")},x=function(a,b){var c=e.get(a,"style"),d=b(a),f=void 0===c?e.remove:e.set;return f(a,"style",c),d},y=function(a,b){var c=a.dom(),d=b.dom();i.isSupported(c)&&i.isSupported(d)&&(d.style.cssText=c.style.cssText)},z=function(a){return a.dom().offsetWidth},A=function(a,b,c){u(a,c).each(function(a){u(b,c).isNone()&&p(b,c,a)})},B=function(a,c,d){h.isElement(a)&&h.isElement(c)&&b.each(d,function(b){A(a,c,b)})};return{copy:y,set:p,preserve:x,setAll:q,setOptions:r,remove:w,get:s,getRaw:u,isValidValue:v,reflow:z,transfer:B}}),g("6r",["1b","g","p","n","5i","3n","k","2i"],function(a,b,c,d,e,f,g,h){var i=function(a){return n(e.body(),a)},j=function(b,e,f){for(var h=b.dom(),i=a.isFunction(f)?f:c.constant(!1);h.parentNode;){h=h.parentNode;var j=g.fromDom(h);if(e(j))return d.some(j);if(i(j))break}return d.none()},k=function(a,b,c){var d=function(a){return b(a)};return h(d,j,a,b,c)},l=function(a,b){var c=a.dom();return c.parentNode?m(g.fromDom(c.parentNode),function(c){return!f.eq(a,c)&&b(c)}):d.none()},m=function(a,e){var f=b.find(a.dom().childNodes,c.compose(e,g.fromDom));return d.from(f).map(g.fromDom)},n=function(a,b){var c=function(a){for(var e=0;e");return d.dom().innerHTML=c.substr(h+"]>".length),g.descendant(d,function(a){return f.name(a)===b})},l=function(b){return f.isComment(b)?k(b,"v:shape"):a.none()},m=function(a){return l(a).map(function(a){var f=b.get(a,"o:spid"),g=void 0===f?b.get(a,"id"):f,h=e.fromTag("img");return c.add(h,"rtf-data-image"),b.set(h,"data-image-id",g.substr("_x0000_".length)),b.set(h,"data-image-type","code"),d.setAll(h,{width:d.get(a,"width"),height:d.get(a,"height")}),h})},n=function(d){if("img"===f.name(d)){var e=b.get(d,"src");if(void 0!==e&&null!==e&&j.startsWith(e,"file://")){var g=h.shallow(d),i=e.split(/[\/\\]/),k=i[i.length-1];return b.set(g,"data-image-id",k),b.remove(g,"src"),b.set(g,"data-image-type","local"),c.add(g,"rtf-data-image"),a.some(g)}return a.none()}return a.none()},o=function(a){return p(a).length>0},p=function(a){return i.descendants(a,".rtf-data-image")};return{local:n,vshape:m,find:p,exists:o,scour:l}}),g("6e",["7b","g","5a","n","23","2c","j","28","2a","1f"],function(a,b,c,d,e,f,g,h,i,j){var k=f.immutable("img","vshape"),l=function(a){var b=n(a);return b._rawElement=a.dom(),b},m=function(a){var b=n(a);return b._rawElement=a.dom(),b},n=function(a){return g.clone(a)},o=function(d){var f=h.fromHtml(d),g=b.bind(f,function(a){return i.descendants(a,"img")}),j=b.bind(f,a.find),k=e.cat(b.map(j,c.scour)),l=b.map(g,function(a){return p(a,k)});return e.cat(l)},p=function(a,c){var e=g.get(a,"v:shapes"),f=d.from(b.find(c,function(a){return g.get(a,"id")===e}));return f.isNone()&&j.log("WARNING: unable to find data for image",a.dom()),f.map(function(b){return q(a,b)})},q=function(a,b){return k(l(a),m(b))};return{extract:o}}),g("7c",["1b","g","p","n","j","27"],function(a,b,c,d,e,f){var g=function(b,c){var d=c.style;if(e.has(b,"width")&&e.has(b,"height")&&a.isString(d)){var f=d.match(/rotation:([^;]*)/);null===f||"90"!==f[1]&&"-90"!==f[1]||e.setAll(b,{width:e.get(b,"height"),height:e.get(b,"width")})}},h=function(a,b){var c=b["o:spid"],d=void 0===c?b.id:c;g(a,b),f.add(a,"rtf-data-image"),e.set(a,"data-image-id",d.substr("_x0000_".length)),e.set(a,"data-image-type","code")},i=function(a,b,c){return c.img()[a]===b},j=function(a,f,g){var h=e.get(f,g),j=c.curry(i,g,h),k=b.find(a,j);return d.from(k).map(function(a){return e.remove(f,g),a})},k=function(a,c,d){b.each(c,function(b){j(a,b,d).each(function(a){h(b,a.vshape())})})};return{rotateImage:g,insertRtfCorrelation:k}}),g("7s",["2t","n","1e"],function(a,b,c){return function(d,e){var f=function(a){if(!d(a))throw new c("Can only get "+e+" value of a "+e+" node");return j(a).getOr("")},g=function(a){try{return h(a)}catch(c){return b.none()}},h=function(a){ +return d(a)?b.from(a.dom().nodeValue):b.none()},i=a.detect().browser,j=i.isIE()&&10===i.version.major?g:h,k=function(a,b){if(!d(a))throw new c("Can only set raw "+e+" value of a "+e+" node");a.dom().nodeValue=b};return{get:f,getOption:j,set:k}}}),g("7d",["1d","7s"],function(a,b){var c=b(a.isComment,"comment"),d=function(a){return c.get(a)},e=function(a){return c.getOption(a)},f=function(a,b){c.set(a,b)};return{get:d,getOption:e,set:f}}),g("7t",["1x"],function(a){var b=function(b,c,d){b.dom().styleSheet?b.dom().styleSheet.cssText=c:a.append(b,d)};return{setCss:b}}),g("8f",[],function(){var a=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};return{escape:a}}),g("7u",["1c","8f","4v"],function(a,b,c){var d=function(a,d,e){var f=new c("url\\(\\s*['\"]?"+b.escape(d)+"(.*?)['\"]?\\s*\\)","g");return a.replace(f,'url("'+e+'$1")')},e=function(b,c){var e=b;return a.each(c,function(a,b){e=d(e,b,a)}),e};return{replace:d,replaceMany:e}}),g("7e",["j","k","1x","20","7t","7u","12"],function(a,b,c,d,e,f,g){var h=function(c){var d=b.fromTag("style",c.dom());return a.set(d,"type","text/css"),d},i=function(a,c,d){e.setCss(a,c,b.fromText(c,d.dom()))},j=function(a,b,e){var g=h(e),j=void 0===b?a:f.replaceMany(a,b);i(g,j,e);var k=d.descendant(e,"head").getOrDie();c.append(k,g)},k=function(a){var b=a.dom().styleSheets;return g.prototype.slice.call(b)};return{stylesheets:k,inject:j}}),g("7v",["g","2c"],function(a,b){var c=b.immutable("selector","style","raw"),d=function(b){var d=b.cssRules;return a.map(d,function(a){var b=a.selectorText,d=a.style.cssText;if(void 0===d)throw"WARNING: Browser does not support cssText property";return c(b,d,a.style)})},e=function(b){return a.bind(b,d)};return{extract:d,extractAll:e}}),g("7f",["7v"],function(a){var b=function(b){return a.extract(b)},c=function(b){return a.extractAll(b)};return{extract:b,extractAll:c}}),function(a,b,c){a("7g",[],function(){var a=function(){var a,b,c;return a=function(a){var c,d,e,f,g=[];for(c=a.split(","),e=0,f=c.length;e0&&g.push(b(d));return g},b=function(a){var b,c=a,d={a:0,b:0,c:0},e=[],f=/(\[[^\]]+\])/g,g=/(#[^\s\+>~\.\[:]+)/g,h=/(\.[^\s\+>~\.\[:]+)/g,i=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,j=/(:[\w-]+\([^\)]*\))/gi,k=/(:[^\s\+>~\.\[:]+)/g,l=/([^\s\+>~\.\[:]+)/g;return b=function(b,f){var g,h,i,j,k,l;if(b.test(c))for(g=c.match(b),h=0,i=g.length;h~]/g," "),c=c.replace(/[#\.]/g," "),b(l,"c"),e.sort(function(a,b){return a.index-b.index}),{selector:a,specificity:"0,"+d.a.toString()+","+d.b.toString()+","+d.c.toString(),specificityArray:[0,d.a,d.b,d.c],parts:e}},c=function(a,c){var d,e,f;if("string"==typeof a){if(a.indexOf(",")!==-1)throw"Invalid CSS selector";d=b(a).specificityArray}else{if(!Array.isArray(a))throw"Invalid CSS selector or specificity array";if(4!==a.filter(function(a){return"number"==typeof a}).length)throw"Invalid specificity array";d=a}if("string"==typeof c){if(c.indexOf(",")!==-1)throw"Invalid CSS selector";e=b(c).specificityArray}else{if(!Array.isArray(c))throw"Invalid CSS selector or specificity array";if(4!==c.filter(function(a){return"number"==typeof a}).length)throw"Invalid specificity array";e=c}for(f=0;f<4;f+=1){if(d[f]e[f])return 1}return 0},{calculate:a,compare:c}}();return"undefined"!=typeof exports&&(exports.calculate=a.calculate,exports.compare=a.compare),a})}(f.bolt.module.api.define,f.bolt.module.api.require,f.bolt.module.api.demand),g("6f",["7c","g","p","2c","j","7d","5d","1y","2a","3f","7e","7f","7g"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=d.immutable("selector","raw"),o=function(b,c,d,e,f){var g=i.descendants(c,"img");t(c),a.insertRtfCorrelation(d,g,e);var h=f.mergeInline()?s:p;h(b,c)},p=c.noop,q=function(a,c){var d={};return b.each(a,function(e){if(void 0!==a[e]){var f=c.dom().style;b.contains(f,e)||(d[e]=a[e])}}),d},r=function(a,c){var d=b.bind(c,function(c){var d=i.descendants(a,c.selector());return b.each(d,function(a){var b=q(c.raw(),a);g.setAll(a,b)}),d});b.each(d,function(a){e.remove(a,"class")})},s=function(a,c){var d=k.stylesheets(a),e=l.extractAll(d),f=function(a){return a.selector().indexOf(",")!==-1},g=function(a){return!f(a)},h=function(a){var c=a.selector().split(",");return b.map(c,function(b){var c=b.trim();return n(c,a.raw())})},i=b.flatten(b.map(b.filter(e,f),h)),j=b.filter(e,g),o=j.concat(i);o.sort(function(a,b){return m.compare(a.selector(),b.selector())}).reverse(),r(c,o)},t=function(a){var c=j.children(a);b.each(c,function(a){f.getOption(a).each(function(b){"StartFragment"!==b&&"EndFragment"!==b||h.remove(a)})})};return{doMergeInlineStyles:r,process:o}}),g("71",["n","k"],function(a,b){var c=function(c){var d=c.dom();try{var e=d.contentWindow?d.contentWindow.document:d.contentDocument;return void 0!==e&&null!==e?a.some(b.fromDom(e)):a.none()}catch(f){return console.log("Error reading iframe: ",d),console.log("Error was: "+f),a.none()}},d=function(a){var b=c(a);return b.fold(function(){return a},function(a){return a})};return{doc:d}}),g("5x",["71","5i"],function(a,b){var c=function(c,d){if(!b.inBody(c))throw"Internal error: attempted to write to an iframe that is not in the DOM";var e=a.doc(c),f=e.dom();f.open(),f.writeln(d),f.close()};return{write:c}}),g("25",["p","k"],function(a,b){var c=function(b,c,d,e,f,g,h){return{target:a.constant(b),x:a.constant(c),y:a.constant(d),stop:e,prevent:f,kill:g,raw:a.constant(h)}},d=function(d,e){return function(f){if(d(f)){var g=b.fromDom(f.target),h=function(){f.stopPropagation()},i=function(){f.preventDefault()},j=a.compose(i,h),k=c(g,f.clientX,f.clientY,h,i,j,f);e(k)}}},e=function(b,c,e,f,g){var i=d(e,f);return b.dom().addEventListener(c,i,g),{unbind:a.curry(h,b,c,i,g)}},f=function(a,b,c,d){return e(a,b,c,d,!1)},g=function(a,b,c,d){return e(a,b,c,d,!0)},h=function(a,b,c,d){a.dom().removeEventListener(b,c,d)};return{bind:f,capture:g}}),g("w",["p","25"],function(a,b){var c=a.constant(!0),d=function(a,d,e){return b.bind(a,d,c,e)},e=function(a,d,e){return b.capture(a,d,c,e)};return{bind:d,capture:e}}),g("6g",["p","5x","5d","w","k","1x","1y","x"],function(a,b,c,d,e,f,g,h){return function(i){var j=function(j,k,l){var m=e.fromTag("div"),n=e.fromTag("iframe");c.setAll(m,{display:"none"});var o=d.bind(n,"load",function(){o.unbind(),b.write(n,j);var c=n.dom().contentWindow.document;if(void 0===c)throw"sandbox iframe load event did not fire correctly";var d=e.fromDom(c),f=c.body;if(void 0===f)throw"sandbox iframe does not have a body";var i=e.fromDom(f),p=k(d,i);g.remove(m),h(a.curry(l,p),0)});f.append(m,n),f.append(i,m)};return{play:j}}}),g("6h",["k","28","1x","29","1y","3f"],function(a,b,c,d,e,f){var g=function(a){return a.dom().innerHTML},h=function(g,h){var i=f.owner(g),j=i.dom(),k=a.fromDom(j.createDocumentFragment()),l=b.fromHtml(h,j);d.append(k,l),e.empty(g),c.append(g,k)},i=function(b){var d=a.fromTag("div"),e=a.fromDom(b.dom().cloneNode(!0));return c.append(d,e),g(d)};return{get:g,set:h,getOuter:i}}),g("51",["4q","4r","6e","6f","2w","p","6g","k","28","6h","1g"],function(a,b,c,d,e,f,g,h,i,j,k){var l="data-textbox-image",m=function(a){return void 0===a||null===a||0===a.length},n=function(a){var b=1;return a.replace(/(]*)src=".*?"/g,function(a,c,d){return c+l+'="'+b++ +'"'})},o=function(a,b){var c=g(h.fromDom(k.body));return function(e,g){c.play(e,function(c,e){return d.process(c,e,a,l,{mergeInline:f.constant(b)}),j.get(e)},g)}},p=function(d,f,g){return a.sync(function(h){var j=c.extract(d),k=o(j,f);k(g,function(c){var d=i.fromHtml(c);a.call(h,{response:e.paste(d,[],[]),bundle:b.nu({})})})})},q=function(){return a.pure({response:e.paste([],[],[]),bundle:b.nu({})})},r=function(a){var b=a.indexOf("");return b>-1?a.substr(0,b+"".length):a},s=function(b,c,d){var f=r(b.data()),g=n(f);return d.cleanDocument(g,c).fold(function(){return a.pure({response:e.error("errors.paste.word.notready"),bundle:{}})},function(a){return m(a)?q():p(g,c,a)})};return{handle:s}}),g("52",["4q","4r","4y","g","i"],function(a,b,c,d,e){var f=function(f){var g=d.filter(f,function(a){return"file"===a.kind&&/image/.test(a.type)}),h=d.map(g,function(a){return a.getAsFile()});return a.sync(function(d){e.multiple(h).get(function(e){var f=c.createImages(e);a.call(d,{response:f,bundle:b.nu({})})})})};return{handle:f}}),g("7w",[],function(){return{validStyles:function(){return/^(mso-.*|tab-stops|tab-interval|language|text-underline|text-effect|text-line-through|font-color|horiz-align|list-image-[0-9]+|separator-image|table-border-color-(dark|light)|vert-align|vnd\..*)$/},specialInline:function(){return/^(font|em|strong|samp|acronym|cite|code|dfn|kbd|tt|b|i|u|s|sub|sup|ins|del|var|span)$/}}}),g("83",[],function(){var a=function(a){return g(function(b,c,d,e,f,g){return b(a)})},b=function(a){return g(function(b,c,d,e,f,g){return c(a)})},c=function(a){return g(function(b,c,d,e,f,g){return d(a)})},d=function(a){return g(function(b,c,d,e,f,g){return e(a)})},e=function(){return g(function(a,b,c,d,e,f){return e()})},f=function(a){return g(function(b,c,d,e,f,g){return g(a)})},g=function(a){var b=function(b){return a(function(a){return 0===b.toLowerCase().indexOf(a.toLowerCase())},function(a){return a.test(b.toLowerCase())},function(a){return b.toLowerCase().indexOf(a.toLowerCase())>=0},function(a){return b.toLowerCase()===a.toLowerCase()},function(){return!0},function(a){return!a.matches(b)})};return{fold:a,matches:b}},h=function(a,b,c,d,e,f,g){return a.fold(b,c,d,e,f,g)};return{starts:a,pattern:b,contains:c,exact:d,all:e,not:f,cata:h}}),g("7x",["p","1d","83"],function(a,b,c){var d=function(b,d,e,f){var g=f.name,h=void 0!==f.condition?f.condition:a.constant(!0),i=void 0!==f.value?f.value:c.all();return g.matches(e)&&i.matches(d)&&h(b)},e=function(c,d){var e=b.name(c),f=d.name,g=void 0!==d.condition?d.condition:a.constant(!0);return f.matches(e)&&g(c)};return{keyval:d,name:e}}),g("8g",["g","1c","p","j"],function(a,b,c,d){var e=function(b,c){var d={};return a.each(b.dom().attributes,function(a){c(a.value,a.name)||(d[a.name]=a.value)}),d},f=function(c,e,f){a.each(e,function(a){d.remove(c,a)}),b.each(f,function(a,b){d.set(c,b,a)})},g=function(c,d,e){var g=a.map(c.dom().attributes,function(a){return a.name});b.size(d)!==g.length&&f(c,g,d)};return{filter:e,clobber:g,scan:c.constant({})}}),g("8h",["g","1c","j","5d","37"],function(a,b,c,d,e){var f=function(b){var c={},d=void 0!==b&&null!==b?b.split(";"):[];return a.each(d,function(a){var b=a.split(":");2===b.length&&(c[e.trim(b[0])]=e.trim(b[1]))}),c},g=function(a,b){return a.dom().style.getPropertyValue(b)},h=function(b,c){var d=b.dom().style,e=void 0===d?[]:d,f={};return a.each(e,function(a){var d=g(b,a);c(d,a)||(f[a]=d)}),f},i=function(a,b,c){d.set(a,b,c)},j=function(b,c,d){var e=b.dom().getAttribute("style"),g=f(e),h={};return a.each(c,function(a){var b=g[a];void 0===b||d(b,a)||(h[a]=b)}),h},k=function(c){var d=b.keys(c);return a.map(d,function(a){return a+": "+c[a]}).join("; ")},l=function(a,d,e){c.set(a,"style","");var f=b.size(d),g=b.size(e);if(0===f&&0===g)c.remove(a,"style");else if(0===f)c.set(a,"style",k(e));else{b.each(d,function(b,c){i(a,c,b)});var h=c.get(a,"style"),j=g>0?k(e)+"; ":"";c.set(a,"style",j+h)}};return{filter:h,clobber:l,scan:j}}),g("7y",["8g","8h","p","k"],function(a,b,c,d){var e=["mso-list"],f=function(a,c){var d=b.scan(a,e,c),f=b.filter(a,c);b.clobber(a,f,d)},g=function(b,c){var d=a.filter(b,c);a.clobber(b,d,{})},h=function(a){var d=b.filter(a,c.constant(!1));b.clobber(a,d,{})},i=function(a,b){f(d.fromDom(a),b)},j=function(a,b){g(d.fromDom(a),b)};return{style:f,attribute:g,styleDom:i,attributeDom:j,validateStyles:h}}),g("7i",["g","1l","7x","7y","p","j","27","3q","1y","2a"],function(a,b,c,d,e,f,g,h,i,j){var k=function(b,d,e){b(e,function(b,f){return a.exists(d,function(a){return c.keyval(e,b,f,a)})})},l=function(l,m){var n=b.merge({styles:[],attributes:[],classes:[],tags:[]},m),o=j.descendants(l,"*");a.each(o,function(b){k(d.style,n.styles,b),k(d.attribute,n.attributes,b),a.each(n.classes,function(c){var d=f.has(b,"class")?h.get(b):[];a.each(d,function(a){c.name.matches(a)&&g.remove(b,a)})})});var p=j.descendants(l,"*");a.each(p,function(b){var d=a.exists(n.tags,e.curry(c.name,b));d&&i.remove(b)})},m=function(d,f){var g=b.merge({tags:[]},f),h=j.descendants(d,"*");a.each(h,function(b){var d=a.exists(g.tags,e.curry(c.name,b));d&&i.unwrap(b)})},n=function(d,f){var g=b.merge({tags:[]},f),h=j.descendants(d,"*");a.each(h,function(b){var d=a.find(g.tags,e.curry(c.name,b));void 0!==d&&null!==d&&d.mutate(b)})},o=function(b){var c=j.descendants(b,"*");a.each(c,function(a){d.validateStyles(a)})};return{remover:l,unwrapper:m,transformer:n,validator:o}}),g("86",["1c","5d","k"],function(a,b,c){var d="startElement",e="endElement",f="text",g="comment",h=function(a,h,i){var j,k,l,m=c.fromDom(a);switch(a.nodeType){case 1:h?j=e:(j=d,b.setAll(m,i||{})),k="HTML"!==a.scopeName&&a.scopeName&&a.tagName&&a.tagName.indexOf(":")<=0?(a.scopeName+":"+a.tagName).toUpperCase():a.tagName;break;case 3:j=f,l=a.nodeValue;break;case 8:j=g,l=a.nodeValue;break;default:console.log("WARNING: Unsupported node type encountered: "+a.nodeType)}var n=function(){return a},o=function(){return k},p=function(){return j},q=function(){return l};return{getNode:n,tag:o,type:p,text:q}},i=function(b,c,d,e){var f=e.createElement(b);return a.each(c,function(a,b){f.setAttribute(b,a)}),h(f,!1,d)},j=function(a,b){return h(b.createElement(a),!0)},k=function(a,b){return h(b.createComment(a),!1)},l=function(a,b){return h(b.createTextNode(a))},m=j("HTML",window.document);return{START_ELEMENT_TYPE:d,END_ELEMENT_TYPE:e,TEXT_TYPE:f,COMMENT_TYPE:g,FINISHED:m,token:h,createStartElement:i,createEndElement:j,createComment:k,createText:l}}),g("7z",["86"],function(a){var b=function(b){var c=b.createDocumentFragment(),d=c,e=function(a){g(a),c=a},f=function(){c=c.parentNode,null===c&&(c=d)},g=function(a){c.appendChild(a)},h=function(c){var d=function(a){var b=a.getNode().cloneNode(!1);e(b)},h=function(a,c){var d=b.createTextNode(a.text());g(d)};switch(c.type()){case a.START_ELEMENT_TYPE:d(c);break;case a.TEXT_TYPE:h(c);break;case a.END_ELEMENT_TYPE:f();break;case a.COMMENT_TYPE:break;default:throw{message:"Unsupported token type: "+c.type()}}};return{dom:d,receive:h,label:"SERIALISER"}};return{create:b}}),g("80",["86"],function(a){var b=function(b,c){var d;c=c||window.document,d=c.createElement("div"),c.body.appendChild(d),d.style.position="absolute",d.style.left="-10000px",d.innerHTML=b,nextNode=d.firstChild||a.FINISHED;var e=[];endNode=!1;var f=function(b,c){return b===a.FINISHED?b:b?a.token(b,c):void 0},g=function(){var b=nextNode,g=endNode;return!endNode&&nextNode.firstChild?(e.push(nextNode),nextNode=nextNode.firstChild):endNode||1!==nextNode.nodeType?nextNode.nextSibling?(nextNode=nextNode.nextSibling,endNode=!1):(nextNode=e.pop(),endNode=!0):endNode=!0,b===a.FINISHED||nextNode||(c.body.removeChild(d),nextNode=a.FINISHED),f(b,g)},h=function(){return void 0!==nextNode};return{hasNext:h,next:g}};return{tokenise:b}}),g("7j",["7z","80"],function(a,b){var c=function(a,b,c){var d,e=c;for(d=b.length-1;d>=0;d--)e=b[d](e,{},a);return e},d=function(d,e,f){for(var g=a.create(d),h=b.tokenise(e,d),i=c(d,f,g);h.hasNext();){var j=h.next();i.receive(j)}return g.dom};return{build:c,run:d}}),g("6m",["g","7i","7j","k","6h","1y","3f"],function(a,b,c,d,e,f,g){var h=function(a){return function(c){b.remover(c,a)}},i=function(a){return function(c){b.unwrapper(c,a)}},j=function(a){return function(c){b.transformer(c,a)}},k=function(){return function(a){b.validator(a)}},l=function(a){return function(b){var d=e.get(b),h=g.owner(b),i=c.run(h.dom(),d,a);f.empty(b),b.dom().appendChild(i)}},m=function(b,c,f){var g=d.fromTag("div",b.dom());return g.dom().innerHTML=c,a.each(f,function(a){a(g)}),e.get(g)},n=function(a,b){return a.indexOf("")>=0||b.browser.isSpartan()&&a.indexOf('v:shapes="')>=0||b.browser.isSpartan()&&a.indexOf("mso-")>=0||a.indexOf("mso-list")>=0||a.indexOf("p.MsoNormal, li.MsoNormal, div.MsoNormal")>=0||a.indexOf("MsoListParagraphCxSpFirst")>=0||a.indexOf("")>=0};return{removal:h,unwrapper:i,transformer:j,validate:k,pipeline:l,isWordContent:n,go:m}}),g("7l",["g","86"],function(a,b){return function(c,d,e){return function(e,f,g){var h=function(b){a.each(b,i)},i=function(a){e.receive(a)},j=function(a){c(l,a,k)},k=function(a,c){return b.token(c,a.type()===b.END_ELEMENT_TYPE,{})},l={emit:i,emitTokens:h,receive:j,document:window.document};return d(l),l}}}),g("8u",["8h","86","p","j","5d","k"],function(a,b,c,d,e,f){var g=function(a,b){var c=f.fromDom(a.getNode());return d.get(c,b)},h=function(a,b){var c=f.fromDom(a.getNode());return e.get(c,b)},i=function(a){return a.type()===b.TEXT_TYPE&&/^[\s\u00A0]*$/.test(a.text())},j=function(b){var d=f.fromDom(b.getNode()),e=a.scan(d,["mso-list"],c.constant(!1));return e["mso-list"]};return{getAttribute:g,getStyle:h,isWhitespace:i,getMsoList:j}}),g("96",["g","n"],function(a,b){var c=function(c,e){var f=a.find(c,function(a){return"UL"===a.tag||e&&d(a,e,!0)});return void 0!==f?b.some(f):c.length>0?b.some(c[0]):b.none()},d=function(a,b,c){return a===b||a&&b&&a.tag===b.tag&&a.type===b.type&&(c||a.variant===b.variant)};return{guessFrom:c,eqListType:d}}),g("8l",[],function(){var a=function(a,b){if(void 0===a||void 0===b)throw console.trace(),"brick";a.nextFilter.set(b)},b=function(b){return function(c,d,e){a(d,b)}},c=function(a,b,c){var d=b.nextFilter.get();d(a,b,c)},d=function(b){return function(d,e,f){a(e,b),c(d,e,f)}},e=function(a,b){return a.nextFilter.get()===b};return{next:a,go:c,jump:d,isNext:e,setNext:b}}),g("8t",["g","8u","96","8l","p","2c","j","k"],function(a,b,c,d,e,f,g,h){var i=function(a,b){return g.has(h.fromDom(b.getNode()),"data-list-level")},j=function(a){var b=parseInt(g.get(a,"data-list-level"),10),c=g.get(a,"data-list-emblems"),d=JSON.parse(c);return g.remove(a,"data-list-level"),g.remove(a,"data-list-emblems"),{level:e.constant(b),emblems:e.constant(d)}},k=f.immutable("level","token","type"),l=function(c){return!a.contains(["P"],c.tag())||/^MsoHeading/.test(b.getAttribute(c,"class"))},m=function(a,b,d,e){var f=d.getCurrentListType(),g=d.getCurrentLevel(),h=g==e.level()?f:null;return c.guessFrom(e.emblems(),h).filter(function(a){return!("OL"===a.tag&&l(b))})},n=function(a,b,c){var d=m(c.listType.get(),a,c.emitter,b);return d.each(c.listType.set),k(b.level(),c.originalToken.get(),c.listType.get())},o=function(a){return function(b,c,e){var f=j(h.fromDom(e.getNode()));f.level();c.originalToken.set(e);var g=n(e,f,c);c.emitter.openItem(g.level(),g.token(),g.type()),d.next(c,a.inside())}};return{predicate:i,action:o}}),g("8v",["p"],function(a){return function(b,c,d){return{pred:b,action:c,label:a.constant(d)}}}),g("8w",["g","p","n"],function(a,b,c){var d=function(a,b){return function(a,c,d){return b(a,c,d)}};return function(e,f,g){var h=d(e+" :: FALLBACK --- ",g),i=function(g,i,j){var k=c.from(a.find(f,function(a){return a.pred(i,j)})),l=k.fold(b.constant(h),function(a){var b=a.label();return void 0===b?a.action:d(e+" :: "+b,a.action)});l(g,i,j)};return i.toString=function(){return"Handlers for "+e},i}}),g("8i",["8t","86","8u","8v","8w","8l"],function(a,b,c,d,e,f){var g=function(a){var c=function(b,c,d){f.next(c,a.outside())},g=function(a,c){return c.type()===b.END_ELEMENT_TYPE&&a.originalToken.get()&&c.tag()===a.originalToken.get().tag()};return e("Inside.List.Item",[d(g,c,"Closing open tag")],function(a,b,c){a.emit(c)})},h=function(g){var h=function(a,b,c){b.emitter.closeAllLists(),a.emit(c),f.next(b,g.outside())},i=function(a,d){return d.type()===b.TEXT_TYPE&&c.isWhitespace(d)};return e("Outside.List.Item",[d(a.predicate,a.action(g),"Data List ****"),d(i,function(a,b,c){a.emit(c)},"Whitespace")],h)};return{inside:g,outside:h}}),g("97",["2c"],function(a){var b=a.immutable("state","result"),c=a.immutable("state","value"),d=a.immutable("level","type","types","items");return{state:d,value:c,result:b}}),g("9j",["97","n"],function(a,b){var c=function(c){var d=c.items().slice(0);if(d.length>0&&"P"!==d[d.length-1]){var e=d[d.length-1];d[d.length-1]="P";var f=a.state(c.level(),c.type(),c.types(),d);return a.value(f,b.some(e))}return a.value(c,b.none())},d=function(c,d){var e=c.items().slice(0),f=void 0!==d&&"P"!==d?b.some(d):b.none();f.fold(function(){e.push("P")},function(a){e.push(a)});var g=a.state(c.level(),c.type(),c.types(),e);return a.value(g,f)};return{start:d,finish:c}}),g("9k",["97"],function(a){var b=function(b,c,d){for(var e=[],f=b;c(f);){var g=d(f);f=g.state(),e=e.concat(g.result())}return a.result(f,e)},c=function(a,c,d){var e=function(a){return a.level()c};return b(a,e,d)};return{moveRight:c,moveLeft:d,moveUntil:b}}),g("9v",["8u"],function(a){var b=function(b){var c=a.getStyle(b,"margin-left");return void 0!==c&&"0px"!==c?{"margin-left":c}:{}},c=function(a){var c={"list-style-type":"none"};return a?b(a):c};return{from:c}}),g("9l",["7y","86","96","97","9j","9v","p"],function(a,b,c,d,e,f,g){var h=function(a,c,e){var f=c.start&&c.start>1?{start:c.start}:{},h=a.level()+1,i=c,j=a.types().concat([c]),k=[g.curry(b.createStartElement,c.tag,f,e)],l=d.state(h,i,j,a.items());return d.result(l,k)},i=function(a){var c=a.types().slice(0),e=[g.curry(b.createEndElement,c.pop().tag)],f=a.level()-1,h=c[c.length-1],i=d.state(f,h,c,a.items());return d.result(i,e)},j=function(a,b){var c=i(a),e=h(c.state(),b,b.type?{"list-style-type":b.type}:{});return d.result(e.state(),c.result().concat(e.result()))},k=function(h,i,k){var l={},m=f.from(i),n=h.type()&&!c.eqListType(h.type(),k)?j(h,k):d.result(h,[]),o=[g.curry(b.createStartElement,"LI",l,m)],p=e.start(n.state(),i&&i.tag()),q=p.value().map(function(b){return a.styleDom(i.getNode(),g.constant(!0)),[g.constant(i)]}).getOr([]);return d.result(p.state(),n.result().concat(o).concat(q))},l=function(a){var c=g.curry(b.createEndElement,"LI"),f=e.finish(a),h=f.value().fold(function(){return[c]},function(a){return[g.curry(b.createEndElement,a),c]});return d.result(f.state(),h)};return{open:h,openItem:k,close:i,closeItem:l}}),g("98",["g","86","97","9j","9k","9l","p","n"],function(a,b,c,d,e,f,g,h){var i=function(b){if(0===b.length)throw"Compose must have at least one element in the list";var d=b[b.length-1],e=a.bind(b,function(a){return a.result()});return c.result(d.state(),e)},j=function(a){var b=f.closeItem(a),c=f.close(b.state());return i([b,c])},k=function(a,b,c,d){var e=a.level()===c-1&&b.type?{"list-style-type":b.type}:{},g=f.open(a,b,e),h=f.openItem(g.state(),g.state().level()==c?d:void 0,b);return i([g,h])},l=function(a,b,d){var e=a.level()>0?f.closeItem(a):c.result(a,[]),g=f.openItem(e.state(),d,b);return i([e,g])},m=function(a,b,c,d){return e.moveRight(a,c,function(a){return k(a,b,c,d)})},n=function(a,b){return e.moveLeft(a,b,j)},o=function(a,e,f,i){var j=f>1?d.finish(a):c.value(a,h.none()),k=j.value().map(function(a){return[g.curry(b.createEndElement,a)]}).getOr([]),l=(f-j.state().level(),m(j.state(),e,f,i));return c.result(l.state(),k.concat(l.result()))},p=function(a,b,d,e){var f=a.level()>b?n(a,b):c.result(a,[]),g=f.state().level()===b?l(f.state(),e,d):o(f.state(),e,b,d);return i([f,g])},q=n;return{openItem:p,closeAllLists:q}}),g("8x",["g","97","98"],function(a,b,c){var d=["disc","circle","square"],e=function(a,b){return"UL"===a.tag&&d[b-1]===a.type&&(a={tag:"UL"}),a};return function(d,f){var g=b.state(0,void 0,[],[]),h=function(b){a.each(b.result(),function(a){var b=a(f);d.emit(b)})},i=function(){var a=c.closeAllLists(g,0);g=a.state(),h(a)},j=function(a,b,d){if(d){var f=e(d,a),i=c.openItem(g,a,b,f);g=i.state(),h(i)}},k=function(){return g.level()},l=function(){return g.type()};return{closeAllLists:i,openItem:j,getCurrentListType:l,getCurrentLevel:k}}}),g("z",[],function(){var a=function(b){var c=b,d=function(){return c},e=function(a){c=a},f=function(){return a(d())};return{get:d,set:e,clone:f}};return a}),g("8j",["8x","p","z"],function(a,b,c){var d={getCurrentListType:function(){return e().getCurrentListType()},getCurrentLevel:function(){return e().getCurrentLevel()},closeAllLists:function(){return e().closeAllLists.apply(void 0,arguments)},openItem:function(){return e().openItem.apply(void 0,arguments)}},e=function(){return{getCurrentListType:b.constant({}),getCurrentLevel:b.constant(1),closeAllLists:b.identity,openItem:b.identity}};return function(f){var g=c(f),h=c(null),i=c(null),j=function(c){g.set(f),h.set(null),i.set(null),_emitter=a(c,c.document),e=b.constant(_emitter)};return{reset:j,nextFilter:g,originalToken:h,listType:i,emitter:d}}}),g("8k",["86"],function(a){return function(){var b=!1,c="",d=function(d){return b&&d.type()===a.TEXT_TYPE?(c+=d.text(),!0):d.type()===a.START_ELEMENT_TYPE&&"STYLE"===d.tag()?(b=!0,!0):d.type()===a.END_ELEMENT_TYPE&&"STYLE"===d.tag()&&(b=!1,!0)};return{check:d}}}),g("81",["7l","8i","8j","8k","8l","1g"],function(a,b,c,d,e,f){var g={inside:function(){return i},outside:function(){return j}},h=d(),i=b.inside(g),j=b.outside(g),k=c(j);return a(function(a,b,c){h.check(b)||e.go(a,k,b)},k.reset,"list.filters")}),h("8o",parseInt),g("8y",["g","1l","64","8o"],function(a,b,c,d){var e=[{regex:/^\(?[dc][\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[DC][\.\)]$/,type:{tag:"OL",type:"upper-alpha"}},{regex:/^\(?M*(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[\.\)]$/,type:{tag:"OL",type:"upper-roman"}},{regex:/^\(?m*(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})[\.\)]$/,type:{tag:"OL",type:"lower-roman"}},{regex:/^\(?[0-9]+[\.\)]$/,type:{tag:"OL"}},{regex:/^([0-9]+\.)*[0-9]+\.?$/,type:{tag:"OL",variant:"outline"}},{regex:/^\(?[a-z]+[\.\)]$/,type:{tag:"OL",type:"lower-alpha"}},{regex:/^\(?[A-Z]+[\.\)]$/,type:{tag:"OL",type:"upper-alpha"}}],f={"\u2022":{tag:"UL",type:"disc"},"\xb7":{tag:"UL",type:"disc"},"\xa7":{tag:"UL",type:"square"}},g={o:{tag:"UL",type:"circle"},"-":{tag:"UL",type:"disc"},"\u25cf":{tag:"UL",type:"disc"},"\ufffd":{tag:"UL",type:"circle"}},h=function(a,b){return void 0!==a.variant?a.variant:"("===b.charAt(0)?"()":")"===b.charAt(b.length-1)?")":"."},i=function(a){var b=a.split("."),e=function(){if(0===b.length)return a;var c=b[b.length-1];return 0===c.length&&b.length>1?b[b.length-2]:c}(),f=d(e,10);return c(f)?{}:{start:f}},j=function(c,d){var j=g[c]?[g[c]]:[],k=d&&f[c]?[f[c]]:d?[{tag:"UL",variant:c}]:[],l=a.bind(e,function(a){return a.regex.test(c)?[b.merge(a.type,i(c),{variant:h(a.type,c)})]:[]}),m=j.concat(k).concat(l);return a.map(m,function(a){return void 0!==a.variant?a:b.merge(a,{variant:c})})};return{extract:j}}),g("7o",[],function(){var a=function(a){return a.dom().textContent},b=function(a,b){a.dom().textContent=b};return{get:a,set:b}}),g("8m",["g","8y","8h","p","n","5d","6h","1d","6r","7o","3f","62","64","8o"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=18,p=function(a){var b=c.scan(a,["mso-list"],d.constant(!1));return b["mso-list"]},q=function(a){var b=p(a),c=/ level([0-9]+)/.exec(b);return c&&c[1]?e.some(n(c[1],10)):e.none()},r=function(a,c){var d=j.get(a).trim(),f=b.extract(d,c);return f.length>0?e.some(f):e.none()},s=function(a){return i.child(a,v)},t=function(a){return i.child(a,h.isComment).bind(k.nextSibling).filter(function(a){return"span"===h.name(a)})},u=function(a){return i.descendant(a,function(a){var b=h.isElement(a)?c.scan(a,["mso-list"],d.constant(!1)):[];return!!b["mso-list"]})},v=function(b){return h.isElement(b)&&f.getRaw(b,"font-family").exists(function(b){return a.contains(["wingdings","symbol"],b.toLowerCase())})},w=function(a){return f.getRaw(a,"margin-left").bind(function(a){var b=n(a,10);return m(b)?e.none():e.some(l.max(1,l.ceil(b/o)))})};return{getMsoList:p,extractLevel:q,extractEmblem:r,extractSymSpan:s,extractMsoIgnore:u,extractCommentSpan:t,isSymbol:v,deduceLevel:w}}),h("8n",JSON),g("82",["g","8m","n","j","7r","1d","1y","3f","8n","8o"],function(a,b,c,d,e,f,g,h,i,j){var k=function(a,b,c){d.set(a,"data-list-level",b);var e=i.stringify(c);d.set(a,"data-list-emblems",e)},l=function(b){var d=e.find(b,c.none());a.each(d,g.remove)},m=function(b,c,e,f){k(b,c,e),l(b),a.each(f,g.remove),d.remove(b,"style"),d.remove(b,"class")},n=function(a){return b.extractLevel(a).bind(function(c){return b.extractSymSpan(a).bind(function(d){return b.extractEmblem(d,!0).map(function(b){var e=function(){m(a,c,b,[d])};return{mutate:e}})})})},o=function(a){return b.extractLevel(a).bind(function(c){return b.extractCommentSpan(a).bind(function(d){return b.extractEmblem(d,b.isSymbol(d)).map(function(b){var e=function(){m(a,c,b,[d])};return{mutate:e}})})})},p=function(a){return b.extractLevel(a).bind(function(c){return b.extractCommentSpan(a).bind(function(d){return b.extractEmblem(d,b.isSymbol(d)).map(function(b){var e=function(){m(a,c,b,[d])};return{mutate:e}})})})},q=function(a){return"p"!==f.name(a)?c.none():b.extractLevel(a).bind(function(c){return b.extractMsoIgnore(a).bind(function(d){return b.extractEmblem(d,!1).map(function(b){var e=function(){m(a,c,b,[h.parent(d).getOr(d)])};return{mutate:e}})})})},r=function(a){return"p"!==f.name(a)?c.none():b.extractMsoIgnore(a).bind(function(c){var d=h.parent(c).getOr(c),e=b.isSymbol(d);return b.extractEmblem(c,e).bind(function(c){return b.deduceLevel(a).map(function(b){var e=function(){m(a,b,c,[d])};return{mutate:e}})})})},s=function(a){return n(a).orThunk(function(){return o(a)}).orThunk(function(){return p(a)}).orThunk(function(){return q(a)}).orThunk(function(){return r(a)})};return{find:s}}),g("7k",["6m","81","82","83"],function(a,b,c,d){var e=a.transformer({tags:[{name:d.pattern(/^(p|h\d+)$/),mutate:function(a){c.find(a).each(function(a){a.mutate()})}}]});return{filter:b,preprocess:e}}),g("6n",["6r"],function(a){var b=function(b){return a.first(b).isSome()},c=function(b,c,d){return a.ancestor(b,c,d).isSome()},d=function(b,c,d){return a.closest(b,c,d).isSome()},e=function(b,c){return a.sibling(b,c).isSome()},f=function(b,c){return a.child(b,c).isSome()},g=function(b,c){return a.descendant(b,c).isSome()};return{any:b,ancestor:c,closest:d,sibling:e,child:f,descendant:g}}),g("84",["g","j","6h","1d","6n"],function(a,b,c,d,e){var f=function(a){return"img"!==d.name(a)},g=function(a){var b=a.dom().attributes,c=void 0!==b&&null!==b&&b.length>0;return"span"!==d.name(a)||c},h=function(b){return!k(b)||g(b)&&e.descendant(b,function(b){var c=!k(b),e=!a.contains(["font","em","strong","samp","acronym","cite","code","dfn","kbd","tt","b","i","u","s","sub","sup","ins","del","var","span"],d.name(b));return d.isText(b)||c||e})},i=function(a){return"ol"===d.name(a)||"ul"===d.name(a)},j=function(a){var c=b.get(a,"src");return/^file:/.test(c)},k=function(a){return void 0===a.dom().attributes||null===a.dom().attributes||(0===a.dom().attributes.length||1===a.dom().attributes.length&&"style"===a.dom().attributes[0].name)},l=function(a){return 0===c.get(a).length};return{isNotImage:f,hasContent:h,isList:i,isLocal:j,hasNoAttributes:k,isEmpty:l}}),g("8p",["1d","7s"],function(a,b){var c=b(a.isText,"text"),d=function(a){return c.get(a)},e=function(a){return c.getOption(a)},f=function(a,b){c.set(a,b)};return{get:d,getOption:e,set:f}}),g("85",["g","1c","n","j","5d","k","6h","1x","29","1d","1y","8p","3f"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=function(b,c){var d=f.fromTag(b);h.before(c,d);var e=c.dom().attributes;a.each(e,function(a){d.dom().setAttribute(a.name,a.value)});var g=m.children(c); +return i.append(d,g),k.remove(c),d},o=function(a){0===g.get(a).length&&h.append(a,f.fromTag("br"))},p=function(a){return m.prevSibling(a).bind(function(a){return j.isText(a)&&0===l.get(a).trim().length?p(a):"li"===j.name(a)?c.some(a):c.none()})},q=function(b){m.parent(b).each(function(c){var d=j.name(c);a.contains(["ol","ul"],d)&&p(b).fold(function(){var a=f.fromTag("li");e.set(a,"list-style-type","none"),h.wrap(b,a)},function(a){h.append(a,b)})})},r=function(a){var c=n("span",a),f={face:"font-family",size:"font-size",color:"color"},g={"font-size":{1:"8pt",2:"10pt",3:"12pt",4:"14pt",5:"18pt",6:"24pt",7:"36pt"}};b.each(f,function(a,b){if(d.has(c,b)){var f=d.get(c,b),h=void 0!==g[a]&&void 0!==g[a][f]?g[a][f]:f;e.set(c,a,h),d.remove(c,b)}})};return{changeTag:n,addBrTag:o,properlyNest:q,fontToSpan:r}}),g("7h",["7w","6m","7k","84","85","p","27","5d","3f","1d","83"],function(a,b,c,d,e,f,g,h,i,j,k){var l=b.unwrapper({tags:[{name:k.pattern(/^([OVWXP]|U[0-9]+|ST[0-9]+):/i)}]}),m=[b.pipeline([c.filter])],n=b.removal({attributes:[{name:k.pattern(/^v:/)},{name:k.exact("href"),value:k.contains("#_toc")},{name:k.exact("href"),value:k.contains("#_mso")},{name:k.pattern(/^xmlns(:|$)/)},{name:k.exact("type"),condition:d.isList}]}),o=b.removal({attributes:[{name:k.exact("id")},{name:k.exact("name")}]}),p=b.removal({tags:[{name:k.exact("script")},{name:k.exact("meta")},{name:k.exact("link")},{name:k.exact("style"),condition:d.isEmpty}],attributes:[{name:k.starts("on")},{name:k.exact('"')},{name:k.exact("lang")},{name:k.exact("language")}],styles:[{name:k.all(),value:k.pattern(/OLE_LINK/i)}]}),q=function(a){return!g.has(a,"ephox-limbo-transform")},r=function(a){return function(b){return i.parent(b).exists(function(b){return j.name(b)===a&&1===i.children(b).length})}},s=b.removal({styles:[{name:k.not(k.pattern(/width|height|list-style-type/)),condition:q},{name:k.pattern(/width|height/),condition:d.isNotImage}]}),t=b.removal({classes:[{name:k.not(k.exact("rtf-data-image"))}]}),u=b.removal({styles:[{name:k.pattern(a.validStyles())}]}),v=b.removal({classes:[{name:k.pattern(/mso/i)}]}),w=b.unwrapper({tags:[{name:k.exact("img"),condition:d.isLocal},{name:k.exact("a"),condition:d.hasNoAttributes}]}),x=b.unwrapper({tags:[{name:k.exact("a"),condition:d.hasNoAttributes}]}),y=b.removal({attributes:[{name:k.exact("style"),value:k.exact(""),debug:!0}]}),z=b.removal({attributes:[{name:k.exact("class"),value:k.exact(""),debug:!0}]}),A=b.unwrapper({tags:[{name:k.pattern(a.specialInline()),condition:f.not(d.hasContent)}]}),B=b.unwrapper({tags:[{name:k.exact("p"),condition:r("li")}]}),C=b.transformer({tags:[{name:k.exact("p"),mutate:e.addBrTag}]}),D=function(a){var b=e.changeTag("span",a);g.add(b,"ephox-limbo-transform"),h.set(b,"text-decoration","underline")},E=b.transformer({tags:[{name:k.pattern(/ol|ul/),mutate:e.properlyNest}]}),F=b.transformer({tags:[{name:k.exact("b"),mutate:f.curry(e.changeTag,"strong")},{name:k.exact("i"),mutate:f.curry(e.changeTag,"em")},{name:k.exact("u"),mutate:D},{name:k.exact("s"),mutate:f.curry(e.changeTag,"strike")},{name:k.exact("font"),mutate:e.fontToSpan,debug:!0}]}),G=b.removal({classes:[{name:k.exact("ephox-limbo-transform")}]}),H=b.removal({attributes:[{name:k.exact("href"),value:k.starts("file:///"),debug:!0}]});return{unwrapWordTags:l,removeWordAttributes:n,parseLists:m,removeExcess:p,cleanStyles:s,cleanClasses:t,mergeStyles:u,mergeClasses:v,removeLocalImages:w,removeVacantLinks:x,removeEmptyStyle:y,removeEmptyClass:z,pruneInlineTags:A,unwrapSingleParagraphsInlists:B,addPlaceholders:C,nestedListFixes:E,inlineTagFixes:F,cleanupFlags:G,removeLocalLinks:H,removeAnchors:o,none:f.noop}}),g("6k",["g","5a","7h","6m","7k","7l","p","k"],function(a,b,c,d,e,f,g,h){var i=function(a){return a.browser.isIE()&&a.browser.version.major>=11},j=function(a){return f(function(b,c,d){var e=a(h.fromDom(c.getNode())).fold(function(){return c},function(a){return d(c,a.dom())});b.emit(e)},g.noop,"image filters")},k=function(a,e,f){var g=f.browser.isFirefox()||f.browser.isSpartan()?b.local:b.vshape,h=i(f)?c.none:d.pipeline([j(g)]),k=g===b.local?c.none:c.removeLocalImages,l=a?h:c.none;return{annotate:[l],local:[k]}},l=function(a,b){var d=i(b)&&a;return d?[c.unwrapSingleParagraphsInlists]:[]},m=function(a,b,d){var e=[c.mergeStyles,c.mergeClasses],f=[c.cleanStyles,c.cleanClasses];return b?e:f},n=function(a,b,c){return i(c)||!a?[]:[e.preprocess]},o=function(a,b,d){if(!a)return[c.none];var e=[c.unwrapWordTags],f=i(d)?[]:c.parseLists;return e.concat(f).concat([c.removeWordAttributes])},p=function(a,b,d){return a?[c.removeAnchors]:[c.none]},q=function(b,d,e){var f=k(b,d,e);return a.flatten([n(b,d,e),f.annotate,[c.inlineTagFixes],o(b,d,e),[c.nestedListFixes],[c.removeExcess],p(b,d,e),f.local,m(b,d,e),[c.removeLocalLinks,c.removeVacantLinks],[c.removeEmptyStyle],[c.removeEmptyClass],[c.pruneInlineTags],[c.addPlaceholders],l(b,e),[c.cleanupFlags]])};return{derive:q}}),g("8q",[],function(){return["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"]}),g("87",["8q","g","p","j","3n","5d","k","1x","29","1d","3o","6r","1y","2a","20","8p","3f"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){return function(){var r=function(a){return g.fromDom(a.dom().cloneNode(!1))},s=function(c){return!!j.isElement(c)&&("body"===j.name(c)||b.contains(a,j.name(c)))},t=function(a){return!!j.isElement(a)&&b.contains(["br","img","hr"],j.name(a))},u=function(a,b){return a.dom().compareDocumentPosition(b.dom())},v=function(a,b){var c=d.clone(a);d.setAll(b,c)};return{up:c.constant({selector:o.ancestor,closest:o.closest,predicate:l.ancestor,all:q.parents}),down:c.constant({selector:n.descendants,predicate:k.descendants}),styles:c.constant({get:f.get,getRaw:f.getRaw,set:f.set,remove:f.remove}),attrs:c.constant({get:d.get,set:d.set,remove:d.remove,copyTo:v}),insert:c.constant({before:h.before,after:h.after,afterAll:i.after,append:h.append,appendAll:i.append,prepend:h.prepend,wrap:h.wrap}),remove:c.constant({unwrap:m.unwrap,remove:m.remove}),create:c.constant({nu:g.fromTag,clone:r,text:g.fromText}),query:c.constant({comparePosition:u,prevSibling:q.prevSibling,nextSibling:q.nextSibling}),property:c.constant({children:q.children,name:j.name,parent:q.parent,isText:j.isText,isElement:j.isElement,getText:p.get,setText:p.set,isBoundary:s,isEmptyTag:t}),eq:e.eq,is:e.is}}}),g("8z",["2c"],function(a){return a.immutable("word","pattern")}),g("90",["2c"],function(a){var b=a.immutable("element","offset"),c=a.immutable("element","deltaOffset"),d=a.immutable("element","start","finish"),e=a.immutable("begin","end"),f=a.immutable("element","text");return{point:b,delta:c,range:d,points:e,text:f}}),g("9n",["p","n"],function(a,b){var c=a.constant(!1),d=a.constant(!0),e=function(a,b){return h(function(c,d,e){return c(a,b)})},f=function(a,b){return h(function(c,d,e){return d(a,b)})},g=function(a,b){return h(function(c,d,e){return e(a,b)})},h=function(e){var f=function(){return e(d,c,c)},g=function(){return e(b.none,b.none,function(a,c){return b.some(a)})},h=function(a){return e(c,c,function(b,c){return c.eq(b,a)})},i=function(){return e(a.constant(0),a.constant(1),function(a,b){return b.property().getText(a).length})};return{isBoundary:f,fold:e,toText:g,is:h,len:i}},i=function(a,b,c,d){return a.fold(b,c,d)};return{text:g,boundary:e,empty:f,cata:i}}),g("9o",["g","p"],function(a,b){var c=function(c,d,e,f){var g=a.findIndex(c,b.curry(f,d)),h=g>-1?g:0,i=a.findIndex(c,b.curry(f,e)),j=i>-1?i+1:c.length;return c.slice(h,j)};return{boundAt:c}}),g("9p",["g"],function(a){var b=function(b,c){var d=a.findIndex(b,c);return b.slice(0,d)};return{sliceby:b}}),g("9r",["1m"],function(a){var b=a.generate([{include:["item"]},{excludeWith:["item"]},{excludeWithout:["item"]}]),c=function(a,b,c,d){return a.fold(b,c,d)};return{include:b.include,excludeWith:b.excludeWith,excludeWithout:b.excludeWithout,cata:c}}),g("9q",["g","9r"],function(a,b){var c=function(a,c){return d(a,function(a){return c(a)?b.excludeWithout(a):b.include(a)})},d=function(c,d){var e=[],f=[];return a.each(c,function(a){var c=d(a);b.cata(c,function(){f.push(a)},function(){f.length>0&&e.push(f),e.push([a]),f=[]},function(){f.length>0&&e.push(f),f=[]})}),f.length>0&&e.push(f),e};return{splitby:c,splitbyAdv:d}}),g("9b",["9o","9p","9q"],function(a,b,c){var d=function(b,c,d,e){return a.boundAt(b,c,d,e)},e=function(a,b){return c.splitby(a,b)},f=function(a,b){return c.splitbyAdv(a,b)},g=function(a,c){return b.sliceby(a,c)};return{splitby:e,splitbyAdv:f,sliceby:g,boundAt:d}}),g("92",["g","p","n","90","9b"],function(a,b,c,d,e){var f=function(b){return a.foldr(b,function(a,b){return b.len()+a},0)},g=function(a,b){return e.sliceby(a,function(a){return a.is(b)})},h=function(a,b){return a.fold(c.none,function(a){return c.some(d.range(a,b,b+1))},function(e){return c.some(d.range(e,b,b+a.len()))})},i=function(c){return a.bind(c,function(a){return a.fold(b.constant([]),b.constant([]),function(a){return[a]})})};return{count:f,dropUntil:g,gen:h,justText:i}}),g("9w",["g","90","9n","92"],function(a,b,c,d){var e=function(b,d,f){if(b.property().isText(d))return[c.text(d,b)];if(b.property().isEmptyTag(d))return[c.empty(d,b)];if(b.property().isElement(d)){var g=b.property().children(d),h=b.property().isBoundary(d)?[c.boundary(d,b)]:[],i=void 0!==f&&f(d)?[]:a.bind(g,function(a){return e(b,a,f)});return h.concat(i).concat(h)}return[]},f=function(b,c,d){var f=e(b,c,d),g=function(a,b){return a};return a.map(f,function(a){return a.fold(g,g,g)})},g=function(a,c,f,g,h){var i=e(a,g,h),j=d.dropUntil(i,c),k=d.count(j);return b.point(g,k+f)},h=function(a,c,d,e){return a.property().parent(c).fold(function(){return b.point(c,d)},function(b){return g(a,c,d,b,e)})},i=function(a,c,d,e,f){return a.up().predicate(c,e).fold(function(){return b.point(c,d)},function(b){return g(a,c,d,b,f)})};return{typed:e,items:f,extractTo:i,extract:h}}),g("9x",["g","p","9w"],function(a,b,c){var d="\n",e=" ",f=function(a,b){return"img"===b.property().name(a)?e:d},g=function(e,g,h){var i=c.typed(e,g,h);return a.map(i,function(a){return a.fold(b.constant(d),f,e.property().getText)}).join("")};return{from:g}}),g("9d",["g","p"],function(a,b){var c=function(c,d,e){var f={len:void 0!==e?e:0,list:[]},g=a.foldl(c,function(a,c){var e=d(c,a.len);return e.fold(b.constant(a),function(b){return{len:b.finish(),list:a.list.concat([b])}})},f);return g.list};return{make:c}}),g("9e",["g","n"],function(a,b){var c=function(a,b){return b>=a.start()&&b<=a.finish()},d=function(d,e){var f=a.find(d,function(a){return c(a,e)});return b.from(f)},e=function(b,c){return a.findIndex(b,function(a){return a.start()===c})},f=function(a,b){var c=a[a.length-1]&&a[a.length-1].finish()===b;return c?a.length+1:-1},g=function(a,b,c){var d=e(a,b),g=e(a,c),h=g>-1?g:f(a,c);return d>-1&&h>-1?a.slice(d,h):[]},h=function(c,d){return b.from(a.find(c,d))};return{get:d,find:h,inUnit:c,sublist:g}}),g("9g",["g","1l","p"],function(a,b,c){var d=function(d,e){return a.map(d,function(a){return b.merge(a,{start:c.constant(a.start()+e),finish:c.constant(a.finish()+e)})})};return{translate:d}}),g("9f",["g","9e","9g"],function(a,b,c){var d=function(a,b,d){var e=d(a,b);return c.translate(e,a.start())},e=function(c,e,f){return 0===e.length?c:a.bind(c,function(c){var g=a.bind(e,function(a){return b.inUnit(c,a)?[a-c.start()]:[]});return g.length>0?d(c,g,f):[c]})};return{splits:e}}),g("94",["9d","9e","9f","9g"],function(a,b,c,d){var e=function(b,c,d){return a.make(b,c,d)},f=function(a,c){return b.get(a,c)},g=function(a,c){return b.find(a,c)},h=function(a,b,d){return c.splits(a,b,d)},i=function(a,b){return d.translate(a,b)},j=function(a,c,d){return b.sublist(a,c,d)};return{generate:e,get:f,find:g,splits:h,translate:i,sublist:j}}),g("9y",["90","9w","92","94"],function(a,b,c,d){var e=function(e,f,g,h){var i=b.typed(e,f,h),j=d.generate(i,c.gen),k=d.get(j,g);return k.map(function(b){return a.point(b.element(),g-b.start())})};return{find:e}}),g("9m",["9w","9x","9y"],function(a,b,c){var d=function(b,c,d){return a.typed(b,c,d)},e=function(b,c,d){return a.items(b,c,d)},f=function(b,c,d,e){return a.extract(b,c,d,e)},g=function(b,c,d,e,f){return a.extractTo(b,c,d,e,f)},h=function(a,b,d,e){return c.find(a,b,d,e)},i=function(a,c,d){return b.from(a,c,d)};return{extract:f,extractTo:g,all:e,from:d,find:h,toText:i}}),g("99",["g","9m","9n","9b","9r"],function(a,b,c,d,e){var f=function(f,g,h){var i=a.bind(g,function(a){return b.from(f,a,h)}),j=d.splitbyAdv(i,function(a){return c.cata(a,function(){return e.excludeWithout(a)},function(){return e.excludeWith(a)},function(){return e.include(a)})});return a.filter(j,function(a){return a.length>0})};return{group:f}}),g("9s",["g","n"],function(a,b){var c=function(c,d,e){var f=[d].concat(c.up().all(d)),g=[e].concat(c.up().all(e)),h=a.find(f,function(b){return a.exists(g,function(a){return c.eq(a,b)})});return b.from(h)};return{common:c}}),g("9t",["g"],function(a){var b=["table","tbody","thead","tfoot","tr","ul","ol"];return function(c){var d=c.property(),e=function(b,c){return d.parent(b).map(d.name).map(function(b){return!a.contains(c,b)}).getOr(!1)},f=function(a){return d.isText(a)&&e(a,b)};return{validateText:f}}}),g("9a",["g","p","9m","9s","9t"],function(a,b,c,d,e){var f=function(c,d,e){return a.findIndex(d,b.curry(c.eq,e))},g=function(a,b,c,d,e){return b-1&&o>-1?g(m,n,j,o,l):[],q=e(h);return a.filter(p,q.validateText)})};return{range:h}}),g("91",["99","9a"],function(a,b){var c=function(a,c,d,e,f){return b.range(a,c,d,e,f)},d=function(b,c,d){return a.group(b,c,d)};return{range:c,group:d}}),g("9z",[],function(){var a=function(a){var b=/^[a-zA-Z]/.test(a)?"":"e",c=a.replace(/[^\w]/gi,"-");return b+c};return{css:a}}),g("a0",["g"],function(a){var b=function(b,c){if(0===c.length)return[b];var d=a.foldl(c,function(a,c){if(0===c)return a;var d=b.substring(a.prev,c);return{prev:c,values:a.values.concat([d])}},{prev:0,values:[]}),e=c[c.length-1];return e0});if(j.length<=1)return[c.range(g,0,i.length)];f.property().setText(g,j[0]);var k=d.generate(j.slice(1),function(a,d){var e=f.create().text(a),g=c.range(e,d,d+a.length);return b.some(g)},j[0].length),l=a.map(k,function(a){return a.element()});return f.insert().afterAll(g,l),[c.range(g,0,j[0].length)].concat(k)};return{subdivide:f}}),g("93",["g","p","9c","94"],function(a,b,c,d){var e=function(e,f,g){var h=a.bind(g,function(a){return[a.start(),a.finish()]}),i=function(a,b){return c.subdivide(e,a.element(),b)},j=d.splits(f,h,i),k=function(c){var f=d.sublist(j,c.start(),c.finish()),g=a.map(f,function(a){return a.element()}),h=a.map(g,e.property().getText).join("");return{elements:b.constant(g),word:c.word,exact:b.constant(h)}};return a.map(g,k)};return{separate:e}}),g("8s",[],function(){var a=function(){return"\ufeff"};return{zeroWidth:a}}),g("89",["8s","p"],function(a,b){var c="\\w'\\-\\u0100-\\u017F\\u00C0-\\u00FF"+a.zeroWidth()+"\\u2018\\u2019",d="[^"+c+"]",e="["+c+"]";return{chars:b.constant(c),wordbreak:b.constant(d),wordchar:b.constant(e)}}),g("8a",["4v"],function(a){return function(b,c,d,e){var f=function(){return new a(b,e.getOr("g"))};return{term:f,prefix:c,suffix:d}}}),g("8c",["p","n","89","8a"],function(a,b,c,d){var e=function(c){return d(c,a.constant(0),a.constant(0),b.none())},f=function(a){var e="((?:^'?)|(?:"+c.wordbreak()+"+'?))"+a+"((?:'?$)|(?:'?"+c.wordbreak()+"+))",f=function(a){return a.length>1?a[1].length:0},g=function(a){return a.length>2?a[2].length:0};return d(e,f,g,b.none())};return{token:e,word:f}}),g("8b",["8c"],function(a){var b=function(a){return a.replace(/[-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},c=function(c){var d=b(c);return a.word(d)},d=function(c){var d=b(c);return a.token(d)};return{sanitise:b,word:c,token:d}}),g("7n",["89","8a","8b","8c"],function(a,b,c,d){var e=function(a){return c.word(a)},f=function(a){return c.token(a)},g=function(a,c,d,e){return b(a,c,d,e)},h=function(a){return d.word(a)},i=function(a){return d.token(a)},j=function(a){return c.sanitise(a)},k=function(){return a.chars()},l=function(){return a.wordbreak()},m=function(){return a.wordchar()};return{safeword:e,safetoken:f,custom:g,unsafeword:h,unsafetoken:i,sanitise:j,chars:k,wordbreak:l,wordchar:m}}),g("9h",["p"],function(a){var b=function(b,c){for(var d=c.term(),e=[],f=d.exec(b);f;){var g=f.index+c.prefix(f),h=f[0].length-c.prefix(f)-c.suffix(f);e.push({start:a.constant(g),finish:a.constant(g+h)}),d.lastIndex=g+h,f=d.exec(b)}return e};return{all:b}}),g("9i",["g","1l","9h","12"],function(a,b,c,d){var e=function(a){var b=d.prototype.slice.call(a,0);return b.sort(function(a,b){return a.start()=q&&b<=r},x=function(b){a.each(b,function(a){k.isElement(a)&&g.getRaw(a,"position").isSome()&&g.remove(a,"position")})},y=function(b){var c=a.filter(b,function(a){return"li"===k.name(a)});if(c.length>0){var d=n.prevSiblings(c[0]),e=h.fromTag("ul");if(i.before(b[0],e),d.length>0){var f=h.fromTag("li");i.append(e,f),j.append(f,d)}j.append(e,c)}};return{links:v,position:x,list:y}}),g("55",["g","6k","6l","6m","6h","3f"],function(a,b,c,d,e,f){var g=function(b){var d=f.children(b);a.each([c.links,c.position,c.list],function(a){a(d)})},h=function(a,c,f,h,i){g(f);var j=e.get(f),k=b.derive(i,h,c);return d.go(a,j,k)};return{go:h,preprocess:g}}),g("6i",["4q","4r","4y","2w","2t","55","2f","28","1f"],function(a,b,c,d,e,f,g,h,i){var j=e.detect(),k=function(a,b,c,d){try{var e=f.go(a,j,b,c,d),k=void 0!==e&&null!==e&&e.length>0,l=k?h.fromHtml(e):[];return g.value(l)}catch(m){return i.error(m),g.error("errors.paste.process.failure")}},l=function(e,f,g,h,i){var j=k(e,f,h,g);return j.fold(function(b){return a.error(b)},function(e){return a.sync(function(f){i.get(function(g){var h=c.findImages(e,g);a.call(f,{response:d.paste(e,g,h),bundle:b.nu({})})})})})};return{transfer:l}}),g("53",["6i","g","o","n","1y","3f"],function(a,b,c,d,e,f){var g=function(b,c,d,e,f){return a.transfer(b,c,e,d,f)},h=function(g,h,i){var j=!1,k=!0,l=function(a,b){return void 0===h||b?d.none():h.findClipboardTags(f.children(a))},m=l(i,j).getOr([]);b.each(m,e.remove);var n=c.nu(function(a){a([])});return a.transfer(g,i,j,k,n)};return{internal:h,external:g}}),g("6j",["g","k","6h","7o"],function(a,b,c,d){var e=function(a){var e=b.fromTag("div");return d.set(e,a),c.get(e)},f=function(b){var c=b.trim().split(/\n{2,}|(?:\r\n){2,}/),d=a.map(c,function(a){return a.split(/\n|\r\n/).join("
")});return 1===d.length?d[0]:a.map(d,function(a){return"

"+a+"

"}).join("")};return{encode:e,convert:f}}),g("54",["4q","6j","4r","31","2w","n","23","28","11"],function(a,b,c,d,e,f,g,h,i){var j=function(a){return a.length>0},k=function(a){return d.isValidData(a)?g.findMap(a.types,function(b){return"text/plain"===b?f.some(a.getData(b)):f.none()}):f.none()},l=function(){var a=i.clipboardData;return void 0!==a?f.some(a.getData("text")):f.none()},m=function(a){var c=b.encode(a),d=b.convert(c),f=h.fromHtml(d);return e.paste(f,[],[])},n=function(b){return a.sync(function(f){var g=d.isValidData(b)?k:l,h=g(b).filter(j).fold(e.cancel,m);a.call(f,{response:h,bundle:c.nu({})})})};return{handle:n}}),g("34",["4q","4r","4z","51","52","53","54","2w","2t","55","p","k","29","3f","1f"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=i.detect(),q=function(a,b,c){return g.handle(a)},r=function(b,c){var d=function(b,d,e){var f=l.fromTag("div");m.append(f,b),j.preprocess(f);var g=n.children(f);return a.pure({response:h.paste(g,d,e),bundle:c.bundle()})},e=k.curry(a.pass,c);return h.cata(c.response(),e,d,e,d)},s=function(a,b){return function(d,e){var g=e.bundle();return c.proxyBin(g).handle("There was no proxy bin setup. Ensure you have run proxyStep first.",function(c){var d=n.owner(a);return f.internal(d,b,c)})}},t=function(a,b){return function(d,e){var g=e.bundle();return c.proxyBin(g).handle("There was no proxy bin setup. Ensure you have run proxyStep first.",function(d){var e=c.merging(g),h=c.isWord(g),i=c.isInternal(g),j=c.backgroundAssets(g),k=n.owner(a);return i?f.internal(k,b,d):f.external(k,d,e,h,j)})}},u=function(){return function(b,c){return a.error("errors.local.images.disallowed")}},v=function(){return function(b,c){if(p.browser.isSafari()){var d=p.deviceType.isWebView()?"webview.imagepaste":"safari.imagepaste";return a.error(d)}return e.handle(b)}},w=function(a){return function(b,e){var f=c.mergeOffice(e.bundle());return d.handle(b,f,a)}},x=function(b,c){return a.cancel()},y=function(c){return function(d,e){var f=b.merge(e.bundle(),b.nu(c));return a.pure({response:e.response(),bundle:f})}};return{plain:q,autolink:r,noImages:u,images:v,internal:s,external:t,gwt:w,setBundle:y,none:x}}),g("56",["5c","p"],function(a,b){var c=a.resolve("smartpaste-eph-bin");return{binStyle:b.constant(c)}}),g("57",["6m","j","6h","6n"],function(a,b,c,d){var e=function(a,c){return d.descendant(a,function(a){return!!b.has(a,"style")&&b.get(a,"style").indexOf("mso-")>-1})},f=function(b,d){var e=c.get(b);return a.isWordContent(e,d)},g=function(a,b){var c=a.browser,d=c.isIE()&&c.version.major>=11?e:f;return d(b,a)};return{isWord:g}}),g("35",["4q","4r","56","2t","57","27","3f"],function(a,b,c,d,e,f,g){var h=d.detect();return function(d,i,j,k,l){return function(m,n){var o=l(),p=n.response();return a.sync(function(l){var n=d(j);n.events.after.bind(function(d){var j=d.container();i(j),f.add(j,c.binStyle());var m=e.isWord(h,j),n=g.children(j),q=k.findClipboardTags(n,m).isSome();a.call(l,{response:p,bundle:b.nu({isWord:m,isInternal:q,proxyBin:j,backgroundAssets:o})})}),o.convert(m.data()),n.run()})}}}),g("8d",["78","79","12","62","13","8o"],function(a,b,c,d,e,f){var g=function(a){for(var b=new c(a.length/2),e=0;ec&&c!==-1?(b=c+1,++e):(c>d||c<0)&&d!==-1&&(b=d+1,--e),b>f||d===-1)return-1;while(e>0);return b},k=function(a,b,c,e){var f=i(a,c,e),g=/[^a-fA-F0-9]([a-fA-F0-9]+)\}$/;return h(c,e,f,g,d)},l=function(a,b,c,d){var e=i(a,c,d),g=/([a-fA-F0-9]{64,})(?:\}.*)/;return h(c,d,e,g,f)},m=function(d,f){var h=g(c,d,f),i=j(d,h),m=g(e,d,f),n=j(d,m),o=a.curry(l,d,f,m,n),p=a.curry(k,d,f,h,i);return h===-1&&m===-1?b.none():h===-1?o():m===-1?p():mi?p():hn?o():h=0?e.value("image/png"):a.indexOf("\\jpegblip")>=0?e.value("image/jpeg"):e.error("errors.imageimport.unsupported")},h=function(a){return a.replace(/\r/g,"").replace(/\n/g,"")},i=function(a,b){var c=a.match(b);return c&&c[1]&&c[1].length%2===0?e.value(c[1]):e.error("errors.imageimport.invalid")},j=function(a){var b=a.match(/\\shplid(\d+)/);return null!==b?d.some(b[1]):d.none()},k=function(c){var d=c.bower(),e=c.regex();return j(d).map(function(f){var h=c.idRef()+f;return g(d).fold(function(a){return b.unsupported(h,a)},function(c){return i(d,e).fold(function(a){return b.unsupported(h,a)},function(d){return b.supported(h,c,a.convert(d,c))})})})},l=function(a){for(var b=[],c=function(){return a.length},d=function(a){var c=k(a);return b=b.concat(c.toArray()),a.end()},e=0;e0?(f.each(b,m.remove),t(e.incomplete(d,c,o,"errors.local.images.disallowed"))):t(e.paste(d,c,o))}})};e.cata(c.response(),j,o,j,o)})}}}),g("1p",["2z","30","31","32","33","34","35","36","2t","p","n","2c","37","11"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=l.immutable("data","rtf"),p=i.detect(),q="^image/",r="file",s=[q,r],t="html",u="rtf",v=function(a){return m.contains(a,"0?k.some(c):k.none()}):k.none()},D=function(a,b,c,d){return{label:j.constant(a),getAvailable:b,steps:j.constant(c),capture:j.constant(d)}},E=function(c,d,h,i){var k=j.curry(z,i);return D("Within Textbox.io (tables) pasting",k,[a.normal(g(d,c,h,i,b.ignore)),a.normal(e.fixed(!0,!0)),a.normal(f.internal(h,i))],!1)},F=function(c,i,j,k,l,m,n){return D("Outside of Textbox.io pasting (could be internal but another browser)",x,[a.normal(g(k,j,l,n,b.background)),a.normal(e.fromConfigIfExternal(c,i)),a.normal(f.external(l,n)),a.blocking(h(m,i)),a.normal(d(i))],!1)},G=function(b,c,d,g){return D("GWT pasting",w,[a.normal(f.setBundle({isWord:!0})),a.normal(e.fromConfig(c,d)),a.normal(f.gwt(b)),a.blocking(h(g,d))],!0)},H=function(b){return D("Image pasting",y,[a.normal(b.allowLocalImages===!1?f.noImages(j.noop):f.images())],!0)},I=function(){return D("Only plain text is available to paste",B,[a.normal(f.plain),a.normal(f.autolink)],!0)},J=function(){return D("Plain text pasting",A,[a.normal(f.plain),a.normal(f.autolink)],!0)},K=function(){return D("There is no valid way to paste",k.some,[a.normal(f.none)],!1)};return{internal:E,pastiche:F,gwt:G,image:H,text:J,onlyText:I,none:K}}),g("5b",["5c","2t","j","27","k","6h","29"],function(a,b,c,d,e,f,g){var h=function(){var a=b.detect(),c=a.os.isOSX();return c?["\u2318"]:["Ctrl"]},i=function(a){return e.fromHtml("

"+a("cement.dialog.flash.press-escape")+"

")},j=function(b){var c=e.fromTag("div");d.add(c,a.resolve("flashbin-helpcopy"));var f=h(),j=e.fromHtml("

"+b("cement.dialog.flash.trigger-paste")+"

"),k=e.fromHtml('
'+f+' + V
');return d.add(k,a.resolve("flashbin-helpcopy-kbd")),g.append(c,[j,k,i(b)]),c},k=function(b){var c=e.fromTag("div");d.add(c,a.resolve("flashbin-helpcopy"));var f=e.fromHtml("

"+b("cement.dialog.flash.missing")+"

");return g.append(c,[f,i(b)]),c},l=function(b){var h=e.fromTag("div");d.add(h,a.resolve("flashbin-loading"));var i=e.fromTag("div");d.add(i,a.resolve("flashbin-loading-spinner"));var j=e.fromTag("p"),k=b("loading.wait");return f.set(j,k),c.set(j,"aria-label",k),g.append(h,[i,j]),h};return{paste:j,noflash:k,indicator:l}}),h("5e",navigator),g("38",["5b","5c","2t","p","27","5d","k","1x","29","5e"],function(a,b,c,d,e,f,g,h,i,j){var k=c.detect(),l=function(){return new ActiveXObject("ShockwaveFlash.ShockwaveFlash")},m=function(){try{var a=k.browser.isIE()?l():j.plugins["Shockwave Flash"];return void 0!==a}catch(b){return!1}},n=function(b,c,e,f){var g=a.noflash(f);return h.append(b,g),{reset:d.noop}},o=function(b,c,d,e){var g=a.paste(e),h=a.indicator(e);i.append(b,[h,g,c.element()]);var j=function(){f.setAll(h,{height:"0",padding:"0"})},k=function(){f.set(g,"display","block"),f.set(h,"display","none"),d()},l=function(){f.set(g,"display","none"),f.set(h,"display","block"),f.remove(h,"height"),f.remove(h,"padding"),d()};return c.events.spin.bind(l),c.events.reset.bind(k),c.events.hide.bind(j),{reset:k}};return function(a,c,f){var h=g.fromTag("div"),i="flashbin-wrapper-"+(k.os.isOSX()?"cmd":"ctrl");e.add(h,b.resolve(i));var j=m()?o:n,l=j(h,a,c,f.translations);return{element:d.constant(h),reset:l.reset}}}),h("5k",clearInterval),h("5m",setInterval),g("5f",["n","21","22","z","5k","5m"],function(a,b,c,d,e,f){var g=function(){var g=d(a.none()),h=c.create({crashed:b([]),timeout:b([])}),i=function(b,c,d,i){var j=c,k=f(function(){d()?e(k):j<=0?(h.trigger.timeout(),e(k)):i()&&(e(k),h.trigger.crashed()),j--},b);g.set(a.some(k))},j=function(){g.get().each(function(a){e(a)})};return{start:i,stop:j,events:h.registry}};return{responsive:g}}),g("5g",["1b","g","5k","5m"],function(a,b,c,d){return function(e,f,g){var h=function(c){return b.forall(f,function(b){return a.isFunction(c[b])})},i=function(){var b=e.dom();a.isFunction(b.PercentLoaded)&&100===b.PercentLoaded()&&h(b)&&(l(),g())},j=!0,k=d(i,500),l=function(){j&&(c(k),j=!1)};return{stop:l}}}),g("6t",["72"],function(a){var b=function(a,b){return void 0!==a[b]&&null!==a[b]||(a[b]={}),a[b]},c=function(c,d){for(var e=d||a,f=c.split("."),g=0;g ';if(A.browser.isIE()&&10===A.browser.version.major){var d=f.generate("flash-bin");return p.fromHtml(''+c+"")}return p.fromHtml(''+c+"")},L=K(),M=function(){o.setAll(L,{width:"2px",height:"2px"})};M();var N=b(L,e.keys(J),D);r.append(s,L);var O=function(){return s},P=function(){A.browser.isFirefox()&&y.getSelection().removeAllRanges(),q.focus(L)},Q=null,R=function(){n.add(s,c.resolve("flash-activate")),o.remove(L,"height"),o.remove(L,"width"),h.trigger.hide()},S=function(){t(Q),n.remove(s,c.resolve("flash-activate")),M()},T=function(){Q=w(R,3e3),h.trigger.spin(),o.set(s,"display","block"),P()},U=function(){o.set(s,"display","none"),B.each(function(a){d.each(a,function(a){a.unbind()})})},V=function(){U(),d.each(e.values(J),function(a){z.unregister(a)}),z.unregister(E),N.stop()};return{focus:P,element:O,activate:T,deactivate:U,destroy:V,events:h.registry}}}),g("1q",["38","39","21","22","w","k","11"],function(a,b,c,d,e,f,g){return function(h,i){var j=i.translations,k=d.create({response:c(["rtf","hide"]),cancel:c([]),error:c(["message"]),failed:c(["message"])}),l=function(){var c=b(i.swf);c.deactivate();var d=f.fromDom(g),l=e.bind(d,"mouseup",c.focus),m=function(){q()},n=function(){m(),k.trigger.cancel()};c.events.cancel.bind(n),c.events.response.bind(function(a){k.trigger.response(a.rtf(),m)}),c.events.error.bind(function(a){m(),k.trigger.error(a.message())}),c.events.failed.bind(function(a){m(),k.trigger.failed(a.message())});var o=h();o.setTitle(j("cement.dialog.flash.title"));var p=a(c,o.reflow,i);p.reset(),o.setContent(p.element()),o.events.close.bind(n),o.show(),c.activate();var q=function(){l.unbind(),c.destroy(),o.destroy()}};return{open:l,events:k.registry}}}),g("5p",[],function(){var a=function(a,b){return d(function(c,d,e){return d(a,b)})},b=function(a){return d(function(b,c,d){return b(a)})},c=function(a){return d(function(b,c,d){return d(a)})},d=function(a){return{fold:a}};return{on:a,before:b,after:c}}),g("5o",["5p","2c","k"],function(a,b,c){var d=b.immutable("start","soffset","finish","foffset"),e=b.immutable("start","soffset","finish","foffset"),f=b.immutable("start","finish"),g=function(b){var d=c.fromDom(b.startContainer),e=c.fromDom(b.endContainer);return f(a.on(d,b.startOffset),a.on(e,b.endOffset))};return{read:d,general:e,write:f,writeFromNative:g}}),g("5q",[],function(){var a=function(a,b){if(a.getSelection)return b(a,a.getSelection());throw"No selection model supported."};return{run:a}}),g("6v",["3n","3f"],function(a,b){var c=function(c,d,e,f){var g=b.owner(c),h=g.dom().createRange();h.setStart(c.dom(),d),h.setEnd(e.dom(),f);var i=a.eq(c,e)&&d===f;return h.collapsed&&!i};return{after:c}}),g("6u",["5o","6v","k","3f"],function(a,b,c,d){var e=function(a){return b.after(c.fromDom(a.anchorNode),a.anchorOffset,c.fromDom(a.focusNode),a.focusOffset)},f=function(b,d){var f=c.fromDom(d.startContainer),g=c.fromDom(d.endContainer);return e(b)?a.read(g,d.endOffset,f,d.startOffset):a.read(f,d.startOffset,g,d.endOffset)},g=function(a){return e(a)},h=function(a,b,c,e){return function(f){if(f.extend)f.collapse(a.dom(),b),f.extend(c.dom(),e);else{var g=d.owner(a).dom().createRange();g.setStart(c.dom(),e),g.setEnd(a.dom(),b),f.removeAllRanges(),f.addRange(g)}}},i=function(a,c,d,e){return b.after(a,c,d,e)},j=function(){return{flip:f,isRtl:g}},k=function(){return{flip:h,isRtl:i}};return{read:j,write:k}}),g("5s",["5o","6u","n","6v","k"],function(a,b,c,d,e){var f=function(b,d){var f=h(b,d.start(),d.finish());if(f.collapsed===!0){var g=h(b,d.finish(),d.start());return g.collapsed===!0?c.none():c.some(a.general(e.fromDom(g.endContainer),g.endOffset,e.fromDom(g.startContainer),g.startOffset))}return c.none()},g=function(a,b){var c=h(a,b.start(),b.finish());return c.collapsed===!0?h(a,b.finish(),b.start()):c},h=function(a,b,c){var d=m(a);return b.fold(function(a){d.setStartBefore(a.dom())},function(a,b){d.setStart(a.dom(),b)},function(a){d.setStartAfter(a.dom())}),c.fold(function(a){d.setEndBefore(a.dom())},function(a,b){d.setEnd(a.dom(),b)},function(a){d.setEndAfter(a.dom())}),d},i=function(a,b){return h(a,b.start(),b.finish())},j=function(a,b,c,e,f){var g=d.after(b,c,e,f),h=a.document.createRange();return g?(h.setStart(e.dom(),f),h.setEnd(b.dom(),c)):(h.setStart(b.dom(),c),h.setEnd(e.dom(),f)),h},k=function(a,b){var c=i(a,b);return function(a){a.addRange(c)}},l=function(a,c){var d=f(a,c);return d.fold(function(){return k(a,c)},function(a){return b.write().flip(a.start(),a.soffset(),a.finish(),a.foffset())})},m=function(a){return a.document.createRange()};return{create:m,build:l,toNative:i,forceRange:g,toExactNative:j}}),g("5r",["g","5s","k","1d","2a","2h"],function(a,b,c,d,e,f){var g=function(a,b,c){return a.selectNodeContents(c.dom()),a.compareBoundaryPoints(b.END_TO_START,b)<1&&a.compareBoundaryPoints(b.START_TO_END,b)>-1},h=function(b,c,d,h){var i=b.document.createRange(),j=f.is(c,h)?[c]:[],k=j.concat(e.descendants(c,h));return a.filter(k,function(a){return g(i,d,a)})},i=function(a,e,f){var g=b.forceRange(a,e),i=c.fromDom(g.commonAncestorContainer);return d.isElement(i)?h(a,i,g,f):[]};return{find:i}}),g("6w",["g","5o","5p","1d"],function(a,b,c,d){var e=function(b,e){var f=d.name(b);return"input"===f?c.after(b):a.contains(["br","img"],f)?0===e?c.before(b):c.after(b):c.on(b,e)},f=function(a){var d=a.start().fold(c.before,e,c.after),f=a.finish().fold(c.before,e,c.after);return b.write(d,f)};return{beforeSpecial:e,preprocess:f}}),g("6x",["g","k","1g"],function(a,b,c){var d=function(d,e){var f=e||c,g=f.createDocumentFragment();return a.each(d,function(a){g.appendChild(a.dom())}),b.fromDom(g)};return{fromElements:d}}),g("5t",["5o","6u","5s","6w","n","k","6x"],function(a,b,c,d,e,f,g){var h=function(a){return function(b,e){var f=d.preprocess(a),g=c.build(b,f);void 0!==e&&null!==e&&(e.removeAllRanges(),g(e))}},i=function(a){return function(b,d){var e=c.create(b);e.selectNodeContents(a.dom()),d.removeAllRanges(),d.addRange(e)}},j=function(a,b){var c=b.getRangeAt(0),d=b.getRangeAt(b.rangeCount-1),e=a.document.createRange();return e.setStart(c.startContainer,c.startOffset),e.setEnd(d.endContainer,d.endOffset),e},k=function(c,d){var e=f.fromDom(d.startContainer),g=f.fromDom(d.endContainer);return b.read().isRtl(c)?b.read().flip(c,d):a.read(e,d.startOffset,g,d.endOffset)},l=function(a,b){return void 0!==b&&null!==b&&b.rangeCount>0?e.from(j(a,b)):e.none()},m=function(a,b){var c=l(a,b);return c.map(function(a){return k(b,a)})},n=function(a){return function(b,c){var d=l(b,c);d.each(function(c){o(b,c,a)})}},o=function(a,b,c){var d=g.fromElements(c,a.document);b.deleteContents(),b.insertNode(d.dom())},p=function(a,b){return function(e,f){var g=d.preprocess(a),h=c.toNative(e,g);o(e,h,b)}},q=function(a,b,d,e){return function(f,g){var h=c.toExactNative(f,a,b,d,e);h.deleteContents()}},r=function(a,b,d,e){return function(g,h){var i=c.toExactNative(g,a,b,d,e),j=i.cloneContents();return f.fromDom(j)}},s=function(a,b,d,f){return function(g,h){var i=c.toExactNative(g,a,b,d,f),j=i.getClientRects(),k=j.length>0?j[0]:i.getBoundingClientRect();return k.width>0||k.height>0?e.some(k):e.none()}},t=function(a){return function(b,d){var f=c.create(b);f.selectNode(a.dom());var g=f.getBoundingClientRect();return g.width>0||g.height>0?e.some(g):e.none()}},u=function(a,b){a.getSelection().removeAllRanges()},v=function(a,b,d,e){return function(f,g){var h=c.toExactNative(f,a,b,d,e);return h.toString()}};return{get:m,set:h,selectElementContents:i,replace:n,replaceRange:p,deleteRange:q,cloneFragment:r,rectangleAt:s,bounds:t,clearSelection:u,stringAt:v}}),g("3a",["5o","5p","5q","5r","5s","5t","3n","k"],function(a,b,c,d,e,f,g,h){var i=function(a){return c.run(a,f.get)},j=function(a,b){c.run(a,f.set(b))},k=function(c,d,e,f,g){var h=a.write(b.on(d,e),b.on(f,g));j(c,h)},l=function(a,b){c.run(a,f.selectElementContents(b))},m=function(a,b){c.run(a,f.replace(b))},n=function(a,b,d){c.run(a,f.replaceRange(b,d))},o=function(a,b,d,e,g){c.run(a,f.deleteRange(b,d,e,g))},p=function(a,b,d,e,g){return c.run(a,f.cloneFragment(b,d,e,g))},q=function(a,b,c,d){return g.eq(a,c)&&b===d},r=function(a,b,d,e,g){return c.run(a,f.rectangleAt(b,d,e,g))},s=function(a,b){return c.run(a,f.bounds(b))},t=function(a,b,c){return d.find(a,b,c)},u=function(c,d,e,f,g,h){var i=a.write(b.on(d,e),b.on(f,g));return t(c,i,h)},v=function(b,c){var d=e.forceRange(b,c);return a.general(h.fromDom(d.startContainer),d.startOffset,h.fromDom(d.endContainer),d.endOffset)},w=function(a){c.run(a,f.clearSelection)},x=function(a,b,d,e,g){return c.run(a,f.stringAt(b,d,e,g))};return{get:i,set:j,setExact:k,selectElementContents:l,replace:m,replaceRange:n,deleteRange:o,isCollapsed:q,cloneFragment:p,rectangleAt:r,bounds:s,findWithin:t,findWithinExact:u,deriveExact:v,clearAll:w,stringAt:x}}),g("5u",["p","3n"],function(a,b){return function(c,d,e,f){var g=b.eq(c,e)&&d===f;return{startContainer:a.constant(c),startOffset:a.constant(d),endContainer:a.constant(e),endOffset:a.constant(f),collapsed:a.constant(g)}}}),g("3b",["5u","k","1x","1y","3f"],function(a,b,c,d,e){return function(f){var g=b.fromTag("br"),h=function(a,b){a.dom().focus()},i=function(a){var b=e.owner(a);return b.dom().defaultView},j=function(b,d){var e=i(d);e.focus(),c.append(d,g),f.set(e,a(g,0,g,0))},k=function(){d.remove(g)};return{cleanup:k,toOn:h,toOff:j}}}),g("3c",["p"],function(a){return function(){var b=function(a,b){a.dom().focus()},c=function(a,b){b.dom().focus()},d=a.identity;return{toOn:b,toOff:c,cleanup:d}}}),g("6y",["g","k","1x","29","1y","3f"],function(a,b,c,d,e,f){var g=function(a,b){f.nextSibling(a).filter(b).each(function(b){var c=f.children(b);d.append(a,c),e.remove(b)}),i(a,b)},h=function(a,g){var h=f.children(a),i=b.fromTag("div",f.owner(a).dom());d.append(i,h),c.before(a,i),e.remove(a)},i=function(b,c){var d=f.children(b);a.each(d,function(a){c(a)&&h(a,b)})};return{consolidate:g}}),g("6z",["3g"],function(a){var b=a.create("ephox-sloth");return{resolve:b.resolve}}),g("70",["5d"],function(a){var b=function(a,b){return function(d){return"rtl"===c(d)?b:a}},c=function(b){return"rtl"===a.get(b,"direction")?"rtl":"ltr"};return{onDirection:b,getDirection:c}}),g("5v",["1s","2c","6y","6z","j","27","3q","5d","70","k","6h","1x","1y","20","3f"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=d.resolve("bin"),q=p+a.generate(""),r=i.onDirection("-100000px","100000px");return function(a){var d=j.fromTag("div");e.setAll(d,{contenteditable:"true","aria-hidden":"true"}),h.setAll(d,{position:"fixed",top:"0px",width:"100px",height:"100px",overflow:"hidden",opacity:"0"}),g.add(d,[p,q]);var i=function(a){m.empty(d),h.set(d,"left",r(a)),l.append(a,d)},s=function(){var b=n.ancestor(d,"body");b.each(function(b){a.toOff(b,d)})},t=function(a){return f.has(a,q)},u=function(){c.consolidate(d,t);var a=b.immutable("elements","html","container"),e=o.children(d),f=k.get(d);return a(e,f,d)},v=function(){m.remove(d)},w=function(){return d};return{attach:i,focus:s,contents:u,container:w,detach:v}}}),g("3d",["p","2x","21","22","2y","5v","3f"],function(a,b,c,d,e,f,g){return function(h,i){var j=f(h),k=function(){h.cleanup();var a=j.contents();j.detach(),n.trigger.after(a.elements(),a.html(),j.container())},l=b.tap(function(){n.trigger.before(),j.attach(i),j.focus(),e.run(g.owner(i),l,k)}),m=function(){l.instance()},n=d.create({before:c([]),after:c(["elements","html","container"])}),o=a.noop;return{instance:a.constant(m),destroy:o,events:n.registry}}}),g("1r",["2t","3a","21","22","3b","3c","3d","1d"],function(a,b,c,d,e,f,g,h){var i=a.detect(),j={set:function(a,c){b.setExact(a,c.startContainer(),c.startOffset(),c.endContainer(),c.endOffset())}},k=function(a){var b=i.browser.isIE()&&"body"!==h.name(a)?f:e;return b(j)};return function(a){var b=d.create({after:c(["container"])}),e=k(a),f=g(e,a);f.events.after.bind(function(c){e.toOn(a,c.container()),b.trigger.after(c.container())});var h=function(){f.instance()()};return{run:h,events:b.registry}}}),g("5y",["w","k","1g"],function(a,b,c){var d=function(d){if("complete"===c.readyState||"interactive"===c.readyState)d();else var e=a.bind(b.fromDom(c),"DOMContentLoaded",function(){d(),e.unbind()})};return{execute:d}}),g("3e",["2t","5h","p","5w","n","5x","5i","5d","w","k","1x","5y","1y"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=b.install("ephox.keurig.init"),o=e.none(),p=a.detect(),q=p.browser,r=q.isIE()||q.isSpartan()||p.deviceType.isiOS()||p.deviceType.isAndroid(),s=r?c.noop:d.cached(function(a){var b=j.fromTag("div");if(void 0===a)throw"baseUrl was undefined";var c=j.fromTag("iframe");h.setAll(b,{display:"none"});var d=i.bind(c,"load",function(){var g=function(a){o=e.some(a),q.isSafari()||m.remove(b)},h=n.ephemeral(g),i=a+"/wordimport.js";f.write(c,'"),d.unbind()});l.execute(function(){k.append(g.body(),b),k.append(b,c)})}),t=function(a,b){return o.map(function(c){return c(a,b)})},u=function(){return o.isSome()};return{load:s,cleanDocument:t,ready:u}}),g("1t",["3e"],function(a){return function(b){return a.ready()||a.load(b),{cleanDocument:a.cleanDocument}}}),g("l",["1o","1p","1q","1r","g","1s","1t","p","n"],function(a,b,c,d,e,f,g,h,i){return function(j,k,l,m){var n=g(m.baseUrl),o=h.curry(c,k),p=d,q=function(){return{clipboardType:f.generate("clipboard-type"),findClipboardTags:i.none}},r=void 0!==m.intraFlag?m.intraFlag:q(),s=e.flatten([void 0!==m.intraFlag?[b.internal(l,p,j,r)]:[],[b.onlyText()],[b.gwt(n,k,m,o)],[b.image(m)]]),t=b.pastiche(k,m,l,p,j,o,r);return a(s,t)}}),g("m",["1o","1p"],function(a,b){return function(){return a([b.text()],b.none())}}),g("q",[],function(){return{officeStyles:"prompt",htmlStyles:"clean"}}),g("r",["j","k","1x","1y","1z","20","1g"],function(a,b,c,d,e,f,g){var h="powerpaste-styles",i="#"+h,j=function(d){if(!e.any(i)){var g="",j=b.fromHtml(g);a.set(j,"type","text/css"),a.set(j,"id",h);var k=f.first("head").getOrDie("Head element could not be found.");c.append(k,j)}},k=function(){if(e.any(i)){var a=f.first("head").getOrDie("Head element could not be found."),b=f.descendant(a,i).getOrDie("The style element could not be removed");d.remove(b)}};return{injectStyles:j,removeStyles:k}}),g("v",["g","k","j","1g"],function(a,b,c,d){var e=function(a){var b=d.createElement("div");b.appendChild(a.cloneNode(!0));var c=b.innerHTML;return b=a=null,c},f=function(d){a.each(a.map(d.getElementsByTagName("*"),b.fromDom),function(a){c.has(a,"data-mce-style")&&!c.has(a,"style")&&c.set(a,"style",c.get(a,"data-mce-style"))})};return{nodeToString:e,restoreStyleAttrs:f}}),g("t",["21","22","v","j","k","1x","1y","20"],function(a,b,c,d,e,f,g,h){return function(i){var j=function(){var j,k="",l="",m=[],n=null,o=b.create({close:a([])}),p=function(a){k=a},q=function(a){var b=c.nodeToString(a.dom());l=[{type:"container",html:b}],n=a},r=function(a){var b=[];a.forEach(function(a,c,d){b.push({text:a.text,onclick:a.click})}),m=b},s=function(a){o.trigger.close()},t=function(){j.off("close",s),j.close("close")},u=function(){0===m.length&&(m=[{text:"Close",onclick:function(){j.close()}}]);var a={title:k,spacing:10,padding:10,minWidth:300,minHeight:100,layout:"flex",items:l,buttons:m};j=i.windowManager.open(a);var b=e.fromDom(j.getEl()),c=h.descendant(b,"."+d.get(n,"class")).getOrDie("We must find this element or we cannot continue");f.before(c,n),g.remove(c),j.on("close",s)},v=function(){t()},w=function(){t()},x=function(){};return{events:o.registry,setTitle:p,setContent:q,setButtons:r,show:u,hide:v,destroy:w,reflow:x}};return{createDialog:j}}}),g("24",["2c","n"],function(a,b){var c=a.immutable("url","html"),d=function(a){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(a)},e=function(a){return d(a)&&/.(gif|jpe?g|png)$/.test(a)},f=function(a){var d=/^([^<]+)<\/a>$/.exec(a);return b.from(d).bind(function(d){var e=c(d[1],a);return d[1]===d[2]?b.some(e):b.none()})};return{isAbsoluteUrl:d,isImageUrl:e,parseUrlFromLinkHtml:f}}),g("u",["g","n","23","24"],function(a,b,c,d){var e=function(a){return"extra"in a.undoManager},f=function(a,c,d){return e(a)?(a.undoManager.extra(function(){k(a,c)},d),b.some(!0)):b.none()},g=function(a,b){return f(a,b.html(),function(){a.insertContent('')})},h=function(a,b){return f(a,b.html(),function(){a.execCommand("mceInsertLink",!1,b.url())})},i=function(a,c){return d.parseUrlFromLinkHtml(c).bind(function(c){var e=a.selection.isCollapsed()===!1&&d.isAbsoluteUrl(c.url());return e?h(a,c):b.none()})},j=function(a,c){return d.parseUrlFromLinkHtml(c).bind(function(c){return d.isImageUrl(c.url())?g(a,c):b.none()})},k=function(a,c){return a.insertContent(c,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),b.some(!0)},l=function(a,b,d){var e=function(c){return c(a,b)};return c.findMap(d,e)};return{until:l,linkSelection:i,insertImage:j,insertContent:k}}),g("8",[],function(){var a=function(a,b){return a.hasEventListeners(b)},b=function(a,b){return a.fire("PastePreProcess",{content:b}).content},c=function(a,b){var c=a.dom.add(a.getBody(),"div",{style:"display:none"},b),d=a.fire("PastePostProcess",{node:c}).node.innerHTML;return a.dom.remove(c),d},d=function(c,d){return a(c,"PastePreProcess")?b(c,d):d},e=function(b,d){return a(b,"PastePostProcess")?c(b,d):d},f=function(a,b){return e(a,d(a,b))},g=function(a){var b=a.settings,c=a.plugins.powerpaste;b.paste_preprocess&&a.on("PastePreProcess",function(d){b.paste_preprocess.call(a,c,d)}),b.paste_postprocess&&a.on("PastePostProcess",function(d){b.paste_postprocess.call(a,c,d)})};return{process:f,registerEvents:g}}),g("6",["l","m","g","n","o","p","d","q","r","s","t","u","8","v","w","k","x","2"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){return function(s,t,u,v,w){var x,y,z,A,B;B=(v?v.jsUrl:u)+"/js",y=(v?v.swfUrl:u)+"/flash/textboxpaste.swf",z=(v?v.imgUrl:u)+"/img/spinner_96.gif",A=(v?v.cssUrl:u)+"/css/editorcss.css";var C=function(a){return a.settings.smart_paste!==!1},D=function(a){return function(b,c){return b.undoManager.transact(function(){l.insertContent(b,c),n.restoreStyleAttrs(b.getBody()),w.prepareImages(a)}),d.some(!0)}},E=function(a,b,c){var d=C(a)?[l.linkSelection,l.insertImage]:[];l.until(a,b,d.concat([D(c)]))},F=function(){x&&s.selection.moveToBookmark(x),x=null};s.on("init",function(d){i.injectStyles(z),s.dom.loadCSS(A);var l={baseUrl:B,swf:y,officeStyles:s.settings.powerpaste_word_import||h.officeStyles,htmlStyles:s.settings.powerpaste_html_import||h.htmlStyles,translations:g.translate,allowLocalImages:s.settings.powerpaste_allow_local_images!==!1,enableFlashImport:s.settings.powerpaste_enable_flash_import!==!1,preprocessor:function(a){return e.pure(a)}},r=k(s),u=p.fromDom(s.getBody()),v=function(a){a.events.cancel.bind(function(){F()}),a.events.error.bind(function(a){F(),s.notificationManager?s.notificationManager.open({text:g.translate(a.message()),type:"error"}):j.showDialog(s,g.translate(a.message()))}),a.events.insert.bind(function(a){var b=c.map(a.elements(),function(a){return n.nodeToString(a.dom())}).join("");s.focus(),q(function(){F(),E(s,m.process(s,b),a.assets()),w.uploadImages(a.assets())},1)})},C=a(u,r.createDialog,f.noop,l),D=b();c.each([C,D],v),o.bind(u,"paste",function(a){x||(x=s.selection.getBookmark());var b=t.isText()?D:C;b.paste(a.raw()),t.reset(),q(function(){s.windowManager.windows[0]&&s.windowManager.windows[0].getEl()&&s.windowManager.windows[0].getEl().focus()},1)})}),s.on("remove",function(a){1===r.editors.length&&i.removeStyles()})}}),g("7",["y","z"],function(a,b){var c=function(a){return tinymce.util.VK.metaKeyPressed(a)&&86==a.keyCode&&a.shiftKey};return function(d){var e=b(d.settings.paste_as_text),f=b(!1);d.on("keydown",function(a){c(a)&&(f.set(!0),tinymce.Env.ie&&tinymce.Env.ie<10&&(a.preventDefault(),d.fire("paste",{})))});var g=a(function(){var a=d.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");d.notificationManager.open({text:a,type:"info"})}),h=function(){var a=this,b=!e.get();a.active(b),e.set(b),d.fire("PastePlainTextToggle",{state:b}),b===!0&&0!=d.settings.paste_plaintext_inform&&g(),d.focus()},i=function(){f.set(!1)},j=function(){return f.get()||e.get()};return{toggle:h,reset:i,isText:j}}}),g("10",[],function(){var a=0,b=1,c=-1,d=function(a){return parseInt(a,10)},e=function(a){return function(){return a}},f=function(a,b,c){return{major:e(a),minor:e(b),patch:e(c)}},g=function(a){var b=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(a);return b?f(d(b[1]),d(b[2]),d(b[3])):f(0,0,0)},h=function(d,e){var f=d-e;return 0===f?a:f>0?b:c},i=function(b,c){var d=h(b.major(),c.major());if(d!==a)return d;var e=h(b.minor(),c.minor());if(e!==a)return e;var f=h(b.patch(),c.patch());return f!==a?f:a};return{nu:f,parse:g,compare:i}}),g("9",["10"],function(a){var b=function(a){var b=[a.majorVersion,a.minorVersion].join(".");return b.split(".").slice(0,3).join(".")},c=function(c){return c?a.parse(b(c)):null},d=function(b,d){return a.compare(c(b),a.parse(d))<0};return{getVersion:c,isLessThan:d}}),g("a",["11"],function(a){var b=function(a,b){return function(){var c=a.console;c&&b in c&&c[b].apply(c,arguments)}};return{log:b(a,"log"),error:b(a,"error"),warn:b(a,"warm")}}),g("1",["3","4","5","6","7","8","9","a","2"],function(a,b,c,d,e,f,g,h,i){return function(j){return g.isLessThan(i,"4.0.0")?(h.error('The "powerpaste" plugin requires at least 4.0.0 version of TinyMCE.'),function(){}):function(g,h){var k=e(g),l=function(){var b=a(g);d(g,k,h,j,b),g.settings.powerpaste_block_drop||c(g,h,j,b)},m=function(){b(g,k,j)},n=function(){var a=this;a.active(k.isText()),g.on("PastePlainTextToggle",function(b){a.active(b.state)})};i.Env.ie&&i.Env.ie<10?m():l();var o=function(a){g.dom.bind(a,"drop dragstart dragend dragover dragenter dragleave dragdrop draggesture",function(a){return i.dom.Event.cancel(a)})};g.settings.powerpaste_block_drop&&g.on("init",function(a){o(g.getBody()),o(g.getDoc())}),f.registerEvents(g),g.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:k.toggle,onPostRender:n}),g.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,onclick:k.toggle,onPostRender:n})}}}),g("0",["1","2"],function(a,b){return function(c){b.PluginManager.requireLangPack("powerpaste","ar,ca,cs,da,de,el,es,fa,fi,fr_FR,he_IL,hr,hu_HU,it,ja,kk,ko_KR,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,zh_CN,zh_TW"),b.PluginManager.add("powerpaste",a(c))}}),d("0")()}(); diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/visualblocks/css/visualblocks.css b/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/visualblocks/css/visualblocks.css new file mode 100644 index 0000000..e8ba79b --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/plugins/visualblocks/css/visualblocks.css @@ -0,0 +1,154 @@ +.mce-visualblocks p { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); + background-repeat: no-repeat; +} + +.mce-visualblocks h1 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks h2 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks h3 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); + background-repeat: no-repeat; +} + +.mce-visualblocks h4 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks h5 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks h6 { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks div:not([data-mce-bogus]) { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); + background-repeat: no-repeat; +} + +.mce-visualblocks section { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); + background-repeat: no-repeat; +} + +.mce-visualblocks article { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); + background-repeat: no-repeat; +} + +.mce-visualblocks blockquote { + padding-top: 10px; + border: 1px dashed #bbb; + background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); + background-repeat: no-repeat; +} + +.mce-visualblocks address { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); + background-repeat: no-repeat; +} + +.mce-visualblocks pre { + padding-top: 10px; + border: 1px dashed #bbb; + margin-left: 3px; + background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks figure { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); + background-repeat: no-repeat; +} + +.mce-visualblocks hgroup { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); + background-repeat: no-repeat; +} + +.mce-visualblocks aside { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); + background-repeat: no-repeat; +} + +.mce-visualblocks figcaption { + border: 1px dashed #bbb; +} + +.mce-visualblocks ul { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks ol { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); + background-repeat: no-repeat; +} + +.mce-visualblocks dl { + padding-top: 10px; + border: 1px dashed #bbb; + margin: 0 0 1em 3px; + background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); + background-repeat: no-repeat; +} diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.inline.min.css b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.inline.min.css new file mode 100644 index 0000000..48d52db --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.inline.min.css @@ -0,0 +1,192 @@ +.word-wrap { + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} +.mce-content-body .mce-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + vertical-align: top; + background: transparent; + text-decoration: none; + color: black; + font-family: Arial; + font-size: 11px; + text-shadow: none; + float: none; + position: static; + width: auto; + height: auto; + white-space: nowrap; + cursor: inherit; + line-height: normal; + font-weight: normal; + text-align: left; + -webkit-tap-highlight-color: transparent; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; + direction: ltr; + max-width: none; +} +.mce-object { + border: 1px dotted #3a3a3a; + background: #d5d5d5 url(img/object.gif) no-repeat center; +} +.mce-preview-object { + display: inline-block; + position: relative; + margin: 0 2px 0 2px; + line-height: 0; + border: 1px solid gray; +} +.mce-preview-object[data-mce-selected="2"] .mce-shim { + display: none; +} +.mce-preview-object .mce-shim { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +figure.align-left { + float: left; +} +figure.align-right { + float: right; +} +figure.image.align-center { + display: table; + margin-left: auto; + margin-right: auto; +} +figure.image { + display: inline-block; + border: 1px solid gray; + margin: 0 2px 0 1px; + background: #f5f2f0; +} +figure.image img { + margin: 8px 8px 0 8px; +} +figure.image figcaption { + margin: 6px 8px 6px 8px; + text-align: center; +} +.mce-toc { + border: 1px solid gray; +} +.mce-toc h2 { + margin: 4px; +} +.mce-toc li { + list-style-type: none; +} +.mce-pagebreak { + cursor: default; + display: block; + border: 0; + width: 100%; + height: 5px; + border: 1px dashed #666; + margin-top: 15px; + page-break-before: always; +} +@media print { + .mce-pagebreak { + border: 0; + } +} +.mce-item-anchor { + cursor: default; + display: inline-block; + -webkit-user-select: all; + -webkit-user-modify: read-only; + -moz-user-select: all; + -moz-user-modify: read-only; + user-select: all; + user-modify: read-only; + width: 9px !important; + height: 9px !important; + border: 1px dotted #3a3a3a; + background: #d5d5d5 url(img/anchor.gif) no-repeat center; +} +.mce-nbsp, +.mce-shy { + background: #aaa; +} +.mce-shy::after { + content: "-"; +} +.mce-match-marker { + background: #aaa; + color: #fff; +} +.mce-match-marker-selected { + background: #3399ff; + color: #fff; +} +.mce-spellchecker-word { + border-bottom: 2px solid rgba(208, 2, 27, 0.5); + cursor: default; +} +.mce-spellchecker-grammar { + border-bottom: 2px solid #008000; + cursor: default; +} +.mce-item-table, +.mce-item-table td, +.mce-item-table th, +.mce-item-table caption { + border: 1px dashed #bbb; +} +td[data-mce-selected], +th[data-mce-selected] { + background-color: #2276d2 !important; +} +.mce-edit-focus { + outline: 1px dotted #333; +} +.mce-content-body *[contentEditable="false"] *[contentEditable="true"]:focus { + outline: 2px solid #2276d2; +} +.mce-content-body *[contentEditable="false"] *[contentEditable="true"]:hover { + outline: 2px solid #2276d2; +} +.mce-content-body *[contentEditable="false"][data-mce-selected] { + outline: 2px solid #2276d2; +} +.mce-content-body *[data-mce-selected="inline-boundary"] { + background: #bfe6ff; +} +.mce-content-body .mce-item-anchor[data-mce-selected] { + background: #d5d5d5 url(img/anchor.gif) no-repeat center; +} +.mce-content-body hr { + cursor: default; +} +.ephox-snooker-resizer-bar { + background-color: #2276d2; + opacity: 0; +} +.ephox-snooker-resizer-cols { + cursor: col-resize; +} +.ephox-snooker-resizer-rows { + cursor: row-resize; +} +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { + opacity: 0.2; +} +.mce-content-body { + line-height: 1.3; +} diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.min.css b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.min.css new file mode 100644 index 0000000..dfdd72a --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/content.min.css @@ -0,0 +1,215 @@ +body { + background-color: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14px; + line-height: 1.3; + scrollbar-3dlight-color: #f0f0ee; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #f0f0ee; + scrollbar-darkshadow-color: #dddddd; + scrollbar-face-color: #e0e0dd; + scrollbar-highlight-color: #f0f0ee; + scrollbar-shadow-color: #f0f0ee; + scrollbar-track-color: #f5f5f5; +} +img, video { + max-width: 100%; +} +td, +th { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 14px; +} +.word-wrap { + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} +.mce-content-body .mce-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + vertical-align: top; + background: transparent; + text-decoration: none; + color: black; + font-family: Arial; + font-size: 11px; + text-shadow: none; + float: none; + position: static; + width: auto; + height: auto; + white-space: nowrap; + cursor: inherit; + line-height: normal; + font-weight: normal; + text-align: left; + -webkit-tap-highlight-color: transparent; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; + direction: ltr; + max-width: none; +} +.mce-object { + border: 1px dotted #3a3a3a; + background: #d5d5d5 url(img/object.gif) no-repeat center; +} +.mce-preview-object { + display: inline-block; + position: relative; + margin: 0 2px 0 2px; + line-height: 0; + border: 1px solid gray; +} +.mce-preview-object[data-mce-selected="2"] .mce-shim { + display: none; +} +.mce-preview-object .mce-shim { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); +} +figure.align-left { + float: left; +} +figure.align-right { + float: right; +} +figure.image.align-center { + display: table; + margin-left: auto; + margin-right: auto; +} +figure.image { + display: inline-block; + border: 1px solid gray; + margin: 0 2px 0 1px; + background: #f5f2f0; +} +figure.image img { + margin: 8px 8px 0 8px; +} +figure.image figcaption { + margin: 6px 8px 6px 8px; + text-align: center; +} +.mce-toc { + border: 1px solid gray; +} +.mce-toc h2 { + margin: 4px; +} +.mce-toc li { + list-style-type: none; +} +.mce-pagebreak { + cursor: default; + display: block; + border: 0; + width: 100%; + height: 5px; + border: 1px dashed #666; + margin-top: 15px; + page-break-before: always; +} +@media print { + .mce-pagebreak { + border: 0; + } +} +.mce-item-anchor { + cursor: default; + display: inline-block; + -webkit-user-select: all; + -webkit-user-modify: read-only; + -moz-user-select: all; + -moz-user-modify: read-only; + user-select: all; + user-modify: read-only; + width: 9px !important; + height: 9px !important; + border: 1px dotted #3a3a3a; + background: #d5d5d5 url(img/anchor.gif) no-repeat center; +} +.mce-nbsp, +.mce-shy { + background: #aaa; +} +.mce-shy::after { + content: "-"; +} +.mce-match-marker { + background: #aaa; + color: #fff; +} +.mce-match-marker-selected { + background: #3399ff; + color: #fff; +} +.mce-spellchecker-word { + border-bottom: 2px solid rgba(208, 2, 27, 0.5); + cursor: default; +} +.mce-spellchecker-grammar { + border-bottom: 2px solid #008000; + cursor: default; +} +.mce-item-table, +.mce-item-table td, +.mce-item-table th, +.mce-item-table caption { + border: 1px dashed #bbb; +} +td[data-mce-selected], +th[data-mce-selected] { + background-color: #2276d2 !important; +} +.mce-edit-focus { + outline: 1px dotted #333; +} +.mce-content-body *[contentEditable="false"] *[contentEditable="true"]:focus { + outline: 2px solid #2276d2; +} +.mce-content-body *[contentEditable="false"] *[contentEditable="true"]:hover { + outline: 2px solid #2276d2; +} +.mce-content-body *[contentEditable="false"][data-mce-selected] { + outline: 2px solid #2276d2; +} +.mce-content-body *[data-mce-selected="inline-boundary"] { + background: #bfe6ff; +} +.mce-content-body .mce-item-anchor[data-mce-selected] { + background: #d5d5d5 url(img/anchor.gif) no-repeat center; +} +.mce-content-body hr { + cursor: default; +} +.ephox-snooker-resizer-bar { + background-color: #2276d2; + opacity: 0; +} +.ephox-snooker-resizer-cols { + cursor: col-resize; +} +.ephox-snooker-resizer-rows { + cursor: row-resize; +} +.ephox-snooker-resizer-bar.ephox-snooker-resizer-bar-dragging { + opacity: 0.2; +} +a { + color: #1478f0; +} diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff new file mode 100644 index 0000000..1e3be03 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-mobile.woff differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot new file mode 100644 index 0000000..b144ba0 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.eot differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.svg b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.svg new file mode 100644 index 0000000..b4ee6f4 --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.svg @@ -0,0 +1,63 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf new file mode 100644 index 0000000..a983e2d Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.ttf differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff new file mode 100644 index 0000000..d8962df Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce-small.woff differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot new file mode 100644 index 0000000..5336c38 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.eot differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.svg b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.svg new file mode 100644 index 0000000..9fa215f --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.svg @@ -0,0 +1,131 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf new file mode 100644 index 0000000..61a48a5 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.ttf differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff new file mode 100644 index 0000000..aace5d9 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/fonts/tinymce.woff differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/anchor.gif b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/anchor.gif new file mode 100644 index 0000000..606348c Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/anchor.gif differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/loader.gif b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/loader.gif new file mode 100644 index 0000000..c69e937 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/loader.gif differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/object.gif b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/object.gif new file mode 100644 index 0000000..cccd7f0 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/object.gif differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/trans.gif b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/trans.gif new file mode 100644 index 0000000..3884865 Binary files /dev/null and b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/img/trans.gif differ diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css new file mode 100644 index 0000000..d929ff0 --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css @@ -0,0 +1,2632 @@ +.mce-container, +.mce-container *, +.mce-widget, +.mce-widget *, +.mce-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + vertical-align: top; + background: transparent; + text-decoration: none; + color: #595959; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + text-shadow: none; + float: none; + position: static; + width: auto; + height: auto; + white-space: nowrap; + cursor: inherit; + -webkit-tap-highlight-color: transparent; + line-height: normal; + font-weight: normal; + text-align: left; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; + direction: ltr; + max-width: none; +} +.mce-widget button { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} +.mce-container *[unselectable] { + -moz-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; +} +.word-wrap { + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} +.mce-fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.mce-fade.mce-in { + opacity: 1; +} +.mce-tinymce { + visibility: inherit !important; + position: relative; +} +.mce-fullscreen { + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + height: 100%; + z-index: 100; +} +div.mce-fullscreen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: auto; +} +.mce-tinymce { + display: block; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); +} +.mce-statusbar > .mce-container-body { + display: flex; + padding-right: 16px; +} +.mce-statusbar > .mce-container-body .mce-path { + flex: 1; +} +.mce-wordcount { + font-size: inherit; + text-transform: uppercase; + padding: 8px 0; +} +div.mce-edit-area { + background: #fff; + filter: none; +} +.mce-statusbar { + position: relative; +} +.mce-statusbar .mce-container-body { + position: relative; + font-size: 11px; +} +.mce-fullscreen .mce-resizehandle { + display: none; +} +.mce-statusbar .mce-flow-layout-item { + margin: 0; +} +.mce-charmap { + border-collapse: collapse; +} +.mce-charmap td { + cursor: default; + border: 1px solid #c5c5c5; + width: 20px; + height: 20px; + line-height: 20px; + text-align: center; + vertical-align: middle; + padding: 2px; +} +.mce-charmap td div { + text-align: center; +} +.mce-charmap td:hover { + background: white; +} +.mce-grid td.mce-grid-cell div { + border: 1px solid #c5c5c5; + width: 15px; + height: 15px; + margin: 0; + cursor: pointer; +} +.mce-grid td.mce-grid-cell div:focus { + border-color: #91bbe9; +} +.mce-grid td.mce-grid-cell div[disabled] { + cursor: not-allowed; +} +.mce-grid { + border-spacing: 2px; + border-collapse: separate; +} +.mce-grid a { + display: block; + border: 1px solid transparent; +} +.mce-grid a:hover, +.mce-grid a:focus { + border-color: #91bbe9; +} +.mce-grid-border { + margin: 0 4px 0 4px; +} +.mce-grid-border a { + border-color: #c5c5c5; + width: 13px; + height: 13px; +} +.mce-grid-border a:hover, +.mce-grid-border a.mce-active { + border-color: #91bbe9; + background: #bdd6f2; +} +.mce-text-center { + text-align: center; +} +div.mce-tinymce-inline { + width: 100%; +} +.mce-colorbtn-trans div { + text-align: center; + vertical-align: middle; + font-weight: bold; + font-size: 20px; + line-height: 16px; + color: #8b8b8b; +} +.mce-monospace { + font-family: "Courier New", Courier, monospace; +} +.mce-toolbar-grp .mce-flow-layout-item { + margin-bottom: 0; +} +.mce-container b { + font-weight: bold; +} +.mce-container p { + margin-bottom: 5px; +} +.mce-container a { + cursor: pointer; + color: #2276d2; +} +.mce-container a:hover { + text-decoration: underline; +} +.mce-container ul { + margin-left: 15px; +} +.mce-container .mce-table-striped { + border-collapse: collapse; + margin: 10px; +} +.mce-container .mce-table-striped thead > tr { + background-color: #fafafa; +} +.mce-container .mce-table-striped thead > tr th { + font-weight: bold; +} +.mce-container .mce-table-striped td, +.mce-container .mce-table-striped th { + padding: 5px; +} +.mce-container .mce-table-striped tr:nth-child(even) { + background-color: #fafafa; +} +.mce-container .mce-table-striped tbody > tr:hover { + background-color: #e1e1e1; +} +.mce-branding { + font-size: inherit; + text-transform: uppercase; + white-space: pre; + padding: 8px 0; +} +.mce-branding a { + font-size: inherit; + color: inherit; +} +.mce-top-part { + position: relative; +} +.mce-top-part::before { + content: ""; + position: absolute; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + top: 0; + right: 0; + bottom: 0; + left: 0; + pointer-events: none; +} +.mce-rtl .mce-wordcount { + left: 0; + right: auto; +} +.mce-rtl .mce-statusbar > .mce-container-body > *:last-child { + padding-right: 0; + padding-left: 10px; +} +.mce-rtl .mce-path { + text-align: right; + padding-right: 16px; +} +.mce-croprect-container { + position: absolute; + top: 0; + left: 0; +} +.mce-croprect-handle { + position: absolute; + top: 0; + left: 0; + width: 20px; + height: 20px; + border: 2px solid white; +} +.mce-croprect-handle-nw { + border-width: 2px 0 0 2px; + margin: -2px 0 0 -2px; + cursor: nw-resize; + top: 100px; + left: 100px; +} +.mce-croprect-handle-ne { + border-width: 2px 2px 0 0; + margin: -2px 0 0 -20px; + cursor: ne-resize; + top: 100px; + left: 200px; +} +.mce-croprect-handle-sw { + border-width: 0 0 2px 2px; + margin: -20px 2px 0 -2px; + cursor: sw-resize; + top: 200px; + left: 100px; +} +.mce-croprect-handle-se { + border-width: 0 2px 2px 0; + margin: -20px 0 0 -20px; + cursor: se-resize; + top: 200px; + left: 200px; +} +.mce-croprect-handle-move { + position: absolute; + cursor: move; + border: 0; +} +.mce-croprect-block { + opacity: 0.5; + filter: alpha(opacity=50); + zoom: 1; + position: absolute; + background: black; +} +.mce-croprect-handle:focus { + border-color: #2276d2; +} +.mce-croprect-handle-move:focus { + outline: 1px solid #2276d2; +} +.mce-imagepanel { + overflow: auto; + background: black; +} +.mce-imagepanel-bg { + position: absolute; + background: url("data:image/gif;base64,R0lGODdhDAAMAIABAMzMzP///ywAAAAADAAMAAACFoQfqYeabNyDMkBQb81Uat85nxguUAEAOw=="); +} +.mce-imagepanel img { + position: absolute; +} +.mce-imagetool.mce-btn .mce-ico { + display: block; + width: 20px; + height: 20px; + text-align: center; + line-height: 20px; + font-size: 20px; + padding: 5px; +} +.mce-arrow-up { + margin-top: 12px; +} +.mce-arrow-down { + margin-top: -12px; +} +.mce-arrow:before, +.mce-arrow:after { + position: absolute; + left: 50%; + display: block; + width: 0; + height: 0; + border-style: solid; + border-color: transparent; + content: ""; +} +.mce-arrow.mce-arrow-up:before { + top: -9px; + border-bottom-color: #c5c5c5; + border-width: 0 9px 9px; + margin-left: -9px; +} +.mce-arrow.mce-arrow-down:before { + bottom: -9px; + border-top-color: #c5c5c5; + border-width: 9px 9px 0; + margin-left: -9px; +} +.mce-arrow.mce-arrow-up:after { + top: -8px; + border-bottom-color: #fff; + border-width: 0 8px 8px; + margin-left: -8px; +} +.mce-arrow.mce-arrow-down:after { + bottom: -8px; + border-top-color: #fff; + border-width: 8px 8px 0; + margin-left: -8px; +} +.mce-arrow.mce-arrow-left:before, +.mce-arrow.mce-arrow-left:after { + margin: 0; +} +.mce-arrow.mce-arrow-left:before { + left: 8px; +} +.mce-arrow.mce-arrow-left:after { + left: 9px; +} +.mce-arrow.mce-arrow-right:before, +.mce-arrow.mce-arrow-right:after { + left: auto; + margin: 0; +} +.mce-arrow.mce-arrow-right:before { + right: 8px; +} +.mce-arrow.mce-arrow-right:after { + right: 9px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before { + left: -9px; + top: 50%; + border-right-color: #c5c5c5; + border-width: 9px 9px 9px 0; + margin-top: -9px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after { + left: -8px; + top: 50%; + border-right-color: #fff; + border-width: 8px 8px 8px 0; + margin-top: -8px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left { + margin-left: 12px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before { + right: -9px; + top: 50%; + border-left-color: #c5c5c5; + border-width: 9px 0 9px 9px; + margin-top: -9px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after { + right: -8px; + top: 50%; + border-left-color: #fff; + border-width: 8px 0 8px 8px; + margin-top: -8px; +} +.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right { + margin-left: -14px; +} +.mce-edit-aria-container > .mce-container-body { + display: flex; +} +.mce-edit-aria-container > .mce-container-body .mce-edit-area { + flex: 1; +} +.mce-edit-aria-container + > .mce-container-body + .mce-sidebar + > .mce-container-body { + display: flex; + align-items: stretch; + height: 100%; +} +.mce-edit-aria-container > .mce-container-body .mce-sidebar-panel { + min-width: 250px; + max-width: 250px; + position: relative; +} +.mce-edit-aria-container + > .mce-container-body + .mce-sidebar-panel + > .mce-container-body { + position: absolute; + width: 100%; + height: 100%; + overflow: auto; + top: 0; + left: 0; +} +.mce-sidebar-toolbar { + border: 0 solid #c5c5c5; + border-left-width: 1px; +} +.mce-sidebar-toolbar .mce-btn { + border-left: 0; + border-right: 0; +} +.mce-sidebar-toolbar .mce-btn.mce-active, +.mce-sidebar-toolbar .mce-btn.mce-active:hover { + background-color: #555c66; +} +.mce-sidebar-toolbar .mce-btn.mce-active button, +.mce-sidebar-toolbar .mce-btn.mce-active:hover button, +.mce-sidebar-toolbar .mce-btn.mce-active button i, +.mce-sidebar-toolbar .mce-btn.mce-active:hover button i { + color: white; + text-shadow: 1px 1px none; +} +.mce-sidebar-panel { + border: 0 solid #c5c5c5; + border-left-width: 1px; +} +.mce-container, +.mce-container-body { + display: block; +} +.mce-autoscroll { + overflow: hidden; +} +.mce-scrollbar { + position: absolute; + width: 7px; + height: 100%; + top: 2px; + right: 2px; + opacity: 0.4; + filter: alpha(opacity=40); + zoom: 1; +} +.mce-scrollbar-h { + top: auto; + right: auto; + left: 2px; + bottom: 2px; + width: 100%; + height: 7px; +} +.mce-scrollbar-thumb { + position: absolute; + background-color: #000; + border: 1px solid #888; + border-color: rgba(85, 85, 85, 0.6); + width: 5px; + height: 100%; +} +.mce-scrollbar-h .mce-scrollbar-thumb { + width: 100%; + height: 5px; +} +.mce-scrollbar:hover, +.mce-scrollbar.mce-active { + background-color: #aaa; + opacity: 0.6; + filter: alpha(opacity=60); + zoom: 1; +} +.mce-scroll { + position: relative; +} +.mce-panel { + border: 0 solid #f3f3f3; + border: 0 solid #c5c5c5; + background-color: #fff; +} +.mce-floatpanel { + position: absolute; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); +} +.mce-floatpanel.mce-fixed { + position: fixed; +} +.mce-floatpanel .mce-arrow, +.mce-floatpanel .mce-arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.mce-floatpanel .mce-arrow { + border-width: 11px; +} +.mce-floatpanel .mce-arrow:after { + border-width: 10px; + content: ""; +} +.mce-floatpanel.mce-popover { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background: transparent; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + top: 0; + left: 0; + background: #fff; + border: 1px solid #c5c5c5; + border: 1px solid rgba(0, 0, 0, 0.25); +} +.mce-floatpanel.mce-popover.mce-bottom { + margin-top: 10px; + *margin-top: 0; +} +.mce-floatpanel.mce-popover.mce-bottom > .mce-arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #c5c5c5; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.mce-floatpanel.mce-popover.mce-bottom > .mce-arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #fff; +} +.mce-floatpanel.mce-popover.mce-bottom.mce-start { + margin-left: -22px; +} +.mce-floatpanel.mce-popover.mce-bottom.mce-start > .mce-arrow { + left: 20px; +} +.mce-floatpanel.mce-popover.mce-bottom.mce-end { + margin-left: 22px; +} +.mce-floatpanel.mce-popover.mce-bottom.mce-end > .mce-arrow { + right: 10px; + left: auto; +} +.mce-fullscreen { + border: 0; + padding: 0; + margin: 0; + overflow: hidden; + height: 100%; +} +div.mce-fullscreen { + position: fixed; + top: 0; + left: 0; +} +#mce-modal-block { + opacity: 0; + filter: alpha(opacity=0); + zoom: 1; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background: #fff; +} +#mce-modal-block.mce-in { + opacity: 0.5; + filter: alpha(opacity=50); + zoom: 1; +} +.mce-window-move { + cursor: move; +} +.mce-window { + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background: transparent; + background: #fff; + position: fixed; + top: 0; + left: 0; + opacity: 0; + transform: scale(0.1); + transition: transform 100ms ease-in, opacity 150ms ease-in; +} +.mce-window.mce-in { + transform: scale(1); + opacity: 1; +} +.mce-window-head { + padding: 9px 15px; + border-bottom: 1px solid #c5c5c5; + position: relative; +} +.mce-window-head .mce-close { + position: absolute; + right: 0; + top: 0; + height: 38px; + width: 38px; + text-align: center; + cursor: pointer; +} +.mce-window-head .mce-close i { + color: #9b9b9b; +} +.mce-close:hover i { + color: #bdbdbd; +} +.mce-window-head .mce-title { + line-height: 20px; + font-size: 20px; + font-weight: bold; + text-rendering: optimizelegibility; + padding-right: 20px; +} +.mce-window .mce-container-body { + display: block; +} +.mce-foot { + display: block; + background-color: #fff; + border-top: 1px solid #c5c5c5; +} +.mce-window-head .mce-dragh { + position: absolute; + top: 0; + left: 0; + cursor: move; + width: 90%; + height: 100%; +} +.mce-window iframe { + width: 100%; + height: 100%; +} +.mce-window-body .mce-listbox { + border-color: #e2e4e7; +} +.mce-window .mce-btn:hover { + border-color: #c5c5c5; +} +.mce-window .mce-btn:focus { + border-color: #2276d2; +} +.mce-window-body .mce-btn, +.mce-foot .mce-btn { + border-color: #c5c5c5; +} +.mce-foot .mce-btn.mce-primary { + border-color: transparent; +} +.mce-rtl .mce-window-head .mce-close { + position: absolute; + right: auto; + left: 15px; +} +.mce-rtl .mce-window-head .mce-dragh { + left: auto; + right: 0; +} +.mce-rtl .mce-window-head .mce-title { + direction: rtl; + text-align: right; +} +.mce-tooltip { + position: absolute; + padding: 5px; + opacity: 0.8; + filter: alpha(opacity=80); + zoom: 1; + margin-top: 1px; +} +.mce-tooltip-inner { + font-size: 11px; + background-color: #000; + color: white; + max-width: 200px; + padding: 5px 8px 4px 8px; + text-align: center; + white-space: normal; +} +.mce-tooltip-inner { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-tooltip-arrow { + position: absolute; + width: 0; + height: 0; + line-height: 0; + border: 5px dashed #000; +} +.mce-tooltip-arrow-n { + border-bottom-color: #000; +} +.mce-tooltip-arrow-s { + border-top-color: #000; +} +.mce-tooltip-arrow-e { + border-left-color: #000; +} +.mce-tooltip-arrow-w { + border-right-color: #000; +} +.mce-tooltip-nw, +.mce-tooltip-sw { + margin-left: -14px; +} +.mce-tooltip-ne, +.mce-tooltip-se { + margin-left: 14px; +} +.mce-tooltip-n .mce-tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-nw .mce-tooltip-arrow { + top: 0; + left: 10px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-ne .mce-tooltip-arrow { + top: 0; + right: 10px; + border-bottom-style: solid; + border-top: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-s .mce-tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-sw .mce-tooltip-arrow { + bottom: 0; + left: 10px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-se .mce-tooltip-arrow { + bottom: 0; + right: 10px; + border-top-style: solid; + border-bottom: none; + border-left-color: transparent; + border-right-color: transparent; +} +.mce-tooltip-e .mce-tooltip-arrow { + right: 0; + top: 50%; + margin-top: -5px; + border-left-style: solid; + border-right: none; + border-top-color: transparent; + border-bottom-color: transparent; +} +.mce-tooltip-w .mce-tooltip-arrow { + left: 0; + top: 50%; + margin-top: -5px; + border-right-style: solid; + border-left: none; + border-top-color: transparent; + border-bottom-color: transparent; +} +.mce-progress { + display: inline-block; + position: relative; + height: 20px; +} +.mce-progress .mce-bar-container { + display: inline-block; + width: 100px; + height: 100%; + margin-right: 8px; + border: 1px solid #ccc; + overflow: hidden; +} +.mce-progress .mce-text { + display: inline-block; + margin-top: auto; + margin-bottom: auto; + font-size: 14px; + width: 40px; + color: #595959; +} +.mce-bar { + display: block; + width: 0; + height: 100%; + background-color: #dfdfdf; + -webkit-transition: width 0.2s ease; + transition: width 0.2s ease; +} +.mce-notification { + position: absolute; + background-color: #fff; + padding: 5px; + margin-top: 5px; + border-width: 1px; + border-style: solid; + border-color: #c5c5c5; + transition: transform 100ms ease-in, opacity 150ms ease-in; + opacity: 0; + box-sizing: border-box; +} +.mce-notification.mce-in { + opacity: 1; +} +.mce-notification-success { + background-color: #dff0d8; + border-color: #d6e9c6; +} +.mce-notification-info { + background-color: #d9edf7; + border-color: #779ecb; +} +.mce-notification-warning { + background-color: #fcf8e3; + border-color: #faebcc; +} +.mce-notification-error { + background-color: #f2dede; + border-color: #ebccd1; +} +.mce-notification.mce-has-close { + padding-right: 15px; +} +.mce-notification .mce-ico { + margin-top: 5px; +} +.mce-notification-inner { + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; + display: inline-block; + font-size: 14px; + margin: 5px 8px 4px 8px; + text-align: center; + white-space: normal; + color: #31708f; +} +.mce-notification-inner a { + text-decoration: underline; + cursor: pointer; +} +.mce-notification .mce-progress { + margin-right: 8px; +} +.mce-notification .mce-progress .mce-text { + margin-top: 5px; +} +.mce-notification *, +.mce-notification .mce-progress .mce-text { + color: #595959; +} +.mce-notification .mce-progress .mce-bar-container { + border-color: #c5c5c5; +} +.mce-notification .mce-progress .mce-bar-container .mce-bar { + background-color: #595959; +} +.mce-notification-success *, +.mce-notification-success .mce-progress .mce-text { + color: #3c763d; +} +.mce-notification-success .mce-progress .mce-bar-container { + border-color: #d6e9c6; +} +.mce-notification-success .mce-progress .mce-bar-container .mce-bar { + background-color: #3c763d; +} +.mce-notification-info *, +.mce-notification-info .mce-progress .mce-text { + color: #31708f; +} +.mce-notification-info .mce-progress .mce-bar-container { + border-color: #779ecb; +} +.mce-notification-info .mce-progress .mce-bar-container .mce-bar { + background-color: #31708f; +} +.mce-notification-warning *, +.mce-notification-warning .mce-progress .mce-text { + color: #8a6d3b; +} +.mce-notification-warning .mce-progress .mce-bar-container { + border-color: #faebcc; +} +.mce-notification-warning .mce-progress .mce-bar-container .mce-bar { + background-color: #8a6d3b; +} +.mce-notification-error *, +.mce-notification-error .mce-progress .mce-text { + color: #a94442; +} +.mce-notification-error .mce-progress .mce-bar-container { + border-color: #ebccd1; +} +.mce-notification-error .mce-progress .mce-bar-container .mce-bar { + background-color: #a94442; +} +.mce-notification .mce-close { + position: absolute; + top: 6px; + right: 8px; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #9b9b9b; + cursor: pointer; +} +.mce-abs-layout { + position: relative; +} +body .mce-abs-layout-item, +.mce-abs-end { + position: absolute; +} +.mce-abs-end { + width: 1px; + height: 1px; +} +.mce-container-body.mce-abs-layout { + overflow: hidden; +} +.mce-btn { + border: 1px solid #b3b3b3; + border-color: transparent transparent transparent transparent; + position: relative; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background: white; + display: inline-block; + *display: inline; + *zoom: 1; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-btn:hover, +.mce-btn:active { + background: white; + color: #595959; + border-color: #e2e4e7; +} +.mce-btn:focus { + background: white; + color: #595959; + border-color: #e2e4e7; +} +.mce-btn.mce-disabled button, +.mce-btn.mce-disabled:hover button { + cursor: default; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.4; + filter: alpha(opacity=40); + zoom: 1; +} +.mce-btn.mce-active, +.mce-btn.mce-active:hover, +.mce-btn.mce-active:focus, +.mce-btn.mce-active:active { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + background: #555c66; + color: white; + border-color: transparent; +} +.mce-btn.mce-active button, +.mce-btn.mce-active:hover button, +.mce-btn.mce-active i, +.mce-btn.mce-active:hover i { + color: white; +} +.mce-btn:hover .mce-caret { + border-top-color: #b5bcc2; +} +.mce-btn.mce-active .mce-caret, +.mce-btn.mce-active:hover .mce-caret { + border-top-color: white; +} +.mce-btn button { + padding: 4px 6px; + font-size: 14px; + line-height: 20px; + *line-height: 16px; + cursor: pointer; + color: #595959; + text-align: center; + overflow: visible; + -webkit-appearance: none; +} +.mce-btn button::-moz-focus-inner { + border: 0; + padding: 0; +} +.mce-btn i { + text-shadow: 1px 1px none; +} +.mce-primary.mce-btn-has-text { + min-width: 50px; +} +.mce-primary { + color: white; + border: 1px solid transparent; + border-color: transparent; + background-color: #2276d2; +} +.mce-primary:hover, +.mce-primary:focus { + background-color: #1e6abc; + border-color: transparent; +} +.mce-primary.mce-disabled button, +.mce-primary.mce-disabled:hover button { + cursor: default; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.4; + filter: alpha(opacity=40); + zoom: 1; +} +.mce-primary.mce-active, +.mce-primary.mce-active:hover, +.mce-primary:not(.mce-disabled):active { + background-color: #1e6abc; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-primary button, +.mce-primary button i { + color: white; + text-shadow: 1px 1px none; +} +.mce-btn .mce-txt { + font-size: inherit; + line-height: inherit; + color: inherit; +} +.mce-btn-large button { + padding: 9px 14px; + font-size: 16px; + line-height: normal; +} +.mce-btn-large i { + margin-top: 2px; +} +.mce-btn-small button { + padding: 1px 5px; + font-size: 12px; + *padding-bottom: 2px; +} +.mce-btn-small i { + line-height: 20px; + vertical-align: top; + *line-height: 18px; +} +.mce-btn .mce-caret { + margin-top: 8px; + margin-left: 0; +} +.mce-btn-small .mce-caret { + margin-top: 8px; + margin-left: 0; +} +.mce-caret { + display: inline-block; + *display: inline; + *zoom: 1; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #b5bcc2; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.mce-disabled .mce-caret { + border-top-color: #aaa; +} +.mce-caret.mce-up { + border-bottom: 4px solid #b5bcc2; + border-top: 0; +} +.mce-btn-flat { + border: 0; + background: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + filter: none; +} +.mce-btn-flat:hover, +.mce-btn-flat.mce-active, +.mce-btn-flat:focus, +.mce-btn-flat:active { + border: 0; + background: #e6e6e6; + filter: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-btn-has-text .mce-ico { + padding-right: 5px; +} +.mce-rtl .mce-btn button { + direction: rtl; +} +.mce-toolbar .mce-btn-group { + margin: 0; + padding: 2px 0; +} +.mce-btn-group .mce-btn { + border-width: 1px; + margin: 0; + margin-left: 2px; +} +.mce-btn-group:not(:first-child) { + border-left: 1px solid #d9d9d9; + padding-left: 0; + margin-left: 2px; +} +.mce-btn-group { + margin-left: 2px; +} +.mce-btn-group .mce-btn.mce-flow-layout-item { + margin: 0; +} +.mce-rtl .mce-btn-group .mce-btn { + margin-left: 0; + margin-right: 2px; +} +.mce-rtl .mce-btn-group .mce-first { + margin-right: 0; +} +.mce-rtl .mce-btn-group:not(:first-child) { + border-left: none; + border-right: 1px solid #d9d9d9; + padding-right: 4px; + margin-right: 4px; +} +.mce-checkbox { + cursor: pointer; +} +i.mce-i-checkbox { + margin: 0 3px 0 0; + border: 1px solid #c5c5c5; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + background-color: white; + text-indent: -10em; + overflow: hidden; +} +.mce-checked i.mce-i-checkbox { + color: #595959; + font-size: 16px; + line-height: 16px; + text-indent: 0; +} +.mce-checkbox:focus i.mce-i-checkbox, +.mce-checkbox.mce-focus i.mce-i-checkbox { + border: 1px solid #2276d2; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-checkbox.mce-disabled .mce-label, +.mce-checkbox.mce-disabled i.mce-i-checkbox { + color: #bdbdbd; +} +.mce-checkbox .mce-label { + vertical-align: middle; +} +.mce-rtl .mce-checkbox { + direction: rtl; + text-align: right; +} +.mce-rtl i.mce-i-checkbox { + margin: 0 0 0 3px; +} +.mce-combobox { + position: relative; + display: inline-block; + *display: inline; + *zoom: 1; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + *height: 32px; +} +.mce-combobox input { + border: 1px solid #c5c5c5; + border-right-color: #c5c5c5; + height: 28px; +} +.mce-combobox.mce-disabled input { + color: #bdbdbd; +} +.mce-combobox .mce-btn { + border: 1px solid #c5c5c5; + border-left: 0; + margin: 0; +} +.mce-combobox button { + padding-right: 8px; + padding-left: 8px; +} +.mce-combobox.mce-disabled .mce-btn button { + cursor: default; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.4; + filter: alpha(opacity=40); + zoom: 1; +} +.mce-combobox .mce-status { + position: absolute; + right: 2px; + top: 50%; + line-height: 16px; + margin-top: -8px; + font-size: 12px; + width: 15px; + height: 15px; + text-align: center; + cursor: pointer; +} +.mce-combobox.mce-has-status input { + padding-right: 20px; +} +.mce-combobox.mce-has-open .mce-status { + right: 37px; +} +.mce-combobox .mce-status.mce-i-warning { + color: #c09853; +} +.mce-combobox .mce-status.mce-i-checkmark { + color: #468847; +} +.mce-menu.mce-combobox-menu { + border-top: 0; + margin-top: 0; + max-height: 200px; +} +.mce-menu.mce-combobox-menu .mce-menu-item { + padding: 4px 6px 4px 4px; + font-size: 11px; +} +.mce-menu.mce-combobox-menu .mce-menu-item-sep { + padding: 0; +} +.mce-menu.mce-combobox-menu .mce-text { + font-size: 11px; +} +.mce-menu.mce-combobox-menu .mce-menu-item-link, +.mce-menu.mce-combobox-menu .mce-menu-item-link b { + font-size: 11px; +} +.mce-menu.mce-combobox-menu .mce-text b { + font-size: 11px; +} +.mce-colorbox i { + border: 1px solid #c5c5c5; + width: 14px; + height: 14px; +} +.mce-colorbutton .mce-ico { + position: relative; +} +.mce-colorbutton-grid { + margin: 4px; +} +.mce-colorbutton .mce-preview { + padding-right: 3px; + display: block; + position: absolute; + left: 50%; + top: 50%; + margin-left: -17px; + margin-top: 7px; + background: gray; + width: 13px; + height: 2px; + overflow: hidden; +} +.mce-colorbutton.mce-btn-small .mce-preview { + margin-left: -16px; + padding-right: 0; + width: 16px; +} +.mce-rtl .mce-colorbutton { + direction: rtl; +} +.mce-rtl .mce-colorbutton .mce-preview { + margin-left: 0; + padding-right: 0; + padding-left: 3px; +} +.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview { + margin-left: 0; + padding-right: 0; + padding-left: 2px; +} +.mce-rtl .mce-colorbutton .mce-open { + padding-left: 4px; + padding-right: 4px; + border-left: 0; +} +.mce-colorpicker { + position: relative; + width: 250px; + height: 220px; +} +.mce-colorpicker-sv { + position: absolute; + top: 0; + left: 0; + width: 90%; + height: 100%; + border: 1px solid #c5c5c5; + cursor: crosshair; + overflow: hidden; +} +.mce-colorpicker-h-chunk { + width: 100%; +} +.mce-colorpicker-overlay1, +.mce-colorpicker-overlay2 { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; +} +.mce-colorpicker-overlay1 { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff'); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')"; + background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); +} +.mce-colorpicker-overlay2 { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000'); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')"; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000); +} +.mce-colorpicker-selector1 { + background: none; + position: absolute; + width: 12px; + height: 12px; + margin: -8px 0 0 -8px; + border: 1px solid black; + border-radius: 50%; +} +.mce-colorpicker-selector2 { + position: absolute; + width: 10px; + height: 10px; + border: 1px solid white; + border-radius: 50%; +} +.mce-colorpicker-h { + position: absolute; + top: 0; + right: 0; + width: 6.5%; + height: 100%; + border: 1px solid #c5c5c5; + cursor: crosshair; +} +.mce-colorpicker-h-marker { + margin-top: -4px; + position: absolute; + top: 0; + left: -1px; + width: 100%; + border: 1px solid black; + background: white; + height: 4px; + z-index: 100; +} +.mce-path { + display: inline-block; + *display: inline; + *zoom: 1; + padding: 8px; + white-space: normal; + font-size: inherit; +} +.mce-path .mce-txt { + display: inline-block; + padding-right: 3px; +} +.mce-path .mce-path-body { + display: inline-block; +} +.mce-path-item { + display: inline-block; + *display: inline; + *zoom: 1; + cursor: pointer; + color: #595959; + font-size: inherit; + text-transform: uppercase; +} +.mce-path-item:hover { + text-decoration: underline; +} +.mce-path-item:focus { + background: #555c66; + color: white; +} +.mce-path .mce-divider { + display: inline; + font-size: inherit; +} +.mce-disabled .mce-path-item { + color: #aaa; +} +.mce-rtl .mce-path { + direction: rtl; +} +.mce-fieldset { + border: 0 solid #9e9e9e; +} +.mce-fieldset > .mce-container-body { + margin-top: -15px; +} +.mce-fieldset-title { + margin-left: 5px; + padding: 0 5px 0 5px; +} +.mce-fit-layout { + display: inline-block; + *display: inline; + *zoom: 1; +} +.mce-fit-layout-item { + position: absolute; +} +.mce-flow-layout-item { + display: inline-block; + *display: inline; + *zoom: 1; +} +.mce-flow-layout-item { + margin: 2px 0 2px 2px; +} +.mce-flow-layout-item.mce-last { + margin-right: 2px; +} +.mce-flow-layout { + white-space: normal; +} +.mce-tinymce-inline .mce-flow-layout { + white-space: nowrap; +} +.mce-rtl .mce-flow-layout { + text-align: right; + direction: rtl; +} +.mce-rtl .mce-flow-layout-item { + margin: 2px 2px 2px 0; +} +.mce-rtl .mce-flow-layout-item.mce-last { + margin-left: 2px; +} +.mce-iframe { + border: 0 solid #c5c5c5; + width: 100%; + height: 100%; +} +.mce-infobox { + display: inline-block; + *display: inline; + *zoom: 1; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + overflow: hidden; + border: 1px solid red; +} +.mce-infobox div { + display: block; + margin: 5px; +} +.mce-infobox div button { + position: absolute; + top: 50%; + right: 4px; + cursor: pointer; + margin-top: -8px; + display: none; +} +.mce-infobox div button:focus { + outline: 2px solid #e2e4e7; +} +.mce-infobox.mce-has-help div { + margin-right: 25px; +} +.mce-infobox.mce-has-help button { + display: block; +} +.mce-infobox.mce-success { + background: #dff0d8; + border-color: #d6e9c6; +} +.mce-infobox.mce-success div { + color: #3c763d; +} +.mce-infobox.mce-warning { + background: #fcf8e3; + border-color: #faebcc; +} +.mce-infobox.mce-warning div { + color: #8a6d3b; +} +.mce-infobox.mce-error { + background: #f2dede; + border-color: #ebccd1; +} +.mce-infobox.mce-error div { + color: #a94442; +} +.mce-rtl .mce-infobox div { + text-align: right; + direction: rtl; +} +.mce-label { + display: inline-block; + *display: inline; + *zoom: 1; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + overflow: hidden; +} +.mce-label.mce-autoscroll { + overflow: auto; +} +.mce-label.mce-disabled { + color: #aaa; +} +.mce-label.mce-multiline { + white-space: pre-wrap; +} +.mce-label.mce-success { + color: #468847; +} +.mce-label.mce-warning { + color: #c09853; +} +.mce-label.mce-error { + color: #b94a48; +} +.mce-rtl .mce-label { + text-align: right; + direction: rtl; +} +.mce-menubar { + border: 1px solid #e2e4e7; +} +.mce-menubar .mce-menubtn { + border-color: transparent; + background: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + filter: none; +} +.mce-menubar .mce-menubtn button span { + color: #595959; +} +.mce-menubar .mce-caret { + border-top-color: #b5bcc2; +} +.mce-menubar .mce-active .mce-caret, +.mce-menubar .mce-menubtn:hover .mce-caret { + border-top-color: #b5bcc2; +} +.mce-menubar .mce-menubtn:hover, +.mce-menubar .mce-menubtn.mce-active, +.mce-menubar .mce-menubtn:focus { + border-color: #e2e4e7; + background: white; + filter: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-menubar .mce-menubtn.mce-active { + border-bottom: none; + z-index: 65537; +} +div.mce-menubtn.mce-opened { + border-bottom-color: white; + z-index: 65537; +} +.mce-menubtn button { + color: #595959; +} +.mce-menubtn.mce-btn-small span { + font-size: 12px; +} +.mce-menubtn.mce-fixed-width span { + display: inline-block; + overflow-x: hidden; + text-overflow: ellipsis; + width: 90px; +} +.mce-menubtn.mce-fixed-width.mce-btn-small span { + width: 70px; +} +.mce-menubtn .mce-caret { + *margin-top: 6px; +} +.mce-rtl .mce-menubtn button { + direction: rtl; + text-align: right; +} +.mce-rtl .mce-menubtn.mce-fixed-width span { + direction: rtl; + text-align: right; +} +.mce-menu-item { + display: block; + padding: 6px 4px 6px 4px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #595959; + white-space: nowrap; + cursor: pointer; + line-height: normal; + border-left: 4px solid transparent; + margin-bottom: 1px; +} +.mce-menu-item .mce-caret { + margin-top: 4px; + margin-right: 6px; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px solid #595959; +} +.mce-menu-item .mce-menu-shortcut { + display: inline-block; + padding: 0 10px 0 20px; + color: #aaa; +} +.mce-menu-item .mce-ico { + padding-right: 4px; +} +.mce-menu-item:hover, +.mce-menu-item:focus { + background: #ededee; +} +.mce-menu-item:hover .mce-menu-shortcut, +.mce-menu-item:focus .mce-menu-shortcut { + color: #aaa; +} +.mce-menu-item:hover .mce-text, +.mce-menu-item:focus .mce-text, +.mce-menu-item:hover .mce-ico, +.mce-menu-item:focus .mce-ico { + color: #595959; +} +.mce-menu-item.mce-selected { + background: #ededee; +} +.mce-menu-item.mce-selected .mce-text, +.mce-menu-item.mce-selected .mce-ico { + color: #595959; +} +.mce-menu-item.mce-active.mce-menu-item-normal { + background: #555c66; +} +.mce-menu-item.mce-active.mce-menu-item-normal .mce-text, +.mce-menu-item.mce-active.mce-menu-item-normal .mce-ico { + color: white; +} +.mce-menu-item.mce-active.mce-menu-item-checkbox .mce-ico { + visibility: visible; +} +.mce-menu-item.mce-disabled, +.mce-menu-item.mce-disabled:hover { + background: white; +} +.mce-menu-item.mce-disabled:focus, +.mce-menu-item.mce-disabled:hover:focus { + background: #ededee; +} +.mce-menu-item.mce-disabled .mce-text, +.mce-menu-item.mce-disabled:hover .mce-text, +.mce-menu-item.mce-disabled .mce-ico, +.mce-menu-item.mce-disabled:hover .mce-ico { + color: #aaa; +} +.mce-menu-item.mce-menu-item-preview.mce-active { + border-left: 5px solid #555c66; + background: white; +} +.mce-menu-item.mce-menu-item-preview.mce-active .mce-text, +.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico { + color: #595959; +} +.mce-menu-item.mce-menu-item-preview.mce-active:hover { + background: #ededee; +} +.mce-menu-item-link { + color: #093; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.mce-menu-item-link b { + color: #093; +} +.mce-menu-item-ellipsis { + display: block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} +.mce-menu-item:hover *, +.mce-menu-item.mce-selected *, +.mce-menu-item:focus * { + color: #595959; +} +div.mce-menu .mce-menu-item-sep, +.mce-menu-item-sep:hover { + border: 0; + padding: 0; + height: 1px; + margin: 9px 1px; + overflow: hidden; + background: transparent; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + cursor: default; + filter: none; +} +div.mce-menu .mce-menu-item b { + font-weight: bold; +} +.mce-menu-item-indent-1 { + padding-left: 20px; +} +.mce-menu-item-indent-2 { + padding-left: 35px; +} +.mce-menu-item-indent-2 { + padding-left: 35px; +} +.mce-menu-item-indent-3 { + padding-left: 40px; +} +.mce-menu-item-indent-4 { + padding-left: 45px; +} +.mce-menu-item-indent-5 { + padding-left: 50px; +} +.mce-menu-item-indent-6 { + padding-left: 55px; +} +.mce-menu.mce-rtl { + direction: rtl; +} +.mce-rtl .mce-menu-item { + text-align: right; + direction: rtl; + padding: 6px 12px 6px 15px; +} +.mce-rtl .mce-menu-item .mce-caret { + margin-left: 6px; + margin-right: 0; + border-right: 4px solid #595959; + border-left: 0; +} +.mce-rtl .mce-menu-item.mce-selected .mce-caret, +.mce-rtl .mce-menu-item:focus .mce-caret, +.mce-rtl .mce-menu-item:hover .mce-caret { + border-left-color: transparent; + border-right-color: #595959; +} +.mce-rtl .mce-menu-item .mce-ico { + padding-right: 0; + padding-left: 4px; +} +.mce-throbber { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.6; + filter: alpha(opacity=60); + zoom: 1; + background: #fff url("img/loader.gif") no-repeat center center; +} +.mce-throbber-inline { + position: static; + height: 50px; +} +.mce-menu .mce-throbber-inline { + height: 25px; + background-size: contain; +} +.mce-menu { + position: absolute; + left: 0; + top: 0; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + background: transparent; + z-index: 1000; + padding: 5px 0 5px 0; + margin: -1px 0 0; + min-width: 180px; + background: white; + border: 1px solid #c5c9cf; + border: 1px solid #e2e4e7; + z-index: 1002; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); + max-height: 500px; + overflow: auto; + overflow-x: hidden; +} +.mce-menu.mce-animate { + opacity: 0.01; + transform: rotateY(10deg) rotateX(-10deg); + transform-origin: left top; +} +.mce-menu.mce-menu-align .mce-menu-shortcut, +.mce-menu.mce-menu-align .mce-caret { + position: absolute; + right: 0; +} +.mce-menu i { + display: none; +} +.mce-menu-has-icons i { + display: inline-block; +} +.mce-menu.mce-in.mce-animate { + opacity: 1; + transform: rotateY(0) rotateX(0); + transition: opacity 0.075s ease, transform 0.1s ease; +} +.mce-menu-sub-tr-tl { + margin: -6px 0 0 -1px; +} +.mce-menu-sub-br-bl { + margin: 6px 0 0 -1px; +} +.mce-menu-sub-tl-tr { + margin: -6px 0 0 1px; +} +.mce-menu-sub-bl-br { + margin: 6px 0 0 1px; +} +.mce-rtl .mce-menu-item .mce-ico { + padding-right: 0; + padding-left: 4px; +} +.mce-rtl.mce-menu-align .mce-caret, +.mce-rtl .mce-menu-shortcut { + right: auto; + left: 0; +} +.mce-listbox button { + text-align: left; + padding-right: 20px; + position: relative; +} +.mce-listbox .mce-caret { + position: absolute; + margin-top: -2px; + right: 8px; + top: 50%; +} +.mce-rtl .mce-listbox .mce-caret { + right: auto; + left: 8px; +} +.mce-rtl .mce-listbox button { + padding-right: 10px; + padding-left: 20px; +} +.mce-container-body .mce-resizehandle { + position: absolute; + right: 0; + bottom: 0; + width: 16px; + height: 16px; + visibility: visible; + cursor: s-resize; + margin: 0; +} +.mce-container-body .mce-resizehandle-both { + cursor: se-resize; +} +i.mce-i-resize { + color: #595959; +} +.mce-selectbox { + background: #fff; + border: 1px solid #c5c5c5; +} +.mce-slider { + border: 1px solid #c5c5c5; + background: #fff; + width: 100px; + height: 10px; + position: relative; + display: block; +} +.mce-slider.mce-vertical { + width: 10px; + height: 100px; +} +.mce-slider-handle { + border: 1px solid #c5c5c5; + background: #e6e6e6; + display: block; + width: 13px; + height: 13px; + position: absolute; + top: 0; + left: 0; + margin-left: -1px; + margin-top: -2px; +} +.mce-slider-handle:focus { + border-color: #2276d2; +} +.mce-spacer { + visibility: hidden; +} +.mce-splitbtn:hover .mce-open { + border-left: 1px solid #e2e4e7; +} +.mce-splitbtn .mce-open { + border-left: 1px solid transparent; + padding-right: 4px; + padding-left: 4px; +} +.mce-splitbtn .mce-open:focus { + border-left: 1px solid #e2e4e7; +} +.mce-splitbtn .mce-open:hover, +.mce-splitbtn .mce-open:active { + border-left: 1px solid #e2e4e7; +} +.mce-splitbtn.mce-active:hover .mce-open { + border-left: 1px solid white; +} +.mce-splitbtn.mce-opened { + border-color: #e2e4e7; +} +.mce-splitbtn.mce-btn-small .mce-open { + padding: 0 3px 0 3px; +} +.mce-rtl .mce-splitbtn { + direction: rtl; + text-align: right; +} +.mce-rtl .mce-splitbtn button { + padding-right: 4px; + padding-left: 4px; +} +.mce-rtl .mce-splitbtn .mce-open { + border-left: 0; +} +.mce-stack-layout-item { + display: block; +} +.mce-tabs { + display: block; + border-bottom: 1px solid #c5c5c5; +} +.mce-tabs, +.mce-tabs + .mce-container-body { + background: #fff; +} +.mce-tab { + display: inline-block; + *display: inline; + *zoom: 1; + border: 1px solid #c5c5c5; + border-width: 0 1px 0 0; + background: #fff; + padding: 8px 15px; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + height: 13px; + cursor: pointer; +} +.mce-tab:hover { + background: #fdfdfd; +} +.mce-tab.mce-active { + background: #fdfdfd; + border-bottom-color: transparent; + margin-bottom: -1px; + height: 14px; +} +.mce-tab:focus { + color: #2276d2; +} +.mce-rtl .mce-tabs { + text-align: right; + direction: rtl; +} +.mce-rtl .mce-tab { + border-width: 0 0 0 1px; +} +.mce-textbox { + background: #fff; + border: 1px solid #c5c5c5; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + display: inline-block; + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + height: 28px; + resize: none; + padding: 0 4px 0 4px; + white-space: pre-wrap; + *white-space: pre; + color: #595959; +} +.mce-textbox:focus, +.mce-textbox.mce-focus { + border-color: #2276d2; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.mce-placeholder .mce-textbox { + color: #aaa; +} +.mce-textbox.mce-multiline { + padding: 4px; + height: auto; +} +.mce-textbox.mce-disabled { + color: #bdbdbd; +} +.mce-rtl .mce-textbox { + text-align: right; + direction: rtl; +} +.mce-dropzone { + border: 3px dashed gray; + text-align: center; +} +.mce-dropzone span { + text-transform: uppercase; + display: inline-block; + vertical-align: middle; +} +.mce-dropzone:after { + content: ""; + height: 100%; + display: inline-block; + vertical-align: middle; +} +.mce-dropzone.mce-disabled { + opacity: 0.4; + filter: alpha(opacity=40); + zoom: 1; +} +.mce-dropzone.mce-disabled.mce-dragenter { + cursor: not-allowed; +} +.mce-browsebutton { + position: relative; + overflow: hidden; +} +.mce-browsebutton button { + position: relative; + z-index: 1; +} +.mce-browsebutton input { + opacity: 0; + filter: alpha(opacity=0); + zoom: 1; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 0; +} +@font-face { + font-family: "tinymce"; + src: url("fonts/tinymce.eot"); + src: url("fonts/tinymce.eot?#iefix") format("embedded-opentype"), + url("fonts/tinymce.woff") format("woff"), + url("fonts/tinymce.ttf") format("truetype"), + url("fonts/tinymce.svg#tinymce") format("svg"); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: "tinymce-small"; + src: url("fonts/tinymce-small.eot"); + src: url("fonts/tinymce-small.eot?#iefix") format("embedded-opentype"), + url("fonts/tinymce-small.woff") format("woff"), + url("fonts/tinymce-small.ttf") format("truetype"), + url("fonts/tinymce-small.svg#tinymce") format("svg"); + font-weight: normal; + font-style: normal; +} +.mce-ico { + font-family: "tinymce", Arial; + font-style: normal; + font-weight: normal; + font-variant: normal; + font-size: 16px; + line-height: 16px; + speak: none; + vertical-align: text-top; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + display: inline-block; + background: transparent center center; + background-size: cover; + width: 16px; + height: 16px; + color: #595959; +} +.mce-btn-small .mce-ico { + font-family: "tinymce-small", Arial; +} +.mce-i-save:before { + content: "\e000"; +} +.mce-i-newdocument:before { + content: "\e001"; +} +.mce-i-fullpage:before { + content: "\e002"; +} +.mce-i-alignleft:before { + content: "\e003"; +} +.mce-i-aligncenter:before { + content: "\e004"; +} +.mce-i-alignright:before { + content: "\e005"; +} +.mce-i-alignjustify:before { + content: "\e006"; +} +.mce-i-alignnone:before { + content: "\e003"; +} +.mce-i-cut:before { + content: "\e007"; +} +.mce-i-paste:before { + content: "\e008"; +} +.mce-i-searchreplace:before { + content: "\e009"; +} +.mce-i-bullist:before { + content: "\e00a"; +} +.mce-i-numlist:before { + content: "\e00b"; +} +.mce-i-indent:before { + content: "\e00c"; +} +.mce-i-outdent:before { + content: "\e00d"; +} +.mce-i-blockquote:before { + content: "\e00e"; +} +.mce-i-undo:before { + content: "\e00f"; +} +.mce-i-redo:before { + content: "\e010"; +} +.mce-i-link:before { + content: "\e011"; +} +.mce-i-unlink:before { + content: "\e012"; +} +.mce-i-anchor:before { + content: "\e013"; +} +.mce-i-image:before { + content: "\e014"; +} +.mce-i-media:before { + content: "\e015"; +} +.mce-i-help:before { + content: "\e016"; +} +.mce-i-code:before { + content: "\e017"; +} +.mce-i-insertdatetime:before { + content: "\e018"; +} +.mce-i-preview:before { + content: "\e019"; +} +.mce-i-forecolor:before { + content: "\e01a"; +} +.mce-i-backcolor:before { + content: "\e01a"; +} +.mce-i-table:before { + content: "\e01b"; +} +.mce-i-hr:before { + content: "\e01c"; +} +.mce-i-removeformat:before { + content: "\e01d"; +} +.mce-i-subscript:before { + content: "\e01e"; +} +.mce-i-superscript:before { + content: "\e01f"; +} +.mce-i-charmap:before { + content: "\e020"; +} +.mce-i-emoticons:before { + content: "\e021"; +} +.mce-i-print:before { + content: "\e022"; +} +.mce-i-fullscreen:before { + content: "\e023"; +} +.mce-i-spellchecker:before { + content: "\e024"; +} +.mce-i-nonbreaking:before { + content: "\e025"; +} +.mce-i-template:before { + content: "\e026"; +} +.mce-i-pagebreak:before { + content: "\e027"; +} +.mce-i-restoredraft:before { + content: "\e028"; +} +.mce-i-bold:before { + content: "\e02a"; +} +.mce-i-italic:before { + content: "\e02b"; +} +.mce-i-underline:before { + content: "\e02c"; +} +.mce-i-strikethrough:before { + content: "\e02d"; +} +.mce-i-visualchars:before { + content: "\e02e"; +} +.mce-i-visualblocks:before { + content: "\e02e"; +} +.mce-i-ltr:before { + content: "\e02f"; +} +.mce-i-rtl:before { + content: "\e030"; +} +.mce-i-copy:before { + content: "\e031"; +} +.mce-i-resize:before { + content: "\e032"; +} +.mce-i-browse:before { + content: "\e034"; +} +.mce-i-pastetext:before { + content: "\e035"; +} +.mce-i-rotateleft:before { + content: "\eaa8"; +} +.mce-i-rotateright:before { + content: "\eaa9"; +} +.mce-i-crop:before { + content: "\ee78"; +} +.mce-i-editimage:before { + content: "\e915"; +} +.mce-i-options:before { + content: "\ec6a"; +} +.mce-i-flipv:before { + content: "\eaaa"; +} +.mce-i-fliph:before { + content: "\eaac"; +} +.mce-i-zoomin:before { + content: "\eb35"; +} +.mce-i-zoomout:before { + content: "\eb36"; +} +.mce-i-sun:before { + content: "\eccc"; +} +.mce-i-moon:before { + content: "\eccd"; +} +.mce-i-arrowleft:before { + content: "\edc0"; +} +.mce-i-arrowright:before { + content: "\e93c"; +} +.mce-i-drop:before { + content: "\e935"; +} +.mce-i-contrast:before { + content: "\ecd4"; +} +.mce-i-sharpen:before { + content: "\eba7"; +} +.mce-i-resize2:before { + content: "\edf9"; +} +.mce-i-orientation:before { + content: "\e601"; +} +.mce-i-invert:before { + content: "\e602"; +} +.mce-i-gamma:before { + content: "\e600"; +} +.mce-i-remove:before { + content: "\ed6a"; +} +.mce-i-tablerowprops:before { + content: "\e604"; +} +.mce-i-tablecellprops:before { + content: "\e605"; +} +.mce-i-table2:before { + content: "\e606"; +} +.mce-i-tablemergecells:before { + content: "\e607"; +} +.mce-i-tableinsertcolbefore:before { + content: "\e608"; +} +.mce-i-tableinsertcolafter:before { + content: "\e609"; +} +.mce-i-tableinsertrowbefore:before { + content: "\e60a"; +} +.mce-i-tableinsertrowafter:before { + content: "\e60b"; +} +.mce-i-tablesplitcells:before { + content: "\e60d"; +} +.mce-i-tabledelete:before { + content: "\e60e"; +} +.mce-i-tableleftheader:before { + content: "\e62a"; +} +.mce-i-tabletopheader:before { + content: "\e62b"; +} +.mce-i-tabledeleterow:before { + content: "\e800"; +} +.mce-i-tabledeletecol:before { + content: "\e801"; +} +.mce-i-codesample:before { + content: "\e603"; +} +.mce-i-fill:before { + content: "\e902"; +} +.mce-i-borderwidth:before { + content: "\e903"; +} +.mce-i-line:before { + content: "\e904"; +} +.mce-i-count:before { + content: "\e905"; +} +.mce-i-translate:before { + content: "\e907"; +} +.mce-i-drag:before { + content: "\e908"; +} +.mce-i-home:before { + content: "\e90b"; +} +.mce-i-upload:before { + content: "\e914"; +} +.mce-i-bubble:before { + content: "\e91c"; +} +.mce-i-user:before { + content: "\e91d"; +} +.mce-i-lock:before { + content: "\e926"; +} +.mce-i-unlock:before { + content: "\e927"; +} +.mce-i-settings:before { + content: "\e928"; +} +.mce-i-remove2:before { + content: "\e92a"; +} +.mce-i-menu:before { + content: "\e92d"; +} +.mce-i-warning:before { + content: "\e930"; +} +.mce-i-question:before { + content: "\e931"; +} +.mce-i-pluscircle:before { + content: "\e932"; +} +.mce-i-info:before { + content: "\e933"; +} +.mce-i-notice:before { + content: "\e934"; +} +.mce-i-arrowup:before { + content: "\e93b"; +} +.mce-i-arrowdown:before { + content: "\e93d"; +} +.mce-i-arrowup2:before { + content: "\e93f"; +} +.mce-i-arrowdown2:before { + content: "\e940"; +} +.mce-i-menu2:before { + content: "\e941"; +} +.mce-i-newtab:before { + content: "\e961"; +} +.mce-i-a11y:before { + content: "\e900"; +} +.mce-i-plus:before { + content: "\e93a"; +} +.mce-i-insert:before { + content: "\e93a"; +} +.mce-i-minus:before { + content: "\e939"; +} +.mce-i-books:before { + content: "\e911"; +} +.mce-i-reload:before { + content: "\e906"; +} +.mce-i-toc:before { + content: "\e901"; +} +.mce-i-checkmark:before { + content: "\e033"; +} +.mce-i-checkbox:before, +.mce-i-selected:before { + content: "\e033"; +} +.mce-i-insert { + font-size: 14px; +} +.mce-i-selected { + visibility: hidden; +} +i.mce-i-backcolor { + text-shadow: none; + background: #bbb; +} +.mce-rtl .mce-filepicker input { + direction: ltr; +} /*# sourceMappingURL=skin.min.css.map */ + +.tinymce-flex-wrap-box{ + display: flex ; + flex-wrap: wrap ; +} + diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css.map b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css.map new file mode 100644 index 0000000..c8763dc --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/skins/lightgray/skin.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["./src/skins/lightgray/main/less/desktop/Reset.less","./src/skins/lightgray/main/less/desktop/Variables.less","./src/skins/lightgray/main/less/desktop/Mixins.less","./src/skins/lightgray/main/less/desktop/Animations.less","./src/skins/lightgray/main/less/desktop/TinyMCE.less","./src/skins/lightgray/main/less/desktop/CropRect.less","./src/skins/lightgray/main/less/desktop/ImagePanel.less","./src/skins/lightgray/main/less/desktop/Arrows.less","./src/skins/lightgray/main/less/desktop/Sidebar.less","./src/skins/lightgray/main/less/desktop/Container.less","./src/skins/lightgray/main/less/desktop/Scrollable.less","./src/skins/lightgray/main/less/desktop/Panel.less","./src/skins/lightgray/main/less/desktop/FloatPanel.less","./src/skins/lightgray/main/less/desktop/Window.less","./src/skins/lightgray/main/less/desktop/ToolTip.less","./src/skins/lightgray/main/less/desktop/Progress.less","./src/skins/lightgray/main/less/desktop/Notification.less","./src/skins/lightgray/main/less/desktop/AbsoluteLayout.less","./src/skins/lightgray/main/less/desktop/Button.less","./src/skins/lightgray/main/less/desktop/ButtonGroup.less","./src/skins/lightgray/main/less/desktop/Checkbox.less","./src/skins/lightgray/main/less/desktop/ComboBox.less","./src/skins/lightgray/main/less/desktop/ColorBox.less","./src/skins/lightgray/main/less/desktop/ColorButton.less","./src/skins/lightgray/main/less/desktop/ColorPicker.less","./src/skins/lightgray/main/less/desktop/Path.less","./src/skins/lightgray/main/less/desktop/FieldSet.less","./src/skins/lightgray/main/less/desktop/FitLayout.less","./src/skins/lightgray/main/less/desktop/FlowLayout.less","./src/skins/lightgray/main/less/desktop/Iframe.less","./src/skins/lightgray/main/less/desktop/InfoBox.less","./src/skins/lightgray/main/less/desktop/Label.less","./src/skins/lightgray/main/less/desktop/MenuBar.less","./src/skins/lightgray/main/less/desktop/MenuButton.less","./src/skins/lightgray/main/less/desktop/MenuItem.less","./src/skins/lightgray/main/less/desktop/Throbber.less","./src/skins/lightgray/main/less/desktop/Menu.less","./src/skins/lightgray/main/less/desktop/ListBox.less","./src/skins/lightgray/main/less/desktop/ResizeHandle.less","./src/skins/lightgray/main/less/desktop/SelectBox.less","./src/skins/lightgray/main/less/desktop/Slider.less","./src/skins/lightgray/main/less/desktop/Spacer.less","./src/skins/lightgray/main/less/desktop/SplitButton.less","./src/skins/lightgray/main/less/desktop/StackLayout.less","./src/skins/lightgray/main/less/desktop/TabPanel.less","./src/skins/lightgray/main/less/desktop/TextBox.less","./src/skins/lightgray/main/less/desktop/DropZone.less","./src/skins/lightgray/main/less/desktop/BrowseButton.less","./src/skins/lightgray/main/less/desktop/Icons.less","./src/skins/lightgray/main/less/desktop/FilePicker.less"],"names":[],"mappings":"AAEA,CAAC,GAAS,WAAY,CAAC,GAAS,UAAW,GAAG,CAAC,GAAS,QAAS,CAAC,GAAS,OAAQ,GAAG,CAAC,GAAS,OAC9F,QAAA,CAAW,SAAA,CAAY,QAAA,CAAW,SAAA,CAClC,kBAAA,CAAqB,sBAAA,CACrB,oBAAA,CAAuB,aAAA,CACvB,YCU+B,2CDV/B,CACA,cAAA,CAAuB,gBAAA,CAAmB,UAAA,CAC1C,eAAA,CAAkB,UAAA,CAAa,WAAA,CAC/B,kBAAA,CAAqB,cAAA,CACrB,uCAAA,CACA,kBAAA,CAAqB,kBAAA,CACrB,eAAA,CACA,2BAAA,CACA,8BAAA,CACA,sBAAA,CACA,aAAA,CACA,eAGF,CAAC,GAAS,OAAQ,QAChB,0BAAA,CACA,6BAAA,CACA,sBAGF,CAAC,GAAS,UAAW,EAAC,eACpB,qBAAA,CACA,wBAAA,CACA,mBAAA,CACA,iBEyBF,WACE,oBAAA,CACA,wBAAA,CACA,oBAAA,CACA,qBAAA,CACA,gBAAA,CACA,iBAAA,CACA,oBAAA,CACA,aC7DF,CAAC,GAAS,MACR,SAAA,CDqCA,sCAAA,CACA,+BCnCA,CAJD,GAAS,KAIP,CAAC,GAAS,IACT,UCPJ,CAAC,GAAS,SAER,kBAAA,YACA,kBAGF,CAAC,GAAS,YACR,QAAA,CAAW,SAAA,CAAY,QAAA,CACvB,eAAA,CACA,WAAA,CACA,YAGF,GAAG,CAAC,GAAS,YACX,cAAA,CACA,KAAA,CAAQ,MAAA,CACR,UAAA,CACA,YAGF,CAAC,GAAS,SACR,aAAA,CFaA,+CAAA,CACA,4CAAA,CACA,wCEVF,CAAC,GAAS,UAAW,EAAG,GAAS,gBAC/B,YAAA,CACA,mBAFF,CAAC,GAAS,UAAW,EAAG,GAAS,eAI/B,EAAC,GAAS,MACR,OAIJ,CAAC,GAAS,WACR,iBAAA,CACA,wBAAA,CACA,cAGF,GAAG,CAAC,GAAS,WACX,eAAA,CACA,YAGF,CAAC,GAAS,WACR,kBAGF,CAAC,GAAS,UAAW,EAAC,GAAS,gBAC7B,iBAAA,CACA,eAGF,CAAC,GAAS,WAAY,EAAC,GAAS,cAC9B,aAGF,CAAC,GAAS,UAAW,EAAC,GAAS,kBAC7B,SAKF,CAAC,GAAS,SACR,yBAGF,CAAC,GAAS,QAAS,IACjB,cAAA,CACA,wBAAA,CACA,UAAA,CACA,WAAA,CACA,gBAAA,CACA,iBAAA,CACA,qBAAA,CACA,YAGF,CAAC,GAAS,QAAS,GAAG,KACpB,kBAGF,CAAC,GAAS,QAAS,GAAE,OACnB,iBAGF,CAAC,GAAS,KAAM,GAAE,CAAC,GAAS,UAAW,KACrC,wBAAA,CACA,UAAA,CAAa,WAAA,CACb,QAAA,CACA,eAEA,CAND,GAAS,KAAM,GAAE,CAAC,GAAS,UAAW,IAMpC,OACC,qBAGF,CAVD,GAAS,KAAM,GAAE,CAAC,GAAS,UAAW,IAUpC,WACC,mBAIJ,CAAC,GAAS,MACR,kBAAA,CACA,yBAFF,CAAC,GAAS,KAIR,GACE,aAAA,CACA,6BAEA,CARH,GAAS,KAIR,EAIG,OAAQ,CARZ,GAAS,KAIR,EAIY,OACR,qBAKN,CAAC,GAAS,aACR,mBADF,CAAC,GAAS,YAGR,GACE,oBAAA,CACA,UAAA,CAAa,YALjB,CAAC,GAAS,YAQR,EAAC,OARH,CAAC,GAAS,YAQC,EAAC,CAAC,GAAS,QAClB,oBAAA,CACA,mBAIJ,CAAC,GAAS,aACR,kBAGF,GAAG,CAAC,GAAS,gBACX,WAGF,CAAC,GAAS,eAAgB,KACxB,iBAAA,CACA,qBAAA,CACA,gBAAA,CACA,cAAA,CACA,gBAAA,CACA,cAGF,CAAC,GAAS,WACR,YAAa,gCASf,CAAC,GAAS,YAAa,EAAC,GAAS,kBAC/B,gBAKF,CAAC,GAAS,UAAW,GACnB,iBAGF,CAAC,GAAS,UAAW,GACnB,kBAGF,CAAC,GAAS,UAAW,GACnB,cAAA,CACA,cACA,CAHD,GAAS,UAAW,EAGlB,OACC,0BAIJ,CAAC,GAAS,UAAW,IACnB,iBAGF,CAAC,GAAS,UAAW,EAAC,GAAS,eAC7B,wBAAA,CACA,YAFF,CAAC,GAAS,UAAW,EAAC,GAAS,cAG7B,MAAM,IACJ,yBAJJ,CAAC,GAAS,UAAW,EAAC,GAAS,cAG7B,MAAM,GAEJ,IACE,iBANN,CAAC,GAAS,UAAW,EAAC,GAAS,cAS7B,IATF,CAAC,GAAS,UAAW,EAAC,GAAS,cASzB,IACF,YAVJ,CAAC,GAAS,UAAW,EAAC,GAAS,cAY7B,GAAE,UAAU,OACV,yBAbJ,CAAC,GAAS,UAAW,EAAC,GAAS,cAe7B,MAAM,GAAI,OACR,yBAIJ,CAAC,GAAS,UACR,iBAAA,CACA,wBAAA,CACA,eAAA,CACA,cAJF,CAAC,GAAS,SAMR,GACE,iBAAA,CACA,cAIJ,CAAC,GAAS,UACR,kBAGF,CAAC,GAAS,SAAS,SAEjB,QAAS,EAAT,CACA,iBAAA,CF7LA,+CAAA,CACA,4CAAA,CACA,uCAAA,CE6LA,KAAA,CACA,OAAA,CACA,QAAA,CACA,MAAA,CACA,oBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,WACvB,MAAA,CACA,WAGF,CAAC,GAAS,IACR,EAAC,GAAS,UAAW,EAAG,GAAS,eAC/B,EAAG,YACD,eAAA,CACA,kBAJN,CAAC,GAAS,IAQR,EAAC,GAAS,MACR,gBAAA,CACA,mBCvPJ,CAAC,GAAS,oBACR,iBAAA,CACA,KAAA,CACA,OAGF,CAAC,GAAS,iBACR,iBAAA,CACA,KAAA,CAAQ,MAAA,CACR,UAAA,CAAa,WAAA,CACb,uBAGF,CAAC,GAAS,oBACR,wBAAA,CACA,oBAAA,CACA,gBAAA,CACA,SAAA,CAAY,WAGd,CAAC,GAAS,oBACR,wBAAA,CACA,qBAAA,CACA,gBAAA,CACA,SAAA,CAAY,WAGd,CAAC,GAAS,oBACR,wBAAA,CACA,uBAAA,CACA,gBAAA,CACA,SAAA,CAAY,WAGd,CAAC,GAAS,oBACR,wBAAA,CACA,sBAAA,CACA,gBAAA,CACA,SAAA,CAAY,WAGd,CAAC,GAAS,sBACR,iBAAA,CACA,WAAA,CACA,SAGF,CAAC,GAAS,gBH9CR,UAAA,CAEA,wBAAA,CACA,MAAA,CG6CA,iBAAA,CACA,iBAGF,CAAC,GAAS,gBAAgB,OACxB,qBAGF,CAAC,GAAS,qBAAqB,OAC7B,0BC1DF,CAAC,GAAS,YACR,aAAA,CACA,iBAGF,CAAC,GAAS,eACR,iBAAA,CACA,eAAgB,sGAGlB,CAAC,GAAS,WAAY,KACpB,kBAGF,CAAC,GAAS,UAAU,CAAC,GAAS,IAAK,EAAC,GAAS,KAC3C,aAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,gBAAA,CACA,cAAA,CACA,YCrBF,CAAC,GAAS,UACR,gBAGF,CAAC,GAAS,YACR,iBAGF,CAAC,GAAS,MAAM,QAChB,CAAC,GAAS,MAAM,OACd,iBAAA,CACA,QAAA,CACA,aAAA,CACA,OAAA,CACA,QAAA,CACA,kBAAA,CACA,wBAAA,CACA,QAAS,GAGX,CAAC,GAAS,MAAM,CAAC,GAAS,SAAS,QACjC,QAAA,CACA,2BAAA,CACA,sBAAA,CACA,iBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,QACnC,WAAA,CACA,wBAAA,CACA,sBAAA,CACA,iBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,SAAS,OACjC,QAAA,CACA,wBAAA,CACA,sBAAA,CACA,iBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,OACnC,WAAA,CACA,qBAAA,CACA,sBAAA,CACA,iBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,QACrC,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,OACnC,SAGF,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,QACnC,SAEF,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,OACnC,SAGF,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,QACtC,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,OACpC,SAAA,CACA,SAGF,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,QACpC,UAGF,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,OACpC,UAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,QAC1E,SAAA,CACA,OAAA,CACA,0BAAA,CACA,0BAAA,CACA,gBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,WAAW,OAC1E,SAAA,CACA,OAAA,CACA,uBAAA,CACA,0BAAA,CACA,gBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,YAC/D,iBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,QAC3E,UAAA,CACA,OAAA,CACA,yBAAA,CACA,0BAAA,CACA,gBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,YAAY,OAC3E,UAAA,CACA,OAAA,CACA,sBAAA,CACA,0BAAA,CACA,gBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,aAAa,CAAC,GAAS,MAAM,CAAC,GAAS,aAC/D,kBC/GF,CAAC,GAAS,oBAAqB,EAAG,GAAS,gBACzC,aADF,CAAC,GAAS,oBAAqB,EAAG,GAAS,eAGzC,EAAC,GAAS,WACR,OAJJ,CAAC,GAAS,oBAAqB,EAAG,GAAS,eAOzC,EAAC,GAAS,QAAS,EAAG,GAAS,gBAC7B,YAAA,CACA,mBAAA,CACA,YAVJ,CAAC,GAAS,oBAAqB,EAAG,GAAS,eAazC,EAAC,GAAS,eACR,eAAA,CACA,eAAA,CACA,kBAhBJ,CAAC,GAAS,oBAAqB,EAAG,GAAS,eAazC,EAAC,GAAS,cAKR,EAAG,GAAS,gBACV,iBAAA,CACA,UAAA,CAAa,WAAA,CACb,aAAA,CACA,KAAA,CAAQ,OAKd,CAAC,GAAS,iBACR,sBAAA,CACA,sBAFF,CAAC,GAAS,gBAIR,EAAC,GAAS,KACR,aAAA,CACA,eANJ,CAAC,GAAS,gBASR,EAAC,GAAS,IAAI,CAAC,GAAS,QAT1B,CAAC,GAAS,gBASyB,EAAC,GAAS,IAAI,CAAC,GAAS,OAAO,OAC9D,yBAVJ,CAAC,GAAS,gBASR,EAAC,GAAS,IAAI,CAAC,GAAS,OAGtB,QAZJ,CAAC,GAAS,gBASyB,EAAC,GAAS,IAAI,CAAC,GAAS,OAAO,MAG9D,QAZJ,CAAC,GAAS,gBASR,EAAC,GAAS,IAAI,CAAC,GAAS,OAGd,OAAO,GAZnB,CAAC,GAAS,gBASyB,EAAC,GAAS,IAAI,CAAC,GAAS,OAAO,MAGtD,OAAO,GACb,WAAA,CACA,yBAKN,CAAC,GAAS,eACR,sBAAA,CACA,sBChDF,CAAC,GAAS,WAAY,CAAC,GAAS,gBAC9B,cAGF,CAAC,GAAS,YACR,gBCLF,CAAC,GAAS,WACR,iBAAA,CACA,SAAA,CACA,WAAA,CACA,OAAA,CACA,SAAA,CRJA,UAAA,CAEA,wBAAA,CACA,OQKF,CAAC,GAAS,aACR,QAAA,CACA,UAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CACA,WAGF,CAAC,GAAS,iBACR,iBAAA,CACA,qBAAA,CACA,qBAAA,CACA,+BAAA,CACA,SAAA,CACA,YAIF,CAAC,GAAS,YAAa,EAAC,GAAS,iBAC/B,UAAA,CACA,WAGF,CAAC,GAAS,UAAU,OAAQ,CAAC,GAAS,UAAU,CAAC,GAAS,QACxD,qBAAA,CRjCA,UAAA,CAEA,wBAAA,CACA,OQmCF,CAAC,GAAS,QACR,kBCxCF,CAAC,GAAS,OACR,sBAAA,CACA,sBAAA,CACA,sBCHF,CAAC,GAAS,YACR,iBAAA,CV+BA,+CAAA,CACA,4CAAA,CACA,wCU7BF,CAAC,GAAS,WAAW,CAAC,GAAS,OAC7B,eAKF,CAAC,GAAS,WAAY,EAAC,GAAS,OAChC,CAAC,GAAS,WAAY,EAAC,GAAS,MAAM,OACpC,iBAAA,CACA,aAAA,CACA,OAAA,CACA,QAAA,CACA,wBAAA,CACA,mBAGF,CAAC,GAAS,WAAY,EAAC,GAAS,OAC9B,kBAGF,CAAC,GAAS,WAAY,EAAC,GAAS,MAAM,OACpC,iBAAA,CACA,QAAS,GAGX,CAAC,GAAS,WAAW,CAAC,GAAS,SVmB7B,OAAQ,2DAAR,CACA,sBAAA,CAlBA,+CAAA,CACA,4CAAA,CACA,uCAAA,CUAA,KAAA,CACA,MAAA,CACA,eAAA,CACA,wBAAA,CACA,kCAEA,CAVD,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,QACT,eAAA,CACA,cAEA,CAdH,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAIP,EAAG,GAAS,OACZ,QAAA,CACA,iBAAA,CACA,kBAAA,CACA,2BAAA,CACA,oCAAA,CACA,UAEA,CAtBL,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAIP,EAAG,GAAS,MAQX,OACC,OAAA,CACA,iBAAA,CACA,kBAAA,CACA,yBAIJ,CA9BH,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAoBR,CAAC,GAAS,OAAS,kBACpB,CA/BH,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAqBR,CAAC,GAAS,MAAO,EAAG,GAAS,OAAS,UAEvC,CAjCH,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAuBR,CAAC,GAAS,KAAO,iBAClB,CAlCH,GAAS,WAAW,CAAC,GAAS,QAU5B,CAAC,GAAS,OAwBR,CAAC,GAAS,IAAK,EAAG,GAAS,OAAS,UAAA,CAAa,UChEtD,CAAC,GAAS,YACR,QAAA,CAAW,SAAA,CAAY,QAAA,CACvB,eAAA,CACA,YAGF,GAAG,CAAC,GAAS,YACX,cAAA,CACA,KAAA,CAAQ,OAGV,CAAC,GAAS,aXVR,SAAA,CAEA,uBAAA,CACA,MAAA,CWSA,cAAA,CACA,MAAA,CAAS,KAAA,CACT,UAAA,CAAa,WAAA,CACb,gBAGF,CAAC,GAAS,YAAY,CAAC,GAAS,IXlB9B,UAAA,CAEA,wBAAA,CACA,OWmBF,CAAC,GAAS,aACR,YAGF,CAAC,GAAS,QXKR,+CAAA,CACA,4CAAA,CACA,uCAAA,CAeA,OAAQ,2DAAR,CACA,sBAAA,CWnBA,eAAA,CACA,cAAA,CACA,KAAA,CAAQ,MAAA,CACR,SAAA,CACA,UAAW,SAAX,CACA,yDAGF,CAAC,GAAS,OAAO,CAAC,GAAS,IACzB,UAAW,QAAX,CACA,UAGF,CAAC,GAAS,aACR,gBAAA,CACA,+BAAA,CACA,kBAGF,CAAC,GAAS,YAAa,EAAC,GAAS,OAC/B,iBAAA,CACA,OAAA,CACA,KAAA,CACA,WAAA,CACA,UAAA,CACA,iBAAA,CACA,eAPF,CAAC,GAAS,YAAa,EAAC,GAAS,MAS/B,GACE,cAIJ,CAAC,GAAS,MAAM,MAAO,GACrB,cAGF,CAAC,GAAS,YAAa,EAAC,GAAS,OAC/B,gBAAA,CACA,cAAA,CACA,gBAAA,CACA,iCAAA,CACA,mBAGF,CAAC,GAAS,OAAQ,EAAC,GAAS,gBAC1B,cAGF,CAAC,GAAS,MACR,aAAA,CACA,qBAAA,CACA,6BAIF,CAAC,GAAS,YAAa,EAAC,GAAS,OAC/B,iBAAA,CACA,KAAA,CAAQ,MAAA,CACR,WAAA,CACA,SAAA,CACA,YAGF,CAAC,GAAS,OAAQ,QAChB,UAAA,CACA,YAOF,CAAC,GAAS,YAAa,EAAC,GAAS,SAC/B,qBAGF,CAAC,GAAS,OACR,EAAC,GAAS,IAAI,OACZ,qBAFJ,CAAC,GAAS,OAKR,EAAC,GAAS,IAAI,OACZ,qBAIJ,CAAC,GAAS,YAAa,EAAC,GAAS,KAAM,CAAC,GAAS,KAAM,EAAC,GAAS,KAC/D,qBAGF,CAAC,GAAS,KAAM,EAAC,GAAS,IAAI,CAAC,GAAS,SACtC,yBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAa,EAAC,GAAS,OAC9C,iBAAA,CACA,UAAA,CACA,UAGF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAa,EAAC,GAAS,OAC9C,SAAA,CACA,QAGF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAa,EAAC,GAAS,OAC9C,aAAA,CACA,iBC7IF,CAAC,GAAS,SACR,iBAAA,CACA,WAAA,CZDA,UAAA,CAEA,wBAAA,CACA,MAAA,CYAA,eAGF,CAAC,GAAS,eACR,cAAA,CACA,qBAAA,CACA,WAAA,CACA,eAAA,CACA,uBAAA,CACA,iBAAA,CACA,mBAOF,CAAC,GAAS,eZWR,uBAAA,CACA,oBAAA,CACA,gBYTF,CAAC,GAAS,eACR,iBAAA,CACA,OAAA,CACA,QAAA,CACA,aAAA,CACA,uBAGF,CAAC,GAAS,iBACR,yBAGF,CAAC,GAAS,iBACR,sBAGF,CAAC,GAAS,iBACR,uBAGF,CAAC,GAAS,iBACR,wBAGF,CAAC,GAAS,YAAa,CAAC,GAAS,YAC/B,kBAGF,CAAC,GAAS,YAAa,CAAC,GAAS,YAC/B,iBAGF,CAAC,GAAS,UAAW,EAAC,GAAS,eAC7B,KAAA,CACA,QAAA,CACA,gBAAA,CACA,yBAAA,CACA,eAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,WAAY,EAAC,GAAS,eAC9B,KAAA,CACA,SAAA,CACA,yBAAA,CACA,eAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,WAAY,EAAC,GAAS,eAC9B,KAAA,CACA,UAAA,CACA,yBAAA,CACA,eAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,UAAW,EAAC,GAAS,eAC7B,QAAA,CACA,QAAA,CACA,gBAAA,CACA,sBAAA,CACA,kBAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,WAAY,EAAC,GAAS,eAC9B,QAAA,CACA,SAAA,CACA,sBAAA,CACA,kBAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,WAAY,EAAC,GAAS,eAC9B,QAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,6BAAA,CACA,+BAGF,CAAC,GAAS,UAAW,EAAC,GAAS,eAC7B,OAAA,CACA,OAAA,CACA,eAAA,CACA,uBAAA,CACA,iBAAA,CACA,4BAAA,CACA,gCAGF,CAAC,GAAS,UAAW,EAAC,GAAS,eAC7B,MAAA,CACA,OAAA,CACA,eAAA,CACA,wBAAA,CACA,gBAAA,CACA,4BAAA,CACA,gCClIF,CAAC,GAAS,UACR,oBAAA,CACA,iBAAA,CACA,YAGF,CAAC,GAAS,SAAU,EAAC,GAAS,eAC5B,oBAAA,CACA,WAAA,CACA,WAAA,CACA,gBAAA,CACA,qBAAA,CACA,gBAIF,CAAC,GAAS,SAAU,EAAC,GAAS,MAC5B,oBAAA,CACA,eAAA,CACA,kBAAA,CACA,cAAA,CACA,UAAA,CACA,cAGF,CAAC,GAAS,KACR,aAAA,CACA,OAAA,CACA,WAAA,CACA,wBAAA,CbSA,iCAAA,CACA,0BcvCF,CAAC,GAAS,cACR,iBAAA,CACA,qBAAA,CACA,WAAA,CACA,cAAA,CACA,gBAAA,CACA,kBAAA,CACA,oBAAA,CACA,wDAAA,CACA,SAAA,CACA,sBAGF,CAAC,GAAS,aAAa,CAAC,GAAS,IAC/B,UAGF,CAAC,GAAS,sBACR,wBAAA,CACA,qBAGF,CAAC,GAAS,mBACR,wBAAA,CACA,qBAGF,CAAC,GAAS,sBACR,wBAAA,CACA,qBAGF,CAAC,GAAS,oBACR,wBAAA,CACA,qBAGF,CAAC,GAAS,aAAa,CAAC,GAAS,WAC/B,mBAGF,CAAC,GAAS,aAAc,EAAC,GAAS,KAChC,eAGF,CAAC,GAAS,oBdSR,oBAAA,CACA,wBAAA,CACA,oBAAA,CACA,qBAAA,CACA,gBAAA,CACA,iBAAA,CACA,oBAAA,CACA,YAAA,CcdA,oBAAA,CACA,cAAA,CACA,sBAAA,CACA,iBAAA,CACA,kBAAA,CACA,cAGF,CAAC,GAAS,mBAAoB,GAC5B,yBAAA,CACA,eAGF,CAAC,GAAS,aAAc,EAAC,GAAS,UAChC,iBAGF,CAAC,GAAS,aAAc,EAAC,GAAS,SAAU,EAAC,GAAS,MACpD,eAGF,CAAC,GAAS,aAAc,GAAG,CAAC,GAAS,aAAc,EAAC,GAAS,SAAU,EAAC,GAAS,MAC/E,cAGF,CAAC,GAAS,aAAc,EAAC,GAAS,SAAU,EAAC,GAAS,eACpD,qBAGF,CAAC,GAAS,aAAc,EAAC,GAAS,SAAU,EAAC,GAAS,cAAe,EAAC,GAAS,KAC7E,yBAGF,CAAC,GAAS,qBAAsB,GAAG,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,MAC/F,cAGF,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,eAC5D,qBAGF,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,cAAe,EAAC,GAAS,KACrF,yBAGF,CAAC,GAAS,kBAAmB,GAAG,CAAC,GAAS,kBAAmB,EAAC,GAAS,SAAU,EAAC,GAAS,MACzF,cAGF,CAAC,GAAS,kBAAmB,EAAC,GAAS,SAAU,EAAC,GAAS,eACzD,qBAGF,CAAC,GAAS,kBAAmB,EAAC,GAAS,SAAU,EAAC,GAAS,cAAe,EAAC,GAAS,KAClF,yBAGF,CAAC,GAAS,qBAAsB,GAAG,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,MAC/F,cAGF,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,eAC5D,qBAGF,CAAC,GAAS,qBAAsB,EAAC,GAAS,SAAU,EAAC,GAAS,cAAe,EAAC,GAAS,KACrF,yBAGF,CAAC,GAAS,mBAAoB,GAAG,CAAC,GAAS,mBAAoB,EAAC,GAAS,SAAU,EAAC,GAAS,MAC3F,cAGF,CAAC,GAAS,mBAAoB,EAAC,GAAS,SAAU,EAAC,GAAS,eAC1D,qBAGF,CAAC,GAAS,mBAAoB,EAAC,GAAS,SAAU,EAAC,GAAS,cAAe,EAAC,GAAS,KACnF,yBAGF,CAAC,GAAS,aAAc,EAAC,GAAS,OAChC,iBAAA,CACA,OAAA,CACA,SAAA,CACA,cAAA,CACA,gBAAA,CACA,gBAAA,CACA,aAAA,CACA,eCxIF,CAAC,GAAS,YACR,kBAGF,IAAK,EAAC,GAAS,iBAAkB,CAAC,GAAS,SACzC,kBAGF,CAAC,GAAS,SACR,SAAA,CAAY,WAGd,CAAC,GAAS,eAAe,CAAC,GAAS,YACjC,gBCbF,CAAC,GAAS,KACR,wBAAA,CACA,4DAAA,CACA,iBAAA,CACA,4CAAA,CACA,gBAAA,ChBsCA,oBAAA,CACA,eAAA,CACA,OAAA,CAbA,uBAAA,CACA,oBAAA,CACA,gBgBvBA,CAXD,GAAS,IAWP,OAAQ,CAXV,GAAS,IAWE,QACR,gBAAA,CACA,aAAA,CACA,qBAGF,CAjBD,GAAS,IAiBP,OACC,gBAAA,CACA,aAAA,CACA,qBAGF,CAvBD,GAAS,IAuBP,CAAC,GAAS,SAAU,QAAQ,CAvB9B,GAAS,IAuBsB,CAAC,GAAS,SAAS,MAAO,QACtD,cAAA,ChBQF,uBAAA,CACA,oBAAA,CACA,eAAA,CAjCA,UAAA,CAEA,wBAAA,CACA,OgByBA,CA7BD,GAAS,IA6BP,CAAC,GAAS,QACX,CA9BD,GAAS,IA8BP,CAAC,GAAS,OAAO,OAClB,CA/BD,GAAS,IA+BP,CAAC,GAAS,OAAO,OAClB,CAhCD,GAAS,IAgCP,CAAC,GAAS,OAAO,QhBAlB,uBAAA,CACA,oBAAA,CACA,eAAA,CgBAE,kBAAA,CACA,WAAA,CACA,yBAGF,CAvCD,GAAS,IAuCP,CAAC,GAAS,OAAQ,QAAQ,CAvC5B,GAAS,IAuCoB,CAAC,GAAS,OAAO,MAAO,QACpD,CAxCD,GAAS,IAwCP,CAAC,GAAS,OAAQ,GAAG,CAxCvB,GAAS,IAwCe,CAAC,GAAS,OAAO,MAAO,GAC7C,YAGF,CA5CD,GAAS,IA4CP,MAAO,EAAC,GAAS,OAChB,yBAGF,CAhDD,GAAS,IAgDP,CAAC,GAAS,OAAQ,EAAC,GAAS,OAAQ,CAhDtC,GAAS,IAgD8B,CAAC,GAAS,OAAO,MAAO,EAAC,GAAS,OACtE,uBAIJ,CAAC,GAAS,IAAK,QACb,eAAA,CACA,cAAA,CACA,gBAAA,CACA,iBAAA,CACA,cAAA,CACA,aAAA,CACA,iBAAA,CAGA,gBAAA,CACA,wBACA,CAZD,GAAS,IAAK,OAYZ,mBACC,QAAA,CACA,UAIJ,CAAC,GAAS,IAAK,GACb,yBAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,cAC1B,eAGF,CAAC,GAAS,SACR,WAAA,CACA,4BAAA,CACA,wBAAA,CACA,yBAEA,CAND,GAAS,QAMP,OAAQ,CANV,GAAS,QAME,OACR,wBAAA,CACA,yBAGF,CAXD,GAAS,QAWP,CAAC,GAAS,SAAU,QAAQ,CAX9B,GAAS,QAWsB,CAAC,GAAS,SAAS,MAAO,QACtD,cAAA,ChB3DF,uBAAA,CACA,oBAAA,CACA,eAAA,CAjCA,UAAA,CAEA,wBAAA,CACA,OgB4FA,CAjBD,GAAS,QAiBP,CAAC,GAAS,QAAS,CAjBrB,GAAS,QAiBa,CAAC,GAAS,OAAO,OAAQ,CAjB/C,GAAS,QAiBuC,IAAI,eAAqB,QACtE,wBAAA,ChBjEF,uBAAA,CACA,oBAAA,CACA,gBgBoEF,CAAC,GAAS,QAAS,QAAQ,CAAC,GAAS,QAAS,OAAO,GACnD,WAAA,CACA,yBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,KACvB,iBAAA,CACA,mBAAA,CACA,cAGF,CAAC,GAAS,UAAW,QACnB,gBAAA,CACA,cAAA,CACA,mBAIF,CAAC,GAAS,UAAW,GACnB,eAGF,CAAC,GAAS,UAAW,QACnB,eAAA,CACA,cAAA,CACA,oBAGF,CAAC,GAAS,UAAW,GACnB,gBAAA,CACA,kBAAA,CACA,kBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,OACvB,cAAA,CACA,cAGF,CAAC,GAAS,UAAW,EAAC,GAAS,OAC7B,cAAA,CACA,cAGF,CAAC,GAAS,OhBvGR,oBAAA,CACA,eAAA,CACA,OAAA,CgBuGA,OAAA,CAAU,QAAA,CACV,kBAAA,CACA,4BAAA,CACA,kCAAA,CACA,iCAAA,CACA,QAAS,GAGX,CAAC,GAAS,SAAU,EAAC,GAAS,OAC5B,sBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,IACxB,+BAAA,CACA,aAGF,CAAC,GAAS,UACR,QAAA,CACA,sBAAA,ChBvIA,uBAAA,CACA,oBAAA,CACA,eAAA,CgBwIA,YAGF,CAAC,GAAS,SAAS,OAAQ,CAAC,GAAS,SAAS,CAAC,GAAS,QAAS,CAAC,GAAS,SAAS,OAAQ,CAAC,GAAS,SAAS,QAC7G,QAAA,CACA,kBAAA,CACA,WAAA,ChBhJA,uBAAA,CACA,oBAAA,CACA,gBgBkJF,CAAC,GAAS,aAAc,EAAC,GAAS,KAChC,kBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,IAAK,QAC5B,cC3LF,CAAC,GAAS,QAAS,EAAC,GAAS,WAC3B,QAAA,CACA,cAWF,CAAC,GAAS,UAAW,EAAC,GAAS,KAC7B,gBAAA,CACA,QAAA,CAEA,gBAcF,CAAC,GAAS,UAAU,IAAI,eACtB,6BAAA,CACA,cAAA,CACA,gBAGF,CAAC,GAAS,WAGR,gBAYF,CAAC,GAAS,UAAW,EAAC,GAAS,IAAI,CAAC,GAAS,kBAC3C,SAKF,CAAC,GAAS,IAAK,EAAC,GAAS,UAAW,EAAC,GAAS,KAC5C,aAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,UAAW,EAAC,GAAS,OAC5C,eAGF,CAAC,GAAS,IAAK,EAAC,GAAS,UAAU,IAAI,eACrC,gBAAA,CACA,8BAAA,CACA,iBAAA,CACA,iBCvEF,CAAC,GAAS,UACR,eAGF,CAAC,CAAC,GAAS,YACT,gBAAA,CACA,wBAAA,ClB0BA,uBAAA,CACA,oBAAA,CACA,eAAA,CkBzBA,sBAAA,CACA,iBAAA,CACA,gBAGF,CAAC,GAAS,QAAS,EAAC,CAAC,GAAS,YAC5B,aAAA,CACA,cAAA,CACA,gBAAA,CACA,cAGF,CAAC,GAAS,SAAS,MAAO,EAAC,CAAC,GAAS,YAAa,CAAC,GAAS,SAAS,CAAC,GAAS,MAAO,EAAC,CAAC,GAAS,YAC/F,wBAAA,ClBUA,uBAAA,CACA,oBAAA,CACA,gBkBRF,CAAC,GAAS,SAAS,CAAC,GAAS,SAAU,EAAC,GAAS,OAAQ,CAAC,GAAS,SAAS,CAAC,GAAS,SAAU,EAAC,CAAC,GAAS,YACzG,cAGF,CAAC,GAAS,SAAU,EAAC,GAAS,OAC5B,sBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,UACvB,aAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,CAAC,GAAS,YACxB,iBC1CF,CAAC,GAAS,UACR,iBAAA,CnB0CA,oBAAA,CACA,eAAA,CACA,OAAA,CAbA,uBAAA,CACA,oBAAA,CACA,eAAA,CmB7BA,aAGF,CAAC,GAAS,SAAU,OAClB,wBAAA,CACA,0BAAA,CACA,YAGF,CAAC,GAAS,SAAS,CAAC,GAAS,SAAU,OACrC,cAOF,CAAC,GAAS,SAAU,EAAC,GAAS,KAC5B,wBAAA,CACA,aAAA,CAEA,SAGF,CAAC,GAAS,SAAU,QAClB,iBAAA,CACA,iBAGF,CAAC,GAAS,SAAS,CAAC,GAAS,SAAU,EAAC,GAAS,IAAK,QACpD,cAAA,CnBHA,uBAAA,CACA,oBAAA,CACA,eAAA,CAjCA,UAAA,CAEA,wBAAA,CACA,OmBoCF,CAAC,GAAS,SAAU,EAAC,GAAS,QAC5B,iBAAA,CACA,SAAA,CACA,OAAA,CACA,gBAAA,CACA,eAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,eAGF,CAAC,GAAS,SAAS,CAAC,GAAS,WAAY,OACvC,mBAGF,CAAC,GAAS,SAAS,CAAC,GAAS,SAAU,EAAC,GAAS,QAC/C,WAGF,CAAC,GAAS,SAAU,EAAC,GAAS,OAAO,CAAC,GAAS,WAC7C,cAGF,CAAC,GAAS,SAAU,EAAC,GAAS,OAAO,CAAC,GAAS,aAC7C,cAGF,CAAC,GAAS,KAAK,CAAC,GAAS,eACvB,YAAA,CACA,YAAA,CACA,iBAHF,CAAC,GAAS,KAAK,CAAC,GAAS,cAKvB,EAAC,GAAS,WACR,uBAAA,CACA,eAPJ,CAAC,GAAS,KAAK,CAAC,GAAS,cAUvB,EAAC,GAAS,eACR,UAXJ,CAAC,GAAS,KAAK,CAAC,GAAS,cAcvB,EAAC,GAAS,MACR,eAfJ,CAAC,GAAS,KAAK,CAAC,GAAS,cAkBvB,EAAC,GAAS,gBAlBZ,CAAC,GAAS,KAAK,CAAC,GAAS,cAkBI,EAAC,GAAS,eAAgB,GACnD,eAnBJ,CAAC,GAAS,KAAK,CAAC,GAAS,cAsBvB,EAAC,GAAS,KAAM,GACd,eC5FJ,CAAC,GAAS,SAAU,GAClB,wBAAA,CACA,UAAA,CAAa,YCFf,CAAC,GAAS,YAAa,EAAC,GAAS,KAC/B,kBAGF,CAAC,GAAS,kBACR,WAQF,CAAC,GAAS,YAAa,EAAC,GAAS,SAC/B,iBAAA,CACA,aAAA,CACA,iBAAA,CACA,QAAA,CACA,OAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,UAAA,CACA,UAAA,CACA,gBAGF,CAAC,GAAS,YAAY,CAAC,GAAS,UAAW,EAAC,GAAS,SACnD,iBAAA,CACA,eAAA,CACA,WAmBF,CAAC,GAAS,IAAK,EAAC,GAAS,aACvB,cAGF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAa,EAAC,GAAS,SAC9C,aAAA,CACA,eAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAY,CAAC,GAAS,UAAW,EAAC,GAAS,SAClE,aAAA,CACA,eAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,YAAa,EAAC,GAAS,MAC9C,gBAAA,CACA,iBAAA,CACA,cCpEF,CAAC,GAAS,aACR,iBAAA,CACA,WAAA,CACA,aAGF,CAAC,GAAS,gBACR,iBAAA,CACA,KAAA,CAAQ,MAAA,CACR,SAAA,CACA,WAAA,CACA,wBAAA,CACA,gBAAA,CACA,gBAGF,CAAC,GAAS,qBACR,WAGF,CAAC,GAAS,sBAAuB,CAAC,GAAS,sBACzC,UAAA,CACA,WAAA,CACA,iBAAA,CACA,KAAA,CACA,OAGF,CAAC,GAAS,sBACR,OAAQ,yEAAwE,uBAAuB,YAAvG,CACA,WAAY,6GAAZ,CACA,WAAY,qDAGd,CAAC,GAAS,sBACR,OAAQ,yEAAwE,yBAAyB,UAAzG,CACA,WAAY,6GAAZ,CACA,WAAY,gDAGd,CAAC,GAAS,uBACR,eAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,oBAAA,CACA,sBAAA,CACA,kBAGF,CAAC,GAAS,uBACR,iBAAA,CACA,UAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAGF,CAAC,GAAS,eACR,iBAAA,CACA,KAAA,CAAQ,OAAA,CACR,UAAA,CACA,WAAA,CACA,wBAAA,CACA,iBAGF,CAAC,GAAS,sBACR,eAAA,CACA,iBAAA,CACA,KAAA,CACA,SAAA,CACA,UAAA,CACA,sBAAA,CACA,gBAAA,CACA,UAAA,CACA,YC5EF,CAAC,GAAS,MvB2CR,oBAAA,CACA,eAAA,CACA,OAAA,CuB3CA,WAAA,CACA,kBAAA,CACA,kBAGF,CAAC,GAAS,KAAM,EAAC,GAAS,KACxB,oBAAA,CACA,kBAGF,CAAC,GAAS,KAAM,EAAC,GAAS,WACxB,qBAGF,CAAC,GAAS,WvB2BR,oBAAA,CACA,eAAA,CACA,OAAA,CuB3BA,cAAA,CACA,aAAA,CACA,iBAAA,CACA,yBAGF,CAAC,GAAS,UAAU,OAClB,0BAGF,CAAC,GAAS,UAAU,OAClB,kBAAA,CACA,YAGF,CAAC,GAAS,KAAM,EAAC,GAAS,SACxB,cAAA,CACA,kBAGF,CAAC,GAAS,SAAU,EAAC,GAAS,WAC5B,WAKF,CAAC,GAAS,IAAK,EAAC,GAAS,MACvB,cC7CF,CAAC,GAAS,UACR,uBAIF,CAAC,GAAS,SAAU,EAAG,GAAS,gBAC9B,iBAGF,CAAC,GAAS,gBACR,eAAA,CACA,oBCXF,CAAC,GAAS,YzB2CR,oBAAA,CACA,eAAA,CACA,QyBzCF,CAAC,GAAS,iBACR,kBCLF,CAAC,GAAS,kB1B2CR,oBAAA,CACA,eAAA,CACA,Q0BzCF,CAAC,GAAS,kBACR,qBAGF,CAAC,GAAS,iBAAiB,CAAC,GAAS,MACnC,iBAGF,CAAC,GAAS,aACR,mBAGF,CAAC,GAAS,eAAgB,EAAC,GAAS,aAClC,mBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,aACvB,gBAAA,CACA,cAGF,CAAC,GAAS,IAAK,EAAC,GAAS,kBACvB,qBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,iBAAiB,CAAC,GAAS,MAClD,gBChCF,CAAC,GAAS,QACR,sBAAA,CACA,UAAA,CAAa,YCFf,CAAC,GAAS,S5B2CR,oBAAA,CACA,eAAA,CACA,OAAA,C4B3CA,4CAAA,CACA,eAAA,CACA,qBAJF,CAAC,GAAS,QAMR,KACE,aAAA,CACA,WARJ,CAAC,GAAS,QAMR,IAIE,QACE,iBAAA,CACA,OAAA,CAAU,SAAA,CACV,cAAA,CACA,eAAA,CACA,aAfN,CAAC,GAAS,QAMR,IAYE,OAAM,OACJ,0BAKN,CAAC,GAAS,QAAQ,CAAC,GAAS,SAC1B,KACE,kBAFJ,CAAC,GAAS,QAAQ,CAAC,GAAS,SAK1B,QACE,cAIJ,CAAC,GAAS,QAAQ,CAAC,GAAS,SAC1B,kBAAA,CACA,qBAFF,CAAC,GAAS,QAAQ,CAAC,GAAS,QAI1B,KACE,cAIJ,CAAC,GAAS,QAAQ,CAAC,GAAS,SAC1B,kBAAA,CACA,qBAFF,CAAC,GAAS,QAAQ,CAAC,GAAS,QAI1B,KACE,cAIJ,CAAC,GAAS,QAAQ,CAAC,GAAS,OAC1B,kBAAA,CACA,qBAFF,CAAC,GAAS,QAAQ,CAAC,GAAS,MAI1B,KACE,cAMJ,CAAC,GAAS,IAAK,EAAC,GAAS,QACvB,KACE,gBAAA,CACA,cClEJ,CAAC,GAAS,O7B2CR,oBAAA,CACA,eAAA,CACA,OAAA,C6B3CA,4CAAA,CACA,gBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,YACxB,cAGF,CAAC,GAAS,MAAM,CAAC,GAAS,UACxB,WAGF,CAAC,GAAS,MAAM,CAAC,GAAS,WACxB,qBAGF,CAAC,GAAS,MAAM,CAAC,GAAS,SACxB,cAGF,CAAC,GAAS,MAAM,CAAC,GAAS,SACxB,cAGF,CAAC,GAAS,MAAM,CAAC,GAAS,OACxB,cAKF,CAAC,GAAS,IAAK,EAAC,GAAS,OACvB,gBAAA,CACA,cClCF,CAAC,GAAS,SACR,yBAGF,CAAC,GAAS,QAAS,EAAC,GAAS,SAC3B,wBAAA,CACA,sBAAA,C9B0BA,uBAAA,CACA,oBAAA,CACA,eAAA,C8BzBA,YAGF,CAAC,GAAS,QAAS,EAAC,GAAS,QAAS,OAAO,MAC3C,cAGF,CAAC,GAAS,QAAS,EAAC,GAAS,OAC3B,yBAGF,CAAC,GAAS,QAAS,EAAC,GAAS,OAC3B,EAAC,GAAS,OAD0B,CAAC,GAAS,QAAS,EAAC,GAAS,QAAQ,MACzE,EAAC,GAAS,OACR,yBAIJ,CAAC,GAAS,QAAS,EAAC,GAAS,QAAQ,OAAQ,CAAC,GAAS,QAAS,EAAC,GAAS,QAAQ,CAAC,GAAS,QAAS,CAAC,GAAS,QAAS,EAAC,GAAS,QAAQ,OACxI,oBAAA,CACA,gBAAA,CACA,WAAA,C9BGA,uBAAA,CACA,oBAAA,CACA,gB8BDF,CAAC,GAAS,QAAS,EAAC,GAAS,QAAQ,CAAC,GAAS,QAC7C,kBAAA,CACA,cCnCF,GAAG,CAAC,GAAS,QAAQ,CAAC,GAAS,QAC7B,yBAAA,CACA,cAGF,CAAC,GAAS,QAAS,QACjB,cAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,UAAW,MACrC,eAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,YAAa,MACvC,oBAAA,CACA,iBAAA,CACA,sBAAA,CACA,WAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,YAAY,CAAC,GAAS,UAAW,MAC3D,WAGF,CAAC,GAAS,QAAS,EAAC,GAAS,OAC3B,gBAKF,CAAC,GAAS,IACR,EAAC,GAAS,QAAS,QACjB,aAAA,CACA,iBAHJ,CAAC,GAAS,IAMR,EAAC,GAAS,QAAQ,CAAC,GAAS,YAAa,MACvC,aAAA,CACA,iBCtCJ,CAAC,GAAS,WACR,aAAA,CACA,uBAAA,CACA,UAAA,CACA,kBAAA,CACA,gBAAA,CACA,aAAA,CACA,kBAAA,CACA,cAAA,CACA,kBAAA,CACA,iCAAA,CACA,kBAXF,CAAC,GAAS,UAaR,EAAC,GAAS,OACR,cAAA,CACA,gBAAA,CACA,gCAAA,CACA,mCAAA,CACA,8BAlBJ,CAAC,GAAS,UAqBR,EAAC,GAAS,eACR,oBAAA,CACA,qBAAA,CACA,WAxBJ,CAAC,GAAS,UA2BR,EAAC,GAAS,KACR,kBAGF,CA/BD,GAAS,UA+BP,OAAQ,CA/BV,GAAS,UA+BE,OACR,mBADF,CA/BD,GAAS,UA+BP,MAGC,EAAC,GAAS,eAHH,CA/BV,GAAS,UA+BE,MAGR,EAAC,GAAS,eACR,WAJJ,CA/BD,GAAS,UA+BP,MAOC,EAAC,GAAS,MAPH,CA/BV,GAAS,UA+BE,MAOR,EAAC,GAAS,MAPZ,CA/BD,GAAS,UA+BP,MAOkB,EAAC,GAAS,KAPpB,CA/BV,GAAS,UA+BE,MAOS,EAAC,GAAS,KACzB,cAIJ,CA3CD,GAAS,UA2CP,CAAC,GAAS,UACT,mBADF,CA3CD,GAAS,UA2CP,CAAC,GAAS,SAGT,EAAC,GAAS,MAHZ,CA3CD,GAAS,UA2CP,CAAC,GAAS,SAGQ,EAAC,GAAS,KACzB,cAIJ,CAnDD,GAAS,UAmDP,CAAC,GAAS,OAAO,CAAC,GAAS,kBAC1B,mBADF,CAnDD,GAAS,UAmDP,CAAC,GAAS,OAAO,CAAC,GAAS,iBAG1B,EAAC,GAAS,MAHZ,CAnDD,GAAS,UAmDP,CAAC,GAAS,OAAO,CAAC,GAAS,iBAGT,EAAC,GAAS,KACzB,YAIJ,CA3DD,GAAS,UA2DP,CAAC,GAAS,OAAO,CAAC,GAAS,mBAC1B,EAAC,GAAS,KACR,mBAIJ,CAjED,GAAS,UAiEP,CAAC,GAAS,UAAW,CAjEvB,GAAS,UAiEe,CAAC,GAAS,SAAS,OACxC,iBAEA,CApEH,GAAS,UAiEP,CAAC,GAAS,SAGR,OAAD,CApEH,GAAS,UAiEe,CAAC,GAAS,SAAS,MAGvC,OACC,mBAJJ,CAjED,GAAS,UAiEP,CAAC,GAAS,SAOT,EAAC,GAAS,MAPU,CAjEvB,GAAS,UAiEe,CAAC,GAAS,SAAS,MAOxC,EAAC,GAAS,MAPZ,CAjED,GAAS,UAiEP,CAAC,GAAS,SAOQ,EAAC,GAAS,KAPP,CAjEvB,GAAS,UAiEe,CAAC,GAAS,SAAS,MAOvB,EAAC,GAAS,KACzB,WAIJ,CA7ED,GAAS,UA6EP,CAAC,GAAS,kBAAkB,CAAC,GAAS,QACrC,6BAAA,CACA,iBAFF,CA7ED,GAAS,UA6EP,CAAC,GAAS,kBAAkB,CAAC,GAAS,OAIrC,EAAC,GAAS,MAJZ,CA7ED,GAAS,UA6EP,CAAC,GAAS,kBAAkB,CAAC,GAAS,OAIpB,EAAC,GAAS,KACzB,cAGF,CArFH,GAAS,UA6EP,CAAC,GAAS,kBAAkB,CAAC,GAAS,OAQpC,OACC,mBAKN,CAAC,GAAS,gBACR,UAAA,CACA,eAAA,CACA,sBAAA,CACA,mBAJF,CAAC,GAAS,eAMR,GACE,WAIJ,CAAC,GAAS,oBACR,aAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAGF,CAAC,GAAS,UAAU,MAAO,GAAG,CAAC,GAAS,UAAU,CAAC,GAAS,SAAU,GAAG,CAAC,GAAS,UAAU,MAAO,GAClG,cAGF,GAAG,CAAC,GAAS,KAAM,EAAC,GAAS,eAAgB,CAAC,GAAS,cAAc,OACnE,QAAA,CACA,SAAA,CACA,UAAA,CACA,cAAA,CACA,eAAA,CACA,sBAAA,CACA,uCAAA,CACA,cAAA,CACA,YAGF,GAAG,CAAC,GAAS,KAAM,EAAC,GAAS,UAAW,GACtC,iBAGF,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAChC,CAAC,GAAS,oBAAsB,kBAIhC,CAAC,GAAS,KAAK,CAAC,GAAS,KACvB,cAGF,CAAC,GAAS,IAAK,EAAC,GAAS,WACvB,gBAAA,CACA,aAAA,CACA,0BAGF,CAAC,GAAS,IAAK,EAAC,GAAS,UAAW,EAAC,GAAS,OAC5C,eAAA,CACA,cAAA,CACA,8BAAA,CACA,cAGF,CAAC,GAAS,IAAK,EAAC,GAAS,UAAU,CAAC,GAAS,SAAU,EAAC,GAAS,OAAQ,CAAC,GAAS,IAAK,EAAC,GAAS,UAAU,MAAO,EAAC,GAAS,OAAQ,CAAC,GAAS,IAAK,EAAC,GAAS,UAAU,MAAO,EAAC,GAAS,OACvL,6BAAA,CACA,2BAGF,CAAC,GAAS,IACR,EAAC,GAAS,UAAW,EAAC,GAAS,KAC7B,eAAA,CACA,iBCpKJ,CAAC,GAAS,UACR,iBAAA,CACA,KAAA,CAAQ,MAAA,CACR,UAAA,CAAa,WAAA,CjCFb,UAAA,CAEA,wBAAA,CACA,MAAA,CiCCA,oBlCyO6C,0CkCtO/C,CAAC,GAAS,iBACR,eAAA,CACA,YAGF,CAAC,GAAS,KAAM,EAAC,GAAS,iBACxB,WAAA,CACA,wBCfF,CAAC,GAAS,MACR,iBAAA,CACA,MAAA,CAAS,KAAA,ClC+CT,OAAQ,2DAAR,CACA,sBAAA,CkC9CA,YAAA,CACA,mBAAA,CACA,eAAA,CACA,eAAA,CACA,gBAAA,CACA,wBAAA,CACA,wBAAA,CACA,YAAA,ClCqBA,+CAAA,CACA,4CAAA,CACA,uCAAA,CkCpBA,gBAAA,CACA,aAAA,CACA,kBAEA,CAlBD,GAAS,KAkBP,CAAC,GAAS,SACT,WAAA,CACA,UAAW,eAAe,eAA1B,CACA,0BAGF,CAxBD,GAAS,KAwBP,CAAC,GAAS,WACT,EAAC,GAAS,eADZ,CAxBD,GAAS,KAwBP,CAAC,GAAS,WACiB,EAAC,GAAS,OAClC,iBAAA,CACA,QAKN,CAAC,GAAS,KAAM,GACd,aAGF,CAAC,GAAS,eAAgB,GACxB,qBAIA,CADD,GAAS,KAAK,CAAC,GAAS,GACtB,CAAC,GAAS,SACT,SAAA,CACA,UAAW,WAAW,UAAtB,CACA,iDAIJ,CAAC,GAAS,gBAAkB,qBAC5B,CAAC,GAAS,gBAAkB,oBAC5B,CAAC,GAAS,gBAAkB,oBAC5B,CAAC,GAAS,gBAAkB,mBAI5B,CAAC,GAAS,IACR,EAAC,GAAS,UAAW,EAAC,GAAS,KAC7B,eAAA,CACA,iBAGF,CAND,GAAS,IAMP,CAAC,GAAS,WAAY,EAAC,GAAS,OANnC,CAAC,GAAS,IAMiC,EAAC,GAAS,eACjD,UAAA,CACA,OC/DJ,CAAC,GAAS,QAAS,QACjB,eAAA,CACA,kBAAA,CACA,kBAGF,CAAC,GAAS,QAAS,EAAC,GAAS,OAC3B,iBAAA,CACA,eAAA,CACA,SAAA,CACA,QAKF,CAAC,GAAS,IAAK,EAAC,GAAS,QAAS,EAAC,GAAS,OAC1C,UAAA,CACA,SAGF,CAAC,GAAS,IAAK,EAAC,GAAS,QAAS,QAChC,kBAAA,CACA,kBCxBF,CAAC,GAAS,eAAgB,EAAC,GAAS,cAClC,iBAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,eAAA,CACA,SAGF,CAAC,GAAS,eAAgB,EAAC,GAAS,mBAClC,iBAGF,CAAC,CAAC,GAAS,UACT,cCdF,CAAC,GAAS,WACR,eAAA,CACA,yBCFF,CAAC,GAAS,QAER,wBAAA,CACA,eAAA,CACA,WAAA,CACA,WAAA,CACA,iBAAA,CACA,cAGF,CAAC,GAAS,OAAO,CAAC,GAAS,UACzB,UAAA,CACA,aAGF,CAAC,GAAS,eAER,wBAAA,CACA,kBAAA,CACA,aAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,KAAA,CAAQ,MAAA,CACR,gBAAA,CACA,gBAGF,CAAC,GAAS,cAAc,OACtB,qBC7BF,CAAC,GAAS,QACR,kBCAA,CADD,GAAS,SACP,MAAO,EAAC,GAAS,MAChB,8BAFJ,CAAC,GAAS,SAKR,EAAC,GAAS,MACR,iCAAA,CACA,iBAAA,CACA,iBARJ,CAAC,GAAS,SAWR,EAAC,GAAS,KAAK,OACb,8BAZJ,CAAC,GAAS,SAeR,EAAC,GAAS,KAAK,OAfjB,CAAC,GAAS,SAee,EAAC,GAAS,KAAK,QACpC,8BAGF,CAnBD,GAAS,SAmBP,CAAC,GAAS,OAAO,MAAO,EAAC,GAAS,MACjC,4BAGF,CAvBD,GAAS,SAuBP,CAAC,GAAS,QACT,qBAIJ,CAAC,GAAS,SAAS,CAAC,GAAS,UAAW,EAAC,GAAS,MAChD,oBAKF,CAAC,GAAS,IAAK,EAAC,GAAS,UACvB,aAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,SAAU,QACjC,iBAAA,CACA,iBAGF,CAAC,GAAS,IAAK,EAAC,GAAS,SAAU,EAAC,GAAS,MAC3C,cC7CF,CAAC,GAAS,mBACR,cCDF,CAAC,GAAS,MACR,aAAA,CACA,gCAGF,CAAC,GAAS,MACV,CAAC,GAAS,KAAM,EAAG,GAAS,gBAC1B,gBAGF,CAAC,GAAS,K1CiCR,oBAAA,CACA,eAAA,CACA,OAAA,C0CjCA,wBAAA,CACA,sBAAA,CACA,eAAA,CACA,gBAAA,CACA,4CAAA,CACA,WAAA,CACA,eAGF,CAAC,GAAS,IAAI,OACZ,mBAGF,CAAC,GAAS,IAAI,CAAC,GAAS,QACtB,kBAAA,CACA,+BAAA,CACA,kBAAA,CACA,YAIF,CAAC,GAAS,IAAI,OACZ,cAKF,CAAC,GAAS,IAAK,EAAC,GAAS,MACvB,gBAAA,CACA,cAGF,CAAC,GAAS,IAAK,EAAC,GAAS,KACvB,uBC7CF,CAAC,GAAS,SACR,eAAA,CACA,wBAAA,C3C8BA,uBAAA,CACA,oBAAA,CACA,eAAA,C2C7BA,oBAAA,C3CiCA,2DAAA,CACA,mDAAA,C2ChCA,WAAA,CACA,WAAA,CACA,mBAAA,CACA,oBAAA,CACA,gBAAA,CACA,cAGF,CAAC,GAAS,QAAQ,OAAQ,CAAC,GAAS,QAAQ,CAAC,GAAS,OACpD,oBAAA,C3CgBA,uBAAA,CACA,oBAAA,CACA,gB2CdF,CAAC,GAAS,YAAa,EAAC,GAAS,SAC/B,WAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,WAC1B,WAAA,CACA,YAGF,CAAC,GAAS,QAAQ,CAAC,GAAS,UAC1B,cAKF,CAAC,GAAS,IAAK,EAAC,GAAS,SACvB,gBAAA,CACA,cCrCF,CAAC,GAAS,UACR,sBAAA,CACA,kBAEA,CAJD,GAAS,SAIN,MACA,wBAAA,CACA,oBAAA,CACA,sBAGF,CAVD,GAAS,SAUP,OACC,QAAQ,EAAR,CACA,WAAA,CACA,oBAAA,CACA,sBAGF,CAjBD,GAAS,SAiBP,CAAC,GAAS,U5ChBX,UAAA,CAEA,wBAAA,CACA,O4CgBE,CApBH,GAAS,SAiBP,CAAC,GAAS,SAGR,CAAC,GAAS,WACT,mBCrBN,CAAC,GAAS,cACR,iBAAA,CACA,gBAEA,CAJD,GAAS,aAIN,QACA,iBAAA,CACA,UAGF,CATD,GAAS,aASN,O7CRF,SAAA,CAEA,uBAAA,CACA,MAAA,C6COE,iBAAA,CACA,KAAA,CACA,MAAA,CACA,UAAA,CACA,WAAA,CACA,UChBJ,WACE,YAAa,SAAb,CACA,QAAQ,oBAAR,CACA,QAAQ,4BAA4B,OAAO,yBACrC,sBAAsB,OAAO,YAC7B,qBAAqB,OAAO,gBAC5B,6BAA6B,OAAO,MAH1C,CAIA,kBAAA,CACA,kBAGF,WACE,YAAa,eAAb,CACA,QAAQ,0BAAR,CACA,QAAQ,kCAAkC,OAAO,yBAC3C,4BAA4B,OAAO,YACnC,2BAA2B,OAAO,gBAClC,mCAAmC,OAAO,MAHhD,CAIA,kBAAA,CACA,kBAGF,CAAC,GAAS,KACR,YAAa,eAAb,CACA,iBAAA,CACA,kBAAA,CACA,mBAAA,CACA,cAAA,CACA,gBAAA,CACA,UAAA,CACA,uBAAA,CACA,kCAAA,CACA,iCAAA,CAEA,oBAAA,CACA,oCAAA,CACA,qBAAA,CACA,UAAA,CACA,WAAA,CACA,cAGF,CAAC,GAAS,UAAW,EAAC,GAAS,KAC7B,YAAa,sBAGf,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,eAAe,QAAkB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,MAAM,QAA2B,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,gBAAgB,QAAiB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,iBAAiB,QAAgB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,KAAK,QAA4B,QAAS,QACpD,CAAC,GAAS,eAAe,QAAkB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,eAAe,QAAkB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,eAAe,QAAkB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,gBAAgB,QAAiB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,eAAe,QAAkB,QAAS,QACpD,CAAC,GAAS,MAAM,QAA2B,QAAS,QACpD,CAAC,GAAS,MAAM,QAA2B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,MAAM,QAA2B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,gBAAgB,QAAiB,QAAS,QACpD,CAAC,GAAS,iBAAiB,QAAgB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,kBAAkB,QAAe,QAAS,QACpD,CAAC,GAAS,uBAAuB,QAAU,QAAS,QACpD,CAAC,GAAS,sBAAsB,QAAW,QAAS,QACpD,CAAC,GAAS,uBAAuB,QAAU,QAAS,QACpD,CAAC,GAAS,sBAAsB,QAAW,QAAS,QACpD,CAAC,GAAS,kBAAkB,QAAe,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,kBAAkB,QAAe,QAAS,QACpD,CAAC,GAAS,iBAAiB,QAAgB,QAAS,QACpD,CAAC,GAAS,iBAAiB,QAAgB,QAAS,QACpD,CAAC,GAAS,iBAAiB,QAAgB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,cAAc,QAAmB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,UAAU,QAAuB,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAsB,QAAS,QACpD,CAAC,GAAS,aAAa,QAAoB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,OAAO,QAA0B,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,QAAQ,QAAyB,QAAS,QACpD,CAAC,GAAS,SAAS,QAAwB,QAAS,QACpD,CAAC,GAAS,MAAM,QAA2B,QAAS,QACpD,CAAC,GAAS,YAAY,QAAqB,QAAS,QACpD,CAAC,GAAS,WAAW,QAAS,CAAC,GAAS,WAAW,QACjD,QAAS,QAGX,CAAC,GAAS,UAA2B,eACrC,CAAC,GAAS,YAA2B,kBACrC,CAAC,CAAC,GAAS,aAA0B,gBAAA,CAAmB,gBCjLxD,CAAC,GAAS,IAAK,EAAC,GAAS,WAAY,OACnC"} \ No newline at end of file diff --git a/yunshop-front-master/public/static/app/tinymce4.7.5/tinymce.min.js b/yunshop-front-master/public/static/app/tinymce4.7.5/tinymce.min.js new file mode 100644 index 0000000..5dfb889 --- /dev/null +++ b/yunshop-front-master/public/static/app/tinymce4.7.5/tinymce.min.js @@ -0,0 +1,51264 @@ +// 4.7.5 (2018-01-22) +!(function() { + "use strict"; + var e, + t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v = function(e) { + return function() { + return e; + }; + }, + y = { + noop: function() {}, + noarg: function(e) { + return function() { + return e(); + }; + }, + compose: function(e, t) { + return function() { + return e(t.apply(null, arguments)); + }; + }, + constant: v, + identity: function(e) { + return e; + }, + tripleEquals: function(e, t) { + return e === t; + }, + curry: function(e) { + for ( + var t = new Array(arguments.length - 1), n = 1; + n < arguments.length; + n++ + ) + t[n - 1] = arguments[n]; + return function() { + for (var n = new Array(arguments.length), r = 0; r < n.length; r++) + n[r] = arguments[r]; + var o = t.concat(n); + return e.apply(null, o); + }; + }, + not: function(e) { + return function() { + return !e.apply(null, arguments); + }; + }, + die: function(e) { + return function() { + throw new Error(e); + }; + }, + apply: function(e) { + return e(); + }, + call: function(e) { + e(); + }, + never: v(!1), + always: v(!0) + }, + b = y.never, + C = y.always, + x = function() { + return w; + }, + w = ((r = { + fold: function(e, t) { + return e(); + }, + is: b, + isSome: b, + isNone: C, + getOr: (n = function(e) { + return e; + }), + getOrThunk: (t = function(e) { + return e(); + }), + getOrDie: function(e) { + throw new Error(e || "error: getOrDie called on none."); + }, + or: n, + orThunk: t, + map: x, + ap: x, + each: function() {}, + bind: x, + flatten: x, + exists: b, + forall: C, + filter: x, + equals: (e = function(e) { + return e.isNone(); + }), + equals_: e, + toArray: function() { + return []; + }, + toString: y.constant("none()") + }), + Object.freeze && Object.freeze(r), + r), + N = function(e) { + var t = function() { + return e; + }, + n = function() { + return o; + }, + r = function(t) { + return t(e); + }, + o = { + fold: function(t, n) { + return n(e); + }, + is: function(t) { + return e === t; + }, + isSome: C, + isNone: b, + getOr: t, + getOrThunk: t, + getOrDie: t, + or: n, + orThunk: n, + map: function(t) { + return N(t(e)); + }, + ap: function(t) { + return t.fold(x, function(t) { + return N(t(e)); + }); + }, + each: function(t) { + t(e); + }, + bind: r, + flatten: t, + exists: r, + forall: r, + filter: function(t) { + return t(e) ? o : w; + }, + equals: function(t) { + return t.is(e); + }, + equals_: function(t, n) { + return t.fold(b, function(t) { + return n(e, t); + }); + }, + toArray: function() { + return [e]; + }, + toString: function() { + return "some(" + e + ")"; + } + }; + return o; + }, + E = { + some: N, + none: x, + from: function(e) { + return null === e || e === undefined ? w : N(e); + } + }, + S = + (o = Array.prototype.indexOf) === undefined + ? function(e, t) { + return D(e, t); + } + : function(e, t) { + return o.call(e, t); + }, + k = function(e, t) { + return S(e, t) > -1; + }, + T = function(e, t) { + for (var n = e.length, r = new Array(n), o = 0; o < n; o++) { + var i = e[o]; + r[o] = t(i, o, e); + } + return r; + }, + A = function(e, t) { + for (var n = 0, r = e.length; n < r; n++) t(e[n], n, e); + }, + _ = function(e, t) { + for (var n = e.length - 1; n >= 0; n--) t(e[n], n, e); + }, + B = function(e, t) { + for (var n = [], r = 0, o = e.length; r < o; r++) { + var i = e[r]; + t(i, r, e) && n.push(i); + } + return n; + }, + R = function(e, t) { + for (var n = 0, r = e.length; n < r; n++) + if (t(e[n], n, e)) return E.some(n); + return E.none(); + }, + D = function(e, t) { + for (var n = 0, r = e.length; n < r; ++n) if (e[n] === t) return n; + return -1; + }, + O = Array.prototype.push, + P = function(e) { + for (var t = [], n = 0, r = e.length; n < r; ++n) { + if (!Array.prototype.isPrototypeOf(e[n])) + throw new Error( + "Arr.flatten item " + n + " was not an array, input: " + e + ); + O.apply(t, e[n]); + } + return t; + }, + I = function(e, t) { + for (var n = 0, r = e.length; n < r; ++n) + if (!0 !== t(e[n], n, e)) return !1; + return !0; + }, + L = Array.prototype.slice, + M = { + map: T, + each: A, + eachr: _, + partition: function(e, t) { + for (var n = [], r = [], o = 0, i = e.length; o < i; o++) { + var a = e[o]; + (t(a, o, e) ? n : r).push(a); + } + return { pass: n, fail: r }; + }, + filter: B, + groupBy: function(e, t) { + if (0 === e.length) return []; + for (var n = t(e[0]), r = [], o = [], i = 0, a = e.length; i < a; i++) { + var s = e[i], + u = t(s); + u !== n && (r.push(o), (o = [])), (n = u), o.push(s); + } + return 0 !== o.length && r.push(o), r; + }, + indexOf: function(e, t) { + var n = S(e, t); + return -1 === n ? E.none() : E.some(n); + }, + foldr: function(e, t, n) { + return ( + _(e, function(e) { + n = t(n, e); + }), + n + ); + }, + foldl: function(e, t, n) { + return ( + A(e, function(e) { + n = t(n, e); + }), + n + ); + }, + find: function(e, t) { + for (var n = 0, r = e.length; n < r; n++) { + var o = e[n]; + if (t(o, n, e)) return E.some(o); + } + return E.none(); + }, + findIndex: R, + flatten: P, + bind: function(e, t) { + var n = T(e, t); + return P(n); + }, + forall: I, + exists: function(e, t) { + return R(e, t).isSome(); + }, + contains: k, + equal: function(e, t) { + return ( + e.length === t.length && + I(e, function(e, n) { + return e === t[n]; + }) + ); + }, + reverse: function(e) { + var t = L.call(e, 0); + return t.reverse(), t; + }, + chunk: function(e, t) { + for (var n = [], r = 0; r < e.length; r += t) { + var o = e.slice(r, r + t); + n.push(o); + } + return n; + }, + difference: function(e, t) { + return B(e, function(e) { + return !k(t, e); + }); + }, + mapToObject: function(e, t) { + for (var n = {}, r = 0, o = e.length; r < o; r++) { + var i = e[r]; + n[String(i)] = t(i, r); + } + return n; + }, + pure: function(e) { + return [e]; + }, + sort: function(e, t) { + var n = L.call(e, 0); + return n.sort(t), n; + }, + range: function(e, t) { + for (var n = [], r = 0; r < e; r++) n.push(t(r)); + return n; + }, + head: function(e) { + return 0 === e.length ? E.none() : E.some(e[0]); + }, + last: function(e) { + return 0 === e.length ? E.none() : E.some(e[e.length - 1]); + } + }, + F = "undefined" != typeof window ? window : Function("return this;")(), + z = function(e, t) { + for ( + var n = t !== undefined && null !== t ? t : F, r = 0; + r < e.length && n !== undefined && null !== n; + ++r + ) + n = n[e[r]]; + return n; + }, + U = function(e, t) { + var n = e.split("."); + return z(n, t); + }, + V = function(e, t) { + var n = U(e, t); + if (n === undefined || null === n) + throw e + " not available on this browser"; + return n; + }, + H = function() { + return V("URL"); + }, + q = function(e) { + return H().createObjectURL(e); + }, + j = function(e) { + H().revokeObjectURL(e); + }, + $ = navigator, + W = $.userAgent, + K = function(e) { + return "matchMedia" in window && matchMedia(e).matches; + }; + (d = /Android/.test(W)), + (a = + (a = + !(i = /WebKit/.test(W)) && + /MSIE/gi.test(W) && + /Explorer/gi.test($.appName)) && /MSIE (\w+)\./.exec(W)[1]), + (s = + -1 !== W.indexOf("Trident/") && + (-1 !== W.indexOf("rv:") || -1 !== $.appName.indexOf("Netscape")) && + 11), + (u = -1 !== W.indexOf("Edge/") && !a && !s && 12), + (a = a || s || u), + (c = !i && !s && /Gecko/.test(W)), + (l = -1 !== W.indexOf("Mac")), + (f = /(iPad|iPhone)/.test(W)), + (m = + "FormData" in window && "FileReader" in window && "URL" in window && !!q), + (p = K("only screen and (max-device-width: 480px)") && (d || f)), + (g = K("only screen and (min-width: 800px)") && (d || f)), + (h = -1 !== W.indexOf("Windows Phone")), + u && (i = !1); + var X, + Y, + G, + J, + Q, + Z, + ee, + te, + ne, + re, + oe, + ie, + ae, + se, + ue, + ce, + le, + fe, + de, + me = { + opera: !1, + webkit: i, + ie: a, + gecko: c, + mac: l, + iOS: f, + android: d, + contentEditable: + !f || m || parseInt(W.match(/AppleWebKit\/(\d*)/)[1], 10) >= 534, + transparentSrc: + "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", + caretAfter: 8 !== a, + range: window.getSelection && "Range" in window, + documentMode: a && !u ? document.documentMode || 7 : 10, + fileApi: m, + ceFalse: !1 === a || a > 8, + cacheSuffix: "", + container: null, + overrideViewPort: null, + experimentalShadowDom: !1, + canHaveCSP: !1 === a || a > 11, + desktop: !p && !g, + windowsPhone: h + }, + pe = window.Promise + ? window.Promise + : (function() { + function e(e, t) { + return function() { + e.apply(t, arguments); + }; + } + var t = + Array.isArray || + function(e) { + return "[object Array]" === Object.prototype.toString.call(e); + }, + n = function(t) { + if ("object" != typeof this) + throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof t) throw new TypeError("not a function"); + (this._state = null), + (this._value = null), + (this._deferreds = []), + u(t, e(i, this), e(a, this)); + }, + r = + n.immediateFn || + ("function" == typeof setImmediate && setImmediate) || + function(e) { + setTimeout(e, 1); + }; + function o(e) { + var t = this; + null !== this._state + ? r(function() { + var n = t._state ? e.onFulfilled : e.onRejected; + if (null !== n) { + var r; + try { + r = n(t._value); + } catch (o) { + return void e.reject(o); + } + e.resolve(r); + } else (t._state ? e.resolve : e.reject)(t._value); + }) + : this._deferreds.push(e); + } + function i(t) { + try { + if (t === this) + throw new TypeError( + "A promise cannot be resolved with itself." + ); + if (t && ("object" == typeof t || "function" == typeof t)) { + var n = t.then; + if ("function" == typeof n) + return void u(e(n, t), e(i, this), e(a, this)); + } + (this._state = !0), (this._value = t), s.call(this); + } catch (r) { + a.call(this, r); + } + } + function a(e) { + (this._state = !1), (this._value = e), s.call(this); + } + function s() { + for (var e = 0, t = this._deferreds.length; e < t; e++) + o.call(this, this._deferreds[e]); + this._deferreds = null; + } + function u(e, t, n) { + var r = !1; + try { + e( + function(e) { + r || ((r = !0), t(e)); + }, + function(e) { + r || ((r = !0), n(e)); + } + ); + } catch (o) { + if (r) return; + (r = !0), n(o); + } + } + return ( + (n.prototype["catch"] = function(e) { + return this.then(null, e); + }), + (n.prototype.then = function(e, t) { + var r = this; + return new n(function(n, i) { + o.call( + r, + new function(e, t, n, r) { + (this.onFulfilled = "function" == typeof e ? e : null), + (this.onRejected = "function" == typeof t ? t : null), + (this.resolve = n), + (this.reject = r); + }(e, t, n, i) + ); + }); + }), + (n.all = function() { + var e = Array.prototype.slice.call( + 1 === arguments.length && t(arguments[0]) + ? arguments[0] + : arguments + ); + return new n(function(t, n) { + if (0 === e.length) return t([]); + var r = e.length; + function o(i, a) { + try { + if (a && ("object" == typeof a || "function" == typeof a)) { + var s = a.then; + if ("function" == typeof s) + return void s.call( + a, + function(e) { + o(i, e); + }, + n + ); + } + (e[i] = a), 0 == --r && t(e); + } catch (u) { + n(u); + } + } + for (var i = 0; i < e.length; i++) o(i, e[i]); + }); + }), + (n.resolve = function(e) { + return e && "object" == typeof e && e.constructor === n + ? e + : new n(function(t) { + t(e); + }); + }), + (n.reject = function(e) { + return new n(function(t, n) { + n(e); + }); + }), + (n.race = function(e) { + return new n(function(t, n) { + for (var r = 0, o = e.length; r < o; r++) e[r].then(t, n); + }); + }), + n + ); + })(), + ge = function(e, t) { + return "number" != typeof t && (t = 0), setTimeout(e, t); + }, + he = function(e, t) { + return "number" != typeof t && (t = 1), setInterval(e, t); + }, + ve = function(e, t) { + var n, r; + return ( + ((r = function() { + var r = arguments; + clearTimeout(n), + (n = ge(function() { + e.apply(this, r); + }, t)); + }).stop = function() { + clearTimeout(n); + }), + r + ); + }, + ye = { + requestAnimationFrame: function(e, t) { + X + ? X.then(e) + : (X = new pe(function(e) { + t || (t = document.body), + (function(e, t) { + var n, + r = window.requestAnimationFrame, + o = ["ms", "moz", "webkit"]; + for (n = 0; n < o.length && !r; n++) + r = window[o[n] + "RequestAnimationFrame"]; + r || + (r = function(e) { + window.setTimeout(e, 0); + }), + r(e, t); + })(e, t); + }).then(e)); + }, + setTimeout: ge, + setInterval: he, + setEditorTimeout: function(e, t, n) { + return ge(function() { + e.removed || t(); + }, n); + }, + setEditorInterval: function(e, t, n) { + var r; + return (r = he(function() { + e.removed ? clearInterval(r) : t(); + }, n)); + }, + debounce: ve, + throttle: ve, + clearInterval: function(e) { + return clearInterval(e); + }, + clearTimeout: function(e) { + return clearTimeout(e); + } + }, + be = /^(?:mouse|contextmenu)|click/, + Ce = { + keyLocation: 1, + layerX: 1, + layerY: 1, + returnValue: 1, + webkitMovementX: 1, + webkitMovementY: 1, + keyIdentifier: 1 + }, + xe = function() { + return !1; + }, + we = function() { + return !0; + }, + Ne = function(e, t, n, r) { + e.addEventListener + ? e.addEventListener(t, n, r || !1) + : e.attachEvent && e.attachEvent("on" + t, n); + }, + Ee = function(e, t, n, r) { + e.removeEventListener + ? e.removeEventListener(t, n, r || !1) + : e.detachEvent && e.detachEvent("on" + t, n); + }, + Se = function(e, t) { + var n, + r, + o, + i, + a, + s, + u = t || {}; + for (n in e) Ce[n] || (u[n] = e[n]); + if ( + (u.target || (u.target = u.srcElement || document), + me.experimentalShadowDom && + (u.target = ((r = e), + (o = u.target), + (a = o), + (i = r.path) && i.length > 0 && (a = i[0]), + r.deepPath && (i = r.deepPath()) && i.length > 0 && (a = i[0]), + a)), + e && + be.test(e.type) && + e.pageX === undefined && + e.clientX !== undefined) + ) { + var c = u.target.ownerDocument || document, + l = c.documentElement, + f = c.body; + (u.pageX = + e.clientX + + ((l && l.scrollLeft) || (f && f.scrollLeft) || 0) - + ((l && l.clientLeft) || (f && f.clientLeft) || 0)), + (u.pageY = + e.clientY + + ((l && l.scrollTop) || (f && f.scrollTop) || 0) - + ((l && l.clientTop) || (f && f.clientTop) || 0)); + } + return ( + (u.preventDefault = function() { + (u.isDefaultPrevented = we), + e && (e.preventDefault ? e.preventDefault() : (e.returnValue = !1)); + }), + (u.stopPropagation = function() { + (u.isPropagationStopped = we), + e && + (e.stopPropagation ? e.stopPropagation() : (e.cancelBubble = !0)); + }), + (u.stopImmediatePropagation = function() { + (u.isImmediatePropagationStopped = we), u.stopPropagation(); + }), + 0 == + ((s = u).isDefaultPrevented === we || s.isDefaultPrevented === xe) && + ((u.isDefaultPrevented = xe), + (u.isPropagationStopped = xe), + (u.isImmediatePropagationStopped = xe)), + "undefined" == typeof u.metaKey && (u.metaKey = !1), + u + ); + }, + ke = function(e, t, n) { + var r = e.document, + o = { type: "ready" }; + if (n.domLoaded) t(o); + else { + var i = function() { + return ( + "complete" === r.readyState || + ("interactive" === r.readyState && r.body) + ); + }, + a = function() { + n.domLoaded || ((n.domLoaded = !0), t(o)); + }, + s = function() { + i() && (Ee(r, "readystatechange", s), a()); + }, + u = function() { + try { + r.documentElement.doScroll("left"); + } catch (e) { + return void ye.setTimeout(u); + } + a(); + }; + !r.addEventListener || (me.ie && me.ie < 11) + ? (Ne(r, "readystatechange", s), + r.documentElement.doScroll && e.self === e.top && u()) + : i() + ? a() + : Ne(e, "DOMContentLoaded", a), + Ne(e, "load", a); + } + }, + Te = function() { + var e, + t, + n, + r, + o, + i = this, + a = {}; + (t = "mce-data-" + (+new Date()).toString(32)), + (r = "onmouseenter" in document.documentElement), + (n = "onfocusin" in document.documentElement), + (o = { mouseenter: "mouseover", mouseleave: "mouseout" }), + (e = 1), + (i.domLoaded = !1), + (i.events = a); + var s = function(e, t) { + var n, + r, + o, + i, + s = a[t]; + if ((n = s && s[e.type])) + for (r = 0, o = n.length; r < o; r++) + if ( + ((i = n[r]) && + !1 === i.func.call(i.scope, e) && + e.preventDefault(), + e.isImmediatePropagationStopped()) + ) + return; + }; + (i.bind = function(u, c, l, f) { + var d, + m, + p, + g, + h, + v, + y, + b = window, + C = function(e) { + s(Se(e || b.event), d); + }; + if (u && 3 !== u.nodeType && 8 !== u.nodeType) { + for ( + u[t] ? (d = u[t]) : ((d = e++), (u[t] = d), (a[d] = {})), + f = f || u, + p = (c = c.split(" ")).length; + p--; + + ) + (v = C), + (h = y = !1), + "DOMContentLoaded" === (g = c[p]) && (g = "ready"), + i.domLoaded && "ready" === g && "complete" === u.readyState + ? l.call(f, Se({ type: g })) + : (r || + ((h = o[g]) && + (v = function(e) { + var t, n; + if ( + ((t = e.currentTarget), + (n = e.relatedTarget) && t.contains) + ) + n = t.contains(n); + else for (; n && n !== t; ) n = n.parentNode; + n || + (((e = Se(e || b.event)).type = + "mouseout" === e.type + ? "mouseleave" + : "mouseenter"), + (e.target = t), + s(e, d)); + })), + n || + ("focusin" !== g && "focusout" !== g) || + ((y = !0), + (h = "focusin" === g ? "focus" : "blur"), + (v = function(e) { + ((e = Se(e || b.event)).type = + "focus" === e.type ? "focusin" : "focusout"), + s(e, d); + })), + (m = a[d][g]) + ? "ready" === g && i.domLoaded + ? l({ type: g }) + : m.push({ func: l, scope: f }) + : ((a[d][g] = m = [{ func: l, scope: f }]), + (m.fakeName = h), + (m.capture = y), + (m.nativeHandler = v), + "ready" === g ? ke(u, v, i) : Ne(u, h || g, v, y))); + return (u = m = 0), l; + } + }), + (i.unbind = function(e, n, r) { + var o, s, u, c, l, f; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return i; + if ((o = e[t])) { + if (((f = a[o]), n)) { + for (u = (n = n.split(" ")).length; u--; ) + if ((s = f[(l = n[u])])) { + if (r) + for (c = s.length; c--; ) + if (s[c].func === r) { + var d = s.nativeHandler, + m = s.fakeName, + p = s.capture; + ((s = s + .slice(0, c) + .concat(s.slice(c + 1))).nativeHandler = d), + (s.fakeName = m), + (s.capture = p), + (f[l] = s); + } + (r && 0 !== s.length) || + (delete f[l], + Ee(e, s.fakeName || l, s.nativeHandler, s.capture)); + } + } else { + for (l in f) + (s = f[l]), Ee(e, s.fakeName || l, s.nativeHandler, s.capture); + f = {}; + } + for (l in f) return i; + delete a[o]; + try { + delete e[t]; + } catch (g) { + e[t] = null; + } + } + return i; + }), + (i.fire = function(e, n, r) { + var o; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return i; + ((r = Se(null, r)).type = n), (r.target = e); + do { + (o = e[t]) && s(r, o), + (e = + e.parentNode || + e.ownerDocument || + e.defaultView || + e.parentWindow); + } while (e && !r.isPropagationStopped()); + return i; + }), + (i.clean = function(e) { + var n, + r, + o = i.unbind; + if (!e || 3 === e.nodeType || 8 === e.nodeType) return i; + if ( + (e[t] && o(e), + e.getElementsByTagName || (e = e.document), + e && e.getElementsByTagName) + ) + for (o(e), n = (r = e.getElementsByTagName("*")).length; n--; ) + (e = r[n])[t] && o(e); + return i; + }), + (i.destroy = function() { + a = {}; + }), + (i.cancel = function(e) { + return e && (e.preventDefault(), e.stopImmediatePropagation()), !1; + }); + }; + (Te.Event = new Te()).bind(window, "ready", function() {}); + var Ae = "sizzle" + -new Date(), + _e = window.document, + Be = 0, + Re = 0, + De = ft(), + Oe = ft(), + Pe = ft(), + Ie = function(e, t) { + return e === t && (ie = !0), 0; + }, + Le = typeof undefined, + Me = 1 << 31, + Fe = {}.hasOwnProperty, + ze = [], + Ue = ze.pop, + Ve = ze.push, + He = ze.push, + qe = ze.slice, + je = + ze.indexOf || + function(e) { + for (var t = 0, n = this.length; t < n; t++) + if (this[t] === e) return t; + return -1; + }, + $e = "[\\x20\\t\\r\\n\\f]", + We = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + Ke = + "\\[" + + $e + + "*(" + + We + + ")(?:" + + $e + + "*([*^$|!~]?=)" + + $e + + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + + We + + "))|)" + + $e + + "*\\]", + Xe = + ":(" + + We + + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + + Ke + + ")*)|.*)\\)|)", + Ye = new RegExp("^" + $e + "+|((?:^|[^\\\\])(?:\\\\.)*)" + $e + "+$", "g"), + Ge = new RegExp("^" + $e + "*," + $e + "*"), + Je = new RegExp("^" + $e + "*([>+~]|" + $e + ")" + $e + "*"), + Qe = new RegExp("=" + $e + "*([^\\]'\"]*?)" + $e + "*\\]", "g"), + Ze = new RegExp(Xe), + et = new RegExp("^" + We + "$"), + tt = { + ID: new RegExp("^#(" + We + ")"), + CLASS: new RegExp("^\\.(" + We + ")"), + TAG: new RegExp("^(" + We + "|[*])"), + ATTR: new RegExp("^" + Ke), + PSEUDO: new RegExp("^" + Xe), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + $e + + "*(even|odd|(([+-]|)(\\d*)n|)" + + $e + + "*(?:([+-]|)" + + $e + + "*(\\d+)|))" + + $e + + "*\\)|)", + "i" + ), + bool: new RegExp( + "^(?:checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", + "i" + ), + needsContext: new RegExp( + "^" + + $e + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + $e + + "*((?:-\\d)?\\d*)" + + $e + + "*\\)|)(?=[^-]|$)", + "i" + ) + }, + nt = /^(?:input|select|textarea|button)$/i, + rt = /^h\d$/i, + ot = /^[^{]+\{\s*\[native \w/, + it = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + at = /[+~]/, + st = /'|\\/g, + ut = new RegExp("\\\\([\\da-f]{1,6}" + $e + "?|(" + $e + ")|.)", "ig"), + ct = function(e, t, n) { + var r = "0x" + t - 65536; + return r != r || n + ? t + : r < 0 + ? String.fromCharCode(r + 65536) + : String.fromCharCode((r >> 10) | 55296, (1023 & r) | 56320); + }; + try { + He.apply((ze = qe.call(_e.childNodes)), _e.childNodes), + ze[_e.childNodes.length].nodeType; + } catch (yC) { + He = { + apply: ze.length + ? function(e, t) { + Ve.apply(e, qe.call(t)); + } + : function(e, t) { + for (var n = e.length, r = 0; (e[n++] = t[r++]); ); + e.length = n - 1; + } + }; + } + var lt = function(e, t, n, r) { + var o, i, a, s, u, c, l, f, d, m; + if ( + ((t ? t.ownerDocument || t : _e) !== se && ae(t), + (t = t || se), + (n = n || []), + !e || "string" != typeof e) + ) + return n; + if (1 !== (s = t.nodeType) && 9 !== s) return []; + if (ce && !r) { + if ((o = it.exec(e))) + if ((a = o[1])) { + if (9 === s) { + if (!(i = t.getElementById(a)) || !i.parentNode) return n; + if (i.id === a) return n.push(i), n; + } else if ( + t.ownerDocument && + (i = t.ownerDocument.getElementById(a)) && + de(t, i) && + i.id === a + ) + return n.push(i), n; + } else { + if (o[2]) return He.apply(n, t.getElementsByTagName(e)), n; + if ((a = o[3]) && G.getElementsByClassName) + return He.apply(n, t.getElementsByClassName(a)), n; + } + if (G.qsa && (!le || !le.test(e))) { + if ( + ((f = l = Ae), + (d = t), + (m = 9 === s && e), + 1 === s && "object" !== t.nodeName.toLowerCase()) + ) { + for ( + c = ee(e), + (l = t.getAttribute("id")) + ? (f = l.replace(st, "\\$&")) + : t.setAttribute("id", f), + f = "[id='" + f + "'] ", + u = c.length; + u--; + + ) + c[u] = f + bt(c[u]); + (d = (at.test(e) && vt(t.parentNode)) || t), (m = c.join(",")); + } + if (m) + try { + return He.apply(n, d.querySelectorAll(m)), n; + } catch (p) { + } finally { + l || t.removeAttribute("id"); + } + } + } + return ne(e.replace(Ye, "$1"), t, n, r); + }; + function ft() { + var e = []; + return function t(n, r) { + return ( + e.push(n + " ") > J.cacheLength && delete t[e.shift()], (t[n + " "] = r) + ); + }; + } + function dt(e) { + return (e[Ae] = !0), e; + } + function mt(e, t) { + var n = t && e, + r = + n && + 1 === e.nodeType && + 1 === t.nodeType && + (~t.sourceIndex || Me) - (~e.sourceIndex || Me); + if (r) return r; + if (n) for (; (n = n.nextSibling); ) if (n === t) return -1; + return e ? 1 : -1; + } + function pt(e) { + return function(t) { + return "input" === t.nodeName.toLowerCase() && t.type === e; + }; + } + function gt(e) { + return function(t) { + var n = t.nodeName.toLowerCase(); + return ("input" === n || "button" === n) && t.type === e; + }; + } + function ht(e) { + return dt(function(t) { + return ( + (t = +t), + dt(function(n, r) { + for (var o, i = e([], n.length, t), a = i.length; a--; ) + n[(o = i[a])] && (n[o] = !(r[o] = n[o])); + }) + ); + }); + } + function vt(e) { + return e && typeof e.getElementsByTagName !== Le && e; + } + for (Y in ((G = lt.support = {}), + (Z = lt.isXML = function(e) { + var t = e && (e.ownerDocument || e).documentElement; + return !!t && "HTML" !== t.nodeName; + }), + (ae = lt.setDocument = function(e) { + var t, + n = e ? e.ownerDocument || e : _e, + r = n.defaultView; + return n !== se && 9 === n.nodeType && n.documentElement + ? ((se = n), + (ue = n.documentElement), + (ce = !Z(n)), + r && + r !== + (function(e) { + try { + return e.top; + } catch (t) {} + return null; + })(r) && + (r.addEventListener + ? r.addEventListener( + "unload", + function() { + ae(); + }, + !1 + ) + : r.attachEvent && + r.attachEvent("onunload", function() { + ae(); + })), + (G.attributes = !0), + (G.getElementsByTagName = !0), + (G.getElementsByClassName = ot.test(n.getElementsByClassName)), + (G.getById = !0), + (J.find.ID = function(e, t) { + if (typeof t.getElementById !== Le && ce) { + var n = t.getElementById(e); + return n && n.parentNode ? [n] : []; + } + }), + (J.filter.ID = function(e) { + var t = e.replace(ut, ct); + return function(e) { + return e.getAttribute("id") === t; + }; + }), + (J.find.TAG = G.getElementsByTagName + ? function(e, t) { + if (typeof t.getElementsByTagName !== Le) + return t.getElementsByTagName(e); + } + : function(e, t) { + var n, + r = [], + o = 0, + i = t.getElementsByTagName(e); + if ("*" === e) { + for (; (n = i[o++]); ) 1 === n.nodeType && r.push(n); + return r; + } + return i; + }), + (J.find.CLASS = + G.getElementsByClassName && + function(e, t) { + if (ce) return t.getElementsByClassName(e); + }), + (fe = []), + (le = []), + (G.disconnectedMatch = !0), + (le = le.length && new RegExp(le.join("|"))), + (fe = fe.length && new RegExp(fe.join("|"))), + (t = ot.test(ue.compareDocumentPosition)), + (de = + t || ot.test(ue.contains) + ? function(e, t) { + var n = 9 === e.nodeType ? e.documentElement : e, + r = t && t.parentNode; + return ( + e === r || + !( + !r || + 1 !== r.nodeType || + !(n.contains + ? n.contains(r) + : e.compareDocumentPosition && + 16 & e.compareDocumentPosition(r)) + ) + ); + } + : function(e, t) { + if (t) for (; (t = t.parentNode); ) if (t === e) return !0; + return !1; + }), + (Ie = t + ? function(e, t) { + if (e === t) return (ie = !0), 0; + var r = !e.compareDocumentPosition - !t.compareDocumentPosition; + return ( + r || + (1 & + (r = + (e.ownerDocument || e) === (t.ownerDocument || t) + ? e.compareDocumentPosition(t) + : 1) || + (!G.sortDetached && t.compareDocumentPosition(e) === r) + ? e === n || (e.ownerDocument === _e && de(_e, e)) + ? -1 + : t === n || (t.ownerDocument === _e && de(_e, t)) + ? 1 + : oe + ? je.call(oe, e) - je.call(oe, t) + : 0 + : 4 & r + ? -1 + : 1) + ); + } + : function(e, t) { + if (e === t) return (ie = !0), 0; + var r, + o = 0, + i = e.parentNode, + a = t.parentNode, + s = [e], + u = [t]; + if (!i || !a) + return e === n + ? -1 + : t === n + ? 1 + : i + ? -1 + : a + ? 1 + : oe + ? je.call(oe, e) - je.call(oe, t) + : 0; + if (i === a) return mt(e, t); + for (r = e; (r = r.parentNode); ) s.unshift(r); + for (r = t; (r = r.parentNode); ) u.unshift(r); + for (; s[o] === u[o]; ) o++; + return o + ? mt(s[o], u[o]) + : s[o] === _e + ? -1 + : u[o] === _e + ? 1 + : 0; + }), + n) + : se; + }), + (lt.matches = function(e, t) { + return lt(e, null, null, t); + }), + (lt.matchesSelector = function(e, t) { + if ( + ((e.ownerDocument || e) !== se && ae(e), + (t = t.replace(Qe, "='$1']")), + G.matchesSelector && ce && (!fe || !fe.test(t)) && (!le || !le.test(t))) + ) + try { + var n = (void 0).call(e, t); + if ( + n || + G.disconnectedMatch || + (e.document && 11 !== e.document.nodeType) + ) + return n; + } catch (yC) {} + return lt(t, se, null, [e]).length > 0; + }), + (lt.contains = function(e, t) { + return (e.ownerDocument || e) !== se && ae(e), de(e, t); + }), + (lt.attr = function(e, t) { + (e.ownerDocument || e) !== se && ae(e); + var n = J.attrHandle[t.toLowerCase()], + r = + n && Fe.call(J.attrHandle, t.toLowerCase()) ? n(e, t, !ce) : undefined; + return r !== undefined + ? r + : G.attributes || !ce + ? e.getAttribute(t) + : (r = e.getAttributeNode(t)) && r.specified + ? r.value + : null; + }), + (lt.error = function(e) { + throw new Error("Syntax error, unrecognized expression: " + e); + }), + (lt.uniqueSort = function(e) { + var t, + n = [], + r = 0, + o = 0; + if ( + ((ie = !G.detectDuplicates), + (oe = !G.sortStable && e.slice(0)), + e.sort(Ie), + ie) + ) { + for (; (t = e[o++]); ) t === e[o] && (r = n.push(o)); + for (; r--; ) e.splice(n[r], 1); + } + return (oe = null), e; + }), + (Q = lt.getText = function(e) { + var t, + n = "", + r = 0, + o = e.nodeType; + if (o) { + if (1 === o || 9 === o || 11 === o) { + if ("string" == typeof e.textContent) return e.textContent; + for (e = e.firstChild; e; e = e.nextSibling) n += Q(e); + } else if (3 === o || 4 === o) return e.nodeValue; + } else for (; (t = e[r++]); ) n += Q(t); + return n; + }), + ((J = lt.selectors = { + cacheLength: 50, + createPseudo: dt, + match: tt, + attrHandle: {}, + find: {}, + relative: { + ">": { dir: "parentNode", first: !0 }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: !0 }, + "~": { dir: "previousSibling" } + }, + preFilter: { + ATTR: function(e) { + return ( + (e[1] = e[1].replace(ut, ct)), + (e[3] = (e[3] || e[4] || e[5] || "").replace(ut, ct)), + "~=" === e[2] && (e[3] = " " + e[3] + " "), + e.slice(0, 4) + ); + }, + CHILD: function(e) { + return ( + (e[1] = e[1].toLowerCase()), + "nth" === e[1].slice(0, 3) + ? (e[3] || lt.error(e[0]), + (e[4] = +(e[4] + ? e[5] + (e[6] || 1) + : 2 * ("even" === e[3] || "odd" === e[3]))), + (e[5] = +(e[7] + e[8] || "odd" === e[3]))) + : e[3] && lt.error(e[0]), + e + ); + }, + PSEUDO: function(e) { + var t, + n = !e[6] && e[2]; + return tt.CHILD.test(e[0]) + ? null + : (e[3] + ? (e[2] = e[4] || e[5] || "") + : n && + Ze.test(n) && + (t = ee(n, !0)) && + (t = n.indexOf(")", n.length - t) - n.length) && + ((e[0] = e[0].slice(0, t)), (e[2] = n.slice(0, t))), + e.slice(0, 3)); + } + }, + filter: { + TAG: function(e) { + var t = e.replace(ut, ct).toLowerCase(); + return "*" === e + ? function() { + return !0; + } + : function(e) { + return e.nodeName && e.nodeName.toLowerCase() === t; + }; + }, + CLASS: function(e) { + var t = De[e + " "]; + return ( + t || + ((t = new RegExp("(^|" + $e + ")" + e + "(" + $e + "|$)")) && + De(e, function(e) { + return t.test( + ("string" == typeof e.className && e.className) || + (typeof e.getAttribute !== Le && e.getAttribute("class")) || + "" + ); + })) + ); + }, + ATTR: function(e, t, n) { + return function(r) { + var o = lt.attr(r, e); + return null == o + ? "!=" === t + : !t || + ((o += ""), + "=" === t + ? o === n + : "!=" === t + ? o !== n + : "^=" === t + ? n && 0 === o.indexOf(n) + : "*=" === t + ? n && o.indexOf(n) > -1 + : "$=" === t + ? n && o.slice(-n.length) === n + : "~=" === t + ? (" " + o + " ").indexOf(n) > -1 + : "|=" === t && + (o === n || o.slice(0, n.length + 1) === n + "-")); + }; + }, + CHILD: function(e, t, n, r, o) { + var i = "nth" !== e.slice(0, 3), + a = "last" !== e.slice(-4), + s = "of-type" === t; + return 1 === r && 0 === o + ? function(e) { + return !!e.parentNode; + } + : function(t, n, u) { + var c, + l, + f, + d, + m, + p, + g = i !== a ? "nextSibling" : "previousSibling", + h = t.parentNode, + v = s && t.nodeName.toLowerCase(), + y = !u && !s; + if (h) { + if (i) { + for (; g; ) { + for (f = t; (f = f[g]); ) + if (s ? f.nodeName.toLowerCase() === v : 1 === f.nodeType) + return !1; + p = g = "only" === e && !p && "nextSibling"; + } + return !0; + } + if (((p = [a ? h.firstChild : h.lastChild]), a && y)) { + for ( + m = + (c = (l = h[Ae] || (h[Ae] = {}))[e] || [])[0] === Be && + c[1], + d = c[0] === Be && c[2], + f = m && h.childNodes[m]; + (f = (++m && f && f[g]) || (d = m = 0) || p.pop()); + + ) + if (1 === f.nodeType && ++d && f === t) { + l[e] = [Be, m, d]; + break; + } + } else if (y && (c = (t[Ae] || (t[Ae] = {}))[e]) && c[0] === Be) + d = c[1]; + else + for ( + ; + (f = (++m && f && f[g]) || (d = m = 0) || p.pop()) && + ((s ? f.nodeName.toLowerCase() !== v : 1 !== f.nodeType) || + !++d || + (y && ((f[Ae] || (f[Ae] = {}))[e] = [Be, d]), f !== t)); + + ); + return (d -= o) === r || (d % r == 0 && d / r >= 0); + } + }; + }, + PSEUDO: function(e, t) { + var n, + r = + J.pseudos[e] || + J.setFilters[e.toLowerCase()] || + lt.error("unsupported pseudo: " + e); + return r[Ae] + ? r(t) + : r.length > 1 + ? ((n = [e, e, "", t]), + J.setFilters.hasOwnProperty(e.toLowerCase()) + ? dt(function(e, n) { + for (var o, i = r(e, t), a = i.length; a--; ) + e[(o = je.call(e, i[a]))] = !(n[o] = i[a]); + }) + : function(e) { + return r(e, 0, n); + }) + : r; + } + }, + pseudos: { + not: dt(function(e) { + var t = [], + n = [], + r = te(e.replace(Ye, "$1")); + return r[Ae] + ? dt(function(e, t, n, o) { + for (var i, a = r(e, null, o, []), s = e.length; s--; ) + (i = a[s]) && (e[s] = !(t[s] = i)); + }) + : function(e, o, i) { + return (t[0] = e), r(t, null, i, n), !n.pop(); + }; + }), + has: dt(function(e) { + return function(t) { + return lt(e, t).length > 0; + }; + }), + contains: dt(function(e) { + return ( + (e = e.replace(ut, ct)), + function(t) { + return (t.textContent || t.innerText || Q(t)).indexOf(e) > -1; + } + ); + }), + lang: dt(function(e) { + return ( + et.test(e || "") || lt.error("unsupported lang: " + e), + (e = e.replace(ut, ct).toLowerCase()), + function(t) { + var n; + do { + if ( + (n = ce + ? t.lang + : t.getAttribute("xml:lang") || t.getAttribute("lang")) + ) + return (n = n.toLowerCase()) === e || 0 === n.indexOf(e + "-"); + } while ((t = t.parentNode) && 1 === t.nodeType); + return !1; + } + ); + }), + target: function(e) { + var t = window.location && window.location.hash; + return t && t.slice(1) === e.id; + }, + root: function(e) { + return e === ue; + }, + focus: function(e) { + return ( + e === se.activeElement && + (!se.hasFocus || se.hasFocus()) && + !!(e.type || e.href || ~e.tabIndex) + ); + }, + enabled: function(e) { + return !1 === e.disabled; + }, + disabled: function(e) { + return !0 === e.disabled; + }, + checked: function(e) { + var t = e.nodeName.toLowerCase(); + return ( + ("input" === t && !!e.checked) || ("option" === t && !!e.selected) + ); + }, + selected: function(e) { + return e.parentNode && e.parentNode.selectedIndex, !0 === e.selected; + }, + empty: function(e) { + for (e = e.firstChild; e; e = e.nextSibling) + if (e.nodeType < 6) return !1; + return !0; + }, + parent: function(e) { + return !J.pseudos.empty(e); + }, + header: function(e) { + return rt.test(e.nodeName); + }, + input: function(e) { + return nt.test(e.nodeName); + }, + button: function(e) { + var t = e.nodeName.toLowerCase(); + return ("input" === t && "button" === e.type) || "button" === t; + }, + text: function(e) { + var t; + return ( + "input" === e.nodeName.toLowerCase() && + "text" === e.type && + (null == (t = e.getAttribute("type")) || "text" === t.toLowerCase()) + ); + }, + first: ht(function() { + return [0]; + }), + last: ht(function(e, t) { + return [t - 1]; + }), + eq: ht(function(e, t, n) { + return [n < 0 ? n + t : n]; + }), + even: ht(function(e, t) { + for (var n = 0; n < t; n += 2) e.push(n); + return e; + }), + odd: ht(function(e, t) { + for (var n = 1; n < t; n += 2) e.push(n); + return e; + }), + lt: ht(function(e, t, n) { + for (var r = n < 0 ? n + t : n; --r >= 0; ) e.push(r); + return e; + }), + gt: ht(function(e, t, n) { + for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); + return e; + }) + } + }).pseudos.nth = J.pseudos.eq), + { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 })) + J.pseudos[Y] = pt(Y); + for (Y in { submit: !0, reset: !0 }) J.pseudos[Y] = gt(Y); + function yt() {} + function bt(e) { + for (var t = 0, n = e.length, r = ""; t < n; t++) r += e[t].value; + return r; + } + function Ct(e, t, n) { + var r = t.dir, + o = n && "parentNode" === r, + i = Re++; + return t.first + ? function(t, n, i) { + for (; (t = t[r]); ) if (1 === t.nodeType || o) return e(t, n, i); + } + : function(t, n, a) { + var s, + u, + c = [Be, i]; + if (a) { + for (; (t = t[r]); ) + if ((1 === t.nodeType || o) && e(t, n, a)) return !0; + } else + for (; (t = t[r]); ) + if (1 === t.nodeType || o) { + if ( + (s = (u = t[Ae] || (t[Ae] = {}))[r]) && + s[0] === Be && + s[1] === i + ) + return (c[2] = s[2]); + if (((u[r] = c), (c[2] = e(t, n, a)))) return !0; + } + }; + } + function xt(e) { + return e.length > 1 + ? function(t, n, r) { + for (var o = e.length; o--; ) if (!e[o](t, n, r)) return !1; + return !0; + } + : e[0]; + } + function wt(e, t, n, r, o) { + for (var i, a = [], s = 0, u = e.length, c = null != t; s < u; s++) + (i = e[s]) && ((n && !n(i, r, o)) || (a.push(i), c && t.push(s))); + return a; + } + function Nt(e, t, n, r, o, i) { + return ( + r && !r[Ae] && (r = Nt(r)), + o && !o[Ae] && (o = Nt(o, i)), + dt(function(i, a, s, u) { + var c, + l, + f, + d = [], + m = [], + p = a.length, + g = + i || + (function(e, t, n) { + for (var r = 0, o = t.length; r < o; r++) lt(e, t[r], n); + return n; + })(t || "*", s.nodeType ? [s] : s, []), + h = !e || (!i && t) ? g : wt(g, d, e, s, u), + v = n ? (o || (i ? e : p || r) ? [] : a) : h; + if ((n && n(h, v, s, u), r)) + for (c = wt(v, m), r(c, [], s, u), l = c.length; l--; ) + (f = c[l]) && (v[m[l]] = !(h[m[l]] = f)); + if (i) { + if (o || e) { + if (o) { + for (c = [], l = v.length; l--; ) + (f = v[l]) && c.push((h[l] = f)); + o(null, (v = []), c, u); + } + for (l = v.length; l--; ) + (f = v[l]) && + (c = o ? je.call(i, f) : d[l]) > -1 && + (i[c] = !(a[c] = f)); + } + } else (v = wt(v === a ? v.splice(p, v.length) : v)), o ? o(null, a, v, u) : He.apply(a, v); + }) + ); + } + function Et(e) { + for ( + var t, + n, + r, + o = e.length, + i = J.relative[e[0].type], + a = i || J.relative[" "], + s = i ? 1 : 0, + u = Ct( + function(e) { + return e === t; + }, + a, + !0 + ), + c = Ct( + function(e) { + return je.call(t, e) > -1; + }, + a, + !0 + ), + l = [ + function(e, n, r) { + return ( + (!i && (r || n !== re)) || + ((t = n).nodeType ? u(e, n, r) : c(e, n, r)) + ); + } + ]; + s < o; + s++ + ) + if ((n = J.relative[e[s].type])) l = [Ct(xt(l), n)]; + else { + if ((n = J.filter[e[s].type].apply(null, e[s].matches))[Ae]) { + for (r = ++s; r < o && !J.relative[e[r].type]; r++); + return Nt( + s > 1 && xt(l), + s > 1 && + bt( + e + .slice(0, s - 1) + .concat({ value: " " === e[s - 2].type ? "*" : "" }) + ).replace(Ye, "$1"), + n, + s < r && Et(e.slice(s, r)), + r < o && Et((e = e.slice(r))), + r < o && bt(e) + ); + } + l.push(n); + } + return xt(l); + } + (yt.prototype = J.filters = J.pseudos), + (J.setFilters = new yt()), + (ee = lt.tokenize = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c = Oe[e + " "]; + if (c) return t ? 0 : c.slice(0); + for (a = e, s = [], u = J.preFilter; a; ) { + for (i in ((n && !(r = Ge.exec(a))) || + (r && (a = a.slice(r[0].length) || a), s.push((o = []))), + (n = !1), + (r = Je.exec(a)) && + ((n = r.shift()), + o.push({ value: n, type: r[0].replace(Ye, " ") }), + (a = a.slice(n.length))), + J.filter)) + !(r = tt[i].exec(a)) || + (u[i] && !(r = u[i](r))) || + ((n = r.shift()), + o.push({ value: n, type: i, matches: r }), + (a = a.slice(n.length))); + if (!n) break; + } + return t ? a.length : a ? lt.error(e) : Oe(e, s).slice(0); + }), + (te = lt.compile = function(e, t) { + var n, + r, + o, + i, + a, + s, + u = [], + c = [], + l = Pe[e + " "]; + if (!l) { + for (t || (t = ee(e)), n = t.length; n--; ) + (l = Et(t[n]))[Ae] ? u.push(l) : c.push(l); + (l = Pe( + e, + ((r = c), + (i = (o = u).length > 0), + (a = r.length > 0), + (s = function(e, t, n, s, u) { + var c, + l, + f, + d = 0, + m = "0", + p = e && [], + g = [], + h = re, + v = e || (a && J.find.TAG("*", u)), + y = (Be += null == h ? 1 : Math.random() || 0.1), + b = v.length; + for ( + u && (re = t !== se && t); + m !== b && null != (c = v[m]); + m++ + ) { + if (a && c) { + for (l = 0; (f = r[l++]); ) + if (f(c, t, n)) { + s.push(c); + break; + } + u && (Be = y); + } + i && ((c = !f && c) && d--, e && p.push(c)); + } + if (((d += m), i && m !== d)) { + for (l = 0; (f = o[l++]); ) f(p, g, t, n); + if (e) { + if (d > 0) for (; m--; ) p[m] || g[m] || (g[m] = Ue.call(s)); + g = wt(g); + } + He.apply(s, g), + u && !e && g.length > 0 && d + o.length > 1 && lt.uniqueSort(s); + } + return u && ((Be = y), (re = h)), p; + }), + i ? dt(s) : s) + )).selector = e; + } + return l; + }), + (ne = lt.select = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c = "function" == typeof e && e, + l = !r && ee((e = c.selector || e)); + if (((n = n || []), 1 === l.length)) { + if ( + (i = l[0] = l[0].slice(0)).length > 2 && + "ID" === (a = i[0]).type && + G.getById && + 9 === t.nodeType && + ce && + J.relative[i[1].type] + ) { + if (!(t = (J.find.ID(a.matches[0].replace(ut, ct), t) || [])[0])) + return n; + c && (t = t.parentNode), (e = e.slice(i.shift().value.length)); + } + for ( + o = tt.needsContext.test(e) ? 0 : i.length; + o-- && ((a = i[o]), !J.relative[(s = a.type)]); + + ) + if ( + (u = J.find[s]) && + (r = u( + a.matches[0].replace(ut, ct), + (at.test(i[0].type) && vt(t.parentNode)) || t + )) + ) { + if ((i.splice(o, 1), !(e = r.length && bt(i)))) + return He.apply(n, r), n; + break; + } + } + return ( + (c || te(e, l))(r, t, !ce, n, (at.test(e) && vt(t.parentNode)) || t), n + ); + }), + (G.sortStable = + Ae.split("") + .sort(Ie) + .join("") === Ae), + (G.detectDuplicates = !!ie), + ae(), + (G.sortDetached = !0); + var St = + Array.isArray || + function(e) { + return "[object Array]" === Object.prototype.toString.call(e); + }, + kt = function(e, t, n) { + var r, o; + if (!e) return 0; + if (((n = n || e), e.length !== undefined)) { + for (r = 0, o = e.length; r < o; r++) + if (!1 === t.call(n, e[r], r, e)) return 0; + } else + for (r in e) + if (e.hasOwnProperty(r) && !1 === t.call(n, e[r], r, e)) return 0; + return 1; + }, + Tt = function(e, t, n) { + var r, o; + for (r = 0, o = e.length; r < o; r++) if (t.call(n, e[r], r, e)) return r; + return -1; + }, + At = { + isArray: St, + toArray: function(e) { + var t, + n, + r = e; + if (!St(e)) for (r = [], t = 0, n = e.length; t < n; t++) r[t] = e[t]; + return r; + }, + each: kt, + map: function(e, t) { + var n = []; + return ( + kt(e, function(r, o) { + n.push(t(r, o, e)); + }), + n + ); + }, + filter: function(e, t) { + var n = []; + return ( + kt(e, function(r, o) { + (t && !t(r, o, e)) || n.push(r); + }), + n + ); + }, + indexOf: function(e, t) { + var n, r; + if (e) for (n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; + return -1; + }, + reduce: function(e, t, n, r) { + var o = 0; + for (arguments.length < 3 && (n = e[0]); o < e.length; o++) + n = t.call(r, n, e[o], o); + return n; + }, + findIndex: Tt, + find: function(e, t, n) { + var r = Tt(e, t, n); + return -1 !== r ? e[r] : undefined; + }, + last: function(e) { + return e[e.length - 1]; + } + }, + _t = /^\s*|\s*$/g, + Bt = function(e) { + return null === e || e === undefined ? "" : ("" + e).replace(_t, ""); + }, + Rt = function(e, t) { + return t + ? !("array" !== t || !At.isArray(e)) || typeof e === t + : e !== undefined; + }, + Dt = function(e, t, n, r) { + (r = r || this), + e && + (n && (e = e[n]), + At.each(e, function(e, o) { + if (!1 === t.call(r, e, o, n)) return !1; + Dt(e, t, n, r); + })); + }, + Ot = { + trim: Bt, + isArray: At.isArray, + is: Rt, + toArray: At.toArray, + makeMap: function(e, t, n) { + var r; + for ( + e = e || [], + t = t || ",", + "string" == typeof e && (e = e.split(t)), + n = n || {}, + r = e.length; + r--; + + ) + n[e[r]] = {}; + return n; + }, + each: At.each, + map: At.map, + grep: At.filter, + inArray: At.indexOf, + hasOwn: function(e, t) { + return Object.prototype.hasOwnProperty.call(e, t); + }, + extend: function(e, t) { + for (var n, r, o, i = [], a = 2; a < arguments.length; a++) + i[a - 2] = arguments[a]; + var s, + u = arguments; + for (n = 1, r = u.length; n < r; n++) + for (o in (t = u[n])) + t.hasOwnProperty(o) && (s = t[o]) !== undefined && (e[o] = s); + return e; + }, + create: function(e, t, n) { + var r, + o, + i, + a, + s, + u = this, + c = 0; + if ( + ((e = /^((static) )?([\w.]+)(:([\w.]+))?/.exec(e)), + (i = e[3].match(/(^|\.)(\w+)$/i)[2]), + !(o = u.createNS(e[3].replace(/\.\w+$/, ""), n))[i]) + ) { + if ("static" === e[2]) + return ( + (o[i] = t), + void (this.onCreate && this.onCreate(e[2], e[3], o[i])) + ); + t[i] || ((t[i] = function() {}), (c = 1)), + (o[i] = t[i]), + u.extend(o[i].prototype, t), + e[5] && + ((r = u.resolve(e[5]).prototype), + (a = e[5].match(/\.(\w+)$/i)[1]), + (s = o[i]), + (o[i] = c + ? function() { + return r[a].apply(this, arguments); + } + : function() { + return (this.parent = r[a]), s.apply(this, arguments); + }), + (o[i].prototype[i] = o[i]), + u.each(r, function(e, t) { + o[i].prototype[t] = r[t]; + }), + u.each(t, function(e, t) { + r[t] + ? (o[i].prototype[t] = function() { + return (this.parent = r[t]), e.apply(this, arguments); + }) + : t !== i && (o[i].prototype[t] = e); + })), + u.each(t["static"], function(e, t) { + o[i][t] = e; + }); + } + }, + walk: Dt, + createNS: function(e, t) { + var n, r; + for (t = t || window, e = e.split("."), n = 0; n < e.length; n++) + t[(r = e[n])] || (t[r] = {}), (t = t[r]); + return t; + }, + resolve: function(e, t) { + var n, r; + for ( + t = t || window, n = 0, r = (e = e.split(".")).length; + n < r && (t = t[e[n]]); + n++ + ); + return t; + }, + explode: function(e, t) { + return !e || Rt(e, "array") ? e : At.map(e.split(t || ","), Bt); + }, + _addCacheSuffix: function(e) { + var t = me.cacheSuffix; + return t && (e += (-1 === e.indexOf("?") ? "?" : "&") + t), e; + } + }, + Pt = document, + It = Array.prototype.push, + Lt = Array.prototype.slice, + Mt = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + Ft = Te.Event, + zt = Ot.makeMap("children,contents,next,prev"), + Ut = function(e) { + return void 0 !== e; + }, + Vt = function(e) { + return "string" == typeof e; + }, + Ht = function(e, t) { + var n, r, o; + for ( + o = (t = t || Pt).createElement("div"), + n = t.createDocumentFragment(), + o.innerHTML = e; + (r = o.firstChild); + + ) + n.appendChild(r); + return n; + }, + qt = function(e, t, n, r) { + var o; + if (Vt(t)) t = Ht(t, rn(e[0])); + else if (t.length && !t.nodeType) { + if (((t = Qt.makeArray(t)), r)) + for (o = t.length - 1; o >= 0; o--) qt(e, t[o], n, r); + else for (o = 0; o < t.length; o++) qt(e, t[o], n, r); + return e; + } + if (t.nodeType) for (o = e.length; o--; ) n.call(e[o], t); + return e; + }, + jt = function(e, t) { + return e && t && -1 !== (" " + e.className + " ").indexOf(" " + t + " "); + }, + $t = function(e, t, n) { + var r, o; + return ( + (t = Qt(t)[0]), + e.each(function() { + var e = this; + n && r === e.parentNode + ? o.appendChild(e) + : ((r = e.parentNode), + (o = t.cloneNode(!1)), + e.parentNode.insertBefore(o, e), + o.appendChild(e)); + }), + e + ); + }, + Wt = Ot.makeMap( + "fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom", + " " + ), + Kt = Ot.makeMap( + "checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected", + " " + ), + Xt = { for: "htmlFor", class: "className", readonly: "readOnly" }, + Yt = { float: "cssFloat" }, + Gt = {}, + Jt = {}, + Qt = function(e, t) { + return new Qt.fn.init(e, t); + }, + Zt = /^\s*|\s*$/g, + en = function(e) { + return null === e || e === undefined ? "" : ("" + e).replace(Zt, ""); + }, + tn = function(e, t) { + var n, r, o, i; + if (e) + if ((n = e.length) === undefined) { + for (r in e) + if (e.hasOwnProperty(r) && ((i = e[r]), !1 === t.call(i, r, i))) + break; + } else for (o = 0; o < n && ((i = e[o]), !1 !== t.call(i, o, i)); o++); + return e; + }, + nn = function(e, t) { + var n = []; + return ( + tn(e, function(e, r) { + t(r, e) && n.push(r); + }), + n + ); + }, + rn = function(e) { + return e ? (9 === e.nodeType ? e : e.ownerDocument) : Pt; + }; + (Qt.fn = Qt.prototype = { + constructor: Qt, + selector: "", + context: null, + length: 0, + init: function(e, t) { + var n, + r, + o = this; + if (!e) return o; + if (e.nodeType) return (o.context = o[0] = e), (o.length = 1), o; + if (t && t.nodeType) o.context = t; + else { + if (t) return Qt(e).attr(t); + o.context = t = document; + } + if (Vt(e)) { + if ( + ((o.selector = e), + !(n = + "<" === e.charAt(0) && + ">" === e.charAt(e.length - 1) && + e.length >= 3 + ? [null, e, null] + : Mt.exec(e))) + ) + return Qt(t).find(e); + if (n[1]) + for (r = Ht(e, rn(t)).firstChild; r; ) + It.call(o, r), (r = r.nextSibling); + else { + if (!(r = rn(t).getElementById(n[2]))) return o; + if (r.id !== n[2]) return o.find(e); + (o.length = 1), (o[0] = r); + } + } else this.add(e, !1); + return o; + }, + toArray: function() { + return Ot.toArray(this); + }, + add: function(e, t) { + var n, + r, + o = this; + if (Vt(e)) return o.add(Qt(e)); + if (!1 !== t) + for ( + n = Qt.unique(o.toArray().concat(Qt.makeArray(e))), + o.length = n.length, + r = 0; + r < n.length; + r++ + ) + o[r] = n[r]; + else It.apply(o, Qt.makeArray(e)); + return o; + }, + attr: function(e, t) { + var n, + r = this; + if ("object" == typeof e) + tn(e, function(e, t) { + r.attr(e, t); + }); + else { + if (!Ut(t)) { + if (r[0] && 1 === r[0].nodeType) { + if ((n = Gt[e]) && n.get) return n.get(r[0], e); + if (Kt[e]) return r.prop(e) ? e : undefined; + null === (t = r[0].getAttribute(e, 2)) && (t = undefined); + } + return t; + } + this.each(function() { + var n; + if (1 === this.nodeType) { + if ((n = Gt[e]) && n.set) return void n.set(this, t); + null === t + ? this.removeAttribute(e, 2) + : this.setAttribute(e, t, 2); + } + }); + } + return r; + }, + removeAttr: function(e) { + return this.attr(e, null); + }, + prop: function(e, t) { + var n = this; + if ("object" == typeof (e = Xt[e] || e)) + tn(e, function(e, t) { + n.prop(e, t); + }); + else { + if (!Ut(t)) return n[0] && n[0].nodeType && e in n[0] ? n[0][e] : t; + this.each(function() { + 1 === this.nodeType && (this[e] = t); + }); + } + return n; + }, + css: function(e, t) { + var n, + r, + o = this, + i = function(e) { + return e.replace(/-(\D)/g, function(e, t) { + return t.toUpperCase(); + }); + }, + a = function(e) { + return e.replace(/[A-Z]/g, function(e) { + return "-" + e; + }); + }; + if ("object" == typeof e) + tn(e, function(e, t) { + o.css(e, t); + }); + else if (Ut(t)) + (e = i(e)), + "number" != typeof t || Wt[e] || (t = t.toString() + "px"), + o.each(function() { + var n = this.style; + if ((r = Jt[e]) && r.set) r.set(this, t); + else { + try { + this.style[Yt[e] || e] = t; + } catch (o) {} + (null !== t && "" !== t) || + (n.removeProperty + ? n.removeProperty(a(e)) + : n.removeAttribute(e)); + } + }); + else { + if (((n = o[0]), (r = Jt[e]) && r.get)) return r.get(n); + if (n.ownerDocument.defaultView) + try { + return n.ownerDocument.defaultView + .getComputedStyle(n, null) + .getPropertyValue(a(e)); + } catch (s) { + return undefined; + } + else if (n.currentStyle) return n.currentStyle[i(e)]; + } + return o; + }, + remove: function() { + for (var e, t = this.length; t--; ) + (e = this[t]), Ft.clean(e), e.parentNode && e.parentNode.removeChild(e); + return this; + }, + empty: function() { + for (var e, t = this.length; t--; ) + for (e = this[t]; e.firstChild; ) e.removeChild(e.firstChild); + return this; + }, + html: function(e) { + var t, + n = this; + if (Ut(e)) { + t = n.length; + try { + for (; t--; ) n[t].innerHTML = e; + } catch (r) { + Qt(n[t]) + .empty() + .append(e); + } + return n; + } + return n[0] ? n[0].innerHTML : ""; + }, + text: function(e) { + var t, + n = this; + if (Ut(e)) { + for (t = n.length; t--; ) + "innerText" in n[t] ? (n[t].innerText = e) : (n[0].textContent = e); + return n; + } + return n[0] ? n[0].innerText || n[0].textContent : ""; + }, + append: function() { + return qt(this, arguments, function(e) { + (1 === this.nodeType || (this.host && 1 === this.host.nodeType)) && + this.appendChild(e); + }); + }, + prepend: function() { + return qt( + this, + arguments, + function(e) { + (1 === this.nodeType || (this.host && 1 === this.host.nodeType)) && + this.insertBefore(e, this.firstChild); + }, + !0 + ); + }, + before: function() { + return this[0] && this[0].parentNode + ? qt(this, arguments, function(e) { + this.parentNode.insertBefore(e, this); + }) + : this; + }, + after: function() { + return this[0] && this[0].parentNode + ? qt( + this, + arguments, + function(e) { + this.parentNode.insertBefore(e, this.nextSibling); + }, + !0 + ) + : this; + }, + appendTo: function(e) { + return Qt(e).append(this), this; + }, + prependTo: function(e) { + return Qt(e).prepend(this), this; + }, + replaceWith: function(e) { + return this.before(e).remove(); + }, + wrap: function(e) { + return $t(this, e); + }, + wrapAll: function(e) { + return $t(this, e, !0); + }, + wrapInner: function(e) { + return ( + this.each(function() { + Qt(this) + .contents() + .wrapAll(e); + }), + this + ); + }, + unwrap: function() { + return this.parent().each(function() { + Qt(this).replaceWith(this.childNodes); + }); + }, + clone: function() { + var e = []; + return ( + this.each(function() { + e.push(this.cloneNode(!0)); + }), + Qt(e) + ); + }, + addClass: function(e) { + return this.toggleClass(e, !0); + }, + removeClass: function(e) { + return this.toggleClass(e, !1); + }, + toggleClass: function(e, t) { + var n = this; + return "string" != typeof e + ? n + : (-1 !== e.indexOf(" ") + ? tn(e.split(" "), function() { + n.toggleClass(this, t); + }) + : n.each(function(n, r) { + var o, i; + (i = jt(r, e)) !== t && + ((o = r.className), + i + ? (r.className = en( + (" " + o + " ").replace(" " + e + " ", " ") + )) + : (r.className += o ? " " + e : e)); + }), + n); + }, + hasClass: function(e) { + return jt(this[0], e); + }, + each: function(e) { + return tn(this, e); + }, + on: function(e, t) { + return this.each(function() { + Ft.bind(this, e, t); + }); + }, + off: function(e, t) { + return this.each(function() { + Ft.unbind(this, e, t); + }); + }, + trigger: function(e) { + return this.each(function() { + "object" == typeof e ? Ft.fire(this, e.type, e) : Ft.fire(this, e); + }); + }, + show: function() { + return this.css("display", ""); + }, + hide: function() { + return this.css("display", "none"); + }, + slice: function() { + return new Qt(Lt.apply(this, arguments)); + }, + eq: function(e) { + return -1 === e ? this.slice(e) : this.slice(e, +e + 1); + }, + first: function() { + return this.eq(0); + }, + last: function() { + return this.eq(-1); + }, + find: function(e) { + var t, + n, + r = []; + for (t = 0, n = this.length; t < n; t++) Qt.find(e, this[t], r); + return Qt(r); + }, + filter: function(e) { + return Qt( + "function" == typeof e + ? nn(this.toArray(), function(t, n) { + return e(n, t); + }) + : Qt.filter(e, this.toArray()) + ); + }, + closest: function(e) { + var t = []; + return ( + e instanceof Qt && (e = e[0]), + this.each(function(n, r) { + for (; r; ) { + if ("string" == typeof e && Qt(r).is(e)) { + t.push(r); + break; + } + if (r === e) { + t.push(r); + break; + } + r = r.parentNode; + } + }), + Qt(t) + ); + }, + offset: function(e) { + var t, + n, + r, + o, + i = 0, + a = 0; + return e + ? this.css(e) + : ((t = this[0]) && + ((r = (n = t.ownerDocument).documentElement), + t.getBoundingClientRect && + ((i = + (o = t.getBoundingClientRect()).left + + (r.scrollLeft || n.body.scrollLeft) - + r.clientLeft), + (a = o.top + (r.scrollTop || n.body.scrollTop) - r.clientTop))), + { left: i, top: a }); + }, + push: It, + sort: [].sort, + splice: [].splice + }), + Ot.extend(Qt, { + extend: Ot.extend, + makeArray: function(e) { + return ((t = e) && t === t.window) || e.nodeType ? [e] : Ot.toArray(e); + var t; + }, + inArray: function(e, t) { + var n; + if (t.indexOf) return t.indexOf(e); + for (n = t.length; n--; ) if (t[n] === e) return n; + return -1; + }, + isArray: Ot.isArray, + each: tn, + trim: en, + grep: nn, + find: lt, + expr: lt.selectors, + unique: lt.uniqueSort, + text: lt.getText, + contains: lt.contains, + filter: function(e, t, n) { + var r = t.length; + for (n && (e = ":not(" + e + ")"); r--; ) + 1 !== t[r].nodeType && t.splice(r, 1); + return (t = + 1 === t.length + ? Qt.find.matchesSelector(t[0], e) + ? [t[0]] + : [] + : Qt.find.matches(e, t)); + } + }); + var on = function(e, t, n) { + var r = [], + o = e[t]; + for ( + "string" != typeof n && n instanceof Qt && (n = n[0]); + o && 9 !== o.nodeType; + + ) { + if (n !== undefined) { + if (o === n) break; + if ("string" == typeof n && Qt(o).is(n)) break; + } + 1 === o.nodeType && r.push(o), (o = o[t]); + } + return r; + }, + an = function(e, t, n, r) { + var o = []; + for (r instanceof Qt && (r = r[0]); e; e = e[t]) + if (!n || e.nodeType === n) { + if (r !== undefined) { + if (e === r) break; + if ("string" == typeof r && Qt(e).is(r)) break; + } + o.push(e); + } + return o; + }, + sn = function(e, t, n) { + for (e = e[t]; e; e = e[t]) if (e.nodeType === n) return e; + return null; + }; + tn( + { + parent: function(e) { + var t = e.parentNode; + return t && 11 !== t.nodeType ? t : null; + }, + parents: function(e) { + return on(e, "parentNode"); + }, + next: function(e) { + return sn(e, "nextSibling", 1); + }, + prev: function(e) { + return sn(e, "previousSibling", 1); + }, + children: function(e) { + return an(e.firstChild, "nextSibling", 1); + }, + contents: function(e) { + return Ot.toArray( + ("iframe" === e.nodeName + ? e.contentDocument || e.contentWindow.document + : e + ).childNodes + ); + } + }, + function(e, t) { + Qt.fn[e] = function(n) { + var r = []; + return ( + this.each(function() { + var e = t.call(r, this, n, r); + e && (Qt.isArray(e) ? r.push.apply(r, e) : r.push(e)); + }), + this.length > 1 && + (zt[e] || (r = Qt.unique(r)), + 0 === e.indexOf("parents") && (r = r.reverse())), + (r = Qt(r)), + n ? r.filter(n) : r + ); + }; + } + ), + tn( + { + parentsUntil: function(e, t) { + return on(e, "parentNode", t); + }, + nextUntil: function(e, t) { + return an(e, "nextSibling", 1, t).slice(1); + }, + prevUntil: function(e, t) { + return an(e, "previousSibling", 1, t).slice(1); + } + }, + function(e, t) { + Qt.fn[e] = function(n, r) { + var o = []; + return ( + this.each(function() { + var e = t.call(o, this, n, o); + e && (Qt.isArray(e) ? o.push.apply(o, e) : o.push(e)); + }), + this.length > 1 && + ((o = Qt.unique(o)), + (0 !== e.indexOf("parents") && "prevUntil" !== e) || + (o = o.reverse())), + (o = Qt(o)), + r ? o.filter(r) : o + ); + }; + } + ), + (Qt.fn.is = function(e) { + return !!e && this.filter(e).length > 0; + }), + (Qt.fn.init.prototype = Qt.fn), + (Qt.overrideDefaults = function(e) { + var t, + n = function(r, o) { + return ( + (t = t || e()), + 0 === arguments.length && (r = t.element), + o || (o = t.context), + new n.fn.init(r, o) + ); + }; + return Qt.extend(n, this), n; + }); + var un = function(e, t, n) { + tn(n, function(n, r) { + (e[n] = e[n] || {}), (e[n][t] = r); + }); + }; + me.ie && + me.ie < 8 && + (un(Gt, "get", { + maxlength: function(e) { + var t = e.maxLength; + return 2147483647 === t ? undefined : t; + }, + size: function(e) { + var t = e.size; + return 20 === t ? undefined : t; + }, + class: function(e) { + return e.className; + }, + style: function(e) { + var t = e.style.cssText; + return 0 === t.length ? undefined : t; + } + }), + un(Gt, "set", { + class: function(e, t) { + e.className = t; + }, + style: function(e, t) { + e.style.cssText = t; + } + })), + me.ie && + me.ie < 9 && + ((Yt["float"] = "styleFloat"), + un(Jt, "set", { + opacity: function(e, t) { + var n = e.style; + null === t || "" === t + ? n.removeAttribute("filter") + : ((n.zoom = 1), (n.filter = "alpha(opacity=" + 100 * t + ")")); + } + })), + (Qt.attrHooks = Gt), + (Qt.cssHooks = Jt); + var cn, + ln, + fn, + dn, + mn = function(e) { + var t, + n = !1; + return function() { + return n || ((n = !0), (t = e.apply(null, arguments))), t; + }; + }, + pn = function(e, t) { + var n = (function(e, t) { + for (var n = 0; n < e.length; n++) { + var r = e[n]; + if (r.test(t)) return r; + } + return undefined; + })(e, t); + if (!n) return { major: 0, minor: 0 }; + var r = function(e) { + return Number(t.replace(n, "$" + e)); + }; + return hn(r(1), r(2)); + }, + gn = function() { + return hn(0, 0); + }, + hn = function(e, t) { + return { major: e, minor: t }; + }, + vn = { + nu: hn, + detect: function(e, t) { + var n = String(t).toLowerCase(); + return 0 === e.length ? gn() : pn(e, n); + }, + unknown: gn + }, + yn = "Firefox", + bn = function(e, t) { + return function() { + return t === e; + }; + }, + Cn = function(e) { + var t = e.current; + return { + current: t, + version: e.version, + isEdge: bn("Edge", t), + isChrome: bn("Chrome", t), + isIE: bn("IE", t), + isOpera: bn("Opera", t), + isFirefox: bn(yn, t), + isSafari: bn("Safari", t) + }; + }, + xn = { + unknown: function() { + return Cn({ current: undefined, version: vn.unknown() }); + }, + nu: Cn, + edge: y.constant("Edge"), + chrome: y.constant("Chrome"), + ie: y.constant("IE"), + opera: y.constant("Opera"), + firefox: y.constant(yn), + safari: y.constant("Safari") + }, + wn = "Windows", + Nn = "Android", + En = "Solaris", + Sn = "FreeBSD", + kn = function(e, t) { + return function() { + return t === e; + }; + }, + Tn = function(e) { + var t = e.current; + return { + current: t, + version: e.version, + isWindows: kn(wn, t), + isiOS: kn("iOS", t), + isAndroid: kn(Nn, t), + isOSX: kn("OSX", t), + isLinux: kn("Linux", t), + isSolaris: kn(En, t), + isFreeBSD: kn(Sn, t) + }; + }, + An = { + unknown: function() { + return Tn({ current: undefined, version: vn.unknown() }); + }, + nu: Tn, + windows: y.constant(wn), + ios: y.constant("iOS"), + android: y.constant(Nn), + linux: y.constant("Linux"), + osx: y.constant("OSX"), + solaris: y.constant(En), + freebsd: y.constant(Sn) + }, + _n = function(e, t) { + var n = String(t).toLowerCase(); + return M.find(e, function(e) { + return e.search(n); + }); + }, + Bn = function(e, t) { + return _n(e, t).map(function(e) { + var n = vn.detect(e.versionRegexes, t); + return { current: e.name, version: n }; + }); + }, + Rn = function(e, t) { + return _n(e, t).map(function(e) { + var n = vn.detect(e.versionRegexes, t); + return { current: e.name, version: n }; + }); + }, + Dn = function(e, t) { + return -1 !== e.indexOf(t); + }, + On = function(e) { + return e.replace(/^\s+|\s+$/g, ""); + }, + Pn = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + In = function(e) { + return function(t) { + return Dn(t, e); + }; + }, + Ln = [ + { + name: "Edge", + versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], + search: function(e) { + return ( + Dn(e, "edge/") && + Dn(e, "chrome") && + Dn(e, "safari") && + Dn(e, "applewebkit") + ); + } + }, + { + name: "Chrome", + versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, Pn], + search: function(e) { + return Dn(e, "chrome") && !Dn(e, "chromeframe"); + } + }, + { + name: "IE", + versionRegexes: [ + /.*?msie\ ?([0-9]+)\.([0-9]+).*/, + /.*?rv:([0-9]+)\.([0-9]+).*/ + ], + search: function(e) { + return Dn(e, "msie") || Dn(e, "trident"); + } + }, + { + name: "Opera", + versionRegexes: [Pn, /.*?opera\/([0-9]+)\.([0-9]+).*/], + search: In("opera") + }, + { + name: "Firefox", + versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], + search: In("firefox") + }, + { + name: "Safari", + versionRegexes: [Pn, /.*?cpu os ([0-9]+)_([0-9]+).*/], + search: function(e) { + return (Dn(e, "safari") || Dn(e, "mobile/")) && Dn(e, "applewebkit"); + } + } + ], + Mn = [ + { + name: "Windows", + search: In("win"), + versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: "iOS", + search: function(e) { + return Dn(e, "iphone") || Dn(e, "ipad"); + }, + versionRegexes: [ + /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + /.*cpu os ([0-9]+)_([0-9]+).*/, + /.*cpu iphone os ([0-9]+)_([0-9]+).*/ + ] + }, + { + name: "Android", + search: In("android"), + versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: "OSX", + search: In("os x"), + versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/] + }, + { name: "Linux", search: In("linux"), versionRegexes: [] }, + { name: "Solaris", search: In("sunos"), versionRegexes: [] }, + { name: "FreeBSD", search: In("freebsd"), versionRegexes: [] } + ], + Fn = { browsers: y.constant(Ln), oses: y.constant(Mn) }, + zn = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d = Fn.browsers(), + m = Fn.oses(), + p = Bn(d, e).fold(xn.unknown, xn.nu), + g = Rn(m, e).fold(An.unknown, An.nu); + return { + browser: p, + os: g, + deviceType: ((n = p), + (r = e), + (o = (t = g).isiOS() && !0 === /ipad/i.test(r)), + (i = t.isiOS() && !o), + (a = t.isAndroid() && 3 === t.version.major), + (s = t.isAndroid() && 4 === t.version.major), + (u = o || a || (s && !0 === /mobile/i.test(r))), + (c = t.isiOS() || t.isAndroid()), + (l = c && !u), + (f = n.isSafari() && t.isiOS() && !1 === /safari/i.test(r)), + { + isiPad: y.constant(o), + isiPhone: y.constant(i), + isTablet: y.constant(u), + isPhone: y.constant(l), + isTouch: y.constant(c), + isAndroid: t.isAndroid, + isiOS: t.isiOS, + isWebView: y.constant(f) + }) + }; + }, + Un = { + detect: mn(function() { + var e = navigator.userAgent; + return zn(e); + }) + }, + Vn = function(e) { + if (null === e || e === undefined) + throw new Error("Node cannot be null or undefined"); + return { dom: y.constant(e) }; + }, + Hn = { + fromHtml: function(e, t) { + var n = (t || document).createElement("div"); + if (((n.innerHTML = e), !n.hasChildNodes() || n.childNodes.length > 1)) + throw (console.error("HTML does not have a single root node", e), + "HTML must have a single root node"); + return Vn(n.childNodes[0]); + }, + fromTag: function(e, t) { + var n = (t || document).createElement(e); + return Vn(n); + }, + fromText: function(e, t) { + var n = (t || document).createTextNode(e); + return Vn(n); + }, + fromDom: Vn, + fromPoint: function(e, t, n) { + return E.from(e.dom().elementFromPoint(t, n)).map(Vn); + } + }, + qn = 8, + jn = 9, + $n = 1, + Wn = 3, + Kn = function(e) { + return e.dom().nodeName.toLowerCase(); + }, + Xn = function(e) { + return e.dom().nodeType; + }, + Yn = function(e) { + return function(t) { + return Xn(t) === e; + }; + }, + Gn = Yn($n), + Jn = Yn(Wn), + Qn = Yn(jn), + Zn = { + name: Kn, + type: Xn, + value: function(e) { + return e.dom().nodeValue; + }, + isElement: Gn, + isText: Jn, + isDocument: Qn, + isComment: function(e) { + return Xn(e) === qn || "#comment" === Kn(e); + } + }, + er = function(e) { + return function(t) { + return ( + (function(e) { + if (null === e) return "null"; + var t = typeof e; + return "object" === t && Array.prototype.isPrototypeOf(e) + ? "array" + : "object" === t && String.prototype.isPrototypeOf(e) + ? "string" + : t; + })(t) === e + ); + }; + }, + tr = { + isString: er("string"), + isObject: er("object"), + isArray: er("array"), + isNull: er("null"), + isBoolean: er("boolean"), + isUndefined: er("undefined"), + isFunction: er("function"), + isNumber: er("number") + }, + nr = + (cn = Object.keys) === undefined + ? function(e) { + var t = []; + for (var n in e) e.hasOwnProperty(n) && t.push(n); + return t; + } + : cn, + rr = function(e, t) { + for (var n = nr(e), r = 0, o = n.length; r < o; r++) { + var i = n[r]; + t(e[i], i, e); + } + }, + or = function(e, t) { + var n = {}; + return ( + rr(e, function(r, o) { + var i = t(r, o, e); + n[i.k] = i.v; + }), + n + ); + }, + ir = function(e, t) { + var n = []; + return ( + rr(e, function(e, r) { + n.push(t(e, r)); + }), + n + ); + }, + ar = function(e) { + return ir(e, function(e) { + return e; + }); + }, + sr = { + bifilter: function(e, t) { + var n = {}, + r = {}; + return ( + rr(e, function(e, o) { + (t(e, o) ? n : r)[o] = e; + }), + { t: n, f: r } + ); + }, + each: rr, + map: function(e, t) { + return or(e, function(e, n, r) { + return { k: n, v: t(e, n, r) }; + }); + }, + mapToArray: ir, + tupleMap: or, + find: function(e, t) { + for (var n = nr(e), r = 0, o = n.length; r < o; r++) { + var i = n[r], + a = e[i]; + if (t(a, i, e)) return E.some(a); + } + return E.none(); + }, + keys: nr, + values: ar, + size: function(e) { + return ar(e).length; + } + }, + ur = function(e, t, n) { + if (!(tr.isString(n) || tr.isBoolean(n) || tr.isNumber(n))) + throw (console.error( + "Invalid call to Attr.set. Key ", + t, + ":: Value ", + n, + ":: Element ", + e + ), + new Error("Attribute value was not simple")); + e.setAttribute(t, n + ""); + }, + cr = function(e, t, n) { + ur(e.dom(), t, n); + }, + lr = function(e, t) { + var n = e.dom().getAttribute(t); + return null === n ? undefined : n; + }, + fr = function(e, t) { + var n = e.dom(); + return !(!n || !n.hasAttribute) && n.hasAttribute(t); + }, + dr = { + clone: function(e) { + return M.foldl( + e.dom().attributes, + function(e, t) { + return (e[t.name] = t.value), e; + }, + {} + ); + }, + set: cr, + setAll: function(e, t) { + var n = e.dom(); + sr.each(t, function(e, t) { + ur(n, t, e); + }); + }, + get: lr, + has: fr, + remove: function(e, t) { + e.dom().removeAttribute(t); + }, + hasNone: function(e) { + var t = e.dom().attributes; + return t === undefined || null === t || 0 === t.length; + }, + transfer: function(e, t, n) { + Zn.isElement(e) && + Zn.isElement(t) && + M.each(n, function(n) { + var r, o, i; + (o = t), fr((r = e), (i = n)) && !fr(o, i) && cr(o, i, lr(r, i)); + }); + } + }, + mr = mn(function() { + return pr(Hn.fromDom(document)); + }), + pr = function(e) { + var t = e.dom().body; + if (null === t || t === undefined) throw "Body is not available yet"; + return Hn.fromDom(t); + }, + gr = { + body: mr, + getBody: pr, + inBody: function(e) { + var t = Zn.isText(e) ? e.dom().parentNode : e.dom(); + return ( + t !== undefined && null !== t && t.ownerDocument.body.contains(t) + ); + } + }, + hr = function(e) { + return e.style !== undefined; + }, + vr = function(e, t, n) { + if (!tr.isString(n)) + throw (console.error( + "Invalid call to CSS.set. Property ", + t, + ":: Value ", + n, + ":: Element ", + e + ), + new Error("CSS value must be a string: " + n)); + hr(e) && e.style.setProperty(t, n); + }, + yr = function(e, t) { + return hr(e) ? e.style.getPropertyValue(t) : ""; + }, + br = function(e, t) { + var n = e.dom(); + sr.each(t, function(e, t) { + vr(n, t, e); + }); + }, + Cr = function(e, t) { + var n = e.dom(), + r = window.getComputedStyle(n).getPropertyValue(t), + o = "" !== r || gr.inBody(e) ? r : yr(n, t); + return null === o ? undefined : o; + }, + xr = function() { + var e = arguments; + return function() { + for (var t = new Array(arguments.length), n = 0; n < t.length; n++) + t[n] = arguments[n]; + if (e.length !== t.length) + throw new Error( + 'Wrong number of arguments to struct. Expected "[' + + e.length + + ']", got ' + + t.length + + " arguments" + ); + var r = {}; + return ( + M.each(e, function(e, n) { + r[e] = y.constant(t[n]); + }), + r + ); + }; + }, + wr = function(e, t) { + var n = [], + r = function(e) { + return n.push(e), t(e); + }, + o = t(e); + do { + o = o.bind(r); + } while (o.isSome()); + return n; + }, + Nr = function() { + return V("Node"); + }, + Er = function(e, t, n) { + return 0 != (e.compareDocumentPosition(t) & n); + }, + Sr = function(e, t) { + return Er(e, t, Nr().DOCUMENT_POSITION_CONTAINED_BY); + }, + kr = $n, + Tr = jn, + Ar = function(e) { + return ( + (e.nodeType !== kr && e.nodeType !== Tr) || 0 === e.childElementCount + ); + }, + _r = { + all: function(e, t) { + var n = t === undefined ? document : t.dom(); + return Ar(n) ? [] : M.map(n.querySelectorAll(e), Hn.fromDom); + }, + is: function(e, t) { + var n = e.dom(); + if (n.nodeType !== kr) return !1; + if (n.matches !== undefined) return n.matches(t); + if (n.msMatchesSelector !== undefined) return n.msMatchesSelector(t); + if (n.webkitMatchesSelector !== undefined) + return n.webkitMatchesSelector(t); + if (n.mozMatchesSelector !== undefined) return n.mozMatchesSelector(t); + throw new Error("Browser lacks native selectors"); + }, + one: function(e, t) { + var n = t === undefined ? document : t.dom(); + return Ar(n) ? E.none() : E.from(n.querySelector(e)).map(Hn.fromDom); + } + }, + Br = function(e, t) { + return e.dom() === t.dom(); + }, + Rr = Un.detect().browser.isIE() + ? function(e, t) { + return Sr(e.dom(), t.dom()); + } + : function(e, t) { + var n = e.dom(), + r = t.dom(); + return n !== r && n.contains(r); + }, + Dr = { + eq: Br, + isEqualNode: function(e, t) { + return e.dom().isEqualNode(t.dom()); + }, + member: function(e, t) { + return M.exists(t, y.curry(Br, e)); + }, + contains: Rr, + is: _r.is + }, + Or = function(e) { + return Hn.fromDom(e.dom().ownerDocument); + }, + Pr = function(e) { + var t = e.dom(); + return E.from(t.parentNode).map(Hn.fromDom); + }, + Ir = function(e) { + var t = e.dom(); + return E.from(t.previousSibling).map(Hn.fromDom); + }, + Lr = function(e) { + var t = e.dom(); + return E.from(t.nextSibling).map(Hn.fromDom); + }, + Mr = function(e) { + var t = e.dom(); + return M.map(t.childNodes, Hn.fromDom); + }, + Fr = function(e, t) { + var n = e.dom().childNodes; + return E.from(n[t]).map(Hn.fromDom); + }, + zr = xr("element", "offset"), + Ur = { + owner: Or, + defaultView: function(e) { + var t = e.dom().ownerDocument.defaultView; + return Hn.fromDom(t); + }, + documentElement: function(e) { + var t = Or(e); + return Hn.fromDom(t.dom().documentElement); + }, + parent: Pr, + findIndex: function(e) { + return Pr(e).bind(function(t) { + var n = Mr(t); + return M.findIndex(n, function(t) { + return Dr.eq(e, t); + }); + }); + }, + parents: function(e, t) { + for ( + var n = tr.isFunction(t) ? t : y.constant(!1), r = e.dom(), o = []; + null !== r.parentNode && r.parentNode !== undefined; + + ) { + var i = r.parentNode, + a = Hn.fromDom(i); + if ((o.push(a), !0 === n(a))) break; + r = i; + } + return o; + }, + siblings: function(e) { + return Pr(e) + .map(Mr) + .map(function(t) { + return M.filter(t, function(t) { + return !Dr.eq(e, t); + }); + }) + .getOr([]); + }, + prevSibling: Ir, + offsetParent: function(e) { + var t = e.dom(); + return E.from(t.offsetParent).map(Hn.fromDom); + }, + prevSiblings: function(e) { + return M.reverse(wr(e, Ir)); + }, + nextSibling: Lr, + nextSiblings: function(e) { + return wr(e, Lr); + }, + children: Mr, + child: Fr, + firstChild: function(e) { + return Fr(e, 0); + }, + lastChild: function(e) { + return Fr(e, e.dom().childNodes.length - 1); + }, + childNodesCount: function(e) { + return e.dom().childNodes.length; + }, + hasChildNodes: function(e) { + return e.dom().hasChildNodes(); + }, + leaf: function(e, t) { + var n = Mr(e); + return n.length > 0 && t < n.length ? zr(n[t], 0) : zr(e, t); + } + }, + Vr = Un.detect().browser, + Hr = function(e) { + return M.find(e, Zn.isElement); + }, + qr = function(e, t, n) { + var r, + o, + i, + a = 0, + s = 0, + u = e.ownerDocument; + if (((n = n || e), t)) { + if ( + n === e && + t.getBoundingClientRect && + "static" === Cr(Hn.fromDom(e), "position") + ) + return { + x: (a = + (o = t.getBoundingClientRect()).left + + (u.documentElement.scrollLeft || e.scrollLeft) - + u.documentElement.clientLeft), + y: (s = + o.top + + (u.documentElement.scrollTop || e.scrollTop) - + u.documentElement.clientTop) + }; + for (r = t; r && r !== n && r.nodeType; ) + (a += r.offsetLeft || 0), + (s += r.offsetTop || 0), + (r = r.offsetParent); + for (r = t.parentNode; r && r !== n && r.nodeType; ) + (a -= r.scrollLeft || 0), (s -= r.scrollTop || 0), (r = r.parentNode); + s += ((i = Hn.fromDom(t)), + Vr.isFirefox() && "table" === Zn.name(i) + ? Hr(Ur.children(i)) + .filter(function(e) { + return "caption" === Zn.name(e); + }) + .bind(function(e) { + return Hr(Ur.nextSiblings(e)).map(function(t) { + var n = t.dom().offsetTop, + r = e.dom().offsetTop, + o = e.dom().offsetHeight; + return n <= r ? -o : 0; + }); + }) + .getOr(0) + : 0); + } + return { x: a, y: s }; + }, + jr = function(e) { + var t = E.none(), + n = [], + r = function(e) { + o() ? a(e) : n.push(e); + }, + o = function() { + return t.isSome(); + }, + i = function(e) { + M.each(e, a); + }, + a = function(e) { + t.each(function(t) { + setTimeout(function() { + e(t); + }, 0); + }); + }; + return ( + e(function(e) { + (t = E.some(e)), i(n), (n = []); + }), + { + get: r, + map: function(e) { + return jr(function(t) { + r(function(n) { + t(e(n)); + }); + }); + }, + isReady: o + } + ); + }, + $r = { + nu: jr, + pure: function(e) { + return jr(function(t) { + t(e); + }); + } + }, + Wr = function(e) { + return function() { + var t = Array.prototype.slice.call(arguments), + n = this; + setTimeout(function() { + e.apply(n, t); + }, 0); + }; + }, + Kr = function(e) { + var t = function(t) { + e(Wr(t)); + }; + return { + map: function(e) { + return Kr(function(n) { + t(function(t) { + var r = e(t); + n(r); + }); + }); + }, + bind: function(e) { + return Kr(function(n) { + t(function(t) { + e(t).get(n); + }); + }); + }, + anonBind: function(e) { + return Kr(function(n) { + t(function(t) { + e.get(n); + }); + }); + }, + toLazy: function() { + return $r.nu(t); + }, + get: t + }; + }, + Xr = { + nu: Kr, + pure: function(e) { + return Kr(function(t) { + t(e); + }); + } + }, + Yr = function(e, t) { + return t(function(t) { + var n = [], + r = 0; + 0 === e.length + ? t([]) + : M.each(e, function(o, i) { + var a; + o.get( + ((a = i), + function(o) { + (n[a] = o), ++r >= e.length && t(n); + }) + ); + }); + }); + }, + Gr = function(e) { + return Yr(e, Xr.nu); + }, + Jr = Gr, + Qr = function(e) { + return { + is: function(t) { + return e === t; + }, + isValue: y.constant(!0), + isError: y.constant(!1), + getOr: y.constant(e), + getOrThunk: y.constant(e), + getOrDie: y.constant(e), + or: function(t) { + return Qr(e); + }, + orThunk: function(t) { + return Qr(e); + }, + fold: function(t, n) { + return n(e); + }, + map: function(t) { + return Qr(t(e)); + }, + each: function(t) { + t(e); + }, + bind: function(t) { + return t(e); + }, + exists: function(t) { + return t(e); + }, + forall: function(t) { + return t(e); + }, + toOption: function() { + return E.some(e); + } + }; + }, + Zr = function(e) { + return { + is: y.constant(!1), + isValue: y.constant(!1), + isError: y.constant(!0), + getOr: y.identity, + getOrThunk: function(e) { + return e(); + }, + getOrDie: function() { + return y.die(e)(); + }, + or: function(e) { + return e; + }, + orThunk: function(e) { + return e(); + }, + fold: function(t, n) { + return t(e); + }, + map: function(t) { + return Zr(e); + }, + each: y.noop, + bind: function(t) { + return Zr(e); + }, + exists: y.constant(!1), + forall: y.constant(!0), + toOption: E.none + }; + }, + eo = { value: Qr, error: Zr }, + to = function(e, t) { + var n = e, + r = function(e, n, r, o) { + var i, a; + if (e) { + if (!o && e[n]) return e[n]; + if (e !== t) { + if ((i = e[r])) return i; + for (a = e.parentNode; a && a !== t; a = a.parentNode) + if ((i = a[r])) return i; + } + } + }; + (this.current = function() { + return n; + }), + (this.next = function(e) { + return (n = r(n, "firstChild", "nextSibling", e)); + }), + (this.prev = function(e) { + return (n = r(n, "lastChild", "previousSibling", e)); + }), + (this.prev2 = function(e) { + return (n = (function(e, n, r, o) { + var i, a, s; + if (e) { + if (((i = e[r]), t && i === t)) return; + if (i) { + if (!o) for (s = i[n]; s; s = s[n]) if (!s[n]) return s; + return i; + } + if ((a = e.parentNode) && a !== t) return a; + } + })(n, "lastChild", "previousSibling", e)); + }); + }, + no = function(e) { + var t; + return function(n) { + return (t = t || M.mapToObject(e, y.constant(!0))).hasOwnProperty( + Zn.name(n) + ); + }; + }, + ro = no(["h1", "h2", "h3", "h4", "h5", "h6"]), + oo = no([ + "article", + "aside", + "details", + "div", + "dt", + "figcaption", + "footer", + "form", + "fieldset", + "header", + "hgroup", + "html", + "main", + "nav", + "section", + "summary", + "body", + "p", + "dl", + "multicol", + "dd", + "figure", + "address", + "center", + "blockquote", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "listing", + "xmp", + "pre", + "plaintext", + "menu", + "dir", + "ul", + "ol", + "li", + "hr", + "table", + "tbody", + "thead", + "tfoot", + "th", + "tr", + "td", + "caption" + ]), + io = { + isBlock: oo, + isInline: function(e) { + return Zn.isElement(e) && !oo(e); + }, + isHeading: ro, + isTextBlock: no([ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "p", + "div", + "address", + "pre", + "form", + "blockquote", + "center", + "dir", + "fieldset", + "header", + "footer", + "article", + "section", + "hgroup", + "aside", + "nav", + "figure" + ]), + isList: no(["ul", "ol", "dl"]), + isListItem: no(["li", "dd", "dt"]), + isVoid: no([ + "area", + "base", + "basefont", + "br", + "col", + "frame", + "hr", + "img", + "input", + "isindex", + "link", + "meta", + "param", + "embed", + "source", + "wbr", + "track" + ]), + isTableSection: no(["thead", "tbody", "tfoot"]), + isTableCell: no(["td", "th"]), + isBr: function(e) { + return Zn.isElement(e) && "br" === Zn.name(e); + } + }, + ao = function(e) { + return function(t) { + return !!t && t.nodeType === e; + }; + }, + so = ao(1), + uo = function(e) { + var t = e.toLowerCase().split(" "); + return function(e) { + var n, r; + if (e && e.nodeType) + for (r = e.nodeName.toLowerCase(), n = 0; n < t.length; n++) + if (r === t[n]) return !0; + return !1; + }; + }, + co = function(e) { + return function(t) { + if (so(t)) { + if (t.contentEditable === e) return !0; + if (t.getAttribute("data-mce-contenteditable") === e) return !0; + } + return !1; + }; + }, + lo = ao(3), + fo = ao(8), + mo = ao(9), + po = uo("br"), + go = co("true"), + ho = co("false"), + vo = { + isText: lo, + isElement: so, + isComment: fo, + isDocument: mo, + isBr: po, + isContentEditableTrue: go, + isContentEditableFalse: ho, + matchNodeNames: uo, + hasPropValue: function(e, t) { + return function(n) { + return so(n) && n[e] === t; + }; + }, + hasAttribute: function(e, t) { + return function(t) { + return so(t) && t.hasAttribute(e); + }; + }, + hasAttributeValue: function(e, t) { + return function(n) { + return so(n) && n.getAttribute(e) === t; + }; + }, + matchStyleValues: function(e, t) { + var n = t.toLowerCase().split(" "); + return function(t) { + var r; + if (so(t)) + for (r = 0; r < n.length; r++) + if ( + t.ownerDocument.defaultView + .getComputedStyle(t, null) + .getPropertyValue(e) === n[r] + ) + return !0; + return !1; + }; + }, + isBogus: function(e) { + return so(e) && e.hasAttribute("data-mce-bogus"); + } + }, + yo = function(e) { + return ( + e && + "SPAN" === e.tagName && + "bookmark" === e.getAttribute("data-mce-type") + ); + }, + bo = function(e, t) { + var n, + r = t.childNodes; + if (!vo.isElement(t) || !yo(t)) { + for (n = r.length - 1; n >= 0; n--) bo(e, r[n]); + if (!1 === vo.isDocument(t)) { + if (vo.isText(t) && t.nodeValue.length > 0) { + var o = Ot.trim(t.nodeValue).length; + if (e.isBlock(t.parentNode) || o > 0) return; + if ( + 0 === o && + ((a = + (i = t).previousSibling && + "SPAN" === i.previousSibling.nodeName), + (s = i.nextSibling && "SPAN" === i.nextSibling.nodeName), + a && s) + ) + return; + } else if ( + vo.isElement(t) && + (1 === (r = t.childNodes).length && + yo(r[0]) && + t.parentNode.insertBefore(r[0], t), + r.length || io.isVoid(Hn.fromDom(t))) + ) + return; + e.remove(t); + } + var i, a, s; + return t; + } + }, + Co = { trimNode: bo }, + xo = Ot.makeMap, + wo = /[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + No = /[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, + Eo = /[<>&\"\']/g, + So = /&#([a-z0-9]+);?|&([a-z0-9]+);/gi, + ko = { + 128: "\u20ac", + 130: "\u201a", + 131: "\u0192", + 132: "\u201e", + 133: "\u2026", + 134: "\u2020", + 135: "\u2021", + 136: "\u02c6", + 137: "\u2030", + 138: "\u0160", + 139: "\u2039", + 140: "\u0152", + 142: "\u017d", + 145: "\u2018", + 146: "\u2019", + 147: "\u201c", + 148: "\u201d", + 149: "\u2022", + 150: "\u2013", + 151: "\u2014", + 152: "\u02dc", + 153: "\u2122", + 154: "\u0161", + 155: "\u203a", + 156: "\u0153", + 158: "\u017e", + 159: "\u0178" + }; + (fn = { + '"': """, + "'": "'", + "<": "<", + ">": ">", + "&": "&", + "`": "`" + }), + (dn = { + "<": "<", + ">": ">", + "&": "&", + """: '"', + "'": "'" + }); + var To = function(e, t) { + var n, + r, + o, + i = {}; + if (e) { + for (e = e.split(","), t = t || 10, n = 0; n < e.length; n += 2) + (r = String.fromCharCode(parseInt(e[n], t))), + fn[r] || ((o = "&" + e[n + 1] + ";"), (i[r] = o), (i[o] = r)); + return i; + } + }; + ln = To( + "50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro", + 32 + ); + var Ao = { + encodeRaw: function(e, t) { + return e.replace(t ? wo : No, function(e) { + return fn[e] || e; + }); + }, + encodeAllRaw: function(e) { + return ("" + e).replace(Eo, function(e) { + return fn[e] || e; + }); + }, + encodeNumeric: function(e, t) { + return e.replace(t ? wo : No, function(e) { + return e.length > 1 + ? "&#" + + (1024 * (e.charCodeAt(0) - 55296) + + (e.charCodeAt(1) - 56320) + + 65536) + + ";" + : fn[e] || "&#" + e.charCodeAt(0) + ";"; + }); + }, + encodeNamed: function(e, t, n) { + return ( + (n = n || ln), + e.replace(t ? wo : No, function(e) { + return fn[e] || n[e] || e; + }) + ); + }, + getEncodeFunc: function(e, t) { + return ( + (t = To(t) || ln), + (e = xo(e.replace(/\+/g, ","))).named && e.numeric + ? function(e, n) { + return e.replace(n ? wo : No, function(e) { + return fn[e] !== undefined + ? fn[e] + : t[e] !== undefined + ? t[e] + : e.length > 1 + ? "&#" + + (1024 * (e.charCodeAt(0) - 55296) + + (e.charCodeAt(1) - 56320) + + 65536) + + ";" + : "&#" + e.charCodeAt(0) + ";"; + }); + } + : e.named + ? t + ? function(e, n) { + return Ao.encodeNamed(e, n, t); + } + : Ao.encodeNamed + : e.numeric + ? Ao.encodeNumeric + : Ao.encodeRaw + ); + }, + decode: function(e) { + return e.replace(So, function(e, t) { + return t + ? (t = + "x" === t.charAt(0).toLowerCase() + ? parseInt(t.substr(1), 16) + : parseInt(t, 10)) > 65535 + ? ((t -= 65536), + String.fromCharCode(55296 + (t >> 10), 56320 + (1023 & t))) + : ko[t] || String.fromCharCode(t) + : dn[e] || + ln[e] || + ((n = e), + ((r = Hn.fromTag("div").dom()).innerHTML = n), + r.textContent || r.innerText || n); + var n, r; + }); + } + }, + _o = {}, + Bo = {}, + Ro = Ot.makeMap, + Do = Ot.each, + Oo = Ot.extend, + Po = Ot.explode, + Io = Ot.inArray, + Lo = function(e, t) { + return (e = Ot.trim(e)) ? e.split(t || " ") : []; + }, + Mo = function(e, t) { + var n; + return ( + e && + ((n = {}), + "string" == typeof e && (e = { "*": e }), + Do(e, function(e, r) { + n[r] = n[r.toUpperCase()] = + "map" === t ? Ro(e, /[, ]/) : Po(e, /[, ]/); + })), + n + ); + }, + Fo = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C, + x, + w, + N, + E = {}, + S = {}, + k = {}, + T = [], + A = {}, + _ = {}, + B = function(t, n, r) { + var o = e[t]; + return ( + o + ? (o = Ro(o, /[, ]/, Ro(o.toUpperCase(), /[, ]/))) + : (o = _o[t]) || + ((o = Ro(n, " ", Ro(n.toUpperCase(), " "))), + (o = Oo(o, r)), + (_o[t] = o)), + o + ); + }; + (p = (e = e || {}).schema), + (x = {}), + (w = function(e, t, n) { + var r, + o, + i, + a = function(e, t) { + var n, + r, + o = {}; + for (n = 0, r = e.length; n < r; n++) o[e[n]] = t || {}; + return o; + }; + for ( + n = n || [], + t = t || "", + "string" == typeof n && (n = Lo(n)), + r = (e = Lo(e)).length; + r--; + + ) + (i = { + attributes: a((o = Lo([g, t].join(" ")))), + attributesOrder: o, + children: a(n, Bo) + }), + (x[e[r]] = i); + }), + (N = function(e, t) { + var n, r, o, i; + for (n = (e = Lo(e)).length, t = Lo(t); n--; ) + for (r = x[e[n]], o = 0, i = t.length; o < i; o++) + (r.attributes[t[o]] = {}), r.attributesOrder.push(t[o]); + }), + (r = _o[p] + ? _o[p] + : ((g = "id accesskey class dir lang style tabindex title role"), + (h = + "address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"), + (v = + "a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"), + "html4" !== p && + ((g += + " contenteditable contextmenu draggable dropzone hidden spellcheck translate"), + (h += + " article aside details dialog figure header footer hgroup section nav"), + (v += + " audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen")), + "html5-strict" !== p && + ((g += " xml:lang"), + (v = [v, (C = "acronym applet basefont big font strike tt")].join( + " " + )), + Do(Lo(C), function(e) { + w(e, "", v); + }), + (h = [h, (b = "center dir isindex noframes")].join(" ")), + (y = [h, v].join(" ")), + Do(Lo(b), function(e) { + w(e, "", y); + })), + (y = y || [h, v].join(" ")), + w("html", "manifest", "head body"), + w("head", "", "base command link meta noscript script style title"), + w("title hr noscript br"), + w("base", "href target"), + w("link", "href rel media hreflang type sizes hreflang"), + w("meta", "name http-equiv content charset"), + w("style", "media type scoped"), + w("script", "src async defer type charset"), + w( + "body", + "onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload", + y + ), + w("address dt dd div caption", "", y), + w( + "h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn", + "", + v + ), + w("blockquote", "cite", y), + w("ol", "reversed start type", "li"), + w("ul", "", "li"), + w("li", "value", y), + w("dl", "", "dt dd"), + w("a", "href target rel media hreflang type", v), + w("q", "cite", v), + w("ins del", "cite datetime", y), + w("img", "src sizes srcset alt usemap ismap width height"), + w("iframe", "src name width height", y), + w("embed", "src type width height"), + w( + "object", + "data type typemustmatch name usemap form width height", + [y, "param"].join(" ") + ), + w("param", "name value"), + w("map", "name", [y, "area"].join(" ")), + w("area", "alt coords shape href target rel media hreflang type"), + w( + "table", + "border", + "caption colgroup thead tfoot tbody tr" + + ("html4" === p ? " col" : "") + ), + w("colgroup", "span", "col"), + w("col", "span"), + w("tbody thead tfoot", "", "tr"), + w("tr", "", "td th"), + w("td", "colspan rowspan headers", y), + w("th", "colspan rowspan headers scope abbr", y), + w( + "form", + "accept-charset action autocomplete enctype method name novalidate target", + y + ), + w("fieldset", "disabled form name", [y, "legend"].join(" ")), + w("label", "form for", v), + w( + "input", + "accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width" + ), + w( + "button", + "disabled form formaction formenctype formmethod formnovalidate formtarget name type value", + "html4" === p ? y : v + ), + w( + "select", + "disabled form multiple name required size", + "option optgroup" + ), + w("optgroup", "disabled label", "option"), + w("option", "disabled label selected value"), + w( + "textarea", + "cols dirname disabled form maxlength name readonly required rows wrap" + ), + w("menu", "type label", [y, "li"].join(" ")), + w("noscript", "", y), + "html4" !== p && + (w("wbr"), + w("ruby", "", [v, "rt rp"].join(" ")), + w("figcaption", "", y), + w("mark rt rp summary bdi", "", v), + w("canvas", "width height", y), + w( + "video", + "src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered", + [y, "track source"].join(" ") + ), + w( + "audio", + "src crossorigin preload autoplay mediagroup loop muted controls buffered volume", + [y, "track source"].join(" ") + ), + w("picture", "", "img source"), + w("source", "src srcset type media sizes"), + w("track", "kind src srclang label default"), + w("datalist", "", [v, "option"].join(" ")), + w("article section nav aside header footer", "", y), + w("hgroup", "", "h1 h2 h3 h4 h5 h6"), + w("figure", "", [y, "figcaption"].join(" ")), + w("time", "datetime", v), + w("dialog", "open", y), + w( + "command", + "type label icon disabled checked radiogroup command" + ), + w("output", "for form name", v), + w("progress", "value max", v), + w("meter", "value min max low high optimum", v), + w("details", "open", [y, "summary"].join(" ")), + w("keygen", "autofocus challenge disabled form keytype name")), + "html5-strict" !== p && + (N("script", "language xml:space"), + N("style", "xml:space"), + N( + "object", + "declare classid code codebase codetype archive standby align border hspace vspace" + ), + N("embed", "align name hspace vspace"), + N("param", "valuetype type"), + N("a", "charset name rev shape coords"), + N("br", "clear"), + N( + "applet", + "codebase archive code object alt name width height align hspace vspace" + ), + N("img", "name longdesc align border hspace vspace"), + N( + "iframe", + "longdesc frameborder marginwidth marginheight scrolling align" + ), + N("font basefont", "size color face"), + N("input", "usemap align"), + N("select", "onchange"), + N("textarea"), + N("h1 h2 h3 h4 h5 h6 div p legend caption", "align"), + N("ul", "type compact"), + N("li", "type"), + N("ol dl menu dir", "compact"), + N("pre", "width xml:space"), + N("hr", "align noshade size width"), + N("isindex", "prompt"), + N( + "table", + "summary width frame rules cellspacing cellpadding align bgcolor" + ), + N("col", "width align char charoff valign"), + N("colgroup", "width align char charoff valign"), + N("thead", "align char charoff valign"), + N("tr", "align char charoff valign bgcolor"), + N( + "th", + "axis align char charoff valign nowrap bgcolor width height" + ), + N("form", "accept"), + N( + "td", + "abbr axis scope align char charoff valign nowrap bgcolor width height" + ), + N("tfoot", "align char charoff valign"), + N("tbody", "align char charoff valign"), + N("area", "nohref"), + N("body", "background bgcolor text link vlink alink")), + "html4" !== p && + (N("input button select textarea", "autofocus"), + N("input textarea", "placeholder"), + N("a", "download"), + N("link script img", "crossorigin"), + N("iframe", "sandbox seamless allowfullscreen")), + Do(Lo("a form meter progress dfn"), function(e) { + x[e] && delete x[e].children[e]; + }), + delete x.caption.children.table, + delete x.script, + (_o[p] = x), + x)), + !1 === e.verify_html && (e.valid_elements = "*[*]"), + (t = Mo(e.valid_styles)), + (n = Mo(e.invalid_styles, "map")), + (u = Mo(e.valid_classes, "map")), + (o = B( + "whitespace_elements", + "pre script noscript style textarea video audio iframe object code" + )), + (i = B( + "self_closing_elements", + "colgroup dd dt li option p td tfoot th thead tr" + )), + (a = B( + "short_ended_elements", + "area base basefont br col frame hr img input isindex link meta param embed source wbr track" + )), + (s = B( + "boolean_attributes", + "checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls" + )), + (l = B( + "non_empty_elements", + "td th iframe video audio object script pre code", + a + )), + (f = B("move_caret_before_on_enter_elements", "table", l)), + (d = B( + "text_block_elements", + "h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure" + )), + (c = B( + "block_elements", + "hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption", + d + )), + (m = B( + "text_inline_elements", + "span strong b em i font strike u var cite dfn code mark q sup sub samp" + )), + Do( + ( + e.special || + "script noscript noframes noembed title style textarea xmp" + ).split(" "), + function(e) { + _[e] = new RegExp("]*>", "gi"); + } + ); + var R = function(e) { + return new RegExp("^" + e.replace(/([?+*])/g, ".$1") + "$"); + }, + D = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C = /^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/, + x = /^([!\-])?(\w+[\\:]:\w+|[^=:<]+)?(?:([=:<])(.*))?$/, + w = /[*?+]/; + if (e) + for ( + e = Lo(e, ","), + S["@"] && + ((h = S["@"].attributes), (v = S["@"].attributesOrder)), + t = 0, + n = e.length; + t < n; + t++ + ) + if ((i = C.exec(e[t]))) { + if ( + ((p = i[1]), + (c = i[2]), + (g = i[3]), + (u = i[5]), + (a = { attributes: (d = {}), attributesOrder: (m = []) }), + "#" === p && (a.paddEmpty = !0), + "-" === p && (a.removeEmpty = !0), + "!" === i[4] && (a.removeEmptyAttrs = !0), + h) + ) { + for (y in h) d[y] = h[y]; + m.push.apply(m, v); + } + if (u) + for (r = 0, o = (u = Lo(u, "|")).length; r < o; r++) + if ((i = x.exec(u[r]))) { + if ( + ((s = {}), + (f = i[1]), + (l = i[2].replace(/[\\:]:/g, ":")), + (p = i[3]), + (b = i[4]), + "!" === f && + ((a.attributesRequired = a.attributesRequired || []), + a.attributesRequired.push(l), + (s.required = !0)), + "-" === f) + ) { + delete d[l], m.splice(Io(m, l), 1); + continue; + } + p && + ("=" === p && + ((a.attributesDefault = a.attributesDefault || []), + a.attributesDefault.push({ name: l, value: b }), + (s.defaultValue = b)), + ":" === p && + ((a.attributesForced = a.attributesForced || []), + a.attributesForced.push({ name: l, value: b }), + (s.forcedValue = b)), + "<" === p && (s.validValues = Ro(b, "?"))), + w.test(l) + ? ((a.attributePatterns = a.attributePatterns || []), + (s.pattern = R(l)), + a.attributePatterns.push(s)) + : (d[l] || m.push(l), (d[l] = s)); + } + h || "@" !== c || ((h = d), (v = m)), + g && ((a.outputName = c), (S[g] = a)), + w.test(c) ? ((a.pattern = R(c)), T.push(a)) : (S[c] = a); + } + }, + O = function(e) { + (S = {}), + (T = []), + D(e), + Do(r, function(e, t) { + k[t] = e.children; + }); + }, + P = function(e) { + var t = /^(~)?(.+)$/; + e && + ((_o.text_block_elements = _o.block_elements = null), + Do(Lo(e, ","), function(e) { + var n = t.exec(e), + r = "~" === n[1], + o = r ? "span" : "div", + i = n[2]; + if ( + ((k[i] = k[o]), + (A[i] = o), + r || ((c[i.toUpperCase()] = {}), (c[i] = {})), + !S[i]) + ) { + var a = S[o]; + delete (a = Oo({}, a)).removeEmptyAttrs, + delete a.removeEmpty, + (S[i] = a); + } + Do(k, function(e, t) { + e[o] && ((k[t] = e = Oo({}, k[t])), (e[i] = e[o])); + }); + })); + }, + I = function(t) { + var n = /^([+\-]?)(\w+)\[([^\]]+)\]$/; + (_o[e.schema] = null), + t && + Do(Lo(t, ","), function(e) { + var t, + r, + o = n.exec(e); + o && + ((r = o[1]), + (t = r ? k[o[2]] : (k[o[2]] = { "#comment": {} })), + (t = k[o[2]]), + Do(Lo(o[3], "|"), function(e) { + "-" === r ? delete t[e] : (t[e] = {}); + })); + }); + }, + L = function(e) { + var t, + n = S[e]; + if (n) return n; + for (t = T.length; t--; ) if ((n = T[t]).pattern.test(e)) return n; + }; + return ( + e.valid_elements + ? O(e.valid_elements) + : (Do(r, function(e, t) { + (S[t] = { + attributes: e.attributes, + attributesOrder: e.attributesOrder + }), + (k[t] = e.children); + }), + "html5" !== e.schema && + Do(Lo("strong/b em/i"), function(e) { + (e = Lo(e, "/")), (S[e[1]].outputName = e[0]); + }), + Do( + Lo( + "ol ul sub sup blockquote span font a table tbody tr strong em b i" + ), + function(e) { + S[e] && (S[e].removeEmpty = !0); + } + ), + Do( + Lo("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"), + function(e) { + S[e].paddEmpty = !0; + } + ), + Do(Lo("span"), function(e) { + S[e].removeEmptyAttrs = !0; + })), + P(e.custom_elements), + I(e.valid_children), + D(e.extended_valid_elements), + I("+ol[ul|ol],+ul[ul|ol]"), + Do( + { + dd: "dl", + dt: "dl", + li: "ul ol", + td: "tr", + th: "tr", + tr: "tbody thead tfoot", + tbody: "table", + thead: "table", + tfoot: "table", + legend: "fieldset", + area: "map", + param: "video audio object" + }, + function(e, t) { + S[t] && (S[t].parentsRequired = Lo(e)); + } + ), + e.invalid_elements && + Do(Po(e.invalid_elements), function(e) { + S[e] && delete S[e]; + }), + L("span") || D("span[!data-mce-type|*]"), + (E.children = k), + (E.getValidStyles = function() { + return t; + }), + (E.getInvalidStyles = function() { + return n; + }), + (E.getValidClasses = function() { + return u; + }), + (E.getBoolAttrs = function() { + return s; + }), + (E.getBlockElements = function() { + return c; + }), + (E.getTextBlockElements = function() { + return d; + }), + (E.getTextInlineElements = function() { + return m; + }), + (E.getShortEndedElements = function() { + return a; + }), + (E.getSelfClosingElements = function() { + return i; + }), + (E.getNonEmptyElements = function() { + return l; + }), + (E.getMoveCaretBeforeOnEnterElements = function() { + return f; + }), + (E.getWhiteSpaceElements = function() { + return o; + }), + (E.getSpecialElements = function() { + return _; + }), + (E.isValidChild = function(e, t) { + var n = k[e.toLowerCase()]; + return !(!n || !n[t.toLowerCase()]); + }), + (E.isValid = function(e, t) { + var n, + r, + o = L(e); + if (o) { + if (!t) return !0; + if (o.attributes[t]) return !0; + if ((n = o.attributePatterns)) + for (r = n.length; r--; ) if (n[r].pattern.test(e)) return !0; + } + return !1; + }), + (E.getElementRule = L), + (E.getCustomElements = function() { + return A; + }), + (E.addValidElements = D), + (E.setValidElements = O), + (E.addCustomElements = P), + (E.addValidChildren = I), + (E.elements = S), + E + ); + }, + zo = function(e, t) { + var n, + r, + o, + i, + a = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, + s = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi, + u = /\s*([^:]+):\s*([^;]+);?/g, + c = /\s+$/, + l = {}, + f = "\ufeff"; + for ( + e = e || {}, + t && ((o = t.getValidStyles()), (i = t.getInvalidStyles())), + r = ("\\\" \\' \\; \\: ; : " + f).split(" "), + n = 0; + n < r.length; + n++ + ) + (l[r[n]] = f + n), (l[f + n] = r[n]); + var d = function(e, t, n, r) { + var o = function(e) { + return (e = parseInt(e, 10).toString(16)).length > 1 ? e : "0" + e; + }; + return "#" + o(t) + o(n) + o(r); + }; + return { + toHex: function(e) { + return e.replace(a, d); + }, + parse: function(t) { + var r, + o, + i, + m, + p, + g, + h, + v, + y = {}, + b = e.url_converter, + C = e.url_converter_scope || this, + x = function(e, t, r) { + var o, i, a, s; + if ( + (o = y[e + "-top" + t]) && + (i = y[e + "-right" + t]) && + (a = y[e + "-bottom" + t]) && + (s = y[e + "-left" + t]) + ) { + var u = [o, i, a, s]; + for (n = u.length - 1; n-- && u[n] === u[n + 1]; ); + (n > -1 && r) || + ((y[e + t] = -1 === n ? u[0] : u.join(" ")), + delete y[e + "-top" + t], + delete y[e + "-right" + t], + delete y[e + "-bottom" + t], + delete y[e + "-left" + t]); + } + }, + w = function(e) { + var t, + n = y[e]; + if (n) { + for (t = (n = n.split(" ")).length; t--; ) + if (n[t] !== n[0]) return !1; + return (y[e] = n[0]), !0; + } + }, + N = function(e) { + return (m = !0), l[e]; + }, + E = function(e, t) { + return ( + m && + (e = e.replace(/\uFEFF[0-9]/g, function(e) { + return l[e]; + })), + t || (e = e.replace(/\\([\'\";:])/g, "$1")), + e + ); + }, + S = function(e) { + return String.fromCharCode(parseInt(e.slice(1), 16)); + }, + k = function(e) { + return e.replace(/\\[0-9a-f]+/gi, S); + }, + T = function(t, n, r, o, i, a) { + if ((i = i || a)) + return "'" + (i = E(i)).replace(/\'/g, "\\'") + "'"; + if (((n = E(n || r || o)), !e.allow_script_urls)) { + var s = n.replace(/[\s\r\n]+/g, ""); + if (/(java|vb)script:/i.test(s)) return ""; + if (!e.allow_svg_data_urls && /^data:image\/svg/i.test(s)) + return ""; + } + return ( + b && (n = b.call(C, n, "style")), + "url('" + n.replace(/\'/g, "\\'") + "')" + ); + }; + if (t) { + for ( + t = (t = t.replace(/[\u0000-\u001F]/g, "")) + .replace(/\\[\"\';:\uFEFF]/g, N) + .replace(/\"[^\"]+\"|\'[^\']+\'/g, function(e) { + return e.replace(/[;:]/g, N); + }); + (r = u.exec(t)); + + ) + if ( + ((u.lastIndex = r.index + r[0].length), + (o = r[1].replace(c, "").toLowerCase()), + (i = r[2].replace(c, "")), + o && i) + ) { + if ( + ((o = k(o)), + (i = k(i)), + -1 !== o.indexOf(f) || -1 !== o.indexOf('"')) + ) + continue; + if ( + !e.allow_script_urls && + ("behavior" === o || /expression\s*\(|\/\*|\*\//.test(i)) + ) + continue; + "font-weight" === o && "700" === i + ? (i = "bold") + : ("color" !== o && "background-color" !== o) || + (i = i.toLowerCase()), + (i = (i = i.replace(a, d)).replace(s, T)), + (y[o] = m ? E(i, !0) : i); + } + x("border", "", !0), + x("border", "-width"), + x("border", "-color"), + x("border", "-style"), + x("padding", ""), + x("margin", ""), + (p = "border"), + (h = "border-style"), + (v = "border-color"), + w((g = "border-width")) && + w(h) && + w(v) && + ((y[p] = y[g] + " " + y[h] + " " + y[v]), + delete y[g], + delete y[h], + delete y[v]), + "medium none" === y.border && delete y.border, + "none" === y["border-image"] && delete y["border-image"]; + } + return y; + }, + serialize: function(e, t) { + var n, + r, + a, + s, + u, + c = "", + l = function(t) { + var n, r, i, a; + if ((n = o[t])) + for (r = 0, i = n.length; r < i; r++) + (t = n[r]), + (a = e[t]) && + (c += (c.length > 0 ? " " : "") + t + ": " + a + ";"); + }; + if (t && o) l("*"), l(t); + else + for (n in e) + !(r = e[n]) || + (i && + ((a = n), + (s = t), + (u = void 0), + ((u = i["*"]) && u[a]) || ((u = i[s]) && u[a]))) || + (c += (c.length > 0 ? " " : "") + n + ": " + r + ";"); + return c; + } + }; + }, + Uo = Ot.each, + Vo = Ot.is, + Ho = Ot.grep, + qo = me.ie, + jo = /^([a-z0-9],?)+$/i, + $o = /^[ \t\r\n]*$/, + Wo = function(e, t) { + var n = t.attr("style"); + (n = e.serializeStyle(e.parseStyle(n), t[0].nodeName)) || (n = null), + t.attr("data-mce-style", n); + }, + Ko = function(e, t) { + var n, + r, + o = 0; + if (e) + for (n = e.nodeType, e = e.previousSibling; e; e = e.previousSibling) + (r = e.nodeType), + (!t || 3 !== r || (r !== n && e.nodeValue.length)) && + (o++, (n = r)); + return o; + }, + Xo = function(e, t) { + var n, + r, + o, + i, + a, + s, + u = this; + (u.doc = e), + (u.win = window), + (u.files = {}), + (u.counter = 0), + (u.stdMode = !qo || e.documentMode >= 8), + (u.boxModel = !qo || "CSS1Compat" === e.compatMode || u.stdMode), + (u.styleSheetLoader = (function(e, t) { + var n, + r = 0, + o = {}; + n = (t = t || {}).maxLoadTime || 5e3; + var i = function(t) { + e.getElementsByTagName("head")[0].appendChild(t); + }, + a = function(t, a, s) { + var u, + c, + l, + f, + d = function() { + for (var e = f.passed, t = e.length; t--; ) e[t](); + (f.status = 2), (f.passed = []), (f.failed = []); + }, + m = function() { + for (var e = f.failed, t = e.length; t--; ) e[t](); + (f.status = 3), (f.passed = []), (f.failed = []); + }, + p = function(e, t) { + e() || + (new Date().getTime() - l < n ? ye.setTimeout(t) : m()); + }, + g = function() { + p(function() { + for (var t, n, r = e.styleSheets, o = r.length; o--; ) + if ( + (n = (t = r[o]).ownerNode + ? t.ownerNode + : t.owningElement) && + n.id === u.id + ) + return d(), !0; + }, g); + }, + h = function() { + p(function() { + try { + var e = c.sheet.cssRules; + return d(), !!e; + } catch (t) {} + }, h); + }; + if ( + ((t = Ot._addCacheSuffix(t)), + o[t] + ? (f = o[t]) + : ((f = { passed: [], failed: [] }), (o[t] = f)), + a && f.passed.push(a), + s && f.failed.push(s), + 1 !== f.status) + ) + if (2 !== f.status) + if (3 !== f.status) { + if ( + ((f.status = 1), + ((u = e.createElement("link")).rel = "stylesheet"), + (u.type = "text/css"), + (u.id = "u" + r++), + (u.async = !1), + (u.defer = !1), + (l = new Date().getTime()), + "onload" in u && + !( + (v = navigator.userAgent.match(/WebKit\/(\d*)/)) && + parseInt(v[1], 10) < 536 + )) + ) + (u.onload = g), (u.onerror = m); + else { + if (navigator.userAgent.indexOf("Firefox") > 0) + return ( + ((c = e.createElement("style")).textContent = + '@import "' + t + '"'), + h(), + void i(c) + ); + g(); + } + var v; + i(u), (u.href = t); + } else m(); + else d(); + }, + s = function(e) { + return Xr.nu(function(t) { + a( + e, + y.compose( + t, + y.constant(eo.value(e)) + ), + y.compose( + t, + y.constant(eo.error(e)) + ) + ); + }); + }, + u = function(e) { + return e.fold(y.identity, y.identity); + }; + return { + load: a, + loadAll: function(e, t, n) { + Jr(M.map(e, s)).get(function(e) { + var r = M.partition(e, function(e) { + return e.isValue(); + }); + r.fail.length > 0 ? n(r.fail.map(u)) : t(r.pass.map(u)); + }); + } + }; + })(e)), + (u.boundEvents = []), + (u.settings = t = t || {}), + (u.schema = t.schema ? t.schema : Fo({})), + (u.styles = zo( + { + url_converter: t.url_converter, + url_converter_scope: t.url_converter_scope + }, + t.schema + )), + u.fixDoc(e), + (u.events = t.ownEvents ? new Te(t.proxy) : Te.Event), + (u.attrHooks = ((r = u), + (a = {}), + (s = (o = t).keep_values), + (i = { + set: function(e, t, n) { + o.url_converter && + (t = o.url_converter.call( + o.url_converter_scope || r, + t, + n, + e[0] + )), + e.attr("data-mce-" + n, t).attr(n, t); + }, + get: function(e, t) { + return e.attr("data-mce-" + t) || e.attr(t); + } + }), + (a = { + style: { + set: function(e, t) { + null === t || "object" != typeof t + ? (s && e.attr("data-mce-style", t), e.attr("style", t)) + : e.css(t); + }, + get: function(e) { + var t = e.attr("data-mce-style") || e.attr("style"); + return (t = r.serializeStyle(r.parseStyle(t), e[0].nodeName)); + } + } + }), + s && (a.href = a.src = i), + a)), + (n = u.schema.getBlockElements()), + (u.$ = Qt.overrideDefaults(function() { + return { context: e, element: u.getRoot() }; + })), + (u.isBlock = function(e) { + if (!e) return !1; + var t = e.nodeType; + return t ? !(1 !== t || !n[e.nodeName]) : !!n[e]; + }); + }; + (Xo.prototype = { + $$: function(e) { + return "string" == typeof e && (e = this.get(e)), this.$(e); + }, + root: null, + fixDoc: function(e) {}, + clone: function(e, t) { + var n, + r, + o = this; + return !qo || 1 !== e.nodeType || t + ? e.cloneNode(t) + : ((r = o.doc), + t + ? n.firstChild + : ((n = r.createElement(e.nodeName)), + Uo(o.getAttribs(e), function(t) { + o.setAttrib(n, t.nodeName, o.getAttrib(e, t.nodeName)); + }), + n)); + }, + getRoot: function() { + return this.settings.root_element || this.doc.body; + }, + getViewPort: function(e) { + var t, n; + return ( + (t = (e = e || this.win).document), + (n = this.boxModel ? t.documentElement : t.body), + { + x: e.pageXOffset || n.scrollLeft, + y: e.pageYOffset || n.scrollTop, + w: e.innerWidth || n.clientWidth, + h: e.innerHeight || n.clientHeight + } + ); + }, + getRect: function(e) { + var t, n; + return ( + (e = this.get(e)), + (t = this.getPos(e)), + (n = this.getSize(e)), + { x: t.x, y: t.y, w: n.w, h: n.h } + ); + }, + getSize: function(e) { + var t, n; + return ( + (e = this.get(e)), + (t = this.getStyle(e, "width")), + (n = this.getStyle(e, "height")), + -1 === t.indexOf("px") && (t = 0), + -1 === n.indexOf("px") && (n = 0), + { + w: parseInt(t, 10) || e.offsetWidth || e.clientWidth, + h: parseInt(n, 10) || e.offsetHeight || e.clientHeight + } + ); + }, + getParent: function(e, t, n) { + return this.getParents(e, t, n, !1); + }, + getParents: function(e, t, n, r) { + var o, + i = this, + a = []; + for ( + e = i.get(e), + r = r === undefined, + n = + n || + ("BODY" !== i.getRoot().nodeName ? i.getRoot().parentNode : null), + Vo(t, "string") && + ((o = t), + (t = + "*" === t + ? function(e) { + return 1 === e.nodeType; + } + : function(e) { + return i.is(e, o); + })); + e && e !== n && e.nodeType && 9 !== e.nodeType; + + ) { + if (!t || t(e)) { + if (!r) return e; + a.push(e); + } + e = e.parentNode; + } + return r ? a : null; + }, + get: function(e) { + var t; + return e && + this.doc && + "string" == typeof e && + ((t = e), (e = this.doc.getElementById(e)) && e.id !== t) + ? this.doc.getElementsByName(t)[1] + : e; + }, + getNext: function(e, t) { + return this._findSib(e, t, "nextSibling"); + }, + getPrev: function(e, t) { + return this._findSib(e, t, "previousSibling"); + }, + select: function(e, t) { + return lt(e, this.get(t) || this.settings.root_element || this.doc, []); + }, + is: function(e, t) { + var n; + if (!e) return !1; + if (e.length === undefined) { + if ("*" === t) return 1 === e.nodeType; + if (jo.test(t)) { + for ( + t = t.toLowerCase().split(/,/), + e = e.nodeName.toLowerCase(), + n = t.length - 1; + n >= 0; + n-- + ) + if (t[n] === e) return !0; + return !1; + } + } + if (e.nodeType && 1 !== e.nodeType) return !1; + var r = e.nodeType ? [e] : e; + return lt(t, r[0].ownerDocument || r[0], null, r).length > 0; + }, + add: function(e, t, n, r, o) { + var i = this; + return this.run(e, function(e) { + var a; + return ( + (a = Vo(t, "string") ? i.doc.createElement(t) : t), + i.setAttribs(a, n), + r && (r.nodeType ? a.appendChild(r) : i.setHTML(a, r)), + o ? a : e.appendChild(a) + ); + }); + }, + create: function(e, t, n) { + return this.add(this.doc.createElement(e), e, t, n, 1); + }, + createHTML: function(e, t, n) { + var r, + o = ""; + for (r in ((o += "<" + e), t)) + t.hasOwnProperty(r) && + null !== t[r] && + "undefined" != typeof t[r] && + (o += " " + r + '="' + this.encode(t[r]) + '"'); + return void 0 !== n ? o + ">" + n + "" : o + " />"; + }, + createFragment: function(e) { + var t, + n, + r, + o = this.doc; + for ( + r = o.createElement("div"), + t = o.createDocumentFragment(), + e && (r.innerHTML = e); + (n = r.firstChild); + + ) + t.appendChild(n); + return t; + }, + remove: function(e, t) { + return ( + (e = this.$$(e)), + t + ? e + .each(function() { + for (var e; (e = this.firstChild); ) + 3 === e.nodeType && 0 === e.data.length + ? this.removeChild(e) + : this.parentNode.insertBefore(e, this); + }) + .remove() + : e.remove(), + e.length > 1 ? e.toArray() : e[0] + ); + }, + setStyle: function(e, t, n) { + (e = this.$$(e).css(t, n)), this.settings.update_styles && Wo(this, e); + }, + getStyle: function(e, t, n) { + return ( + (e = this.$$(e)), + n + ? e.css(t) + : ("float" === + (t = t.replace(/-(\D)/g, function(e, t) { + return t.toUpperCase(); + })) && (t = me.ie && me.ie < 12 ? "styleFloat" : "cssFloat"), + e[0] && e[0].style ? e[0].style[t] : undefined) + ); + }, + setStyles: function(e, t) { + (e = this.$$(e).css(t)), this.settings.update_styles && Wo(this, e); + }, + removeAllAttribs: function(e) { + return this.run(e, function(e) { + var t, + n = e.attributes; + for (t = n.length - 1; t >= 0; t--) e.removeAttributeNode(n.item(t)); + }); + }, + setAttrib: function(e, t, n) { + var r, + o, + i = this.settings; + "" === n && (n = null), + (r = (e = this.$$(e)).attr(t)), + e.length && + ((o = this.attrHooks[t]) && o.set ? o.set(e, n, t) : e.attr(t, n), + r !== n && + i.onSetAttrib && + i.onSetAttrib({ attrElm: e, attrName: t, attrValue: n })); + }, + setAttribs: function(e, t) { + var n = this; + n.$$(e).each(function(e, r) { + Uo(t, function(e, t) { + n.setAttrib(r, t, e); + }); + }); + }, + getAttrib: function(e, t, n) { + var r, o; + return ( + (e = this.$$(e)).length && + (o = (r = this.attrHooks[t]) && r.get ? r.get(e, t) : e.attr(t)), + void 0 === o && (o = n || ""), + o + ); + }, + getPos: function(e, t) { + return qr(this.doc.body, this.get(e), t); + }, + parseStyle: function(e) { + return this.styles.parse(e); + }, + serializeStyle: function(e, t) { + return this.styles.serialize(e, t); + }, + addStyle: function(e) { + var t, + n, + r = this.doc; + if (this !== Xo.DOM && r === document) { + var o = Xo.DOM.addedStyles; + if ((o = o || [])[e]) return; + (o[e] = !0), (Xo.DOM.addedStyles = o); + } + (n = r.getElementById("mceDefaultStyles")) || + (((n = r.createElement("style")).id = "mceDefaultStyles"), + (n.type = "text/css"), + (t = r.getElementsByTagName("head")[0]).firstChild + ? t.insertBefore(n, t.firstChild) + : t.appendChild(n)), + n.styleSheet + ? (n.styleSheet.cssText += e) + : n.appendChild(r.createTextNode(e)); + }, + loadCSS: function(e) { + var t, + n = this, + r = n.doc; + n === Xo.DOM || r !== document + ? (e || (e = ""), + (t = r.getElementsByTagName("head")[0]), + Uo(e.split(","), function(e) { + var o; + (e = Ot._addCacheSuffix(e)), + n.files[e] || + ((n.files[e] = !0), + (o = n.create("link", { rel: "stylesheet", href: e })), + qo && + r.documentMode && + r.recalc && + (o.onload = function() { + r.recalc && r.recalc(), (o.onload = null); + }), + t.appendChild(o)); + })) + : Xo.DOM.loadCSS(e); + }, + addClass: function(e, t) { + this.$$(e).addClass(t); + }, + removeClass: function(e, t) { + this.toggleClass(e, t, !1); + }, + hasClass: function(e, t) { + return this.$$(e).hasClass(t); + }, + toggleClass: function(e, t, n) { + this.$$(e) + .toggleClass(t, n) + .each(function() { + "" === this.className && Qt(this).attr("class", null); + }); + }, + show: function(e) { + this.$$(e).show(); + }, + hide: function(e) { + this.$$(e).hide(); + }, + isHidden: function(e) { + return "none" === this.$$(e).css("display"); + }, + uniqueId: function(e) { + return (e || "mce_") + this.counter++; + }, + setHTML: function(e, t) { + (e = this.$$(e)), + qo + ? e.each(function(e, n) { + if (!1 !== n.canHaveHTML) { + for (; n.firstChild; ) n.removeChild(n.firstChild); + try { + (n.innerHTML = "
" + t), n.removeChild(n.firstChild); + } catch (r) { + Qt("
") + .html("
" + t) + .contents() + .slice(1) + .appendTo(n); + } + return t; + } + }) + : e.html(t); + }, + getOuterHTML: function(e) { + return 1 === (e = this.get(e)).nodeType && "outerHTML" in e + ? e.outerHTML + : Qt("
") + .append(Qt(e).clone()) + .html(); + }, + setOuterHTML: function(e, t) { + var n = this; + n.$$(e).each(function() { + try { + if ("outerHTML" in this) return void (this.outerHTML = t); + } catch (e) {} + n.remove(Qt(this).html(t), !0); + }); + }, + decode: Ao.decode, + encode: Ao.encodeAllRaw, + insertAfter: function(e, t) { + return ( + (t = this.get(t)), + this.run(e, function(e) { + var n, r; + return ( + (n = t.parentNode), + (r = t.nextSibling) ? n.insertBefore(e, r) : n.appendChild(e), + e + ); + }) + ); + }, + replace: function(e, t, n) { + return this.run(t, function(t) { + return ( + Vo(t, "array") && (e = e.cloneNode(!0)), + n && + Uo(Ho(t.childNodes), function(t) { + e.appendChild(t); + }), + t.parentNode.replaceChild(e, t) + ); + }); + }, + rename: function(e, t) { + var n, + r = this; + return ( + e.nodeName !== t.toUpperCase() && + ((n = r.create(t)), + Uo(r.getAttribs(e), function(t) { + r.setAttrib(n, t.nodeName, r.getAttrib(e, t.nodeName)); + }), + r.replace(n, e, 1)), + n || e + ); + }, + findCommonAncestor: function(e, t) { + for (var n, r = e; r; ) { + for (n = t; n && r !== n; ) n = n.parentNode; + if (r === n) break; + r = r.parentNode; + } + return !r && e.ownerDocument ? e.ownerDocument.documentElement : r; + }, + toHex: function(e) { + return this.styles.toHex(Ot.trim(e)); + }, + run: function(e, t, n) { + var r, + o = this; + return ( + "string" == typeof e && (e = o.get(e)), + !!e && + ((n = n || this), + e.nodeType || (!e.length && 0 !== e.length) + ? t.call(n, e) + : ((r = []), + Uo(e, function(e, i) { + e && + ("string" == typeof e && (e = o.get(e)), + r.push(t.call(n, e, i))); + }), + r)) + ); + }, + getAttribs: function(e) { + var t; + return (e = this.get(e)) + ? qo + ? ((t = []), + "OBJECT" === e.nodeName + ? e.attributes + : ("OPTION" === e.nodeName && + this.getAttrib(e, "selected") && + t.push({ specified: 1, nodeName: "selected" }), + e + .cloneNode(!1) + .outerHTML.replace( + /<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi, + "" + ) + .replace(/[\w:\-]+/gi, function(e) { + t.push({ specified: 1, nodeName: e }); + }), + t)) + : e.attributes + : []; + }, + isEmpty: function(e, t) { + var n, + r, + o, + i, + a, + s, + u = 0; + if ((e = e.firstChild)) { + (a = new to(e, e.parentNode)), + (t = t || (this.schema ? this.schema.getNonEmptyElements() : null)), + (i = this.schema ? this.schema.getWhiteSpaceElements() : {}); + do { + if (1 === (o = e.nodeType)) { + var c = e.getAttribute("data-mce-bogus"); + if (c) { + e = a.next("all" === c); + continue; + } + if (((s = e.nodeName.toLowerCase()), t && t[s])) { + if ("br" === s) { + u++, (e = a.next()); + continue; + } + return !1; + } + for (n = (r = this.getAttribs(e)).length; n--; ) + if ("name" === (s = r[n].nodeName) || "data-mce-bookmark" === s) + return !1; + } + if (8 === o) return !1; + if (3 === o && !$o.test(e.nodeValue)) return !1; + if ( + 3 === o && + e.parentNode && + i[e.parentNode.nodeName] && + $o.test(e.nodeValue) + ) + return !1; + e = a.next(); + } while (e); + } + return u <= 1; + }, + createRng: function() { + return this.doc.createRange(); + }, + nodeIndex: Ko, + split: function(e, t, n) { + var r, + o, + i, + a = this.createRng(); + if (e && t) + return ( + a.setStart(e.parentNode, this.nodeIndex(e)), + a.setEnd(t.parentNode, this.nodeIndex(t)), + (r = a.extractContents()), + (a = this.createRng()).setStart(t.parentNode, this.nodeIndex(t) + 1), + a.setEnd(e.parentNode, this.nodeIndex(e) + 1), + (o = a.extractContents()), + (i = e.parentNode).insertBefore(Co.trimNode(this, r), e), + n ? i.insertBefore(n, e) : i.insertBefore(t, e), + i.insertBefore(Co.trimNode(this, o), e), + this.remove(e), + n || t + ); + }, + bind: function(e, t, n, r) { + if (Ot.isArray(e)) { + for (var o = e.length; o--; ) e[o] = this.bind(e[o], t, n, r); + return e; + } + return ( + !this.settings.collect || + (e !== this.doc && e !== this.win) || + this.boundEvents.push([e, t, n, r]), + this.events.bind(e, t, n, r || this) + ); + }, + unbind: function(e, t, n) { + var r; + if (Ot.isArray(e)) { + for (r = e.length; r--; ) e[r] = this.unbind(e[r], t, n); + return e; + } + if (this.boundEvents && (e === this.doc || e === this.win)) + for (r = this.boundEvents.length; r--; ) { + var o = this.boundEvents[r]; + e !== o[0] || + (t && t !== o[1]) || + (n && n !== o[2]) || + this.events.unbind(o[0], o[1], o[2]); + } + return this.events.unbind(e, t, n); + }, + fire: function(e, t, n) { + return this.events.fire(e, t, n); + }, + getContentEditable: function(e) { + var t; + return e && 1 === e.nodeType + ? (t = e.getAttribute("data-mce-contenteditable")) && "inherit" !== t + ? t + : "inherit" !== e.contentEditable + ? e.contentEditable + : null + : null; + }, + getContentEditableParent: function(e) { + for ( + var t = this.getRoot(), n = null; + e && e !== t && null === (n = this.getContentEditable(e)); + e = e.parentNode + ); + return n; + }, + destroy: function() { + if (this.boundEvents) { + for (var e = this.boundEvents.length; e--; ) { + var t = this.boundEvents[e]; + this.events.unbind(t[0], t[1], t[2]); + } + this.boundEvents = null; + } + lt.setDocument && lt.setDocument(), + (this.win = this.doc = this.root = this.events = this.frag = null); + }, + isChildOf: function(e, t) { + for (; e; ) { + if (t === e) return !0; + e = e.parentNode; + } + return !1; + }, + dumpRng: function(e) { + return ( + "startContainer: " + + e.startContainer.nodeName + + ", startOffset: " + + e.startOffset + + ", endContainer: " + + e.endContainer.nodeName + + ", endOffset: " + + e.endOffset + ); + }, + _findSib: function(e, t, n) { + var r = this, + o = t; + if (e) + for ( + "string" == typeof o && + (o = function(e) { + return r.is(e, t); + }), + e = e[n]; + e; + e = e[n] + ) + if (o(e)) return e; + return null; + } + }), + (Xo.DOM = new Xo(document)), + (Xo.nodeIndex = Ko); + var Yo = Xo.DOM, + Go = Ot.each, + Jo = Ot.grep, + Qo = function(e) { + return "function" == typeof e; + }, + Zo = function() { + var e = {}, + t = [], + n = {}, + r = [], + o = 0; + (this.isDone = function(t) { + return 2 === e[t]; + }), + (this.markDone = function(t) { + e[t] = 2; + }), + (this.add = this.load = function(r, o, i, a) { + e[r] === undefined && (t.push(r), (e[r] = 0)), + o && + (n[r] || (n[r] = []), + n[r].push({ success: o, failure: a, scope: i || this })); + }), + (this.remove = function(t) { + delete e[t], delete n[t]; + }), + (this.loadQueue = function(e, n, r) { + this.loadScripts(t, e, n, r); + }), + (this.loadScripts = function(t, i, a, s) { + var u, + c = [], + l = function(e, t) { + Go(n[t], function(t) { + Qo(t[e]) && t[e].call(t.scope); + }), + (n[t] = undefined); + }; + r.push({ success: i, failure: s, scope: a || this }), + (u = function() { + var n = Jo(t); + if ( + ((t.length = 0), + Go(n, function(t) { + var n, r, i, a, s, f, d; + 2 !== e[t] + ? 3 !== e[t] + ? 1 !== e[t] && + ((e[t] = 1), + o++, + (n = t), + (r = function() { + (e[t] = 2), o--, l("success", t), u(); + }), + (i = function() { + (e[t] = 3), o--, c.push(t), l("failure", t), u(); + }), + (d = function() { + f.remove(s), + a && (a.onreadystatechange = a.onload = a = null), + r(); + }), + (s = (f = Yo).uniqueId()), + ((a = document.createElement("script")).id = s), + (a.type = "text/javascript"), + (a.src = Ot._addCacheSuffix(n)), + "onreadystatechange" in a + ? (a.onreadystatechange = function() { + /loaded|complete/.test(a.readyState) && d(); + }) + : (a.onload = d), + (a.onerror = function() { + Qo(i) + ? i() + : "undefined" != typeof console && + console.log && + console.log("Failed to load script: " + n); + }), + ( + document.getElementsByTagName("head")[0] || + document.body + ).appendChild(a)) + : l("failure", t) + : l("success", t); + }), + !o) + ) { + var i = r.slice(0); + (r.length = 0), + Go(i, function(e) { + 0 === c.length + ? Qo(e.success) && e.success.call(e.scope) + : Qo(e.failure) && e.failure.call(e.scope, c); + }); + } + })(); + }); + }; + Zo.ScriptLoader = new Zo(); + var ei = Ot.each, + ti = function() { + (this.items = []), + (this.urls = {}), + (this.lookup = {}), + (this._listeners = []); + }; + (ti.prototype = { + get: function(e) { + return this.lookup[e] ? this.lookup[e].instance : undefined; + }, + dependencies: function(e) { + var t; + return this.lookup[e] && (t = this.lookup[e].dependencies), t || []; + }, + requireLangPack: function(e, t) { + var n = ti.language; + if (n && !1 !== ti.languageLoad) { + if (t) + if (-1 !== (t = "," + t + ",").indexOf("," + n.substr(0, 2) + ",")) + n = n.substr(0, 2); + else if (-1 === t.indexOf("," + n + ",")) return; + Zo.ScriptLoader.add(this.urls[e] + "/langs/" + n + ".js"); + } + }, + add: function(e, t, n) { + this.items.push(t), (this.lookup[e] = { instance: t, dependencies: n }); + var r = M.partition(this._listeners, function(t) { + return t.name === e; + }); + return ( + (this._listeners = r.fail), + ei(r.pass, function(e) { + e.callback(); + }), + t + ); + }, + remove: function(e) { + delete this.urls[e], delete this.lookup[e]; + }, + createUrl: function(e, t) { + return "object" == typeof t + ? t + : { prefix: e.prefix, resource: t, suffix: e.suffix }; + }, + addComponents: function(e, t) { + var n = this.urls[e]; + ei(t, function(e) { + Zo.ScriptLoader.add(n + "/" + e); + }); + }, + load: function(e, t, n, r, o) { + var i = this, + a = t, + s = function() { + var o = i.dependencies(e); + ei(o, function(e) { + var n = i.createUrl(t, e); + i.load(n.resource, n, undefined, undefined); + }), + n && (r ? n.call(r) : n.call(Zo)); + }; + i.urls[e] || + ("object" == typeof t && (a = t.prefix + t.resource + t.suffix), + 0 !== a.indexOf("/") && + -1 === a.indexOf("://") && + (a = ti.baseURL + "/" + a), + (i.urls[e] = a.substring(0, a.lastIndexOf("/"))), + i.lookup[e] ? s() : Zo.ScriptLoader.add(a, s, r, o)); + }, + waitFor: function(e, t) { + this.lookup.hasOwnProperty(e) + ? t() + : this._listeners.push({ name: e, callback: t }); + } + }), + (ti.PluginManager = new ti()), + (ti.ThemeManager = new ti()); + var ni = "\ufeff", + ri = function(e) { + return e === ni; + }, + oi = ni, + ii = function(e) { + return e.replace(new RegExp(ni, "g"), ""); + }, + ai = vo.isElement, + si = vo.isText, + ui = function(e) { + return ( + si(e) && (e = e.parentNode), ai(e) && e.hasAttribute("data-mce-caret") + ); + }, + ci = function(e) { + return si(e) && ri(e.data); + }, + li = function(e) { + return ui(e) || ci(e); + }, + fi = function(e) { + return si(e) && e.data[0] === oi; + }, + di = function(e) { + return si(e) && e.data[e.data.length - 1] === oi; + }, + mi = { + isCaretContainer: li, + isCaretContainerBlock: ui, + isCaretContainerInline: ci, + showCaretContainerBlock: function(e) { + return e && e.hasAttribute("data-mce-caret") + ? ((t = e.getElementsByTagName("br")), + (n = t[t.length - 1]), + vo.isBogus(n) && n.parentNode.removeChild(n), + e.removeAttribute("data-mce-caret"), + e.removeAttribute("data-mce-bogus"), + e.removeAttribute("style"), + e.removeAttribute("_moz_abspos"), + e) + : null; + var t, n; + }, + insertInline: function(e, t) { + var n, r, o; + if (((r = e.ownerDocument.createTextNode(oi)), (o = e.parentNode), t)) { + if (((n = e.previousSibling), si(n))) { + if (li(n)) return n; + if (di(n)) return n.splitText(n.data.length - 1); + } + o.insertBefore(r, e); + } else { + if (((n = e.nextSibling), si(n))) { + if (li(n)) return n; + if (fi(n)) return n.splitText(1), n; + } + e.nextSibling ? o.insertBefore(r, e.nextSibling) : o.appendChild(r); + } + return r; + }, + prependInline: function(e) { + if (vo.isText(e)) { + var t = e.data; + return t.length > 0 && t.charAt(0) !== oi && e.insertData(0, oi), e; + } + return null; + }, + appendInline: function(e) { + if (vo.isText(e)) { + var t = e.data; + return ( + t.length > 0 && + t.charAt(t.length - 1) !== oi && + e.insertData(t.length, oi), + e + ); + } + return null; + }, + isBeforeInline: function(e) { + return ( + e && + vo.isText(e.container()) && + e.container().data.charAt(e.offset()) === oi + ); + }, + isAfterInline: function(e) { + return ( + e && + vo.isText(e.container()) && + e.container().data.charAt(e.offset() - 1) === oi + ); + }, + insertBlock: function(e, t, n) { + var r, o, i; + return ( + (r = t.ownerDocument.createElement(e)).setAttribute( + "data-mce-caret", + n ? "before" : "after" + ), + r.setAttribute("data-mce-bogus", "all"), + r.appendChild( + ((i = document.createElement("br")).setAttribute( + "data-mce-bogus", + "1" + ), + i) + ), + (o = t.parentNode), + n + ? o.insertBefore(r, t) + : t.nextSibling + ? o.insertBefore(r, t.nextSibling) + : o.appendChild(r), + r + ); + }, + hasContent: function(e) { + return e.firstChild !== e.lastChild || !vo.isBr(e.firstChild); + }, + startsWithCaretContainer: fi, + endsWithCaretContainer: di + }, + pi = vo.isContentEditableTrue, + gi = vo.isContentEditableFalse, + hi = vo.isBr, + vi = vo.isText, + yi = vo.matchNodeNames("script style textarea"), + bi = vo.matchNodeNames("img input textarea hr iframe video audio object"), + Ci = vo.matchNodeNames("table"), + xi = mi.isCaretContainer, + wi = function(e) { + return ( + !xi(e) && (vi(e) ? !yi(e.parentNode) : bi(e) || hi(e) || Ci(e) || gi(e)) + ); + }, + Ni = function(e, t) { + for (e = e.parentNode; e && e !== t; e = e.parentNode) { + if (gi(e)) return !1; + if (pi(e)) return !0; + } + return !0; + }, + Ei = wi, + Si = function(e) { + return ( + bi(e) || + (!!gi((t = e)) && + !0 !== + At.reduce( + t.getElementsByTagName("*"), + function(e, t) { + return e || pi(t); + }, + !1 + )) + ); + var t; + }, + ki = function(e, t) { + return wi(e) && Ni(e, t); + }, + Ti = Math.round, + Ai = function(e) { + return e + ? { + left: Ti(e.left), + top: Ti(e.top), + bottom: Ti(e.bottom), + right: Ti(e.right), + width: Ti(e.width), + height: Ti(e.height) + } + : { left: 0, top: 0, bottom: 0, right: 0, width: 0, height: 0 }; + }, + _i = function(e, t, n) { + return e >= 0 && e <= Math.min(t.height, n.height) / 2; + }, + Bi = function(e, t) { + return ( + e.bottom - e.height / 2 < t.top || + (!(e.top > t.bottom) && _i(t.top - e.bottom, e, t)) + ); + }, + Ri = function(e, t) { + return ( + e.top > t.bottom || (!(e.bottom < t.top) && _i(t.bottom - e.top, e, t)) + ); + }, + Di = Ai, + Oi = function(e, t) { + return ( + (e = Ai(e)), + t + ? (e.right = e.left) + : ((e.left = e.left + e.width), (e.right = e.left)), + (e.width = 0), + e + ); + }, + Pi = function(e, t) { + return ( + e.left === t.left && + e.top === t.top && + e.bottom === t.bottom && + e.right === t.right + ); + }, + Ii = Bi, + Li = Ri, + Mi = function(e, t, n) { + return t >= e.left && t <= e.right && n >= e.top && n <= e.bottom; + }, + Fi = function(e) { + var t = e.startContainer, + n = e.startOffset; + return t.hasChildNodes() && e.endOffset === n + 1 + ? t.childNodes[n] + : null; + }, + zi = function(e, t) { + return ( + 1 === e.nodeType && + e.hasChildNodes() && + (t >= e.childNodes.length && (t = e.childNodes.length - 1), + (e = e.childNodes[t])), + e + ); + }, + Ui = new RegExp( + "[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]" + ), + Vi = function(e) { + return "string" == typeof e && e.charCodeAt(0) >= 768 && Ui.test(e); + }, + Hi = [].slice, + qi = function(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + var r = Hi.call(arguments); + return r.length - 1 >= e.length + ? e.apply(this, r.slice(1)) + : function() { + var e = r.concat([].slice.call(arguments)); + return qi.apply(this, e); + }; + }, + ji = { + constant: function(e) { + return function() { + return e; + }; + }, + negate: function(e) { + return function(t) { + return !e(t); + }; + }, + and: function() { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + var n = Hi.call(arguments); + return function(e) { + for (var t = 0; t < n.length; t++) if (!n[t](e)) return !1; + return !0; + }; + }, + or: function() { + for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; + var n = Hi.call(arguments); + return function(e) { + for (var t = 0; t < n.length; t++) if (n[t](e)) return !0; + return !1; + }; + }, + curry: qi, + compose: function(e, t) { + return function(n) { + return e(t(n)); + }; + }, + noop: function() {} + }, + $i = vo.isElement, + Wi = Ei, + Ki = vo.matchStyleValues("display", "block table"), + Xi = vo.matchStyleValues("float", "left right"), + Yi = ji.and($i, Wi, ji.negate(Xi)), + Gi = ji.negate(vo.matchStyleValues("white-space", "pre pre-line pre-wrap")), + Ji = vo.isText, + Qi = vo.isBr, + Zi = Xo.nodeIndex, + ea = zi, + ta = function(e) { + return "createRange" in e ? e.createRange() : Xo.DOM.createRng(); + }, + na = function(e) { + return e && /[\r\n\t ]/.test(e); + }, + ra = function(e) { + var t, + n = e.startContainer, + r = e.startOffset; + return !!( + na(e.toString()) && + Gi(n.parentNode) && + ((t = n.data), na(t[r - 1]) || na(t[r + 1])) + ); + }, + oa = function(e) { + var t, + n, + r = [], + o = function(e) { + var t, n, r, o, i, a, s, u; + return ( + (t = + (n = e.getClientRects()).length > 0 + ? Di(n[0]) + : Di(e.getBoundingClientRect())), + Qi(e) && 0 === t.left + ? ((i = (r = e).ownerDocument), + (a = ta(i)), + (s = i.createTextNode("\xa0")), + (u = r.parentNode).insertBefore(s, r), + a.setStart(s, 0), + a.setEnd(s, 1), + (o = Di(a.getBoundingClientRect())), + u.removeChild(s), + o) + : t + ); + }, + i = function(e, t) { + return ((e = Oi(e, t)).width = 1), (e.right = e.left + 1), e; + }, + a = function(e) { + 0 !== e.height && + ((r.length > 0 && Pi(e, r[r.length - 1])) || r.push(e)); + }, + s = function(e, t) { + var n = ta(e.ownerDocument); + if (t < e.data.length) { + if (Vi(e.data[t])) return r; + if ( + Vi(e.data[t - 1]) && + (n.setStart(e, t), n.setEnd(e, t + 1), !ra(n)) + ) + return a(i(o(n), !1)), r; + } + t > 0 && + (n.setStart(e, t - 1), n.setEnd(e, t), ra(n) || a(i(o(n), !1))), + t < e.data.length && + (n.setStart(e, t), n.setEnd(e, t + 1), ra(n) || a(i(o(n), !0))); + }; + if (Ji(e.container())) return s(e.container(), e.offset()), r; + if ($i(e.container())) + if (e.isAtEnd()) + (n = ea(e.container(), e.offset())), + Ji(n) && s(n, n.data.length), + Yi(n) && !Qi(n) && a(i(o(n), !1)); + else { + if ( + ((n = ea(e.container(), e.offset())), + Ji(n) && s(n, 0), + Yi(n) && e.isAtEnd()) + ) + return a(i(o(n), !1)), r; + (t = ea(e.container(), e.offset() - 1)), + Yi(t) && !Qi(t) && (Ki(t) || Ki(n) || !Yi(n)) && a(i(o(t), !1)), + Yi(n) && a(i(o(n), !0)); + } + return r; + }, + ia = function(e, t, n) { + var r = function() { + return n || (n = oa(new ia(e, t))), n; + }; + return { + container: ji.constant(e), + offset: ji.constant(t), + toRange: function() { + var n; + return (n = ta(e.ownerDocument)).setStart(e, t), n.setEnd(e, t), n; + }, + getClientRects: r, + isVisible: function() { + return r().length > 0; + }, + isAtStart: function() { + return Ji(e), 0 === t; + }, + isAtEnd: function() { + return Ji(e) ? t >= e.data.length : t >= e.childNodes.length; + }, + isEqual: function(n) { + return n && e === n.container() && t === n.offset(); + }, + getNode: function(n) { + return ea(e, n ? t - 1 : t); + } + }; + }; + (ia.fromRangeStart = function(e) { + return new ia(e.startContainer, e.startOffset); + }), + (ia.fromRangeEnd = function(e) { + return new ia(e.endContainer, e.endOffset); + }), + (ia.after = function(e) { + return new ia(e.parentNode, Zi(e) + 1); + }), + (ia.before = function(e) { + return new ia(e.parentNode, Zi(e)); + }), + (ia.isAtStart = function(e) { + return !!e && e.isAtStart(); + }), + (ia.isAtEnd = function(e) { + return !!e && e.isAtEnd(); + }), + (ia.isTextPosition = function(e) { + return !!e && vo.isText(e.container()); + }); + var aa, + sa, + ua, + ca, + la, + fa = vo.isContentEditableTrue, + da = vo.isContentEditableFalse, + ma = vo.matchStyleValues( + "display", + "block table table-cell table-caption list-item" + ), + pa = mi.isCaretContainer, + ga = mi.isCaretContainerBlock, + ha = ji.curry, + va = vo.isElement, + ya = Ei, + ba = function(e) { + return e > 0; + }, + Ca = function(e) { + return e < 0; + }, + xa = function(e, t) { + for (var n; (n = e(t)); ) if (!ga(n)) return n; + return null; + }, + wa = function(e, t) { + for (e = e.parentNode; e && e !== t; e = e.parentNode) + if (fa(e)) return e; + return t; + }, + Na = function(e, t) { + for (; e && e !== t; ) { + if (ma(e)) return e; + e = e.parentNode; + } + return null; + }, + Ea = function(e, t) { + var n = t.ownerDocument.createRange(); + return ( + e + ? (n.setStartBefore(t), n.setEndBefore(t)) + : (n.setStartAfter(t), n.setEndAfter(t)), + n + ); + }, + Sa = function(e, t, n) { + var r, o, i, a; + for (o = e ? "previousSibling" : "nextSibling"; n && n !== t; ) { + if (((r = n[o]), pa(r) && (r = r[o]), da(r))) { + if (((a = n), Na(r, (i = t)) === Na(a, i))) return r; + break; + } + if (ya(r)) break; + n = n.parentNode; + } + return null; + }, + ka = ha(Ea, !0), + Ta = ha(Ea, !1), + Aa = function(e, t) { + return da( + ((n = e), + (r = t) + ? ((o = r.container()), + (i = r.offset()), + va(o) ? o.childNodes[i + n] : null) + : null) + ); + var n, r, o, i; + }, + _a = { + isForwards: ba, + isBackwards: Ca, + findNode: function(e, t, n, r, o) { + var i = new to(e, r); + if (Ca(t)) { + if ((da(e) || ga(e)) && n((e = xa(i.prev, !0)))) return e; + for (; (e = xa(i.prev, o)); ) if (n(e)) return e; + } + if (ba(t)) { + if ((da(e) || ga(e)) && n((e = xa(i.next, !0)))) return e; + for (; (e = xa(i.next, o)); ) if (n(e)) return e; + } + return null; + }, + getEditingHost: wa, + getParentBlock: Na, + isInSameBlock: function(e, t, n) { + return Na(e.container(), n) === Na(t.container(), n); + }, + isInSameEditingHost: function(e, t, n) { + return wa(e.container(), n) === wa(t.container(), n); + }, + isBeforeContentEditableFalse: ha(Aa, 0), + isAfterContentEditableFalse: ha(Aa, -1), + normalizeRange: function(e, t, n) { + var r, + o, + i, + a, + s = ha(Sa, !0, t), + u = ha(Sa, !1, t); + if ( + ((o = n.startContainer), + (i = n.startOffset), + mi.isCaretContainerBlock(o)) + ) { + if ( + (va(o) || (o = o.parentNode), + "before" === (a = o.getAttribute("data-mce-caret")) && + ((r = o.nextSibling), da(r))) + ) + return ka(r); + if ("after" === a && ((r = o.previousSibling), da(r))) return Ta(r); + } + if (!n.collapsed) return n; + if (vo.isText(o)) { + if (pa(o)) { + if (1 === e) { + if ((r = u(o))) return ka(r); + if ((r = s(o))) return Ta(r); + } + if (-1 === e) { + if ((r = s(o))) return Ta(r); + if ((r = u(o))) return ka(r); + } + return n; + } + if (mi.endsWithCaretContainer(o) && i >= o.data.length - 1) + return 1 === e && (r = u(o)) ? ka(r) : n; + if (mi.startsWithCaretContainer(o) && i <= 1) + return -1 === e && (r = s(o)) ? Ta(r) : n; + if (i === o.data.length) return (r = u(o)) ? ka(r) : n; + if (0 === i) return (r = s(o)) ? Ta(r) : n; + } + return n; + } + }, + Ba = vo.isContentEditableFalse, + Ra = vo.isText, + Da = vo.isElement, + Oa = vo.isBr, + Pa = _a.isForwards, + Ia = _a.isBackwards, + La = Ei, + Ma = Si, + Fa = ki, + za = function(e, t) { + return e.hasChildNodes() && t < e.childNodes.length + ? e.childNodes[t] + : null; + }, + Ua = function(e, t) { + if (Pa(e)) { + if (La(t.previousSibling) && !Ra(t.previousSibling)) + return ia.before(t); + if (Ra(t)) return ia(t, 0); + } + if (Ia(e)) { + if (La(t.nextSibling) && !Ra(t.nextSibling)) return ia.after(t); + if (Ra(t)) return ia(t, t.data.length); + } + return Ia(e) ? (Oa(t) ? ia.before(t) : ia.after(t)) : ia.before(t); + }, + Va = function(e, t, n) { + var r, o, i, a, s, u, c, l, f, d; + if (!Da(n) || !t) return null; + if (t.isEqual(ia.after(n)) && n.lastChild) { + if ( + ((c = ia.after(n.lastChild)), + Ia(e) && La(n.lastChild) && Da(n.lastChild)) + ) + return Oa(n.lastChild) ? ia.before(n.lastChild) : c; + } else c = t; + if (((r = c.container()), (o = c.offset()), Ra(r))) { + if (Ia(e) && o > 0) return ia(r, --o); + if (Pa(e) && o < r.length) return ia(r, ++o); + i = r; + } else { + if (Ia(e) && o > 0 && ((a = za(r, o - 1)), La(a))) + return !Ma(a) && (s = _a.findNode(a, e, Fa, a)) + ? Ra(s) + ? ia(s, s.data.length) + : ia.after(s) + : Ra(a) + ? ia(a, a.data.length) + : ia.before(a); + if (Pa(e) && o < r.childNodes.length && ((a = za(r, o)), La(a))) + return ( + (l = a), + (f = n), + vo.isBr(l) && + (d = Va(1, ia.after(l), f)) && + !_a.isInSameBlock(ia.before(l), ia.before(d), f) + ? Va(e, ia.after(a), n) + : !Ma(a) && (s = _a.findNode(a, e, Fa, a)) + ? Ra(s) + ? ia(s, 0) + : ia.before(s) + : Ra(a) + ? ia(a, 0) + : ia.after(a) + ); + i = c.getNode(); + } + return ((Pa(e) && c.isAtEnd()) || (Ia(e) && c.isAtStart())) && + ((i = _a.findNode(i, e, ji.constant(!0), n, !0)), Fa(i, n)) + ? Ua(e, i) + : ((a = _a.findNode(i, e, Fa, n)), + !(u = At.last( + At.filter( + (function(e, t) { + for (var n = []; e && e !== t; ) n.push(e), (e = e.parentNode); + return n; + })(r, n), + Ba + ) + )) || + (a && u.contains(a)) + ? a + ? Ua(e, a) + : null + : (c = Pa(e) ? ia.after(u) : ia.before(u))); + }, + Ha = function(e) { + return { + next: function(t) { + return Va(1, t, e); + }, + prev: function(t) { + return Va(-1, t, e); + } + }; + }, + qa = function(e) { + return Ot.grep(e.childNodes, function(e) { + return "LI" === e.nodeName; + }); + }, + ja = function(e) { + return ( + e && + e.firstChild && + e.firstChild === e.lastChild && + ("\xa0" === (t = e.firstChild).data || vo.isBr(t)) + ); + var t; + }, + $a = function(e) { + return e.length > 0 && (!(t = e[e.length - 1]).firstChild || ja(t)) + ? e.slice(0, -1) + : e; + var t; + }, + Wa = function(e, t) { + var n = e.getParent(t, e.isBlock); + return n && "LI" === n.nodeName ? n : null; + }, + Ka = function(e, t) { + var n = ia.after(e), + r = Ha(t).prev(n); + return r ? r.toRange() : null; + }, + Xa = function(e, t, n) { + var r, + o, + i, + a, + s = e.parentNode; + return ( + Ot.each(t, function(t) { + s.insertBefore(t, e); + }), + (r = e), + (o = n), + (i = ia.before(r)), + (a = Ha(o).next(i)) ? a.toRange() : null + ); + }, + Ya = function(e, t) { + var n, + r, + o, + i, + a, + s, + u = t.firstChild, + c = t.lastChild; + return ( + u && "meta" === u.name && (u = u.next), + c && "mce_marker" === c.attr("id") && (c = c.prev), + (r = c), + (s = (n = e).getNonEmptyElements()), + r && + (r.isEmpty(s) || + ((o = r), + n.getBlockElements()[o.name] && + (a = o).firstChild && + a.firstChild === a.lastChild && + ("br" === (i = o.firstChild).name || "\xa0" === i.value))) && + (c = c.prev), + !(!u || u !== c || ("ul" !== u.name && "ol" !== u.name)) + ); + }, + Ga = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C, + x, + w, + N = ((o = t), + (i = r), + (c = e.serialize(i)), + (l = o.createFragment(c)), + (s = (a = l).firstChild), + (u = a.lastChild), + s && "META" === s.nodeName && s.parentNode.removeChild(s), + u && "mce_marker" === u.id && u.parentNode.removeChild(u), + a), + E = Wa(t, n.startContainer), + S = $a(qa(N.firstChild)), + k = t.getRoot(), + T = function(e) { + var r = ia.fromRangeStart(n), + o = Ha(t.getRoot()), + i = 1 === e ? o.prev(r) : o.next(r); + return !i || Wa(t, i.getNode()) !== E; + }; + return T(1) + ? Xa(E, S, k) + : T(2) + ? ((f = E), + (d = S), + (m = k), + t.insertAfter(d.reverse(), f), + Ka(d[0], m)) + : ((g = S), + (h = k), + (v = p = E), + (b = (y = n).cloneRange()), + (C = y.cloneRange()), + b.setStartBefore(v), + C.setEndAfter(v), + (x = [b.cloneContents(), C.cloneContents()]), + (w = p.parentNode).insertBefore(x[0], p), + Ot.each(g, function(e) { + w.insertBefore(e, p); + }), + w.insertBefore(x[1], p), + w.removeChild(p), + Ka(g[g.length - 1], h)); + }, + Ja = function(e, t) { + return !!Wa(e, t); + }, + Qa = vo.isText, + Za = vo.isBogus, + es = Xo.nodeIndex, + ts = function(e) { + var t = e.parentNode; + return Za(t) ? ts(t) : t; + }, + ns = function(e) { + return e + ? At.reduce( + e.childNodes, + function(e, t) { + return ( + Za(t) && "BR" !== t.nodeName + ? (e = e.concat(ns(t))) + : e.push(t), + e + ); + }, + [] + ) + : []; + }, + rs = function(e) { + return function(t) { + return e === t; + }; + }, + os = function(e) { + var t, n, r, o; + return ( + (Qa(e) ? "text()" : e.nodeName.toLowerCase()) + + "[" + + ((n = ns(ts((t = e)))), + (r = At.findIndex(n, rs(t), t)), + (n = n.slice(0, r + 1)), + (o = At.reduce( + n, + function(e, t, r) { + return Qa(t) && Qa(n[r - 1]) && e++, e; + }, + 0 + )), + (n = At.filter(n, vo.matchNodeNames(t.nodeName))), + (r = At.findIndex(n, rs(t), t)) - o) + + "]" + ); + }, + is = function(e, t) { + var n, + r, + o, + i, + a, + s = []; + return ( + (n = t.container()), + (r = t.offset()), + Qa(n) + ? (o = (function(e, t) { + for (; (e = e.previousSibling) && Qa(e); ) t += e.data.length; + return t; + })(n, r)) + : (r >= (i = n.childNodes).length + ? ((o = "after"), (r = i.length - 1)) + : (o = "before"), + (n = i[r])), + s.push(os(n)), + (a = (function(e, t, n) { + var r = []; + for (t = t.parentNode; !(t === e || (n && n(t))); t = t.parentNode) + r.push(t); + return r; + })(e, n)), + (a = At.filter(a, ji.negate(vo.isBogus))), + (s = s.concat( + At.map(a, function(e) { + return os(e); + }) + )) + .reverse() + .join("/") + + "," + + o + ); + }, + as = function(e, t) { + var n, r, o; + return t + ? ((t = (n = t.split(","))[0].split("/")), + (o = n.length > 1 ? n[1] : "before"), + (r = At.reduce( + t, + function(e, t) { + return (t = /([\w\-\(\)]+)\[([0-9]+)\]/.exec(t)) + ? ("text()" === t[1] && (t[1] = "#text"), + (n = e), + (r = t[1]), + (o = parseInt(t[2], 10)), + (i = ns(n)), + (i = At.filter(i, function(e, t) { + return !Qa(e) || !Qa(i[t - 1]); + })), + (i = At.filter(i, vo.matchNodeNames(r)))[o]) + : null; + var n, r, o, i; + }, + e + )) + ? Qa(r) + ? (function(e, t) { + for (var n, r = e, o = 0; Qa(r); ) { + if (((n = r.data.length), t >= o && t <= o + n)) { + (e = r), (t -= o); + break; + } + if (!Qa(r.nextSibling)) { + (e = r), (t = n); + break; + } + (o += n), (r = r.nextSibling); + } + return t > e.data.length && (t = e.data.length), new ia(e, t); + })(r, parseInt(o, 10)) + : ((o = "after" === o ? es(r) + 1 : es(r)), + new ia(r.parentNode, o)) + : null) + : null; + }, + ss = vo.isContentEditableFalse, + us = function(e, t, n, r, o) { + var i, + a = r[o ? "startContainer" : "endContainer"], + s = r[o ? "startOffset" : "endOffset"], + u = [], + c = 0, + l = e.getRoot(); + for ( + vo.isText(a) + ? u.push( + n + ? (function(e, t, n) { + var r, o; + for ( + o = e(t.data.slice(0, n)).length, r = t.previousSibling; + r && vo.isText(r); + r = r.previousSibling + ) + o += e(r.data).length; + return o; + })(t, a, s) + : s + ) + : (s >= (i = a.childNodes).length && + i.length && + ((c = 1), (s = Math.max(0, i.length - 1))), + u.push(e.nodeIndex(i[s], n) + c)); + a && a !== l; + a = a.parentNode + ) + u.push(e.nodeIndex(a, n)); + return u; + }, + cs = function(e) { + vo.isText(e) && 0 === e.data.length && e.parentNode.removeChild(e); + }, + ls = function(e, t, n) { + var r = 0; + return ( + Ot.each(e.select(t), function(e) { + if ("all" !== e.getAttribute("data-mce-bogus")) + return e !== n && void r++; + }), + r + ); + }, + fs = function(e, t) { + var n, + r, + o, + i = t ? "start" : "end"; + (n = e[i + "Container"]), + (r = e[i + "Offset"]), + vo.isElement(n) && + "TR" === n.nodeName && + (n = (o = n.childNodes)[Math.min(t ? r : r - 1, o.length - 1)]) && + ((r = t ? 0 : n.childNodes.length), + e["set" + (t ? "Start" : "End")](n, r)); + }, + ds = function(e) { + return fs(e, !0), fs(e, !1), e; + }, + ms = function(e, t) { + var n; + if (vo.isElement(e) && ((e = zi(e, t)), ss(e))) return e; + if (mi.isCaretContainer(e)) { + if ( + (vo.isText(e) && mi.isCaretContainerBlock(e) && (e = e.parentNode), + (n = e.previousSibling), + ss(n)) + ) + return n; + if (((n = e.nextSibling), ss(n))) return n; + } + }, + ps = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c, + l = n.getNode(), + f = l ? l.nodeName : null, + d = n.getRng(); + return ss(l) || "IMG" === f + ? { name: f, index: ls(n.dom, f, l) } + : (l = + ms((r = d).startContainer, r.startOffset) || + ms(r.endContainer, r.endOffset)) + ? { name: (f = l.tagName), index: ls(n.dom, f, l) } + : ((o = e), + (a = t), + (s = d), + (u = (i = n).dom), + ((c = {}).start = us(u, o, a, s, !0)), + i.isCollapsed() || (c.end = us(u, o, a, s, !1)), + c); + }, + gs = { + getBookmark: function(e, t, n) { + return 2 === t + ? ps(ii, n, e) + : 3 === t + ? ((o = (r = e).getRng()), + { + start: is(r.dom.getRoot(), ia.fromRangeStart(o)), + end: is(r.dom.getRoot(), ia.fromRangeEnd(o)) + }) + : t + ? { rng: e.getRng() } + : (function(e) { + var t = e.dom, + n = e.getRng(), + r = t.uniqueId(), + o = e.isCollapsed(), + i = "overflow:hidden;line-height:0px", + a = e.getNode(), + s = a.nodeName; + if ("IMG" === s) return { name: s, index: ls(t, s, a) }; + var u = ds(n.cloneRange()); + if (!o) { + u.collapse(!1); + var c = t.create( + "span", + { "data-mce-type": "bookmark", id: r + "_end", style: i }, + "" + ); + u.insertNode(c), cs(c.nextSibling); + } + (n = ds(n)).collapse(!0); + var l = t.create( + "span", + { "data-mce-type": "bookmark", id: r + "_start", style: i }, + "" + ); + return ( + n.insertNode(l), + cs(l.previousSibling), + e.moveToBookmark({ id: r, keep: 1 }), + { id: r } + ); + })(e); + var r, o; + }, + getUndoBookmark: y.curry(ps, y.identity, !0) + }, + hs = function(e, t) { + for (var n = [], r = 0; r < e.length; r++) { + var o = e[r]; + if (!o.isSome()) return E.none(); + n.push(o.getOrDie()); + } + return E.some(t.apply(null, n)); + }, + vs = function(e, t) { + return ( + !e.isBlock(t) || + t.innerHTML || + me.ie || + (t.innerHTML = '
'), + t + ); + }, + ys = function(e, t, n, r) { + var o, + i, + a, + s, + u = n[t ? "start" : "end"], + c = e.getRoot(); + if (u) { + for (a = u[0], i = c, o = u.length - 1; o >= 1; o--) { + if (((s = i.childNodes), u[o] > s.length - 1)) return; + i = s[u[o]]; + } + 3 === i.nodeType && (a = Math.min(u[0], i.nodeValue.length)), + 1 === i.nodeType && (a = Math.min(u[0], i.childNodes.length)), + t ? r.setStart(i, a) : r.setEnd(i, a); + } + return !0; + }, + bs = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c = e.get(n.id + "_" + t), + l = n.keep; + if (c) { + if ( + ((r = c.parentNode), + l ? ((r = c.firstChild), (o = 1)) : (o = e.nodeIndex(c)), + (s = r), + (u = o), + !l) + ) { + for ( + a = c.previousSibling, + i = c.nextSibling, + Ot.each(Ot.grep(c.childNodes), function(e) { + vo.isText(e) && + (e.nodeValue = e.nodeValue.replace(/\uFEFF/g, "")); + }); + (c = e.get(n.id + "_" + t)); + + ) + e.remove(c, 1); + a && + i && + a.nodeType === i.nodeType && + vo.isText(a) && + !me.opera && + ((o = a.nodeValue.length), + a.appendData(i.nodeValue), + e.remove(i), + (s = a), + (u = o)); + } + return E.some(ia(s, u)); + } + return E.none(); + }, + Cs = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v = e.dom; + if (t) { + if (Ot.isArray(t.start)) + return ( + (g = t), + (h = (p = v).createRng()), + ys(p, !0, g, h) && ys(p, !1, g, h) ? E.some(h) : E.none() + ); + if ("string" == typeof t.start) + return E.some( + ((f = t), + (d = (l = v).createRng()), + (m = as(l.getRoot(), f.start)), + d.setStart(m.container(), m.offset()), + (m = as(l.getRoot(), f.end)), + d.setEnd(m.container(), m.offset()), + d) + ); + if (t.id) + return ( + (u = bs((o = v), "start", (i = t))), + (c = bs(o, "end", i)), + hs([u, ((a = c), (s = u), a.isSome() ? a : s)], function(e, t) { + var n = o.createRng(); + return ( + n.setStart(vs(o, e.container()), e.offset()), + n.setEnd(vs(o, t.container()), t.offset()), + n + ); + }) + ); + if (t.name) + return ( + (n = v), + (r = t), + E.from(n.select(r.name)[r.index]).map(function(e) { + var t = n.createRng(); + return t.selectNode(e), t; + }) + ); + if (t.rng) return E.some(t.rng); + } + return E.none(); + }, + xs = { + getBookmark: function(e, t, n) { + return gs.getBookmark(e, t, n); + }, + moveToBookmark: function(e, t) { + Cs(e, t).each(function(t) { + e.setRng(t); + }); + }, + isBookmarkNode: function(e) { + return ( + vo.isElement(e) && + "SPAN" === e.tagName && + "bookmark" === e.getAttribute("data-mce-type") + ); + } + }, + ws = Ot.each, + Ns = function(e) { + this.compare = function(t, n) { + if (t.nodeName !== n.nodeName) return !1; + var r = function(t) { + var n = {}; + return ( + ws(e.getAttribs(t), function(r) { + var o = r.nodeName.toLowerCase(); + 0 !== o.indexOf("_") && + "style" !== o && + 0 !== o.indexOf("data-") && + (n[o] = e.getAttrib(t, o)); + }), + n + ); + }, + o = function(e, t) { + var n, r; + for (r in e) + if (e.hasOwnProperty(r)) { + if (void 0 === (n = t[r])) return !1; + if (e[r] !== n) return !1; + delete t[r]; + } + for (r in t) if (t.hasOwnProperty(r)) return !1; + return !0; + }; + return !( + !o(r(t), r(n)) || + !o( + e.parseStyle(e.getAttrib(t, "style")), + e.parseStyle(e.getAttrib(n, "style")) + ) || + xs.isBookmarkNode(t) || + xs.isBookmarkNode(n) + ); + }; + }, + Es = function(e, t) { + Ur.parent(e).each(function(n) { + n.dom().insertBefore(t.dom(), e.dom()); + }); + }, + Ss = function(e, t) { + e.dom().appendChild(t.dom()); + }, + ks = { + before: Es, + after: function(e, t) { + Ur.nextSibling(e).fold( + function() { + Ur.parent(e).each(function(e) { + Ss(e, t); + }); + }, + function(e) { + Es(e, t); + } + ); + }, + prepend: function(e, t) { + Ur.firstChild(e).fold( + function() { + Ss(e, t); + }, + function(n) { + e.dom().insertBefore(t.dom(), n.dom()); + } + ); + }, + append: Ss, + appendAt: function(e, t, n) { + Ur.child(e, n).fold( + function() { + Ss(e, t); + }, + function(e) { + Es(e, t); + } + ); + }, + wrap: function(e, t) { + Es(e, t), Ss(t, e); + } + }, + Ts = function(e, t) { + M.each(t, function(t) { + ks.before(e, t); + }); + }, + As = function(e, t) { + M.each(t, function(t) { + ks.append(e, t); + }); + }, + _s = function(e) { + var t = e.dom(); + null !== t.parentNode && t.parentNode.removeChild(t); + }, + Bs = { + empty: function(e) { + (e.dom().textContent = ""), + M.each(Ur.children(e), function(e) { + _s(e); + }); + }, + remove: _s, + unwrap: function(e) { + var t = Ur.children(e); + t.length > 0 && Ts(e, t), _s(e); + } + }, + Rs = ((aa = Zn.isText), + (sa = "text"), + (ua = function(e) { + return aa(e) ? E.from(e.dom().nodeValue) : E.none(); + }), + (ca = Un.detect().browser), + { + get: function(e) { + if (!aa(e)) + throw new Error("Can only get " + sa + " value of a " + sa + " node"); + return la(e).getOr(""); + }, + getOption: (la = + ca.isIE() && 10 === ca.version.major + ? function(e) { + try { + return ua(e); + } catch (yC) { + return E.none(); + } + } + : ua), + set: function(e, t) { + if (!aa(e)) + throw new Error( + "Can only set raw " + sa + " value of a " + sa + " node" + ); + e.dom().nodeValue = t; + } + }), + Ds = function(e) { + return Rs.get(e); + }, + Os = function(e, t) { + return _r.all(t, e); + }, + Ps = function(e) { + var t = Os(e, "br"), + n = M.filter( + (function(e) { + for (var t = [], n = e.dom(); n; ) + t.push(Hn.fromDom(n)), (n = n.lastChild); + return t; + })(e).slice(-1), + io.isBr + ); + t.length === n.length && M.each(n, Bs.remove); + }, + Is = function(e) { + Bs.empty(e), ks.append(e, Hn.fromHtml('
')); + }, + Ls = function(e) { + Ur.lastChild(e).each(function(t) { + Ur.prevSibling(t).each(function(n) { + io.isBlock(e) && io.isBr(t) && io.isBlock(n) && Bs.remove(t); + }); + }); + }, + Ms = Ot.makeMap, + Fs = function(e) { + var t, + n, + r, + o, + i, + a = []; + return ( + (t = (e = e || {}).indent), + (n = Ms(e.indent_before || "")), + (r = Ms(e.indent_after || "")), + (o = Ao.getEncodeFunc(e.entity_encoding || "raw", e.entities)), + (i = "html" === e.element_format), + { + start: function(e, s, u) { + var c, l, f, d; + if ( + (t && + n[e] && + a.length > 0 && + (d = a[a.length - 1]).length > 0 && + "\n" !== d && + a.push("\n"), + a.push("<", e), + s) + ) + for (c = 0, l = s.length; c < l; c++) + (f = s[c]), a.push(" ", f.name, '="', o(f.value, !0), '"'); + (a[a.length] = !u || i ? ">" : " />"), + u && + t && + r[e] && + a.length > 0 && + (d = a[a.length - 1]).length > 0 && + "\n" !== d && + a.push("\n"); + }, + end: function(e) { + var n; + a.push(""), + t && + r[e] && + a.length > 0 && + (n = a[a.length - 1]).length > 0 && + "\n" !== n && + a.push("\n"); + }, + text: function(e, t) { + e.length > 0 && (a[a.length] = t ? e : o(e)); + }, + cdata: function(e) { + a.push(""); + }, + comment: function(e) { + a.push("\x3c!--", e, "--\x3e"); + }, + pi: function(e, n) { + n ? a.push("") : a.push(""), + t && a.push("\n"); + }, + doctype: function(e) { + a.push("", t ? "\n" : ""); + }, + reset: function() { + a.length = 0; + }, + getContent: function() { + return a.join("").replace(/\n$/, ""); + } + } + ); + }, + zs = function(e, t) { + var n = {}, + r = Fs(e); + return ( + ((e = e || {}).validate = !("validate" in e) || e.validate), + (n.schema = t = t || Fo()), + (n.writer = r), + (n.serialize = function(n) { + var o, i; + (i = e.validate), + (o = { + 3: function(e) { + r.text(e.value, e.raw); + }, + 8: function(e) { + r.comment(e.value); + }, + 7: function(e) { + r.pi(e.name, e.value); + }, + 10: function(e) { + r.doctype(e.value); + }, + 4: function(e) { + r.cdata(e.value); + }, + 11: function(e) { + if ((e = e.firstChild)) + do { + a(e); + } while ((e = e.next)); + } + }), + r.reset(); + var a = function(e) { + var n, + s, + u, + c, + l, + f, + d, + m, + p, + g = o[e.type]; + if (g) g(e); + else { + if ( + ((n = e.name), + (s = e.shortEnded), + (u = e.attributes), + i && + u && + u.length > 1 && + (((f = []).map = {}), (p = t.getElementRule(e.name)))) + ) { + for (d = 0, m = p.attributesOrder.length; d < m; d++) + (c = p.attributesOrder[d]) in u.map && + ((l = u.map[c]), + (f.map[c] = l), + f.push({ name: c, value: l })); + for (d = 0, m = u.length; d < m; d++) + (c = u[d].name) in f.map || + ((l = u.map[c]), + (f.map[c] = l), + f.push({ name: c, value: l })); + u = f; + } + if ((r.start(e.name, u, s), !s)) { + if ((e = e.firstChild)) + do { + a(e); + } while ((e = e.next)); + r.end(n); + } + } + }; + return 1 !== n.type || e.inner ? o[11](n) : a(n), r.getContent(); + }), + n + ); + }, + Us = function(e) { + return ia.isTextPosition(e) ? 0 === e.offset() : Ei(e.getNode()); + }, + Vs = function(e) { + return ia.isTextPosition(e) + ? e.offset() === e.container().data.length + : Ei(e.getNode(!0)); + }, + Hs = function(e, t) { + return ( + !ia.isTextPosition(e) && + !ia.isTextPosition(t) && + e.getNode() === t.getNode(!0) + ); + }, + qs = function(e, t, n) { + return e + ? !Hs(t, n) && + ((r = t), !(!ia.isTextPosition(r) && vo.isBr(r.getNode()))) && + Vs(t) && + Us(n) + : !Hs(n, t) && Us(t) && Vs(n); + var r; + }, + js = function(e, t, n) { + var r = Ha(t); + return E.from(e ? r.next(n) : r.prev(n)); + }, + $s = function(e, t) { + var n, + r, + o, + i, + a, + s = e ? t.firstChild : t.lastChild; + return vo.isText(s) + ? E.some(new ia(s, e ? 0 : s.data.length)) + : s + ? Ei(s) + ? E.some( + e + ? ia.before(s) + : ((a = s), vo.isBr(a) ? ia.before(a) : ia.after(a)) + ) + : ((r = t), + (o = s), + (i = (n = e) ? ia.before(o) : ia.after(o)), + js(n, r, i)) + : E.none(); + }, + Ws = { + fromPosition: js, + nextPosition: y.curry(js, !0), + prevPosition: y.curry(js, !1), + navigate: function(e, t, n) { + return js(e, t, n).bind(function(r) { + return _a.isInSameBlock(n, r, t) && qs(e, n, r) + ? js(e, t, r) + : E.some(r); + }); + }, + positionIn: $s, + firstPositionIn: y.curry($s, !0), + lastPositionIn: y.curry($s, !1) + }, + Ks = function(e) { + var t = ia.fromRangeStart(e), + n = ia.fromRangeEnd(e), + r = e.commonAncestorContainer; + return Ws.fromPosition(!1, r, n) + .map(function(o) { + return !_a.isInSameBlock(t, n, r) && _a.isInSameBlock(t, o, r) + ? ((i = t.container()), + (a = t.offset()), + (s = o.container()), + (u = o.offset()), + (c = document.createRange()).setStart(i, a), + c.setEnd(s, u), + c) + : e; + var i, a, s, u, c; + }) + .getOr(e); + }, + Xs = function(e) { + return (t = e).collapsed ? t : Ks(t); + var t; + }, + Ys = vo.matchNodeNames("td th"), + Gs = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g = e.schema.getTextInlineElements(), + h = e.selection, + v = e.dom; + if ( + (/^ | $/.test(t) && + (t = (function(e) { + var t, n, r; + (t = h.getRng()), (n = t.startContainer), (r = t.startOffset); + var o = function(e) { + return n[e] && 3 === n[e].nodeType; + }; + return ( + 3 === n.nodeType && + (r > 0 + ? (e = e.replace(/^ /, " ")) + : o("previousSibling") || (e = e.replace(/^ /, " ")), + r < n.length + ? (e = e.replace(/ (
|)$/, " ")) + : o("nextSibling") || + (e = e.replace(/( | )(
|)$/, " "))), + e + ); + })(t)), + (r = e.parser), + (p = n.merge), + (o = zs({ validate: e.settings.validate }, e.schema)), + (m = + '​'), + (u = { content: t, format: "html", selection: !0, paste: n.paste }), + (u = e.fire("BeforeSetContent", u)).isDefaultPrevented()) + ) + e.fire("SetContent", { + content: u.content, + format: "html", + selection: !0, + paste: n.paste + }); + else { + -1 === (t = u.content).indexOf("{$caret}") && (t += "{$caret}"), + (t = t.replace(/\{\$caret\}/, m)); + var y, + b, + C, + x, + w = + (l = h.getRng()).startContainer || + (l.parentElement ? l.parentElement() : null), + N = e.getBody(); + w === N && + h.isCollapsed() && + v.isBlock(N.firstChild) && + (y = N.firstChild) && + !e.schema.getShortEndedElements()[y.nodeName] && + v.isEmpty(N.firstChild) && + ((l = v.createRng()).setStart(N.firstChild, 0), + l.setEnd(N.firstChild, 0), + h.setRng(l)), + h.isCollapsed() || + (e.selection.setRng(Xs(e.selection.getRng())), + e.getDoc().execCommand("Delete", !1, null), + (C = (b = h.getRng()).startContainer), + (x = b.startOffset), + 3 === C.nodeType && + b.collapsed && + ("\xa0" === C.data[x] + ? (C.deleteData(x, 1), /[\u00a0| ]$/.test(t) || (t += " ")) + : "\xa0" === C.data[x - 1] && + (C.deleteData(x - 1, 1), + /[\u00a0| ]$/.test(t) || (t = " " + t)))); + var S, + k, + T, + A = { + context: (i = h.getNode()).nodeName.toLowerCase(), + data: n.data, + insert: !0 + }; + if ( + ((s = r.parse(t, A)), !0 === n.paste && Ya(e.schema, s) && Ja(v, i)) + ) + return ( + (l = Ga(o, v, e.selection.getRng(!0), s)), + e.selection.setRng(l), + void e.fire("SetContent", u) + ); + if ( + ((function(e) { + for (var t = e; (t = t.walk()); ) + 1 === t.type && t.attr("data-mce-fragment", "1"); + })(s), + "mce_marker" === (f = s.lastChild).attr("id")) + ) + for (c = f, f = f.prev; f; f = f.walk(!0)) + if (3 === f.type || !v.isBlock(f.name)) { + e.schema.isValidChild(f.parent.name, "span") && + f.parent.insert(c, f, "br" === f.name); + break; + } + if ((e._selectionOverrides.showBlockCaretContainer(i), A.invalid)) { + for ( + h.setContent(m), + i = h.getNode(), + a = e.getBody(), + 9 === i.nodeType ? (i = f = a) : (f = i); + f !== a; + + ) + (i = f), (f = f.parentNode); + (t = i === a ? a.innerHTML : v.getOuterHTML(i)), + (t = o.serialize( + r.parse( + t.replace( + //i, + function() { + return o.serialize(s); + } + ) + ) + )), + i === a ? v.setHTML(a, t) : v.setOuterHTML(i, t); + } else + (t = o.serialize(s)), + (function(e, t, n) { + if ("all" === n.getAttribute("data-mce-bogus")) + n.parentNode.insertBefore(e.dom.createFragment(t), n); + else { + var r = n.firstChild, + o = n.lastChild; + !r || (r === o && "BR" === r.nodeName) + ? e.dom.setHTML(n, t) + : e.selection.setContent(t); + } + })(e, t, i); + !(function() { + if (p) { + var t = e.getBody(), + n = new Ns(v); + Ot.each(v.select("*[data-mce-fragment]"), function(e) { + for (var r = e.parentNode; r && r !== t; r = r.parentNode) + g[e.nodeName.toLowerCase()] && + n.compare(r, e) && + v.remove(e, !0); + }); + } + })(), + (function(t) { + var n, r, o; + if (t) { + if ( + (h.scrollIntoView(t), + (n = (function(t) { + for (var n = e.getBody(); t && t !== n; t = t.parentNode) + if ("false" === e.dom.getContentEditable(t)) return t; + return null; + })(t))) + ) + return v.remove(t), void h.select(n); + (l = v.createRng()), + (f = t.previousSibling) && 3 === f.nodeType + ? (l.setStart(f, f.nodeValue.length), + me.ie || + ((d = t.nextSibling) && + 3 === d.nodeType && + (f.appendData(d.data), d.parentNode.removeChild(d)))) + : (l.setStartBefore(t), l.setEndBefore(t)), + (r = v.getParent(t, v.isBlock)), + v.remove(t), + r && + v.isEmpty(r) && + (e.$(r).empty(), + l.setStart(r, 0), + l.setEnd(r, 0), + Ys(r) || + r.getAttribute("data-mce-fragment") || + !(o = (function(t) { + var n = ia.fromRangeStart(t); + if ((n = Ha(e.getBody()).next(n))) return n.toRange(); + })(l)) + ? v.add(r, v.create("br", { "data-mce-bogus": "1" })) + : ((l = o), v.remove(r))), + h.setRng(l); + } + })(v.get("mce_marker")), + (S = e.getBody()), + Ot.each(S.getElementsByTagName("*"), function(e) { + e.removeAttribute("data-mce-fragment"); + }), + (k = e.dom), + (T = e.selection.getStart()), + E.from(k.getParent(T, "td,th")) + .map(Hn.fromDom) + .each(Ls), + e.fire("SetContent", u), + e.addVisual(); + } + }, + Js = function(e, t) { + var n, + r, + o = + "string" != typeof (n = t) + ? ((r = Ot.extend({ paste: n.paste, data: { paste: n.paste } }, n)), + { content: n.content, details: r }) + : { content: n, details: {} }; + Gs(e, o.content, o.details); + }, + Qs = function(e, t, n, r, o) { + return e(n, r) + ? E.some(n) + : tr.isFunction(o) && o(n) + ? E.none() + : t(n, r, o); + }, + Zs = function(e, t, n) { + for ( + var r = e.dom(), o = tr.isFunction(n) ? n : y.constant(!1); + r.parentNode; + + ) { + r = r.parentNode; + var i = Hn.fromDom(r); + if (t(i)) return E.some(i); + if (o(i)) break; + } + return E.none(); + }, + eu = function(e, t) { + return M.find( + e.dom().childNodes, + y.compose( + t, + Hn.fromDom + ) + ).map(Hn.fromDom); + }, + tu = function(e, t) { + var n = function(e) { + for (var r = 0; r < e.childNodes.length; r++) { + if (t(Hn.fromDom(e.childNodes[r]))) + return E.some(Hn.fromDom(e.childNodes[r])); + var o = n(e.childNodes[r]); + if (o.isSome()) return o; + } + return E.none(); + }; + return n(e.dom()); + }, + nu = { + first: function(e) { + return tu(gr.body(), e); + }, + ancestor: Zs, + closest: function(e, t, n) { + return Qs( + function(e) { + return t(e); + }, + Zs, + e, + t, + n + ); + }, + sibling: function(e, t) { + var n = e.dom(); + return n.parentNode + ? eu(Hn.fromDom(n.parentNode), function(n) { + return !Dr.eq(e, n) && t(n); + }) + : E.none(); + }, + child: eu, + descendant: tu + }, + ru = xr("sections", "settings"), + ou = Un.detect().deviceType.isTouch(), + iu = ["lists", "autolink", "autosave"], + au = { theme: "mobile" }, + su = function(e) { + var t = tr.isArray(e) ? e.join(" ") : e, + n = M.map(tr.isString(t) ? t.split(" ") : [], On); + return M.filter(n, function(e) { + return e.length > 0; + }); + }, + uu = function(e, t) { + return e.sections().hasOwnProperty(t); + }, + cu = function(e, t, n, r) { + var o, + i, + a = su(n.forced_plugins), + s = su(r.plugins), + u = + e && uu(t, "mobile") + ? ((o = s), M.filter(o, y.curry(M.contains, iu))) + : s, + c = ((i = u), [].concat(su(a)).concat(su(i))); + return Ot.extend(r, { plugins: c.join(" ") }); + }, + lu = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v = ((o = ["mobile"]), + (i = r), + (a = sr.bifilter(i, function(e, t) { + return M.contains(o, t); + })), + ru(a.t, a.f)), + y = Ot.extend( + t, + n, + v.settings(), + ((p = e), + (h = (g = v).settings().inline), + p && uu(g, "mobile") && !h + ? ((l = "mobile"), + (f = au), + (d = v.sections()), + (m = d.hasOwnProperty(l) ? d[l] : {}), + Ot.extend({}, f, m)) + : {}), + { + validate: !0, + content_editable: v.settings().inline, + external_plugins: ((s = n), + (u = v.settings()), + (c = u.external_plugins ? u.external_plugins : {}), + s && s.external_plugins ? Ot.extend({}, s.external_plugins, c) : c) + } + ); + return cu(e, v, n, y); + }, + fu = function(e, t, n) { + return E.from(t.settings[n]).filter(e); + }, + du = y.curry(fu, tr.isString), + mu = function(e, t, n, r) { + var o, + i, + a = t in e.settings ? e.settings[t] : n; + return "hash" === r + ? ((i = {}), + "string" == typeof (o = a) + ? M.each( + o.indexOf("=") > 0 + ? o.split(/[;,](?![^=;,]*(?:[;,]|$))/) + : o.split(","), + function(e) { + (e = e.split("=")).length > 1 + ? (i[Ot.trim(e[0])] = Ot.trim(e[1])) + : (i[Ot.trim(e[0])] = Ot.trim(e)); + } + ) + : (i = o), + i) + : "string" === r + ? fu(tr.isString, e, t).getOr(n) + : "number" === r + ? fu(tr.isNumber, e, t).getOr(n) + : "boolean" === r + ? fu(tr.isBoolean, e, t).getOr(n) + : "object" === r + ? fu(tr.isObject, e, t).getOr(n) + : "array" === r + ? fu(tr.isArray, e, t).getOr(n) + : "function" === r + ? fu(tr.isFunction, e, t).getOr(n) + : a; + }, + pu = /[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/, + gu = function(e) { + return pu.test(e); + }, + hu = function(e, t) { + var n = t.container(), + r = t.offset(); + return e + ? mi.isCaretContainerInline(n) + ? vo.isText(n.nextSibling) + ? new ia(n.nextSibling, 0) + : ia.after(n) + : mi.isBeforeInline(t) + ? new ia(n, r + 1) + : t + : mi.isCaretContainerInline(n) + ? vo.isText(n.previousSibling) + ? new ia(n.previousSibling, n.previousSibling.data.length) + : ia.before(n) + : mi.isAfterInline(t) + ? new ia(n, r - 1) + : t; + }, + vu = { + isInlineTarget: function(e, t) { + var n = du(e, "inline_boundaries_selector").getOr("a[href],code"); + return _r.is(Hn.fromDom(t), n); + }, + findRootInline: function(e, t, n) { + var r, + o, + i, + a = ((r = e), + (o = t), + (i = n), + M.filter(Xo.DOM.getParents(i.container(), "*", o), r)); + return E.from(a[a.length - 1]); + }, + isRtl: function(e) { + return ( + "rtl" === Xo.DOM.getStyle(e, "direction", !0) || gu(e.textContent) + ); + }, + isAtZwsp: function(e) { + return mi.isBeforeInline(e) || mi.isAfterInline(e); + }, + normalizePosition: hu, + normalizeForwards: y.curry(hu, !0), + normalizeBackwards: y.curry(hu, !1), + hasSameParentBlock: function(e, t, n) { + var r = _a.getParentBlock(t, e), + o = _a.getParentBlock(n, e); + return r && r === o; + } + }, + yu = function(e, t) { + return Dr.contains(e, t) + ? nu.closest( + t, + function(e) { + return io.isTextBlock(e) || io.isListItem(e); + }, + ((n = e), + function(e) { + return Dr.eq(n, Hn.fromDom(e.dom().parentNode)); + }) + ) + : E.none(); + var n; + }, + bu = function(e) { + var t, n, r; + e.dom.isEmpty(e.getBody()) && + (e.setContent(""), + (n = (t = e).getBody()), + (r = n.firstChild && t.dom.isBlock(n.firstChild) ? n.firstChild : n), + t.selection.setCursorLocation(r, 0)); + }, + Cu = function(e, t, n) { + return hs([Ws.firstPositionIn(n), Ws.lastPositionIn(n)], function(r, o) { + var i = vu.normalizePosition(!0, r), + a = vu.normalizePosition(!1, o), + s = vu.normalizePosition(!1, t); + return e + ? Ws.nextPosition(n, s) + .map(function(e) { + return e.isEqual(a) && t.isEqual(i); + }) + .getOr(!1) + : Ws.prevPosition(n, s) + .map(function(e) { + return e.isEqual(i) && t.isEqual(a); + }) + .getOr(!1); + }).getOr(!0); + }, + xu = function(e, t, n) { + return nu.ancestor( + e, + function(e) { + return _r.is(e, t); + }, + n + ); + }, + wu = xu, + Nu = function(e, t) { + return _r.one(t, e); + }, + Eu = function(e, t, n) { + return Qs(_r.is, xu, e, t, n); + }, + Su = function(e, t, n) { + return wu(e, t, n).isSome(); + }, + ku = function(e, t) { + return ( + vo.isText(t) && + /^[ \t\r\n]*$/.test(t.data) && + !1 === + ((n = e), + (r = t), + (o = Hn.fromDom(n)), + (i = Hn.fromDom(r)), + Su(i, "pre,code", y.curry(Dr.eq, o))) + ); + var n, r, o, i; + }, + Tu = function(e, t) { + return ( + (Ei(t) && !1 === ku(e, t)) || + ((n = t), + vo.isElement(n) && "A" === n.nodeName && n.hasAttribute("name")) || + Au(t) + ); + var n; + }, + Au = vo.hasAttribute("data-mce-bookmark"), + _u = vo.hasAttribute("data-mce-bogus"), + Bu = vo.hasAttributeValue("data-mce-bogus", "all"), + Ru = function(e) { + return (function(e) { + var t, + n, + r = 0; + if (Tu(e, e)) return !1; + if (!(n = e.firstChild)) return !0; + t = new to(n, e); + do { + if (Bu(n)) n = t.next(!0); + else if (_u(n)) n = t.next(); + else if (vo.isBr(n)) r++, (n = t.next()); + else { + if (Tu(e, n)) return !1; + n = t.next(); + } + } while (n); + return r <= 1; + })(e.dom()); + }, + Du = xr("block", "position"), + Ou = xr("from", "to"), + Pu = function(e, t) { + var n = Hn.fromDom(e), + r = Hn.fromDom(t.container()); + return yu(n, r).map(function(e) { + return Du(e, t); + }); + }, + Iu = function(e, t, n) { + var r = Pu(e, ia.fromRangeStart(n)), + o = r.bind(function(n) { + return Ws.fromPosition(t, e, n.position()).bind(function(n) { + return Pu(e, n).map(function(n) { + return ( + (r = e), + (o = t), + (i = n), + vo.isBr(i.position().getNode()) && !1 === Ru(i.block()) + ? Ws.positionIn(!1, i.block().dom()) + .bind(function(e) { + return e.isEqual(i.position()) + ? Ws.fromPosition(o, r, e).bind(function(e) { + return Pu(r, e); + }) + : E.some(i); + }) + .getOr(i) + : i + ); + var r, o, i; + }); + }); + }); + return hs([r, o], Ou).filter(function(e) { + return ( + (r = e), + !1 === Dr.eq(r.from().block(), r.to().block()) && + ((n = e), + Ur.parent(n.from().block()) + .bind(function(e) { + return Ur.parent(n.to().block()).filter(function(t) { + return Dr.eq(e, t); + }); + }) + .isSome()) && + ((t = e), + !1 === vo.isContentEditableFalse(t.from().block()) && + !1 === vo.isContentEditableFalse(t.to().block())) + ); + var t, n, r; + }); + }, + Lu = function(e, t, n) { + return n.collapsed ? Iu(e, t, n) : E.none(); + }, + Mu = function(e, t, n) { + return Dr.contains(t, e) + ? Ur.parents(e, function(e) { + return n(e) || Dr.eq(e, t); + }).slice(0, -1) + : []; + }, + Fu = function(e, t) { + return Mu(e, t, y.constant(!1)); + }, + zu = Fu, + Uu = function(e, t) { + return [e].concat(Fu(e, t)); + }, + Vu = function(e) { + var t, + n, + r = ((t = e), + (n = Ur.children(t)), + M.findIndex(n, io.isBlock).fold( + function() { + return n; + }, + function(e) { + return n.slice(0, e); + } + )); + return ( + M.each(r, function(e) { + Bs.remove(e); + }), + r + ); + }, + Hu = function(e, t) { + Ws.positionIn(e, t.dom()).each(function(e) { + var t = e.getNode(); + vo.isBr(t) && Bs.remove(Hn.fromDom(t)); + }); + }, + qu = function(e, t) { + var n = Uu(t, e); + return M.find(n.reverse(), Ru).each(Bs.remove); + }, + ju = function(e, t) { + return Dr.contains(t, e) + ? Ur.parent(e).bind(function(n) { + return Dr.eq(n, t) + ? E.some(e) + : ((r = t), + (o = e), + (i = Ur.parents(o, function(e) { + return Dr.eq(e, r); + })), + E.from(i[i.length - 2])); + var r, o, i; + }) + : E.none(); + }, + $u = function(e, t, n) { + if (Ru(n)) + return Bs.remove(n), Ru(t) && Is(t), Ws.firstPositionIn(t.dom()); + Hu(!0, t), Hu(!1, n); + var r = Vu(t); + return ju(t, n).fold( + function() { + qu(e, t); + var o = Ws.lastPositionIn(n.dom()); + return ( + M.each(r, function(e) { + ks.append(n, e); + }), + o + ); + }, + function(o) { + var i = Ws.prevPosition(n.dom(), ia.before(o.dom())); + return ( + M.each(r, function(e) { + ks.before(o, e); + }), + qu(e, t), + i + ); + } + ); + }, + Wu = function(e, t, n, r) { + return t ? $u(e, r, n) : $u(e, n, r); + }, + Ku = function(e, t) { + var n, + r = Hn.fromDom(e.getBody()); + return ( + (n = Lu(r.dom(), t, e.selection.getRng()).bind(function(e) { + return Wu(r, t, e.from().block(), e.to().block()); + })).each(function(t) { + e.selection.setRng(t.toRange()); + }), + n.isSome() + ); + }, + Xu = function(e, t) { + var n = Hn.fromDom(t), + r = y.curry(Dr.eq, e); + return nu.ancestor(n, io.isTableCell, r).isSome(); + }, + Yu = function(e, t) { + var n, + r, + o = Ws.prevPosition(e.dom(), ia.fromRangeStart(t)).isNone(), + i = Ws.nextPosition(e.dom(), ia.fromRangeEnd(t)).isNone(); + return ( + !(Xu((n = e), (r = t).startContainer) || Xu(n, r.endContainer)) && + o && + i + ); + }, + Gu = function(e) { + var t, + n, + r, + o, + i = Hn.fromDom(e.getBody()), + a = e.selection.getRng(); + return Yu(i, a) + ? ((o = e).setContent(""), o.selection.setCursorLocation(), !0) + : ((t = i), + (n = e.selection), + (r = n.getRng()), + hs( + [ + yu(t, Hn.fromDom(r.startContainer)), + yu(t, Hn.fromDom(r.endContainer)) + ], + function(e, o) { + return ( + !1 === Dr.eq(e, o) && + (r.deleteContents(), + Wu(t, !0, e, o).each(function(e) { + n.setRng(e.toRange()); + }), + !0) + ); + } + ).getOr(!1)); + }, + Ju = function(e, t) { + return !e.selection.isCollapsed() && Gu(e); + }, + Qu = function(e) { + if (!tr.isArray(e)) throw new Error("cases must be an array"); + if (0 === e.length) throw new Error("there must be at least one case"); + var t = [], + n = {}; + return ( + M.each(e, function(r, o) { + var i = sr.keys(r); + if (1 !== i.length) throw new Error("one and only one name per case"); + var a = i[0], + s = r[a]; + if (n[a] !== undefined) + throw new Error("duplicate key detected:" + a); + if ("cata" === a) + throw new Error("cannot have a case named cata (sorry)"); + if (!tr.isArray(s)) + throw new Error("case arguments must be an array"); + t.push(a), + (n[a] = function() { + var n = arguments.length; + if (n !== s.length) + throw new Error( + "Wrong number of arguments to case " + + a + + ". Expected " + + s.length + + " (" + + s + + "), got " + + n + ); + for (var r = new Array(n), i = 0; i < r.length; i++) + r[i] = arguments[i]; + return { + fold: function() { + if (arguments.length !== e.length) + throw new Error( + "Wrong number of arguments to fold. Expected " + + e.length + + ", got " + + arguments.length + ); + return arguments[o].apply(null, r); + }, + match: function(e) { + var n = sr.keys(e); + if (t.length !== n.length) + throw new Error( + "Wrong number of arguments to match. Expected: " + + t.join(",") + + "\nActual: " + + n.join(",") + ); + if ( + !M.forall(t, function(e) { + return M.contains(n, e); + }) + ) + throw new Error( + "Not all branches were specified when using match. Specified: " + + n.join(", ") + + "\nRequired: " + + t.join(", ") + ); + return e[a].apply(null, r); + }, + log: function(e) { + console.log(e, { + constructors: t, + constructor: a, + params: r + }); + } + }; + }); + }), + n + ); + }, + Zu = Qu([ + { remove: ["element"] }, + { moveToElement: ["element"] }, + { moveToPosition: ["position"] } + ]), + ec = function(e, t, n, r) { + var o = r.getNode(!1 === t); + return yu(Hn.fromDom(e), Hn.fromDom(n.getNode())) + .map(function(e) { + return Ru(e) ? Zu.remove(e.dom()) : Zu.moveToElement(o); + }) + .orThunk(function() { + return E.some(Zu.moveToElement(o)); + }); + }, + tc = function(e, t, n) { + return Ws.fromPosition(t, e, n).bind(function(r) { + return t && vo.isContentEditableFalse(r.getNode()) + ? ec(e, t, n, r) + : !1 === t && vo.isContentEditableFalse(r.getNode(!0)) + ? ec(e, t, n, r) + : t && _a.isAfterContentEditableFalse(n) + ? E.some(Zu.moveToPosition(r)) + : !1 === t && _a.isBeforeContentEditableFalse(n) + ? E.some(Zu.moveToPosition(r)) + : E.none(); + }); + }, + nc = function(e, t, n) { + return ( + (i = t), + (a = n.getNode(!1 === i)), + (s = i ? "after" : "before"), + vo.isElement(a) && a.getAttribute("data-mce-caret") === s + ? ((r = t), + (o = n.getNode(!1 === t)), + r && vo.isContentEditableFalse(o.nextSibling) + ? E.some(Zu.moveToElement(o.nextSibling)) + : !1 === r && vo.isContentEditableFalse(o.previousSibling) + ? E.some(Zu.moveToElement(o.previousSibling)) + : E.none()).fold(function() { + return tc(e, t, n); + }, E.some) + : tc(e, t, n).bind(function(t) { + return ( + (r = e), + (o = n), + t.fold( + function(e) { + return E.some(Zu.remove(e)); + }, + function(e) { + return E.some(Zu.moveToElement(e)); + }, + function(e) { + return _a.isInSameBlock(o, e, r) + ? E.none() + : E.some(Zu.moveToPosition(e)); + } + ) + ); + var r, o; + }) + ); + var r, o, i, a, s; + }, + rc = function(e, t, n) { + var r = _a.normalizeRange(t ? 1 : -1, e, n), + o = ia.fromRangeStart(r); + return !1 === t && _a.isAfterContentEditableFalse(o) + ? E.some(Zu.remove(o.getNode(!0))) + : t && _a.isBeforeContentEditableFalse(o) + ? E.some(Zu.remove(o.getNode())) + : nc(e, t, o); + }, + oc = function(e, t) { + return ( + (r = e), + (o = (n = t).container()), + (i = n.offset()), + !1 === ia.isTextPosition(n) && + o === r.parentNode && + i > ia.before(r).offset() + ? new ia(t.container(), t.offset() - 1) + : t + ); + var n, r, o, i; + }, + ic = function(e) { + return Ei(e.previousSibling) + ? E.some( + ((t = e.previousSibling), + vo.isText(t) ? new ia(t, t.data.length) : ia.after(t)) + ) + : e.previousSibling + ? Ws.lastPositionIn(e.previousSibling) + : E.none(); + var t; + }, + ac = function(e) { + return Ei(e.nextSibling) + ? E.some( + ((t = e.nextSibling), vo.isText(t) ? new ia(t, 0) : ia.before(t)) + ) + : e.nextSibling + ? Ws.firstPositionIn(e.nextSibling) + : E.none(); + var t; + }, + sc = function(e, t) { + return ic(t) + .orThunk(function() { + return ac(t); + }) + .orThunk(function() { + return ( + (n = e), + (r = t), + (o = ia.before( + r.previousSibling ? r.previousSibling : r.parentNode + )), + Ws.prevPosition(n, o).fold(function() { + return Ws.nextPosition(n, ia.after(r)); + }, E.some) + ); + var n, r, o; + }); + }, + uc = function(e, t) { + return ac(t) + .orThunk(function() { + return ic(t); + }) + .orThunk(function() { + return ( + (n = e), + (r = t), + Ws.nextPosition(n, ia.after(r)).fold(function() { + return Ws.prevPosition(n, ia.before(r)); + }, E.some) + ); + var n, r; + }); + }, + cc = function(e, t, n) { + return ((r = e), (o = t), (i = n), r ? uc(o, i) : sc(o, i)).map( + y.curry(oc, n) + ); + var r, o, i; + }, + lc = function(e, t, n) { + n.fold( + function() { + e.focus(); + }, + function(n) { + e.selection.setRng(n.toRange(), t); + } + ); + }, + fc = function(e, t) { + return t && e.schema.getBlockElements().hasOwnProperty(Zn.name(t)); + }, + dc = function(e) { + if (Ru(e)) { + var t = Hn.fromHtml('
'); + return Bs.empty(e), ks.append(e, t), E.some(ia.before(t.dom())); + } + return E.none(); + }, + mc = function(e, t, n) { + var r, + o, + i, + a = cc(t, e.getBody(), n.dom()), + s = nu.ancestor( + n, + y.curry(fc, e), + ((r = e.getBody()), + function(e) { + return e.dom() === r; + }) + ), + u = ((o = n), + (i = a), + hs([Ur.prevSibling(o), Ur.nextSibling(o), i], function(e, t, n) { + var r, + i = e.dom(), + a = t.dom(); + return vo.isText(i) && vo.isText(a) + ? ((r = i.data.length), + i.appendData(a.data), + Bs.remove(t), + Bs.remove(o), + n.container() === a ? new ia(i, r) : n) + : (Bs.remove(o), n); + }).orThunk(function() { + return Bs.remove(o), i; + })); + e.dom.isEmpty(e.getBody()) + ? (e.setContent(""), e.selection.setCursorLocation()) + : s.bind(dc).fold( + function() { + lc(e, t, u); + }, + function(n) { + lc(e, t, E.some(n)); + } + ); + }, + pc = function(e, t) { + return rc(e.getBody(), t, e.selection.getRng()) + .map(function(n) { + return n.fold( + ((a = e), + (s = t), + function(e) { + return ( + a._selectionOverrides.hideFakeCaret(), + mc(a, s, Hn.fromDom(e)), + !0 + ); + }), + ((o = e), + (i = t), + function(e) { + var t = i ? ia.before(e) : ia.after(e); + return o.selection.setRng(t.toRange()), !0; + }), + ((r = e), + function(e) { + return r.selection.setRng(e.toRange()), !0; + }) + ); + var r, o, i, a, s; + }) + .getOr(!1); + }, + gc = function(e, t) { + var n, + r = e.selection.getNode(); + return ( + !!vo.isContentEditableFalse(r) && + ((n = Hn.fromDom(e.getBody())), + M.each(Os(n, ".mce-offscreen-selection"), Bs.remove), + mc(e, t, Hn.fromDom(e.selection.getNode())), + bu(e), + !0) + ); + }, + hc = function(e, t) { + return e.selection.isCollapsed() ? pc(e, t) : gc(e, t); + }, + vc = function(e) { + var t, + n = (function(e, t) { + for (; t && t !== e; ) { + if (vo.isContentEditableTrue(t) || vo.isContentEditableFalse(t)) + return t; + t = t.parentNode; + } + return null; + })(e.getBody(), e.selection.getNode()); + return ( + vo.isContentEditableTrue(n) && + e.dom.isBlock(n) && + e.dom.isEmpty(n) && + ((t = e.dom.create("br", { "data-mce-bogus": "1" })), + e.dom.setHTML(n, ""), + n.appendChild(t), + e.selection.setRng(ia.before(t).toRange())), + !0 + ); + }, + yc = vo.isText, + bc = function(e) { + return yc(e) && e.data[0] === oi; + }, + Cc = function(e) { + return yc(e) && e.data[e.data.length - 1] === oi; + }, + xc = function(e) { + return e.ownerDocument.createTextNode(oi); + }, + wc = function(e, t) { + return e + ? (function(e) { + if (yc(e.previousSibling)) + return Cc(e.previousSibling) + ? e.previousSibling + : (e.previousSibling.appendData(oi), e.previousSibling); + if (yc(e)) return bc(e) ? e : (e.insertData(0, oi), e); + var t = xc(e); + return e.parentNode.insertBefore(t, e), t; + })(t) + : (function(e) { + if (yc(e.nextSibling)) + return bc(e.nextSibling) + ? e.nextSibling + : (e.nextSibling.insertData(0, oi), e.nextSibling); + if (yc(e)) return Cc(e) ? e : (e.appendData(oi), e); + var t = xc(e); + return ( + e.nextSibling + ? e.parentNode.insertBefore(t, e.nextSibling) + : e.parentNode.appendChild(t), + t + ); + })(t); + }, + Nc = { + insertInline: wc, + insertInlineBefore: y.curry(wc, !0), + insertInlineAfter: y.curry(wc, !1) + }, + Ec = vo.isElement, + Sc = vo.isText, + kc = function(e) { + var t = e.parentNode; + t && t.removeChild(e); + }, + Tc = function(e, t) { + 0 === t.length ? kc(e) : (e.nodeValue = t); + }, + Ac = function(e) { + var t = ii(e); + return { count: e.length - t.length, text: t }; + }, + _c = function(e, t) { + return Dc(e), t; + }, + Bc = function(e, t) { + return t.container() === e + ? ((r = t), + (o = Ac((n = e).data.substr(0, r.offset()))), + (i = Ac(n.data.substr(r.offset()))), + (a = o.text + i.text).length > 0 + ? (Tc(n, a), new ia(n, r.offset() - o.count)) + : r) + : _c(e, t); + var n, r, o, i, a; + }, + Rc = function(e, t) { + return t.container() === e.parentNode + ? ((n = e), + (o = (r = t).container()), + (i = M.indexOf(o.childNodes, n) + .map(function(e) { + return e < r.offset() ? new ia(o, r.offset() - 1) : r; + }) + .getOr(r)), + Dc(n), + i) + : _c(e, t); + var n, r, o, i; + }, + Dc = function(e) { + if ( + (Ec(e) && + mi.isCaretContainer(e) && + (mi.hasContent(e) ? e.removeAttribute("data-mce-caret") : kc(e)), + Sc(e)) + ) { + var t = ii( + (function(e) { + try { + return e.nodeValue; + } catch (t) { + return ""; + } + })(e) + ); + Tc(e, t); + } + }, + Oc = { + removeAndReposition: function(e, t) { + return ia.isTextPosition(t) ? Bc(e, t) : Rc(e, t); + }, + remove: Dc + }, + Pc = function(e, t) { + return vo.isText(e.container()) + ? Nc.insertInline(t, e.container()) + : Nc.insertInline(t, e.getNode()); + }, + Ic = function(e, t) { + var n = t.get(); + return n && e.container() === n && mi.isCaretContainerInline(n); + }, + Lc = function(e, t) { + return t.fold( + function(t) { + Oc.remove(e.get()); + var n = Nc.insertInlineBefore(t); + return e.set(n), E.some(new ia(n, n.length - 1)); + }, + function(t) { + return Ws.firstPositionIn(t).map(function(t) { + if (Ic(t, e)) return new ia(e.get(), 1); + Oc.remove(e.get()); + var n = Pc(t, !0); + return e.set(n), new ia(n, 1); + }); + }, + function(t) { + return Ws.lastPositionIn(t).map(function(t) { + if (Ic(t, e)) return new ia(e.get(), e.get().length - 1); + Oc.remove(e.get()); + var n = Pc(t, !1); + return e.set(n), new ia(n, n.length - 1); + }); + }, + function(t) { + Oc.remove(e.get()); + var n = Nc.insertInlineAfter(t); + return e.set(n), E.some(new ia(n, 1)); + } + ); + }, + Mc = function(e) { + return e && /^(IMG)$/.test(e.nodeName); + }, + Fc = function(e) { + return e && 3 === e.nodeType && /^([\t \r\n]+|)$/.test(e.nodeValue); + }, + zc = function(e, t, n) { + return ( + ("color" !== n && "backgroundColor" !== n) || (t = e.toHex(t)), + "fontWeight" === n && 700 === t && (t = "bold"), + "fontFamily" === n && + (t = t.replace(/[\'\"]/g, "").replace(/,\s+/g, ",")), + "" + t + ); + }, + Uc = { + isInlineBlock: Mc, + moveStart: function(e, t, n) { + var r, + o, + i, + a = n.startContainer, + s = n.startOffset; + if ( + (n.startContainer !== n.endContainer || + !Mc(n.startContainer.childNodes[n.startOffset])) && + (3 === a.nodeType && + s >= a.nodeValue.length && + ((s = e.nodeIndex(a)), (a = a.parentNode)), + 1 === a.nodeType) + ) + for ( + s < (i = a.childNodes).length + ? ((a = i[s]), (r = new to(a, e.getParent(a, e.isBlock)))) + : ((a = i[i.length - 1]), + (r = new to(a, e.getParent(a, e.isBlock))).next(!0)), + o = r.current(); + o; + o = r.next() + ) + if (3 === o.nodeType && !Fc(o)) + return n.setStart(o, 0), void t.setRng(n); + }, + getNonWhiteSpaceSibling: function(e, t, n) { + if (e) + for ( + t = t ? "nextSibling" : "previousSibling", e = n ? e : e[t]; + e; + e = e[t] + ) + if (1 === e.nodeType || !Fc(e)) return e; + }, + isTextBlock: function(e, t) { + return ( + t.nodeType && (t = t.nodeName), + !!e.schema.getTextBlockElements()[t.toLowerCase()] + ); + }, + isValid: function(e, t, n) { + return e.schema.isValidChild(t, n); + }, + isWhiteSpaceNode: Fc, + replaceVars: function(e, t) { + return ( + "string" != typeof e + ? (e = e(t)) + : t && + (e = e.replace(/%(\w+)/g, function(e, n) { + return t[n] || e; + })), + e + ); + }, + isEq: function(e, t) { + return ( + (e = e || ""), + (t = t || ""), + (e = "" + (e.nodeName || e)), + (t = "" + (t.nodeName || t)), + e.toLowerCase() === t.toLowerCase() + ); + }, + normalizeStyleValue: zc, + getStyle: function(e, t, n) { + return zc(e, e.getStyle(t, n), n); + }, + getTextDecoration: function(e, t) { + var n; + return ( + e.getParent(t, function(t) { + return (n = e.getStyle(t, "text-decoration")) && "none" !== n; + }), + n + ); + }, + getParents: function(e, t, n) { + return e.getParents(t, n, e.getRoot()); + } + }, + Vc = xs.isBookmarkNode, + Hc = Uc.getParents, + qc = Uc.isWhiteSpaceNode, + jc = Uc.isTextBlock, + $c = function(e, t) { + for ( + void 0 === t && (t = 3 === e.nodeType ? e.length : e.childNodes.length); + e && e.hasChildNodes(); + + ) + (e = e.childNodes[t]) && + (t = 3 === e.nodeType ? e.length : e.childNodes.length); + return { node: e, offset: t }; + }, + Wc = function(e, t) { + for (var n = t; n; ) { + if (1 === n.nodeType && e.getContentEditable(n)) + return "false" === e.getContentEditable(n) ? n : t; + n = n.parentNode; + } + return t; + }, + Kc = function(e, t, n, r) { + var o, + i, + a = n.nodeValue; + return ( + void 0 === r && (r = e ? a.length : 0), + e + ? -1 === + (o = + (o = a.lastIndexOf(" ", r)) > (i = a.lastIndexOf("\xa0", r)) + ? o + : i) || + t || + o++ + : ((o = a.indexOf(" ", r)), + (i = a.indexOf("\xa0", r)), + (o = -1 !== o && (-1 === i || o < i) ? o : i)), + o + ); + }, + Xc = function(e, t, n, r, o, i) { + var a, s, u, c; + if (3 === n.nodeType) { + if (-1 !== (u = Kc(o, i, n, r))) return { container: n, offset: u }; + c = n; + } + for ( + a = new to(n, e.getParent(n, e.isBlock) || t); + (s = a[o ? "prev" : "next"]()); + + ) + if (3 === s.nodeType) { + if (((c = s), -1 !== (u = Kc(o, i, s)))) + return { container: s, offset: u }; + } else if (e.isBlock(s)) break; + if (c) return { container: c, offset: (r = o ? 0 : c.length) }; + }, + Yc = function(e, t, n, r, o) { + var i, a, s, u; + for ( + 3 === r.nodeType && 0 === r.nodeValue.length && r[o] && (r = r[o]), + i = Hc(e, r), + a = 0; + a < i.length; + a++ + ) + for (s = 0; s < t.length; s++) + if ( + !("collapsed" in (u = t[s]) && u.collapsed !== n.collapsed) && + e.is(i[a], u.selector) + ) + return i[a]; + return r; + }, + Gc = function(e, t, n, r) { + var o, + i = e.dom, + a = i.getRoot(); + if ((t[0].wrapper || (o = i.getParent(n, t[0].block, a)), !o)) { + var s = i.getParent(n, "LI,TD,TH"); + o = i.getParent( + 3 === n.nodeType ? n.parentNode : n, + function(t) { + return t !== a && jc(e, t); + }, + s + ); + } + if ((o && t[0].wrapper && (o = Hc(i, o, "ul,ol").reverse()[0] || o), !o)) + for ( + o = n; + o[r] && !i.isBlock(o[r]) && ((o = o[r]), !Uc.isEq(o, "br")); + + ); + return o || n; + }, + Jc = function(e, t, n, r, o, i, a) { + var s, u, c, l, f, d; + if ( + ((s = u = a ? n : o), + (l = a ? "previousSibling" : "nextSibling"), + (f = e.getRoot()), + 3 === s.nodeType && !qc(s) && (a ? r > 0 : i < s.nodeValue.length)) + ) + return s; + for (;;) { + if (!t[0].block_expand && e.isBlock(u)) return u; + for (c = u[l]; c; c = c[l]) + if ( + !Vc(c) && + !qc(c) && + ("BR" !== (d = c).nodeName || + !d.getAttribute("data-mce-bogus") || + d.nextSibling) + ) + return u; + if (u === f || u.parentNode === f) { + s = u; + break; + } + u = u.parentNode; + } + return s; + }, + Qc = function(e, t, n, r) { + var o, + i = t.startContainer, + a = t.startOffset, + s = t.endContainer, + u = t.endOffset, + c = e.dom; + return ( + 1 === i.nodeType && + i.hasChildNodes() && + 3 === (i = zi(i, a)).nodeType && + (a = 0), + 1 === s.nodeType && + s.hasChildNodes() && + 3 === (s = zi(s, t.collapsed ? u : u - 1)).nodeType && + (u = s.nodeValue.length), + (i = Wc(c, i)), + (s = Wc(c, s)), + (Vc(i.parentNode) || Vc(i)) && + 3 === + (i = (i = Vc(i) ? i : i.parentNode).nextSibling || i).nodeType && + (a = 0), + (Vc(s.parentNode) || Vc(s)) && + 3 === + (s = (s = Vc(s) ? s : s.parentNode).previousSibling || s) + .nodeType && + (u = s.length), + n[0].inline && + (t.collapsed && + ((o = Xc(c, e.getBody(), i, a, !0, r)) && + ((i = o.container), (a = o.offset)), + (o = Xc(c, e.getBody(), s, u, !1, r)) && + ((s = o.container), (u = o.offset))), + (s = r + ? s + : (function(e, t) { + var n = $c(e, t); + if (n.node) { + for (; n.node && 0 === n.offset && n.node.previousSibling; ) + n = $c(n.node.previousSibling); + n.node && + n.offset > 0 && + 3 === n.node.nodeType && + " " === n.node.nodeValue.charAt(n.offset - 1) && + n.offset > 1 && + (e = n.node).splitText(n.offset - 1); + } + return e; + })(s, u))), + (n[0].inline || n[0].block_expand) && + ((n[0].inline && 3 === i.nodeType && 0 !== a) || + (i = Jc(c, n, i, a, s, u, !0)), + (n[0].inline && 3 === s.nodeType && u !== s.nodeValue.length) || + (s = Jc(c, n, i, a, s, u, !1))), + n[0].selector && + !1 !== n[0].expand && + !n[0].inline && + ((i = Yc(c, n, t, i, "previousSibling")), + (s = Yc(c, n, t, s, "nextSibling"))), + (n[0].block || n[0].selector) && + ((i = Gc(e, n, i, "previousSibling")), + (s = Gc(e, n, s, "nextSibling")), + n[0].block && + (c.isBlock(i) || (i = Jc(c, n, i, a, s, u, !0)), + c.isBlock(s) || (s = Jc(c, n, i, a, s, u, !1)))), + 1 === i.nodeType && ((a = c.nodeIndex(i)), (i = i.parentNode)), + 1 === s.nodeType && ((u = c.nodeIndex(s) + 1), (s = s.parentNode)), + { startContainer: i, startOffset: a, endContainer: s, endOffset: u } + ); + }, + Zc = Uc.isEq, + el = function(e, t, n) { + var r = e.formatter.get(n); + if (r) + for (var o = 0; o < r.length; o++) + if (!1 === r[o].inherit && e.dom.is(t, r[o].selector)) return !0; + return !1; + }, + tl = function(e, t, n, r) { + var o = e.dom.getRoot(); + return ( + t !== o && + ((t = e.dom.getParent(t, function(t) { + return !!el(e, t, n) || t.parentNode === o || !!ol(e, t, n, r, !0); + })), + ol(e, t, n, r)) + ); + }, + nl = function(e, t, n) { + return ( + !!Zc(t, n.inline) || + !!Zc(t, n.block) || + (n.selector ? 1 === t.nodeType && e.is(t, n.selector) : void 0) + ); + }, + rl = function(e, t, n, r, o, i) { + var a, + s, + u, + c = n[r]; + if (n.onmatch) return n.onmatch(t, n, r); + if (c) + if ("undefined" == typeof c.length) { + for (a in c) + if (c.hasOwnProperty(a)) { + if ( + ((s = + "attributes" === r + ? e.getAttrib(t, a) + : Uc.getStyle(e, t, a)), + o && !s && !n.exact) + ) + return; + if ( + (!o || n.exact) && + !Zc(s, Uc.normalizeStyleValue(e, Uc.replaceVars(c[a], i), a)) + ) + return; + } + } else + for (u = 0; u < c.length; u++) + if ( + "attributes" === r + ? e.getAttrib(t, c[u]) + : Uc.getStyle(e, t, c[u]) + ) + return n; + return n; + }, + ol = function(e, t, n, r, o) { + var i, + a, + s, + u, + c = e.formatter.get(n), + l = e.dom; + if (c && t) + for (a = 0; a < c.length; a++) + if ( + ((i = c[a]), + nl(e.dom, t, i) && + rl(l, t, i, "attributes", o, r) && + rl(l, t, i, "styles", o, r)) + ) { + if ((u = i.classes)) + for (s = 0; s < u.length; s++) + if (!e.dom.hasClass(t, u[s])) return; + return i; + } + }, + il = { + matchNode: ol, + matchName: nl, + match: function(e, t, n, r) { + var o; + return r + ? tl(e, r, t, n) + : ((r = e.selection.getNode()), + !!tl(e, r, t, n) || + !((o = e.selection.getStart()) === r || !tl(e, o, t, n))); + }, + matchAll: function(e, t, n) { + var r, + o = [], + i = {}; + return ( + (r = e.selection.getStart()), + e.dom.getParent( + r, + function(r) { + var a, s; + for (a = 0; a < t.length; a++) + (s = t[a]), !i[s] && ol(e, r, s, n) && ((i[s] = !0), o.push(s)); + }, + e.dom.getRoot() + ), + o + ); + }, + canApply: function(e, t) { + var n, + r, + o, + i, + a, + s = e.formatter.get(t), + u = e.dom; + if (s) + for ( + n = e.selection.getStart(), + r = Uc.getParents(u, n), + i = s.length - 1; + i >= 0; + i-- + ) { + if (!(a = s[i].selector) || s[i].defaultBlock) return !0; + for (o = r.length - 1; o >= 0; o--) if (u.is(r[o], a)) return !0; + } + return !1; + }, + matchesUnInheritedFormatSelector: el + }, + al = function(e, t) { + return e.splitText(t); + }, + sl = { + split: function(e) { + var t = e.startContainer, + n = e.startOffset, + r = e.endContainer, + o = e.endOffset; + return ( + t === r && vo.isText(t) + ? n > 0 && + n < t.nodeValue.length && + ((t = (r = al(t, n)).previousSibling), + o > n + ? ((t = r = al(r, (o -= n)).previousSibling), + (o = r.nodeValue.length), + (n = 0)) + : (o = 0)) + : (vo.isText(t) && + n > 0 && + n < t.nodeValue.length && + ((t = al(t, n)), (n = 0)), + vo.isText(r) && + o > 0 && + o < r.nodeValue.length && + (o = (r = al(r, o).previousSibling).nodeValue.length)), + { startContainer: t, startOffset: n, endContainer: r, endOffset: o } + ); + } + }, + ul = oi, + cl = "_mce_caret", + ll = function(e) { + return 1 === e.nodeType && e.id === cl; + }, + fl = function(e) { + return ( + (function(e) { + for (var t = []; e; ) { + if ( + (3 === e.nodeType && e.nodeValue !== ul) || + e.childNodes.length > 1 + ) + return []; + 1 === e.nodeType && t.push(e), (e = e.firstChild); + } + return t; + })(e).length > 0 + ); + }, + dl = function(e) { + var t; + if (e) + for (e = (t = new to(e, e)).current(); e; e = t.next()) + if (3 === e.nodeType) return e; + return null; + }, + ml = function(e) { + var t = Hn.fromTag("span"); + return ( + dr.setAll(t, { + id: cl, + "data-mce-bogus": "1", + "data-mce-type": "format-caret" + }), + e && ks.append(t, Hn.fromText(ul)), + t + ); + }, + pl = function(e, t) { + for (; t && t !== e; ) { + if (t.id === cl) return t; + t = t.parentNode; + } + return null; + }, + gl = function(e, t, n, r) { + var o, i, a, s; + (o = t.getRng(!0)), + (i = e.getParent(n, e.isBlock)), + fl(n) + ? (!1 !== r && (o.setStartBefore(n), o.setEndBefore(n)), e.remove(n)) + : ((s = dl(n)) && s.nodeValue.charAt(0) === ul && s.deleteData(0, 1), + (a = s), + o.startContainer === a && + o.startOffset > 0 && + o.setStart(a, o.startOffset - 1), + o.endContainer === a && + o.endOffset > 0 && + o.setEnd(a, o.endOffset - 1), + e.remove(n, !0)), + i && e.isEmpty(i) && Is(Hn.fromDom(i)), + t.setRng(o); + }, + hl = function(e, t, n, r, o) { + if (r) gl(t, n, r, o); + else if (!(r = pl(e, n.getStart()))) + for (; (r = t.get(cl)); ) gl(t, n, r, !1); + }, + vl = function(e, t, n) { + var r = e.dom, + o = r.getParent(n, ji.curry(Uc.isTextBlock, e)); + o && r.isEmpty(o) + ? n.parentNode.replaceChild(t, n) + : (Ps(Hn.fromDom(n)), + r.isEmpty(n) ? n.parentNode.replaceChild(t, n) : r.insertAfter(t, n)); + }, + yl = function(e, t) { + return e.appendChild(t), t; + }, + bl = function(e, t) { + var n = M.foldr( + e, + function(e, t) { + return yl(e, t.cloneNode(!1)); + }, + t + ); + return yl(n, n.ownerDocument.createTextNode(ul)); + }, + Cl = function(e) { + var t = e.dom, + n = e.selection, + r = e.getBody(); + e.on("mouseup keydown", function(e) { + var o, i, a, s; + (o = r), + (i = t), + (a = n), + (s = e.keyCode), + hl(o, i, a, null, !1), + 8 === s && + a.isCollapsed() && + a.getStart().innerHTML === ul && + hl(o, i, a, pl(o, a.getStart())), + (37 !== s && 39 !== s) || hl(o, i, a, pl(o, a.getStart())); + }); + }, + xl = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c = e.selection; + (a = (r = c.getRng(!0)).startOffset), + (u = r.startContainer.nodeValue), + (o = pl(e.getBody(), c.getStart())) && (i = dl(o)); + var l, + f, + d = /[^\s\u00a0\u00ad\u200b\ufeff]/; + u && + a > 0 && + a < u.length && + d.test(u.charAt(a)) && + d.test(u.charAt(a - 1)) + ? ((s = c.getBookmark()), + r.collapse(!0), + (r = Qc(e, r, e.formatter.get(t))), + (r = sl.split(r)), + e.formatter.apply(t, n, r), + c.moveToBookmark(s)) + : (o && i.nodeValue === ul + ? e.formatter.apply(t, n, o) + : ((l = e.getDoc()), + (f = ml(!0).dom()), + (i = (o = l.importNode(f, !0)).firstChild), + r.insertNode(o), + (a = 1), + e.formatter.apply(t, n, o)), + c.setCursorLocation(i, a)); + }, + wl = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c, + l, + f = e.dom, + d = e.selection, + m = [], + p = d.getRng(); + for ( + o = p.startContainer, + i = p.startOffset, + u = o, + 3 === o.nodeType && + (i !== o.nodeValue.length && (s = !0), (u = u.parentNode)); + u; + + ) { + if (il.matchNode(e, u, t, n, r)) { + c = u; + break; + } + u.nextSibling && (s = !0), m.push(u), (u = u.parentNode); + } + if (c) + if (s) { + (a = d.getBookmark()), p.collapse(!0); + var g = Qc(e, p, e.formatter.get(t), !0); + (g = sl.split(g)), e.formatter.remove(t, n, g), d.moveToBookmark(a); + } else { + l = pl(e.getBody(), c); + var h = ml(!1).dom(), + v = bl(m, h); + vl(e, h, l || c), + gl(f, d, l, !1), + d.setCursorLocation(v, 1), + f.isEmpty(c) && f.remove(c); + } + }, + Nl = ll, + El = pl, + Sl = function(e, t) { + var n = ml(!1), + r = bl(t, n.dom()); + return ks.before(Hn.fromDom(e), n), Bs.remove(Hn.fromDom(e)), ia(r, 0); + }, + kl = function(e, t) { + return ( + e.schema.getTextInlineElements().hasOwnProperty(Zn.name(t)) && + !ll(t.dom()) && + !vo.isBogus(t.dom()) + ); + }, + Tl = function(e, t) { + for (var n = 0; n < e.length; n++) { + var r = e[n].apply(null, t); + if (r.isSome()) return r; + } + return E.none(); + }, + Al = Qu([ + { before: ["element"] }, + { start: ["element"] }, + { end: ["element"] }, + { after: ["element"] } + ]), + _l = function(e, t) { + var n = _a.getParentBlock(t, e); + return n || e; + }, + Bl = function(e, t, n) { + var r = vu.normalizeForwards(n), + o = _l(t, r.container()); + return vu.findRootInline(e, o, r).fold(function() { + return Ws.nextPosition(o, r) + .bind(y.curry(vu.findRootInline, e, o)) + .map(function(e) { + return Al.before(e); + }); + }, E.none); + }, + Rl = function(e, t) { + return null === El(e, t); + }, + Dl = function(e, t, n) { + return vu.findRootInline(e, t, n).filter(y.curry(Rl, t)); + }, + Ol = function(e, t, n) { + var r = vu.normalizeBackwards(n); + return Dl(e, t, r).bind(function(e) { + return Ws.prevPosition(e, r).isNone() ? E.some(Al.start(e)) : E.none(); + }); + }, + Pl = function(e, t, n) { + var r = vu.normalizeForwards(n); + return Dl(e, t, r).bind(function(e) { + return Ws.nextPosition(e, r).isNone() ? E.some(Al.end(e)) : E.none(); + }); + }, + Il = function(e, t, n) { + var r = vu.normalizeBackwards(n), + o = _l(t, r.container()); + return vu.findRootInline(e, o, r).fold(function() { + return Ws.prevPosition(o, r) + .bind(y.curry(vu.findRootInline, e, o)) + .map(function(e) { + return Al.after(e); + }); + }, E.none); + }, + Ll = function(e) { + return !1 === vu.isRtl(Fl(e)); + }, + Ml = function(e, t, n) { + return Tl([Bl, Ol, Pl, Il], [e, t, n]).filter(Ll); + }, + Fl = function(e) { + return e.fold(y.identity, y.identity, y.identity, y.identity); + }, + zl = function(e) { + return e.fold( + y.constant("before"), + y.constant("start"), + y.constant("end"), + y.constant("after") + ); + }, + Ul = function(e) { + return e.fold(Al.before, Al.before, Al.after, Al.after); + }, + Vl = function(e, t, n, r, o, i) { + return hs( + [vu.findRootInline(t, n, r), vu.findRootInline(t, n, o)], + function(t, r) { + return t !== r && vu.hasSameParentBlock(n, t, r) + ? Al.after(e ? t : r) + : i; + } + ).getOr(i); + }, + Hl = function(e, t) { + return e.fold(y.constant(!0), function(e) { + return (r = t), !(zl((n = e)) === zl(r) && Fl(n) === Fl(r)); + var n, r; + }); + }, + ql = function(e, t) { + return e + ? t.fold( + y.compose( + E.some, + Al.start + ), + E.none, + y.compose( + E.some, + Al.after + ), + E.none + ) + : t.fold( + E.none, + y.compose( + E.some, + Al.before + ), + E.none, + y.compose( + E.some, + Al.end + ) + ); + }, + jl = function(e, t, n, r) { + var o = vu.normalizePosition(e, r), + i = Ml(t, n, o); + return Ml(t, n, o) + .bind(y.curry(ql, e)) + .orThunk(function() { + return ( + (o = e), + (a = t), + (s = n), + (u = i), + (c = r), + (l = vu.normalizePosition(o, c)), + Ws.fromPosition(o, s, l) + .map(y.curry(vu.normalizePosition, o)) + .fold( + function() { + return u.map(Ul); + }, + function(e) { + return Ml(a, s, e) + .map(y.curry(Vl, o, a, s, l, e)) + .filter(y.curry(Hl, u)); + } + ) + .filter(Ll) + ); + var o, a, s, u, c, l; + }); + }, + $l = Ml, + Wl = jl, + Kl = (y.curry(jl, !1), y.curry(jl, !0), Ul), + Xl = function(e) { + return e.fold(Al.start, Al.start, Al.end, Al.end); + }, + Yl = function(e) { + var t = e, + n = function() { + return t; + }; + return { + get: n, + set: function(e) { + t = e; + }, + clone: function() { + return Yl(n()); + } + }; + }, + Gl = function(e) { + return tr.isFunction(e.selection.getSel().modify); + }, + Jl = function(e, t, n) { + var r = e ? 1 : -1; + return ( + t.setRng(ia(n.container(), n.offset() + r).toRange()), + t.getSel().modify("move", e ? "forward" : "backward", "word"), + !0 + ); + }, + Ql = function(e, t) { + var n = t.selection.getRng(), + r = e ? ia.fromRangeEnd(n) : ia.fromRangeStart(n); + return ( + !!Gl(t) && + (e && mi.isBeforeInline(r) + ? Jl(!0, t.selection, r) + : !(e || !mi.isAfterInline(r)) && Jl(!1, t.selection, r)) + ); + }, + Zl = function(e, t) { + var n = e.dom.createRng(); + n.setStart(t.container(), t.offset()), + n.setEnd(t.container(), t.offset()), + e.selection.setRng(n); + }, + ef = function(e) { + return !1 !== e.settings.inline_boundaries; + }, + tf = function(e, t) { + e + ? t.setAttribute("data-mce-selected", "inline-boundary") + : t.removeAttribute("data-mce-selected"); + }, + nf = function(e, t, n) { + return Lc(t, n).map(function(t) { + return Zl(e, t), n; + }); + }, + rf = function(e, t, n) { + return function() { + return !!ef(t) && Ql(e, t); + }; + }, + of = { + move: function(e, t, n) { + return function() { + return ( + !!ef(e) && + ((r = e), + (o = t), + (i = n), + (a = r.getBody()), + (s = ia.fromRangeStart(r.selection.getRng())), + (u = y.curry(vu.isInlineTarget, r)), + Wl(i, u, a, s).bind(function(e) { + return nf(r, o, e); + })).isSome() + ); + var r, o, i, a, s, u; + }; + }, + moveNextWord: y.curry(rf, !0), + movePrevWord: y.curry(rf, !1), + setupSelectedState: function(e) { + var t = new Yl(null), + n = y.curry(vu.isInlineTarget, e); + return ( + e.on("NodeChange", function(r) { + var o, i, a, s, u; + ef(e) && + ((o = n), + (i = e.dom), + (a = r.parents), + (s = M.filter( + i.select('*[data-mce-selected="inline-boundary"]'), + o + )), + (u = M.filter(a, o)), + M.each(M.difference(s, u), y.curry(tf, !1)), + M.each(M.difference(u, s), y.curry(tf, !0)), + (function(e, t) { + if ( + e.selection.isCollapsed() && + !0 !== e.composing && + t.get() + ) { + var n = ia.fromRangeStart(e.selection.getRng()); + ia.isTextPosition(n) && + !1 === vu.isAtZwsp(n) && + (Zl(e, Oc.removeAndReposition(t.get(), n)), t.set(null)); + } + })(e, t), + (function(e, t, n, r) { + if (t.selection.isCollapsed()) { + var o = M.filter(r, e); + M.each(o, function(r) { + var o = ia.fromRangeStart(t.selection.getRng()); + $l(e, t.getBody(), o).bind(function(e) { + return nf(t, n, e); + }); + }); + } + })(n, e, t, r.parents)); + }), + t + ); + }, + setCaretPosition: Zl + }, + af = function(e, t) { + return function(n) { + return Lc(t, n) + .map(function(t) { + return of.setCaretPosition(e, t), !0; + }) + .getOr(!1); + }; + }, + sf = function(e, t, n, r) { + var o = e.getBody(), + i = y.curry(vu.isInlineTarget, e); + e.undoManager.ignore(function() { + var a, s, u; + e.selection.setRng( + ((a = n), + (s = r), + (u = document.createRange()).setStart(a.container(), a.offset()), + u.setEnd(s.container(), s.offset()), + u) + ), + e.execCommand("Delete"), + $l(i, o, ia.fromRangeStart(e.selection.getRng())) + .map(Xl) + .map(af(e, t)); + }), + e.nodeChanged(); + }, + uf = function(e, t, n, r) { + var o, + i, + a = ((o = e.getBody()), + (i = r.container()), + _a.getParentBlock(i, o) || o), + s = y.curry(vu.isInlineTarget, e), + u = $l(s, a, r); + return u + .bind(function(e) { + return n + ? e.fold( + y.constant(E.some(Xl(e))), + E.none, + y.constant(E.some(Kl(e))), + E.none + ) + : e.fold( + E.none, + y.constant(E.some(Kl(e))), + E.none, + y.constant(E.some(Xl(e))) + ); + }) + .map(af(e, t)) + .getOrThunk(function() { + var o = Ws.navigate(n, a, r), + i = o.bind(function(e) { + return $l(s, a, e); + }); + return u.isSome() && i.isSome() + ? vu + .findRootInline(s, a, r) + .map(function(t) { + return ( + (r = t), + !!hs( + [Ws.firstPositionIn(r), Ws.lastPositionIn(r)], + function(e, t) { + var n = vu.normalizePosition(!0, e), + o = vu.normalizePosition(!1, t); + return Ws.nextPosition(r, n) + .map(function(e) { + return e.isEqual(o); + }) + .getOr(!0); + } + ).getOr(!0) && (mc(e, n, Hn.fromDom(t)), !0) + ); + var r; + }) + .getOr(!1) + : i + .bind(function(i) { + return o.map(function(o) { + return n ? sf(e, t, r, o) : sf(e, t, o, r), !0; + }); + }) + .getOr(!1); + }); + }, + cf = function(e, t, n) { + if (e.selection.isCollapsed() && !1 !== e.settings.inline_boundaries) { + var r = ia.fromRangeStart(e.selection.getRng()); + return uf(e, t, n, r); + } + return !1; + }, + lf = xr("start", "end"), + ff = xr("rng", "table", "cells"), + df = Qu([{ removeTable: ["element"] }, { emptyCells: ["cells"] }]), + mf = function(e, t) { + return Eu(Hn.fromDom(e), "td,th", t); + }, + pf = function(e, t) { + return wu(e, "table", t); + }, + gf = function(e) { + return !1 === Dr.eq(e.start(), e.end()); + }, + hf = function(e, t) { + return ((n = e), + (r = t), + pf(n.start(), r).bind(function(e) { + return pf(n.end(), r).bind(function(t) { + return Dr.eq(e, t) ? E.some(e) : E.none(); + }); + })).bind(function(t) { + var n = Os(t, "td,th"); + return ff(e, t, n); + }); + var n, r; + }, + vf = function(e, t) { + var n, + r, + o = y.curry(Dr.eq, e); + return ((n = t), + (r = o), + hs([mf(n.startContainer, r), mf(n.endContainer, r)], lf).filter(gf)).map( + function(e) { + return hf(e, o); + } + ); + }, + yf = function(e, t) { + return M.findIndex(e, function(e) { + return Dr.eq(e, t); + }); + }, + bf = function(e) { + return ((t = e), + hs( + [yf(t.cells(), t.rng().start()), yf(t.cells(), t.rng().end())], + function(e, n) { + return t.cells().slice(e, n + 1); + } + )).bind(function(t) { + var n = e.cells(); + return t.length === n.length + ? df.removeTable(e.table()) + : df.emptyCells(t); + }); + var t; + }, + Cf = function(e, t) { + return vf(e, t).map(bf); + }, + xf = function(e) { + var t = []; + if (e) for (var n = 0; n < e.rangeCount; n++) t.push(e.getRangeAt(n)); + return t; + }, + wf = xf, + Nf = function(e) { + return M.bind(e, function(e) { + var t = Fi(e); + return t ? [Hn.fromDom(t)] : []; + }); + }, + Ef = function(e) { + return xf(e).length > 1; + }, + Sf = function(e) { + return M.filter(Nf(e), io.isTableCell); + }, + kf = function(e) { + return Os(e, "td[data-mce-selected],th[data-mce-selected]"); + }, + Tf = function(e, t) { + var n = kf(t), + r = Sf(e); + return n.length > 0 ? n : r; + }, + Af = Tf, + _f = function(e) { + return Tf(wf(e.selection.getSel()), Hn.fromDom(e.getBody())); + }, + Bf = function(e, t) { + return M.each(t, Is), e.selection.setCursorLocation(t[0].dom(), 0), !0; + }, + Rf = function(e, t) { + return mc(e, !1, t), !0; + }, + Df = function(e, t, n, r) { + return Pf(t, r) + .fold( + function() { + return ( + (r = e), + Cf(t, n).map(function(e) { + return e.fold(y.curry(Rf, r), y.curry(Bf, r)); + }) + ); + var r; + }, + function(t) { + return If(e, t); + } + ) + .getOr(!1); + }, + Of = function(e, t) { + return M.find(Uu(t, e), io.isTableCell); + }, + Pf = function(e, t) { + return M.find(Uu(t, e), function(e) { + return "caption" === Zn.name(e); + }); + }, + If = function(e, t) { + return Is(t), e.selection.setCursorLocation(t.dom(), 0), E.some(!0); + }, + Lf = function(e, t, n, r, o) { + return Ws.navigate(n, e.getBody(), o) + .bind(function(i) { + return ( + (u = r), + (c = n), + (l = o), + (f = i), + Ws.firstPositionIn(u.dom()) + .bind(function(e) { + return Ws.lastPositionIn(u.dom()).map(function(t) { + return c + ? l.isEqual(e) && f.isEqual(t) + : l.isEqual(t) && f.isEqual(e); + }); + }) + .getOr(!0) + ? If(e, r) + : ((a = r), + (s = i), + Pf(t, Hn.fromDom(s.getNode())).map(function(e) { + return !1 === Dr.eq(e, a); + })) + ); + var a, s, u, c, l, f; + }) + .or(E.some(!0)); + }, + Mf = function(e, t, n, r) { + var o = ia.fromRangeStart(e.selection.getRng()); + return Of(n, r).bind(function(r) { + return Ru(r) + ? If(e, r) + : ((i = e), + (a = n), + (s = t), + (u = r), + (c = o), + Ws.navigate(s, i.getBody(), c).bind(function(e) { + return Of(a, Hn.fromDom(e.getNode())).map(function(e) { + return !1 === Dr.eq(e, u); + }); + })); + var i, a, s, u, c; + }); + }, + Ff = function(e, t, n) { + var r = Hn.fromDom(e.getBody()); + return Pf(r, n) + .fold( + function() { + return Mf(e, t, r, n); + }, + function(n) { + return ( + (o = e), + (i = t), + (a = r), + (s = n), + (u = ia.fromRangeStart(o.selection.getRng())), + Ru(s) ? If(o, s) : Lf(o, a, i, s, u) + ); + var o, i, a, s, u; + } + ) + .getOr(!1); + }, + zf = function(e, t) { + var n, + r, + o, + i, + a, + s = Hn.fromDom(e.selection.getStart(!0)); + return e.selection.isCollapsed() + ? Ff(e, t, s) + : ((n = e), + (r = s), + (o = Hn.fromDom(n.getBody())), + (i = n.selection.getRng()), + 0 !== (a = _f(n)).length ? Bf(n, a) : Df(n, o, i, r)); + }, + Uf = function(e, t) { + e.getDoc().execCommand(t, !1, null); + }, + Vf = function(e) { + hc(e, !1) || + cf(e, !1) || + Ku(e, !1) || + zf(e) || + Ju(e, !1) || + (Uf(e, "Delete"), bu(e)); + }, + Hf = function(e) { + hc(e, !0) || + cf(e, !0) || + Ku(e, !0) || + zf(e) || + Ju(e, !0) || + Uf(e, "ForwardDelete"); + }, + qf = function(e, t) { + return ( + e && + t && + e.startContainer === t.startContainer && + e.startOffset === t.startOffset && + e.endContainer === t.endContainer && + e.endOffset === t.endOffset + ); + }, + jf = xr("container", "offset"), + $f = function(e, t, n) { + return ( + null !== + (function(e, t, n) { + for (; e && e !== t; ) { + if (n(e)) return e; + e = e.parentNode; + } + return null; + })(e, t, n) + ); + }, + Wf = function(e, t, n) { + return $f(e, t, function(e) { + return e.nodeName === n; + }); + }, + Kf = function(e) { + return e && "TABLE" === e.nodeName; + }, + Xf = function(e, t, n) { + for ( + var r = new to(t, e.getParent(t.parentNode, e.isBlock) || e.getRoot()); + (t = r[n ? "prev" : "next"]()); + + ) + if (vo.isBr(t)) return !0; + }, + Yf = function(e, t, n, r, o) { + var i, + a, + s, + u, + c, + l, + f = e.getRoot(), + d = e.schema.getNonEmptyElements(); + if ( + ((s = e.getParent(o.parentNode, e.isBlock) || f), + r && vo.isBr(o) && t && e.isEmpty(s)) + ) + return E.some(jf(o.parentNode, e.nodeIndex(o))); + for (i = new to(o, s); (u = i[r ? "prev" : "next"]()); ) { + if ( + "false" === e.getContentEditableParent(u) || + ((c = u), (l = f), mi.isCaretContainer(c) && !1 === $f(c, l, Nl)) + ) + return E.none(); + if (vo.isText(u) && u.nodeValue.length > 0) + return !1 === Wf(u, f, "A") + ? E.some(jf(u, r ? u.nodeValue.length : 0)) + : E.none(); + if (e.isBlock(u) || d[u.nodeName.toLowerCase()]) return E.none(); + a = u; + } + return n && a ? E.some(jf(a, 0)) : E.none(); + }, + Gf = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p = e.getRoot(), + g = !1; + if ( + ((o = r[(n ? "start" : "end") + "Container"]), + (i = r[(n ? "start" : "end") + "Offset"]), + (l = vo.isElement(o) && i === o.childNodes.length), + (u = e.schema.getNonEmptyElements()), + (c = n), + mi.isCaretContainer(o)) + ) + return E.none(); + if ( + (vo.isElement(o) && i > o.childNodes.length - 1 && (c = !1), + vo.isDocument(o) && ((o = p), (i = 0)), + o === p) + ) { + if (c && (s = o.childNodes[i > 0 ? i - 1 : 0])) { + if (mi.isCaretContainer(s)) return E.none(); + if (u[s.nodeName] || Kf(s)) return E.none(); + } + if (o.hasChildNodes()) { + if ( + ((i = Math.min(!c && i > 0 ? i - 1 : i, o.childNodes.length - 1)), + (o = o.childNodes[i]), + (i = vo.isText(o) && l ? o.data.length : 0), + !t && o === p.lastChild && Kf(o)) + ) + return E.none(); + if ( + (function(e, t) { + for (; t && t !== e; ) { + if (vo.isContentEditableFalse(t)) return !0; + t = t.parentNode; + } + return !1; + })(p, o) || + mi.isCaretContainer(o) + ) + return E.none(); + if (o.hasChildNodes() && !1 === Kf(o)) { + (s = o), (a = new to(o, p)); + do { + if (vo.isContentEditableFalse(s) || mi.isCaretContainer(s)) { + g = !1; + break; + } + if (vo.isText(s) && s.nodeValue.length > 0) { + (i = c ? 0 : s.nodeValue.length), (o = s), (g = !0); + break; + } + if ( + u[s.nodeName.toLowerCase()] && + (!(f = s) || !/^(TD|TH|CAPTION)$/.test(f.nodeName)) + ) { + (i = e.nodeIndex(s)), + (o = s.parentNode), + ("IMG" !== s.nodeName && "PRE" !== s.nodeName) || c || i++, + (g = !0); + break; + } + } while ((s = c ? a.next() : a.prev())); + } + } + } + return ( + t && + (vo.isText(o) && + 0 === i && + Yf(e, l, t, !0, o).each(function(e) { + (o = e.container()), (i = e.offset()), (g = !0); + }), + vo.isElement(o) && + ((s = o.childNodes[i]) || (s = o.childNodes[i - 1]), + !s || + !vo.isBr(s) || + ((m = "A"), + (d = s).previousSibling && d.previousSibling.nodeName === m) || + Xf(e, s, !1) || + Xf(e, s, !0) || + Yf(e, l, t, !0, s).each(function(e) { + (o = e.container()), (i = e.offset()), (g = !0); + }))), + c && + !t && + vo.isText(o) && + i === o.nodeValue.length && + Yf(e, l, t, !1, o).each(function(e) { + (o = e.container()), (i = e.offset()), (g = !0); + }), + g ? E.some(jf(o, i)) : E.none() + ); + }, + Jf = { + normalize: function(e, t) { + var n = t.collapsed, + r = t.cloneRange(); + return ( + Gf(e, n, !0, r).each(function(e) { + r.setStart(e.container(), e.offset()); + }), + n || + Gf(e, n, !1, r).each(function(e) { + r.setEnd(e.container(), e.offset()); + }), + n && r.collapse(!0), + qf(t, r) ? E.none() : E.some(r) + ); + } + }, + Qf = function(e, t, n) { + var r = e.create("span", {}, " "); + n.parentNode.insertBefore(r, n), t.scrollIntoView(r), e.remove(r); + }, + Zf = function(e, t, n, r) { + var o = e.createRng(); + r + ? (o.setStartBefore(n), o.setEndBefore(n)) + : (o.setStartAfter(n), o.setEndAfter(n)), + t.setRng(o); + }, + ed = function(e, t) { + var n, + r, + o = e.selection, + i = e.dom, + a = o.getRng(); + Jf.normalize(i, a).each(function(e) { + a.setStart(e.startContainer, e.startOffset), + a.setEnd(e.endContainer, e.endOffset); + }); + var s = a.startOffset, + u = a.startContainer; + if (1 === u.nodeType && u.hasChildNodes()) { + var c = s > u.childNodes.length - 1; + (u = u.childNodes[Math.min(s, u.childNodes.length - 1)] || u), + (s = c && 3 === u.nodeType ? u.nodeValue.length : 0); + } + var l = i.getParent(u, i.isBlock), + f = l ? i.getParent(l.parentNode, i.isBlock) : null, + d = f ? f.nodeName.toUpperCase() : "", + m = t && t.ctrlKey; + "LI" !== d || m || (l = f), + u && + 3 === u.nodeType && + s >= u.nodeValue.length && + ((function(e, t, n) { + for ( + var r, o = new to(t, n), i = e.getNonEmptyElements(); + (r = o.next()); + + ) + if (i[r.nodeName.toLowerCase()] || r.length > 0) return !0; + })(e.schema, u, l) || + ((n = i.create("br")), + a.insertNode(n), + a.setStartAfter(n), + a.setEndAfter(n), + (r = !0))), + (n = i.create("br")), + a.insertNode(n), + Qf(i, o, n), + Zf(i, o, n, r), + e.undoManager.add(); + }, + td = function(e, t) { + var n = Hn.fromTag("br"); + ks.before(Hn.fromDom(t), n), e.undoManager.add(); + }, + nd = function(e, t) { + rd(e.getBody(), t) || ks.after(Hn.fromDom(t), Hn.fromTag("br")); + var n = Hn.fromTag("br"); + ks.after(Hn.fromDom(t), n), + Qf(e.dom, e.selection, n.dom()), + Zf(e.dom, e.selection, n.dom(), !1), + e.undoManager.add(); + }, + rd = function(e, t) { + return ( + (n = ia.after(t)), + !!vo.isBr(n.getNode()) || + Ws.nextPosition(e, ia.after(t)) + .map(function(e) { + return vo.isBr(e.getNode()); + }) + .getOr(!1) + ); + var n; + }, + od = function(e) { + return e && "A" === e.nodeName && "href" in e; + }, + id = function(e) { + return e.fold(y.constant(!1), od, od, y.constant(!1)); + }, + ad = function(e, t) { + t.fold(y.noop, y.curry(td, e), y.curry(nd, e), y.noop); + }, + sd = function(e, t) { + var n, + r, + o, + i = ((n = e), + (r = y.curry(vu.isInlineTarget, n)), + (o = ia.fromRangeStart(n.selection.getRng())), + $l(r, n.getBody(), o).filter(id)); + i.isSome() ? i.each(y.curry(ad, e)) : ed(e, t); + }, + ud = Qu([ + { before: ["element"] }, + { on: ["element", "offset"] }, + { after: ["element"] } + ]), + cd = (ud.before, + ud.on, + ud.after, + function(e) { + return e.fold(y.identity, y.identity, y.identity); + }), + ld = Qu([ + { domRange: ["rng"] }, + { relative: ["startSitu", "finishSitu"] }, + { exact: ["start", "soffset", "finish", "foffset"] } + ]), + fd = xr("start", "soffset", "finish", "foffset"), + dd = { + domRange: ld.domRange, + relative: ld.relative, + exact: ld.exact, + exactFromRange: function(e) { + return ld.exact(e.start(), e.soffset(), e.finish(), e.foffset()); + }, + range: fd, + getWin: function(e) { + var t = e.match({ + domRange: function(e) { + return Hn.fromDom(e.startContainer); + }, + relative: function(e, t) { + return cd(e); + }, + exact: function(e, t, n, r) { + return e; + } + }); + return Ur.defaultView(t); + } + }, + md = Un.detect().browser, + pd = function(e, t) { + var n = Zn.isText(t) ? Ds(t).length : Ur.children(t).length + 1; + return e > n ? n : e < 0 ? 0 : e; + }, + gd = function(e) { + return dd.range( + e.start(), + pd(e.soffset(), e.start()), + e.finish(), + pd(e.foffset(), e.finish()) + ); + }, + hd = function(e, t) { + return Dr.contains(e, t) || Dr.eq(e, t); + }, + vd = function(e) { + return function(t) { + return hd(e, t.start()) && hd(e, t.finish()); + }; + }, + yd = function(e) { + return !0 === e.inline || md.isIE(); + }, + bd = function(e) { + return dd.range( + Hn.fromDom(e.startContainer), + e.startOffset, + Hn.fromDom(e.endContainer), + e.endOffset + ); + }, + Cd = function(e) { + var t = e.getSelection(); + return (t && 0 !== t.rangeCount ? E.from(t.getRangeAt(0)) : E.none()).map( + bd + ); + }, + xd = function(e) { + var t = Ur.defaultView(e); + return Cd(t.dom()).filter(vd(e)); + }, + wd = function(e, t) { + return E.from(t) + .filter(vd(e)) + .map(gd); + }, + Nd = function(e) { + var t = document.createRange(); + return ( + t.setStart(e.start().dom(), e.soffset()), + t.setEnd(e.finish().dom(), e.foffset()), + E.some(t) + ); + }, + Ed = function(e) { + return (e.bookmark ? e.bookmark : E.none()) + .bind(y.curry(wd, Hn.fromDom(e.getBody()))) + .bind(Nd); + }, + Sd = function(e) { + var t = yd(e) ? xd(Hn.fromDom(e.getBody())) : E.none(); + e.bookmark = t.isSome() ? t : e.bookmark; + }, + kd = function(e) { + Ed(e).each(function(t) { + e.selection.setRng(t); + }); + }, + Td = Ed, + Ad = Ot.each, + _d = Ot.extend, + Bd = Ot.map, + Rd = Ot.inArray, + Dd = Ot.explode, + Od = function(e) { + var t, + n, + r, + o, + i = { state: {}, exec: {}, value: {} }, + a = e.settings; + e.on("PreInit", function() { + (t = e.dom), (n = e.selection), (a = e.settings), (r = e.formatter); + }); + var s = function(t) { + var n; + if (!e.quirks.isHidden() && !e.removed) { + if (((t = t.toLowerCase()), (n = i.state[t]))) return n(t); + try { + return e.getDoc().queryCommandState(t); + } catch (r) {} + return !1; + } + }, + u = function(e, t) { + (t = t || "exec"), + Ad(e, function(e, n) { + Ad(n.toLowerCase().split(","), function(n) { + i[t][n] = e; + }); + }); + }; + _d(this, { + execCommand: function(t, n, r, o) { + var a, + s, + u = !1; + if (!e.removed) { + if ( + (/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test( + t + ) || + (o && o.skip_focus) + ? kd(e) + : e.focus(), + (o = e.fire("BeforeExecCommand", { + command: t, + ui: n, + value: r + })).isDefaultPrevented()) + ) + return !1; + if (((s = t.toLowerCase()), (a = i.exec[s]))) + return ( + a(s, n, r), + e.fire("ExecCommand", { command: t, ui: n, value: r }), + !0 + ); + if ( + (Ad(e.plugins, function(o) { + if (o.execCommand && o.execCommand(t, n, r)) + return ( + e.fire("ExecCommand", { command: t, ui: n, value: r }), + (u = !0), + !1 + ); + }), + u) + ) + return u; + if (e.theme && e.theme.execCommand && e.theme.execCommand(t, n, r)) + return e.fire("ExecCommand", { command: t, ui: n, value: r }), !0; + try { + u = e.getDoc().execCommand(t, n, r); + } catch (c) {} + return ( + !!u && + (e.fire("ExecCommand", { command: t, ui: n, value: r }), !0) + ); + } + }, + queryCommandState: s, + queryCommandValue: function(t) { + var n; + if (!e.quirks.isHidden() && !e.removed) { + if (((t = t.toLowerCase()), (n = i.value[t]))) return n(t); + try { + return e.getDoc().queryCommandValue(t); + } catch (r) {} + } + }, + queryCommandSupported: function(t) { + if (((t = t.toLowerCase()), i.exec[t])) return !0; + try { + return e.getDoc().queryCommandSupported(t); + } catch (n) {} + return !1; + }, + addCommands: u, + addCommand: function(t, n, r) { + (t = t.toLowerCase()), + (i.exec[t] = function(t, o, i, a) { + return n.call(r || e, o, i, a); + }); + }, + addQueryStateHandler: function(t, n, r) { + (t = t.toLowerCase()), + (i.state[t] = function() { + return n.call(r || e); + }); + }, + addQueryValueHandler: function(t, n, r) { + (t = t.toLowerCase()), + (i.value[t] = function() { + return n.call(r || e); + }); + }, + hasCustomCommand: function(e) { + return (e = e.toLowerCase()), !!i.exec[e]; + } + }); + var c = function(t, n, r) { + return ( + n === undefined && (n = !1), + r === undefined && (r = null), + e.getDoc().execCommand(t, n, r) + ); + }, + l = function(e) { + return r.match(e); + }, + f = function(t, n) { + r.toggle(t, n ? { value: n } : undefined), e.nodeChanged(); + }, + d = function(e) { + o = n.getBookmark(e); + }, + m = function() { + n.moveToBookmark(o); + }; + u({ + "mceResetDesignMode,mceBeginUndoLevel": function() {}, + "mceEndUndoLevel,mceAddUndoLevel": function() { + e.undoManager.add(); + }, + "Cut,Copy,Paste": function(t) { + var n, + r = e.getDoc(); + try { + c(t); + } catch (i) { + n = !0; + } + if ( + ("paste" !== t || r.queryCommandEnabled(t) || (n = !0), + n || !r.queryCommandSupported(t)) + ) { + var o = e.translate( + "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead." + ); + me.mac && (o = o.replace(/Ctrl\+/g, "\u2318+")), + e.notificationManager.open({ text: o, type: "error" }); + } + }, + unlink: function() { + if (n.isCollapsed()) { + var t = e.dom.getParent(e.selection.getStart(), "a"); + t && e.dom.remove(t, !0); + } else r.remove("link"); + }, + "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone": function( + e + ) { + var t = e.substring(7); + "full" === t && (t = "justify"), + Ad("left,center,right,justify".split(","), function(e) { + t !== e && r.remove("align" + e); + }), + "none" !== t && f("align" + t); + }, + "InsertUnorderedList,InsertOrderedList": function(e) { + var r, o; + c(e), + (r = t.getParent(n.getNode(), "ol,ul")) && + ((o = r.parentNode), + /^(H[1-6]|P|ADDRESS|PRE)$/.test(o.nodeName) && + (d(), t.split(o, r), m())); + }, + "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function( + e + ) { + f(e); + }, + "ForeColor,HiliteColor,FontName": function(e, t, n) { + f(e, n); + }, + FontSize: function(e, t, n) { + var r, o; + n >= 1 && + n <= 7 && + ((o = Dd(a.font_size_style_values)), + (n = (r = Dd(a.font_size_classes)) + ? r[n - 1] || n + : o[n - 1] || n)), + f(e, n); + }, + RemoveFormat: function(e) { + r.remove(e); + }, + mceBlockQuote: function() { + f("blockquote"); + }, + FormatBlock: function(e, t, n) { + return f(n || "p"); + }, + mceCleanup: function() { + var t = n.getBookmark(); + e.setContent(e.getContent({ cleanup: !0 }), { cleanup: !0 }), + n.moveToBookmark(t); + }, + mceRemoveNode: function(t, r, o) { + var i = o || n.getNode(); + i !== e.getBody() && (d(), e.dom.remove(i, !0), m()); + }, + mceSelectNodeDepth: function(r, o, i) { + var a = 0; + t.getParent( + n.getNode(), + function(e) { + if (1 === e.nodeType && a++ === i) return n.select(e), !1; + }, + e.getBody() + ); + }, + mceSelectNode: function(e, t, r) { + n.select(r); + }, + mceInsertContent: function(t, n, r) { + Js(e, r); + }, + mceInsertRawHTML: function(t, r, o) { + n.setContent("tiny_mce_marker"), + e.setContent( + e.getContent().replace(/tiny_mce_marker/g, function() { + return o; + }) + ); + }, + mceToggleFormat: function(e, t, n) { + f(n); + }, + mceSetContent: function(t, n, r) { + e.setContent(r); + }, + "Indent,Outdent": function(o) { + var i, u, l; + (i = a.indentation), + (u = /[a-z%]+$/i.exec(i)), + (i = parseInt(i, 10)), + s("InsertUnorderedList") || s("InsertOrderedList") + ? c(o) + : (a.forced_root_block || + t.getParent(n.getNode(), t.isBlock) || + r.apply("div"), + Ad(n.getSelectedBlocks(), function(n) { + if ( + "false" !== t.getContentEditable(n) && + "LI" !== n.nodeName + ) { + var r = e.getParam("indent_use_margin", !1) + ? "margin" + : "padding"; + (r = "TABLE" === n.nodeName ? "margin" : r), + (r += + "rtl" === t.getStyle(n, "direction", !0) + ? "Right" + : "Left"), + "outdent" === o + ? ((l = Math.max(0, parseInt(n.style[r] || 0, 10) - i)), + t.setStyle(n, r, l ? l + u : "")) + : ((l = parseInt(n.style[r] || 0, 10) + i + u), + t.setStyle(n, r, l)); + } + })); + }, + mceRepaint: function() {}, + InsertHorizontalRule: function() { + e.execCommand("mceInsertContent", !1, "
"); + }, + mceToggleVisualAid: function() { + (e.hasVisual = !e.hasVisual), e.addVisual(); + }, + mceReplaceContent: function(t, r, o) { + e.execCommand( + "mceInsertContent", + !1, + o.replace(/\{\$selection\}/g, n.getContent({ format: "text" })) + ); + }, + mceInsertLink: function(e, o, i) { + var a; + "string" == typeof i && (i = { href: i }), + (a = t.getParent(n.getNode(), "a")), + (i.href = i.href.replace(" ", "%20")), + (a && i.href) || r.remove("link"), + i.href && r.apply("link", i, a); + }, + selectAll: function() { + var e = t.getParent(n.getStart(), vo.isContentEditableTrue); + if (e) { + var r = t.createRng(); + r.selectNodeContents(e), n.setRng(r); + } + }, + delete: function() { + Vf(e); + }, + forwardDelete: function() { + Hf(e); + }, + mceNewDocument: function() { + e.setContent(""); + }, + InsertLineBreak: function(t, n, r) { + return sd(e, r), !0; + } + }), + u( + { + "JustifyLeft,JustifyCenter,JustifyRight,JustifyFull": function(e) { + var o = "align" + e.substring(7), + i = n.isCollapsed() + ? [t.getParent(n.getNode(), t.isBlock)] + : n.getSelectedBlocks(), + a = Bd(i, function(e) { + return !!r.matchNode(e, o); + }); + return -1 !== Rd(a, !0); + }, + "Bold,Italic,Underline,Strikethrough,Superscript,Subscript": function( + e + ) { + return l(e); + }, + mceBlockQuote: function() { + return l("blockquote"); + }, + Outdent: function() { + var e; + if (a.inline_styles) { + if ( + (e = t.getParent(n.getStart(), t.isBlock)) && + parseInt(e.style.paddingLeft, 10) > 0 + ) + return !0; + if ( + (e = t.getParent(n.getEnd(), t.isBlock)) && + parseInt(e.style.paddingLeft, 10) > 0 + ) + return !0; + } + return ( + s("InsertUnorderedList") || + s("InsertOrderedList") || + (!a.inline_styles && !!t.getParent(n.getNode(), "BLOCKQUOTE")) + ); + }, + "InsertUnorderedList,InsertOrderedList": function(e) { + var r = t.getParent(n.getNode(), "ul,ol"); + return ( + r && + (("insertunorderedlist" === e && "UL" === r.tagName) || + ("insertorderedlist" === e && "OL" === r.tagName)) + ); + } + }, + "state" + ), + u( + { + "FontSize,FontName": function(e) { + var r, + o = 0; + return ( + (r = t.getParent(n.getNode(), "span")) && + (o = + "fontsize" === e + ? r.style.fontSize + : r.style.fontFamily + .replace(/, /g, ",") + .replace(/[\'\"]/g, "") + .toLowerCase()), + o + ); + } + }, + "value" + ), + u({ + Undo: function() { + e.undoManager.undo(); + }, + Redo: function() { + e.undoManager.redo(); + } + }); + }, + Pd = Ot.makeMap( + "focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend", + " " + ), + Id = function(e) { + var t, + n, + r = this, + o = {}, + i = function() { + return !1; + }, + a = function() { + return !0; + }; + (t = (e = e || {}).scope || r), (n = e.toggleEvent || i); + var s = function(e, t, a, s) { + var u, c, l; + if ((!1 === t && (t = i), t)) + for ( + t = { func: t }, + s && Ot.extend(t, s), + l = (c = e.toLowerCase().split(" ")).length; + l--; + + ) + (e = c[l]), + (u = o[e]) || ((u = o[e] = []), n(e, !0)), + a ? u.unshift(t) : u.push(t); + return r; + }, + u = function(e, t) { + var i, a, s, u, c; + if (e) + for (i = (u = e.toLowerCase().split(" ")).length; i--; ) { + if (((e = u[i]), (a = o[e]), !e)) { + for (s in o) n(s, !1), delete o[s]; + return r; + } + if (a) { + if (t) + for (c = a.length; c--; ) + a[c].func === t && + ((a = a.slice(0, c).concat(a.slice(c + 1))), (o[e] = a)); + else a.length = 0; + a.length || (n(e, !1), delete o[e]); + } + } + else { + for (e in o) n(e, !1); + o = {}; + } + return r; + }; + (r.fire = function(n, r) { + var s, c, l, f; + if ( + ((n = n.toLowerCase()), + ((r = r || {}).type = n), + r.target || (r.target = t), + r.preventDefault || + ((r.preventDefault = function() { + r.isDefaultPrevented = a; + }), + (r.stopPropagation = function() { + r.isPropagationStopped = a; + }), + (r.stopImmediatePropagation = function() { + r.isImmediatePropagationStopped = a; + }), + (r.isDefaultPrevented = i), + (r.isPropagationStopped = i), + (r.isImmediatePropagationStopped = i)), + e.beforeFire && e.beforeFire(r), + (s = o[n])) + ) + for (c = 0, l = s.length; c < l; c++) { + if ( + ((f = s[c]).once && u(n, f.func), + r.isImmediatePropagationStopped()) + ) + return r.stopPropagation(), r; + if (!1 === f.func.call(t, r)) return r.preventDefault(), r; + } + return r; + }), + (r.on = s), + (r.off = u), + (r.once = function(e, t, n) { + return s(e, t, n, { once: !0 }); + }), + (r.has = function(e) { + return (e = e.toLowerCase()), !(!o[e] || 0 === o[e].length); + }); + }; + Id.isNative = function(e) { + return !!Pd[e.toLowerCase()]; + }; + var Ld, + Md = function(e) { + return ( + e._eventDispatcher || + (e._eventDispatcher = new Id({ + scope: e, + toggleEvent: function(t, n) { + Id.isNative(t) && + e.toggleNativeEvent && + e.toggleNativeEvent(t, n); + } + })), + e._eventDispatcher + ); + }, + Fd = { + fire: function(e, t, n) { + if (this.removed && "remove" !== e) return t; + if (((t = Md(this).fire(e, t, n)), !1 !== n && this.parent)) + for (var r = this.parent(); r && !t.isPropagationStopped(); ) + r.fire(e, t, !1), (r = r.parent()); + return t; + }, + on: function(e, t, n) { + return Md(this).on(e, t, n); + }, + off: function(e, t) { + return Md(this).off(e, t); + }, + once: function(e, t) { + return Md(this).once(e, t); + }, + hasEventListeners: function(e) { + return Md(this).has(e); + } + }, + zd = Xo.DOM, + Ud = function(e, t) { + return "selectionchange" === t + ? e.getDoc() + : !e.inline && + /^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t) + ? e.getDoc().documentElement + : e.settings.event_root + ? (e.eventRoot || (e.eventRoot = zd.select(e.settings.event_root)[0]), + e.eventRoot) + : e.getBody(); + }, + Vd = function(e, t) { + var n, + r, + o = function(e) { + return !e.hidden && !e.readonly; + }; + if ((e.delegates || (e.delegates = {}), !e.delegates[t] && !e.removed)) + if (((n = Ud(e, t)), e.settings.event_root)) { + if ( + (Ld || + ((Ld = {}), + e.editorManager.on("removeEditor", function() { + var t; + if (!e.editorManager.activeEditor && Ld) { + for (t in Ld) e.dom.unbind(Ud(e, t)); + Ld = null; + } + })), + Ld[t]) + ) + return; + (r = function(n) { + for ( + var r = n.target, i = e.editorManager.get(), a = i.length; + a--; + + ) { + var s = i[a].getBody(); + (s === r || zd.isChildOf(r, s)) && o(i[a]) && i[a].fire(t, n); + } + }), + (Ld[t] = r), + zd.bind(n, t, r); + } else + (r = function(n) { + o(e) && e.fire(t, n); + }), + zd.bind(n, t, r), + (e.delegates[t] = r); + }, + Hd = { + bindPendingEventDelegates: function() { + var e = this; + Ot.each(e._pendingNativeEvents, function(t) { + Vd(e, t); + }); + }, + toggleNativeEvent: function(e, t) { + var n = this; + "focus" !== e && + "blur" !== e && + (t + ? n.initialized + ? Vd(n, e) + : n._pendingNativeEvents + ? n._pendingNativeEvents.push(e) + : (n._pendingNativeEvents = [e]) + : n.initialized && + (n.dom.unbind(Ud(n, e), e, n.delegates[e]), + delete n.delegates[e])); + }, + unbindAllNativeEvents: function() { + var e, + t = this; + if (t.delegates) { + for (e in t.delegates) t.dom.unbind(Ud(t, e), e, t.delegates[e]); + delete t.delegates; + } + t.inline || + ((t.getBody().onload = null), + t.dom.unbind(t.getWin()), + t.dom.unbind(t.getDoc())), + t.dom.unbind(t.getBody()), + t.dom.unbind(t.getContainer()); + } + }, + qd = (Hd = Ot.extend({}, Fd, Hd)), + jd = function(e, t, n) { + try { + e.getDoc().execCommand(t, !1, n); + } catch (r) {} + }, + $d = function(e, t) { + var n, r, o; + e._clickBlocker && (e._clickBlocker.unbind(), (e._clickBlocker = null)), + t + ? ((e._clickBlocker = ((r = (n = e).getBody()), + (o = function(e) { + n.dom.getParents(e.target, "a").length > 0 && e.preventDefault(); + }), + n.dom.bind(r, "click", o), + { + unbind: function() { + n.dom.unbind(r, "click", o); + } + })), + e.selection.controlSelection.hideResizeRect(), + (e.readonly = !0), + (e.getBody().contentEditable = !1)) + : ((e.readonly = !1), + (e.getBody().contentEditable = !0), + jd(e, "StyleWithCSS", !1), + jd(e, "enableInlineTableEditing", !1), + jd(e, "enableObjectResizing", !1), + e.focus(), + e.nodeChanged()); + }, + Wd = function(e, t) { + var n = e.readonly ? "readonly" : "design"; + t !== n && + (e.initialized + ? $d(e, "readonly" === t) + : e.on("init", function() { + $d(e, "readonly" === t); + }), + e.fire("SwitchMode", { mode: t })); + }, + Kd = Ot.each, + Xd = Ot.explode, + Yd = { f9: 120, f10: 121, f11: 122 }, + Gd = Ot.makeMap("alt,ctrl,shift,meta,access"), + Jd = function(e) { + var t = {}, + n = [], + r = function(e) { + var t, + n, + r = {}; + for (n in (Kd(Xd(e, "+"), function(e) { + e in Gd + ? (r[e] = !0) + : /^[0-9]{2,}$/.test(e) + ? (r.keyCode = parseInt(e, 10)) + : ((r.charCode = e.charCodeAt(0)), + (r.keyCode = Yd[e] || e.toUpperCase().charCodeAt(0))); + }), + (t = [r.keyCode]), + Gd)) + r[n] ? t.push(n) : (r[n] = !1); + return ( + (r.id = t.join(",")), + r.access && ((r.alt = !0), me.mac ? (r.ctrl = !0) : (r.shift = !0)), + r.meta && (me.mac ? (r.meta = !0) : ((r.ctrl = !0), (r.meta = !1))), + r + ); + }, + o = function(t, n, o, i) { + var a; + return ( + ((a = Ot.map(Xd(t, ">"), r))[a.length - 1] = Ot.extend( + a[a.length - 1], + { func: o, scope: i || e } + )), + Ot.extend(a[0], { desc: e.translate(n), subpatterns: a.slice(1) }) + ); + }, + i = function(e, t) { + return ( + !!t && + t.ctrl === e.ctrlKey && + t.meta === e.metaKey && + t.alt === e.altKey && + t.shift === e.shiftKey && + !!( + e.keyCode === t.keyCode || + (e.charCode && e.charCode === t.charCode) + ) && + (e.preventDefault(), !0) + ); + }, + a = function(e) { + return e.func ? e.func.call(e.scope) : null; + }; + e.on("keyup keypress keydown", function(e) { + var r, o; + ((o = e).altKey || + o.ctrlKey || + o.metaKey || + ("keydown" === (r = e).type && + r.keyCode >= 112 && + r.keyCode <= 123)) && + !e.isDefaultPrevented() && + (Kd(t, function(t) { + if (i(e, t)) + return ( + (n = t.subpatterns.slice(0)), "keydown" === e.type && a(t), !0 + ); + }), + i(e, n[0]) && + (1 === n.length && "keydown" === e.type && a(n[0]), n.shift())); + }), + (this.add = function(n, r, i, a) { + var s; + return ( + (s = i), + "string" == typeof i + ? (i = function() { + e.execCommand(s, !1, null); + }) + : Ot.isArray(s) && + (i = function() { + e.execCommand(s[0], s[1], s[2]); + }), + Kd(Xd(Ot.trim(n.toLowerCase())), function(e) { + var n = o(e, r, i, a); + t[n.id] = n; + }), + !0 + ); + }), + (this.remove = function(e) { + var n = o(e); + return !!t[n.id] && (delete t[n.id], !0); + }); + }, + Qd = Ot.each, + Zd = function(e, t, n) { + var r, + o, + i, + a, + s = 1; + for ( + a = e.getShortEndedElements(), + (i = /<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g).lastIndex = r = n; + (o = i.exec(t)); + + ) { + if (((r = i.lastIndex), "/" === o[1])) s--; + else if (!o[1]) { + if (o[2] in a) continue; + s++; + } + if (0 === s) break; + } + return r; + }, + em = function(e, t) { + var n = this, + r = function() {}; + (e = e || {}), + (n.schema = t = t || Fo()), + !1 !== e.fix_self_closing && (e.fix_self_closing = !0), + Qd("comment cdata text start end pi doctype".split(" "), function(t) { + t && (n[t] = e[t] || r); + }), + (n.parse = function(n) { + var r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C, + x, + w, + N, + E, + S, + k, + T, + A, + _, + B, + R, + D = this, + O = 0, + P = [], + I = 0, + L = Ao.decode, + M = Ot.makeMap("src,href,data,background,formaction,poster"), + F = /((java|vb)script|mhtml):/i, + z = /^data:/i, + U = function(e) { + var t, n; + for (t = P.length; t-- && P[t].name !== e; ); + if (t >= 0) { + for (n = P.length - 1; n >= t; n--) + (e = P[n]).valid && D.end(e.name); + P.length = t; + } + }, + V = function(t, n, r, o, i) { + var s, u, c; + if ( + ((r = (n = n.toLowerCase()) in m ? n : L(r || o || i || "")), + g && + !l && + 0 == + (0 === (c = n).indexOf("data-") || + 0 === c.indexOf("aria-"))) + ) { + if (!(s = C[n]) && x) { + for (u = x.length; u-- && !(s = x[u]).pattern.test(n); ); + -1 === u && (s = null); + } + if (!s) return; + if (s.validValues && !(r in s.validValues)) return; + } + if (M[n] && !e.allow_script_urls) { + var f = r.replace(/[\s\u0000-\u001F]+/g, ""); + try { + f = decodeURIComponent(f); + } catch (d) { + f = unescape(f); + } + if (F.test(f)) return; + if ( + !e.allow_html_data_urls && + z.test(f) && + !/^data:image\//i.test(f) + ) + return; + } + (l && (n in M || 0 === n.indexOf("on"))) || + ((a.map[n] = r), a.push({ name: n, value: r })); + }; + for ( + T = new RegExp( + "<(?:(?:!--([\\w\\W]*?)--\x3e)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))", + "g" + ), + A = /([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g, + d = t.getShortEndedElements(), + k = e.self_closing_elements || t.getSelfClosingElements(), + m = t.getBoolAttrs(), + g = e.validate, + f = e.remove_internals, + R = e.fix_self_closing, + _ = t.getSpecialElements(), + S = n + ">"; + (r = T.exec(S)); + + ) { + if ( + (O < r.index && D.text(L(n.substr(O, r.index - O))), (o = r[6])) + ) + ":" === (o = o.toLowerCase()).charAt(0) && (o = o.substr(1)), + U(o); + else if ((o = r[7])) { + if (r.index + r[0].length > n.length) { + D.text(L(n.substr(r.index))), (O = r.index + r[0].length); + continue; + } + if ( + (":" === (o = o.toLowerCase()).charAt(0) && (o = o.substr(1)), + (p = o in d), + R && k[o] && P.length > 0 && P[P.length - 1].name === o && U(o), + !g || (h = t.getElementRule(o))) + ) { + if ( + ((v = !0), + g && ((C = h.attributes), (x = h.attributePatterns)), + (b = r[8]) + ? ((l = -1 !== b.indexOf("data-mce-type")) && f && (v = !1), + ((a = []).map = {}), + b.replace(A, V)) + : ((a = []).map = {}), + g && !l) + ) { + if ( + ((w = h.attributesRequired), + (N = h.attributesDefault), + (E = h.attributesForced), + h.removeEmptyAttrs && !a.length && (v = !1), + E) + ) + for (s = E.length; s--; ) + (c = (y = E[s]).name), + "{$uid}" === (B = y.value) && (B = "mce_" + I++), + (a.map[c] = B), + a.push({ name: c, value: B }); + if (N) + for (s = N.length; s--; ) + (c = (y = N[s]).name) in a.map || + ("{$uid}" === (B = y.value) && (B = "mce_" + I++), + (a.map[c] = B), + a.push({ name: c, value: B })); + if (w) { + for (s = w.length; s-- && !(w[s] in a.map); ); + -1 === s && (v = !1); + } + if ((y = a.map["data-mce-bogus"])) { + if ("all" === y) { + (O = Zd(t, n, T.lastIndex)), (T.lastIndex = O); + continue; + } + v = !1; + } + } + v && D.start(o, a, p); + } else v = !1; + if ((i = _[o])) { + (i.lastIndex = O = r.index + r[0].length), + (r = i.exec(n)) + ? (v && (u = n.substr(O, r.index - O)), + (O = r.index + r[0].length)) + : ((u = n.substr(O)), (O = n.length)), + v && (u.length > 0 && D.text(u, !0), D.end(o)), + (T.lastIndex = O); + continue; + } + p || + (b && b.indexOf("/") === b.length - 1 + ? v && D.end(o) + : P.push({ name: o, valid: v })); + } else + (o = r[1]) + ? (">" === o.charAt(0) && (o = " " + o), + e.allow_conditional_comments || + "[if" !== o.substr(0, 3).toLowerCase() || + (o = " " + o), + D.comment(o)) + : (o = r[2]) + ? D.cdata(o.replace(//g, "")) + : (o = r[3]) + ? D.doctype(o) + : (o = r[4]) && D.pi(o, r[5]); + O = r.index + r[0].length; + } + for ( + O < n.length && D.text(L(n.substr(O))), s = P.length - 1; + s >= 0; + s-- + ) + (o = P[s]).valid && D.end(o.name); + }); + }; + em.findEndTag = Zd; + var tm, + nm, + rm = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c, + l = t, + f = /<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g, + d = e.schema; + for ( + s = e.getTempAttrs(), + u = l, + c = new RegExp(["\\s?(" + s.join("|") + ')="[^"]+"'].join("|"), "gi"), + l = u.replace(c, ""), + a = d.getShortEndedElements(); + (i = f.exec(l)); + + ) + (r = f.lastIndex), + (o = i[0].length), + (n = a[i[1]] ? r : em.findEndTag(d, l, r)), + (l = l.substring(0, r - o) + l.substring(n)), + (f.lastIndex = r - o); + return l; + }, + om = function(e, t) { + return ii(rm(e, t)); + }, + im = rm, + am = function(e) { + var t = e !== undefined ? e.dom() : document; + return E.from(t.activeElement).map(Hn.fromDom); + }, + sm = function(e) { + var t = Ur.owner(e).dom(); + return e.dom() === t.activeElement; + }, + um = function(e) { + return am(Ur.owner(e)).filter(function(t) { + return e.dom().contains(t.dom()); + }); + }, + cm = function(e, t) { + return ((n = t), + n.collapsed + ? E.from(zi(n.startContainer, n.startOffset)).map(Hn.fromDom) + : E.none()).bind(function(t) { + return io.isTableSection(t) + ? E.some(t) + : !1 === Dr.contains(e, t) + ? E.some(e) + : E.none(); + }); + var n; + }, + lm = function(e, t) { + cm(Hn.fromDom(e.getBody()), t) + .bind(function(e) { + return Ws.firstPositionIn(e.dom()); + }) + .fold( + function() { + e.selection.normalize(); + }, + function(t) { + e.selection.setRng(t.toRange()); + } + ); + }, + fm = function(e) { + if (e.setActive) + try { + e.setActive(); + } catch (t) { + e.focus(); + } + else e.focus(); + }, + dm = function(e) { + var t, + n = e.getBody(); + return n && ((t = Hn.fromDom(n)), sm(t) || um(t).isSome()); + }, + mm = function(e) { + return e.inline + ? dm(e) + : (t = e).iframeElement && sm(Hn.fromDom(t.iframeElement)); + var t; + }, + pm = function(e) { + e.editorManager.setActive(e); + }, + gm = function(e, t) { + e.removed || + (t + ? pm(e) + : (function(e) { + var t, + n, + r, + o = e.selection, + i = e.settings.content_editable, + a = e.getBody(), + s = o.getRng(); + if ( + (e.quirks.refreshContentEditable(), + (n = e), + (r = o.getNode()), + (t = n.dom.getParent(r, function(e) { + return "true" === n.dom.getContentEditable(e); + })), + e.$.contains(a, t)) + ) + return fm(t), lm(e, s), void pm(e); + e.bookmark !== undefined && + !1 === mm(e) && + Td(e).each(function(t) { + e.selection.setRng(t), (s = t); + }), + i || (me.opera || fm(a), e.getWin().focus()), + (me.gecko || i) && (fm(a), lm(e, s)), + pm(e); + })(e)); + }, + hm = mm, + vm = function(e, t) { + return t.dom()[e]; + }, + ym = function(e, t) { + return parseInt(Cr(t, e), 10); + }, + bm = y.curry(vm, "clientWidth"), + Cm = y.curry(vm, "clientHeight"), + xm = y.curry(ym, "margin-top"), + wm = y.curry(ym, "margin-left"), + Nm = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m = Hn.fromDom(e.getBody()), + p = e.inline ? m : Ur.documentElement(m), + g = ((r = e.inline), + (i = t), + (a = n), + (s = (o = p).dom().getBoundingClientRect()), + { + x: i - (r ? s.left + o.dom().clientLeft + wm(o) : 0), + y: a - (r ? s.top + o.dom().clientTop + xm(o) : 0) + }); + return ( + (c = g.x), + (l = g.y), + (f = bm((u = p))), + (d = Cm(u)), + c >= 0 && l >= 0 && c <= f && l <= d + ); + }, + Em = function(e) { + var t, + n = e.inline ? e.getBody() : e.getContentAreaContainer(); + return ((t = n), E.from(t).map(Hn.fromDom)) + .map(function(e) { + return Dr.contains(Ur.owner(e), e); + }) + .getOr(!1); + }, + Sm = function(e) { + var t, + n = [], + r = function() { + var t, + n = e.theme; + return n && n.getNotificationManagerImpl + ? n.getNotificationManagerImpl() + : { + open: (t = function() { + throw new Error( + "Theme did not provide a NotificationManager implementation." + ); + }), + close: t, + reposition: t, + getArgs: t + }; + }, + o = function() { + n.length > 0 && r().reposition(n); + }, + i = function(e) { + M.findIndex(n, function(t) { + return t === e; + }).each(function(e) { + n.splice(e, 1); + }); + }, + a = function(t) { + if (!e.removed && Em(e)) + return M.find(n, function(e) { + return ( + (n = r().getArgs(e)), + (o = t), + !( + n.type !== o.type || + n.text !== o.text || + n.progressBar || + n.timeout || + o.progressBar || + o.timeout + ) + ); + var n, o; + }).getOrThunk(function() { + e.editorManager.setActive(e); + var a, + s = r().open(t, function() { + i(s), o(); + }); + return (a = s), n.push(a), o(), s; + }); + }; + return ( + (t = e).on("SkinLoaded", function() { + var e = t.settings.service_message; + e && a({ text: e, type: "warning", timeout: 0, icon: "" }); + }), + t.on("ResizeEditor ResizeWindow", function() { + ye.requestAnimationFrame(o); + }), + t.on("remove", function() { + M.each(n, function(e) { + r().close(e); + }); + }), + { + open: a, + close: function() { + E.from(n[0]).each(function(e) { + r().close(e), i(e), o(); + }); + }, + getNotifications: function() { + return n; + } + } + ); + }, + km = function(e) { + var t = [], + n = function() { + var t, + n = e.theme; + return n && n.getWindowManagerImpl + ? n.getWindowManagerImpl() + : { + open: (t = function() { + throw new Error( + "Theme did not provide a WindowManager implementation." + ); + }), + alert: t, + confirm: t, + close: t, + getParams: t, + setParams: t + }; + }, + r = function(e, t) { + return function() { + return t ? t.apply(e, arguments) : undefined; + }; + }, + o = function(n) { + var r; + t.push(n), (r = n), e.fire("OpenWindow", { win: r }); + }, + i = function(n) { + M.findIndex(t, function(e) { + return e === n; + }).each(function(r) { + var o; + t.splice(r, 1), + (o = n), + e.fire("CloseWindow", { win: o }), + 0 === t.length && e.focus(); + }); + }, + a = function() { + return E.from(t[t.length - 1]); + }; + return ( + e.on("remove", function() { + M.each(t.slice(0), function(e) { + n().close(e); + }); + }), + { + windows: t, + open: function(t, r) { + e.editorManager.setActive(e), Sd(e); + var a = n().open(t, r, i); + return o(a), a; + }, + alert: function(e, t, a) { + var s = n().alert(e, r(a || this, t), i); + o(s); + }, + confirm: function(e, t, a) { + var s = n().confirm(e, r(a || this, t), i); + o(s); + }, + close: function() { + a().each(function(e) { + n().close(e), i(e); + }); + }, + getParams: function() { + return a() + .map(n().getParams) + .getOr(null); + }, + setParams: function(e) { + a().each(function(t) { + n().setParams(t, e); + }); + }, + getWindows: function() { + return t; + } + } + ); + }, + Tm = ti.PluginManager, + Am = function(e, t) { + var n = (function(e, t) { + for (var n in Tm.urls) + if (Tm.urls[n] + "/plugin" + t + ".js" === e) return n; + return null; + })(t, e.suffix); + return n + ? "Failed to load plugin: " + n + " from url " + t + : "Failed to load plugin url: " + t; + }, + _m = function(e, t) { + e.notificationManager.open({ type: "error", text: t }); + }, + Bm = function(e, t) { + e._skinLoaded + ? _m(e, t) + : e.on("SkinLoaded", function() { + _m(e, t); + }); + }, + Rm = function(e, t) { + Bm(e, Am(e, t)); + }, + Dm = function(e, t) { + Bm(e, "Failed to upload image: " + t); + }, + Om = Bm, + Pm = function(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + var r = window.console; + r && (r.error ? r.error.apply(r, arguments) : r.log.apply(r, arguments)); + }, + Im = ti.PluginManager, + Lm = ti.ThemeManager, + Mm = function() { + return new (V("XMLHttpRequest"))(); + }, + Fm = function(e, t) { + var n = {}, + r = function(e, n, r, o) { + var i, a; + (i = new Mm()).open("POST", t.url), + (i.withCredentials = t.credentials), + (i.upload.onprogress = function(e) { + o((e.loaded / e.total) * 100); + }), + (i.onerror = function() { + r( + "Image upload failed due to a XHR Transport error. Code: " + + i.status + ); + }), + (i.onload = function() { + var e, o, a; + i.status < 200 || i.status >= 300 + ? r("HTTP Error: " + i.status) + : (e = JSON.parse(i.responseText)) && + "string" == typeof e.location + ? n( + ((o = t.basePath), + (a = e.location), + o ? o.replace(/\/$/, "") + "/" + a.replace(/^\//, "") : a) + ) + : r("Invalid JSON: " + i.responseText); + }), + (a = new FormData()).append("file", e.blob(), e.filename()), + i.send(a); + }, + o = function(e, t) { + return { url: t, blobInfo: e, status: !0 }; + }, + i = function(e, t) { + return { url: "", blobInfo: e, status: !1, error: t }; + }, + a = function(e, t) { + Ot.each(n[e], function(e) { + e(t); + }), + delete n[e]; + }, + s = function(r, s) { + return ( + (r = Ot.grep(r, function(t) { + return !e.isUploaded(t.blobUri()); + })), + pe.all( + Ot.map(r, function(r) { + return e.isPending(r.blobUri()) + ? ((f = r.blobUri()), + new pe(function(e) { + (n[f] = n[f] || []), n[f].push(e); + })) + : ((u = r), + (c = t.handler), + (l = s), + e.markPending(u.blobUri()), + new pe(function(t) { + var n; + try { + var r = function() { + n && n.close(); + }; + c( + u, + function(n) { + r(), + e.markUploaded(u.blobUri(), n), + a(u.blobUri(), o(u, n)), + t(o(u, n)); + }, + function(n) { + r(), + e.removeFailed(u.blobUri()), + a(u.blobUri(), i(u, n)), + t(i(u, n)); + }, + function(e) { + e < 0 || + e > 100 || + (n || (n = l()), n.progressBar.value(e)); + } + ); + } catch (s) { + t(i(u, s.message)); + } + })); + var u, c, l, f; + }) + ) + ); + }; + return ( + (t = Ot.extend({ credentials: !1, handler: r }, t)), + { + upload: function(e, n) { + return t.url || t.handler !== r + ? s(e, n) + : new pe(function(e) { + e([]); + }); + } + } + ); + }, + zm = function(e, t) { + return new (V("Blob"))(e, t); + }, + Um = function(e) { + return V("atob")(e); + }, + Vm = function(e) { + var t, n; + return ( + (e = decodeURIComponent(e).split(",")), + (n = /data:([^;]+)/.exec(e[0])) && (t = n[1]), + { type: t, data: e[1] } + ); + }, + Hm = function(e) { + return new pe(function(t) { + var n, r, o; + e = Vm(e); + try { + n = Um(e.data); + } catch (yC) { + return void t(new zm([])); + } + for ( + r = new function(e) { + return new (V("Uint8Array"))(e); + }(n.length), + o = 0; + o < r.length; + o++ + ) + r[o] = n.charCodeAt(o); + t(new zm([r], { type: e.type })); + }); + }, + qm = function(e) { + return 0 === e.indexOf("blob:") + ? ((t = e), + new pe(function(e, n) { + var r = function() { + n( + "Cannot convert " + + t + + " to Blob. Resource might not exist or is inaccessible." + ); + }; + try { + var o = new Mm(); + o.open("GET", t, !0), + (o.responseType = "blob"), + (o.onload = function() { + 200 === this.status ? e(this.response) : r(); + }), + (o.onerror = r), + o.send(); + } catch (i) { + r(); + } + })) + : 0 === e.indexOf("data:") + ? Hm(e) + : null; + var t; + }, + jm = function(e) { + return new pe(function(t) { + var n = new function() { + return new (V("FileReader"))(); + }(); + (n.onloadend = function() { + t(n.result); + }), + n.readAsDataURL(e); + }); + }, + $m = Vm, + Wm = 0, + Km = function(e) { + return (e || "blobid") + Wm++; + }, + Xm = function(e, t) { + var n = {}; + return { + findAll: function(r, o) { + var i, a, s; + return ( + o || (o = ji.constant(!0)), + (i = At.filter( + (s = r) ? s.getElementsByTagName("img") : [], + function(t) { + var n = t.src; + return ( + !!me.fileApi && + !t.hasAttribute("data-mce-bogus") && + !t.hasAttribute("data-mce-placeholder") && + !(!n || n === me.transparentSrc) && + (0 === n.indexOf("blob:") + ? !e.isUploaded(n) + : 0 === n.indexOf("data:") && o(t)) + ); + } + )), + (a = At.map(i, function(e) { + var r; + return n[e.src] + ? new pe(function(t) { + n[e.src].then(function(n) { + if ("string" == typeof n) return n; + t({ image: e, blobInfo: n.blobInfo }); + }); + }) + : ((r = new pe(function(n, r) { + var o, i, a, s, u, c; + (o = t), + (a = n), + (s = r), + 0 !== (i = e).src.indexOf("blob:") + ? ((u = $m(i.src).data), + (c = o.findFirst(function(e) { + return e.base64() === u; + })) + ? a({ image: i, blobInfo: c }) + : qm(i.src).then( + function(e) { + (c = o.create(Km(), e, u)), + o.add(c), + a({ image: i, blobInfo: c }); + }, + function(e) { + s(e); + } + )) + : (c = o.getByUri(i.src)) + ? a({ image: i, blobInfo: c }) + : qm(i.src).then( + function(e) { + jm(e).then(function(t) { + (u = $m(t).data), + (c = o.create(Km(), e, u)), + o.add(c), + a({ image: i, blobInfo: c }); + }); + }, + function(e) { + s(e); + } + ); + }) + .then(function(e) { + return delete n[e.image.src], e; + }) + ["catch"](function(t) { + return delete n[e.src], t; + })), + (n[e.src] = r), + r); + })), + pe.all(a) + ); + } + }; + }, + Ym = 0, + Gm = function(e) { + return ( + e + + Ym++ + + ((t = function() { + return Math.round(4294967295 * Math.random()).toString(36); + }), + "s" + new Date().getTime().toString(36) + t() + t() + t()) + ); + var t; + }, + Jm = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f = ((t = []), + (n = ji.constant), + (r = function(e) { + var t, r, o; + if (!e.blob || !e.base64) + throw new Error( + "blob and base64 representations of the image are required for BlobInfo to be created" + ); + return ( + (t = e.id || Gm("blobid")), + (r = e.name || t), + { + id: n(t), + name: n(r), + filename: n( + r + + "." + + ((o = e.blob.type), + { + "image/jpeg": "jpg", + "image/jpg": "jpg", + "image/gif": "gif", + "image/png": "png" + }[o.toLowerCase()] || "dat") + ), + blob: n(e.blob), + base64: n(e.base64), + blobUri: n(e.blobUri || q(e.blob)), + uri: n(e.uri) + } + ); + }), + { + create: function(e, t, n, o) { + return r( + "object" == typeof e ? e : { id: e, name: o, blob: t, base64: n } + ); + }, + add: function(e) { + o(e.id()) || t.push(e); + }, + get: (o = function(e) { + return i(function(t) { + return t.id() === e; + }); + }), + getByUri: function(e) { + return i(function(t) { + return t.blobUri() === e; + }); + }, + findFirst: (i = function(e) { + return At.filter(t, e)[0]; + }), + removeByUri: function(e) { + t = At.filter(t, function(t) { + return t.blobUri() !== e || (j(t.blobUri()), !1); + }); + }, + destroy: function() { + At.each(t, function(e) { + j(e.blobUri()); + }), + (t = []); + } + }), + d = e.settings, + m = ((u = {}), + (c = function(e, t) { + return { status: e, resultUri: t }; + }), + { + hasBlobUri: (l = function(e) { + return e in u; + }), + getResultUri: function(e) { + var t = u[e]; + return t ? t.resultUri : null; + }, + isPending: function(e) { + return !!l(e) && 1 === u[e].status; + }, + isUploaded: function(e) { + return !!l(e) && 2 === u[e].status; + }, + markPending: function(e) { + u[e] = c(1, null); + }, + markUploaded: function(e, t) { + u[e] = c(2, t); + }, + removeFailed: function(e) { + delete u[e]; + }, + destroy: function() { + u = {}; + } + }), + p = function(t) { + return function(n) { + return e.selection ? t(n) : []; + }; + }, + g = function(e, t, n) { + var r = 0; + do { + -1 !== (r = e.indexOf(t, r)) && + ((e = e.substring(0, r) + n + e.substr(r + t.length)), + (r += n.length - t.length + 1)); + } while (-1 !== r); + return e; + }, + h = function(e, t, n) { + return ( + (e = g(e, 'src="' + t + '"', 'src="' + n + '"')), + (e = g(e, 'data-mce-src="' + t + '"', 'data-mce-src="' + n + '"')) + ); + }, + v = function(t, n) { + At.each(e.undoManager.data, function(e) { + "fragmented" === e.type + ? (e.fragments = At.map(e.fragments, function(e) { + return h(e, t, n); + })) + : (e.content = h(e.content, t, n)); + }); + }, + y = function() { + return e.notificationManager.open({ + text: e.translate("Image uploading..."), + type: "info", + timeout: -1, + progressBar: !0 + }); + }, + b = function(t, n) { + f.removeByUri(t.src), + v(t.src, n), + e + .$(t) + .attr({ + src: d.images_reuse_filename + ? n + "?" + new Date().getTime() + : n, + "data-mce-src": e.convertURL(n, "src") + }); + }, + C = function(t) { + return ( + a || + (a = Fm(m, { + url: d.images_upload_url, + basePath: d.images_upload_base_path, + credentials: d.images_upload_credentials, + handler: d.images_upload_handler + })), + N().then( + p(function(n) { + var r; + return ( + (r = At.map(n, function(e) { + return e.blobInfo; + })), + a.upload(r, y).then( + p(function(r) { + var o = At.map(r, function(t, r) { + var o = n[r].image; + return ( + t.status && !1 !== e.settings.images_replace_blob_uris + ? b(o, t.url) + : t.error && Dm(e, t.error), + { element: o, status: t.status } + ); + }); + return t && t(o), o; + }) + ) + ); + }) + ) + ); + }, + x = function(e) { + if (!1 !== d.automatic_uploads) return C(e); + }, + w = function(e) { + return !d.images_dataimg_filter || d.images_dataimg_filter(e); + }, + N = function() { + return ( + s || (s = Xm(m, f)), + s.findAll(e.getBody(), w).then( + p(function(t) { + return ( + (t = At.filter(t, function(t) { + return "string" != typeof t || (Om(e, t), !1); + })), + At.each(t, function(e) { + v(e.image.src, e.blobInfo.blobUri()), + (e.image.src = e.blobInfo.blobUri()), + e.image.removeAttribute("data-mce-src"); + }), + t + ); + }) + ) + ); + }, + E = function(t) { + return t.replace(/src="(blob:[^"]+)"/g, function(t, n) { + var r = m.getResultUri(n); + if (r) return 'src="' + r + '"'; + var o = f.getByUri(n); + return ( + o || + (o = At.reduce( + e.editorManager.get(), + function(e, t) { + return ( + e || + (t.editorUpload && t.editorUpload.blobCache.getByUri(n)) + ); + }, + null + )), + o + ? 'src="data:' + o.blob().type + ";base64," + o.base64() + '"' + : t + ); + }); + }; + return ( + e.on("setContent", function() { + !1 !== e.settings.automatic_uploads ? x() : N(); + }), + e.on("RawSaveContent", function(e) { + e.content = E(e.content); + }), + e.on("getContent", function(e) { + e.source_view || "raw" === e.format || (e.content = E(e.content)); + }), + e.on("PostRender", function() { + e.parser.addNodeFilter("img", function(e) { + At.each(e, function(e) { + var t = e.attr("src"); + if (!f.getByUri(t)) { + var n = m.getResultUri(t); + n && e.attr("src", n); + } + }); + }); + }), + { + blobCache: f, + uploadImages: C, + uploadImagesAuto: x, + scanForImages: N, + destroy: function() { + f.destroy(), m.destroy(), (s = a = null); + } + } + ); + }, + Qm = function(e, t) { + return e.hasOwnProperty(t.nodeName); + }, + Zm = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d = e.settings, + m = e.dom, + p = e.selection, + g = e.schema, + h = g.getBlockElements(), + v = p.getStart(), + y = e.getBody(); + if ( + ((f = d.forced_root_block), + v && + vo.isElement(v) && + f && + ((l = y.nodeName.toLowerCase()), + g.isValidChild(l, f.toLowerCase()) && + ((b = h), + (C = y), + (x = v), + !M.exists(zu(Hn.fromDom(x), Hn.fromDom(C)), function(e) { + return Qm(b, e.dom()); + })))) + ) { + var b, C, x, w, N; + for ( + n = (t = p.getRng()).startContainer, + r = t.startOffset, + o = t.endContainer, + i = t.endOffset, + c = hm(e), + v = y.firstChild; + v; + + ) + if ( + ((w = h), + (N = v), + vo.isText(N) || + (vo.isElement(N) && !Qm(w, N) && !xs.isBookmarkNode(N))) + ) { + if (vo.isText(v) && 0 === v.nodeValue.length) { + (s = v), (v = v.nextSibling), m.remove(s); + continue; + } + a || + ((a = m.create(f, e.settings.forced_root_block_attrs)), + v.parentNode.insertBefore(a, v), + (u = !0)), + (s = v), + (v = v.nextSibling), + a.appendChild(s); + } else (a = null), (v = v.nextSibling); + u && + c && + (t.setStart(n, r), t.setEnd(o, i), p.setRng(t), e.nodeChanged()); + } + }, + ep = function(e) { + e.settings.forced_root_block && e.on("NodeChange", y.curry(Zm, e)); + }, + tp = function(e) { + var t, + n = []; + "onselectionchange" in e.getDoc() || + e.on("NodeChange Click MouseUp KeyUp Focus", function(n) { + var r, o; + (o = { + startContainer: (r = e.selection.getRng()).startContainer, + startOffset: r.startOffset, + endContainer: r.endContainer, + endOffset: r.endOffset + }), + ("nodechange" !== n.type && qf(o, t)) || e.fire("SelectionChange"), + (t = o); + }), + e.on("contextmenu", function() { + e.fire("SelectionChange"); + }), + e.on("SelectionChange", function() { + var t = e.selection.getStart(!0); + !t || + (!me.range && e.selection.isCollapsed()) || + (!(function(t) { + var r, o; + if ( + (o = e + .$(t) + .parentsUntil(e.getBody()) + .add(t)).length === n.length + ) { + for (r = o.length; r >= 0 && o[r] === n[r]; r--); + if (-1 === r) return (n = o), !0; + } + return (n = o), !1; + })(t) && + e.dom.isChildOf(t, e.getBody()) && + e.nodeChanged({ selectionChange: !0 })); + }), + e.on("MouseUp", function(t) { + t.isDefaultPrevented() || + ("IMG" === e.selection.getNode().nodeName + ? ye.setEditorTimeout(e, function() { + e.nodeChanged(); + }) + : e.nodeChanged()); + }), + (this.nodeChanged = function(t) { + var n, + r, + o, + i = e.selection; + e.initialized && + i && + !e.settings.disable_nodechange && + !e.readonly && + ((o = e.getBody()), + ((n = i.getStart(!0) || o).ownerDocument === e.getDoc() && + e.dom.isChildOf(n, o)) || + (n = o), + (r = []), + e.dom.getParent(n, function(e) { + if (e === o) return !0; + r.push(e); + }), + ((t = t || {}).element = n), + (t.parents = r), + e.fire("NodeChange", t)); + }); + }, + np = function(e) { + var t, n, r, o; + return ( + (o = e.getBoundingClientRect()), + (n = (t = e.ownerDocument).documentElement), + (r = t.defaultView), + { + top: o.top + r.pageYOffset - n.clientTop, + left: o.left + r.pageXOffset - n.clientLeft + } + ); + }, + rp = function(e, t) { + return ( + (n = (s = e).inline ? np(s.getBody()) : { left: 0, top: 0 }), + (a = (i = e).getBody()), + (r = i.inline + ? { left: a.scrollLeft, top: a.scrollTop } + : { left: 0, top: 0 }), + { + pageX: + (o = (function(e, t) { + if (t.target.ownerDocument !== e.getDoc()) { + var n = np(e.getContentAreaContainer()), + r = ((i = (o = e).getBody()), + (a = o.getDoc().documentElement), + (s = { left: i.scrollLeft, top: i.scrollTop }), + (u = { + left: i.scrollLeft || a.scrollLeft, + top: i.scrollTop || a.scrollTop + }), + o.inline ? s : u); + return { + left: t.pageX - n.left + r.left, + top: t.pageY - n.top + r.top + }; + } + var o, i, a, s, u; + return { left: t.pageX, top: t.pageY }; + })(e, t)).left - + n.left + + r.left, + pageY: o.top - n.top + r.top + } + ); + var n, r, o, i, a, s; + }, + op = vo.isContentEditableFalse, + ip = vo.isContentEditableTrue, + ap = function(e) { + e && e.parentNode && e.parentNode.removeChild(e); + }, + sp = function(e, t) { + return function(n) { + if (0 === n.button) { + var r = At.find(t.dom.getParents(n.target), ji.or(op, ip)); + if (((s = t.getBody()), op((u = r)) && u !== s)) { + var o = t.dom.getPos(r), + i = t.getBody(), + a = t.getDoc().documentElement; + (e.element = r), + (e.screenX = n.screenX), + (e.screenY = n.screenY), + (e.maxX = (t.inline ? i.scrollWidth : a.offsetWidth) - 2), + (e.maxY = (t.inline ? i.scrollHeight : a.offsetHeight) - 2), + (e.relX = n.pageX - o.x), + (e.relY = n.pageY - o.y), + (e.width = r.offsetWidth), + (e.height = r.offsetHeight), + (e.ghost = (function(e, t, n, r) { + var o = t.cloneNode(!0); + e.dom.setStyles(o, { width: n, height: r }), + e.dom.setAttrib(o, "data-mce-selected", null); + var i = e.dom.create("div", { + class: "mce-drag-container", + "data-mce-bogus": "all", + unselectable: "on", + contenteditable: "false" + }); + return ( + e.dom.setStyles(i, { + position: "absolute", + opacity: 0.5, + overflow: "hidden", + border: 0, + padding: 0, + margin: 0, + width: n, + height: r + }), + e.dom.setStyles(o, { margin: 0, boxSizing: "border-box" }), + i.appendChild(o), + i + ); + })(t, r, e.width, e.height)); + } + } + var s, u; + }; + }, + up = function(e, t) { + return function(n) { + if ( + e.dragging && + ((s = t), + (l = t.selection), + (f = l.getSel().getRangeAt(0).startContainer), + (u = 3 === f.nodeType ? f.parentNode : f), + (c = e.element), + u !== c && !s.dom.isChildOf(u, c) && !op(u)) + ) { + var r = ((i = e.element), + (a = i.cloneNode(!0)).removeAttribute("data-mce-selected"), + a), + o = t.fire("drop", { + targetClone: r, + clientX: n.clientX, + clientY: n.clientY + }); + o.isDefaultPrevented() || + ((r = o.targetClone), + t.undoManager.transact(function() { + ap(e.element), + t.insertContent(t.dom.getOuterHTML(r)), + t._selectionOverrides.hideFakeCaret(); + })); + } + var i, a, s, u, c, l, f; + cp(e); + }; + }, + cp = function(e) { + (e.dragging = !1), (e.element = null), ap(e.ghost); + }, + lp = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d = {}; + (t = Xo.DOM), + (a = document), + (n = sp(d, e)), + (s = d), + (u = e), + (c = ye.throttle(function(e, t) { + u._selectionOverrides.hideFakeCaret(), u.selection.placeCaretAt(e, t); + }, 0)), + (r = function(e) { + var t, + n, + r, + o, + i, + a, + l, + f, + d, + m, + p, + g, + h = Math.max( + Math.abs(e.screenX - s.screenX), + Math.abs(e.screenY - s.screenY) + ); + if (s.element && !s.dragging && h > 10) { + if (u.fire("dragstart", { target: s.element }).isDefaultPrevented()) + return; + (s.dragging = !0), u.focus(); + } + if (s.dragging) { + var v = ((p = s), + { pageX: (g = rp(u, e)).pageX - p.relX, pageY: g.pageY + 5 }); + (d = s.ghost), + (m = u.getBody()), + d.parentNode !== m && m.appendChild(d), + (t = s.ghost), + (n = v), + (r = s.width), + (o = s.height), + (i = s.maxX), + (a = s.maxY), + (l = 0), + (f = 0), + (t.style.left = n.pageX + "px"), + (t.style.top = n.pageY + "px"), + n.pageX + r > i && (l = n.pageX + r - i), + n.pageY + o > a && (f = n.pageY + o - a), + (t.style.width = r - l + "px"), + (t.style.height = o - f + "px"), + c(e.clientX, e.clientY); + } + }), + (o = up(d, e)), + (l = d), + (f = e), + (i = function() { + cp(l), l.dragging && f.fire("dragend"); + }), + e.on("mousedown", n), + e.on("mousemove", r), + e.on("mouseup", o), + t.bind(a, "mousemove", r), + t.bind(a, "mouseup", i), + e.on("remove", function() { + t.unbind(a, "mousemove", r), t.unbind(a, "mouseup", i); + }); + }, + fp = function(e) { + var t; + lp(e), + (t = e).on("drop", function(e) { + var n = + "undefined" != typeof e.clientX + ? t.getDoc().elementFromPoint(e.clientX, e.clientY) + : null; + (op(n) || op(t.dom.getContentEditableParent(n))) && + e.preventDefault(); + }); + }, + dp = vo.isContentEditableFalse, + mp = function(e, t) { + var n, + r, + o = null, + i = function() { + !(function() { + var t, n, r, o, i; + for ( + t = Qt("*[contentEditable=false]", e), o = 0; + o < t.length; + o++ + ) + (r = (n = t[o]).previousSibling), + mi.endsWithCaretContainer(r) && + (1 === (i = r.data).length + ? r.parentNode.removeChild(r) + : r.deleteData(i.length - 1, 1)), + (r = n.nextSibling), + mi.startsWithCaretContainer(r) && + (1 === (i = r.data).length + ? r.parentNode.removeChild(r) + : r.deleteData(0, 1)); + })(), + r && (Oc.remove(r), (r = null)), + o && (o.remove(), (o = null)), + clearInterval(n); + }, + a = function() { + n = ye.setInterval(function() { + e.ownerDocument.activeElement === e + ? Qt("div.mce-visual-caret", e).toggleClass( + "mce-visual-caret-hidden" + ) + : Qt("div.mce-visual-caret", e).addClass( + "mce-visual-caret-hidden" + ); + }, 500); + }; + return { + show: function(n, s) { + var u, c, l, f, d, m, p, g, h, v, y; + return ( + i(), + (l = s) && /^(TD|TH)$/i.test(l.nodeName) + ? null + : t(s) + ? ((r = mi.insertBlock("p", s, n)), + (d = n), + (y = Oi((f = s).getBoundingClientRect(), d)), + "BODY" === e.tagName + ? ((m = e.ownerDocument.documentElement), + (p = e.scrollLeft || m.scrollLeft), + (g = e.scrollTop || m.scrollTop)) + : ((v = e.getBoundingClientRect()), + (p = e.scrollLeft - v.left), + (g = e.scrollTop - v.top)), + (y.left += p), + (y.right += p), + (y.top += g), + (y.bottom += g), + (y.width = 1), + (h = f.offsetWidth - f.clientWidth) > 0 && + (d && (h *= -1), (y.left += h), (y.right += h)), + (u = y), + Qt(r).css("top", u.top), + (o = Qt( + '
' + ) + .css(u) + .appendTo(e)), + n && o.addClass("mce-visual-caret-before"), + a(), + (c = s.ownerDocument.createRange()).setStart(r, 0), + c.setEnd(r, 0), + c) + : ((r = mi.insertInline(s, n)), + (c = s.ownerDocument.createRange()), + dp(r.nextSibling) + ? (c.setStart(r, 0), c.setEnd(r, 0)) + : (c.setStart(r, 1), c.setEnd(r, 1)), + c) + ); + }, + hide: i, + getCss: function() { + return ".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"; + }, + destroy: function() { + ye.clearInterval(n); + } + }; + }, + pp = function(e) { + var t = function(t) { + return At.map(t, function(t) { + return ((t = Di(t)).node = e), t; + }); + }; + if (At.isArray(e)) + return At.reduce( + e, + function(e, t) { + return e.concat(pp(t)); + }, + [] + ); + if (vo.isElement(e)) return t(e.getClientRects()); + if (vo.isText(e)) { + var n = e.ownerDocument.createRange(); + return ( + n.setStart(e, 0), n.setEnd(e, e.data.length), t(n.getClientRects()) + ); + } + }, + gp = { getClientRects: pp }, + hp = vo.isContentEditableFalse, + vp = _a.findNode, + yp = ji.curry, + bp = function(e, t) { + return Math.abs(e.left - t); + }, + Cp = function(e, t) { + return Math.abs(e.right - t); + }, + xp = function(e, t) { + var n = function(e, t) { + return e >= t.left && e <= t.right; + }; + return At.reduce(e, function(e, r) { + var o, i; + return ( + (o = Math.min(bp(e, t), Cp(e, t))), + (i = Math.min(bp(r, t), Cp(r, t))), + n(t, r) ? r : n(t, e) ? e : i === o && hp(r.node) ? r : i < o ? r : e + ); + }); + }, + wp = function(e, t, n, r) { + for (; (r = vp(r, e, ki, t)); ) if (n(r)) return; + }, + Np = function(e, t) { + var n = [], + r = function(e, r) { + var o; + return ( + (o = At.filter(gp.getClientRects(r), function(n) { + return !e(n, t); + })), + (n = n.concat(o)), + 0 === o.length + ); + }; + return ( + n.push(t), wp(-1, e, yp(r, Ii), t.node), wp(1, e, yp(r, Li), t.node), n + ); + }, + Ep = xp, + Sp = function(e, t, n) { + var r, o, i, a, s; + return ( + (r = gp.getClientRects( + ((i = e), At.filter(At.toArray(i.getElementsByTagName("*")), hp)) + )), + (r = At.filter(r, function(e) { + return n >= e.top && n <= e.bottom; + })), + (o = xp(r, t)) && (o = xp(Np(e, o), t)) && hp(o.node) + ? ((s = t), { node: (a = o).node, before: bp(a, s) < Cp(a, s) }) + : null + ); + }, + kp = function(e, t, n) { + return ( + !n.collapsed && + M.foldl( + n.getClientRects(), + function(n, r) { + return n || Mi(r, e, t); + }, + !1 + ) + ); + }, + Tp = function(e, t) { + var n = null; + return { + cancel: function() { + null !== n && (clearTimeout(n), (n = null)); + }, + throttle: function() { + var r = arguments; + null === n && + (n = setTimeout(function() { + e.apply(null, r), (n = null), (r = null); + }, t)); + } + }; + }, + Ap = vo.isContentEditableTrue, + _p = vo.isContentEditableFalse, + Bp = function(e, t, n, r) { + return t._selectionOverrides.showCaret(e, n, r); + }, + Rp = function(e, t) { + var n, r; + return ( + (t = _a.normalizeRange(1, e.getBody(), t)), + (n = ia.fromRangeStart(t)), + _p(n.getNode()) + ? Bp(1, e, n.getNode(), !n.isAtEnd()) + : _p(n.getNode(!0)) + ? Bp(1, e, n.getNode(!0), !1) + : ((r = e.dom.getParent(n.getNode(), ji.or(_p, Ap))), + _p(r) ? Bp(1, e, r, !1) : null) + ); + }, + Dp = Bp, + Op = function(e, t) { + var n, r; + return e.fire("BeforeObjectSelected", { target: t }).isDefaultPrevented() + ? null + : ((r = (n = t).ownerDocument.createRange()).selectNode(n), r); + }, + Pp = Rp, + Ip = function(e, t) { + return (t && t.collapsed && Rp(e, t)) || t; + }, + Lp = function(e) { + var t = Tp(function() { + if (!e.removed) { + var t = Ip(e, e.selection.getRng()); + e.selection.setRng(t); + } + }, 0); + e.on("focus", function() { + t.throttle(); + }), + e.on("blur", function() { + t.cancel(); + }); + }, + Mp = { + BACKSPACE: 8, + DELETE: 46, + DOWN: 40, + ENTER: 13, + LEFT: 37, + RIGHT: 39, + SPACEBAR: 32, + TAB: 9, + UP: 38, + modifierPressed: function(e) { + return e.shiftKey || e.ctrlKey || e.altKey || this.metaKeyPressed(e); + }, + metaKeyPressed: function(e) { + return me.mac ? e.metaKey : e.ctrlKey && !e.altKey; + } + }, + Fp = vo.isContentEditableTrue, + zp = vo.isContentEditableFalse, + Up = _a.isAfterContentEditableFalse, + Vp = _a.isBeforeContentEditableFalse, + Hp = function(e) { + var t, + n, + r, + o = e.getBody(), + i = mp(e.getBody(), function(t) { + return e.dom.isBlock(t); + }), + a = "sel-" + e.dom.uniqueId(), + s = function(t) { + t && e.selection.setRng(t); + }, + u = function() { + return e.selection.getRng(); + }, + c = function(t, n) { + e.selection.scrollIntoView(t, n); + }, + l = function(t, n, r) { + return e + .fire("ShowCaret", { target: n, direction: t, before: r }) + .isDefaultPrevented() + ? null + : (c(n, -1 === t), i.show(r, n)); + }, + f = function(e, t) { + return ( + (t = _a.normalizeRange(e, o, t)), + -1 === e ? ia.fromRangeStart(t) : ia.fromRangeEnd(t) + ); + }, + d = function(e) { + return ( + mi.isCaretContainer(e) || + mi.startsWithCaretContainer(e) || + mi.endsWithCaretContainer(e) + ); + }, + m = function(e) { + return d(e.startContainer) || d(e.endContainer); + }, + p = function(n, r) { + var o, + i, + s, + u, + c, + d, + p, + g, + v, + y, + b = e.$, + C = e.dom; + if (!n) return null; + if (n.collapsed) { + if (!m(n)) + if (!1 === r) { + if (((g = f(-1, n)), zp(g.getNode(!0)))) + return l(-1, g.getNode(!0), !1); + if (zp(g.getNode())) return l(-1, g.getNode(), !g.isAtEnd()); + } else { + if (((g = f(1, n)), zp(g.getNode()))) + return l(1, g.getNode(), !g.isAtEnd()); + if (zp(g.getNode(!0))) return l(1, g.getNode(!0), !1); + } + return null; + } + return ( + (u = n.startContainer), + (c = n.startOffset), + (d = n.endOffset), + 3 === u.nodeType && + 0 === c && + zp(u.parentNode) && + ((u = u.parentNode), (c = C.nodeIndex(u)), (u = u.parentNode)), + 1 !== u.nodeType + ? null + : (d === c + 1 && (o = u.childNodes[c]), + zp(o) + ? ((v = y = o.cloneNode(!0)), + (p = e.fire("ObjectSelected", { + target: o, + targetClone: v + })).isDefaultPrevented() + ? null + : ((i = Nu(Hn.fromDom(e.getBody()), "#" + a).fold( + function() { + return b([]); + }, + function(e) { + return b([e.dom()]); + } + )), + (v = p.targetClone), + 0 === i.length && + (i = b( + '
' + ).attr("id", a)).appendTo(e.getBody()), + (n = e.dom.createRng()), + v === y && me.ie + ? (i + .empty() + .append( + '

\xa0

' + ) + .append(v), + n.setStartAfter(i[0].firstChild.firstChild), + n.setEndAfter(v)) + : (i + .empty() + .append("\xa0") + .append(v) + .append("\xa0"), + n.setStart(i[0].firstChild, 1), + n.setEnd(i[0].lastChild, 0)), + i.css({ top: C.getPos(o, e.getBody()).y }), + i[0].focus(), + (s = e.selection.getSel()).removeAllRanges(), + s.addRange(n), + M.each( + Os(Hn.fromDom(e.getBody()), "*[data-mce-selected]"), + function(e) { + dr.remove(e, "data-mce-selected"); + } + ), + o.setAttribute("data-mce-selected", "1"), + (t = o), + h(), + n)) + : null) + ); + }, + g = function() { + t && + (t.removeAttribute("data-mce-selected"), + Nu(Hn.fromDom(e.getBody()), "#" + a).each(Bs.remove), + (t = null)); + }, + h = function() { + i.hide(); + }; + return ( + me.ceFalse && + ((function() { + var n = function(t) { + for (var n = e.getBody(); t && t !== n; ) { + if (Fp(t) || zp(t)) return t; + t = t.parentNode; + } + return null; + }; + e.on("mouseup", function(t) { + var n = u(); + n.collapsed && Nm(e, t.clientX, t.clientY) && s(Pp(e, n)); + }), + e.on("click", function(t) { + var r; + (r = n(t.target)) && + (zp(r) && (t.preventDefault(), e.focus()), + Fp(r) && e.dom.isChildOf(r, e.selection.getNode()) && g()); + }), + e.on("blur NewBlock", function() { + g(); + }); + var r, + i, + c = function(t, n) { + var r, + o, + i = e.dom.getParent(t, e.dom.isBlock), + a = e.dom.getParent(n, e.dom.isBlock); + return ( + i && + ((r = i), + (o = a), + !( + e.dom.getParent(r, e.dom.isBlock) === + e.dom.getParent(o, e.dom.isBlock) + )) && + (function(e) { + var t = Ha(e); + if (!e.firstChild) return !1; + var n = ia.before(e.firstChild), + r = t.next(n); + return r && !Vp(r) && !Up(r); + })(i) + ); + }; + (i = !1), + (r = e).on("touchstart", function() { + i = !1; + }), + r.on("touchmove", function() { + i = !0; + }), + r.on("touchend", function(e) { + var t = n(e.target); + zp(t) && (i || (e.preventDefault(), p(Op(r, t)))); + }), + e.on("mousedown", function(t) { + var r; + if (!1 !== Nm(e, t.clientX, t.clientY)) + if ((r = n(t.target))) + zp(r) + ? (t.preventDefault(), p(Op(e, r))) + : (g(), + (Fp(r) && t.shiftKey) || + kp(t.clientX, t.clientY, e.selection.getRng()) || + e.selection.placeCaretAt(t.clientX, t.clientY)); + else { + g(), h(); + var i = Sp(o, t.clientX, t.clientY); + i && + (c(t.target, i.node) || + (t.preventDefault(), + e.getBody().focus(), + s(l(1, i.node, i.before)))); + } + }), + e.on("keypress", function(t) { + Mp.modifierPressed(t) || + (t.keyCode, zp(e.selection.getNode()) && t.preventDefault()); + }), + e.on("getSelectionRange", function(e) { + var n = e.range; + if (t) { + if (!t.parentNode) return void (t = null); + (n = n.cloneRange()).selectNode(t), (e.range = n); + } + }), + e.on("setSelectionRange", function(e) { + var t; + (t = p(e.range, e.forward)) && (e.range = t); + }), + e.on("AfterSetSelectionRange", function(t) { + var n, + r = t.range; + m(r) || h(), + (n = r.startContainer.parentNode), + e.dom.hasClass(n, "mce-offscreen-selection") || g(); + }), + e.on("copy", function(t) { + var n, + r = t.clipboardData; + if (!t.isDefaultPrevented() && t.clipboardData && !me.ie) { + var o = (n = e.dom.get(a)) + ? n.getElementsByTagName("*")[0] + : n; + o && + (t.preventDefault(), + r.clearData(), + r.setData("text/html", o.outerHTML), + r.setData("text/plain", o.outerText)); + } + }), + fp(e), + Lp(e); + })(), + (n = e.contentStyles), + (r = ".mce-content-body"), + n.push(i.getCss()), + n.push( + r + + " .mce-offscreen-selection {position: absolute;left: -9999999999px;max-width: 1000000px;}" + + r + + " *[contentEditable=false] {cursor: default;}" + + r + + " *[contentEditable=true] {cursor: text;}" + )), + { + showCaret: l, + showBlockCaretContainer: function(e) { + e.hasAttribute("data-mce-caret") && + (mi.showCaretContainerBlock(e), s(u()), c(e[0])); + }, + hideFakeCaret: h, + destroy: function() { + i.destroy(), (t = null); + } + } + ); + }, + qp = 0, + jp = 2, + $p = 1, + Wp = function(e, t) { + var n = e.length + t.length + 2, + r = new Array(n), + o = new Array(n), + i = function(n, r, o, a, u) { + var c = s(n, r, o, a); + if ( + null === c || + (c.start === r && c.diag === r - a) || + (c.end === n && c.diag === n - o) + ) + for (var l = n, f = o; l < r || f < a; ) + l < r && f < a && e[l] === t[f] + ? (u.push([0, e[l]]), ++l, ++f) + : r - n > a - o + ? (u.push([2, e[l]]), ++l) + : (u.push([1, t[f]]), ++f); + else { + i(n, c.start, o, c.start - c.diag, u); + for (var d = c.start; d < c.end; ++d) u.push([0, e[d]]); + i(c.end, r, c.end - c.diag, a, u); + } + }, + a = function(n, r, o, i) { + for (var a = n; a - r < i && a < o && e[a] === t[a - r]; ) ++a; + return { start: n, end: a, diag: r }; + }, + s = function(n, i, s, u) { + var c = i - n, + l = u - s; + if (0 === c || 0 === l) return null; + var f, + d, + m, + p, + g, + h = c - l, + v = l + c, + y = (v % 2 == 0 ? v : v + 1) / 2; + for (r[1 + y] = n, o[1 + y] = i + 1, f = 0; f <= y; ++f) { + for (d = -f; d <= f; d += 2) { + for ( + m = d + y, + d === -f || (d !== f && r[m - 1] < r[m + 1]) + ? (r[m] = r[m + 1]) + : (r[m] = r[m - 1] + 1), + g = (p = r[m]) - n + s - d; + p < i && g < u && e[p] === t[g]; + + ) + (r[m] = ++p), ++g; + if (h % 2 != 0 && h - f <= d && d <= h + f && o[m - h] <= r[m]) + return a(o[m - h], d + n - s, i, u); + } + for (d = h - f; d <= h + f; d += 2) { + for ( + m = d + y - h, + d === h - f || (d !== h + f && o[m + 1] <= o[m - 1]) + ? (o[m] = o[m + 1] - 1) + : (o[m] = o[m - 1]), + g = (p = o[m] - 1) - n + s - d; + p >= n && g >= s && e[p] === t[g]; + + ) + (o[m] = p--), g--; + if (h % 2 == 0 && -f <= d && d <= f && o[m] <= r[m + h]) + return a(o[m], d + n - s, i, u); + } + } + }, + u = []; + return i(0, e.length, 0, t.length, u), u; + }, + Kp = function(e) { + return 1 === e.nodeType + ? e.outerHTML + : 3 === e.nodeType + ? Ao.encodeRaw(e.data, !1) + : 8 === e.nodeType + ? "\x3c!--" + e.data + "--\x3e" + : ""; + }, + Xp = function(e, t, n) { + var r = (function(e) { + var t, n, r; + for ( + r = document.createElement("div"), + t = document.createDocumentFragment(), + e && (r.innerHTML = e); + (n = r.firstChild); + + ) + t.appendChild(n); + return t; + })(t); + if (e.hasChildNodes() && n < e.childNodes.length) { + var o = e.childNodes[n]; + o.parentNode.insertBefore(r, o); + } else e.appendChild(r); + }, + Yp = function(e) { + return At.filter(At.map(e.childNodes, Kp), function(e) { + return e.length > 0; + }); + }, + Gp = function(e, t) { + var n, + r, + o, + i = At.map(t.childNodes, Kp); + return ( + (n = Wp(i, e)), + (r = t), + (o = 0), + At.each(n, function(e) { + e[0] === qp + ? o++ + : e[0] === $p + ? (Xp(r, e[1], o), o++) + : e[0] === jp && + (function(e, t) { + if (e.hasChildNodes() && t < e.childNodes.length) { + var n = e.childNodes[t]; + n.parentNode.removeChild(n); + } + })(r, o); + }), + t + ); + }, + Jp = function(e) { + return { + type: "fragmented", + fragments: e, + content: "", + bookmark: null, + beforeBookmark: null + }; + }, + Qp = function(e) { + return { + type: "complete", + fragments: null, + content: e, + bookmark: null, + beforeBookmark: null + }; + }, + Zp = function(e) { + return "fragmented" === e.type ? e.fragments.join("") : e.content; + }, + eg = function(e) { + var t, n, r; + return ( + (t = Yp(e.getBody())), + -1 !== + (n = (r = M.bind(t, function(t) { + var n = im(e.serializer, t); + return n.length > 0 ? [n] : []; + })).join("")).indexOf("") + ? Jp(r) + : Qp(n) + ); + }, + tg = function(e, t, n) { + "fragmented" === t.type + ? Gp(t.fragments, e.getBody()) + : e.setContent(t.content, { format: "raw" }), + e.selection.moveToBookmark(n ? t.beforeBookmark : t.bookmark); + }, + ng = function(e, t) { + return !!e && !!t && Zp(e) === Zp(t); + }, + rg = function(e) { + var t, + n, + r = this, + o = 0, + i = [], + a = 0, + s = function() { + return 0 === a; + }, + u = function(e) { + s() && (r.typing = e); + }, + c = function(t) { + e.setDirty(t); + }, + l = function(e) { + u(!1), r.add({}, e); + }, + f = function() { + r.typing && (u(!1), r.add()); + }; + return ( + e.on("init", function() { + r.add(); + }), + e.on("BeforeExecCommand", function(e) { + var t = e.command; + "Undo" !== t && + "Redo" !== t && + "mceRepaint" !== t && + (f(), r.beforeChange()); + }), + e.on("ExecCommand", function(e) { + var t = e.command; + "Undo" !== t && "Redo" !== t && "mceRepaint" !== t && l(e); + }), + e.on("ObjectResizeStart Cut", function() { + r.beforeChange(); + }), + e.on("SaveContent ObjectResized blur", l), + e.on("DragEnd", l), + e.on("KeyUp", function(t) { + var o = t.keyCode; + t.isDefaultPrevented() || + (((o >= 33 && o <= 36) || + (o >= 37 && o <= 40) || + 45 === o || + t.ctrlKey) && + (l(), e.nodeChanged()), + (46 !== o && 8 !== o) || e.nodeChanged(), + n && + r.typing && + !1 === ng(eg(e), i[0]) && + (!1 === e.isDirty() && + (c(!0), e.fire("change", { level: i[0], lastLevel: null })), + e.fire("TypingUndo"), + (n = !1), + e.nodeChanged())); + }), + e.on("KeyDown", function(e) { + var t = e.keyCode; + if (!e.isDefaultPrevented()) + if ((t >= 33 && t <= 36) || (t >= 37 && t <= 40) || 45 === t) + r.typing && l(e); + else { + var o = (e.ctrlKey && !e.altKey) || e.metaKey; + !(t < 16 || t > 20) || + 224 === t || + 91 === t || + r.typing || + o || + (r.beforeChange(), u(!0), r.add({}, e), (n = !0)); + } + }), + e.on("MouseDown", function(e) { + r.typing && l(e); + }), + e.addShortcut("meta+z", "", "Undo"), + e.addShortcut("meta+y,meta+shift+z", "", "Redo"), + e.on("AddUndo Undo Redo ClearUndos", function(t) { + t.isDefaultPrevented() || e.nodeChanged(); + }), + (r = { + data: i, + typing: !1, + beforeChange: function() { + s() && (t = gs.getUndoBookmark(e.selection)); + }, + add: function(n, r) { + var a, + u, + l, + f = e.settings; + if ( + ((l = eg(e)), + (n = n || {}), + (n = Ot.extend(n, l)), + !1 === s() || e.removed) + ) + return null; + if ( + ((u = i[o]), + e + .fire("BeforeAddUndo", { + level: n, + lastLevel: u, + originalEvent: r + }) + .isDefaultPrevented()) + ) + return null; + if (u && ng(u, n)) return null; + if ( + (i[o] && (i[o].beforeBookmark = t), + f.custom_undo_redo_levels && i.length > f.custom_undo_redo_levels) + ) { + for (a = 0; a < i.length - 1; a++) i[a] = i[a + 1]; + i.length--, (o = i.length); + } + (n.bookmark = gs.getUndoBookmark(e.selection)), + o < i.length - 1 && (i.length = o + 1), + i.push(n), + (o = i.length - 1); + var d = { level: n, lastLevel: u, originalEvent: r }; + return ( + e.fire("AddUndo", d), o > 0 && (c(!0), e.fire("change", d)), n + ); + }, + undo: function() { + var t; + return ( + r.typing && (r.add(), (r.typing = !1), u(!1)), + o > 0 && + ((t = i[--o]), + tg(e, t, !0), + c(!0), + e.fire("undo", { level: t })), + t + ); + }, + redo: function() { + var t; + return ( + o < i.length - 1 && + ((t = i[++o]), + tg(e, t, !1), + c(!0), + e.fire("redo", { level: t })), + t + ); + }, + clear: function() { + (i = []), + (o = 0), + (r.typing = !1), + (r.data = i), + e.fire("ClearUndos"); + }, + hasUndo: function() { + return o > 0 || (r.typing && i[0] && !ng(eg(e), i[0])); + }, + hasRedo: function() { + return o < i.length - 1 && !r.typing; + }, + transact: function(e) { + return f(), r.beforeChange(), r.ignore(e), r.add(); + }, + ignore: function(e) { + try { + a++, e(); + } finally { + a--; + } + }, + extra: function(t, n) { + var a, s; + r.transact(t) && + ((s = i[o].bookmark), + (a = i[o - 1]), + tg(e, a, !0), + r.transact(n) && (i[o - 1].beforeBookmark = s)); + } + }) + ); + }, + og = {}, + ig = At.filter, + ag = At.each; + (nm = function(e) { + var t, + n, + r = e.selection.getRng(); + (t = vo.matchNodeNames("pre")), + r.collapsed || + ((n = e.selection.getSelectedBlocks()), + ag( + ig(ig(n, t), function(e) { + return ( + t(e.previousSibling) && -1 !== At.indexOf(n, e.previousSibling) + ); + }), + function(e) { + var t, n; + (t = e.previousSibling), + Qt((n = e)).remove(), + Qt(t) + .append("

") + .append(n.childNodes); + } + )); + }), + og[(tm = "pre")] || (og[tm] = []), + og[tm].push(nm); + var sg = function(e, t) { + ag(og[e], function(e) { + e(t); + }); + }, + ug = Ot.each, + cg = { + walk: function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c, + l = t.startContainer, + f = t.startOffset, + d = t.endContainer, + m = t.endOffset; + if ( + (c = e.select("td[data-mce-selected],th[data-mce-selected]")).length > + 0 + ) + ug(c, function(e) { + n([e]); + }); + else { + var p, + g, + h, + v = function(e) { + var t; + return ( + 3 === (t = e[0]).nodeType && + t === l && + f >= t.nodeValue.length && + e.splice(0, 1), + (t = e[e.length - 1]), + 0 === m && + e.length > 0 && + t === d && + 3 === t.nodeType && + e.splice(e.length - 1, 1), + e + ); + }, + y = function(e, t, n) { + for (var r = []; e && e !== n; e = e[t]) r.push(e); + return r; + }, + b = function(e, t) { + do { + if (e.parentNode === t) return e; + e = e.parentNode; + } while (e); + }, + C = function(e, t, r) { + var o = r ? "nextSibling" : "previousSibling"; + for (s = (a = e).parentNode; a && a !== t; a = s) + (s = a.parentNode), + (u = y(a === e ? a : a[o], o)).length && + (r || u.reverse(), n(v(u))); + }; + if ( + (1 === l.nodeType && l.hasChildNodes() && (l = l.childNodes[f]), + 1 === d.nodeType && + d.hasChildNodes() && + ((g = m), + (h = (p = d).childNodes), + --g > h.length - 1 ? (g = h.length - 1) : g < 0 && (g = 0), + (d = h[g] || p)), + l === d) + ) + return n(v([l])); + for (r = e.findCommonAncestor(l, d), a = l; a; a = a.parentNode) { + if (a === d) return C(l, r, !0); + if (a === r) break; + } + for (a = d; a; a = a.parentNode) { + if (a === l) return C(d, r); + if (a === r) break; + } + (o = b(l, r) || l), + (i = b(d, r) || d), + C(l, o, !0), + (u = y( + o === l ? o : o.nextSibling, + "nextSibling", + i === d ? i.nextSibling : i + )).length && n(v(u)), + C(d, i); + } + } + }, + lg = /^(src|href|style)$/, + fg = Ot.each, + dg = Uc.isEq, + mg = function(e) { + return /^(TH|TD)$/.test(e.nodeName); + }, + pg = function(e, t, n) { + var r, o, i; + return ( + (r = t[n ? "startContainer" : "endContainer"]), + (o = t[n ? "startOffset" : "endOffset"]), + vo.isElement(r) && + ((i = r.childNodes.length - 1), + !n && o && o--, + (r = r.childNodes[o > i ? i : o])), + vo.isText(r) && + n && + o >= r.nodeValue.length && + (r = new to(r, e.getBody()).next() || r), + vo.isText(r) && + !n && + 0 === o && + (r = new to(r, e.getBody()).prev() || r), + r + ); + }, + gg = function(e, t, n, r) { + var o = e.create(n, r); + return t.parentNode.insertBefore(o, t), o.appendChild(t), o; + }, + hg = function(e, t, n, r) { + return ( + !(t = Uc.getNonWhiteSpaceSibling(t, n, r)) || + "BR" === t.nodeName || + e.isBlock(t) + ); + }, + vg = function(e, t, n, r, o) { + var i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C = e.dom; + if ( + ((l = C), + !( + dg((f = r), (d = t).inline) || + dg(f, d.block) || + (d.selector ? vo.isElement(f) && l.is(f, d.selector) : void 0) || + ((u = r), (c = t), c.links && "A" === u.tagName) + )) + ) + return !1; + if ("all" !== t.remove) + for ( + fg(t.styles, function(e, i) { + (e = Uc.normalizeStyleValue(C, Uc.replaceVars(e, n), i)), + "number" == typeof i && ((i = e), (o = 0)), + (t.remove_similar || !o || dg(Uc.getStyle(C, o, i), e)) && + C.setStyle(r, i, ""), + (s = 1); + }), + s && + "" === C.getAttrib(r, "style") && + (r.removeAttribute("style"), r.removeAttribute("data-mce-style")), + fg(t.attributes, function(e, t) { + var i; + if ( + ((e = Uc.replaceVars(e, n)), + "number" == typeof t && ((t = e), (o = 0)), + !o || dg(C.getAttrib(o, t), e)) + ) { + if ( + "class" === t && + (e = C.getAttrib(r, t)) && + ((i = ""), + fg(e.split(/\s+/), function(e) { + /mce\-\w+/.test(e) && (i += (i ? " " : "") + e); + }), + i) + ) + return void C.setAttrib(r, t, i); + "class" === t && r.removeAttribute("className"), + lg.test(t) && r.removeAttribute("data-mce-" + t), + r.removeAttribute(t); + } + }), + fg(t.classes, function(e) { + (e = Uc.replaceVars(e, n)), + (o && !C.hasClass(o, e)) || C.removeClass(r, e); + }), + a = C.getAttribs(r), + i = 0; + i < a.length; + i++ + ) { + var x = a[i].nodeName; + if (0 !== x.indexOf("_") && 0 !== x.indexOf("data-")) return !1; + } + return "none" !== t.remove + ? ((m = e), + (g = t), + (v = (p = r).parentNode), + (y = m.dom), + (b = m.settings.forced_root_block), + g.block && + (b + ? v === y.getRoot() && + ((g.list_block && dg(p, g.list_block)) || + fg(Ot.grep(p.childNodes), function(e) { + Uc.isValid(m, b, e.nodeName.toLowerCase()) + ? h + ? h.appendChild(e) + : ((h = gg(y, e, b)), + y.setAttribs(h, m.settings.forced_root_block_attrs)) + : (h = 0); + })) + : y.isBlock(p) && + !y.isBlock(v) && + (hg(y, p, !1) || + hg(y, p.firstChild, !0, 1) || + p.insertBefore(y.create("br"), p.firstChild), + hg(y, p, !0) || + hg(y, p.lastChild, !1, 1) || + p.appendChild(y.create("br")))), + (g.selector && g.inline && !dg(g.inline, p)) || y.remove(p, 1), + !0) + : void 0; + }, + yg = vg, + bg = function(e, t, n, r, o) { + var i, + a, + s = e.formatter.get(t), + u = s[0], + c = !0, + l = e.dom, + f = e.selection, + d = function(r) { + var i, + a, + c, + l, + f, + d, + m = ((i = e), + (a = r), + (c = t), + (l = n), + (f = o), + fg(Uc.getParents(i.dom, a.parentNode).reverse(), function(e) { + var t; + d || + "_start" === e.id || + "_end" === e.id || + ((t = il.matchNode(i, e, c, l, f)) && + !1 !== t.split && + (d = e)); + }), + d); + return (function(e, t, n, r, o, i, a, s) { + var u, + c, + l, + f, + d, + m, + p = e.dom; + if (n) { + for ( + m = n.parentNode, u = r.parentNode; + u && u !== m; + u = u.parentNode + ) { + for (c = p.clone(u, !1), d = 0; d < t.length; d++) + if (vg(e, t[d], s, c, c)) { + c = 0; + break; + } + c && (l && c.appendChild(l), f || (f = c), (l = c)); + } + !i || (a.mixed && p.isBlock(n)) || (r = p.split(n, r)), + l && (o.parentNode.insertBefore(l, o), f.appendChild(o)); + } + return r; + })(e, s, m, r, r, !0, u, n); + }, + m = function(t) { + var r, o, i, a, f; + if ( + (vo.isElement(t) && + l.getContentEditable(t) && + ((a = c), (c = "true" === l.getContentEditable(t)), (f = !0)), + (r = Ot.grep(t.childNodes)), + c && !f) + ) + for (o = 0, i = s.length; o < i && !vg(e, s[o], n, t, t); o++); + if (u.deep && r.length) { + for (o = 0, i = r.length; o < i; o++) m(r[o]); + f && (c = a); + } + }, + p = function(e) { + var t = l.get(e ? "_start" : "_end"), + n = t[e ? "firstChild" : "lastChild"]; + return ( + xs.isBookmarkNode(n) && (n = n[e ? "firstChild" : "lastChild"]), + vo.isText(n) && + 0 === n.data.length && + (n = e + ? t.previousSibling || t.nextSibling + : t.nextSibling || t.previousSibling), + l.remove(t, !0), + n + ); + }, + g = function(t) { + var n, + r, + o = t.commonAncestorContainer; + if (((t = Qc(e, t, s, !0)), u.split)) { + if ((n = pg(e, t, !0)) !== (r = pg(e, t))) { + if ( + (/^(TR|TH|TD)$/.test(n.nodeName) && + n.firstChild && + (n = + "TR" === n.nodeName + ? n.firstChild.firstChild || n + : n.firstChild || n), + o && + /^T(HEAD|BODY|FOOT|R)$/.test(o.nodeName) && + mg(r) && + r.firstChild && + (r = r.firstChild || r), + l.isChildOf(n, r) && + n !== r && + !l.isBlock(r) && + !mg(n) && + !mg(r)) + ) + return ( + (n = gg(l, n, "span", { + id: "_start", + "data-mce-type": "bookmark" + })), + d(n), + void (n = p(!0)) + ); + (n = gg(l, n, "span", { + id: "_start", + "data-mce-type": "bookmark" + })), + (r = gg(l, r, "span", { + id: "_end", + "data-mce-type": "bookmark" + })), + d(n), + d(r), + (n = p(!0)), + (r = p()); + } else n = r = d(n); + (t.startContainer = n.parentNode ? n.parentNode : n), + (t.startOffset = l.nodeIndex(n)), + (t.endContainer = r.parentNode ? r.parentNode : r), + (t.endOffset = l.nodeIndex(r) + 1); + } + cg.walk(l, t, function(t) { + fg(t, function(t) { + m(t), + vo.isElement(t) && + "underline" === e.dom.getStyle(t, "text-decoration") && + t.parentNode && + "underline" === Uc.getTextDecoration(l, t.parentNode) && + vg( + e, + { + deep: !1, + exact: !0, + inline: "span", + styles: { textDecoration: "underline" } + }, + null, + t + ); + }); + }); + }; + if (r) + r.nodeType + ? ((a = l.createRng()).setStartBefore(r), a.setEndAfter(r), g(a)) + : g(r); + else if ("false" !== l.getContentEditable(f.getNode())) + f.isCollapsed() && + u.inline && + !l.select("td[data-mce-selected],th[data-mce-selected]").length + ? wl(e, t, n, o) + : ((i = f.getBookmark()), + g(f.getRng()), + f.moveToBookmark(i), + u.inline && + il.match(e, t, n, f.getStart()) && + Uc.moveStart(l, f, f.getRng()), + e.nodeChanged()); + else { + r = f.getNode(); + for ( + var h = 0, v = s.length; + h < v && (!s[h].ceFalseOverride || !vg(e, s[h], n, r, r)); + h++ + ); + } + }, + Cg = Ot.each, + xg = function(e) { + return ( + e && + 1 === e.nodeType && + !xs.isBookmarkNode(e) && + !Nl(e) && + !vo.isBogus(e) + ); + }, + wg = function(e, t) { + var n; + for (n = e; n; n = n[t]) { + if (3 === n.nodeType && 0 !== n.nodeValue.length) return e; + if (1 === n.nodeType && !xs.isBookmarkNode(n)) return n; + } + return e; + }, + Ng = function(e, t, n) { + var r, + o, + i = new Ns(e); + if ( + t && + n && + ((t = wg(t, "previousSibling")), + (n = wg(n, "nextSibling")), + i.compare(t, n)) + ) { + for (r = t.nextSibling; r && r !== n; ) + (o = r), (r = r.nextSibling), t.appendChild(o); + return ( + e.remove(n), + Ot.each(Ot.grep(n.childNodes), function(e) { + t.appendChild(e); + }), + t + ); + } + return n; + }, + Eg = function(e, t, n) { + Cg(e.childNodes, function(e) { + xg(e) && (t(e) && n(e), e.hasChildNodes() && Eg(e, t, n)); + }); + }, + Sg = function(e, t) { + return y.curry(function(t, n) { + return !(!n || !Uc.getStyle(e, n, t)); + }, t); + }, + kg = function(e, t, n) { + return y.curry( + function(t, n, r) { + e.setStyle(r, t, n), + "" === r.getAttribute("style") && r.removeAttribute("style"), + Tg(e, r); + }, + t, + n + ); + }, + Tg = function(e, t) { + "SPAN" === t.nodeName && 0 === e.getAttribs(t).length && e.remove(t, !0); + }, + Ag = function(e, t) { + var n; + 1 === t.nodeType && + t.parentNode && + 1 === t.parentNode.nodeType && + ((n = Uc.getTextDecoration(e, t.parentNode)), + e.getStyle(t, "color") && n + ? e.setStyle(t, "text-decoration", n) + : e.getStyle(t, "text-decoration") === n && + e.setStyle(t, "text-decoration", null)); + }, + _g = function(e, t, n, r) { + Cg(t, function(t) { + Cg(e.dom.select(t.inline, r), function(r) { + xg(r) && yg(e, t, n, r, t.exact ? r : null); + }), + (function(e, t, n) { + if (t.clear_child_styles) { + var r = t.links ? "*:not(a)" : "*"; + Cg(e.select(r, n), function(n) { + xg(n) && + Cg(t.styles, function(t, r) { + e.setStyle(n, r, ""); + }); + }); + } + })(e.dom, t, r); + }); + }, + Bg = function(e, t, n, r) { + (t.styles.color || t.styles.textDecoration) && + (Ot.walk(r, y.curry(Ag, e), "childNodes"), Ag(e, r)); + }, + Rg = function(e, t, n, r) { + t.styles && + t.styles.backgroundColor && + Eg( + r, + Sg(e, "fontSize"), + kg(e, "backgroundColor", Uc.replaceVars(t.styles.backgroundColor, n)) + ); + }, + Dg = function(e, t, n, r) { + ("sub" !== t.inline && "sup" !== t.inline) || + (Eg(r, Sg(e, "fontSize"), kg(e, "fontSize", "")), + e.remove(e.select("sup" === t.inline ? "sub" : "sup", r), !0)); + }, + Og = function(e, t, n, r) { + r && + !1 !== t.merge_siblings && + ((r = Ng(e, Uc.getNonWhiteSpaceSibling(r), r)), + (r = Ng(e, r, Uc.getNonWhiteSpaceSibling(r, !0)))); + }, + Pg = function(e, t, n, r, o) { + (il.matchNode(e, o.parentNode, n, r) && yg(e, t, r, o)) || + (t.merge_with_parents && + e.dom.getParent(o.parentNode, function(i) { + if (il.matchNode(e, i, n, r)) return yg(e, t, r, o), !0; + })); + }, + Ig = Ot.each, + Lg = function(e, t, n, r) { + var o, + i, + a = e.formatter.get(t), + s = a[0], + u = !r && e.selection.isCollapsed(), + c = e.dom, + l = e.selection, + f = function(e, t) { + if (((t = t || s), e)) { + if ( + (t.onformat && t.onformat(e, t, n, r), + Ig(t.styles, function(t, r) { + c.setStyle(e, r, Uc.replaceVars(t, n)); + }), + t.styles) + ) { + var o = c.getAttrib(e, "style"); + o && e.setAttribute("data-mce-style", o); + } + Ig(t.attributes, function(t, r) { + c.setAttrib(e, r, Uc.replaceVars(t, n)); + }), + Ig(t.classes, function(t) { + (t = Uc.replaceVars(t, n)), + c.hasClass(e, t) || c.addClass(e, t); + }); + } + }, + d = function(e, t) { + var n = !1; + return ( + !!s.selector && + (Ig(e, function(e) { + if (!("collapsed" in e && e.collapsed !== u)) + return c.is(t, e.selector) && !Nl(t) + ? (f(t, e), (n = !0), !1) + : void 0; + }), + n) + ); + }, + m = function(r, o, i, u) { + var c, + l, + m = [], + p = !0; + (c = s.inline || s.block), + (l = r.create(c)), + f(l), + cg.walk(r, o, function(o) { + var i, + g = function(o) { + var h, v, y, b; + if ( + ((b = p), + (h = o.nodeName.toLowerCase()), + (v = o.parentNode.nodeName.toLowerCase()), + 1 === o.nodeType && + r.getContentEditable(o) && + ((b = p), + (p = "true" === r.getContentEditable(o)), + (y = !0)), + Uc.isEq(h, "br")) + ) + return (i = 0), void (s.block && r.remove(o)); + if (s.wrapper && il.matchNode(e, o, t, n)) i = 0; + else { + if ( + p && + !y && + s.block && + !s.wrapper && + Uc.isTextBlock(e, h) && + Uc.isValid(e, v, c) + ) + return ( + (o = r.rename(o, c)), f(o), m.push(o), void (i = 0) + ); + if (s.selector) { + var C = d(a, o); + if (!s.inline || C) return void (i = 0); + } + !p || + y || + !Uc.isValid(e, c, h) || + !Uc.isValid(e, v, c) || + (!u && + 3 === o.nodeType && + 1 === o.nodeValue.length && + 65279 === o.nodeValue.charCodeAt(0)) || + Nl(o) || + (s.inline && r.isBlock(o)) + ? ((i = 0), + Ig(Ot.grep(o.childNodes), g), + y && (p = b), + (i = 0)) + : (i || + ((i = r.clone(l, !1)), + o.parentNode.insertBefore(i, o), + m.push(i)), + i.appendChild(o)); + } + }; + Ig(o, g); + }), + !0 === s.links && + Ig(m, function(e) { + var t = function(e) { + "A" === e.nodeName && f(e, s), Ig(Ot.grep(e.childNodes), t); + }; + t(e); + }), + Ig(m, function(o) { + var i, + u, + c, + l, + d, + p = function(e) { + var t = !1; + return ( + Ig(e.childNodes, function(e) { + if ( + (n = e) && + 1 === n.nodeType && + !xs.isBookmarkNode(n) && + !Nl(n) && + !vo.isBogus(n) + ) + return (t = e), !1; + var n; + }), + t + ); + }; + (u = 0), + Ig(o.childNodes, function(e) { + Uc.isWhiteSpaceNode(e) || xs.isBookmarkNode(e) || u++; + }), + (i = u), + (!(m.length > 1) && r.isBlock(o)) || 0 !== i + ? (s.inline || s.wrapper) && + (s.exact || + 1 !== i || + ((l = p((c = o))) && + !xs.isBookmarkNode(l) && + il.matchName(r, l, s) && + ((d = r.clone(l, !1)), + f(d), + r.replace(d, c, !0), + r.remove(l, 1)), + (o = d || c)), + _g(e, a, n, o), + Pg(e, s, t, n, o), + Rg(r, s, n, o), + Dg(r, s, n, o), + Og(r, s, n, o)) + : r.remove(o, 1); + }); + }; + if ("false" !== c.getContentEditable(l.getNode())) { + if (s) { + if (r) + r.nodeType + ? d(a, r) || + ((i = c.createRng()).setStartBefore(r), + i.setEndAfter(r), + m(c, Qc(e, i, a), 0, !0)) + : m(c, r, 0, !0); + else if ( + u && + s.inline && + !c.select("td[data-mce-selected],th[data-mce-selected]").length + ) + xl(e, t, n); + else { + var p = e.selection.getNode(); + e.settings.forced_root_block || + !a[0].defaultBlock || + c.getParent(p, c.isBlock) || + Lg(e, a[0].defaultBlock), + e.selection.setRng(Xs(e.selection.getRng())), + (o = l.getBookmark()), + m(c, Qc(e, l.getRng(), a)), + s.styles && Bg(c, s, n, p), + l.moveToBookmark(o), + Uc.moveStart(c, l, l.getRng()), + e.nodeChanged(); + } + sg(t, e); + } + } else { + r = l.getNode(); + for (var g = 0, h = a.length; g < h; g++) + if (a[g].ceFalseOverride && c.is(r, a[g].selector)) + return void f(r, a[g]); + } + }, + Mg = { applyFormat: Lg }, + Fg = Ot.each, + zg = function(e, t, n, r, o) { + var i, a, s, u, c, l, f, d; + null === t.get() && + ((a = e), + (s = {}), + (i = t).set({}), + a.on("NodeChange", function(e) { + var t = Uc.getParents(a.dom, e.element), + n = {}; + (t = Ot.grep(t, function(e) { + return 1 === e.nodeType && !e.getAttribute("data-mce-bogus"); + })), + Fg(i.get(), function(e, r) { + Fg(t, function(o) { + return a.formatter.matchNode(o, r, {}, e.similar) + ? (s[r] || + (Fg(e, function(e) { + e(!0, { node: o, format: r, parents: t }); + }), + (s[r] = e)), + (n[r] = e), + !1) + : !il.matchesUnInheritedFormatSelector(a, o, r) && void 0; + }); + }), + Fg(s, function(r, o) { + n[o] || + (delete s[o], + Fg(r, function(n) { + n(!1, { node: e.element, format: o, parents: t }); + })); + }); + })), + (c = n), + (l = r), + (f = o), + (d = (u = t).get()), + Fg(c.split(","), function(e) { + d[e] || ((d[e] = []), (d[e].similar = f)), d[e].push(l); + }), + u.set(d); + }, + Ug = function(e) { + var t = { + valigntop: [{ selector: "td,th", styles: { verticalAlign: "top" } }], + valignmiddle: [ + { selector: "td,th", styles: { verticalAlign: "middle" } } + ], + valignbottom: [ + { selector: "td,th", styles: { verticalAlign: "bottom" } } + ], + alignleft: [ + { + selector: "figure.image", + collapsed: !1, + classes: "align-left", + ceFalseOverride: !0, + preview: "font-family font-size" + }, + { + selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li", + styles: { textAlign: "left" }, + inherit: !1, + preview: !1, + defaultBlock: "div" + }, + { + selector: "img,table", + collapsed: !1, + styles: { float: "left" }, + preview: "font-family font-size" + } + ], + aligncenter: [ + { + selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li", + styles: { textAlign: "center" }, + inherit: !1, + preview: "font-family font-size", + defaultBlock: "div" + }, + { + selector: "figure.image", + collapsed: !1, + classes: "align-center", + ceFalseOverride: !0, + preview: "font-family font-size" + }, + { + selector: "img", + collapsed: !1, + styles: { + display: "block", + marginLeft: "auto", + marginRight: "auto" + }, + preview: !1 + }, + { + selector: "table", + collapsed: !1, + styles: { marginLeft: "auto", marginRight: "auto" }, + preview: "font-family font-size" + } + ], + alignright: [ + { + selector: "figure.image", + collapsed: !1, + classes: "align-right", + ceFalseOverride: !0, + preview: "font-family font-size" + }, + { + selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li", + styles: { textAlign: "right" }, + inherit: !1, + preview: "font-family font-size", + defaultBlock: "div" + }, + { + selector: "img,table", + collapsed: !1, + styles: { float: "right" }, + preview: "font-family font-size" + } + ], + alignjustify: [ + { + selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li", + styles: { textAlign: "justify" }, + inherit: !1, + defaultBlock: "div", + preview: "font-family font-size" + } + ], + bold: [ + { inline: "strong", remove: "all" }, + { inline: "span", styles: { fontWeight: "bold" } }, + { inline: "b", remove: "all" } + ], + italic: [ + { inline: "em", remove: "all" }, + { inline: "span", styles: { fontStyle: "italic" } }, + { inline: "i", remove: "all" } + ], + underline: [ + { + inline: "span", + styles: { textDecoration: "underline" }, + exact: !0 + }, + { inline: "u", remove: "all" } + ], + strikethrough: [ + { + inline: "span", + styles: { textDecoration: "line-through" }, + exact: !0 + }, + { inline: "strike", remove: "all" } + ], + forecolor: { + inline: "span", + styles: { color: "%value" }, + links: !0, + remove_similar: !0, + clear_child_styles: !0 + }, + hilitecolor: { + inline: "span", + styles: { backgroundColor: "%value" }, + links: !0, + remove_similar: !0, + clear_child_styles: !0 + }, + fontname: { + inline: "span", + styles: { fontFamily: "%value" }, + clear_child_styles: !0 + }, + fontsize: { + inline: "span", + styles: { fontSize: "%value" }, + clear_child_styles: !0 + }, + fontsize_class: { inline: "span", attributes: { class: "%value" } }, + blockquote: { block: "blockquote", wrapper: 1, remove: "all" }, + subscript: { inline: "sub" }, + superscript: { inline: "sup" }, + code: { inline: "code" }, + link: { + inline: "a", + selector: "a", + remove: "all", + split: !0, + deep: !0, + onmatch: function() { + return !0; + }, + onformat: function(t, n, r) { + Ot.each(r, function(n, r) { + e.setAttrib(t, r, n); + }); + } + }, + removeformat: [ + { + selector: + "b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins", + remove: "all", + split: !0, + expand: !1, + block_expand: !0, + deep: !0 + }, + { + selector: "span", + attributes: ["style", "class"], + remove: "empty", + split: !0, + expand: !1, + deep: !0 + }, + { + selector: "*", + attributes: ["style", "class"], + split: !1, + expand: !1, + deep: !0 + } + ] + }; + return ( + Ot.each( + "p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/), + function(e) { + t[e] = { block: e, remove: "all" }; + } + ), + t + ); + }, + Vg = Ot.each, + Hg = Xo.DOM, + qg = function(e, t) { + var n, + r, + o, + i = (t && t.schema) || Fo({}), + a = function(e) { + var t, n, o; + return ( + (r = + "string" == typeof e ? { name: e, classes: [], attrs: {} } : e), + (t = Hg.create(r.name)), + (n = t), + (o = r).classes.length && Hg.addClass(n, o.classes.join(" ")), + Hg.setAttribs(n, o.attrs), + t + ); + }, + s = function(e, t, n) { + var r, + o, + u, + c, + l, + f, + d, + m, + p = t.length > 0 && t[0], + g = p && p.name; + if ( + ((l = g), + (f = "string" != typeof (c = e) ? c.nodeName.toLowerCase() : c), + (d = i.getElementRule(f)), + (u = + !(!(m = d && d.parentsRequired) || !m.length) && + (l && -1 !== Ot.inArray(m, l) ? l : m[0]))) + ) + g === u ? ((o = t[0]), (t = t.slice(1))) : (o = u); + else if (p) (o = t[0]), (t = t.slice(1)); + else if (!n) return e; + return ( + o && (r = a(o)).appendChild(e), + n && + (r || (r = Hg.create("div")).appendChild(e), + Ot.each(n, function(t) { + var n = a(t); + r.insertBefore(n, e); + })), + s(r, t, o && o.siblings) + ); + }; + return e && e.length + ? ((r = e[0]), + (n = a(r)), + (o = Hg.create("div")).appendChild(s(n, e.slice(1), r.siblings)), + o) + : ""; + }, + jg = function(e) { + var t, + n = { classes: [], attrs: {} }; + return ( + "*" !== (e = n.selector = Ot.trim(e)) && + (t = e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g, function( + e, + t, + r, + o, + i + ) { + switch (t) { + case "#": + n.attrs.id = r; + break; + case ".": + n.classes.push(r); + break; + case ":": + -1 !== + Ot.inArray( + "checked disabled enabled read-only required".split(" "), + r + ) && (n.attrs[r] = r); + } + if ("[" === o) { + var a = i.match(/([\w\-]+)(?:\=\"([^\"]+))?/); + a && (n.attrs[a[1]] = a[2]); + } + return ""; + })), + (n.name = t || "div"), + n + ); + }, + $g = function(e) { + return e && "string" == typeof e + ? ((e = (e = e.split(/\s*,\s*/)[0]).replace( + /\s*(~\+|~|\+|>)\s*/g, + "$1" + )), + Ot.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/), function(e) { + var t = Ot.map(e.split(/(?:~\+|~|\+)/), jg), + n = t.pop(); + return t.length && (n.siblings = t), n; + }).reverse()) + : []; + }, + Wg = function(e, t) { + var n, + r, + o, + i, + a, + s, + u = ""; + if (!1 === (s = e.settings.preview_styles)) return ""; + "string" != typeof s && + (s = + "font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"); + var c = function(e) { + return e.replace(/%(\w+)/g, ""); + }; + if ("string" == typeof t) { + if (!(t = e.formatter.get(t))) return; + t = t[0]; + } + return "preview" in t && !1 === (s = t.preview) + ? "" + : ((n = t.block || t.inline || "span"), + (i = $g(t.selector)).length + ? (i[0].name || (i[0].name = n), (n = t.selector), (r = qg(i, e))) + : (r = qg([n], e)), + (o = Hg.select(n, r)[0] || r.firstChild), + Vg(t.styles, function(e, t) { + (e = c(e)) && Hg.setStyle(o, t, e); + }), + Vg(t.attributes, function(e, t) { + (e = c(e)) && Hg.setAttrib(o, t, e); + }), + Vg(t.classes, function(e) { + (e = c(e)), Hg.hasClass(o, e) || Hg.addClass(o, e); + }), + e.fire("PreviewFormats"), + Hg.setStyles(r, { position: "absolute", left: -65535 }), + e.getBody().appendChild(r), + (a = Hg.getStyle(e.getBody(), "fontSize", !0)), + (a = /px$/.test(a) ? parseInt(a, 10) : 0), + Vg(s.split(" "), function(t) { + var n = Hg.getStyle(o, t, !0); + if ( + !( + ("background-color" === t && + /transparent|rgba\s*\([^)]+,\s*0\)/.test(n) && + ((n = Hg.getStyle(e.getBody(), t, !0)), + "#ffffff" === Hg.toHex(n).toLowerCase())) || + ("color" === t && "#000000" === Hg.toHex(n).toLowerCase()) + ) + ) { + if ("font-size" === t && /em|%$/.test(n)) { + if (0 === a) return; + n = (n = parseFloat(n) / (/%$/.test(n) ? 100 : 1)) * a + "px"; + } + "border" === t && n && (u += "padding:0 2px;"), + (u += t + ":" + n + ";"); + } + }), + e.fire("AfterPreviewFormats"), + Hg.remove(r), + u); + }, + Kg = function(e, t, n, r, o) { + var i = t.get(n); + !il.match(e, n, r, o) || ("toggle" in i[0] && !i[0].toggle) + ? Mg.applyFormat(e, n, r, o) + : bg(e, n, r, o); + }, + Xg = function(e) { + e.addShortcut("meta+b", "", "Bold"), + e.addShortcut("meta+i", "", "Italic"), + e.addShortcut("meta+u", "", "Underline"); + for (var t = 1; t <= 6; t++) + e.addShortcut("access+" + t, "", ["FormatBlock", !1, "h" + t]); + e.addShortcut("access+7", "", ["FormatBlock", !1, "p"]), + e.addShortcut("access+8", "", ["FormatBlock", !1, "div"]), + e.addShortcut("access+9", "", ["FormatBlock", !1, "address"]); + }, + Yg = function(e) { + var t, + n, + r, + o = ((n = {}), + (r = function(e, t) { + e && + ("string" != typeof e + ? Ot.each(e, function(e, t) { + r(t, e); + }) + : ((t = t.length ? t : [t]), + Ot.each(t, function(e) { + "undefined" == typeof e.deep && (e.deep = !e.selector), + "undefined" == typeof e.split && + (e.split = !e.selector || e.inline), + "undefined" == typeof e.remove && + e.selector && + !e.inline && + (e.remove = "none"), + e.selector && + e.inline && + ((e.mixed = !0), (e.block_expand = !0)), + "string" == typeof e.classes && + (e.classes = e.classes.split(/\s+/)); + }), + (n[e] = t))); + })(Ug((t = e).dom)), + r(t.settings.formats), + { + get: function(e) { + return e ? n[e] : n; + }, + register: r, + unregister: function(e) { + return e && n[e] && delete n[e], n; + } + }), + i = Yl(null); + return ( + Xg(e), + Cl(e), + { + get: o.get, + register: o.register, + unregister: o.unregister, + apply: y.curry(Mg.applyFormat, e), + remove: y.curry(bg, e), + toggle: y.curry(Kg, e, o), + match: y.curry(il.match, e), + matchAll: y.curry(il.matchAll, e), + matchNode: y.curry(il.matchNode, e), + canApply: y.curry(il.canApply, e), + formatChanged: y.curry(zg, e, i), + getCssText: y.curry(Wg, e) + } + ); + }, + Gg = function(e) { + return function() { + for (var t = new Array(arguments.length), n = 0; n < t.length; n++) + t[n] = arguments[n]; + if (0 === t.length) throw new Error("Can't merge zero objects"); + for (var r = {}, o = 0; o < t.length; o++) { + var i = t[o]; + for (var a in i) i.hasOwnProperty(a) && (r[a] = e(r[a], i[a])); + } + return r; + }; + }, + Jg = Gg(function(e, t) { + return tr.isObject(e) && tr.isObject(t) ? Jg(e, t) : t; + }), + Qg = Gg(function(e, t) { + return t; + }), + Zg = { deepMerge: Jg, merge: Qg }, + eh = function(e, t) { + return e.fire("PreProcess", t); + }, + th = function(e, t) { + return e.fire("PostProcess", t); + }, + nh = function(e, t, n) { + e.addAttributeFilter("data-mce-tabindex", function(e, t) { + for (var n, r = e.length; r--; ) + (n = e[r]).attr("tabindex", n.attributes.map["data-mce-tabindex"]), + n.attr(t, null); + }), + e.addAttributeFilter("src,href,style", function(e, r) { + for ( + var o, + i, + a = e.length, + s = "data-mce-" + r, + u = t.url_converter, + c = t.url_converter_scope; + a--; + + ) + (i = (o = e[a]).attributes.map[s]) !== undefined + ? (o.attr(r, i.length > 0 ? i : null), o.attr(s, null)) + : ((i = o.attributes.map[r]), + "style" === r + ? (i = n.serializeStyle(n.parseStyle(i), o.name)) + : u && (i = u.call(c, i, r, o.name)), + o.attr(r, i.length > 0 ? i : null)); + }), + e.addAttributeFilter("class", function(e) { + for (var t, n, r = e.length; r--; ) + (n = (t = e[r]).attr("class")) && + ((n = t.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g, "")), + t.attr("class", n.length > 0 ? n : null)); + }), + e.addAttributeFilter("data-mce-type", function(e, t, n) { + for (var r, o = e.length; o--; ) + "bookmark" !== (r = e[o]).attributes.map["data-mce-type"] || + n.cleanup || + r.remove(); + }), + e.addNodeFilter("noscript", function(e) { + for (var t, n = e.length; n--; ) + (t = e[n].firstChild) && (t.value = Ao.decode(t.value)); + }), + e.addNodeFilter("script,style", function(e, n) { + for ( + var r, + o, + i, + a = e.length, + s = function(e) { + return e + .replace(/()/g, "\n") + .replace(/^[\r\n]*|[\r\n]*$/g, "") + .replace( + /^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g, + "" + ); + }; + a--; + + ) + (o = (r = e[a]).firstChild ? r.firstChild.value : ""), + "script" === n + ? ((i = r.attr("type")) && + r.attr( + "type", + "mce-no/type" === i ? null : i.replace(/^mce\-/, "") + ), + "xhtml" === t.element_format && + o.length > 0 && + (r.firstChild.value = "// ")) + : "xhtml" === t.element_format && + o.length > 0 && + (r.firstChild.value = "\x3c!--\n" + s(o) + "\n--\x3e"); + }), + e.addNodeFilter("#comment", function(e) { + for (var t, n = e.length; n--; ) + 0 === (t = e[n]).value.indexOf("[CDATA[") + ? ((t.name = "#cdata"), + (t.type = 4), + (t.value = t.value.replace(/^\[CDATA\[|\]\]$/g, ""))) + : 0 === t.value.indexOf("mce:protected ") && + ((t.name = "#text"), + (t.type = 3), + (t.raw = !0), + (t.value = unescape(t.value).substr(14))); + }), + e.addNodeFilter("xml:namespace,input", function(e, t) { + for (var n, r = e.length; r--; ) + 7 === (n = e[r]).type + ? n.remove() + : 1 === n.type && + ("input" !== t || + "type" in n.attributes.map || + n.attr("type", "text")); + }), + e.addAttributeFilter("data-mce-type", function(t) { + M.each(t, function(t) { + "format-caret" === t.attr("data-mce-type") && + (t.isEmpty(e.schema.getNonEmptyElements()) + ? t.remove() + : t.unwrap()); + }); + }), + e.addAttributeFilter( + "data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize", + function(e, t) { + for (var n = e.length; n--; ) e[n].attr(t, null); + } + ); + }, + rh = function(e) { + var t, + n, + r = function(e) { + return e && "br" === e.name; + }; + r((t = e.lastChild)) && r((n = t.prev)) && (t.remove(), n.remove()); + }, + oh = function(e, t, n) { + return ( + (f = n), + (l = e) && l.hasEventListeners("PreProcess") && !f.no_events + ? ((o = t), + (i = n), + (c = (r = e).dom), + (o = o.cloneNode(!0)), + (a = document.implementation).createHTMLDocument && + ((s = a.createHTMLDocument("")), + Ot.each("BODY" === o.nodeName ? o.childNodes : [o], function(e) { + s.body.appendChild(s.importNode(e, !0)); + }), + (o = "BODY" !== o.nodeName ? s.body.firstChild : s.body), + (u = c.doc), + (c.doc = s)), + eh(r, Zg.merge(i, { node: o })), + u && (c.doc = u), + o) + : t + ); + var r, o, i, a, s, u, c, l, f; + }, + ih = function(e, t, n) { + e.addNodeFilter("font", function(e) { + M.each(e, function(e) { + var r, + o, + i = t.parse(e.attr("style")), + a = e.attr("color"), + s = e.attr("face"), + u = e.attr("size"); + a && (i.color = a), + s && (i["font-family"] = s), + u && (i["font-size"] = n[parseInt(e.attr("size"), 10) - 1]), + (e.name = "span"), + e.attr("style", t.serialize(i)), + (r = e), + (o = ["color", "face", "size"]), + M.each(o, function(e) { + r.attr(e, null); + }); + }); + }); + }, + ah = function(e, t) { + var n, + r = zo(); + t.convert_fonts_to_spans && + ih(e, r, Ot.explode(t.font_size_legacy_values)), + (n = r), + e.addNodeFilter("strike", function(e) { + M.each(e, function(e) { + var t = n.parse(e.attr("style")); + (t["text-decoration"] = "line-through"), + (e.name = "span"), + e.attr("style", n.serialize(t)); + }); + }); + }, + sh = function(e, t) { + t.inline_styles && ah(e, t); + }, + uh = /^[ \t\r\n]*$/, + ch = { + "#text": 3, + "#comment": 8, + "#cdata": 4, + "#pi": 7, + "#doctype": 10, + "#document-fragment": 11 + }, + lh = function(e, t, n) { + var r, + o, + i = n ? "lastChild" : "firstChild", + a = n ? "prev" : "next"; + if (e[i]) return e[i]; + if (e !== t) { + if ((r = e[a])) return r; + for (o = e.parent; o && o !== t; o = o.parent) if ((r = o[a])) return r; + } + }, + fh = function(e, t) { + (this.name = e), + (this.type = t), + 1 === t && ((this.attributes = []), (this.attributes.map = {})); + }; + (fh.prototype = { + replace: function(e) { + return e.parent && e.remove(), this.insert(e, this), this.remove(), this; + }, + attr: function(e, t) { + var n, r; + if ("string" != typeof e) { + for (r in e) this.attr(r, e[r]); + return this; + } + if ((n = this.attributes)) { + if (t !== undefined) { + if (null === t) { + if (e in n.map) + for (delete n.map[e], r = n.length; r--; ) + if (n[r].name === e) return (n = n.splice(r, 1)), this; + return this; + } + if (e in n.map) { + for (r = n.length; r--; ) + if (n[r].name === e) { + n[r].value = t; + break; + } + } else n.push({ name: e, value: t }); + return (n.map[e] = t), this; + } + return n.map[e]; + } + }, + clone: function() { + var e, + t, + n, + r, + o, + i = new fh(this.name, this.type); + if ((n = this.attributes)) { + for ((o = []).map = {}, e = 0, t = n.length; e < t; e++) + "id" !== (r = n[e]).name && + ((o[o.length] = { name: r.name, value: r.value }), + (o.map[r.name] = r.value)); + i.attributes = o; + } + return (i.value = this.value), (i.shortEnded = this.shortEnded), i; + }, + wrap: function(e) { + return this.parent.insert(e, this), e.append(this), this; + }, + unwrap: function() { + var e, t; + for (e = this.firstChild; e; ) + (t = e.next), this.insert(e, this, !0), (e = t); + this.remove(); + }, + remove: function() { + var e = this.parent, + t = this.next, + n = this.prev; + return ( + e && + (e.firstChild === this + ? ((e.firstChild = t), t && (t.prev = null)) + : (n.next = t), + e.lastChild === this + ? ((e.lastChild = n), n && (n.next = null)) + : (t.prev = n), + (this.parent = this.next = this.prev = null)), + this + ); + }, + append: function(e) { + var t; + return ( + e.parent && e.remove(), + (t = this.lastChild) + ? ((t.next = e), (e.prev = t), (this.lastChild = e)) + : (this.lastChild = this.firstChild = e), + (e.parent = this), + e + ); + }, + insert: function(e, t, n) { + var r; + return ( + e.parent && e.remove(), + (r = t.parent || this), + n + ? (t === r.firstChild ? (r.firstChild = e) : (t.prev.next = e), + (e.prev = t.prev), + (e.next = t), + (t.prev = e)) + : (t === r.lastChild ? (r.lastChild = e) : (t.next.prev = e), + (e.next = t.next), + (e.prev = t), + (t.next = e)), + (e.parent = r), + e + ); + }, + getAll: function(e) { + var t, + n = []; + for (t = this.firstChild; t; t = lh(t, this)) t.name === e && n.push(t); + return n; + }, + empty: function() { + var e, t, n; + if (this.firstChild) { + for (e = [], n = this.firstChild; n; n = lh(n, this)) e.push(n); + for (t = e.length; t--; ) + (n = + e[t]).parent = n.firstChild = n.lastChild = n.next = n.prev = null; + } + return (this.firstChild = this.lastChild = null), this; + }, + isEmpty: function(e, t, n) { + var r, + o, + i = this.firstChild; + if (((t = t || {}), i)) + do { + if (1 === i.type) { + if (i.attributes.map["data-mce-bogus"]) continue; + if (e[i.name]) return !1; + for (r = i.attributes.length; r--; ) + if ( + "name" === (o = i.attributes[r].name) || + 0 === o.indexOf("data-mce-bookmark") + ) + return !1; + } + if (8 === i.type) return !1; + if (3 === i.type && !uh.test(i.value)) return !1; + if (3 === i.type && i.parent && t[i.parent.name] && uh.test(i.value)) + return !1; + if (n && n(i)) return !1; + } while ((i = lh(i, this))); + return !0; + }, + walk: function(e) { + return lh(this, null, e); + } + }), + (fh.create = function(e, t) { + var n, r; + if (((n = new fh(e, ch[e] || 1)), t)) for (r in t) n.attr(r, t[r]); + return n; + }); + var dh = Ot.makeMap, + mh = Ot.each, + ph = Ot.explode, + gh = Ot.extend, + hh = function(e, t, n, r) { + (e.padd_empty_with_br || t.insert) && n[r.name] + ? (r.empty().append(new fh("br", "1")).shortEnded = !0) + : (r.empty().append(new fh("#text", "3")).value = "\xa0"); + }, + vh = function(e, t) { + return ( + e && + e.firstChild && + e.firstChild === e.lastChild && + e.firstChild.name === t + ); + }, + yh = function(e, t, n, r) { + return r.isEmpty(t, n, function(t) { + return (n = t), (r = e.getElementRule(n.name)) && r.paddEmpty; + var n, r; + }); + }, + bh = function(e, t) { + var n = {}, + r = {}, + o = [], + i = {}, + a = {}; + return ( + ((e = e || {}).validate = !("validate" in e) || e.validate), + (e.root_name = e.root_name || "body"), + (n.schema = t = t || Fo()), + (n.filterNode = function(e) { + var t, n, s; + n in r && ((s = i[n]) ? s.push(e) : (i[n] = [e])), (t = o.length); + for (; t--; ) + (n = o[t].name) in e.attributes.map && + ((s = a[n]) ? s.push(e) : (a[n] = [e])); + return e; + }), + (n.addNodeFilter = function(e, t) { + mh(ph(e), function(e) { + var n = r[e]; + n || (r[e] = n = []), n.push(t); + }); + }), + (n.addAttributeFilter = function(e, t) { + mh(ph(e), function(e) { + var n; + for (n = 0; n < o.length; n++) + if (o[n].name === e) return void o[n].callbacks.push(t); + o.push({ name: e, callbacks: [t] }); + }); + }), + (n.parse = function(s, u) { + var c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C, + x, + w, + N, + E, + S, + k, + T, + A, + _, + B = []; + (u = u || {}), + (i = {}), + (a = {}), + (C = gh( + dh("script,style,head,html,body,title,meta,param"), + t.getBlockElements() + )), + (A = t.getNonEmptyElements()), + (T = t.children), + (b = e.validate), + (_ = + "forced_root_block" in u + ? u.forced_root_block + : e.forced_root_block), + (k = t.getWhiteSpaceElements()), + (x = /^[ \t\r\n]+/), + (N = /[ \t\r\n]+$/), + (E = /[ \t\r\n]+/g), + (S = /^[ \t\r\n]+$/); + var R = function(e, t) { + var n, + o = new fh(e, t); + return e in r && ((n = i[e]) ? n.push(o) : (i[e] = [o])), o; + }, + D = function(e) { + var n, + r, + o, + i, + a = t.getBlockElements(); + for (n = e.prev; n && 3 === n.type; ) { + if ((o = n.value.replace(N, "")).length > 0) + return void (n.value = o); + if ((r = n.next)) { + if (3 === r.type && r.value.length) { + n = n.prev; + continue; + } + if (!a[r.name] && "script" !== r.name && "style" !== r.name) { + n = n.prev; + continue; + } + } + (i = n.prev), n.remove(), (n = i); + } + }; + if ( + ((c = new em( + { + validate: b, + allow_script_urls: e.allow_script_urls, + allow_conditional_comments: e.allow_conditional_comments, + self_closing_elements: (function(e) { + var t, + n = {}; + for (t in e) "li" !== t && "p" !== t && (n[t] = e[t]); + return n; + })(t.getSelfClosingElements()), + cdata: function(e) { + f.append(R("#cdata", 4)).value = e; + }, + text: function(e, t) { + var n; + w || + ((e = e.replace(E, " ")), + f.lastChild && + C[f.lastChild.name] && + (e = e.replace(x, ""))), + 0 !== e.length && + (((n = R("#text", 3)).raw = !!t), + (f.append(n).value = e)); + }, + comment: function(e) { + f.append(R("#comment", 8)).value = e; + }, + pi: function(e, t) { + (f.append(R(e, 7)).value = t), D(f); + }, + doctype: function(e) { + (f.append(R("#doctype", 10)).value = e), D(f); + }, + start: function(e, n, r) { + var i, s, u, c, l; + if ((u = b ? t.getElementRule(e) : {})) { + for ( + (i = R(u.outputName || e, 1)).attributes = n, + i.shortEnded = r, + f.append(i), + (l = T[f.name]) && T[i.name] && !l[i.name] && B.push(i), + s = o.length; + s--; + + ) + (c = o[s].name) in n.map && + ((v = a[c]) ? v.push(i) : (a[c] = [i])); + C[e] && D(i), r || (f = i), !w && k[e] && (w = !0); + } + }, + end: function(n) { + var r, o, i, a, s, c; + if ((o = b ? t.getElementRule(n) : {})) { + if (C[n] && !w) { + if ((r = f.firstChild) && 3 === r.type) + if ((i = r.value.replace(x, "")).length > 0) + (r.value = i), (r = r.next); + else + for ( + a = r.next, r.remove(), r = a; + r && 3 === r.type; + + ) + (i = r.value), + (a = r.next), + (0 === i.length || S.test(i)) && + (r.remove(), (r = a)), + (r = a); + if ((r = f.lastChild) && 3 === r.type) + if ((i = r.value.replace(N, "")).length > 0) + (r.value = i), (r = r.prev); + else + for ( + a = r.prev, r.remove(), r = a; + r && 3 === r.type; + + ) + (i = r.value), + (a = r.prev), + (0 === i.length || S.test(i)) && + (r.remove(), (r = a)), + (r = a); + } + if ( + (w && k[n] && (w = !1), + o.removeEmpty && + yh(t, A, k, f) && + !f.attributes.map.name && + !f.attributes.map.id) + ) + return ( + (s = f.parent), + C[f.name] ? f.empty().remove() : f.unwrap(), + void (f = s) + ); + o.paddEmpty && + ((vh((c = f), "#text") && + "\xa0" === c.firstChild.value) || + yh(t, A, k, f)) && + hh(e, u, C, f), + (f = f.parent); + } + } + }, + t + )), + (l = f = new fh(u.context || e.root_name, 11)), + c.parse(s), + b && + B.length && + (u.context + ? (u.invalid = !0) + : (function(e) { + var r, o, i, a, s, u, c, l, f, d, m, p, g, h, v, y; + for ( + p = dh("tr,td,th,tbody,thead,tfoot,table"), + d = t.getNonEmptyElements(), + m = t.getWhiteSpaceElements(), + g = t.getTextBlockElements(), + h = t.getSpecialElements(), + r = 0; + r < e.length; + r++ + ) + if ((o = e[r]).parent && !o.fixed) + if (g[o.name] && "li" === o.parent.name) { + for (v = o.next; v && g[v.name]; ) + (v.name = "li"), + (v.fixed = !0), + o.parent.insert(v, o.parent), + (v = v.next); + o.unwrap(o); + } else { + for ( + a = [o], i = o.parent; + i && !t.isValidChild(i.name, o.name) && !p[i.name]; + i = i.parent + ) + a.push(i); + if (i && a.length > 1) { + for ( + a.reverse(), + s = u = n.filterNode(a[0].clone()), + f = 0; + f < a.length - 1; + f++ + ) { + for ( + t.isValidChild(u.name, a[f].name) + ? ((c = n.filterNode(a[f].clone())), + u.append(c)) + : (c = u), + l = a[f].firstChild; + l && l !== a[f + 1]; + + ) + (y = l.next), c.append(l), (l = y); + u = c; + } + yh(t, d, m, s) + ? i.insert(o, a[0], !0) + : (i.insert(s, a[0], !0), i.insert(o, s)), + (i = a[0]), + (yh(t, d, m, i) || vh(i, "br")) && + i.empty().remove(); + } else if (o.parent) { + if ("li" === o.name) { + if ( + (v = o.prev) && + ("ul" === v.name || "ul" === v.name) + ) { + v.append(o); + continue; + } + if ( + (v = o.next) && + ("ul" === v.name || "ul" === v.name) + ) { + v.insert(o, v.firstChild, !0); + continue; + } + o.wrap(n.filterNode(new fh("ul", 1))); + continue; + } + t.isValidChild(o.parent.name, "div") && + t.isValidChild("div", o.name) + ? o.wrap(n.filterNode(new fh("div", 1))) + : h[o.name] + ? o.empty().remove() + : o.unwrap(); + } + } + })(B)), + _ && + ("body" === l.name || u.isRootContent) && + (function() { + var n, + r, + o = l.firstChild, + i = function(e) { + e && + ((o = e.firstChild) && + 3 === o.type && + (o.value = o.value.replace(x, "")), + (o = e.lastChild) && + 3 === o.type && + (o.value = o.value.replace(N, ""))); + }; + if (t.isValidChild(l.name, _.toLowerCase())) { + for (; o; ) + (n = o.next), + 3 === o.type || + (1 === o.type && + "p" !== o.name && + !C[o.name] && + !o.attr("data-mce-type")) + ? r + ? r.append(o) + : ((r = R(_, 1)).attr(e.forced_root_block_attrs), + l.insert(r, o), + r.append(o)) + : (i(r), (r = null)), + (o = n); + i(r); + } + })(), + !u.invalid) + ) { + for (y in i) { + for (v = r[y], g = (d = i[y]).length; g--; ) + d[g].parent || d.splice(g, 1); + for (m = 0, p = v.length; m < p; m++) v[m](d, y, u); + } + for (m = 0, p = o.length; m < p; m++) + if ((v = o[m]).name in a) { + for (g = (d = a[v.name]).length; g--; ) + d[g].parent || d.splice(g, 1); + for (g = 0, h = v.callbacks.length; g < h; g++) + v.callbacks[g](d, v.name, u); + } + } + return l; + }), + e.remove_trailing_brs && + n.addNodeFilter("br", function(n, r, o) { + var i, + a, + s, + u, + c, + l, + f, + d, + m = n.length, + p = gh({}, t.getBlockElements()), + g = t.getNonEmptyElements(), + h = t.getNonEmptyElements(); + for (p.body = 1, i = 0; i < m; i++) + if ( + ((s = (a = n[i]).parent), p[a.parent.name] && a === s.lastChild) + ) { + for (c = a.prev; c; ) { + if ( + "span" !== (l = c.name) || + "bookmark" !== c.attr("data-mce-type") + ) { + if ("br" !== l) break; + if ("br" === l) { + a = null; + break; + } + } + c = c.prev; + } + a && + (a.remove(), + yh(t, g, h, s) && + (f = t.getElementRule(s.name)) && + (f.removeEmpty + ? s.remove() + : f.paddEmpty && hh(e, o, p, s))); + } else { + for ( + u = a; + s && + s.firstChild === u && + s.lastChild === u && + ((u = s), !p[s.name]); + + ) + s = s.parent; + u === s && + !0 !== e.padd_empty_with_br && + (((d = new fh("#text", 3)).value = "\xa0"), a.replace(d)); + } + }), + n.addAttributeFilter("href", function(t) { + var n, + r, + o, + i = t.length; + if (!e.allow_unsafe_link_target) + for (; i--; ) + "a" === (n = t[i]).name && + "_blank" === n.attr("target") && + n.attr( + "rel", + ((r = n.attr("rel")), + (o = r ? Ot.trim(r) : ""), + /\b(noopener)\b/g.test(o) + ? o + : o + .split(" ") + .filter(function(e) { + return e.length > 0; + }) + .concat(["noopener"]) + .sort() + .join(" ")) + ); + }), + e.allow_html_in_named_anchor || + n.addAttributeFilter("id,name", function(e) { + for (var t, n, r, o, i = e.length; i--; ) + if ("a" === (o = e[i]).name && o.firstChild && !o.attr("href")) { + (r = o.parent), (t = o.lastChild); + do { + (n = t.prev), r.insert(t, o), (t = n); + } while (t); + } + }), + e.fix_list_elements && + n.addNodeFilter("ul,ol", function(e) { + for (var t, n, r = e.length; r--; ) + if ("ul" === (n = (t = e[r]).parent).name || "ol" === n.name) + if (t.prev && "li" === t.prev.name) t.prev.append(t); + else { + var o = new fh("li", 1); + o.attr("style", "list-style-type: none"), t.wrap(o); + } + }), + e.validate && + t.getValidClasses() && + n.addAttributeFilter("class", function(e) { + for ( + var n, r, o, i, a, s, u, c = e.length, l = t.getValidClasses(); + c--; + + ) { + for ( + r = (n = e[c]).attr("class").split(" "), a = "", o = 0; + o < r.length; + o++ + ) + (i = r[o]), + (u = !1), + (s = l["*"]) && s[i] && (u = !0), + (s = l[n.name]), + !u && s && s[i] && (u = !0), + u && (a && (a += " "), (a += i)); + a.length || (a = null), n.attr("class", a); + } + }), + sh(n, e), + n + ); + }, + Ch = function(e, t, n) { + -1 === Ot.inArray(t, n) && + (e.addAttributeFilter(n, function(e, t) { + for (var n = e.length; n--; ) e[n].attr(t, null); + }), + t.push(n)); + }, + xh = function(e, t, n, r, o) { + var i, + a, + s, + u, + c = ((i = r), zs(t, n).serialize(i)); + return ( + (a = e), + (u = c), + !(s = o).no_events && a ? th(a, Zg.merge(s, { content: u })).content : u + ); + }, + wh = function(e, t) { + var n, + r, + o, + i = ["data-mce-selected"]; + return ( + (n = t && t.dom ? t.dom : Xo.DOM), + (r = t && t.schema ? t.schema : Fo(e)), + (e.entity_encoding = e.entity_encoding || "named"), + (e.remove_trailing_brs = + !("remove_trailing_brs" in e) || e.remove_trailing_brs), + (o = bh(e, r)), + nh(o, e, n), + { + schema: r, + addNodeFilter: o.addNodeFilter, + addAttributeFilter: o.addAttributeFilter, + serialize: function(i, a) { + var s, + u, + c, + l, + f, + d, + m, + p, + g, + h = Zg.merge({ format: "html" }, a || {}), + v = oh(t, i, h), + y = ((s = n), + (u = v), + (l = ii((c = h).getInner ? u.innerHTML : s.getOuterHTML(u))), + c.selection ? l : Ot.trim(l)), + b = ((f = o), + (d = y), + (p = (m = h).selection + ? Zg.merge({ forced_root_block: !1 }, m) + : m), + (g = f.parse(d, p)), + rh(g), + g); + return "tree" === h.format ? b : xh(t, e, r, b, h); + }, + addRules: function(e) { + r.addValidElements(e); + }, + setRules: function(e) { + r.setValidElements(e); + }, + addTempAttr: y.curry(Ch, o, i), + getTempAttrs: function() { + return i; + } + } + ); + }, + Nh = function(e, t) { + var n = wh(e, t); + return { + schema: n.schema, + addNodeFilter: n.addNodeFilter, + addAttributeFilter: n.addAttributeFilter, + serialize: n.serialize, + addRules: n.addRules, + setRules: n.setRules, + addTempAttr: n.addTempAttr, + getTempAttrs: n.getTempAttrs + }; + }, + Eh = function(e, t) { + var n; + t.hasAttribute("data-mce-caret") && + (mi.showCaretContainerBlock(t), + (n = e).selection.setRng(n.selection.getRng()), + e.selection.scrollIntoView(t)); + }, + Sh = function(e, t) { + var n, + r = ((n = e), + Nu(Hn.fromDom(n.getBody()), "*[data-mce-caret]").fold( + y.constant(null), + function(e) { + return e.dom(); + } + )); + if (r) + return "compositionstart" === t.type + ? (t.preventDefault(), t.stopPropagation(), void Eh(e, r)) + : void (mi.hasContent(r) && Eh(e, r)); + }, + kh = function(e) { + e.on("keyup compositionstart", y.curry(Sh, e)); + }; + function Th(e) { + return { + getBookmark: y.curry(xs.getBookmark, e), + moveToBookmark: y.curry(xs.moveToBookmark, e) + }; + } + (Th || (Th = {})).isBookmarkNode = xs.isBookmarkNode; + var Ah = Th, + _h = vo.isContentEditableFalse, + Bh = vo.isContentEditableTrue, + Rh = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b = t.dom, + C = Ot.each, + x = t.getDoc(), + w = document, + N = Math.abs, + E = Math.round, + S = t.getBody(); + i = { + nw: [0, 0, -1, -1], + ne: [1, 0, 1, -1], + se: [1, 1, 1, 1], + sw: [0, 1, -1, 1] + }; + var k = ".mce-content-body"; + t.contentStyles.push( + k + + " div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: content-box;background: #FFF;width: 7px;height: 7px;z-index: 10000}" + + k + + " .mce-resizehandle:hover {background: #000}" + + k + + " img[data-mce-selected]," + + k + + " hr[data-mce-selected] {outline: 1px solid black;resize: none}" + + k + + " .mce-clonedresizable {position: absolute;" + + (me.gecko ? "" : "outline: 1px dashed black;") + + "opacity: .5;filter: alpha(opacity=50);z-index: 10000}" + + k + + " .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}" + ); + var T = function(e) { + return e && ("IMG" === e.nodeName || t.dom.is(e, "figure.image")); + }, + A = function(e) { + var n, + r, + o = e.target; + (n = e), + (r = t.selection.getRng()), + !T(n.target) || + kp(n.clientX, n.clientY, r) || + e.isDefaultPrevented() || + (e.preventDefault(), t.selection.select(o)); + }, + _ = function(e) { + return t.dom.is(e, "figure.image") ? e.querySelector("img") : e; + }, + B = function(e) { + var n = t.settings.object_resizing; + return ( + !1 !== n && + !me.iOS && + ("string" != typeof n && (n = "table,img,figure.image,div"), + "false" !== e.getAttribute("data-mce-resize") && + e !== t.getBody() && + _r.is(Hn.fromDom(e), n)) + ); + }, + R = function(e) { + var i, C, x, w; + (i = e.screenX - s), + (C = e.screenY - u), + (g = i * a[2] + f), + (h = C * a[3] + d), + (g = g < 5 ? 5 : g), + (h = h < 5 ? 5 : h), + (T(n) && !1 !== t.settings.resize_img_proportional + ? !Mp.modifierPressed(e) + : Mp.modifierPressed(e) || (T(n) && a[2] * a[3] != 0)) && + (N(i) > N(C) + ? ((h = E(g * m)), (g = E(h / m))) + : ((g = E(h / m)), (h = E(g * m)))), + b.setStyles(_(r), { width: g, height: h }), + (x = a.startPos.x + i), + (w = a.startPos.y + C), + (x = x > 0 ? x : 0), + (w = w > 0 ? w : 0), + b.setStyles(o, { left: x, top: w, display: "block" }), + (o.innerHTML = g + " × " + h), + a[2] < 0 && + r.clientWidth <= g && + b.setStyle(r, "left", c + (f - g)), + a[3] < 0 && + r.clientHeight <= h && + b.setStyle(r, "top", l + (d - h)), + (i = S.scrollWidth - v) + (C = S.scrollHeight - y) != 0 && + b.setStyles(o, { left: x - i, top: w - C }), + p || + (t.fire("ObjectResizeStart", { target: n, width: f, height: d }), + (p = !0)); + }, + D = function() { + p = !1; + var e = function(e, r) { + r && + (n.style[e] || !t.schema.isValid(n.nodeName.toLowerCase(), e) + ? b.setStyle(_(n), e, r) + : b.setAttrib(_(n), e, r)); + }; + e("width", g), + e("height", h), + b.unbind(x, "mousemove", R), + b.unbind(x, "mouseup", D), + w !== x && (b.unbind(w, "mousemove", R), b.unbind(w, "mouseup", D)), + b.remove(r), + b.remove(o), + O(n), + t.fire("ObjectResized", { target: n, width: g, height: h }), + b.setAttrib(n, "style", b.getAttrib(n, "style")), + t.nodeChanged(); + }, + O = function(e) { + var p, N, E, k, T; + P(), + M(), + (p = b.getPos(e, S)), + (c = p.x), + (l = p.y), + (T = e.getBoundingClientRect()), + (N = T.width || T.right - T.left), + (E = T.height || T.bottom - T.top), + n !== e && ((n = e), (g = h = 0)), + (k = t.fire("ObjectSelected", { target: e })), + B(e) && !k.isDefaultPrevented() + ? C(i, function(e, t) { + var i; + (i = b.get("mceResizeHandle" + t)) && b.remove(i), + (i = b.add(S, "div", { + id: "mceResizeHandle" + t, + "data-mce-bogus": "all", + class: "mce-resizehandle", + unselectable: !0, + style: "cursor:" + t + "-resize; margin:0; padding:0" + })), + me.ie && (i.contentEditable = !1), + b.bind(i, "mousedown", function(t) { + var i; + t.stopImmediatePropagation(), + t.preventDefault(), + (s = (i = t).screenX), + (u = i.screenY), + (f = _(n).clientWidth), + (d = _(n).clientHeight), + (m = d / f), + (a = e), + (e.startPos = { x: N * e[0] + c, y: E * e[1] + l }), + (v = S.scrollWidth), + (y = S.scrollHeight), + (r = n.cloneNode(!0)), + b.addClass(r, "mce-clonedresizable"), + b.setAttrib(r, "data-mce-bogus", "all"), + (r.contentEditable = !1), + (r.unSelectabe = !0), + b.setStyles(r, { left: c, top: l, margin: 0 }), + r.removeAttribute("data-mce-selected"), + S.appendChild(r), + b.bind(x, "mousemove", R), + b.bind(x, "mouseup", D), + w !== x && + (b.bind(w, "mousemove", R), b.bind(w, "mouseup", D)), + (o = b.add( + S, + "div", + { + class: "mce-resize-helper", + "data-mce-bogus": "all" + }, + f + " × " + d + )); + }), + (e.elm = i), + b.setStyles(i, { + left: N * e[0] + c - i.offsetWidth / 2, + top: E * e[1] + l - i.offsetHeight / 2 + }); + }) + : P(), + n.setAttribute("data-mce-selected", "1"); + }, + P = function() { + var e, t; + for (e in (M(), n && n.removeAttribute("data-mce-selected"), i)) + (t = b.get("mceResizeHandle" + e)) && (b.unbind(t), b.remove(t)); + }, + I = function(n) { + var r, + o = function(e, t) { + if (e) + do { + if (e === t) return !0; + } while ((e = e.parentNode)); + }; + p || + t.removed || + (C( + b.select("img[data-mce-selected],hr[data-mce-selected]"), + function(e) { + e.removeAttribute("data-mce-selected"); + } + ), + (r = "mousedown" === n.type ? n.target : e.getNode()), + o((r = b.$(r).closest("table,img,figure.image,hr")[0]), S) && + (F(), o(e.getStart(!0), r) && o(e.getEnd(!0), r)) + ? O(r) + : P()); + }, + L = function(e) { + return _h( + (function(e, t) { + for (; t && t !== e; ) { + if (Bh(t) || _h(t)) return t; + t = t.parentNode; + } + return null; + })(t.getBody(), e) + ); + }, + M = function() { + for (var e in i) { + var t = i[e]; + t.elm && (b.unbind(t.elm), delete t.elm); + } + }, + F = function() { + try { + t.getDoc().execCommand("enableObjectResizing", !1, !1); + } catch (e) {} + }; + return ( + t.on("init", function() { + F(), + me.ie && + me.ie >= 11 && + (t.on("mousedown click", function(e) { + var n = e.target, + r = n.nodeName; + p || + !/^(TABLE|IMG|HR)$/.test(r) || + L(n) || + (2 !== e.button && t.selection.select(n, "TABLE" === r), + "mousedown" === e.type && t.nodeChanged()); + }), + t.dom.bind(S, "mscontrolselect", function(e) { + var n = function(e) { + ye.setEditorTimeout(t, function() { + t.selection.select(e); + }); + }; + if (L(e.target)) return e.preventDefault(), void n(e.target); + /^(TABLE|IMG|HR)$/.test(e.target.nodeName) && + (e.preventDefault(), + "IMG" === e.target.tagName && n(e.target)); + })); + var e = ye.throttle(function(e) { + t.composing || I(e); + }); + t.on("nodechange ResizeEditor ResizeWindow drop", e), + t.on("keyup compositionend", function(t) { + n && "TABLE" === n.nodeName && e(t); + }), + t.on("hide blur", P), + t.on("contextmenu", A); + }), + t.on("remove", M), + { + isResizable: B, + showResizeRect: O, + hideResizeRect: P, + updateResizeRect: I, + destroy: function() { + n = r = null; + } + } + ); + }, + Dh = function(e) { + for (var t = 0, n = 0, r = e; r && r.nodeType; ) + (t += r.offsetLeft || 0), (n += r.offsetTop || 0), (r = r.offsetParent); + return { x: t, y: n }; + }, + Oh = function(e, t, n) { + var r, + o, + i, + a, + s, + u = e.dom, + c = u.getRoot(), + l = 0; + if ( + ((s = { elm: t, alignToTop: n }), + e.fire("scrollIntoView", s), + !s.isDefaultPrevented() && vo.isElement(t)) + ) { + if ((!1 === n && (l = t.offsetHeight), "BODY" !== c.nodeName)) { + var f = e.selection.getScrollContainer(); + if (f) + return ( + (r = Dh(t).y - Dh(f).y + l), + (a = f.clientHeight), + void ( + (r < (i = f.scrollTop) || r + 25 > i + a) && + (f.scrollTop = r < i ? r : r - a + 25) + ) + ); + } + (o = u.getViewPort(e.getWin())), + (r = u.getPos(t).y + l), + (i = o.y), + (a = o.h), + (r < o.y || r + 25 > i + a) && + e.getWin().scrollTo(0, r < i ? r : r - a + 25); + } + }, + Ph = function(e) { + return vo.isContentEditableTrue(e) || vo.isContentEditableFalse(e); + }, + Ih = function(e, t, n) { + var r, + o, + i, + a, + s, + u = n; + if (u.caretPositionFromPoint) + (o = u.caretPositionFromPoint(e, t)) && + ((r = n.createRange()).setStart(o.offsetNode, o.offset), + r.collapse(!0)); + else if (n.caretRangeFromPoint) r = n.caretRangeFromPoint(e, t); + else if (u.body.createTextRange) { + r = u.body.createTextRange(); + try { + r.moveToPoint(e, t), r.collapse(!0); + } catch (c) { + r = (function(e, t, n) { + var r, o, i; + if ( + ((r = n.elementFromPoint(e, t)), + (o = n.body.createTextRange()), + (r && "HTML" !== r.tagName) || (r = n.body), + o.moveToElementText(r), + (i = (i = Ot.toArray(o.getClientRects())).sort(function(e, n) { + return ( + (e = Math.abs(Math.max(e.top - t, e.bottom - t))) - + (n = Math.abs(Math.max(n.top - t, n.bottom - t))) + ); + })).length > 0) + ) { + t = (i[0].bottom + i[0].top) / 2; + try { + return o.moveToPoint(e, t), o.collapse(!0), o; + } catch (a) {} + } + return null; + })(e, t, n); + } + return ( + (i = r), + (a = n.body), + (s = i && i.parentElement ? i.parentElement() : null), + vo.isContentEditableFalse( + (function(e, t, n) { + for (; e && e !== t; ) { + if (n(e)) return e; + e = e.parentNode; + } + return null; + })(s, a, Ph) + ) + ? null + : i + ); + } + return r; + }, + Lh = function(e, t) { + return M.map(t, function(t) { + var n = e.fire("GetSelectionRange", { range: t }); + return n.range !== t ? n.range : t; + }); + }, + Mh = function(e, t) { + return Hn.fromDom(e.dom().cloneNode(t)); + }, + Fh = function(e) { + return Mh(e, !0); + }, + zh = function(e) { + return Mh(e, !1); + }, + Uh = Fh, + Vh = function(e, t) { + var n = (t || document).createDocumentFragment(); + return ( + M.each(e, function(e) { + n.appendChild(e.dom()); + }), + Hn.fromDom(n) + ); + }, + Hh = function(e) { + return Ur.firstChild(e).fold(y.constant([e]), function(t) { + return [e].concat(Hh(t)); + }); + }, + qh = function(e) { + return Ur.lastChild(e).fold(y.constant([e]), function(t) { + return "br" === Zn.name(t) + ? Ur.prevSibling(t) + .map(function(t) { + return [e].concat(qh(t)); + }) + .getOr([]) + : [e].concat(qh(t)); + }); + }, + jh = function(e, t) { + return hs( + [ + ((i = t), + (a = i.startContainer), + (s = i.startOffset), + vo.isText(a) + ? 0 === s + ? E.some(Hn.fromDom(a)) + : E.none() + : E.from(a.childNodes[s]).map(Hn.fromDom)), + ((n = t), + (r = n.endContainer), + (o = n.endOffset), + vo.isText(r) + ? o === r.data.length + ? E.some(Hn.fromDom(r)) + : E.none() + : E.from(r.childNodes[o - 1]).map(Hn.fromDom)) + ], + function(t, n) { + var r = M.find(Hh(e), y.curry(Dr.eq, t)), + o = M.find(qh(e), y.curry(Dr.eq, n)); + return r.isSome() && o.isSome(); + } + ).getOr(!1); + var n, r, o, i, a, s; + }, + $h = function(e, t, n, r) { + var o = n, + i = new to(n, o), + a = e.schema.getNonEmptyElements(); + do { + if (3 === n.nodeType && 0 !== Ot.trim(n.nodeValue).length) + return void (r ? t.setStart(n, 0) : t.setEnd(n, n.nodeValue.length)); + if (a[n.nodeName] && !/^(TD|TH)$/.test(n.nodeName)) + return void (r + ? t.setStartBefore(n) + : "BR" === n.nodeName + ? t.setEndBefore(n) + : t.setEndAfter(n)); + if (me.ie && me.ie < 11 && e.isBlock(n) && e.isEmpty(n)) + return void (r ? t.setStart(n, 0) : t.setEnd(n, 0)); + } while ((n = r ? i.next() : i.prev())); + "BODY" === o.nodeName && + (r ? t.setStart(o, 0) : t.setEnd(o, o.childNodes.length)); + }, + Wh = xr("element", "width", "rows"), + Kh = xr("element", "cells"), + Xh = xr("x", "y"), + Yh = function(e, t) { + var n = parseInt(dr.get(e, t), 10); + return isNaN(n) ? 1 : n; + }, + Gh = function(e) { + return M.foldl( + e, + function(e, t) { + return t.cells().length > e ? t.cells().length : e; + }, + 0 + ); + }, + Jh = function(e, t) { + for (var n = e.rows(), r = 0; r < n.length; r++) + for (var o = n[r].cells(), i = 0; i < o.length; i++) + if (Dr.eq(o[i], t)) return E.some(Xh(i, r)); + return E.none(); + }, + Qh = function(e, t, n, r, o) { + for (var i = [], a = e.rows(), s = n; s <= o; s++) { + var u = a[s].cells(), + c = t < r ? u.slice(t, r + 1) : u.slice(r, t + 1); + i.push(Kh(a[s].element(), c)); + } + return i; + }, + Zh = function(e) { + var t = Wh(zh(e), 0, []); + return ( + M.each(Os(e, "tr"), function(e, n) { + M.each(Os(e, "td,th"), function(r, o) { + !(function(e, t, n, r, o) { + for ( + var i = Yh(o, "rowspan"), + a = Yh(o, "colspan"), + s = e.rows(), + u = n; + u < n + i; + u++ + ) { + s[u] || (s[u] = Kh(Uh(r), [])); + for (var c = t; c < t + a; c++) + s[u].cells()[c] = u === n && c === t ? o : zh(o); + } + })( + t, + (function(e, t, n) { + for ( + ; + (r = t), + (o = n), + (i = void 0), + ((i = e.rows())[o] ? i[o].cells() : [])[r]; + + ) + t++; + var r, o, i; + return t; + })(t, o, n), + n, + e, + r + ); + }); + }), + Wh(t.element(), Gh(t.rows()), t.rows()) + ); + }, + ev = function(e) { + return ( + (t = e), + (i = e), + (n = M.map(i.rows(), function(e) { + var t = M.map(e.cells(), function(e) { + var t = Uh(e); + return dr.remove(t, "colspan"), dr.remove(t, "rowspan"), t; + }), + n = zh(e.element()); + return As(n, t), n; + })), + (r = zh(t.element())), + (o = Hn.fromTag("tbody")), + As(o, n), + ks.append(r, o), + r + ); + var t, n, r, o, i; + }, + tv = function(e, t, n) { + return Jh(e, t).bind(function(t) { + return Jh(e, n).map(function(n) { + return ( + (r = e), + (i = n), + (a = (o = t).x()), + (s = o.y()), + (u = i.x()), + (c = i.y()), + (l = s < c ? Qh(r, a, s, u, c) : Qh(r, a, c, u, s)), + Wh(r.element(), Gh(l), l) + ); + var r, o, i, a, s, u, c, l; + }); + }); + }, + nv = function(e, t) { + return M.find(e, function(e) { + return "li" === Zn.name(e) && jh(e, t); + }).fold(y.constant([]), function(t) { + return ((n = e), + M.find(n, function(e) { + return "ul" === Zn.name(e) || "ol" === Zn.name(e); + })) + .map(function(e) { + return [Hn.fromTag("li"), Hn.fromTag(Zn.name(e))]; + }) + .getOr([]); + var n; + }); + }, + rv = function(e, t) { + var n, + r = Hn.fromDom(t.commonAncestorContainer), + o = Uu(r, e), + i = M.filter(o, function(e) { + return io.isInline(e) || io.isHeading(e); + }), + a = nv(o, t), + s = i.concat( + a.length + ? a + : ((n = r), + io.isListItem(n) + ? Ur.parent(n) + .filter(io.isList) + .fold(y.constant([]), function(e) { + return [n, e]; + }) + : io.isList(n) + ? [n] + : []) + ); + return M.map(s, zh); + }, + ov = function() { + return Vh([]); + }, + iv = function(e, t) { + return ( + (n = Hn.fromDom(t.cloneContents())), + (r = rv(e, t)), + (o = M.foldl( + r, + function(e, t) { + return ks.append(t, e), t; + }, + n + )), + r.length > 0 ? Vh([o]) : o + ); + var n, r, o; + }, + av = function(e, t) { + return ((n = e), (r = t[0]), wu(r, "table", y.curry(Dr.eq, n))) + .bind(function(e) { + var n = t[0], + r = t[t.length - 1], + o = Zh(e); + return tv(o, n, r).map(function(e) { + return Vh([ev(e)]); + }); + }) + .getOrThunk(ov); + var n, r; + }, + sv = function(e, t) { + var n, + r, + o = Af(t, e); + return o.length > 0 + ? av(e, o) + : ((n = e), (r = t).length > 0 && r[0].collapsed ? ov() : iv(n, r[0])); + }, + uv = function(e, t) { + var n, + r = e.selection.getRng(), + o = e.dom.create("body"), + i = e.selection.getSel(), + a = Lh(e, wf(i)); + if ( + (((t = t || {}).get = !0), + (t.format = t.format || "html"), + (t.selection = !0), + (t = e.fire("BeforeGetContent", t)).isDefaultPrevented()) + ) + return e.fire("GetContent", t), t.content; + if ("text" === t.format) + return e.selection.isCollapsed() + ? "" + : ii(r.text || (i.toString ? i.toString() : "")); + r.cloneContents + ? (n = t.contextual + ? sv(Hn.fromDom(e.getBody()), a).dom() + : r.cloneContents()) && o.appendChild(n) + : r.item !== undefined || r.htmlText !== undefined + ? ((o.innerHTML = "
" + (r.item ? r.item(0).outerHTML : r.htmlText)), + o.removeChild(o.firstChild)) + : (o.innerHTML = r.toString()), + (t.getInner = !0); + var s = e.selection.serializer.serialize(o, t); + return "tree" === t.format + ? s + : ((t.content = e.selection.isCollapsed() ? "" : s), + e.fire("GetContent", t), + t.content); + }, + cv = function(e, t, n) { + var r, + o, + i, + a = e.selection.getRng(), + s = e.getDoc(); + if ( + (((n = n || { format: "html" }).set = !0), + (n.selection = !0), + (n.content = t), + n.no_events || + !(n = e.fire("BeforeSetContent", n)).isDefaultPrevented()) + ) { + if (((t = n.content), a.insertNode)) { + (t += '_'), + a.startContainer === s && a.endContainer === s + ? (s.body.innerHTML = t) + : (a.deleteContents(), + 0 === s.body.childNodes.length + ? (s.body.innerHTML = t) + : a.createContextualFragment + ? a.insertNode(a.createContextualFragment(t)) + : ((o = s.createDocumentFragment()), + (i = s.createElement("div")), + o.appendChild(i), + (i.outerHTML = t), + a.insertNode(o))), + (r = e.dom.get("__caret")), + (a = s.createRange()).setStartBefore(r), + a.setEndBefore(r), + e.selection.setRng(a), + e.dom.remove("__caret"); + try { + e.selection.setRng(a); + } catch (u) {} + } else + a.item && (s.execCommand("Delete", !1, null), (a = e.getRng())), + /^\s+/.test(t) + ? (a.pasteHTML('_' + t), + e.dom.remove("__mce_tmp")) + : a.pasteHTML(t); + n.no_events || e.fire("SetContent", n); + } else e.fire("SetContent", n); + }, + lv = function(e, t, n, r, o) { + var i = n ? t.startContainer : t.endContainer, + a = n ? t.startOffset : t.endOffset; + return E.from(i) + .map(Hn.fromDom) + .map(function(e) { + return r && t.collapsed ? e : Ur.child(e, o(e, a)).getOr(e); + }) + .bind(function(e) { + return Zn.isElement(e) ? E.some(e) : Ur.parent(e); + }) + .map(function(e) { + return e.dom(); + }) + .getOr(e); + }, + fv = function(e, t, n) { + return lv(e, t, !0, n, function(e, t) { + return Math.min(Ur.childNodesCount(e), t); + }); + }, + dv = function(e, t, n) { + return lv(e, t, !1, n, function(e, t) { + return t > 0 ? t - 1 : t; + }); + }, + mv = function(e, t) { + for (var n = e; e && vo.isText(e) && 0 === e.length; ) + e = t ? e.nextSibling : e.previousSibling; + return e || n; + }, + pv = Ot.each, + gv = function(e) { + return !!e.select; + }, + hv = function(e) { + return ( + !(!e || !e.ownerDocument) && + Dr.contains(Hn.fromDom(e.ownerDocument), Hn.fromDom(e)) + ); + }, + vv = function(e, t, n, r) { + var o, + i, + a, + s, + u, + c = function(e, t) { + return cv(r, e, t); + }, + l = function(e) { + var t = d(); + t.collapse(!!e), m(t); + }, + f = function() { + return t.getSelection ? t.getSelection() : t.document.selection; + }, + d = function() { + var n, + o, + i, + u, + c = function(e, t, n) { + try { + return t.compareBoundaryPoints(e, n); + } catch (r) { + return -1; + } + }; + if (!t) return null; + if (void 0 === (u = t.document) || null === u) return null; + if (r.bookmark !== undefined && !1 === hm(r)) { + var l = Td(r); + if (l.isSome()) + return l + .map(function(e) { + return Lh(r, [e])[0]; + }) + .getOr(u.createRange()); + } + try { + (n = f()) && + (o = + n.rangeCount > 0 + ? n.getRangeAt(0) + : n.createRange + ? n.createRange() + : u.createRange()); + } catch (d) {} + return ( + (o = Lh(r, [o])[0]) || + (o = u.createRange ? u.createRange() : u.body.createTextRange()), + o.setStart && + 9 === o.startContainer.nodeType && + o.collapsed && + ((i = e.getRoot()), o.setStart(i, 0), o.setEnd(i, 0)), + a && + s && + (0 === c(o.START_TO_START, o, a) && 0 === c(o.END_TO_END, o, a) + ? (o = s) + : ((a = null), (s = null))), + o + ); + }, + m = function(e, t) { + var n, o; + if ( + (i = e) && + (gv(i) || (hv(i.startContainer) && hv(i.endContainer))) + ) { + var i, + u = gv(e) ? e : null; + if (u) { + s = null; + try { + u.select(); + } catch (c) {} + } else { + if ( + ((n = f()), + (e = r.fire("SetSelectionRange", { range: e, forward: t }) + .range), + n) + ) { + s = e; + try { + n.removeAllRanges(), n.addRange(e); + } catch (c) {} + !1 === t && + n.extend && + (n.collapse(e.endContainer, e.endOffset), + n.extend(e.startContainer, e.startOffset)), + (a = n.rangeCount > 0 ? n.getRangeAt(0) : null); + } + e.collapsed || + e.startContainer !== e.endContainer || + !n.setBaseAndExtent || + me.ie || + (e.endOffset - e.startOffset < 2 && + e.startContainer.hasChildNodes() && + (o = e.startContainer.childNodes[e.startOffset]) && + "IMG" === o.tagName && + (n.setBaseAndExtent( + e.startContainer, + e.startOffset, + e.endContainer, + e.endOffset + ), + (n.anchorNode === e.startContainer && + n.focusNode === e.endContainer) || + n.setBaseAndExtent(o, 0, o, 1))), + r.fire("AfterSetSelectionRange", { range: e, forward: t }); + } + } + }, + p = function() { + var t, + n, + r = f(); + return ( + !(r && r.anchorNode && r.focusNode) || + ((t = e.createRng()).setStart(r.anchorNode, r.anchorOffset), + t.collapse(!0), + (n = e.createRng()).setStart(r.focusNode, r.focusOffset), + n.collapse(!0), + t.compareBoundaryPoints(t.START_TO_START, n) <= 0) + ); + }, + g = { + bookmarkManager: null, + controlSelection: null, + dom: e, + win: t, + serializer: n, + editor: r, + collapse: l, + setCursorLocation: function(t, n) { + var o = e.createRng(); + t + ? (o.setStart(t, n), o.setEnd(t, n), m(o), l(!1)) + : ($h(e, o, r.getBody(), !0), m(o)); + }, + getContent: function(e) { + return uv(r, e); + }, + setContent: c, + getBookmark: function(e, t) { + return o.getBookmark(e, t); + }, + moveToBookmark: function(e) { + return o.moveToBookmark(e); + }, + select: function(t, n) { + var r, o, i; + return ( + ((r = e), + (o = t), + (i = n), + E.from(o).map(function(e) { + var t = r.nodeIndex(e), + n = r.createRng(); + return ( + n.setStart(e.parentNode, t), + n.setEnd(e.parentNode, t + 1), + i && ($h(r, n, e, !0), $h(r, n, e, !1)), + n + ); + })).each(m), + t + ); + }, + isCollapsed: function() { + var e = d(), + t = f(); + return ( + !(!e || e.item) && + (e.compareEndPoints + ? 0 === e.compareEndPoints("StartToEnd", e) + : !t || e.collapsed) + ); + }, + isForward: p, + setNode: function(t) { + return c(e.getOuterHTML(t)), t; + }, + getNode: function() { + return ( + (e = r.getBody()), + (t = d()) + ? ((o = t.startContainer), + (i = t.endContainer), + (a = t.startOffset), + (s = t.endOffset), + (n = t.commonAncestorContainer), + !t.collapsed && + (o === i && + s - a < 2 && + o.hasChildNodes() && + (n = o.childNodes[a]), + 3 === o.nodeType && + 3 === i.nodeType && + ((o = + o.length === a ? mv(o.nextSibling, !0) : o.parentNode), + (i = 0 === s ? mv(i.previousSibling, !1) : i.parentNode), + o && o === i)) + ? o + : n && 3 === n.nodeType + ? n.parentNode + : n) + : e + ); + var e, t, n, o, i, a, s; + }, + getSel: f, + setRng: m, + getRng: d, + getStart: function(e) { + return fv(r.getBody(), d(), e); + }, + getEnd: function(e) { + return dv(r.getBody(), d(), e); + }, + getSelectedBlocks: function(t, n) { + return (function(e, t, n, r) { + var o, + i, + a = []; + if ( + ((i = e.getRoot()), + (n = e.getParent(n || fv(i, t, !1), e.isBlock)), + (r = e.getParent(r || dv(i, t, !1), e.isBlock)), + n && n !== i && a.push(n), + n && r && n !== r) + ) { + o = n; + for (var s = new to(n, i); (o = s.next()) && o !== r; ) + e.isBlock(o) && a.push(o); + } + return r && n !== r && r !== i && a.push(r), a; + })(e, d(), t, n); + }, + normalize: function() { + var t = d(); + if (!Ef(f())) { + var n = Jf.normalize(e, t); + return ( + n.each(function(e) { + m(e, p()); + }), + n.getOr(t) + ); + } + return t; + }, + selectorChanged: function(t, n) { + var o; + return ( + u || + ((u = {}), + (o = {}), + r.on("NodeChange", function(t) { + var n = t.element, + r = e.getParents(n, null, e.getRoot()), + i = {}; + pv(u, function(t, n) { + pv(r, function(a) { + if (e.is(a, n)) + return ( + o[n] || + (pv(t, function(e) { + e(!0, { node: a, selector: n, parents: r }); + }), + (o[n] = t)), + (i[n] = t), + !1 + ); + }); + }), + pv(o, function(e, t) { + i[t] || + (delete o[t], + pv(e, function(e) { + e(!1, { node: n, selector: t, parents: r }); + })); + }); + })), + u[t] || (u[t] = []), + u[t].push(n), + g + ); + }, + getScrollContainer: function() { + for (var t, n = e.getRoot(); n && "BODY" !== n.nodeName; ) { + if (n.scrollHeight > n.clientHeight) { + t = n; + break; + } + n = n.parentNode; + } + return t; + }, + scrollIntoView: function(e, t) { + return Oh(r, e, t); + }, + placeCaretAt: function(e, t) { + return m(Ih(e, t, r.getDoc())); + }, + getBoundingClientRect: function() { + var e = d(); + return e.collapsed + ? ia.fromRangeStart(e).getClientRects()[0] + : e.getBoundingClientRect(); + }, + destroy: function() { + (t = null), i.destroy(); + } + }; + return ( + (o = Ah(g)), + (i = Rh(g, r)), + (g.bookmarkManager = o), + (g.controlSelection = i), + g + ); + }, + yv = ji.curry, + bv = function(e, t, n, r, o, i) { + var a, + s, + u = 0, + c = [], + l = function(r) { + var i, a, l; + for ( + l = gp.getClientRects(r), -1 === e && (l = l.reverse()), i = 0; + i < l.length; + i++ + ) + if (((a = l[i]), !n(a, s))) { + if ((c.length > 0 && t(a, At.last(c)) && u++, (a.line = u), o(a))) + return !0; + c.push(a); + } + }; + return (s = At.last(i.getClientRects())) + ? (l((a = i.getNode())), + (function(e, t, n, r) { + for (; (r = _a.findNode(r, e, ki, t)); ) if (n(r)) return; + })(e, r, l, a), + c) + : c; + }, + Cv = { + upUntil: yv(bv, -1, Ii, Li), + downUntil: yv(bv, 1, Li, Ii), + positionsUntil: function(e, t, n, r) { + var o, + i, + a, + s, + u, + c, + l = Ha(t), + f = [], + d = 0, + m = function(e) { + return At.last(e.getClientRects()); + }; + 1 === e + ? ((o = l.next), (i = Li), (a = Ii), (s = ia.after(r))) + : ((o = l.prev), (i = Ii), (a = Li), (s = ia.before(r))), + (c = m(s)); + do { + if (s.isVisible() && !a((u = m(s)), c)) { + if ( + (f.length > 0 && i(u, At.last(f)) && d++, + ((u = Di(u)).position = s), + (u.line = d), + n(u)) + ) + return f; + f.push(u); + } + } while ((s = o(s))); + return f; + }, + isAboveLine: yv(function(e, t) { + return t.line > e; + }), + isLine: yv(function(e, t) { + return t.line === e; + }) + }, + xv = vo.isContentEditableFalse, + wv = Fi, + Nv = _a.isAfterContentEditableFalse, + Ev = _a.isBeforeContentEditableFalse, + Sv = function(e, t) { + for (; (t = e(t)); ) if (t.isVisible()) return t; + return t; + }, + kv = function(e, t, n) { + return ( + (n = _a.normalizeRange(e, t, n)), + -1 === e ? ia.fromRangeStart(n) : ia.fromRangeEnd(n) + ); + }, + Tv = function(e, t, n, r, o) { + var i, a, s, u, c, l, f, d; + return !o.collapsed && ((i = wv(o)), xv(i)) + ? Dp(e, t, i, -1 === e) + : ((c = o), + (u = mi.isCaretContainerBlock(c.startContainer)), + r((a = kv(e, t.getBody(), o))) + ? Op(t, a.getNode(-1 === e)) + : (a = n(a)) + ? r(a) + ? Dp(e, t, a.getNode(-1 === e), 1 === e) + : r((s = n(a))) && + ((l = a), + (f = s), + (!(d = _a.isInSameBlock(l, f)) && vo.isBr(l.getNode())) || d) + ? Dp(e, t, s.getNode(-1 === e), 1 === e) + : u + ? Ip(t, a.toRange()) + : null + : u + ? o + : null); + }, + Av = function(e, t, n) { + var r, + o, + i, + a, + s = Ha(e.getBody()), + u = ji.curry(Sv, s.next), + c = ji.curry(Sv, s.prev); + if (n.collapsed && e.settings.forced_root_block) { + if (!(r = e.dom.getParent(n.startContainer, "PRE"))) return; + (1 === t ? u(ia.fromRangeStart(n)) : c(ia.fromRangeStart(n))) || + ((a = (i = e).dom.create(i.settings.forced_root_block)), + (!me.ie || me.ie >= 11) && (a.innerHTML = '
'), + (o = a), + 1 === t ? e.$(r).after(o) : e.$(r).before(o), + e.selection.select(o, !0), + e.selection.collapse()); + } + }, + _v = function(e, t) { + var n, + r = t ? 1 : -1, + o = t ? Cv.downUntil : Cv.upUntil, + i = e.selection.getRng(); + return (n = (function(e, t, n, r) { + var o, i, a, s, u, c, l, f, d; + if ( + ((d = wv(r)), + (o = kv(e, t.getBody(), r)), + (i = n(t.getBody(), Cv.isAboveLine(1), o)), + (a = At.filter(i, Cv.isLine(1))), + (u = At.last(o.getClientRects())), + Ev(o) && (d = o.getNode()), + Nv(o) && (d = o.getNode(!0)), + !u) + ) + return null; + if (((c = u.left), (s = Ep(a, c)) && xv(s.node))) + return ( + (l = Math.abs(c - s.left)), + (f = Math.abs(c - s.right)), + Dp(e, t, s.node, l < f) + ); + if (d) { + var m = Cv.positionsUntil(e, t.getBody(), Cv.isAboveLine(1), d); + if ((s = Ep(At.filter(m, Cv.isLine(1)), c))) + return Ip(t, s.position.toRange()); + if ((s = At.last(At.filter(m, Cv.isLine(0))))) + return Ip(t, s.position.toRange()); + } + })(r, e, o, i)) + ? n + : (n = Av(e, r, i)) || null; + }, + Bv = function(e, t) { + return function() { + var n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d = ((r = t), + (i = Ha((n = e).getBody())), + (a = ji.curry(Sv, i.next)), + (s = ji.curry(Sv, i.prev)), + (u = r ? 1 : -1), + (c = r ? a : s), + (l = r ? Ev : Nv), + (f = n.selection.getRng()), + (o = Tv(u, n, c, l, f)) ? o : (o = Av(n, u, f)) || null); + return !!d && (e.selection.setRng(d), !0); + }; + }, + Rv = function(e, t) { + return function() { + var n = _v(e, t); + return !!n && (e.selection.setRng(n), !0); + }; + }, + Dv = function(e, t) { + return M.bind( + ((n = e), + M.map(n, function(e) { + return Zg.merge( + { + shiftKey: !1, + altKey: !1, + ctrlKey: !1, + metaKey: !1, + keyCode: 0, + action: y.noop + }, + e + ); + })), + function(e) { + return ( + (n = e), + (r = t).keyCode === n.keyCode && + r.shiftKey === n.shiftKey && + r.altKey === n.altKey && + r.ctrlKey === n.ctrlKey && + r.metaKey === n.metaKey + ? [e] + : [] + ); + var n, r; + } + ); + var n; + }, + Ov = function(e) { + for (var t = [], n = 1; n < arguments.length; n++) + t[n - 1] = arguments[n]; + var r = Array.prototype.slice.call(arguments, 1); + return function() { + return e.apply(null, r); + }; + }, + Pv = function(e, t) { + return M.find(Dv(e, t), function(e) { + return e.action(); + }); + }, + Iv = function(e, t) { + e.on("keydown", function(n) { + var r, o, i, a; + !1 === n.isDefaultPrevented() && + ((r = e), + (o = t), + (i = n), + (a = Un.detect().os), + Pv( + [ + { keyCode: Mp.RIGHT, action: Bv(r, !0) }, + { keyCode: Mp.LEFT, action: Bv(r, !1) }, + { keyCode: Mp.UP, action: Rv(r, !1) }, + { keyCode: Mp.DOWN, action: Rv(r, !0) }, + { keyCode: Mp.RIGHT, action: of.move(r, o, !0) }, + { keyCode: Mp.LEFT, action: of.move(r, o, !1) }, + { + keyCode: Mp.RIGHT, + ctrlKey: !a.isOSX(), + altKey: a.isOSX(), + action: of.moveNextWord(r, o) + }, + { + keyCode: Mp.LEFT, + ctrlKey: !a.isOSX(), + altKey: a.isOSX(), + action: of.movePrevWord(r, o) + } + ], + i + ).each(function(e) { + i.preventDefault(); + })); + }); + }, + Lv = function(e) { + return 1 === Ur.children(e).length; + }, + Mv = function(e, t) { + var n, + r = Hn.fromDom(e.getBody()), + o = Hn.fromDom(e.selection.getStart()), + i = M.filter( + ((n = Uu(o, r)), + M.findIndex(n, io.isBlock).fold(y.constant(n), function(e) { + return n.slice(0, e); + })), + Lv + ); + return M.last(i) + .map(function(n) { + var r = ia.fromRangeStart(e.selection.getRng()); + return ( + !!Cu(t, r, n.dom()) && + ((function(e, t, n, r) { + var o = y.curry(kl, t), + i = M.map(M.filter(r, o), function(e) { + return e.dom(); + }); + if (0 === i.length) mc(t, e, n); + else { + var a = Sl(n.dom(), i); + t.selection.setRng(a.toRange()); + } + })(t, e, n, i), + !0) + ); + }) + .getOr(!1); + }, + Fv = function(e, t) { + return !!e.selection.isCollapsed() && Mv(e, t); + }, + zv = function(e, t) { + e.on("keydown", function(n) { + var r, o, i; + !1 === n.isDefaultPrevented() && + ((r = e), + (o = t), + (i = n), + Pv( + [ + { keyCode: Mp.BACKSPACE, action: Ov(hc, r, !1) }, + { keyCode: Mp.DELETE, action: Ov(hc, r, !0) }, + { keyCode: Mp.BACKSPACE, action: Ov(cf, r, o, !1) }, + { keyCode: Mp.DELETE, action: Ov(cf, r, o, !0) }, + { keyCode: Mp.BACKSPACE, action: Ov(Ju, r, !1) }, + { keyCode: Mp.DELETE, action: Ov(Ju, r, !0) }, + { keyCode: Mp.BACKSPACE, action: Ov(Ku, r, !1) }, + { keyCode: Mp.DELETE, action: Ov(Ku, r, !0) }, + { keyCode: Mp.BACKSPACE, action: Ov(zf, r, !1) }, + { keyCode: Mp.DELETE, action: Ov(zf, r, !0) }, + { keyCode: Mp.BACKSPACE, action: Ov(Fv, r, !1) }, + { keyCode: Mp.DELETE, action: Ov(Fv, r, !0) } + ], + i + ).each(function(e) { + i.preventDefault(); + })); + }), + e.on("keyup", function(t) { + var n, r; + !1 === t.isDefaultPrevented() && + ((n = e), + (r = t), + Pv( + [ + { keyCode: Mp.BACKSPACE, action: Ov(vc, n) }, + { keyCode: Mp.DELETE, action: Ov(vc, n) } + ], + r + )); + }); + }, + Uv = function(e, t, n) { + var r = e.getParam(t, n); + if (-1 !== r.indexOf("=")) { + var o = e.getParam(t, "", "hash"); + return o.hasOwnProperty(e.id) ? o[e.id] : n; + } + return r; + }, + Vv = function(e) { + return e.getParam("iframe_attrs", {}); + }, + Hv = function(e) { + return e.getParam("doctype", ""); + }, + qv = function(e) { + return e.getParam("document_base_url", ""); + }, + jv = function(e) { + return Uv(e, "body_id", "tinymce"); + }, + $v = function(e) { + return Uv(e, "body_class", ""); + }, + Wv = function(e) { + return e.getParam("content_security_policy", ""); + }, + Kv = function(e) { + return e.getParam("br_in_pre", !0); + }, + Xv = function(e) { + if (e.getParam("force_p_newlines", !1)) return "p"; + var t = e.getParam("forced_root_block", "p"); + return !1 === t ? "" : t; + }, + Yv = function(e) { + return e.getParam("forced_root_block_attrs", {}); + }, + Gv = function(e) { + return e.getParam( + "br_newline_selector", + ".mce-toc h2,figcaption,caption" + ); + }, + Jv = function(e) { + return e.getParam("no_newline_selector", ""); + }, + Qv = function(e) { + return e.getParam("keep_styles", !0); + }, + Zv = function(e) { + return e.getParam("end_container_on_empty_block", !1); + }, + ey = function(e) { + return E.from(e.dom.getParent(e.selection.getStart(!0), e.dom.isBlock)); + }, + ty = function(e, t) { + var n, + r, + o, + i = t, + a = e.dom, + s = e.schema.getMoveCaretBeforeOnEnterElements(); + if (t) { + if (/^(LI|DT|DD)$/.test(t.nodeName)) { + var u = (function(e) { + for (; e; ) { + if ( + 1 === e.nodeType || + (3 === e.nodeType && e.data && /[\r\n\s]/.test(e.data)) + ) + return e; + e = e.nextSibling; + } + })(t.firstChild); + u && + /^(UL|OL|DL)$/.test(u.nodeName) && + t.insertBefore(a.doc.createTextNode("\xa0"), t.firstChild); + } + if (((o = a.createRng()), t.normalize(), t.hasChildNodes())) { + for (n = new to(t, t); (r = n.current()); ) { + if (vo.isText(r)) { + o.setStart(r, 0), o.setEnd(r, 0); + break; + } + if (s[r.nodeName.toLowerCase()]) { + o.setStartBefore(r), o.setEndBefore(r); + break; + } + (i = r), (r = n.next()); + } + r || (o.setStart(i, 0), o.setEnd(i, 0)); + } else + vo.isBr(t) + ? t.nextSibling && a.isBlock(t.nextSibling) + ? (o.setStartBefore(t), o.setEndBefore(t)) + : (o.setStartAfter(t), o.setEndAfter(t)) + : (o.setStart(t, 0), o.setEnd(t, 0)); + e.selection.setRng(o), a.remove(void 0), e.selection.scrollIntoView(t); + } + }, + ny = function(e, t) { + var n, + r, + o = e.getRoot(); + for (n = t; n !== o && "false" !== e.getContentEditable(n); ) + "true" === e.getContentEditable(n) && (r = n), (n = n.parentNode); + return n !== o ? r : o; + }, + ry = ey, + oy = function(e) { + return ey(e).fold(y.constant(""), function(e) { + return e.nodeName.toUpperCase(); + }); + }, + iy = function(e) { + return ey(e) + .filter(function(e) { + return io.isListItem(Hn.fromDom(e)); + }) + .isSome(); + }, + ay = function(e, t) { + return e && e.parentNode && e.parentNode.nodeName === t; + }, + sy = function(e) { + return e && /^(OL|UL|LI)$/.test(e.nodeName); + }, + uy = function(e) { + var t = e.parentNode; + return /^(LI|DT|DD)$/.test(t.nodeName) ? t : e; + }, + cy = function(e, t, n) { + for (var r = e[n ? "firstChild" : "lastChild"]; r && !vo.isElement(r); ) + r = r[n ? "nextSibling" : "previousSibling"]; + return r === t; + }, + ly = function(e, t, n, r, o) { + var i = e.dom, + a = e.selection.getRng(); + if (n !== e.getBody()) { + var s; + sy((s = n)) && sy(s.parentNode) && (o = "LI"); + var u, + c, + l = o ? t(o) : i.create("BR"); + if (cy(n, r, !0) && cy(n, r, !1)) + ay(n, "LI") ? i.insertAfter(l, uy(n)) : i.replace(l, n); + else if (cy(n, r, !0)) + ay(n, "LI") + ? (i.insertAfter(l, uy(n)), + l.appendChild(i.doc.createTextNode(" ")), + l.appendChild(n)) + : n.parentNode.insertBefore(l, n); + else if (cy(n, r, !1)) i.insertAfter(l, uy(n)); + else { + n = uy(n); + var f = a.cloneRange(); + f.setStartAfter(r), f.setEndAfter(n); + var d = f.extractContents(); + "LI" === o && + ((c = "LI"), (u = d).firstChild && u.firstChild.nodeName === c) + ? ((l = d.firstChild), i.insertAfter(d, n)) + : (i.insertAfter(d, n), i.insertAfter(l, n)); + } + i.remove(r), ty(e, l); + } + }, + fy = function(e) { + e.innerHTML = '
'; + }, + dy = function(e, t) { + return ( + e.nodeName === t || + (e.previousSibling && e.previousSibling.nodeName === t) + ); + }, + my = function(e, t) { + return ( + t && + e.isBlock(t) && + !/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName) && + !/^(fixed|absolute)/i.test(t.style.position) && + "true" !== e.getContentEditable(t) + ); + }, + py = function(e, t, n) { + return !1 === vo.isText(t) + ? n + : e + ? 1 === n && t.data.charAt(n - 1) === oi + ? 0 + : n + : n === t.data.length - 1 && t.data.charAt(n) === oi + ? t.data.length + : n; + }, + gy = function(e, t) { + var n, + r, + o = e.getRoot(); + for (n = t; n !== o && "false" !== e.getContentEditable(n); ) + "true" === e.getContentEditable(n) && (r = n), (n = n.parentNode); + return n !== o ? r : o; + }, + hy = function(e, t) { + var n = Xv(e); + n && + n.toLowerCase() === t.tagName.toLowerCase() && + e.dom.setAttribs(t, Yv(e)); + }, + vy = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d, + m, + p, + g, + h, + v, + y, + b, + C = e.dom, + x = e.schema, + w = x.getNonEmptyElements(), + N = e.selection.getRng(), + E = function(t) { + var n, + i, + s, + u = o, + c = x.getTextInlineElements(); + if ( + (t || "TABLE" === f || "HR" === f + ? ((n = C.create(t || m)), hy(e, n)) + : (n = a.cloneNode(!1)), + (s = n), + !1 === Qv(e)) + ) + C.setAttrib(n, "style", null), C.setAttrib(n, "class", null); + else + do { + if (c[u.nodeName]) { + if (Nl(u)) continue; + (i = u.cloneNode(!1)), + C.setAttrib(i, "id", ""), + n.hasChildNodes() + ? (i.appendChild(n.firstChild), n.appendChild(i)) + : ((s = i), n.appendChild(i)); + } + } while ((u = u.parentNode) && u !== r); + return fy(s), n; + }, + S = function(e) { + var t, n, r, s; + if ( + ((s = py(e, o, i)), + vo.isText(o) && (e ? s > 0 : s < o.nodeValue.length)) + ) + return !1; + if (o.parentNode === a && p && !e) return !0; + if (e && vo.isElement(o) && o === a.firstChild) return !0; + if (dy(o, "TABLE") || dy(o, "HR")) return (p && !e) || (!p && e); + for ( + t = new to(o, a), + vo.isText(o) && + (e && 0 === s + ? t.prev() + : e || s !== o.nodeValue.length || t.next()); + (n = t.current()); + + ) { + if (vo.isElement(n)) { + if ( + !n.getAttribute("data-mce-bogus") && + ((r = n.nodeName.toLowerCase()), w[r] && "br" !== r) + ) + return !1; + } else if (vo.isText(n) && !/^[ \t\r\n]*$/.test(n.nodeValue)) + return !1; + e ? t.prev() : t.next(); + } + return !0; + }, + k = function() { + (u = /^(H[1-6]|PRE|FIGURE)$/.test(f) && "HGROUP" !== d ? E(m) : E()), + Zv(e) && my(C, l) && C.isEmpty(a) + ? (u = C.split(l, a)) + : C.insertAfter(u, a), + ty(e, u); + }; + Jf.normalize(C, N).each(function(e) { + N.setStart(e.startContainer, e.startOffset), + N.setEnd(e.endContainer, e.endOffset); + }), + (o = N.startContainer), + (i = N.startOffset), + (m = Xv(e)), + (s = t.shiftKey), + vo.isElement(o) && + o.hasChildNodes() && + ((p = i > o.childNodes.length - 1), + (o = o.childNodes[Math.min(i, o.childNodes.length - 1)] || o), + (i = p && vo.isText(o) ? o.nodeValue.length : 0)), + (r = gy(C, o)) && + (((m && !s) || (!m && s)) && + (o = (function(e, t, n, r, o) { + var i, + a, + s, + u, + c, + l, + f, + d = t || "P", + m = e.dom, + p = gy(m, r); + if (!(a = m.getParent(r, m.isBlock)) || !my(m, a)) { + if ( + ((l = + (a = a || p) === e.getBody() || + ((f = a) && /^(TD|TH|CAPTION)$/.test(f.nodeName)) + ? a.nodeName.toLowerCase() + : a.parentNode.nodeName.toLowerCase()), + !a.hasChildNodes()) + ) + return ( + (i = m.create(d)), + hy(e, i), + a.appendChild(i), + n.setStart(i, 0), + n.setEnd(i, 0), + i + ); + for (u = r; u.parentNode !== a; ) u = u.parentNode; + for (; u && !m.isBlock(u); ) (s = u), (u = u.previousSibling); + if (s && e.schema.isValidChild(l, d.toLowerCase())) { + for ( + i = m.create(d), + hy(e, i), + s.parentNode.insertBefore(i, s), + u = s; + u && !m.isBlock(u); + + ) + (c = u.nextSibling), i.appendChild(u), (u = c); + n.setStart(r, o), n.setEnd(r, o); + } + } + return r; + })(e, m, N, o, i)), + (a = C.getParent(o, C.isBlock)), + (l = a ? C.getParent(a.parentNode, C.isBlock) : null), + (f = a ? a.nodeName.toUpperCase() : ""), + "LI" !== (d = l ? l.nodeName.toUpperCase() : "") || + t.ctrlKey || + ((a = l), (l = l.parentNode), (f = d)), + /^(LI|DT|DD)$/.test(f) && C.isEmpty(a) + ? ly(e, E, l, a, m) + : (m && a === e.getBody()) || + ((m = m || "P"), + mi.isCaretContainerBlock(a) + ? ((u = mi.showCaretContainerBlock(a)), + C.isEmpty(a) && fy(a), + ty(e, u)) + : S() + ? k() + : S(!0) + ? ((u = a.parentNode.insertBefore(E(), a)), + ty(e, dy(a, "HR") ? u : a)) + : ((n = ((y = N), + (b = y.cloneRange()), + b.setStart( + y.startContainer, + py(!0, y.startContainer, y.startOffset) + ), + b.setEnd(y.endContainer, py(!1, y.endContainer, y.endOffset)), + b).cloneRange()).setEndAfter(a), + (function(e) { + do { + vo.isText(e) && + (e.nodeValue = e.nodeValue.replace(/^[\r\n]+/, "")), + (e = e.firstChild); + } while (e); + })((c = n.extractContents())), + (u = c.firstChild), + C.insertAfter(c, a), + (function(e, t, n) { + var r, + o = n, + i = []; + if (o) { + for (; (o = o.firstChild); ) { + if (e.isBlock(o)) return; + vo.isElement(o) && + !t[o.nodeName.toLowerCase()] && + i.push(o); + } + for (r = i.length; r--; ) + !(o = i[r]).hasChildNodes() || + (o.firstChild === o.lastChild && + "" === o.firstChild.nodeValue) + ? e.remove(o) + : (a = o) && + "A" === a.nodeName && + 0 === + Ot.trim(ii(a.innerText || a.textContent)) + .length && + e.remove(o); + var a; + } + })(C, w, u), + (g = C), + (h = a).normalize(), + ((v = h.lastChild) && + !/^(left|right)$/gi.test(g.getStyle(v, "float", !0))) || + g.add(h, "br"), + C.isEmpty(a) && fy(a), + u.normalize(), + C.isEmpty(u) ? (C.remove(u), k()) : ty(e, u)), + C.setAttrib(u, "id", ""), + e.fire("NewBlock", { newBlock: u }))); + }, + yy = function(e, t) { + return ry(e) + .filter(function(e) { + return t.length > 0 && _r.is(Hn.fromDom(e), t); + }) + .isSome(); + }, + by = function(e) { + return yy(e, Gv(e)); + }, + Cy = function(e) { + return yy(e, Jv(e)); + }, + xy = Qu([{ br: [] }, { block: [] }, { none: [] }]), + wy = function(e, t) { + return Cy(e); + }, + Ny = function(e) { + return function(t, n) { + return ("" === Xv(t)) === e; + }; + }, + Ey = function(e) { + return function(t, n) { + return iy(t) === e; + }; + }, + Sy = function(e) { + return function(t, n) { + return ("PRE" === oy(t)) === e; + }; + }, + ky = function(e) { + return function(t, n) { + return Kv(t) === e; + }; + }, + Ty = function(e, t) { + return by(e); + }, + Ay = function(e, t) { + return t; + }, + _y = function(e) { + var t = Xv(e), + n = ny(e.dom, e.selection.getStart()); + return n && e.schema.isValidChild(n.nodeName, t || "P"); + }, + By = function(e, t) { + return function(n, r) { + return M.foldl( + e, + function(e, t) { + return e && t(n, r); + }, + !0 + ) + ? E.some(t) + : E.none(); + }; + }, + Ry = function(e, t) { + return Tl( + [ + By([wy], xy.none()), + By([Sy(!0), ky(!1), Ay], xy.br()), + By([Sy(!0), ky(!1)], xy.block()), + By([Sy(!0), ky(!0), Ay], xy.block()), + By([Sy(!0), ky(!0)], xy.br()), + By([Ey(!0), Ay], xy.br()), + By([Ey(!0)], xy.block()), + By([Ny(!0), Ay, _y], xy.block()), + By([Ny(!0)], xy.br()), + By([Ty], xy.br()), + By([Ny(!1), Ay], xy.br()), + By([_y], xy.block()) + ], + [e, t.shiftKey] + ).getOr(xy.none()); + }, + Dy = function(e, t) { + Ry(e, t).fold( + function() { + sd(e, t); + }, + function() { + vy(e, t); + }, + y.noop + ); + }, + Oy = function(e) { + e.on("keydown", function(t) { + var n, r, o; + t.keyCode === Mp.ENTER && + ((n = e), + (r = t).isDefaultPrevented() || + (r.preventDefault(), + (o = n.undoManager).typing && ((o.typing = !1), o.add()), + n.undoManager.transact(function() { + !1 === n.selection.isCollapsed() && n.execCommand("Delete"), + Dy(n, r); + }))); + }); + }, + Py = function(e, t, n) { + return ( + (s = t), + !( + !Iy(n) || + !vo.isText(s.container()) || + ((r = e), + (i = (o = t).container()), + (a = o.offset()), + i.insertData(a, "\xa0"), + r.selection.setCursorLocation(i, a + 1), + 0) + ) + ); + var r, o, i, a, s; + }, + Iy = function(e) { + return e.fold( + y.constant(!1), + y.constant(!0), + y.constant(!0), + y.constant(!1) + ); + }, + Ly = function(e) { + return ( + !!e.selection.isCollapsed() && + ((t = e), + (n = y.curry(vu.isInlineTarget, t)), + (r = ia.fromRangeStart(t.selection.getRng())), + $l(n, t.getBody(), r) + .map(y.curry(Py, t, r)) + .getOr(!1)) + ); + var t, n, r; + }, + My = function(e) { + e.on("keydown", function(t) { + var n, r; + !1 === t.isDefaultPrevented() && + ((n = e), + (r = t), + Pv([{ keyCode: Mp.SPACEBAR, action: Ov(Ly, n) }], r).each(function( + e + ) { + r.preventDefault(); + })); + }); + }, + Fy = function(e) { + var t = of.setupSelectedState(e); + Iv(e, t), zv(e, t), Oy(e), My(e); + }, + zy = function(e) { + var t, + n, + r, + o = Ot.each, + i = Mp.BACKSPACE, + a = Mp.DELETE, + s = e.dom, + u = e.selection, + c = e.settings, + l = e.parser, + f = me.gecko, + d = me.ie, + m = me.webkit, + p = "data:text/mce-internal,", + g = d ? "Text" : "URL", + h = function(t, n) { + try { + e.getDoc().execCommand(t, !1, n); + } catch (r) {} + }, + v = function(e) { + return e.isDefaultPrevented(); + }, + y = function() { + e.shortcuts.add("meta+a", null, "SelectAll"); + }, + b = function() { + e.on("keydown", function(e) { + if ( + !v(e) && + e.keyCode === i && + u.isCollapsed() && + 0 === u.getRng().startOffset + ) { + var t = u.getNode().previousSibling; + if (t && t.nodeName && "table" === t.nodeName.toLowerCase()) + return e.preventDefault(), !1; + } + }); + }, + C = function() { + e.inline || + (e.contentStyles.push("body {min-height: 150px}"), + e.on("click", function(t) { + var n; + if ("HTML" === t.target.nodeName) { + if (me.ie > 11) return void e.getBody().focus(); + (n = e.selection.getRng()), + e.getBody().focus(), + e.selection.setRng(n), + e.selection.normalize(), + e.nodeChanged(); + } + })); + }; + return ( + e.on("keydown", function(t) { + var n, r, o, i, a; + if ( + !v(t) && + t.keyCode === Mp.BACKSPACE && + ((r = (n = u.getRng()).startContainer), + (o = n.startOffset), + (i = s.getRoot()), + (a = r), + n.collapsed && 0 === o) + ) { + for ( + ; + a && + a.parentNode && + a.parentNode.firstChild === a && + a.parentNode !== i; + + ) + a = a.parentNode; + "BLOCKQUOTE" === a.tagName && + (e.formatter.toggle("blockquote", null, a), + (n = s.createRng()).setStart(r, 0), + n.setEnd(r, 0), + u.setRng(n)); + } + }), + (t = function(e) { + var t = s.create("body"), + n = e.cloneContents(); + return ( + t.appendChild(n), u.serializer.serialize(t, { format: "html" }) + ); + }), + e.on("keydown", function(n) { + var r, + o, + u, + c, + l, + f = n.keyCode; + if (!v(n) && (f === a || f === i)) { + if ( + ((r = e.selection.isCollapsed()), + (o = e.getBody()), + r && !s.isEmpty(o)) + ) + return; + if ( + !r && + ((u = e.selection.getRng()), + (c = t(u)), + (l = s.createRng()).selectNode(e.getBody()), + c !== t(l)) + ) + return; + n.preventDefault(), + e.setContent(""), + o.firstChild && s.isBlock(o.firstChild) + ? e.selection.setCursorLocation(o.firstChild, 0) + : e.selection.setCursorLocation(o, 0), + e.nodeChanged(); + } + }), + me.windowsPhone || + e.on( + "keyup focusin mouseup", + function(e) { + Mp.modifierPressed(e) || u.normalize(); + }, + !0 + ), + m && + (e.settings.content_editable || + s.bind(e.getDoc(), "mousedown mouseup", function(t) { + var n; + if (t.target === e.getDoc().documentElement) + if ( + ((n = u.getRng()), + e.getBody().focus(), + "mousedown" === t.type) + ) { + if (mi.isCaretContainer(n.startContainer)) return; + u.placeCaretAt(t.clientX, t.clientY); + } else u.setRng(n); + }), + e.on("click", function(t) { + var n = t.target; + /^(IMG|HR)$/.test(n.nodeName) && + "false" !== s.getContentEditableParent(n) && + (t.preventDefault(), e.selection.select(n), e.nodeChanged()), + "A" === n.nodeName && + s.hasClass(n, "mce-item-anchor") && + (t.preventDefault(), u.select(n)); + }), + c.forced_root_block && + e.on("init", function() { + h("DefaultParagraphSeparator", c.forced_root_block); + }), + e.on("init", function() { + e.dom.bind(e.getBody(), "submit", function(e) { + e.preventDefault(); + }); + }), + b(), + l.addNodeFilter("br", function(e) { + for (var t = e.length; t--; ) + "Apple-interchange-newline" === e[t].attr("class") && + e[t].remove(); + }), + me.iOS + ? (e.inline || + e.on("keydown", function() { + document.activeElement === document.body && + e.getWin().focus(); + }), + C(), + e.on("click", function(e) { + var t = e.target; + do { + if ("A" === t.tagName) return void e.preventDefault(); + } while ((t = t.parentNode)); + }), + e.contentStyles.push( + ".mce-content-body {-webkit-touch-callout: none}" + )) + : y()), + me.ie >= 11 && (C(), b()), + me.ie && + (y(), + h("AutoUrlDetect", !1), + e.on("dragstart", function(t) { + var n, r, o; + (n = t).dataTransfer && + (e.selection.isCollapsed() && + "IMG" === n.target.tagName && + u.select(n.target), + (r = e.selection.getContent()).length > 0 && + ((o = p + escape(e.id) + "," + escape(r)), + n.dataTransfer.setData(g, o))); + }), + e.on("drop", function(t) { + if (!v(t)) { + var n = + (a = t).dataTransfer && + (s = a.dataTransfer.getData(g)) && + s.indexOf(p) >= 0 + ? ((s = s.substr(p.length).split(",")), + { id: unescape(s[0]), html: unescape(s[1]) }) + : null; + if (n && n.id !== e.id) { + t.preventDefault(); + var r = Ih(t.x, t.y, e.getDoc()); + u.setRng(r), + (o = n.html), + (i = !0), + e.queryCommandSupported("mceInsertClipboardContent") + ? e.execCommand("mceInsertClipboardContent", !1, { + content: o, + internal: i + }) + : e.execCommand("mceInsertContent", !1, o); + } + } + var o, i, a, s; + })), + f && + (e.on("keydown", function(t) { + if (!v(t) && t.keyCode === i) { + if (!e.getBody().getElementsByTagName("hr").length) return; + if (u.isCollapsed() && 0 === u.getRng().startOffset) { + var n = u.getNode(), + r = n.previousSibling; + if ("HR" === n.nodeName) + return s.remove(n), void t.preventDefault(); + r && + r.nodeName && + "hr" === r.nodeName.toLowerCase() && + (s.remove(r), t.preventDefault()); + } + } + }), + Range.prototype.getClientRects || + e.on("mousedown", function(t) { + if (!v(t) && "HTML" === t.target.nodeName) { + var n = e.getBody(); + n.blur(), + ye.setEditorTimeout(e, function() { + n.focus(); + }); + } + }), + (n = function() { + var t = s.getAttribs(u.getStart().cloneNode(!1)); + return function() { + var n = u.getStart(); + n !== e.getBody() && + (s.setAttrib(n, "style", null), + o(t, function(e) { + n.setAttributeNode(e.cloneNode(!0)); + })); + }; + }), + (r = function() { + return ( + !u.isCollapsed() && + s.getParent(u.getStart(), s.isBlock) !== + s.getParent(u.getEnd(), s.isBlock) + ); + }), + e.on("keypress", function(t) { + var o; + if (!v(t) && (8 === t.keyCode || 46 === t.keyCode) && r()) + return ( + (o = n()), + e.getDoc().execCommand("delete", !1, null), + o(), + t.preventDefault(), + !1 + ); + }), + s.bind(e.getDoc(), "cut", function(t) { + var o; + !v(t) && + r() && + ((o = n()), + ye.setEditorTimeout(e, function() { + o(); + })); + }), + c.readonly || + e.on("BeforeExecCommand MouseDown", function() { + h("StyleWithCSS", !1), + h("enableInlineTableEditing", !1), + c.object_resizing || h("enableObjectResizing", !1); + }), + e.on("SetContent ExecCommand", function(e) { + ("setcontent" !== e.type && "mceInsertLink" !== e.command) || + o(s.select("a"), function(e) { + var t = e.parentNode, + n = s.getRoot(); + if (t.lastChild === e) { + for (; t && !s.isBlock(t); ) { + if (t.parentNode.lastChild !== t || t === n) return; + t = t.parentNode; + } + s.add(t, "br", { "data-mce-bogus": 1 }); + } + }); + }), + e.contentStyles.push( + "img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}" + ), + me.mac && + e.on("keydown", function(t) { + !Mp.metaKeyPressed(t) || + t.shiftKey || + (37 !== t.keyCode && 39 !== t.keyCode) || + (t.preventDefault(), + e.selection + .getSel() + .modify( + "move", + 37 === t.keyCode ? "backward" : "forward", + "lineboundary" + )); + }), + b()), + { + refreshContentEditable: function() {}, + isHidden: function() { + var t; + return !f || e.removed + ? 0 + : !(t = e.selection.getSel()) || + !t.rangeCount || + 0 === t.rangeCount; + } + } + ); + }, + Uy = Xo.DOM, + Vy = function(e) { + var t; + e.bindPendingEventDelegates(), + (e.initialized = !0), + e.fire("init"), + e.focus(!0), + e.nodeChanged({ initial: !0 }), + e.execCallback("init_instance_callback", e), + (t = e).settings.auto_focus && + ye.setEditorTimeout( + t, + function() { + var e; + (e = + !0 === t.settings.auto_focus + ? t + : t.editorManager.get(t.settings.auto_focus)).destroyed || + e.focus(); + }, + 100 + ); + }, + Hy = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c, + l, + f = e.settings, + d = e.getElement(), + m = e.getDoc(); + f.inline || (e.getElement().style.visibility = e.orgVisibility), + t || f.content_editable || (m.open(), m.write(e.iframeHTML), m.close()), + f.content_editable && + (e.on("remove", function() { + var e = this.getBody(); + Uy.removeClass(e, "mce-content-body"), + Uy.removeClass(e, "mce-edit-focus"), + Uy.setAttrib(e, "contentEditable", null); + }), + Uy.addClass(d, "mce-content-body"), + (e.contentDocument = m = f.content_document || document), + (e.contentWindow = f.content_window || window), + (e.bodyElement = d), + (f.content_document = f.content_window = null), + (f.root_name = d.nodeName.toLowerCase())), + ((n = e.getBody()).disabled = !0), + (e.readonly = f.readonly), + e.readonly || + (e.inline && + "static" === Uy.getStyle(n, "position", !0) && + (n.style.position = "relative"), + (n.contentEditable = e.getParam("content_editable_state", !0))), + (n.disabled = !1), + (e.editorUpload = Jm(e)), + (e.schema = Fo(f)), + (e.dom = new Xo(m, { + keep_values: !0, + url_converter: e.convertURL, + url_converter_scope: e, + hex_colors: f.force_hex_style_colors, + class_filter: f.class_filter, + update_styles: !0, + root_element: e.inline ? e.getBody() : null, + collect: f.content_editable, + schema: e.schema, + onSetAttrib: function(t) { + e.fire("SetAttrib", t); + } + })), + (e.parser = ((i = bh((o = e).settings, o.schema)).addAttributeFilter( + "src,href,style,tabindex", + function(e, t) { + for (var n, r, i, a = e.length, s = o.dom; a--; ) + if ( + ((r = (n = e[a]).attr(t)), + (i = "data-mce-" + t), + !n.attributes.map[i]) + ) { + if (0 === r.indexOf("data:") || 0 === r.indexOf("blob:")) + continue; + "style" === t + ? ((r = s.serializeStyle(s.parseStyle(r), n.name)).length || + (r = null), + n.attr(i, r), + n.attr(t, r)) + : "tabindex" === t + ? (n.attr(i, r), n.attr(t, null)) + : n.attr(i, o.convertURL(r, t, n.name)); + } + } + ), + i.addNodeFilter("script", function(e) { + for (var t, n, r = e.length; r--; ) + 0 !== (n = (t = e[r]).attr("type") || "no/type").indexOf("mce-") && + t.attr("type", "mce-" + n); + }), + i.addNodeFilter("#cdata", function(e) { + for (var t, n = e.length; n--; ) + ((t = e[n]).type = 8), + (t.name = "#comment"), + (t.value = "[CDATA[" + t.value + "]]"); + }), + i.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div", function(e) { + for (var t, n = e.length, r = o.schema.getNonEmptyElements(); n--; ) + (t = e[n]).isEmpty(r) && + 0 === t.getAll("br").length && + (t.append(new fh("br", 1)).shortEnded = !0); + }), + i)), + (e.serializer = Nh(f, e)), + (e.selection = vv(e.dom, e.getWin(), e.serializer, e)), + (e.formatter = Yg(e)), + (e.undoManager = rg(e)), + (e._nodeChangeDispatcher = new tp(e)), + (e._selectionOverrides = Hp(e)), + kh(e), + Fy(e), + ep(e), + e.fire("PreInit"), + f.browser_spellcheck || + f.gecko_spellcheck || + ((m.body.spellcheck = !1), Uy.setAttrib(n, "spellcheck", "false")), + (e.quirks = zy(e)), + e.fire("PostRender"), + f.directionality && (n.dir = f.directionality), + f.nowrap && (n.style.whiteSpace = "nowrap"), + f.protect && + e.on("BeforeSetContent", function(e) { + Ot.each(f.protect, function(t) { + e.content = e.content.replace(t, function(e) { + return "\x3c!--mce:protected " + escape(e) + "--\x3e"; + }); + }); + }), + e.on("SetContent", function() { + e.addVisual(e.getBody()); + }), + f.padd_empty_editor && + e.on("PostProcess", function(e) { + e.content = e.content.replace( + /^(]*>( | |\s|\u00a0|
|)<\/p>[\r\n]*|
[\r\n]*)$/, + "" + ); + }), + e.load({ initial: !0, format: "html" }), + (e.startContent = e.getContent({ format: "raw" })), + e.on("compositionstart compositionend", function(t) { + e.composing = "compositionstart" === t.type; + }), + e.contentStyles.length > 0 && + ((r = ""), + Ot.each(e.contentStyles, function(e) { + r += e + "\r\n"; + }), + e.dom.addStyle(r)), + ((a = e), + a.inline ? Uy.styleSheetLoader : a.dom.styleSheetLoader).loadAll( + e.contentCSS, + function(t) { + Vy(e); + }, + function(t) { + Vy(e); + } + ), + f.content_style && + ((s = e), + (u = f.content_style), + (c = Hn.fromDom(s.getDoc().head)), + (l = Hn.fromTag("style")), + dr.set(l, "type", "text/css"), + ks.append(l, Hn.fromText(u)), + ks.append(c, l)); + }, + qy = Xo.DOM, + jy = function(e, t) { + var n, + r, + o, + i, + a, + s, + u, + c = e.editorManager.translate( + "Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help" + ), + l = ((n = e.id), + (r = c), + (o = t.height), + (i = Vv(e)), + (u = Hn.fromTag("iframe")), + dr.setAll(u, i), + dr.setAll(u, { + id: n + "_ifr", + frameBorder: "0", + allowTransparency: "true", + title: r + }), + br(u, { + width: "100%", + height: ((a = o), (s = "number" == typeof a ? a + "px" : a), s || ""), + display: "block" + }), + u).dom(); + l.onload = function() { + (l.onload = null), e.fire("load"); + }; + var f, + d, + m, + p, + g = (function(e, t) { + if ( + document.domain !== window.location.hostname && + me.ie && + me.ie < 12 + ) { + var n = Gm("mce"); + e[n] = function() { + Hy(e); + }; + var r = + 'javascript:(function(){document.open();document.domain="' + + document.domain + + '";var ed = window.parent.tinymce.get("' + + e.id + + '");document.write(ed.iframeHTML);document.close();ed.' + + n + + "(true);})()"; + return qy.setAttrib(t, "src", r), !0; + } + return !1; + })(e, l); + return ( + (e.contentAreaContainer = t.iframeContainer), + (e.iframeElement = l), + (e.iframeHTML = ((p = Hv((f = e)) + ""), + qv(f) !== f.documentBaseUrl && + (p += ''), + (p += + ''), + (d = jv(f)), + (m = $v(f)), + Wv(f) && + (p += + ''), + (p += + '
'))), + qy.add(t.iframeContainer, l), + g + ); + }, + $y = function(e, t) { + var n = jy(e, t); + t.editorContainer && + ((qy.get(t.editorContainer).style.display = e.orgDisplay), + (e.hidden = qy.isHidden(t.editorContainer))), + (e.getElement().style.display = "none"), + qy.setAttrib(e.id, "aria-hidden", !0), + n || Hy(e); + }, + Wy = Xo.DOM, + Ky = function(e, t, n) { + var r, + o, + i = Im.get(n); + if ( + ((r = Im.urls[n] || e.documentBaseUrl.replace(/\/$/, "")), + (n = Ot.trim(n)), + i && -1 === Ot.inArray(t, n)) + ) { + if ( + (Ot.each(Im.dependencies(n), function(n) { + Ky(e, t, n); + }), + e.plugins[n]) + ) + return; + (o = new i(e, r, e.$)), + (e.plugins[n] = o), + o.init && (o.init(e, r), t.push(n)); + } + }, + Xy = function(e) { + return e.replace(/^\-/, ""); + }, + Yy = function(e) { + return { editorContainer: e, iframeContainer: e }; + }, + Gy = function(e) { + var t, + n, + r = e.getElement(); + return e.inline + ? Yy(null) + : ((t = r), (n = Wy.create("div")), Wy.insertAfter(n, t), Yy(n)); + }, + Jy = function(e) { + var t, + n, + r, + o, + i, + a, + s, + u, + c, + l, + f, + d = e.settings, + m = e.getElement(); + return ( + (e.orgDisplay = m.style.display), + tr.isString(d.theme) + ? ((l = (o = e).settings), + (f = o.getElement()), + (i = l.width || Wy.getStyle(f, "width") || "100%"), + (a = l.height || Wy.getStyle(f, "height") || f.offsetHeight), + (s = l.min_height || 100), + (u = /^[0-9\.]+(|px)$/i).test("" + i) && + (i = Math.max(parseInt(i, 10), 100)), + u.test("" + a) && (a = Math.max(parseInt(a, 10), s)), + (c = o.theme.renderUI({ + targetNode: f, + width: i, + height: a, + deltaWidth: l.delta_width, + deltaHeight: l.delta_height + })), + l.content_editable || + ((a = + (c.iframeHeight || a) + + ("number" == typeof a ? c.deltaHeight || 0 : "")) < s && + (a = s)), + (c.height = a), + c) + : tr.isFunction(d.theme) + ? ((r = (t = e).getElement()), + (n = t.settings.theme(t, r)).editorContainer.nodeType && + (n.editorContainer.id = n.editorContainer.id || t.id + "_parent"), + n.iframeContainer && + n.iframeContainer.nodeType && + (n.iframeContainer.id = + n.iframeContainer.id || t.id + "_iframecontainer"), + (n.height = n.iframeHeight ? n.iframeHeight : r.offsetHeight), + n) + : Gy(e) + ); + }, + Qy = function(e) { + var t, + n, + r, + o, + i, + a, + s = e.settings, + u = e.getElement(); + return ( + (e.rtl = s.rtl_ui || e.editorManager.i18n.rtl), + e.editorManager.i18n.setCode(s.language), + (s.aria_label = + s.aria_label || + Wy.getAttrib(u, "aria-label", e.getLang("aria.rich_text_area"))), + e.fire("ScriptsLoaded"), + (o = (n = e).settings.theme), + tr.isString(o) + ? ((n.settings.theme = Xy(o)), + (r = Lm.get(o)), + (n.theme = new r(n, Lm.urls[o])), + n.theme.init && + n.theme.init( + n, + Lm.urls[o] || n.documentBaseUrl.replace(/\/$/, ""), + n.$ + )) + : (n.theme = {}), + (i = e), + (a = []), + Ot.each(i.settings.plugins.split(/[ ,]/), function(e) { + Ky(i, a, Xy(e)); + }), + (t = Jy(e)), + (e.editorContainer = t.editorContainer ? t.editorContainer : null), + s.content_css && + Ot.each(Ot.explode(s.content_css), function(t) { + e.contentCSS.push(e.documentBaseURI.toAbsolute(t)); + }), + s.content_editable ? Hy(e) : $y(e, t) + ); + }, + Zy = Xo.DOM, + eb = function(e) { + return "-" === e.charAt(0); + }, + tb = function(e, t) { + var n = Zo.ScriptLoader; + !(function(e, t, n, r) { + var o = t.settings, + i = o.theme; + if (tr.isString(i)) { + if (!eb(i) && !Lm.urls.hasOwnProperty(i)) { + var a = o.theme_url; + a + ? Lm.load(i, t.documentBaseURI.toAbsolute(a)) + : Lm.load(i, "themes/" + i + "/theme" + n + ".js"); + } + e.loadQueue(function() { + Lm.waitFor(i, r); + }); + } else r(); + })(n, e, t, function() { + var r, o, i, a, s; + (r = n), + (i = (o = e).settings).language && + "en" !== i.language && + !i.language_url && + (i.language_url = + o.editorManager.baseURL + "/langs/" + i.language + ".js"), + i.language_url && + !o.editorManager.i18n.data[i.language] && + r.add(i.language_url), + (a = e.settings), + (s = t), + Ot.isArray(a.plugins) && (a.plugins = a.plugins.join(" ")), + Ot.each(a.external_plugins, function(e, t) { + Im.load(t, e), (a.plugins += " " + t); + }), + Ot.each(a.plugins.split(/[ ,]/), function(e) { + if ((e = Ot.trim(e)) && !Im.urls[e]) + if (eb(e)) { + e = e.substr(1, e.length); + var t = Im.dependencies(e); + Ot.each(t, function(e) { + var t = { + prefix: "plugins/", + resource: e, + suffix: "/plugin" + s + ".js" + }; + (e = Im.createUrl(t, e)), Im.load(e.resource, e); + }); + } else + Im.load(e, { + prefix: "plugins/", + resource: e, + suffix: "/plugin" + s + ".js" + }); + }), + n.loadQueue( + function() { + e.removed || Qy(e); + }, + e, + function(t) { + Rm(e, t[0]), e.removed || Qy(e); + } + ); + }); + }, + nb = function(e) { + var t = e.settings, + n = e.id, + r = function() { + Zy.unbind(window, "ready", r), e.render(); + }; + if (Te.Event.domLoaded) { + if (e.getElement() && me.contentEditable) { + t.inline + ? (e.inline = !0) + : ((e.orgVisibility = e.getElement().style.visibility), + (e.getElement().style.visibility = "hidden")); + var o = e.getElement().form || Zy.getParent(n, "form"); + o && + ((e.formElement = o), + t.hidden_input && + !/TEXTAREA|INPUT/i.test(e.getElement().nodeName) && + (Zy.insertAfter( + Zy.create("input", { type: "hidden", name: n }), + n + ), + (e.hasHiddenInput = !0)), + (e.formEventDelegate = function(t) { + e.fire(t.type, t); + }), + Zy.bind(o, "submit reset", e.formEventDelegate), + e.on("reset", function() { + e.setContent(e.startContent, { format: "raw" }); + }), + !t.submit_patch || + o.submit.nodeType || + o.submit.length || + o._mceOldSubmit || + ((o._mceOldSubmit = o.submit), + (o.submit = function() { + return ( + e.editorManager.triggerSave(), + e.setDirty(!1), + o._mceOldSubmit(o) + ); + }))), + (e.windowManager = km(e)), + (e.notificationManager = Sm(e)), + "xml" === t.encoding && + e.on("GetContent", function(e) { + e.save && (e.content = Zy.encode(e.content)); + }), + t.add_form_submit_trigger && + e.on("submit", function() { + e.initialized && e.save(); + }), + t.add_unload_trigger && + ((e._beforeUnload = function() { + !e.initialized || + e.destroyed || + e.isHidden() || + e.save({ format: "raw", no_events: !0, set_dirty: !1 }); + }), + e.editorManager.on("BeforeUnload", e._beforeUnload)), + e.editorManager.add(e), + tb(e, e.suffix); + } + } else Zy.bind(window, "ready", r); + }, + rb = function(e, t, n) { + var r = e.sidebars ? e.sidebars : []; + r.push({ name: t, settings: n }), (e.sidebars = r); + }, + ob = Ot.each, + ib = Ot.trim, + ab = "source protocol authority userInfo user password host port relative path directory file query anchor".split( + " " + ), + sb = { ftp: 21, http: 80, https: 443, mailto: 25 }, + ub = function(e, t) { + var n, + r, + o = this; + if ( + ((e = ib(e)), + (n = (t = o.settings = t || {}).base_uri), + /^([\w\-]+):([^\/]{2})/i.test(e) || /^\s*#/.test(e)) + ) + o.source = e; + else { + var i = 0 === e.indexOf("//"); + 0 !== e.indexOf("/") || + i || + (e = ((n && n.protocol) || "http") + "://mce_host" + e), + /^[\w\-]*:?\/\//.test(e) || + ((r = t.base_uri + ? t.base_uri.path + : new ub(document.location.href).directory), + "" == t.base_uri.protocol + ? (e = "//mce_host" + o.toAbsPath(r, e)) + : ((e = /([^#?]*)([#?]?.*)/.exec(e)), + (e = + ((n && n.protocol) || "http") + + "://mce_host" + + o.toAbsPath(r, e[1]) + + e[2]))), + (e = e.replace(/@@/g, "(mce_at)")), + (e = /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec( + e + )), + ob(ab, function(t, n) { + var r = e[n]; + r && (r = r.replace(/\(mce_at\)/g, "@@")), (o[t] = r); + }), + n && + (o.protocol || (o.protocol = n.protocol), + o.userInfo || (o.userInfo = n.userInfo), + o.port || "mce_host" !== o.host || (o.port = n.port), + (o.host && "mce_host" !== o.host) || (o.host = n.host), + (o.source = "")), + i && (o.protocol = ""); + } + }; + (ub.prototype = { + setPath: function(e) { + (e = /^(.*?)\/?(\w+)?$/.exec(e)), + (this.path = e[0]), + (this.directory = e[1]), + (this.file = e[2]), + (this.source = ""), + this.getURI(); + }, + toRelative: function(e) { + var t; + if ("./" === e) return e; + if ( + ("mce_host" !== (e = new ub(e, { base_uri: this })).host && + this.host !== e.host && + e.host) || + this.port !== e.port || + (this.protocol !== e.protocol && "" !== e.protocol) + ) + return e.getURI(); + var n = this.getURI(), + r = e.getURI(); + return n === r || + ("/" === n.charAt(n.length - 1) && n.substr(0, n.length - 1) === r) + ? n + : ((t = this.toRelPath(this.path, e.path)), + e.query && (t += "?" + e.query), + e.anchor && (t += "#" + e.anchor), + t); + }, + toAbsolute: function(e, t) { + return (e = new ub(e, { base_uri: this })).getURI( + t && this.isSameOrigin(e) + ); + }, + isSameOrigin: function(e) { + if (this.host == e.host && this.protocol == e.protocol) { + if (this.port == e.port) return !0; + var t = sb[this.protocol]; + if (t && (this.port || t) == (e.port || t)) return !0; + } + return !1; + }, + toRelPath: function(e, t) { + var n, + r, + o, + i = 0, + a = ""; + if ( + ((e = (e = e.substring(0, e.lastIndexOf("/"))).split("/")), + (n = t.split("/")), + e.length >= n.length) + ) + for (r = 0, o = e.length; r < o; r++) + if (r >= n.length || e[r] !== n[r]) { + i = r + 1; + break; + } + if (e.length < n.length) + for (r = 0, o = n.length; r < o; r++) + if (r >= e.length || e[r] !== n[r]) { + i = r + 1; + break; + } + if (1 === i) return t; + for (r = 0, o = e.length - (i - 1); r < o; r++) a += "../"; + for (r = i - 1, o = n.length; r < o; r++) + a += r !== i - 1 ? "/" + n[r] : n[r]; + return a; + }, + toAbsPath: function(e, t) { + var n, + r, + o, + i = 0, + a = []; + for ( + r = /\/$/.test(t) ? "/" : "", + e = e.split("/"), + t = t.split("/"), + ob(e, function(e) { + e && a.push(e); + }), + e = a, + n = t.length - 1, + a = []; + n >= 0; + n-- + ) + 0 !== t[n].length && + "." !== t[n] && + (".." !== t[n] ? (i > 0 ? i-- : a.push(t[n])) : i++); + return ( + 0 !== + (o = + (n = e.length - i) <= 0 + ? a.reverse().join("/") + : e.slice(0, n).join("/") + "/" + a.reverse().join("/")).indexOf( + "/" + ) && (o = "/" + o), + r && o.lastIndexOf("/") !== o.length - 1 && (o += r), + o + ); + }, + getURI: function(e) { + var t, + n = this; + return ( + (n.source && !e) || + ((t = ""), + e || + (n.protocol ? (t += n.protocol + "://") : (t += "//"), + n.userInfo && (t += n.userInfo + "@"), + n.host && (t += n.host), + n.port && (t += ":" + n.port)), + n.path && (t += n.path), + n.query && (t += "?" + n.query), + n.anchor && (t += "#" + n.anchor), + (n.source = t)), + n.source + ); + } + }), + (ub.parseDataUri = function(e) { + var t, n; + return ( + (e = decodeURIComponent(e).split(",")), + (n = /data:([^;]+)/.exec(e[0])) && (t = n[1]), + { type: t, data: e[1] } + ); + }), + (ub.getDocumentBaseUrl = function(e) { + var t; + return ( + (t = + 0 !== e.protocol.indexOf("http") && "file:" !== e.protocol + ? e.href + : e.protocol + "//" + e.host + e.pathname), + /^[^:]+:\/\/\/?[^\/]+\//.test(t) && + ((t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, "")), + /[\/\\]$/.test(t) || (t += "/")), + t + ); + }); + var cb = Xo.DOM, + lb = Ot.extend, + fb = Ot.each, + db = Ot.trim, + mb = Ot.resolve, + pb = me.ie, + gb = function(e, t, n) { + var r, + o, + i, + a, + s, + u, + c, + l, + f, + d = this; + (r = d.documentBaseUrl = n.documentBaseURL), + (o = n.baseURI), + (i = d), + (a = e), + (s = r), + (u = n.defaultSettings), + (c = t), + (f = { + id: a, + theme: "modern", + delta_width: 0, + delta_height: 0, + popup_css: "", + plugins: "", + document_base_url: s, + add_form_submit_trigger: !0, + submit_patch: !0, + add_unload_trigger: !0, + convert_urls: !0, + relative_urls: !0, + remove_script_host: !0, + object_resizing: !0, + doctype: "", + visual: !0, + font_size_style_values: + "xx-small,x-small,small,medium,large,x-large,xx-large", + font_size_legacy_values: + "xx-small,small,medium,large,x-large,xx-large,300%", + forced_root_block: "p", + hidden_input: !0, + padd_empty_editor: !0, + render_ui: !0, + indentation: "30px", + inline_styles: !0, + convert_fonts_to_spans: !0, + indent: "simple", + indent_before: + "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist", + indent_after: + "p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist", + entity_encoding: "named", + url_converter: (l = i).convertURL, + url_converter_scope: l, + ie7_compat: !0 + }), + (t = lu(ou, f, u, c)), + (d.settings = t), + (ti.language = t.language || "en"), + (ti.languageLoad = t.language_load), + (ti.baseURL = n.baseURL), + (d.id = e), + d.setDirty(!1), + (d.plugins = {}), + (d.documentBaseURI = new ub(t.document_base_url, { base_uri: o })), + (d.baseURI = o), + (d.contentCSS = []), + (d.contentStyles = []), + (d.shortcuts = new Jd(d)), + (d.loadedCSS = {}), + (d.editorCommands = new Od(d)), + (d.suffix = n.suffix), + (d.editorManager = n), + (d.inline = t.inline), + (d.buttons = {}), + (d.menuItems = {}), + t.cache_suffix && + (me.cacheSuffix = t.cache_suffix.replace(/^[\?\&]+/, "")), + !1 === t.override_viewport && (me.overrideViewPort = !1), + n.fire("SetupEditor", d), + d.execCallback("setup", d), + (d.$ = Qt.overrideDefaults(function() { + return { + context: d.inline ? d.getBody() : d.getDoc(), + element: d.getBody() + }; + })); + }; + lb( + (gb.prototype = { + render: function() { + nb(this); + }, + focus: function(e) { + gm(this, e); + }, + execCallback: function(e) { + var t, + n = this.settings[e]; + if (n) + return ( + this.callbackLookup && + (t = this.callbackLookup[e]) && + ((n = t.func), (t = t.scope)), + "string" == typeof n && + ((t = (t = n.replace(/\.\w+$/, "")) ? mb(t) : 0), + (n = mb(n)), + (this.callbackLookup = this.callbackLookup || {}), + (this.callbackLookup[e] = { func: n, scope: t })), + n.apply(t || this, Array.prototype.slice.call(arguments, 1)) + ); + }, + translate: function(e) { + if (e && Ot.is(e, "string")) { + var t = this.settings.language || "en", + n = this.editorManager.i18n; + e = + n.data[t + "." + e] || + e.replace(/\{\#([^\}]+)\}/g, function(e, r) { + return n.data[t + "." + r] || "{#" + r + "}"; + }); + } + return this.editorManager.translate(e); + }, + getLang: function(e, t) { + return ( + this.editorManager.i18n.data[ + (this.settings.language || "en") + "." + e + ] || (t !== undefined ? t : "{#" + e + "}") + ); + }, + getParam: function(e, t, n) { + return mu(this, e, t, n); + }, + nodeChanged: function(e) { + this._nodeChangeDispatcher.nodeChanged(e); + }, + addButton: function(e, t) { + var n = this; + t.cmd && + (t.onclick = function() { + n.execCommand(t.cmd); + }), + t.stateSelector && "undefined" == typeof t.active && (t.active = !1), + t.text || t.icon || (t.icon = e), + (n.buttons = n.buttons), + (t.tooltip = t.tooltip || t.title), + (n.buttons[e] = t); + }, + addSidebar: function(e, t) { + return rb(this, e, t); + }, + addMenuItem: function(e, t) { + var n = this; + t.cmd && + (t.onclick = function() { + n.execCommand(t.cmd); + }), + (n.menuItems = n.menuItems), + (n.menuItems[e] = t); + }, + addContextToolbar: function(e, t) { + var n, + r = this; + (r.contextToolbars = r.contextToolbars || []), + "string" == typeof e && + ((n = e), + (e = function(e) { + return r.dom.is(e, n); + })), + r.contextToolbars.push({ id: Gm("mcet"), predicate: e, items: t }); + }, + addCommand: function(e, t, n) { + this.editorCommands.addCommand(e, t, n); + }, + addQueryStateHandler: function(e, t, n) { + this.editorCommands.addQueryStateHandler(e, t, n); + }, + addQueryValueHandler: function(e, t, n) { + this.editorCommands.addQueryValueHandler(e, t, n); + }, + addShortcut: function(e, t, n, r) { + this.shortcuts.add(e, t, n, r); + }, + execCommand: function(e, t, n, r) { + return this.editorCommands.execCommand(e, t, n, r); + }, + queryCommandState: function(e) { + return this.editorCommands.queryCommandState(e); + }, + queryCommandValue: function(e) { + return this.editorCommands.queryCommandValue(e); + }, + queryCommandSupported: function(e) { + return this.editorCommands.queryCommandSupported(e); + }, + show: function() { + this.hidden && + ((this.hidden = !1), + this.inline + ? (this.getBody().contentEditable = !0) + : (cb.show(this.getContainer()), cb.hide(this.id)), + this.load(), + this.fire("show")); + }, + hide: function() { + var e = this, + t = e.getDoc(); + e.hidden || + (pb && t && !e.inline && t.execCommand("SelectAll"), + e.save(), + e.inline + ? ((e.getBody().contentEditable = !1), + e === e.editorManager.focusedEditor && + (e.editorManager.focusedEditor = null)) + : (cb.hide(e.getContainer()), + cb.setStyle(e.id, "display", e.orgDisplay)), + (e.hidden = !0), + e.fire("hide")); + }, + isHidden: function() { + return !!this.hidden; + }, + setProgressState: function(e, t) { + this.fire("ProgressState", { state: e, time: t }); + }, + load: function(e) { + var t, + n = this.getElement(); + return this.removed + ? "" + : n + ? (((e = e || {}).load = !0), + (t = this.setContent( + n.value !== undefined ? n.value : n.innerHTML, + e + )), + (e.element = n), + e.no_events || this.fire("LoadContent", e), + (e.element = n = null), + t) + : void 0; + }, + save: function(e) { + var t, + n, + r = this, + o = r.getElement(); + if (o && r.initialized && !r.removed) + return ( + ((e = e || {}).save = !0), + (e.element = o), + (e.content = r.getContent(e)), + e.no_events || r.fire("SaveContent", e), + "raw" === e.format && r.fire("RawSaveContent", e), + (t = e.content), + /TEXTAREA|INPUT/i.test(o.nodeName) + ? (o.value = t) + : (r.inline || (o.innerHTML = t), + (n = cb.getParent(r.id, "form")) && + fb(n.elements, function(e) { + if (e.name === r.id) return (e.value = t), !1; + })), + (e.element = o = null), + !1 !== e.set_dirty && r.setDirty(!1), + t + ); + }, + setContent: function(e, t) { + var n, + r, + o = this, + i = o.getBody(); + return ( + ((t = t || {}).format = t.format || "html"), + (t.set = !0), + (t.content = e), + t.no_events || o.fire("BeforeSetContent", t), + 0 === (e = t.content).length || /^\s+$/.test(e) + ? ((r = pb && pb < 11 ? "" : '
'), + "TABLE" === i.nodeName + ? (e = "" + r + "") + : /^(UL|OL)$/.test(i.nodeName) && (e = "
  • " + r + "
  • "), + (n = o.settings.forced_root_block) && + o.schema.isValidChild(i.nodeName.toLowerCase(), n.toLowerCase()) + ? ((e = r), + (e = o.dom.createHTML( + n, + o.settings.forced_root_block_attrs, + e + ))) + : pb || e || (e = '
    '), + o.dom.setHTML(i, e), + o.fire("SetContent", t)) + : ("raw" !== t.format && + (e = zs({ validate: o.validate }, o.schema).serialize( + o.parser.parse(e, { isRootContent: !0, insert: !0 }) + )), + (t.content = db(e)), + o.dom.setHTML(i, t.content), + t.no_events || o.fire("SetContent", t)), + t.content + ); + }, + getContent: function(e) { + var t, + n = this.getBody(); + if (this.removed) return ""; + if ( + (((e = e || {}).format = e.format || "html"), + (e.get = !0), + (e.getInner = !0), + e.no_events || this.fire("BeforeGetContent", e), + "raw" === e.format) + ) + t = Ot.trim(om(this.serializer, n.innerHTML)); + else if ("text" === e.format) t = n.innerText || n.textContent; + else { + if ("tree" === e.format) return this.serializer.serialize(n, e); + t = this.serializer.serialize(n, e); + } + return ( + "text" !== e.format ? (e.content = db(t)) : (e.content = t), + e.no_events || this.fire("GetContent", e), + e.content + ); + }, + insertContent: function(e, t) { + t && (e = lb({ content: e }, t)), + this.execCommand("mceInsertContent", !1, e); + }, + isDirty: function() { + return !this.isNotDirty; + }, + setDirty: function(e) { + var t = !this.isNotDirty; + (this.isNotDirty = !e), e && e !== t && this.fire("dirty"); + }, + setMode: function(e) { + Wd(this, e); + }, + getContainer: function() { + return ( + this.container || + (this.container = cb.get( + this.editorContainer || this.id + "_parent" + )), + this.container + ); + }, + getContentAreaContainer: function() { + return this.contentAreaContainer; + }, + getElement: function() { + return ( + this.targetElm || (this.targetElm = cb.get(this.id)), this.targetElm + ); + }, + getWin: function() { + var e; + return ( + this.contentWindow || + ((e = this.iframeElement) && + (this.contentWindow = e.contentWindow)), + this.contentWindow + ); + }, + getDoc: function() { + var e; + return ( + this.contentDocument || + ((e = this.getWin()) && (this.contentDocument = e.document)), + this.contentDocument + ); + }, + getBody: function() { + var e = this.getDoc(); + return this.bodyElement || (e ? e.body : null); + }, + convertURL: function(e, t, n) { + var r = this.settings; + return r.urlconverter_callback + ? this.execCallback("urlconverter_callback", e, n, !0, t) + : !r.convert_urls || + (n && "LINK" === n.nodeName) || + 0 === e.indexOf("file:") || + 0 === e.length + ? e + : r.relative_urls + ? this.documentBaseURI.toRelative(e) + : (e = this.documentBaseURI.toAbsolute(e, r.remove_script_host)); + }, + addVisual: function(e) { + var t, + n = this, + r = n.settings, + o = n.dom; + (e = e || n.getBody()), + n.hasVisual === undefined && (n.hasVisual = r.visual), + fb(o.select("table,a", e), function(e) { + var i; + switch (e.nodeName) { + case "TABLE": + return ( + (t = r.visual_table_class || "mce-item-table"), + void (((i = o.getAttrib(e, "border")) && "0" !== i) || + !n.hasVisual + ? o.removeClass(e, t) + : o.addClass(e, t)) + ); + case "A": + return void ( + o.getAttrib(e, "href", !1) || + ((i = o.getAttrib(e, "name") || e.id), + (t = r.visual_anchor_class || "mce-item-anchor"), + i && n.hasVisual ? o.addClass(e, t) : o.removeClass(e, t)) + ); + } + }), + n.fire("VisualAid", { element: e, hasVisual: n.hasVisual }); + }, + remove: function() { + var e = this; + e.removed || + (e.save(), + (e.removed = 1), + e.unbindAllNativeEvents(), + e.hasHiddenInput && cb.remove(e.getElement().nextSibling), + e.inline || + (pb && pb < 10 && e.getDoc().execCommand("SelectAll", !1, null), + cb.setStyle(e.id, "display", e.orgDisplay), + (e.getBody().onload = null)), + e.fire("remove"), + e.editorManager.remove(e), + cb.remove(e.getContainer()), + e._selectionOverrides.destroy(), + e.editorUpload.destroy(), + e.destroy()); + }, + destroy: function(e) { + var t, + n = this; + n.destroyed || + (e || n.removed + ? (e || + (n.editorManager.off("beforeunload", n._beforeUnload), + n.theme && n.theme.destroy && n.theme.destroy(), + n.selection.destroy(), + n.dom.destroy()), + (t = n.formElement) && + (t._mceOldSubmit && + ((t.submit = t._mceOldSubmit), (t._mceOldSubmit = null)), + cb.unbind(t, "submit reset", n.formEventDelegate)), + (n.contentAreaContainer = n.formElement = n.container = n.editorContainer = null), + (n.bodyElement = n.contentDocument = n.contentWindow = null), + (n.iframeElement = n.targetElm = null), + n.selection && + (n.selection = n.selection.win = n.selection.dom = n.selection.dom.doc = null), + (n.destroyed = 1)) + : n.remove()); + }, + uploadImages: function(e) { + return this.editorUpload.uploadImages(e); + }, + _scanForImages: function() { + return this.editorUpload.scanForImages(); + } + }), + qd + ); + var hb, + vb, + yb, + bb = { + isEditorUIElement: function(e) { + return -1 !== e.className.toString().indexOf("mce-"); + } + }, + Cb = function(e, t) { + var n, + r, + o = Un.detect().browser; + o.isIE() || o.isEdge() + ? (r = e).on("focusout", function() { + Sd(r); + }) + : ((n = t), + e.on("mouseup touchend", function(e) { + n.throttle(); + })), + e.on("keyup nodechange", function(t) { + var n; + ("nodechange" === (n = t).type && n.selectionChange) || Sd(e); + }); + }, + xb = function(e) { + var t, + n, + r, + o = Tp(function() { + Sd(e); + }, 0); + e.inline && + ((t = e), + (n = o), + (r = function() { + n.throttle(); + }), + Xo.DOM.bind(document, "mouseup", r), + t.on("remove", function() { + Xo.DOM.unbind(document, "mouseup", r); + })), + e.on("init", function() { + Cb(e, o); + }), + e.on("remove", function() { + o.cancel(); + }); + }, + wb = Xo.DOM, + Nb = function(e) { + return bb.isEditorUIElement(e); + }, + Eb = function(e, t) { + var n = e ? e.settings.custom_ui_selector : ""; + return ( + null !== + wb.getParent(t, function(t) { + return Nb(t) || (!!n && e.dom.is(t, n)); + }) + ); + }, + Sb = function(e, t) { + var n = t.editor; + xb(n), + n.on("focusin", function() { + var t = e.focusedEditor; + t !== this && + (t && t.fire("blur", { focusedEditor: this }), + e.setActive(this), + (e.focusedEditor = this), + this.fire("focus", { blurredEditor: t }), + this.focus(!0)); + }), + n.on("focusout", function() { + var t = this; + ye.setEditorTimeout(t, function() { + var n = e.focusedEditor; + Eb( + t, + (function() { + try { + return document.activeElement; + } catch (e) { + return document.body; + } + })() + ) || + n !== t || + (t.fire("blur", { focusedEditor: null }), + (e.focusedEditor = null)); + }); + }), + hb || + ((hb = function(t) { + var n, + r = e.activeEditor; + (n = t.target), + r && + n.ownerDocument === document && + (n === document.body || + Eb(r, n) || + e.focusedEditor !== r || + (r.fire("blur", { focusedEditor: null }), + (e.focusedEditor = null))); + }), + wb.bind(document, "focusin", hb)); + }, + kb = function(e, t) { + e.focusedEditor === t.editor && (e.focusedEditor = null), + e.activeEditor || (wb.unbind(document, "focusin", hb), (hb = null)); + }, + Tb = function(e) { + e.on("AddEditor", y.curry(Sb, e)), e.on("RemoveEditor", y.curry(kb, e)); + }, + Ab = {}, + _b = "en", + Bb = { + setCode: function(e) { + e && + ((_b = e), + (this.rtl = !!this.data[e] && "rtl" === this.data[e]._dir)); + }, + getCode: function() { + return _b; + }, + rtl: !1, + add: function(e, t) { + var n = Ab[e]; + for (var r in (n || (Ab[e] = n = {}), t)) n[r] = t[r]; + this.setCode(e); + }, + translate: function(e) { + var t = Ab[_b] || {}, + n = function(e) { + return Ot.is(e, "function") + ? Object.prototype.toString.call(e) + : r(e) + ? "" + : "" + e; + }, + r = function(e) { + return "" === e || null === e || Ot.is(e, "undefined"); + }, + o = function(e) { + return (e = n(e)), Ot.hasOwn(t, e) ? n(t[e]) : e; + }; + if (r(e)) return ""; + if (Ot.is(e, "object") && Ot.hasOwn(e, "raw")) return n(e.raw); + if (Ot.is(e, "array")) { + var i = e.slice(1); + e = o(e[0]).replace(/\{([0-9]+)\}/g, function(e, t) { + return Ot.hasOwn(i, t) ? n(i[t]) : e; + }); + } + return o(e).replace(/{context:\w+}$/, ""); + }, + data: Ab + }, + Rb = Xo.DOM, + Db = Ot.explode, + Ob = Ot.each, + Pb = Ot.extend, + Ib = 0, + Lb = !1, + Mb = [], + Fb = [], + zb = function(e) { + Ob(yb.get(), function(t) { + "scroll" === e.type + ? t.fire("ScrollWindow", e) + : t.fire("ResizeWindow", e); + }); + }, + Ub = function(e) { + e !== Lb && + (e + ? Qt(window).on("resize scroll", zb) + : Qt(window).off("resize scroll", zb), + (Lb = e)); + }, + Vb = function(e) { + var t = Fb; + delete Mb[e.id]; + for (var n = 0; n < Mb.length; n++) + if (Mb[n] === e) { + Mb.splice(n, 1); + break; + } + return ( + (Fb = M.filter(Fb, function(t) { + return e !== t; + })), + yb.activeEditor === e && + (yb.activeEditor = Fb.length > 0 ? Fb[0] : null), + yb.focusedEditor === e && (yb.focusedEditor = null), + t.length !== Fb.length + ); + }; + Pb( + (yb = { + defaultSettings: {}, + $: Qt, + majorVersion: "4", + minorVersion: "7.5", + releaseDate: "2018-01-22", + editors: Mb, + i18n: Bb, + activeEditor: null, + settings: {}, + setup: function() { + var e, + t, + n, + r, + o = ""; + if ( + ((t = ub.getDocumentBaseUrl(document.location)), + /^[^:]+:\/\/\/?[^\/]+\//.test(t) && + ((t = t.replace(/[\?#].*$/, "").replace(/[\/\\][^\/]+$/, "")), + /[\/\\]$/.test(t) || (t += "/")), + (n = window.tinymce || window.tinyMCEPreInit)) + ) + (e = n.base || n.baseURL), (o = n.suffix); + else { + for ( + var i = document.getElementsByTagName("script"), a = 0; + a < i.length; + a++ + ) { + var s = (r = i[a].src).substring(r.lastIndexOf("/")); + if (/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)) { + -1 !== s.indexOf(".min") && (o = ".min"), + (e = r.substring(0, r.lastIndexOf("/"))); + break; + } + } + !e && + document.currentScript && + (-1 !== (r = document.currentScript.src).indexOf(".min") && + (o = ".min"), + (e = r.substring(0, r.lastIndexOf("/")))); + } + (this.baseURL = new ub(t).toAbsolute(e)), + (this.documentBaseURL = t), + (this.baseURI = new ub(this.baseURL)), + (this.suffix = o), + Tb(this); + }, + overrideDefaults: function(e) { + var t, n; + (t = e.base_url) && + ((this.baseURL = new ub(this.documentBaseURL).toAbsolute( + t.replace(/\/+$/, "") + )), + (this.baseURI = new ub(this.baseURL))), + (n = e.suffix), + e.suffix && (this.suffix = n), + (this.defaultSettings = e); + var r = e.plugin_base_urls; + for (var o in r) ti.PluginManager.urls[o] = r[o]; + }, + init: function(e) { + var t, + n, + r = this; + n = Ot.makeMap( + "area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu", + " " + ); + var o = function(e) { + var t = e.id; + return ( + t || + ((t = (t = e.name) && !Rb.get(t) ? e.name : Rb.uniqueId()), + e.setAttribute("id", t)), + t + ); + }, + i = function(e, t) { + return t.constructor === RegExp + ? t.test(e.className) + : Rb.hasClass(e, t); + }, + a = function(e) { + t = e; + }, + s = function() { + var t, + u = 0, + c = [], + l = function(e, n, o) { + var i = new gb(e, n, r); + c.push(i), + i.on("init", function() { + ++u === t.length && a(c); + }), + (i.targetElm = i.targetElm || o), + i.render(); + }; + Rb.unbind(window, "ready", s), + (function(t) { + var n = e[t]; + n && n.apply(r, Array.prototype.slice.call(arguments, 2)); + })("onpageload"), + (t = Qt.unique( + (function(e) { + var t, + n = []; + if (me.ie && me.ie < 11) + return ( + Pm( + "TinyMCE does not support the browser you are using. For a list of supported browsers please see: https://www.tinymce.com/docs/get-started/system-requirements/" + ), + [] + ); + if (e.types) + return ( + Ob(e.types, function(e) { + n = n.concat(Rb.select(e.selector)); + }), + n + ); + if (e.selector) return Rb.select(e.selector); + if (e.target) return [e.target]; + switch (e.mode) { + case "exact": + (t = e.elements || "").length > 0 && + Ob(Db(t), function(e) { + var t; + (t = Rb.get(e)) + ? n.push(t) + : Ob(document.forms, function(t) { + Ob(t.elements, function(t) { + t.name === e && + ((e = "mce_editor_" + Ib++), + Rb.setAttrib(t, "id", e), + n.push(t)); + }); + }); + }); + break; + case "textareas": + case "specific_textareas": + Ob(Rb.select("textarea"), function(t) { + (e.editor_deselector && i(t, e.editor_deselector)) || + (e.editor_selector && !i(t, e.editor_selector)) || + n.push(t); + }); + } + return n; + })(e) + )), + e.types + ? Ob(e.types, function(n) { + Ot.each(t, function(t) { + return ( + !Rb.is(t, n.selector) || (l(o(t), Pb({}, e, n), t), !1) + ); + }); + }) + : (Ot.each(t, function(e) { + var t; + (t = r.get(e.id)) && + t.initialized && + !(t.getContainer() || t.getBody()).parentNode && + (Vb(t), + t.unbindAllNativeEvents(), + t.destroy(!0), + (t.removed = !0), + (t = null)); + }), + 0 === + (t = Ot.grep(t, function(e) { + return !r.get(e.id); + })).length + ? a([]) + : Ob(t, function(t) { + var r; + (r = t), + e.inline && r.tagName.toLowerCase() in n + ? Pm( + "Could not initialize inline editor on invalid inline target element", + t + ) + : l(o(t), e, t); + })); + }; + return ( + (r.settings = e), + Rb.bind(window, "ready", s), + new pe(function(e) { + t + ? e(t) + : (a = function(t) { + e(t); + }); + }) + ); + }, + get: function(e) { + return 0 === arguments.length + ? Fb.slice(0) + : tr.isString(e) + ? M.find(Fb, function(t) { + return t.id === e; + }).getOr(null) + : tr.isNumber(e) && Fb[e] + ? Fb[e] + : null; + }, + add: function(e) { + var t = this; + return Mb[e.id] === e + ? e + : (null === t.get(e.id) && + ("length" !== e.id && (Mb[e.id] = e), Mb.push(e), Fb.push(e)), + Ub(!0), + (t.activeEditor = e), + t.fire("AddEditor", { editor: e }), + vb || + ((vb = function() { + t.fire("BeforeUnload"); + }), + Rb.bind(window, "beforeunload", vb)), + e); + }, + createEditor: function(e, t) { + return this.add(new gb(e, t, this)); + }, + remove: function(e) { + var t, + n, + r = this; + if (e) + return tr.isString(e) + ? ((e = e.selector || e), + void Ob(Rb.select(e), function(e) { + (n = r.get(e.id)) && r.remove(n); + })) + : ((n = e), + tr.isNull(r.get(n.id)) + ? null + : (Vb(n) && r.fire("RemoveEditor", { editor: n }), + 0 === Fb.length && Rb.unbind(window, "beforeunload", vb), + n.remove(), + Ub(Fb.length > 0), + n)); + for (t = Fb.length - 1; t >= 0; t--) r.remove(Fb[t]); + }, + execCommand: function(e, t, n) { + var r = this.get(n); + switch (e) { + case "mceAddEditor": + return this.get(n) || new gb(n, this.settings, this).render(), !0; + case "mceRemoveEditor": + return r && r.remove(), !0; + case "mceToggleEditor": + return r + ? (r.isHidden() ? r.show() : r.hide(), !0) + : (this.execCommand("mceAddEditor", 0, n), !0); + } + return !!this.activeEditor && this.activeEditor.execCommand(e, t, n); + }, + triggerSave: function() { + Ob(Fb, function(e) { + e.save(); + }); + }, + addI18n: function(e, t) { + Bb.add(e, t); + }, + translate: function(e) { + return Bb.translate(e); + }, + setActive: function(e) { + var t = this.activeEditor; + this.activeEditor !== e && + (t && t.fire("deactivate", { relatedTarget: e }), + e.fire("activate", { relatedTarget: t })), + (this.activeEditor = e); + } + }), + Fd + ), + yb.setup(); + var Hb, + qb = yb; + function jb(e) { + return { + walk: function(t, n) { + return cg.walk(e, t, n); + }, + split: sl.split, + normalize: function(t) { + return Jf.normalize(e, t).fold(y.constant(!1), function(e) { + return ( + t.setStart(e.startContainer, e.startOffset), + t.setEnd(e.endContainer, e.endOffset), + !0 + ); + }); + } + }; + } + ((Hb = jb || (jb = {})).compareRanges = qf), + (Hb.getCaretRangeFromPoint = Ih), + (Hb.getSelectedNode = Fi), + (Hb.getNode = zi); + var $b, + Wb, + Kb = jb, + Xb = Math.min, + Yb = Math.max, + Gb = Math.round, + Jb = function(e, t, n) { + var r, o, i, a, s, u; + return ( + (r = t.x), + (o = t.y), + (i = e.w), + (a = e.h), + (s = t.w), + (u = t.h), + "b" === (n = (n || "").split(""))[0] && (o += u), + "r" === n[1] && (r += s), + "c" === n[0] && (o += Gb(u / 2)), + "c" === n[1] && (r += Gb(s / 2)), + "b" === n[3] && (o -= a), + "r" === n[4] && (r -= i), + "c" === n[3] && (o -= Gb(a / 2)), + "c" === n[4] && (r -= Gb(i / 2)), + Qb(r, o, i, a) + ); + }, + Qb = function(e, t, n, r) { + return { x: e, y: t, w: n, h: r }; + }, + Zb = { + inflate: function(e, t, n) { + return Qb(e.x - t, e.y - n, e.w + 2 * t, e.h + 2 * n); + }, + relativePosition: Jb, + findBestRelativePosition: function(e, t, n, r) { + var o, i; + for (i = 0; i < r.length; i++) + if ( + (o = Jb(e, t, r[i])).x >= n.x && + o.x + o.w <= n.w + n.x && + o.y >= n.y && + o.y + o.h <= n.h + n.y + ) + return r[i]; + return null; + }, + intersect: function(e, t) { + var n, r, o, i; + return ( + (n = Yb(e.x, t.x)), + (r = Yb(e.y, t.y)), + (o = Xb(e.x + e.w, t.x + t.w)), + (i = Xb(e.y + e.h, t.y + t.h)), + o - n < 0 || i - r < 0 ? null : Qb(n, r, o - n, i - r) + ); + }, + clamp: function(e, t, n) { + var r, o, i, a, s, u, c, l, f, d; + return ( + (s = e.x), + (u = e.y), + (c = e.x + e.w), + (l = e.y + e.h), + (f = t.x + t.w), + (d = t.y + t.h), + (r = Yb(0, t.x - s)), + (o = Yb(0, t.y - u)), + (i = Yb(0, c - f)), + (a = Yb(0, l - d)), + (s += r), + (u += o), + n && ((c += r), (l += o), (s -= i), (u -= a)), + Qb(s, u, (c -= i) - s, (l -= a) - u) + ); + }, + create: Qb, + fromClientRect: function(e) { + return Qb(e.left, e.top, e.width, e.height); + } + }, + eC = {}, + tC = { + add: function(e, t) { + eC[e.toLowerCase()] = t; + }, + has: function(e) { + return !!eC[e.toLowerCase()]; + }, + get: function(e) { + var t = e.toLowerCase(), + n = eC.hasOwnProperty(t) ? eC[t] : null; + if (null === n) throw new Error("Could not find module for type: " + e); + return n; + }, + create: function(e, t) { + var n; + if ( + ("string" == typeof e ? ((t = t || {}).type = e) : (e = (t = e).type), + (e = e.toLowerCase()), + !(n = eC[e])) + ) + throw new Error("Could not find control by type: " + e); + return ((n = new n(t)).type = e), n; + } + }, + nC = Ot.each, + rC = Ot.extend, + oC = function() {}; + oC.extend = $b = function(e) { + var t, + n, + r, + o = this.prototype, + i = function() { + var e, t, n; + if ( + !Wb && + (this.init && this.init.apply(this, arguments), (t = this.Mixins)) + ) + for (e = t.length; e--; ) + (n = t[e]).init && n.init.apply(this, arguments); + }, + a = function() { + return this; + }, + s = function(e, t) { + return function() { + var n, + r = this._super; + return ( + (this._super = o[e]), + (n = t.apply(this, arguments)), + (this._super = r), + n + ); + }; + }; + for (n in ((Wb = !0), + (t = new this()), + (Wb = !1), + e.Mixins && + (nC(e.Mixins, function(t) { + for (var n in t) "init" !== n && (e[n] = t[n]); + }), + o.Mixins && (e.Mixins = o.Mixins.concat(e.Mixins))), + e.Methods && + nC(e.Methods.split(","), function(t) { + e[t] = a; + }), + e.Properties && + nC(e.Properties.split(","), function(t) { + var n = "_" + t; + e[t] = function(e) { + return e !== undefined ? ((this[n] = e), this) : this[n]; + }; + }), + e.Statics && + nC(e.Statics, function(e, t) { + i[t] = e; + }), + e.Defaults && o.Defaults && (e.Defaults = rC({}, o.Defaults, e.Defaults)), + e)) + "function" == typeof (r = e[n]) && o[n] ? (t[n] = s(n, r)) : (t[n] = r); + return (i.prototype = t), (i.constructor = i), (i.extend = $b), i; + }; + var iC = Math.min, + aC = Math.max, + sC = Math.round, + uC = function(e, t) { + var n, r, o, i; + if (((t = t || '"'), null === e)) return "null"; + if ("string" == (o = typeof e)) + return ( + (r = "\bb\tt\nn\ff\rr\"\"''\\\\"), + t + + e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g, function(e, o) { + return '"' === t && "'" === e + ? e + : (n = r.indexOf(o)) + 1 + ? "\\" + r.charAt(n + 1) + : ((e = o.charCodeAt().toString(16)), + "\\u" + "0000".substring(e.length) + e); + }) + + t + ); + if ("object" === o) { + if ( + e.hasOwnProperty && + "[object Array]" === Object.prototype.toString.call(e) + ) { + for (n = 0, r = "["; n < e.length; n++) + r += (n > 0 ? "," : "") + uC(e[n], t); + return r + "]"; + } + for (i in ((r = "{"), e)) + e.hasOwnProperty(i) && + (r += + "function" != typeof e[i] + ? (r.length > 1 ? "," + t : t) + i + t + ":" + uC(e[i], t) + : ""); + return r + "}"; + } + return "" + e; + }, + cC = { + serialize: uC, + parse: function(e) { + try { + return window[String.fromCharCode(101) + "val"]("(" + e + ")"); + } catch (t) {} + } + }, + lC = { + callbacks: {}, + count: 0, + send: function(e) { + var t = this, + n = Xo.DOM, + r = e.count !== undefined ? e.count : t.count, + o = "tinymce_jsonp_" + r; + (t.callbacks[r] = function(i) { + n.remove(o), delete t.callbacks[r], e.callback(i); + }), + n.add(n.doc.body, "script", { + id: o, + src: e.url, + type: "text/javascript" + }), + t.count++; + } + }, + fC = { + send: function(e) { + var t, + n = 0, + r = function() { + !e.async || 4 === t.readyState || n++ > 1e4 + ? (e.success && n < 1e4 && 200 === t.status + ? e.success.call(e.success_scope, "" + t.responseText, t, e) + : e.error && + e.error.call( + e.error_scope, + n > 1e4 ? "TIMED_OUT" : "GENERAL", + t, + e + ), + (t = null)) + : setTimeout(r, 10); + }; + if ( + ((e.scope = e.scope || this), + (e.success_scope = e.success_scope || e.scope), + (e.error_scope = e.error_scope || e.scope), + (e.async = !1 !== e.async), + (e.data = e.data || ""), + fC.fire("beforeInitialize", { settings: e }), + (t = new Mm())) + ) { + if ( + (t.overrideMimeType && t.overrideMimeType(e.content_type), + t.open(e.type || (e.data ? "POST" : "GET"), e.url, e.async), + e.crossDomain && (t.withCredentials = !0), + e.content_type && + t.setRequestHeader("Content-Type", e.content_type), + e.requestheaders && + Ot.each(e.requestheaders, function(e) { + t.setRequestHeader(e.key, e.value); + }), + t.setRequestHeader("X-Requested-With", "XMLHttpRequest"), + (t = fC.fire("beforeSend", { xhr: t, settings: e }).xhr).send( + e.data + ), + !e.async) + ) + return r(); + setTimeout(r, 10); + } + } + }; + Ot.extend(fC, Fd); + var dC = Ot.extend, + mC = function(e) { + (this.settings = dC({}, e)), (this.count = 0); + }; + (mC.sendRPC = function(e) { + return new mC().send(e); + }), + (mC.prototype = { + send: function(e) { + var t = e.error, + n = e.success; + ((e = dC(this.settings, e)).success = function(r, o) { + void 0 === (r = cC.parse(r)) && (r = { error: "JSON Parse error." }), + r.error + ? t.call(e.error_scope || e.scope, r.error, o) + : n.call(e.success_scope || e.scope, r.result); + }), + (e.error = function(n, r) { + t && t.call(e.error_scope || e.scope, n, r); + }), + (e.data = cC.serialize({ + id: e.id || "c" + this.count++, + method: e.method, + params: e.params + })), + (e.content_type = "application/json"), + fC.send(e); + } + }); + var pC, + gC = window.localStorage, + hC = qb, + vC = { + geom: { Rect: Zb }, + util: { + Promise: pe, + Delay: ye, + Tools: Ot, + VK: Mp, + URI: ub, + Class: oC, + EventDispatcher: Id, + Observable: Fd, + I18n: Bb, + XHR: fC, + JSON: cC, + JSONRequest: mC, + JSONP: lC, + LocalStorage: gC, + Color: function(e) { + var t = {}, + n = 0, + r = 0, + o = 0, + i = function(e) { + var i; + return ( + "object" == typeof e + ? "r" in e + ? ((n = e.r), (r = e.g), (o = e.b)) + : "v" in e && + (function(e, t, i) { + var a, s, u, c; + if ( + ((e = (parseInt(e, 10) || 0) % 360), + (t = parseInt(t, 10) / 100), + (i = parseInt(i, 10) / 100), + (t = aC(0, iC(t, 1))), + (i = aC(0, iC(i, 1))), + 0 !== t) + ) { + switch ( + ((a = e / 60), + (u = (s = i * t) * (1 - Math.abs((a % 2) - 1))), + (c = i - s), + Math.floor(a)) + ) { + case 0: + (n = s), (r = u), (o = 0); + break; + case 1: + (n = u), (r = s), (o = 0); + break; + case 2: + (n = 0), (r = s), (o = u); + break; + case 3: + (n = 0), (r = u), (o = s); + break; + case 4: + (n = u), (r = 0), (o = s); + break; + case 5: + (n = s), (r = 0), (o = u); + break; + default: + n = r = o = 0; + } + (n = sC(255 * (n + c))), + (r = sC(255 * (r + c))), + (o = sC(255 * (o + c))); + } else n = r = o = sC(255 * i); + })(e.h, e.s, e.v) + : (i = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec( + e + )) + ? ((n = parseInt(i[1], 10)), + (r = parseInt(i[2], 10)), + (o = parseInt(i[3], 10))) + : (i = /#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e)) + ? ((n = parseInt(i[1], 16)), + (r = parseInt(i[2], 16)), + (o = parseInt(i[3], 16))) + : (i = /#([0-F])([0-F])([0-F])/gi.exec(e)) && + ((n = parseInt(i[1] + i[1], 16)), + (r = parseInt(i[2] + i[2], 16)), + (o = parseInt(i[3] + i[3], 16))), + (n = n < 0 ? 0 : n > 255 ? 255 : n), + (r = r < 0 ? 0 : r > 255 ? 255 : r), + (o = o < 0 ? 0 : o > 255 ? 255 : o), + t + ); + }; + return ( + e && i(e), + (t.toRgb = function() { + return { r: n, g: r, b: o }; + }), + (t.toHsv = function() { + return ( + (e = n), + (t = r), + (i = o), + (s = 0), + (u = iC((e /= 255), iC((t /= 255), (i /= 255)))) === + (c = aC(e, aC(t, i))) + ? { h: 0, s: 0, v: 100 * (s = u) } + : ((a = (c - u) / c), + (s = c), + { + h: sC( + 60 * + ((e === u ? 3 : i === u ? 1 : 5) - + (e === u ? t - i : i === u ? e - t : i - e) / + (c - u)) + ), + s: sC(100 * a), + v: sC(100 * s) + }) + ); + var e, t, i, a, s, u, c; + }), + (t.toHex = function() { + var e = function(e) { + return (e = parseInt(e, 10).toString(16)).length > 1 + ? e + : "0" + e; + }; + return "#" + e(n) + e(r) + e(o); + }), + (t.parse = i), + t + ); + } + }, + dom: { + EventUtils: Te, + Sizzle: lt, + DomQuery: Qt, + TreeWalker: to, + DOMUtils: Xo, + ScriptLoader: Zo, + RangeUtils: Kb, + Serializer: Nh, + ControlSelection: Rh, + BookmarkManager: Ah, + Selection: vv, + Event: Te.Event + }, + html: { + Styles: zo, + Entities: Ao, + Node: fh, + Schema: Fo, + SaxParser: em, + DomParser: bh, + Writer: Fs, + Serializer: zs + }, + ui: { Factory: tC }, + Env: me, + AddOnManager: ti, + Formatter: Yg, + UndoManager: rg, + EditorCommands: Od, + WindowManager: km, + NotificationManager: Sm, + EditorObservable: qd, + Shortcuts: Jd, + Editor: gb, + FocusManager: bb, + EditorManager: qb, + DOM: Xo.DOM, + ScriptLoader: Zo.ScriptLoader, + PluginManager: ti.PluginManager, + ThemeManager: ti.ThemeManager, + trim: Ot.trim, + isArray: Ot.isArray, + is: Ot.is, + toArray: Ot.toArray, + makeMap: Ot.makeMap, + each: Ot.each, + map: Ot.map, + grep: Ot.grep, + inArray: Ot.inArray, + extend: Ot.extend, + create: Ot.create, + walk: Ot.walk, + createNS: Ot.createNS, + resolve: Ot.resolve, + explode: Ot.explode, + _addCacheSuffix: Ot._addCacheSuffix, + isOpera: me.opera, + isWebKit: me.webkit, + isIE: me.ie, + isGecko: me.gecko, + isMac: me.mac + }; + (hC = Ot.extend(hC, vC)), + (pC = hC), + (window.tinymce = pC), + (window.tinyMCE = pC); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = "[-'\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]", + t = "[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]", + r = + "[+*/,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]", + E = + "[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]", + T = "\\r", + u = "\\n", + i = "[\x0B\f\x85\u2028\u2029]", + o = + "[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]", + c = + "[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]", + a = + "[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]", + R = "[=_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f\u2200-\u22ff<>]", + f = + "[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]", + A = { + characterIndices: { + ALETTER: 0, + MIDNUMLET: 1, + MIDLETTER: 2, + MIDNUM: 3, + NUMERIC: 4, + CR: 5, + LF: 6, + NEWLINE: 7, + EXTEND: 8, + FORMAT: 9, + KATAKANA: 10, + EXTENDNUMLET: 11, + AT: 12, + OTHER: 13 + }, + SETS: [ + new RegExp( + "[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]" + ), + new RegExp(n), + new RegExp(t), + new RegExp(r), + new RegExp(E), + new RegExp(T), + new RegExp(u), + new RegExp(i), + new RegExp(o), + new RegExp(c), + new RegExp(a), + new RegExp(R), + new RegExp("@") + ], + EMPTY_STRING: "", + PUNCTUATION: new RegExp("^" + f + "$"), + WHITESPACE: /^\s+$/ + }, + N = function(e, n, t) { + var r, E; + if (!e) return 0; + if (((t = t || e), e.length !== undefined)) { + for (r = 0, E = e.length; r < E; r++) + if (!1 === n.call(t, e[r], r, e)) return 0; + } else + for (r in e) + if (e.hasOwnProperty(r) && !1 === n.call(t, e[r], r, e)) return 0; + return 1; + }, + s = function(e, n) { + var t = []; + return ( + N(e, function(r, E) { + t.push(n(r, E, e)); + }), + t + ); + }, + l = A.SETS, + M = A.characterIndices.OTHER, + d = function(e) { + var n, + t, + r = M, + E = l.length; + for (n = 0; n < E; ++n) + if ((t = l[n]) && t.test(e)) { + r = n; + break; + } + return r; + }, + I = function(e) { + var n, + t, + r = ((n = d), + (t = {}), + function(e) { + if (t[e]) return t[e]; + var r = n(e); + return (t[e] = r), r; + }); + return s(e.split(""), r); + }, + L = A.characterIndices, + g = function(e, n) { + var t, + r, + E = e[n], + T = e[n + 1]; + return !( + n < 0 || + (n > e.length - 1 && 0 !== n) || + (E === L.ALETTER && T === L.ALETTER) || + ((r = e[n + 2]), + (E === L.ALETTER && + (T === L.MIDLETTER || T === L.MIDNUMLET || T === L.AT) && + r === L.ALETTER) || + ((t = e[n - 1]), + ((E === L.MIDLETTER || E === L.MIDNUMLET || T === L.AT) && + T === L.ALETTER && + t === L.ALETTER) || + !( + (E !== L.NUMERIC && E !== L.ALETTER) || + (T !== L.NUMERIC && T !== L.ALETTER) + ) || + ((E === L.MIDNUM || E === L.MIDNUMLET) && + T === L.NUMERIC && + t === L.NUMERIC) || + (E === L.NUMERIC && + (T === L.MIDNUM || T === L.MIDNUMLET) && + r === L.NUMERIC) || + E === L.EXTEND || + E === L.FORMAT || + t === L.EXTEND || + t === L.FORMAT || + T === L.EXTEND || + T === L.FORMAT || + (E === L.CR && T === L.LF) || + (E !== L.NEWLINE && + E !== L.CR && + E !== L.LF && + T !== L.NEWLINE && + T !== L.CR && + T !== L.LF && + ((E === L.KATAKANA && T === L.KATAKANA) || + (T === L.EXTENDNUMLET && + (E === L.ALETTER || + E === L.NUMERIC || + E === L.KATAKANA || + E === L.EXTENDNUMLET)) || + (E === L.EXTENDNUMLET && + (T === L.ALETTER || T === L.NUMERIC || T === L.KATAKANA)) || + E === L.AT)))) + ); + }, + p = A.EMPTY_STRING, + U = A.WHITESPACE, + w = A.PUNCTUATION, + h = function(e, n, t) { + var r = (function(e, n) { + var t; + for (t = n; t < e.length; ++t) { + var r = e.charAt(t); + if (U.test(r)) break; + } + return t; + })(n, t + 1), + E = n.substring(t + 1, r); + return "://" === E.substr(0, 3) + ? { word: e + E, index: r } + : { word: e, index: t }; + }, + v = function(e, n) { + return (function(e, n) { + var t, + r, + E, + T, + u = 0, + i = I(e), + o = i.length, + c = [], + a = []; + for ( + n || (n = {}), + n.ignoreCase && (e = e.toLowerCase()), + r = n.includePunctuation, + E = n.includeWhitespace; + u < o; + ++u + ) + if (((t = e.charAt(u)), c.push(t), g(i, u))) { + if ((c = c.join(p)) && (E || !U.test(c)) && (r || !w.test(c))) + if ("http" === (T = c) || "https" === T) { + var R = h(c, e, u); + a.push(R.word), (u = R.index); + } else a.push(c); + c = []; + } + return a; + })(e.replace(/\ufeff/g, ""), n); + }, + x = function(e) { + return v(((n = e), n.removed ? "" : n.getBody().innerText)).length; + var n; + }, + C = function(e) { + return { + getCount: function() { + return x(e); + } + }; + }, + D = tinymce.util.Tools.resolve("tinymce.util.Delay"), + m = tinymce.util.Tools.resolve("tinymce.util.I18n"), + y = function(e) { + var n = function(e) { + return m.translate(["{0} words", x(e)]); + }, + t = function() { + e.theme.panel.find("#wordcount").text(n(e)); + }; + e.on("init", function() { + var r = e.theme.panel && e.theme.panel.find("#statusbar")[0], + E = D.debounce(t, 300); + r && + D.setEditorTimeout( + e, + function() { + r.insert( + { + type: "label", + name: "wordcount", + text: n(e), + classes: "wordcount", + disabled: e.settings.readonly + }, + 0 + ), + e.on("setcontent beforeaddundo undo redo keyup", E); + }, + 0 + ); + }); + }; + e.add("wordcount", function(e) { + return y(e), C(e); + }); +})(); +!(function() { + "use strict"; + var n, + e, + t, + r, + o = function(n) { + var e = n, + t = function() { + return e; + }; + return { + get: t, + set: function(n) { + e = n; + }, + clone: function() { + return o(t()); + } + }; + }, + u = tinymce.util.Tools.resolve("tinymce.PluginManager"), + i = function(n) { + return { + isEnabled: function() { + return n.get(); + } + }; + }, + c = function(n, e) { + return n.fire("VisualChars", { state: e }); + }, + a = { "\xa0": "nbsp", "\xad": "shy" }, + f = function(n, e) { + var t, + r = ""; + for (t in n) r += t; + return new RegExp("[" + r + "]", e ? "g" : ""); + }, + l = function(n) { + var e, + t = ""; + for (e in n) t && (t += ","), (t += "span.mce-" + n[e]); + return t; + }, + s = { + charMap: a, + regExp: f(a), + regExpGlobal: f(a, !0), + selector: l(a), + charMapToRegExp: f, + charMapToSelector: l + }, + d = function(n) { + return function() { + return n; + }; + }, + m = { + noop: function() {}, + noarg: function(n) { + return function() { + return n(); + }; + }, + compose: function(n, e) { + return function() { + return n(e.apply(null, arguments)); + }; + }, + constant: d, + identity: function(n) { + return n; + }, + tripleEquals: function(n, e) { + return n === e; + }, + curry: function(n) { + for ( + var e = new Array(arguments.length - 1), t = 1; + t < arguments.length; + t++ + ) + e[t - 1] = arguments[t]; + return function() { + for (var t = new Array(arguments.length), r = 0; r < t.length; r++) + t[r] = arguments[r]; + var o = e.concat(t); + return n.apply(null, o); + }; + }, + not: function(n) { + return function() { + return !n.apply(null, arguments); + }; + }, + die: function(n) { + return function() { + throw new Error(n); + }; + }, + apply: function(n) { + return n(); + }, + call: function(n) { + n(); + }, + never: d(!1), + always: d(!0) + }, + p = m.never, + h = m.always, + v = function() { + return g; + }, + g = ((r = { + fold: function(n, e) { + return n(); + }, + is: p, + isSome: p, + isNone: h, + getOr: (t = function(n) { + return n; + }), + getOrThunk: (e = function(n) { + return n(); + }), + getOrDie: function(n) { + throw new Error(n || "error: getOrDie called on none."); + }, + or: t, + orThunk: e, + map: v, + ap: v, + each: function() {}, + bind: v, + flatten: v, + exists: p, + forall: h, + filter: v, + equals: (n = function(n) { + return n.isNone(); + }), + equals_: n, + toArray: function() { + return []; + }, + toString: m.constant("none()") + }), + Object.freeze && Object.freeze(r), + r), + y = function(n) { + var e = function() { + return n; + }, + t = function() { + return o; + }, + r = function(e) { + return e(n); + }, + o = { + fold: function(e, t) { + return t(n); + }, + is: function(e) { + return n === e; + }, + isSome: h, + isNone: p, + getOr: e, + getOrThunk: e, + getOrDie: e, + or: t, + orThunk: t, + map: function(e) { + return y(e(n)); + }, + ap: function(e) { + return e.fold(v, function(e) { + return y(e(n)); + }); + }, + each: function(e) { + e(n); + }, + bind: r, + flatten: e, + exists: r, + forall: r, + filter: function(e) { + return e(n) ? o : g; + }, + equals: function(e) { + return e.is(n); + }, + equals_: function(e, t) { + return e.fold(p, function(e) { + return t(n, e); + }); + }, + toArray: function() { + return [n]; + }, + toString: function() { + return "some(" + n + ")"; + } + }; + return o; + }, + T = { + some: y, + none: v, + from: function(n) { + return null === n || n === undefined ? g : y(n); + } + }, + w = (Array.prototype.indexOf, + undefined, + function(n, e) { + for (var t = n.length, r = new Array(t), o = 0; o < t; o++) { + var u = n[o]; + r[o] = e(u, o, n); + } + return r; + }), + x = function(n, e) { + for (var t = 0, r = n.length; t < r; t++) e(n[t], t, n); + }, + E = (Array.prototype.push, Array.prototype.slice, w), + b = x, + k = function(n) { + if (null === n || n === undefined) + throw new Error("Node cannot be null or undefined"); + return { dom: m.constant(n) }; + }, + N = { + fromHtml: function(n, e) { + var t = (e || document).createElement("div"); + if (((t.innerHTML = n), !t.hasChildNodes() || t.childNodes.length > 1)) + throw (console.error("HTML does not have a single root node", n), + "HTML must have a single root node"); + return k(t.childNodes[0]); + }, + fromTag: function(n, e) { + var t = (e || document).createElement(n); + return k(t); + }, + fromText: function(n, e) { + var t = (e || document).createTextNode(n); + return k(t); + }, + fromDom: k, + fromPoint: function(n, e, t) { + return T.from(n.dom().elementFromPoint(e, t)).map(k); + } + }, + C = 8, + M = 9, + D = 3, + O = function(n) { + return n.dom().nodeName.toLowerCase(); + }, + A = function(n) { + return n.dom().nodeType; + }, + S = function(n) { + return function(e) { + return A(e) === n; + }; + }, + B = S(1), + P = S(D), + V = S(M), + q = { + name: O, + type: A, + value: function(n) { + return n.dom().nodeValue; + }, + isElement: B, + isText: P, + isDocument: V, + isComment: function(n) { + return A(n) === C || "#comment" === O(n); + } + }, + H = function(n) { + return ( + '' + + n + + "" + ); + }, + L = function(n, e) { + var t = [], + r = n.dom(), + o = E(r.childNodes, N.fromDom); + return ( + b(o, function(n) { + e(n) && (t = t.concat([n])), (t = t.concat(L(n, e))); + }), + t + ); + }, + R = { + isMatch: function(n) { + return ( + q.isText(n) && q.value(n) !== undefined && s.regExp.test(q.value(n)) + ); + }, + filterDescendants: L, + findParentElm: function(n, e) { + for (; n.parentNode; ) { + if (n.parentNode === e) return n; + n = n.parentNode; + } + }, + replaceWithSpans: function(n) { + return n.replace(s.regExpGlobal, H); + } + }, + _ = function(n, e) { + var t, + r, + o = R.filterDescendants(N.fromDom(e), R.isMatch); + b(o, function(e) { + var o = R.replaceWithSpans(q.value(e)); + for (r = n.dom.create("div", null, o); (t = r.lastChild); ) + n.dom.insertAfter(t, e.dom()); + n.dom.remove(e.dom()); + }); + }, + j = function(n, e) { + var t = n.dom.select(s.selector, e); + b(t, function(e) { + n.dom.remove(e, 1); + }); + }, + z = _, + G = j, + W = function(n) { + var e = n.getBody(), + t = n.selection.getBookmark(), + r = R.findParentElm(n.selection.getNode(), e); + (r = r !== undefined ? r : e), + j(n, r), + _(n, r), + n.selection.moveToBookmark(t); + }, + F = function(n, e) { + var t, + r = n.getBody(), + o = n.selection; + e.set(!e.get()), + c(n, e.get()), + (t = o.getBookmark()), + !0 === e.get() ? z(n, r) : G(n, r), + o.moveToBookmark(t); + }, + I = function(n, e) { + n.addCommand("mceVisualChars", function() { + F(n, e); + }); + }, + J = tinymce.util.Tools.resolve("tinymce.util.Delay"), + K = function(n, e) { + var t = J.debounce(function() { + W(n); + }, 300); + !1 !== n.settings.forced_root_block && + n.on("keydown", function(r) { + !0 === e.get() && (13 === r.keyCode ? W(n) : t()); + }); + }, + Q = function(n) { + return function(e) { + var t = e.control; + n.on("VisualChars", function(n) { + t.active(n.state); + }); + }; + }; + u.add("visualchars", function(n) { + var e, + t = o(!1); + return ( + I(n, t), + (e = n).addButton("visualchars", { + active: !1, + title: "Show invisible characters", + cmd: "mceVisualChars", + onPostRender: Q(e) + }), + e.addMenuItem("visualchars", { + text: "Show invisible characters", + cmd: "mceVisualChars", + onPostRender: Q(e), + selectable: !0, + context: "view", + prependToContext: !0 + }), + K(n, t), + i(t) + ); + }); +})(); +!(function() { + "use strict"; + var e = function(t) { + var n = t, + o = function() { + return n; + }; + return { + get: o, + set: function(e) { + n = e; + }, + clone: function() { + return e(o()); + } + }; + }, + t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = function(e, t) { + e.fire("VisualBlocks", { state: t }); + }, + o = function(e) { + return e.getParam("visualblocks_default_state", !1); + }, + s = function(e) { + return e.settings.visualblocks_content_css; + }, + i = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + c = tinymce.util.Tools.resolve("tinymce.util.Tools"), + l = i.DOM.uniqueId(), + u = function(e, t) { + var n = c.toArray(e.getElementsByTagName("link")); + if ( + 0 === + c.grep(n, function(e) { + return e.id === l; + }).length + ) { + var o = i.DOM.create("link", { id: l, rel: "stylesheet", href: t }); + e.getElementsByTagName("head")[0].appendChild(o); + } + }, + a = function(e, t, o) { + var i = e.dom, + c = s(e); + u(e.getDoc(), c || t + "/css/visualblocks.css"), + i.toggleClass(e.getBody(), "mce-visualblocks"), + o.set(!o.get()), + n(e, o.get()); + }, + r = function(e, t, n) { + e.addCommand("mceVisualBlocks", function() { + a(e, t, n); + }); + }, + m = function(e, t, n) { + e.on("PreviewFormats AfterPreviewFormats", function(t) { + n.get() && + e.dom.toggleClass( + e.getBody(), + "mce-visualblocks", + "afterpreviewformats" === t.type + ); + }), + e.on("init", function() { + o(e) && a(e, t, n); + }), + e.on("remove", function() { + e.dom.removeClass(e.getBody(), "mce-visualblocks"); + }); + }, + f = function(e, t) { + return function(n) { + var o = n.control; + o.active(t.get()), + e.on("VisualBlocks", function(e) { + o.active(e.state); + }); + }; + }, + d = function(e, t) { + e.addButton("visualblocks", { + active: !1, + title: "Show blocks", + cmd: "mceVisualBlocks", + onPostRender: f(e, t) + }), + e.addMenuItem("visualblocks", { + text: "Show blocks", + cmd: "mceVisualBlocks", + onPostRender: f(e, t), + selectable: !0, + context: "view", + prependToContext: !0 + }); + }; + t.add("visualblocks", function(t, n) { + var o = e(!1); + r(t, n, o), d(t, o), m(t, n, o); + }); +})(); +!(function() { + "use strict"; + var t = function(e) { + var n = e, + r = function() { + return n; + }; + return { + get: r, + set: function(t) { + n = t; + }, + clone: function() { + return t(r()); + } + }; + }, + e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = function(t) { + return { + setPatterns: function(e) { + t.set(e); + }, + getPatterns: function() { + return t.get(); + } + }; + }, + r = [ + { start: "*", end: "*", format: "italic" }, + { start: "**", end: "**", format: "bold" }, + { start: "***", end: "***", format: ["bold", "italic"] }, + { start: "#", format: "h1" }, + { start: "##", format: "h2" }, + { start: "###", format: "h3" }, + { start: "####", format: "h4" }, + { start: "#####", format: "h5" }, + { start: "######", format: "h6" }, + { start: "1. ", cmd: "InsertOrderedList" }, + { start: "* ", cmd: "InsertUnorderedList" }, + { start: "- ", cmd: "InsertUnorderedList" } + ], + a = function(t) { + return t.textpattern_patterns !== undefined ? t.textpattern_patterns : r; + }, + o = tinymce.util.Tools.resolve("tinymce.util.Delay"), + i = tinymce.util.Tools.resolve("tinymce.util.VK"), + s = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"), + l = tinymce.util.Tools.resolve("tinymce.util.Tools"), + d = function(t, e) { + for (var n = 0; n < t.length; n++) + if ( + 0 === e.indexOf(t[n].start) && + (!t[n].end || e.lastIndexOf(t[n].end) === e.length - t[n].end.length) + ) + return t[n]; + }, + f = function(t, e, n, r) { + var a, + o, + i, + s, + l, + d, + f = t.sort(function(t, e) { + return t.start.length > e.start.length + ? -1 + : t.start.length < e.start.length + ? 1 + : 0; + }); + for (o = 0; o < f.length; o++) + if ( + (a = f[o]).end !== undefined && + ((s = a), + (l = n), + (d = r), + e.substr(l - s.end.length - d, s.end.length) === s.end) && + n - r - (i = a).end.length - i.start.length > 0 + ) + return a; + }, + c = function(t, e, n) { + if (!1 !== e.collapsed) { + var r = e.startContainer, + a = r.data, + o = !0 === n ? 1 : 0; + if (3 === r.nodeType) { + var i = f(t, a, e.startOffset, o); + if (i !== undefined) { + var s = a.lastIndexOf(i.end, e.startOffset - o), + l = a.lastIndexOf(i.start, s - i.end.length); + if (((s = a.indexOf(i.end, l + i.start.length)), -1 !== l)) { + var c = document.createRange(); + c.setStart(r, l), c.setEnd(r, s + i.end.length); + var u = d(t, c.toString()); + if ( + !( + i === undefined || + u !== i || + r.data.length <= i.start.length + i.end.length + ) + ) + return { pattern: i, startOffset: l, endOffset: s }; + } + } + } + } + }, + u = function(t, e, n) { + var r = t.selection.getRng(!0), + a = c(e, r, n); + if (a) + return (function(t, e, n, r) { + var a = l.isArray(n.pattern.format) + ? n.pattern.format + : [n.pattern.format]; + if ( + 0 !== + l.grep(a, function(e) { + var n = t.formatter.get(e); + return n && n[0].inline; + }).length + ) + return ( + t.undoManager.transact(function() { + var r, o, i, s; + (r = e), + (o = n.pattern), + (i = n.endOffset), + (s = n.startOffset), + (r = s > 0 ? r.splitText(s) : r).splitText( + i - s + o.end.length + ), + r.deleteData(0, o.start.length), + r.deleteData(r.data.length - o.end.length, o.end.length), + (e = r), + a.forEach(function(n) { + t.formatter.apply(n, {}, e); + }); + }), + e + ); + })(t, r.startContainer, a); + }, + g = { + patternFromRng: c, + applyInlineFormatSpace: function(t, e) { + return u(t, e, !0); + }, + applyInlineFormatEnter: function(t, e) { + return u(t, e, !1); + }, + applyBlockFormat: function(t, e) { + var n, r, a, o, i, f, c, u, g, h, m; + if ( + ((n = t.selection), + (r = t.dom), + n.isCollapsed() && (c = r.getParent(n.getStart(), "p"))) + ) { + for (g = new s(c, c); (i = g.next()); ) + if (3 === i.nodeType) { + o = i; + break; + } + if (o) { + if (!(u = d(e, o.data))) return; + if ( + ((a = (h = n.getRng(!0)).startContainer), + (m = h.startOffset), + o === a && (m = Math.max(0, m - u.start.length)), + l.trim(o.data).length === u.start.length) + ) + return; + u.format && + (f = t.formatter.get(u.format)) && + f[0].block && + (o.deleteData(0, u.start.length), + t.formatter.apply(u.format, {}, o), + h.setStart(a, m), + h.collapse(!0), + n.setRng(h)), + u.cmd && + t.undoManager.transact(function() { + o.deleteData(0, u.start.length), t.execCommand(u.cmd); + }); + } + } + } + }, + h = function(t, e, n) { + for (var r = 0; r < t.length; r++) if (n(t[r], e)) return !0; + }, + m = { + handleEnter: function(t, e) { + var n, r; + (n = g.applyInlineFormatEnter(t, e)) && + ((r = t.dom.createRng()).setStart(n, n.data.length), + r.setEnd(n, n.data.length), + t.selection.setRng(r)), + g.applyBlockFormat(t, e); + }, + handleInlineKey: function(t, e) { + var n, r, a, o, i; + (n = g.applyInlineFormatSpace(t, e)) && + ((i = t.dom), + (r = n.data.slice(-1)), + /[\u00a0 ]/.test(r) && + (n.deleteData(n.data.length - 1, 1), + (a = i.doc.createTextNode(r)), + i.insertAfter(a, n.parentNode), + (o = i.createRng()).setStart(a, 1), + o.setEnd(a, 1), + t.selection.setRng(o))); + }, + checkCharCode: function(t, e) { + return h(t, e, function(t, e) { + return t.charCodeAt(0) === e.charCode; + }); + }, + checkKeyCode: function(t, e) { + return h(t, e, function(t, e) { + return t === e.keyCode && !1 === i.modifierPressed(e); + }); + } + }, + p = function(t, e) { + var n = [",", ".", ";", ":", "!", "?"], + r = [32]; + t.on( + "keydown", + function(n) { + 13 !== n.keyCode || i.modifierPressed(n) || m.handleEnter(t, e.get()); + }, + !0 + ), + t.on("keyup", function(n) { + m.checkKeyCode(r, n) && m.handleInlineKey(t, e.get()); + }), + t.on("keypress", function(r) { + m.checkCharCode(n, r) && + o.setEditorTimeout(t, function() { + m.handleInlineKey(t, e.get()); + }); + }); + }; + e.add("textpattern", function(e) { + var r = t(a(e.settings)); + return p(e, r), n(r); + }); +})(); +!(function() { + "use strict"; + var t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + e = function(t, e) { + var o; + return ( + t.dom.getParents(t.selection.getStart(), function(t) { + var r; + (r = t.style["forecolor" === e ? "color" : "background-color"]) && + (o = r); + }), + o + ); + }, + o = function(t) { + var e, + o = []; + for (e = 0; e < t.length; e += 2) + o.push({ text: t[e + 1], color: "#" + t[e] }); + return o; + }, + r = function(t, e, o) { + t.undoManager.transact(function() { + t.focus(), t.formatter.apply(e, { value: o }), t.nodeChanged(); + }); + }, + n = function(t, e) { + t.undoManager.transact(function() { + t.focus(), + t.formatter.remove(e, { value: null }, null, !0), + t.nodeChanged(); + }); + }, + a = function(t) { + t.addCommand("mceApplyTextcolor", function(e, o) { + r(t, e, o); + }), + t.addCommand("mceRemoveTextcolor", function(e) { + n(t, e); + }); + }, + l = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + c = tinymce.util.Tools.resolve("tinymce.util.Tools"), + i = [ + "000000", + "Black", + "993300", + "Burnt orange", + "333300", + "Dark olive", + "003300", + "Dark green", + "003366", + "Dark azure", + "000080", + "Navy Blue", + "333399", + "Indigo", + "333333", + "Very dark gray", + "800000", + "Maroon", + "FF6600", + "Orange", + "808000", + "Olive", + "008000", + "Green", + "008080", + "Teal", + "0000FF", + "Blue", + "666699", + "Grayish blue", + "808080", + "Gray", + "FF0000", + "Red", + "FF9900", + "Amber", + "99CC00", + "Yellow green", + "339966", + "Sea green", + "33CCCC", + "Turquoise", + "3366FF", + "Royal blue", + "800080", + "Purple", + "999999", + "Medium gray", + "FF00FF", + "Magenta", + "FFCC00", + "Gold", + "FFFF00", + "Yellow", + "00FF00", + "Lime", + "00FFFF", + "Aqua", + "00CCFF", + "Sky blue", + "993366", + "Red violet", + "FFFFFF", + "White", + "FF99CC", + "Pink", + "FFCC99", + "Peach", + "FFFF99", + "Light yellow", + "CCFFCC", + "Pale green", + "CCFFFF", + "Pale cyan", + "99CCFF", + "Light sky blue", + "CC99FF", + "Plum" + ], + u = function(t) { + return t.getParam("textcolor_map", i); + }, + m = function(t) { + return t.getParam("textcolor_rows", 5); + }, + s = function(t) { + return t.getParam("textcolor_cols", 8); + }, + d = function(t) { + return t.getParam("color_picker_callback", null); + }, + f = function(t) { + return t.getParam("forecolor_map", u(t)); + }, + g = function(t) { + return t.getParam("backcolor_map", u(t)); + }, + F = function(t) { + return t.getParam("forecolor_rows", m(t)); + }, + b = function(t) { + return t.getParam("backcolor_rows", m(t)); + }, + p = function(t) { + return t.getParam("forecolor_cols", s(t)); + }, + C = function(t) { + return t.getParam("backcolor_cols", s(t)); + }, + y = d, + v = function(t) { + return "function" == typeof d(t); + }, + h = tinymce.util.Tools.resolve("tinymce.util.I18n"), + P = function(t, e, r, n) { + var a, + c, + i, + u, + m, + s, + d, + f = 0, + g = l.DOM.uniqueId("mcearia"), + F = function(t, e) { + var o = "transparent" === t; + return ( + '
    ' + + (o ? "×" : "") + + "
    " + ); + }; + for ( + (a = o(r)).push({ + text: h.translate("No color"), + color: "transparent" + }), + i = + '', + u = a.length - 1, + s = 0; + s < e; + s++ + ) { + for (i += "", m = 0; m < t; m++) + i += (d = s * t + m) > u ? "" : F((c = a[d]).color, c.text); + i += ""; + } + if (n) { + for ( + i += + '", + i += "", + m = 0; + m < t; + m++ + ) + i += F("", "Custom color"); + i += ""; + } + return (i += "
    "); + }, + k = function(t, e) { + (t.style.background = e), t.setAttribute("data-mce-color", e); + }, + x = function(t) { + return function(e) { + var o = e.control; + o._color + ? t.execCommand("mceApplyTextcolor", o.settings.format, o._color) + : t.execCommand("mceRemoveTextcolor", o.settings.format); + }; + }, + T = function(t, o) { + return function(r) { + var n, + a = this.parent(), + i = e(t, a.settings.format), + u = function(e) { + a.hidePanel(), + a.color(e), + t.execCommand("mceApplyTextcolor", a.settings.format, e); + }; + l.DOM.getParent(r.target, ".mce-custom-color-btn") && + (a.hidePanel(), + y(t).call( + t, + function(t) { + var e, + r, + n, + l = a.panel.getEl().getElementsByTagName("table")[0]; + for ( + e = c.map(l.rows[l.rows.length - 1].childNodes, function(t) { + return t.firstChild; + }), + n = 0; + n < e.length && (r = e[n]).getAttribute("data-mce-color"); + n++ + ); + if (n === o) + for (n = 0; n < o - 1; n++) + k(e[n], e[n + 1].getAttribute("data-mce-color")); + k(r, t), u(t); + }, + i + )), + (n = r.target.getAttribute("data-mce-color")) + ? (this.lastId && + l.DOM.get(this.lastId).setAttribute("aria-selected", !1), + r.target.setAttribute("aria-selected", !0), + (this.lastId = r.target.id), + "transparent" === n + ? (a.hidePanel(), + a.resetColor(), + t.execCommand("mceRemoveTextcolor", a.settings.format)) + : u(n)) + : null !== n && a.hidePanel(); + }; + }, + _ = function(t, e) { + return function() { + var o = e ? p(t) : C(t), + r = e ? F(t) : b(t), + n = e ? f(t) : g(t), + a = v(t); + return P(o, r, n, a); + }; + }, + A = function(t) { + t.addButton("forecolor", { + type: "colorbutton", + tooltip: "Text color", + format: "forecolor", + panel: { + role: "application", + ariaRemember: !0, + html: _(t, !0), + onclick: T(t, p(t)) + }, + onclick: x(t) + }), + t.addButton("backcolor", { + type: "colorbutton", + tooltip: "Background color", + format: "hilitecolor", + panel: { + role: "application", + ariaRemember: !0, + html: _(t, !1), + onclick: T(t, C(t)) + }, + onclick: x(t) + }); + }; + t.add("textcolor", function(t) { + a(t), A(t); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = function(e) { + return function() { + return e; + }; + }, + n = function(e) { + for ( + var t = new Array(arguments.length - 1), n = 1; + n < arguments.length; + n++ + ) + t[n - 1] = arguments[n]; + return function() { + for (var n = new Array(arguments.length), a = 0; a < n.length; a++) + n[a] = arguments[a]; + var r = t.concat(n); + return e.apply(null, r); + }; + }, + a = (t(!1), t(!0), tinymce.util.Tools.resolve("tinymce.util.Tools")), + r = tinymce.util.Tools.resolve("tinymce.util.XHR"), + l = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + c = function(e) { + return e.getParam("template_cdate_classes", "cdate"); + }, + o = function(e) { + return e.getParam("template_mdate_classes", "mdate"); + }, + i = function(e) { + return e.getParam("template_selected_content_classes", "selcontent"); + }, + s = function(e) { + return e.getParam("template_preview_replace_values"); + }, + u = function(e) { + return e.getParam("template_replace_values"); + }, + p = function(e) { + return e.templates; + }, + m = function(e) { + return e.getParam( + "template_cdate_format", + e.getLang("template.cdate_format") + ); + }, + d = function(e) { + return e.getParam( + "template_mdate_format", + e.getLang("template.mdate_format") + ); + }, + f = function(e) { + return e.getParam("template_popup_width", 600); + }, + g = function(e) { + return Math.min( + l.DOM.getViewPort().h, + e.getParam("template_popup_height", 500) + ); + }, + h = function(e, t) { + if ((e = "" + e).length < t) + for (var n = 0; n < t - e.length; n++) e = "0" + e; + return e; + }, + y = function(e, t, n) { + var a = "Sun Mon Tue Wed Thu Fri Sat Sun".split(" "), + r = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split( + " " + ), + l = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), + c = "January February March April May June July August September October November December".split( + " " + ); + return ( + (n = n || new Date()), + (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = t.replace( + "%D", + "%m/%d/%Y" + )).replace("%r", "%I:%M:%S %p")).replace( + "%Y", + "" + n.getFullYear() + )).replace("%y", "" + n.getYear())).replace( + "%m", + h(n.getMonth() + 1, 2) + )).replace("%d", h(n.getDate(), 2))).replace( + "%H", + "" + h(n.getHours(), 2) + )).replace("%M", "" + h(n.getMinutes(), 2))).replace( + "%S", + "" + h(n.getSeconds(), 2) + )).replace("%I", "" + (((n.getHours() + 11) % 12) + 1))).replace( + "%p", + n.getHours() < 12 ? "AM" : "PM" + )).replace("%B", "" + e.translate(c[n.getMonth()]))).replace( + "%b", + "" + e.translate(l[n.getMonth()]) + )).replace("%A", "" + e.translate(r[n.getDay()]))).replace( + "%a", + "" + e.translate(a[n.getDay()]) + )).replace("%%", "%")) + ); + }, + v = function(e, t, n) { + return ( + a.each(n, function(e, n) { + "function" == typeof e && (e = e(n)), + (t = t.replace(new RegExp("\\{\\$" + n + "\\}", "g"), e)); + }), + t + ); + }, + M = function(e, t) { + var n = e.dom, + r = u(e); + a.each(n.select("*", t), function(e) { + a.each(r, function(t, a) { + n.hasClass(e, a) && "function" == typeof r[a] && r[a](e); + }); + }); + }, + _ = function(e, t) { + return new RegExp("\\b" + t + "\\b", "g").test(e.className); + }, + b = function(e, t) { + return function() { + var n = p(e); + "function" != typeof n + ? "string" == typeof n + ? r.send({ + url: n, + success: function(e) { + t(JSON.parse(e)); + } + }) + : t(n) + : n(t); + }; + }, + T = v, + x = M, + P = function(e, t, n) { + var r, + l, + s = e.dom, + p = e.selection.getContent(); + (n = v(0, n, u(e))), + (r = s.create("div", null, n)), + (l = s.select(".mceTmpl", r)) && + l.length > 0 && + (r = s.create("div", null)).appendChild(l[0].cloneNode(!0)), + a.each(s.select("*", r), function(t) { + _(t, c(e).replace(/\s+/g, "|")) && (t.innerHTML = y(e, m(e))), + _(t, o(e).replace(/\s+/g, "|")) && (t.innerHTML = y(e, d(e))), + _(t, i(e).replace(/\s+/g, "|")) && (t.innerHTML = p); + }), + M(e, r), + e.execCommand("mceInsertContent", !1, r.innerHTML), + e.addVisual(); + }, + S = function(e) { + e.addCommand("mceInsertTemplate", n(P, e)); + }, + w = function(e) { + e.on("PreProcess", function(t) { + var n = e.dom, + r = d(e); + a.each(n.select("div", t.node), function(t) { + n.hasClass(t, "mceTmpl") && + (a.each(n.select("*", t), function(t) { + n.hasClass( + t, + e + .getParam("template_mdate_classes", "mdate") + .replace(/\s+/g, "|") + ) && (t.innerHTML = y(e, r)); + }), + x(e, t)); + }); + }); + }, + D = function(e, t, n) { + if (-1 === n.indexOf("")) { + var r = ""; + a.each(e.contentCSS, function(t) { + r += + ''; + }); + var l = e.settings.body_class || ""; + -1 !== l.indexOf("=") && + (l = (l = e.getParam("body_class", "", "hash"))[e.id] || ""), + (n = + "" + + r + + '' + + n + + ""); + } + n = T(e, n, s(e)); + var c = t.find("iframe")[0].getEl().contentWindow.document; + c.open(), c.write(n), c.close(); + }, + H = function(e, t) { + var n, + l, + c = []; + if (t && 0 !== t.length) + a.each(t, function(e) { + c.push({ + selected: !c.length, + text: e.title, + value: { + url: e.url, + content: e.content, + description: e.description + } + }); + }), + (n = e.windowManager.open({ + title: "Insert template", + layout: "flex", + direction: "column", + align: "stretch", + padding: 15, + spacing: 10, + items: [ + { + type: "form", + flex: 0, + padding: 0, + items: [ + { + type: "container", + label: "Templates", + items: { + type: "listbox", + label: "Templates", + name: "template", + values: c, + onselect: function(t) { + var a = t.control.value(); + a.url + ? r.send({ + url: a.url, + success: function(t) { + D(e, n, (l = t)); + } + }) + : ((l = a.content), D(e, n, l)), + n + .find("#description")[0] + .text(t.control.value().description); + } + } + } + ] + }, + { + type: "label", + name: "description", + label: "Description", + text: "\xa0" + }, + { type: "iframe", flex: 1, border: 1 } + ], + onsubmit: function() { + P(e, !1, l); + }, + minWidth: f(e), + minHeight: g(e) + })) + .find("listbox")[0] + .fire("select"); + else { + var o = e.translate("No templates defined."); + e.notificationManager.open({ text: o, type: "info" }); + } + }, + C = function(e) { + return function(t) { + H(e, t); + }; + }, + A = function(e) { + e.addButton("template", { + title: "Insert template", + onclick: b(e.settings, C(e)) + }), + e.addMenuItem("template", { + text: "Template", + onclick: b(e.settings, C(e)), + icon: "template", + context: "insert" + }); + }; + e.add("template", function(e) { + A(e), S(e), w(e); + }); +})(); +!(function() { + "use strict"; + var n, + t, + e, + r, + o, + i, + u, + a, + c, + l, + s, + f = tinymce.util.Tools.resolve("tinymce.PluginManager"), + d = function(n) { + return function() { + return n; + }; + }, + m = { + noop: function() {}, + noarg: function(n) { + return function() { + return n(); + }; + }, + compose: function(n, t) { + return function() { + return n(t.apply(null, arguments)); + }; + }, + constant: d, + identity: function(n) { + return n; + }, + tripleEquals: function(n, t) { + return n === t; + }, + curry: function(n) { + for ( + var t = new Array(arguments.length - 1), e = 1; + e < arguments.length; + e++ + ) + t[e - 1] = arguments[e]; + return function() { + for (var e = new Array(arguments.length), r = 0; r < e.length; r++) + e[r] = arguments[r]; + var o = t.concat(e); + return n.apply(null, o); + }; + }, + not: function(n) { + return function() { + return !n.apply(null, arguments); + }; + }, + die: function(n) { + return function() { + throw new Error(n); + }; + }, + apply: function(n) { + return n(); + }, + call: function(n) { + n(); + }, + never: d(!1), + always: d(!0) + }, + g = m.never, + p = m.always, + h = function() { + return v; + }, + v = ((r = { + fold: function(n, t) { + return n(); + }, + is: g, + isSome: g, + isNone: p, + getOr: (e = function(n) { + return n; + }), + getOrThunk: (t = function(n) { + return n(); + }), + getOrDie: function(n) { + throw new Error(n || "error: getOrDie called on none."); + }, + or: e, + orThunk: t, + map: h, + ap: h, + each: function() {}, + bind: h, + flatten: h, + exists: g, + forall: p, + filter: h, + equals: (n = function(n) { + return n.isNone(); + }), + equals_: n, + toArray: function() { + return []; + }, + toString: m.constant("none()") + }), + Object.freeze && Object.freeze(r), + r), + b = function(n) { + var t = function() { + return n; + }, + e = function() { + return o; + }, + r = function(t) { + return t(n); + }, + o = { + fold: function(t, e) { + return e(n); + }, + is: function(t) { + return n === t; + }, + isSome: p, + isNone: g, + getOr: t, + getOrThunk: t, + getOrDie: t, + or: e, + orThunk: e, + map: function(t) { + return b(t(n)); + }, + ap: function(t) { + return t.fold(h, function(t) { + return b(t(n)); + }); + }, + each: function(t) { + t(n); + }, + bind: r, + flatten: t, + exists: r, + forall: r, + filter: function(t) { + return t(n) ? o : v; + }, + equals: function(t) { + return t.is(n); + }, + equals_: function(t, e) { + return t.fold(g, function(t) { + return e(n, t); + }); + }, + toArray: function() { + return [n]; + }, + toString: function() { + return "some(" + n + ")"; + } + }; + return o; + }, + w = { + some: b, + none: h, + from: function(n) { + return null === n || n === undefined ? v : b(n); + } + }, + y = + (o = Array.prototype.indexOf) === undefined + ? function(n, t) { + return A(n, t); + } + : function(n, t) { + return o.call(n, t); + }, + x = function(n, t) { + return y(n, t) > -1; + }, + C = function(n, t) { + for (var e = n.length, r = new Array(e), o = 0; o < e; o++) { + var i = n[o]; + r[o] = t(i, o, n); + } + return r; + }, + S = function(n, t) { + for (var e = 0, r = n.length; e < r; e++) t(n[e], e, n); + }, + R = function(n, t) { + for (var e = n.length - 1; e >= 0; e--) t(n[e], e, n); + }, + T = function(n, t) { + for (var e = [], r = 0, o = n.length; r < o; r++) { + var i = n[r]; + t(i, r, n) && e.push(i); + } + return e; + }, + D = function(n, t) { + for (var e = 0, r = n.length; e < r; e++) + if (t(n[e], e, n)) return w.some(e); + return w.none(); + }, + A = function(n, t) { + for (var e = 0, r = n.length; e < r; ++e) if (n[e] === t) return e; + return -1; + }, + k = Array.prototype.push, + N = function(n) { + for (var t = [], e = 0, r = n.length; e < r; ++e) { + if (!Array.prototype.isPrototypeOf(n[e])) + throw new Error( + "Arr.flatten item " + e + " was not an array, input: " + n + ); + k.apply(t, n[e]); + } + return t; + }, + O = function(n, t) { + for (var e = 0, r = n.length; e < r; ++e) + if (!0 !== t(n[e], e, n)) return !1; + return !0; + }, + E = Array.prototype.slice, + B = { + map: C, + each: S, + eachr: R, + partition: function(n, t) { + for (var e = [], r = [], o = 0, i = n.length; o < i; o++) { + var u = n[o]; + (t(u, o, n) ? e : r).push(u); + } + return { pass: e, fail: r }; + }, + filter: T, + groupBy: function(n, t) { + if (0 === n.length) return []; + for (var e = t(n[0]), r = [], o = [], i = 0, u = n.length; i < u; i++) { + var a = n[i], + c = t(a); + c !== e && (r.push(o), (o = [])), (e = c), o.push(a); + } + return 0 !== o.length && r.push(o), r; + }, + indexOf: function(n, t) { + var e = y(n, t); + return -1 === e ? w.none() : w.some(e); + }, + foldr: function(n, t, e) { + return ( + R(n, function(n) { + e = t(e, n); + }), + e + ); + }, + foldl: function(n, t, e) { + return ( + S(n, function(n) { + e = t(e, n); + }), + e + ); + }, + find: function(n, t) { + for (var e = 0, r = n.length; e < r; e++) { + var o = n[e]; + if (t(o, e, n)) return w.some(o); + } + return w.none(); + }, + findIndex: D, + flatten: N, + bind: function(n, t) { + var e = C(n, t); + return N(e); + }, + forall: O, + exists: function(n, t) { + return D(n, t).isSome(); + }, + contains: x, + equal: function(n, t) { + return ( + n.length === t.length && + O(n, function(n, e) { + return n === t[e]; + }) + ); + }, + reverse: function(n) { + var t = E.call(n, 0); + return t.reverse(), t; + }, + chunk: function(n, t) { + for (var e = [], r = 0; r < n.length; r += t) { + var o = n.slice(r, r + t); + e.push(o); + } + return e; + }, + difference: function(n, t) { + return T(n, function(n) { + return !x(t, n); + }); + }, + mapToObject: function(n, t) { + for (var e = {}, r = 0, o = n.length; r < o; r++) { + var i = n[r]; + e[String(i)] = t(i, r); + } + return e; + }, + pure: function(n) { + return [n]; + }, + sort: function(n, t) { + var e = E.call(n, 0); + return e.sort(t), e; + }, + range: function(n, t) { + for (var e = [], r = 0; r < n; r++) e.push(t(r)); + return e; + }, + head: function(n) { + return 0 === n.length ? w.none() : w.some(n[0]); + }, + last: function(n) { + return 0 === n.length ? w.none() : w.some(n[n.length - 1]); + } + }, + I = + (i = Object.keys) === undefined + ? function(n) { + var t = []; + for (var e in n) n.hasOwnProperty(e) && t.push(e); + return t; + } + : i, + P = function(n, t) { + for (var e = I(n), r = 0, o = e.length; r < o; r++) { + var i = e[r]; + t(n[i], i, n); + } + }, + W = function(n, t) { + var e = {}; + return ( + P(n, function(r, o) { + var i = t(r, o, n); + e[i.k] = i.v; + }), + e + ); + }, + _ = function(n, t) { + var e = []; + return ( + P(n, function(n, r) { + e.push(t(n, r)); + }), + e + ); + }, + M = function(n) { + return _(n, function(n) { + return n; + }); + }, + L = { + bifilter: function(n, t) { + var e = {}, + r = {}; + return ( + P(n, function(n, o) { + (t(n, o) ? e : r)[o] = n; + }), + { t: e, f: r } + ); + }, + each: P, + map: function(n, t) { + return W(n, function(n, e, r) { + return { k: e, v: t(n, e, r) }; + }); + }, + mapToArray: _, + tupleMap: W, + find: function(n, t) { + for (var e = I(n), r = 0, o = e.length; r < o; r++) { + var i = e[r], + u = n[i]; + if (t(u, i, n)) return w.some(u); + } + return w.none(); + }, + keys: I, + values: M, + size: function(n) { + return M(n).length; + } + }, + q = function(n) { + return function(t) { + return ( + (function(n) { + if (null === n) return "null"; + var t = typeof n; + return "object" === t && Array.prototype.isPrototypeOf(n) + ? "array" + : "object" === t && String.prototype.isPrototypeOf(n) + ? "string" + : t; + })(t) === n + ); + }; + }, + z = { + isString: q("string"), + isObject: q("object"), + isArray: q("array"), + isNull: q("null"), + isBoolean: q("boolean"), + isUndefined: q("undefined"), + isFunction: q("function"), + isNumber: q("number") + }, + F = function(n) { + return n.slice(0).sort(); + }, + j = function(n, t) { + throw new Error( + "All required keys (" + + F(n).join(", ") + + ") were not specified. Specified keys were: " + + F(t).join(", ") + + "." + ); + }, + H = function(n) { + throw new Error("Unsupported keys for object: " + F(n).join(", ")); + }, + V = function(n, t) { + if (!z.isArray(t)) + throw new Error( + "The " + n + " fields must be an array. Was: " + t + "." + ); + B.each(t, function(t) { + if (!z.isString(t)) + throw new Error( + "The value " + t + " in the " + n + " fields was not a string." + ); + }); + }, + U = function(n, t) { + throw new Error( + "All values need to be of type: " + + t + + ". Keys (" + + F(n).join(", ") + + ") were not." + ); + }, + G = function(n) { + var t = F(n); + B.find(t, function(n, e) { + return e < t.length - 1 && n === t[e + 1]; + }).each(function(n) { + throw new Error( + "The field: " + + n + + " occurs more than once in the combined fields: [" + + t.join(", ") + + "]." + ); + }); + }, + X = { + immutable: function() { + var n = arguments; + return function() { + for (var t = new Array(arguments.length), e = 0; e < t.length; e++) + t[e] = arguments[e]; + if (n.length !== t.length) + throw new Error( + 'Wrong number of arguments to struct. Expected "[' + + n.length + + ']", got ' + + t.length + + " arguments" + ); + var r = {}; + return ( + B.each(n, function(n, e) { + r[n] = m.constant(t[e]); + }), + r + ); + }; + }, + immutableBag: function(n, t) { + var e = n.concat(t); + if (0 === e.length) + throw new Error( + "You must specify at least one required or optional field." + ); + return ( + V("required", n), + V("optional", t), + G(e), + function(r) { + var o = L.keys(r); + B.forall(n, function(n) { + return B.contains(o, n); + }) || j(n, o); + var i = B.filter(o, function(n) { + return !B.contains(e, n); + }); + i.length > 0 && H(i); + var u = {}; + return ( + B.each(n, function(n) { + u[n] = m.constant(r[n]); + }), + B.each(t, function(n) { + u[n] = m.constant( + Object.prototype.hasOwnProperty.call(r, n) + ? w.some(r[n]) + : w.none() + ); + }), + u + ); + } + ); + } + }, + Y = X.immutable("width", "height"), + $ = X.immutable("rows", "columns"), + K = X.immutable("row", "column"), + J = X.immutable("x", "y"), + Q = X.immutable("element", "rowspan", "colspan"), + Z = X.immutable("element", "rowspan", "colspan", "isNew"), + nn = { + dimensions: Y, + grid: $, + address: K, + coords: J, + extended: X.immutable("element", "rowspan", "colspan", "row", "column"), + detail: Q, + detailnew: Z, + rowdata: X.immutable("element", "cells", "section"), + elementnew: X.immutable("element", "isNew"), + rowdatanew: X.immutable("element", "cells", "section", "isNew"), + rowcells: X.immutable("cells", "section"), + rowdetails: X.immutable("details", "section"), + bounds: X.immutable("startRow", "startCol", "finishRow", "finishCol") + }, + tn = function(n) { + if (null === n || n === undefined) + throw new Error("Node cannot be null or undefined"); + return { dom: m.constant(n) }; + }, + en = { + fromHtml: function(n, t) { + var e = (t || document).createElement("div"); + if (((e.innerHTML = n), !e.hasChildNodes() || e.childNodes.length > 1)) + throw (console.error("HTML does not have a single root node", n), + "HTML must have a single root node"); + return tn(e.childNodes[0]); + }, + fromTag: function(n, t) { + var e = (t || document).createElement(n); + return tn(e); + }, + fromText: function(n, t) { + var e = (t || document).createTextNode(n); + return tn(e); + }, + fromDom: tn, + fromPoint: function(n, t, e) { + return w.from(n.dom().elementFromPoint(t, e)).map(tn); + } + }, + rn = 8, + on = 9, + un = 1, + an = 3, + cn = un, + ln = on, + sn = function(n) { + return ( + (n.nodeType !== cn && n.nodeType !== ln) || 0 === n.childElementCount + ); + }, + fn = { + all: function(n, t) { + var e = t === undefined ? document : t.dom(); + return sn(e) ? [] : B.map(e.querySelectorAll(n), en.fromDom); + }, + is: function(n, t) { + var e = n.dom(); + if (e.nodeType !== cn) return !1; + if (e.matches !== undefined) return e.matches(t); + if (e.msMatchesSelector !== undefined) return e.msMatchesSelector(t); + if (e.webkitMatchesSelector !== undefined) + return e.webkitMatchesSelector(t); + if (e.mozMatchesSelector !== undefined) return e.mozMatchesSelector(t); + throw new Error("Browser lacks native selectors"); + }, + one: function(n, t) { + var e = t === undefined ? document : t.dom(); + return sn(e) ? w.none() : w.from(e.querySelector(n)).map(en.fromDom); + } + }, + dn = function(n, t) { + var e = [], + r = function(n) { + return e.push(n), t(n); + }, + o = t(n); + do { + o = o.bind(r); + } while (o.isSome()); + return e; + }, + mn = "undefined" != typeof window ? window : Function("return this;")(), + gn = function(n, t) { + for ( + var e = t !== undefined && null !== t ? t : mn, r = 0; + r < n.length && e !== undefined && null !== e; + ++r + ) + e = e[n[r]]; + return e; + }, + pn = function(n, t) { + var e = n.split("."); + return gn(e, t); + }, + hn = function(n, t) { + var e = pn(n, t); + if (e === undefined || null === e) + throw n + " not available on this browser"; + return e; + }, + vn = function() { + return hn("Node"); + }, + bn = function(n, t, e) { + return 0 != (n.compareDocumentPosition(t) & e); + }, + wn = function(n, t) { + return bn(n, t, vn().DOCUMENT_POSITION_CONTAINED_BY); + }, + yn = function(n) { + var t, + e = !1; + return function() { + return e || ((e = !0), (t = n.apply(null, arguments))), t; + }; + }, + xn = function(n, t) { + var e = (function(n, t) { + for (var e = 0; e < n.length; e++) { + var r = n[e]; + if (r.test(t)) return r; + } + return undefined; + })(n, t); + if (!e) return { major: 0, minor: 0 }; + var r = function(n) { + return Number(t.replace(e, "$" + n)); + }; + return Sn(r(1), r(2)); + }, + Cn = function() { + return Sn(0, 0); + }, + Sn = function(n, t) { + return { major: n, minor: t }; + }, + Rn = { + nu: Sn, + detect: function(n, t) { + var e = String(t).toLowerCase(); + return 0 === n.length ? Cn() : xn(n, e); + }, + unknown: Cn + }, + Tn = "Firefox", + Dn = function(n, t) { + return function() { + return t === n; + }; + }, + An = function(n) { + var t = n.current; + return { + current: t, + version: n.version, + isEdge: Dn("Edge", t), + isChrome: Dn("Chrome", t), + isIE: Dn("IE", t), + isOpera: Dn("Opera", t), + isFirefox: Dn(Tn, t), + isSafari: Dn("Safari", t) + }; + }, + kn = { + unknown: function() { + return An({ current: undefined, version: Rn.unknown() }); + }, + nu: An, + edge: m.constant("Edge"), + chrome: m.constant("Chrome"), + ie: m.constant("IE"), + opera: m.constant("Opera"), + firefox: m.constant(Tn), + safari: m.constant("Safari") + }, + Nn = "Windows", + On = "Android", + En = "Solaris", + Bn = "FreeBSD", + In = function(n, t) { + return function() { + return t === n; + }; + }, + Pn = function(n) { + var t = n.current; + return { + current: t, + version: n.version, + isWindows: In(Nn, t), + isiOS: In("iOS", t), + isAndroid: In(On, t), + isOSX: In("OSX", t), + isLinux: In("Linux", t), + isSolaris: In(En, t), + isFreeBSD: In(Bn, t) + }; + }, + Wn = { + unknown: function() { + return Pn({ current: undefined, version: Rn.unknown() }); + }, + nu: Pn, + windows: m.constant(Nn), + ios: m.constant("iOS"), + android: m.constant(On), + linux: m.constant("Linux"), + osx: m.constant("OSX"), + solaris: m.constant(En), + freebsd: m.constant(Bn) + }, + _n = function(n, t) { + var e = String(t).toLowerCase(); + return B.find(n, function(n) { + return n.search(e); + }); + }, + Mn = function(n, t) { + return _n(n, t).map(function(n) { + var e = Rn.detect(n.versionRegexes, t); + return { current: n.name, version: e }; + }); + }, + Ln = function(n, t) { + return _n(n, t).map(function(n) { + var e = Rn.detect(n.versionRegexes, t); + return { current: n.name, version: e }; + }); + }, + qn = function(n, t) { + return t + n; + }, + zn = function(n, t) { + return n + t; + }, + Fn = function(n, t) { + return n.substring(t); + }, + jn = function(n, t) { + return n.substring(0, n.length - t); + }, + Hn = function(n) { + return "" === n ? w.none() : w.some(n.substr(0, 1)); + }, + Vn = function(n) { + return "" === n ? w.none() : w.some(n.substring(1)); + }, + Un = function(n, t, e) { + return ( + "" === t || (!(n.length < t.length) && n.substr(e, e + t.length) === t) + ); + }, + Gn = function(n, t) { + return Un(n, t, 0); + }, + Xn = function(n, t) { + return Un(n, t, n.length - t.length); + }, + Yn = { + supplant: function(n, t) { + return n.replace(/\${([^{}]*)}/g, function(n, e) { + var r, + o = t[e]; + return "string" == (r = typeof o) || "number" === r ? o : n; + }); + }, + startsWith: Gn, + removeLeading: function(n, t) { + return Gn(n, t) ? Fn(n, t.length) : n; + }, + removeTrailing: function(n, t) { + return Xn(n, t) ? jn(n, t.length) : n; + }, + ensureLeading: function(n, t) { + return Gn(n, t) ? n : qn(n, t); + }, + ensureTrailing: function(n, t) { + return Xn(n, t) ? n : zn(n, t); + }, + endsWith: Xn, + contains: function(n, t) { + return -1 !== n.indexOf(t); + }, + trim: function(n) { + return n.replace(/^\s+|\s+$/g, ""); + }, + lTrim: function(n) { + return n.replace(/^\s+/g, ""); + }, + rTrim: function(n) { + return n.replace(/\s+$/g, ""); + }, + capitalize: function(n) { + return Hn(n) + .bind(function(t) { + return Vn(n).map(function(n) { + return t.toUpperCase() + n; + }); + }) + .getOr(n); + } + }, + $n = /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + Kn = function(n) { + return function(t) { + return Yn.contains(t, n); + }; + }, + Jn = [ + { + name: "Edge", + versionRegexes: [/.*?edge\/ ?([0-9]+)\.([0-9]+)$/], + search: function(n) { + return ( + Yn.contains(n, "edge/") && + Yn.contains(n, "chrome") && + Yn.contains(n, "safari") && + Yn.contains(n, "applewebkit") + ); + } + }, + { + name: "Chrome", + versionRegexes: [/.*?chrome\/([0-9]+)\.([0-9]+).*/, $n], + search: function(n) { + return Yn.contains(n, "chrome") && !Yn.contains(n, "chromeframe"); + } + }, + { + name: "IE", + versionRegexes: [ + /.*?msie\ ?([0-9]+)\.([0-9]+).*/, + /.*?rv:([0-9]+)\.([0-9]+).*/ + ], + search: function(n) { + return Yn.contains(n, "msie") || Yn.contains(n, "trident"); + } + }, + { + name: "Opera", + versionRegexes: [$n, /.*?opera\/([0-9]+)\.([0-9]+).*/], + search: Kn("opera") + }, + { + name: "Firefox", + versionRegexes: [/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/], + search: Kn("firefox") + }, + { + name: "Safari", + versionRegexes: [$n, /.*?cpu os ([0-9]+)_([0-9]+).*/], + search: function(n) { + return ( + (Yn.contains(n, "safari") || Yn.contains(n, "mobile/")) && + Yn.contains(n, "applewebkit") + ); + } + } + ], + Qn = [ + { + name: "Windows", + search: Kn("win"), + versionRegexes: [/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: "iOS", + search: function(n) { + return Yn.contains(n, "iphone") || Yn.contains(n, "ipad"); + }, + versionRegexes: [ + /.*?version\/\ ?([0-9]+)\.([0-9]+).*/, + /.*cpu os ([0-9]+)_([0-9]+).*/, + /.*cpu iphone os ([0-9]+)_([0-9]+).*/ + ] + }, + { + name: "Android", + search: Kn("android"), + versionRegexes: [/.*?android\ ?([0-9]+)\.([0-9]+).*/] + }, + { + name: "OSX", + search: Kn("os x"), + versionRegexes: [/.*?os\ x\ ?([0-9]+)_([0-9]+).*/] + }, + { name: "Linux", search: Kn("linux"), versionRegexes: [] }, + { name: "Solaris", search: Kn("sunos"), versionRegexes: [] }, + { name: "FreeBSD", search: Kn("freebsd"), versionRegexes: [] } + ], + Zn = { browsers: m.constant(Jn), oses: m.constant(Qn) }, + nt = function(n) { + var t, + e, + r, + o, + i, + u, + a, + c, + l, + s, + f, + d = Zn.browsers(), + g = Zn.oses(), + p = Mn(d, n).fold(kn.unknown, kn.nu), + h = Ln(g, n).fold(Wn.unknown, Wn.nu); + return { + browser: p, + os: h, + deviceType: ((e = p), + (r = n), + (o = (t = h).isiOS() && !0 === /ipad/i.test(r)), + (i = t.isiOS() && !o), + (u = t.isAndroid() && 3 === t.version.major), + (a = t.isAndroid() && 4 === t.version.major), + (c = o || u || (a && !0 === /mobile/i.test(r))), + (l = t.isiOS() || t.isAndroid()), + (s = l && !c), + (f = e.isSafari() && t.isiOS() && !1 === /safari/i.test(r)), + { + isiPad: m.constant(o), + isiPhone: m.constant(i), + isTablet: m.constant(c), + isPhone: m.constant(s), + isTouch: m.constant(l), + isAndroid: t.isAndroid, + isiOS: t.isiOS, + isWebView: m.constant(f) + }) + }; + }, + tt = { + detect: yn(function() { + var n = navigator.userAgent; + return nt(n); + }) + }, + et = function(n, t) { + return n.dom() === t.dom(); + }, + rt = tt.detect().browser.isIE() + ? function(n, t) { + return wn(n.dom(), t.dom()); + } + : function(n, t) { + var e = n.dom(), + r = t.dom(); + return e !== r && e.contains(r); + }, + ot = { + eq: et, + isEqualNode: function(n, t) { + return n.dom().isEqualNode(t.dom()); + }, + member: function(n, t) { + return B.exists(t, m.curry(et, n)); + }, + contains: rt, + is: fn.is + }, + it = function(n) { + return en.fromDom(n.dom().ownerDocument); + }, + ut = function(n) { + var t = n.dom(); + return w.from(t.parentNode).map(en.fromDom); + }, + at = function(n) { + var t = n.dom(); + return w.from(t.previousSibling).map(en.fromDom); + }, + ct = function(n) { + var t = n.dom(); + return w.from(t.nextSibling).map(en.fromDom); + }, + lt = function(n) { + var t = n.dom(); + return B.map(t.childNodes, en.fromDom); + }, + st = function(n, t) { + var e = n.dom().childNodes; + return w.from(e[t]).map(en.fromDom); + }, + ft = X.immutable("element", "offset"), + dt = { + owner: it, + defaultView: function(n) { + var t = n.dom().ownerDocument.defaultView; + return en.fromDom(t); + }, + documentElement: function(n) { + var t = it(n); + return en.fromDom(t.dom().documentElement); + }, + parent: ut, + findIndex: function(n) { + return ut(n).bind(function(t) { + var e = lt(t); + return B.findIndex(e, function(t) { + return ot.eq(n, t); + }); + }); + }, + parents: function(n, t) { + for ( + var e = z.isFunction(t) ? t : m.constant(!1), r = n.dom(), o = []; + null !== r.parentNode && r.parentNode !== undefined; + + ) { + var i = r.parentNode, + u = en.fromDom(i); + if ((o.push(u), !0 === e(u))) break; + r = i; + } + return o; + }, + siblings: function(n) { + return ut(n) + .map(lt) + .map(function(t) { + return B.filter(t, function(t) { + return !ot.eq(n, t); + }); + }) + .getOr([]); + }, + prevSibling: at, + offsetParent: function(n) { + var t = n.dom(); + return w.from(t.offsetParent).map(en.fromDom); + }, + prevSiblings: function(n) { + return B.reverse(dn(n, at)); + }, + nextSibling: ct, + nextSiblings: function(n) { + return dn(n, ct); + }, + children: lt, + child: st, + firstChild: function(n) { + return st(n, 0); + }, + lastChild: function(n) { + return st(n, n.dom().childNodes.length - 1); + }, + childNodesCount: function(n) { + return n.dom().childNodes.length; + }, + hasChildNodes: function(n) { + return n.dom().hasChildNodes(); + }, + leaf: function(n, t) { + var e = lt(n); + return e.length > 0 && t < e.length ? ft(e[t], 0) : ft(n, t); + } + }, + mt = function(n, t, e) { + return B.bind(dt.children(n), function(n) { + return fn.is(n, t) ? (e(n) ? [n] : []) : mt(n, t, e); + }); + }, + gt = { + firstLayer: function(n, t) { + return mt(n, t, m.constant(!0)); + }, + filterFirstLayer: mt + }, + pt = function(n) { + return n.dom().nodeName.toLowerCase(); + }, + ht = function(n) { + return n.dom().nodeType; + }, + vt = function(n) { + return function(t) { + return ht(t) === n; + }; + }, + bt = vt(un), + wt = vt(an), + yt = vt(on), + xt = { + name: pt, + type: ht, + value: function(n) { + return n.dom().nodeValue; + }, + isElement: bt, + isText: wt, + isDocument: yt, + isComment: function(n) { + return ht(n) === rn || "#comment" === pt(n); + } + }, + Ct = function(n, t, e) { + if (!(z.isString(e) || z.isBoolean(e) || z.isNumber(e))) + throw (console.error( + "Invalid call to Attr.set. Key ", + t, + ":: Value ", + e, + ":: Element ", + n + ), + new Error("Attribute value was not simple")); + n.setAttribute(t, e + ""); + }, + St = function(n, t, e) { + Ct(n.dom(), t, e); + }, + Rt = function(n, t) { + var e = n.dom().getAttribute(t); + return null === e ? undefined : e; + }, + Tt = function(n, t) { + var e = n.dom(); + return !(!e || !e.hasAttribute) && e.hasAttribute(t); + }, + Dt = { + clone: function(n) { + return B.foldl( + n.dom().attributes, + function(n, t) { + return (n[t.name] = t.value), n; + }, + {} + ); + }, + set: St, + setAll: function(n, t) { + var e = n.dom(); + L.each(t, function(n, t) { + Ct(e, t, n); + }); + }, + get: Rt, + has: Tt, + remove: function(n, t) { + n.dom().removeAttribute(t); + }, + hasNone: function(n) { + var t = n.dom().attributes; + return t === undefined || null === t || 0 === t.length; + }, + transfer: function(n, t, e) { + xt.isElement(n) && + xt.isElement(t) && + B.each(e, function(e) { + var r, o, i; + (o = t), Tt((r = n), (i = e)) && !Tt(o, i) && St(o, i, Rt(r, i)); + }); + } + }, + At = yn(function() { + return kt(en.fromDom(document)); + }), + kt = function(n) { + var t = n.dom().body; + if (null === t || t === undefined) throw "Body is not available yet"; + return en.fromDom(t); + }, + Nt = { + body: At, + getBody: kt, + inBody: function(n) { + var t = xt.isText(n) ? n.dom().parentNode : n.dom(); + return ( + t !== undefined && null !== t && t.ownerDocument.body.contains(t) + ); + } + }, + Ot = function(n, t) { + var e = []; + return ( + B.each(dt.children(n), function(n) { + t(n) && (e = e.concat([n])), (e = e.concat(Ot(n, t))); + }), + e + ); + }, + Et = { + all: function(n) { + return Ot(Nt.body(), n); + }, + ancestors: function(n, t, e) { + return B.filter(dt.parents(n, e), t); + }, + siblings: function(n, t) { + return B.filter(dt.siblings(n), t); + }, + children: function(n, t) { + return B.filter(dt.children(n), t); + }, + descendants: Ot + }, + Bt = { + all: function(n) { + return fn.all(n); + }, + ancestors: function(n, t, e) { + return Et.ancestors( + n, + function(n) { + return fn.is(n, t); + }, + e + ); + }, + siblings: function(n, t) { + return Et.siblings(n, function(n) { + return fn.is(n, t); + }); + }, + children: function(n, t) { + return Et.children(n, function(n) { + return fn.is(n, t); + }); + }, + descendants: function(n, t) { + return fn.all(t, n); + } + }, + It = function(n, t, e, r, o) { + return n(e, r) + ? w.some(e) + : z.isFunction(o) && o(e) + ? w.none() + : t(e, r, o); + }, + Pt = function(n, t, e) { + for ( + var r = n.dom(), o = z.isFunction(e) ? e : m.constant(!1); + r.parentNode; + + ) { + r = r.parentNode; + var i = en.fromDom(r); + if (t(i)) return w.some(i); + if (o(i)) break; + } + return w.none(); + }, + Wt = function(n, t) { + return B.find( + n.dom().childNodes, + m.compose( + t, + en.fromDom + ) + ).map(en.fromDom); + }, + _t = function(n, t) { + var e = function(n) { + for (var r = 0; r < n.childNodes.length; r++) { + if (t(en.fromDom(n.childNodes[r]))) + return w.some(en.fromDom(n.childNodes[r])); + var o = e(n.childNodes[r]); + if (o.isSome()) return o; + } + return w.none(); + }; + return e(n.dom()); + }, + Mt = { + first: function(n) { + return _t(Nt.body(), n); + }, + ancestor: Pt, + closest: function(n, t, e) { + return It( + function(n) { + return t(n); + }, + Pt, + n, + t, + e + ); + }, + sibling: function(n, t) { + var e = n.dom(); + return e.parentNode + ? Wt(en.fromDom(e.parentNode), function(e) { + return !ot.eq(n, e) && t(e); + }) + : w.none(); + }, + child: Wt, + descendant: _t + }, + Lt = function(n, t, e) { + return Mt.ancestor( + n, + function(n) { + return fn.is(n, t); + }, + e + ); + }, + qt = { + first: function(n) { + return fn.one(n); + }, + ancestor: Lt, + sibling: function(n, t) { + return Mt.sibling(n, function(n) { + return fn.is(n, t); + }); + }, + child: function(n, t) { + return Mt.child(n, function(n) { + return fn.is(n, t); + }); + }, + descendant: function(n, t) { + return fn.one(t, n); + }, + closest: function(n, t, e) { + return It(fn.is, Lt, n, t, e); + } + }, + zt = function(n, t, e) { + var r = e !== undefined ? e : m.constant(!1); + return r(t) + ? w.none() + : B.contains(n, xt.name(t)) + ? w.some(t) + : qt.ancestor(t, n.join(","), function(n) { + return fn.is(n, "table") || r(n); + }); + }, + Ft = function(n, t) { + return dt.parent(t).map(function(t) { + return Bt.children(t, n); + }); + }, + jt = function(n, t) { + return zt(["td", "th"], n, t); + }, + Ht = function(n) { + return gt.firstLayer(n, "th,td"); + }, + Vt = (m.curry(Ft, "th,td"), + function(n, t) { + return qt.closest(n, "table", t); + }), + Ut = function(n) { + return gt.firstLayer(n, "tr"); + }, + Gt = (m.curry(Ft, "tr"), + function(n) { + var t = Ut(n); + return B.map(t, function(n) { + var t = n, + e = dt.parent(t).bind(function(n) { + var t = xt.name(n); + return "tfoot" === t || "thead" === t || "tbody" === t + ? t + : "tbody"; + }), + r = B.map(Ht(n), function(n) { + var t = Dt.has(n, "rowspan") + ? parseInt(Dt.get(n, "rowspan"), 10) + : 1, + e = Dt.has(n, "colspan") ? parseInt(Dt.get(n, "colspan"), 10) : 1; + return nn.detail(n, t, e); + }); + return nn.rowdata(t, r, e); + }); + }), + Xt = function(n, t) { + return B.map(n, function(n) { + var e = B.map(Ht(n), function(n) { + var t = Dt.has(n, "rowspan") ? parseInt(Dt.get(n, "rowspan"), 10) : 1, + e = Dt.has(n, "colspan") ? parseInt(Dt.get(n, "colspan"), 10) : 1; + return nn.detail(n, t, e); + }); + return nn.rowdata(n, e, t.section()); + }); + }, + Yt = function(n, t) { + return n + "," + t; + }, + $t = function(n, t) { + var e = B.bind(n.all(), function(n) { + return n.cells(); + }); + return B.filter(e, t); + }, + Kt = { + generate: function(n) { + var t = {}, + e = [], + r = n.length, + o = 0; + B.each(n, function(n, r) { + var i = []; + B.each(n.cells(), function(n, e) { + for (var u = 0; t[Yt(r, u)] !== undefined; ) u++; + for ( + var a = nn.extended(n.element(), n.rowspan(), n.colspan(), r, u), + c = 0; + c < n.colspan(); + c++ + ) + for (var l = 0; l < n.rowspan(); l++) { + var s = u + c, + f = Yt(r + l, s); + (t[f] = a), (o = Math.max(o, s + 1)); + } + i.push(a); + }), + e.push(nn.rowdata(n.element(), i, n.section())); + }); + var i = nn.grid(r, o); + return { + grid: m.constant(i), + access: m.constant(t), + all: m.constant(e) + }; + }, + getAt: function(n, t, e) { + var r = n.access()[Yt(t, e)]; + return r !== undefined ? w.some(r) : w.none(); + }, + findItem: function(n, t, e) { + var r = $t(n, function(n) { + return e(t, n.element()); + }); + return r.length > 0 ? w.some(r[0]) : w.none(); + }, + filterItems: $t, + justCells: function(n) { + var t = B.map(n.all(), function(n) { + return n.cells(); + }); + return B.flatten(t); + } + }, + Jt = function(n) { + return n.style !== undefined; + }, + Qt = function(n, t, e) { + if (!z.isString(e)) + throw (console.error( + "Invalid call to CSS.set. Property ", + t, + ":: Value ", + e, + ":: Element ", + n + ), + new Error("CSS value must be a string: " + e)); + Jt(n) && n.style.setProperty(t, e); + }, + Zt = function(n, t) { + Jt(n) && n.style.removeProperty(t); + }, + ne = function(n, t, e) { + var r = n.dom(); + Qt(r, t, e); + }, + te = function(n, t) { + return Jt(n) ? n.style.getPropertyValue(t) : ""; + }, + ee = function(n, t) { + var e = n.dom(), + r = te(e, t); + return w.from(r).filter(function(n) { + return n.length > 0; + }); + }, + re = { + copy: function(n, t) { + var e = n.dom(), + r = t.dom(); + Jt(e) && Jt(r) && (r.style.cssText = e.style.cssText); + }, + set: ne, + preserve: function(n, t) { + var e = Dt.get(n, "style"), + r = t(n); + return (e === undefined ? Dt.remove : Dt.set)(n, "style", e), r; + }, + setAll: function(n, t) { + var e = n.dom(); + L.each(t, function(n, t) { + Qt(e, t, n); + }); + }, + setOptions: function(n, t) { + var e = n.dom(); + L.each(t, function(n, t) { + n.fold( + function() { + Zt(e, t); + }, + function(n) { + Qt(e, t, n); + } + ); + }); + }, + remove: function(n, t) { + var e = n.dom(); + Zt(e, t), + Dt.has(n, "style") && + "" === Yn.trim(Dt.get(n, "style")) && + Dt.remove(n, "style"); + }, + get: function(n, t) { + var e = n.dom(), + r = window.getComputedStyle(e).getPropertyValue(t), + o = "" !== r || Nt.inBody(n) ? r : te(e, t); + return null === o ? undefined : o; + }, + getRaw: ee, + getAllRaw: function(n) { + var t = {}, + e = n.dom(); + if (Jt(e)) + for (var r = 0; r < e.style.length; r++) { + var o = e.style.item(r); + t[o] = e.style[o]; + } + return t; + }, + isValidValue: function(n, t, e) { + var r = en.fromTag(n); + return ne(r, t, e), ee(r, t).isSome(); + }, + reflow: function(n) { + return n.dom().offsetWidth; + }, + transfer: function(n, t, e) { + xt.isElement(n) && + xt.isElement(t) && + B.each(e, function(e) { + var r, o; + (r = t), + ee(n, (o = e)).each(function(n) { + ee(r, o).isNone() && ne(r, o, n); + }); + }); + } + }, + oe = function(n, t) { + dt.parent(n).each(function(e) { + e.dom().insertBefore(t.dom(), n.dom()); + }); + }, + ie = function(n, t) { + n.dom().appendChild(t.dom()); + }, + ue = { + before: oe, + after: function(n, t) { + dt.nextSibling(n).fold( + function() { + dt.parent(n).each(function(n) { + ie(n, t); + }); + }, + function(n) { + oe(n, t); + } + ); + }, + prepend: function(n, t) { + dt.firstChild(n).fold( + function() { + ie(n, t); + }, + function(e) { + n.dom().insertBefore(t.dom(), e.dom()); + } + ); + }, + append: ie, + appendAt: function(n, t, e) { + dt.child(n, e).fold( + function() { + ie(n, t); + }, + function(n) { + oe(n, t); + } + ); + }, + wrap: function(n, t) { + oe(n, t), ie(t, n); + } + }, + ae = { + before: function(n, t) { + B.each(t, function(t) { + ue.before(n, t); + }); + }, + after: function(n, t) { + B.each(t, function(e, r) { + var o = 0 === r ? n : t[r - 1]; + ue.after(o, e); + }); + }, + prepend: function(n, t) { + B.each(t.slice().reverse(), function(t) { + ue.prepend(n, t); + }); + }, + append: function(n, t) { + B.each(t, function(t) { + ue.append(n, t); + }); + } + }, + ce = function(n) { + var t = n.dom(); + null !== t.parentNode && t.parentNode.removeChild(t); + }, + le = { + empty: function(n) { + (n.dom().textContent = ""), + B.each(dt.children(n), function(n) { + ce(n); + }); + }, + remove: ce, + unwrap: function(n) { + var t = dt.children(n); + t.length > 0 && ae.before(n, t), ce(n); + } + }, + se = X.immutable("minRow", "minCol", "maxRow", "maxCol"), + fe = function(n, t) { + var e, + r, + o, + i, + u, + a, + c, + l, + s, + f, + d = function(n) { + return fn.is(n.element(), t); + }, + m = Gt(n), + g = Kt.generate(m), + p = ((r = d), + (o = (e = g).grid().columns()), + (i = e.grid().rows()), + (u = o), + (a = 0), + (c = 0), + L.each(e.access(), function(n) { + if (r(n)) { + var t = n.row(), + e = t + n.rowspan() - 1, + o = n.column(), + l = o + n.colspan() - 1; + t < i ? (i = t) : e > a && (a = e), + o < u ? (u = o) : l > c && (c = l); + } + }), + se(i, u, a, c)), + h = "th:not(" + t + "),td:not(" + t + ")", + v = gt.filterFirstLayer(n, "th,td", function(n) { + return fn.is(n, h); + }); + return ( + B.each(v, le.remove), + (function(n, t, e, r) { + for ( + var o, i, u, a = t.grid().columns(), c = t.grid().rows(), l = 0; + l < c; + l++ + ) + for (var s = !1, f = 0; f < a; f++) + l < e.minRow() || + l > e.maxRow() || + f < e.minCol() || + f > e.maxCol() || + (Kt.getAt(t, l, f) + .filter(r) + .isNone() + ? ((o = s), + (i = n[l].element()), + (u = en.fromTag("td")), + ue.append(u, en.fromTag("br")), + (o ? ue.append : ue.prepend)(i, u)) + : (s = !0)); + })(m, g, p, d), + (l = n), + (s = p), + (f = B.filter(gt.firstLayer(l, "tr"), function(n) { + return 0 === n.dom().childElementCount; + })), + B.each(f, le.remove), + (s.minCol() !== s.maxCol() && s.minRow() !== s.maxRow()) || + B.each(gt.firstLayer(l, "th,td"), function(n) { + Dt.remove(n, "rowspan"), Dt.remove(n, "colspan"); + }), + Dt.remove(l, "width"), + Dt.remove(l, "height"), + re.remove(l, "width"), + re.remove(l, "height"), + n + ); + }, + de = function(n, t) { + return en.fromDom(n.dom().cloneNode(t)); + }, + me = function(n) { + return de(n, !0); + }, + ge = function(n, t) { + var e = en.fromTag(t), + r = Dt.clone(n); + return Dt.setAll(e, r), e; + }, + pe = function(n) { + return de(n, !1); + }, + he = me, + ve = function(n, t) { + var e = ge(n, t), + r = dt.children(me(n)); + return ae.append(e, r), e; + }, + be = ((u = xt.isText), + (a = "text"), + (c = function(n) { + return u(n) ? w.from(n.dom().nodeValue) : w.none(); + }), + (l = tt.detect().browser), + { + get: function(n) { + if (!u(n)) + throw new Error("Can only get " + a + " value of a " + a + " node"); + return s(n).getOr(""); + }, + getOption: (s = + l.isIE() && 10 === l.version.major + ? function(n) { + try { + return c(n); + } catch (t) { + return w.none(); + } + } + : c), + set: function(n, t) { + if (!u(n)) + throw new Error( + "Can only set raw " + a + " value of a " + a + " node" + ); + n.dom().nodeValue = t; + } + }), + we = { + get: function(n) { + return be.get(n); + }, + getOption: function(n) { + return be.getOption(n); + }, + set: function(n, t) { + be.set(n, t); + } + }, + ye = function(n) { + return "img" === xt.name(n) + ? 1 + : we.getOption(n).fold( + function() { + return dt.children(n).length; + }, + function(n) { + return n.length; + } + ); + }, + xe = ["img", "br"], + Ce = ye, + Se = function(n) { + return ( + we + .getOption(n) + .filter(function(n) { + return 0 !== n.trim().length || n.indexOf("\xa0") > -1; + }) + .isSome() || B.contains(xe, xt.name(n)) + ); + }, + Re = function(n, t) { + var e = function(n) { + for (var r = dt.children(n), o = r.length - 1; o >= 0; o--) { + var i = r[o]; + if (t(i)) return w.some(i); + var u = e(i); + if (u.isSome()) return u; + } + return w.none(); + }; + return e(n); + }, + Te = { + first: function(n) { + return Mt.descendant(n, Se); + }, + last: function(n) { + return Re(n, Se); + } + }, + De = function() { + var n = en.fromTag("td"); + return ue.append(n, en.fromTag("br")), n; + }, + Ae = function(n, t, e) { + var r = ve(n, t); + return ( + L.each(e, function(n, t) { + null === n ? Dt.remove(r, t) : Dt.set(r, t, n); + }), + r + ); + }, + ke = function(n) { + return n; + }, + Ne = function(n) { + return function() { + return en.fromTag("tr", n.dom()); + }; + }, + Oe = function(n, t, e) { + return { + row: Ne(t), + cell: function(t) { + var r, + o, + i, + u = dt.owner(t.element()), + a = en.fromTag(xt.name(t.element()), u.dom()), + c = e.getOr([ + "strong", + "em", + "b", + "i", + "span", + "font", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "p", + "div" + ]), + l = + c.length > 0 + ? ((r = t.element()), + (o = a), + (i = c), + Te.first(r) + .map(function(n) { + var t = i.join(","), + e = Bt.ancestors(n, t, function(n) { + return ot.eq(n, r); + }); + return B.foldr( + e, + function(n, t) { + var e = pe(t); + return ue.append(n, e), e; + }, + o + ); + }) + .getOr(o)) + : a; + return ( + ue.append(l, en.fromTag("br")), + re.copy(t.element(), a), + re.remove(a, "height"), + 1 !== t.colspan() && re.remove(t.element(), "width"), + n(t.element(), a), + a + ); + }, + replace: Ae, + gap: De + }; + }, + Ee = function(n) { + return { row: Ne(n), cell: De, replace: ke, gap: De }; + }, + Be = function(n, t) { + var e = (t || document).createElement("div"); + return (e.innerHTML = n), dt.children(en.fromDom(e)); + }, + Ie = [ + "body", + "p", + "div", + "article", + "aside", + "figcaption", + "figure", + "footer", + "header", + "nav", + "section", + "ol", + "ul", + "li", + "table", + "thead", + "tbody", + "tfoot", + "caption", + "tr", + "td", + "th", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "blockquote", + "pre", + "address" + ], + Pe = function() { + return { + up: m.constant({ + selector: qt.ancestor, + closest: qt.closest, + predicate: Mt.ancestor, + all: dt.parents + }), + down: m.constant({ + selector: Bt.descendants, + predicate: Et.descendants + }), + styles: m.constant({ + get: re.get, + getRaw: re.getRaw, + set: re.set, + remove: re.remove + }), + attrs: m.constant({ + get: Dt.get, + set: Dt.set, + remove: Dt.remove, + copyTo: function(n, t) { + var e = Dt.clone(n); + Dt.setAll(t, e); + } + }), + insert: m.constant({ + before: ue.before, + after: ue.after, + afterAll: ae.after, + append: ue.append, + appendAll: ae.append, + prepend: ue.prepend, + wrap: ue.wrap + }), + remove: m.constant({ unwrap: le.unwrap, remove: le.remove }), + create: m.constant({ + nu: en.fromTag, + clone: function(n) { + return en.fromDom(n.dom().cloneNode(!1)); + }, + text: en.fromText + }), + query: m.constant({ + comparePosition: function(n, t) { + return n.dom().compareDocumentPosition(t.dom()); + }, + prevSibling: dt.prevSibling, + nextSibling: dt.nextSibling + }), + property: m.constant({ + children: dt.children, + name: xt.name, + parent: dt.parent, + isText: xt.isText, + isComment: xt.isComment, + isElement: xt.isElement, + getText: we.get, + setText: we.set, + isBoundary: function(n) { + return ( + !!xt.isElement(n) && + ("body" === xt.name(n) || B.contains(Ie, xt.name(n))) + ); + }, + isEmptyTag: function(n) { + return ( + !!xt.isElement(n) && + B.contains(["br", "img", "hr", "input"], xt.name(n)) + ); + } + }), + eq: ot.eq, + is: ot.is + }; + }, + We = (X.immutable("left", "right"), + function(n, t, e, r) { + var o = t(n, e); + return B.foldr( + r, + function(e, r) { + var o = t(n, r); + return _e(n, e, o); + }, + o + ); + }), + _e = function(n, t, e) { + return t.bind(function(t) { + return e.filter(m.curry(n.eq, t)); + }); + }, + Me = function(n, t, e) { + return e.length > 0 ? We(n, t, (r = e)[0], r.slice(1)) : w.none(); + var r; + }, + Le = function(n, t) { + return m.curry(n.eq, t); + }, + qe = function(n, t, e, r) { + var o = r !== undefined ? r : m.constant(!1), + i = [t].concat(n.up().all(t)), + u = [e].concat(n.up().all(e)), + a = function(n) { + return B.findIndex(n, o).fold( + function() { + return n; + }, + function(t) { + return n.slice(0, t + 1); + } + ); + }, + c = a(i), + l = a(u), + s = B.find(c, function(t) { + return B.exists(l, Le(n, t)); + }); + return { + firstpath: m.constant(c), + secondpath: m.constant(l), + shared: m.constant(s) + }; + }, + ze = qe, + Fe = function(n, t, e) { + return Me(n, t, e); + }, + je = function(n, t, e, r) { + return ze(n, t, e, r); + }, + He = Pe(), + Ve = function(n, t) { + return Fe( + He, + function(t, e) { + return n(e); + }, + t + ); + }, + Ue = function(n, t, e) { + return je(He, n, t, e); + }, + Ge = function(n, t) { + return ( + t.column() >= n.startCol() && + t.column() + t.colspan() - 1 <= n.finishCol() && + t.row() >= n.startRow() && + t.row() + t.rowspan() - 1 <= n.finishRow() + ); + }, + Xe = function(n, t) { + var e = t.column(), + r = t.column() + t.colspan() - 1, + o = t.row(), + i = t.row() + t.rowspan() - 1; + return ( + e <= n.finishCol() && + r >= n.startCol() && + o <= n.finishRow() && + i >= n.startRow() + ); + }, + Ye = function(n, t) { + for ( + var e = !0, r = m.curry(Ge, t), o = t.startRow(); + o <= t.finishRow(); + o++ + ) + for (var i = t.startCol(); i <= t.finishCol(); i++) + e = e && Kt.getAt(n, o, i).exists(r); + return e ? w.some(t) : w.none(); + }, + $e = function(n, t, e) { + var r = Kt.findItem(n, t, ot.eq), + o = Kt.findItem(n, e, ot.eq); + return r.bind(function(n) { + return o.map(function(t) { + return ( + (e = n), + (r = t), + nn.bounds( + Math.min(e.row(), r.row()), + Math.min(e.column(), r.column()), + Math.max(e.row() + e.rowspan() - 1, r.row() + r.rowspan() - 1), + Math.max( + e.column() + e.colspan() - 1, + r.column() + r.colspan() - 1 + ) + ) + ); + var e, r; + }); + }); + }, + Ke = $e, + Je = function(n, t, e) { + return $e(n, t, e).bind(function(t) { + return Ye(n, t); + }); + }, + Qe = function(n, t, e, r) { + return Kt.findItem(n, t, ot.eq).bind(function(t) { + var o = e > 0 ? t.row() + t.rowspan() - 1 : t.row(), + i = r > 0 ? t.column() + t.colspan() - 1 : t.column(); + return Kt.getAt(n, o + e, i + r).map(function(n) { + return n.element(); + }); + }); + }, + Ze = function(n, t, e) { + return Ke(n, t, e).map(function(t) { + var e = Kt.filterItems(n, m.curry(Xe, t)); + return B.map(e, function(n) { + return n.element(); + }); + }); + }, + nr = function(n, t) { + return Kt.findItem(n, t, function(n, t) { + return ot.contains(t, n); + }).bind(function(n) { + return n.element(); + }); + }, + tr = function(n) { + var t = Gt(n); + return Kt.generate(t); + }, + er = function(n, t, e) { + return Vt(n).bind(function(r) { + var o = tr(r); + return Qe(o, n, t, e); + }); + }, + rr = function(n, t, e) { + var r = tr(n); + return Ze(r, t, e); + }, + or = function(n, t, e, r, o) { + var i = tr(n), + u = ot.eq(n, e) ? t : nr(i, t), + a = ot.eq(n, o) ? r : nr(i, r); + return Ze(i, u, a); + }, + ir = function(n, t, e) { + var r = tr(n); + return Je(r, t, e); + }, + ur = function(n, t) { + return qt.ancestor(n, "table"); + }, + ar = X.immutableBag(["boxes", "start", "finish"], []), + cr = function(n, t, e) { + var r = function(n) { + return function(t) { + return e(t) || ot.eq(t, n); + }; + }; + return ot.eq(n, t) + ? w.some(ar({ boxes: w.some([n]), start: n, finish: t })) + : ur(n).bind(function(o) { + return ur(t).bind(function(i) { + if (ot.eq(o, i)) + return w.some(ar({ boxes: rr(o, n, t), start: n, finish: t })); + if (ot.contains(o, i)) { + var u = + (a = Bt.ancestors(t, "td,th", r(o))).length > 0 + ? a[a.length - 1] + : t; + return w.some( + ar({ boxes: or(o, n, o, t, i), start: n, finish: u }) + ); + } + if (ot.contains(i, o)) { + var a, + c = + (a = Bt.ancestors(n, "td,th", r(i))).length > 0 + ? a[a.length - 1] + : n; + return w.some( + ar({ boxes: or(i, n, o, t, i), start: n, finish: c }) + ); + } + return Ue(n, t) + .shared() + .bind(function(u) { + return qt.closest(u, "table", e).bind(function(e) { + var u = Bt.ancestors(t, "td,th", r(e)), + a = u.length > 0 ? u[u.length - 1] : t, + c = Bt.ancestors(n, "td,th", r(e)), + l = c.length > 0 ? c[c.length - 1] : n; + return w.some( + ar({ boxes: or(e, n, o, t, i), start: l, finish: a }) + ); + }); + }); + }); + }); + }, + lr = cr, + sr = function(n, t) { + var e = Bt.descendants(n, t); + return e.length > 0 ? w.some(e) : w.none(); + }, + fr = function(n, t, e, r, o) { + return ((i = n), + (u = o), + B.find(i, function(n) { + return fn.is(n, u); + })).bind(function(n) { + return er(n, t, e).bind(function(n) { + return ( + (e = r), + qt.ancestor((t = n), "table").bind(function(n) { + return qt.descendant(n, e).bind(function(n) { + return cr(n, t).bind(function(n) { + return n.boxes().map(function(t) { + return { + boxes: m.constant(t), + start: m.constant(n.start()), + finish: m.constant(n.finish()) + }; + }); + }); + }); + }) + ); + var t, e; + }); + }); + var i, u; + }, + dr = function(n, t, e) { + return qt.descendant(n, t).bind(function(t) { + return qt.descendant(n, e).bind(function(n) { + return Ve(ur, [t, n]).map(function(e) { + return { + first: m.constant(t), + last: m.constant(n), + table: m.constant(e) + }; + }); + }); + }); + }, + mr = function(n, t) { + return sr(n, t); + }, + gr = function(n, t, e) { + return dr(n, t, e).bind(function(t) { + var e = function(t) { + return ot.eq(n, t); + }, + r = qt.ancestor(t.first(), "thead,tfoot,tbody,table", e), + o = qt.ancestor(t.last(), "thead,tfoot,tbody,table", e); + return r.bind(function(n) { + return o.bind(function(e) { + return ot.eq(n, e) ? ir(t.table(), t.first(), t.last()) : w.none(); + }); + }); + }); + }, + pr = "data-mce-selected", + hr = "data-mce-first-selected", + vr = "data-mce-last-selected", + br = { + selected: m.constant(pr), + selectedSelector: m.constant( + "td[data-mce-selected],th[data-mce-selected]" + ), + attributeSelector: m.constant("[data-mce-selected]"), + firstSelected: m.constant(hr), + firstSelectedSelector: m.constant( + "td[data-mce-first-selected],th[data-mce-first-selected]" + ), + lastSelected: m.constant(vr), + lastSelectedSelector: m.constant( + "td[data-mce-last-selected],th[data-mce-last-selected]" + ) + }, + wr = function(n) { + if (!z.isArray(n)) throw new Error("cases must be an array"); + if (0 === n.length) throw new Error("there must be at least one case"); + var t = [], + e = {}; + return ( + B.each(n, function(r, o) { + var i = L.keys(r); + if (1 !== i.length) throw new Error("one and only one name per case"); + var u = i[0], + a = r[u]; + if (e[u] !== undefined) + throw new Error("duplicate key detected:" + u); + if ("cata" === u) + throw new Error("cannot have a case named cata (sorry)"); + if (!z.isArray(a)) throw new Error("case arguments must be an array"); + t.push(u), + (e[u] = function() { + var e = arguments.length; + if (e !== a.length) + throw new Error( + "Wrong number of arguments to case " + + u + + ". Expected " + + a.length + + " (" + + a + + "), got " + + e + ); + for (var r = new Array(e), i = 0; i < r.length; i++) + r[i] = arguments[i]; + return { + fold: function() { + if (arguments.length !== n.length) + throw new Error( + "Wrong number of arguments to fold. Expected " + + n.length + + ", got " + + arguments.length + ); + return arguments[o].apply(null, r); + }, + match: function(n) { + var e = L.keys(n); + if (t.length !== e.length) + throw new Error( + "Wrong number of arguments to match. Expected: " + + t.join(",") + + "\nActual: " + + e.join(",") + ); + if ( + !B.forall(t, function(n) { + return B.contains(e, n); + }) + ) + throw new Error( + "Not all branches were specified when using match. Specified: " + + e.join(", ") + + "\nRequired: " + + t.join(", ") + ); + return n[u].apply(null, r); + }, + log: function(n) { + console.log(n, { + constructors: t, + constructor: u, + params: r + }); + } + }; + }); + }), + e + ); + }, + yr = wr([ + { none: [] }, + { multiple: ["elements"] }, + { single: ["selection"] } + ]), + xr = { + cata: function(n, t, e, r) { + return n.fold(t, e, r); + }, + none: yr.none, + multiple: yr.multiple, + single: yr.single + }, + Cr = function(n, t) { + return xr.cata(t.get(), m.constant([]), m.identity, m.constant([n])); + }, + Sr = function(n, t) { + return xr.cata( + t.get(), + w.none, + function(t, e) { + return 0 === t.length + ? w.none() + : gr(n, br.firstSelectedSelector(), br.lastSelectedSelector()).bind( + function(n) { + return t.length > 1 + ? w.some({ bounds: m.constant(n), cells: m.constant(t) }) + : w.none(); + } + ); + }, + w.none + ); + }, + Rr = function(n, t) { + var e = Cr(n, t); + return e.length > 0 && + B.forall(e, function(n) { + return ( + (Dt.has(n, "rowspan") && parseInt(Dt.get(n, "rowspan"), 10) > 1) || + (Dt.has(n, "colspan") && parseInt(Dt.get(n, "colspan"), 10) > 1) + ); + }) + ? w.some(e) + : w.none(); + }, + Tr = Cr, + Dr = function(n) { + return { + element: m.constant(n), + mergable: w.none, + unmergable: w.none, + selection: m.constant([n]) + }; + }, + Ar = X.immutable("element", "clipboard", "generators"), + kr = { + noMenu: Dr, + forMenu: function(n, t, e) { + return { + element: m.constant(e), + mergable: m.constant(Sr(t, n)), + unmergable: m.constant(Rr(e, n)), + selection: m.constant(Tr(e, n)) + }; + }, + notCell: function(n) { + return Dr(n); + }, + paste: Ar, + pasteRows: function(n, t, e, r, o) { + return { + element: m.constant(e), + mergable: w.none, + unmergable: w.none, + selection: m.constant(Tr(e, n)), + clipboard: m.constant(r), + generators: m.constant(o) + }; + } + }, + Nr = { + registerEvents: function(n, t, e, r) { + n.on("BeforeGetContent", function(e) { + !0 === e.selection && + xr.cata( + t.get(), + m.noop, + function(t) { + var r; + e.preventDefault(), + ((r = t), + Vt(r[0]) + .map(he) + .map(function(n) { + return [fe(n, br.attributeSelector())]; + })).each(function(t) { + e.content = B.map(t, function(t) { + return ( + (e = t), n.selection.serializer.serialize(e.dom(), {}) + ); + var e; + }).join(""); + }); + }, + m.noop + ); + }), + n.on("BeforeSetContent", function(t) { + !0 === t.selection && + !0 === t.paste && + w + .from(n.dom.getParent(n.selection.getStart(), "th,td")) + .each(function(o) { + var i = en.fromDom(o); + Vt(i).bind(function(o) { + var u = B.filter(Be(t.content), function(n) { + return "meta" !== xt.name(n); + }); + if (1 === u.length && "table" === xt.name(u[0])) { + t.preventDefault(); + var a = en.fromDom(n.getDoc()), + c = Ee(a), + l = kr.paste(i, u[0], c); + e.pasteCells(o, l).each(function(t) { + n.selection.setRng(t), n.focus(), r.clear(o); + }); + } + }); + }); + }); + } + }, + Or = { + render: function(n, t, e, r) { + var o = en.fromTag("table"); + re.setAll(o, { "border-collapse": "collapse", width: "100%" }), + Dt.set(o, "border", "1"); + var i = en.fromTag("tbody"); + ue.append(o, i); + for (var u = [], a = 0; a < n; a++) { + for (var c = en.fromTag("tr"), l = 0; l < t; l++) { + var s = a < e || l < r ? en.fromTag("th") : en.fromTag("td"); + l < r && Dt.set(s, "scope", "row"), + a < e && Dt.set(s, "scope", "col"), + ue.append(s, en.fromTag("br")), + re.set(s, "width", 100 / t + "%"), + ue.append(c, s); + } + u.push(c); + } + return ae.append(i, u), o; + } + }, + Er = function(n) { + return n.dom().innerHTML; + }, + Br = function(n) { + var t = en.fromTag("div"), + e = en.fromDom(n.dom().cloneNode(!0)); + return ue.append(t, e), Er(t); + }, + Ir = function(n, t) { + n.selection.select(t.dom(), !0), n.selection.collapse(!0); + }, + Pr = { + insert: function(n, t, e) { + var r, + o = Or.render(e, t, 0, 0); + Dt.set(o, "id", "__mce"); + var i, + u, + a = Br(o); + return ( + n.insertContent(a), + (r = n.dom.get("__mce")), + n.dom.setAttrib(r, "id", null), + n.$("tr", r).each(function(t, e) { + n.fire("newrow", { node: e }), + n.$("th,td", e).each(function(t, e) { + n.fire("newcell", { node: e }); + }); + }), + n.dom.setAttribs(r, n.settings.table_default_attributes || {}), + n.dom.setStyles(r, n.settings.table_default_styles || {}), + (i = n), + (u = en.fromDom(r)), + qt.descendant(u, "td,th").each(m.curry(Ir, i)), + r + ); + } + }, + Wr = function(n, t) { + var e = function(e) { + var r = t(e); + if (r <= 0 || null === r) { + var o = re.get(e, n); + return parseFloat(o) || 0; + } + return r; + }, + r = function(n, t) { + return B.foldl( + t, + function(t, e) { + var r = re.get(n, e), + o = r === undefined ? 0 : parseInt(r, 10); + return isNaN(o) ? t : t + o; + }, + 0 + ); + }; + return { + set: function(t, e) { + if (!z.isNumber(e) && !e.match(/^[0-9]+$/)) + throw n + + ".set accepts only positive integer values. Value was " + + e; + var r = t.dom(); + Jt(r) && (r.style[n] = e + "px"); + }, + get: e, + getOuter: e, + aggregate: r, + max: function(n, t, e) { + var o = r(n, e); + return t > o ? t - o : 0; + } + }; + }, + _r = Wr("height", function(n) { + return Nt.inBody(n) + ? n.dom().getBoundingClientRect().height + : n.dom().offsetHeight; + }), + Mr = function(n) { + return _r.get(n); + }, + Lr = function(n) { + return _r.getOuter(n); + }, + qr = Wr("width", function(n) { + return n.dom().offsetWidth; + }), + zr = function(n) { + return qr.get(n); + }, + Fr = function(n) { + return qr.getOuter(n); + }, + jr = tt.detect(), + Hr = function(n, t, e) { + return (r = re.get(n, t)), (o = e), (i = parseFloat(r)), isNaN(i) ? o : i; + var r, o, i; + }, + Vr = function(n) { + return jr.browser.isIE() || jr.browser.isEdge() + ? ((e = Hr((t = n), "padding-top", 0)), + (r = Hr(t, "padding-bottom", 0)), + (o = Hr(t, "border-top-width", 0)), + (i = Hr(t, "border-bottom-width", 0)), + (u = t.dom().getBoundingClientRect().height), + "border-box" === re.get(t, "box-sizing") ? u : u - e - r - (o + i)) + : Hr(n, "height", Mr(n)); + var t, e, r, o, i, u; + }, + Ur = /(\d+(\.\d+)?)(\w|%)*/, + Gr = /(\d+(\.\d+)?)%/, + Xr = /(\d+(\.\d+)?)px|em/, + Yr = function(n, t) { + re.set(n, "height", t + "px"); + }, + $r = function(n, t, e, r) { + var o, + i, + u, + a, + c, + l = parseInt(n, 10); + return Yn.endsWith(n, "%") && "table" !== xt.name(t) + ? ((i = l), + (u = e), + (a = r), + (c = Vt((o = t)) + .map(function(n) { + var t = u(n); + return Math.floor((i / 100) * t); + }) + .getOr(i)), + a(o, c), + c) + : l; + }, + Kr = function(n) { + var t, + e = re.getRaw((t = n), "height").getOrThunk(function() { + return Vr(t) + "px"; + }); + return e ? $r(e, n, Mr, Yr) : Mr(n); + }, + Jr = function(n, t) { + return Dt.has(n, t) ? parseInt(Dt.get(n, t), 10) : 1; + }, + Qr = function(n) { + return re.getRaw(n, "width").fold( + function() { + return w.from(Dt.get(n, "width")); + }, + function(n) { + return w.some(n); + } + ); + }, + Zr = function(n, t) { + return (n / t.pixelWidth()) * 100; + }, + no = { + percentageBasedSizeRegex: m.constant(Gr), + pixelBasedSizeRegex: m.constant(Xr), + setPixelWidth: function(n, t) { + re.set(n, "width", t + "px"); + }, + setPercentageWidth: function(n, t) { + re.set(n, "width", t + "%"); + }, + setHeight: Yr, + getPixelWidth: function(n, t) { + return Qr(n).fold( + function() { + var t = zr(n); + return parseInt(t, 10); + }, + function(e) { + return (function(n, t, e) { + if (Xr.test(t)) { + var r = Xr.exec(t); + return parseInt(r[1], 10); + } + if (Gr.test(t)) { + var o = Gr.exec(t), + i = parseFloat(o[1]); + return (i / 100) * e.pixelWidth(); + } + var u = zr(n); + return parseInt(u, 10); + })(n, e, t); + } + ); + }, + getPercentageWidth: function(n, t) { + return Qr(n).fold( + function() { + var e = zr(n), + r = parseInt(e, 10); + return Zr(r, t); + }, + function(e) { + return (function(n, t, e) { + if (Gr.test(t)) { + var r = Gr.exec(t); + return parseFloat(r[1]); + } + var o = zr(n), + i = parseInt(o, 10); + return Zr(i, e); + })(n, e, t); + } + ); + }, + getGenericWidth: function(n) { + return Qr(n).bind(function(n) { + if (Ur.test(n)) { + var t = Ur.exec(n); + return w.some({ width: m.constant(t[1]), unit: m.constant(t[3]) }); + } + return w.none(); + }); + }, + setGenericWidth: function(n, t, e) { + re.set(n, "width", t + e); + }, + getHeight: function(n) { + return (e = "rowspan"), Kr((t = n)) / Jr(t, e); + var t, e; + }, + getRawWidth: Qr + }, + to = function(n, t) { + no.getGenericWidth(n).each(function(e) { + var r = e.width() / 2; + no.setGenericWidth(n, r, e.unit()), no.setGenericWidth(t, r, e.unit()); + }); + }, + eo = function(n, t) { + var e = t || en.fromDom(document.documentElement); + return Mt.ancestor(n, m.curry(ot.eq, e)).isSome(); + }, + ro = function(n) { + var t = n.dom(); + return t === t.window + ? n + : xt.isDocument(n) + ? t.defaultView || t.parentWindow + : null; + }, + oo = function(n, t) { + return { + left: m.constant(n), + top: m.constant(t), + translate: function(e, r) { + return oo(n + e, t + r); + } + }; + }, + io = function(n, t) { + return n !== undefined ? n : t !== undefined ? t : 0; + }, + uo = function(n) { + var t, + e = n.dom(), + r = e.ownerDocument, + o = r.body, + i = en.fromDom(r.documentElement); + return o === e + ? oo(o.offsetLeft, o.offsetTop) + : eo(n, i) + ? ((t = e.getBoundingClientRect()), oo(t.left, t.top)) + : oo(0, 0); + }, + ao = function(n) { + var t = n.dom().ownerDocument, + e = t.body, + r = ro(en.fromDom(t)), + o = t.documentElement, + i = io(r.pageYOffset, o.scrollTop), + u = io(r.pageXOffset, o.scrollLeft), + a = io(o.clientTop, e.clientTop), + c = io(o.clientLeft, e.clientLeft); + return uo(n).translate(u - c, i - a); + }, + co = X.immutable("row", "y"), + lo = X.immutable("col", "x"), + so = function(n) { + return ao(n).left() + Fr(n); + }, + fo = function(n) { + return ao(n).left(); + }, + mo = function(n, t) { + return lo(n, fo(t)); + }, + go = function(n, t) { + return lo(n, so(t)); + }, + po = function(n) { + return ao(n).top(); + }, + ho = function(n, t, e) { + if (0 === e.length) return []; + var r = B.map(e.slice(1), function(t, e) { + return t.map(function(t) { + return n(e, t); + }); + }), + o = e[e.length - 1].map(function(n) { + return t(e.length - 1, n); + }); + return r.concat([o]); + }, + vo = { + delta: m.identity, + positions: m.curry( + ho, + function(n, t) { + return co(n, po(t)); + }, + function(n, t) { + return co(n, po(t) + Lr(t)); + } + ), + edge: po + }, + bo = { delta: m.identity, edge: fo, positions: m.curry(ho, mo, go) }, + wo = { + height: vo, + rtl: { + delta: function(n, t) { + return -n; + }, + edge: so, + positions: m.curry(ho, go, mo) + }, + ltr: bo + }, + yo = { ltr: wo.ltr, rtl: wo.rtl }, + xo = function(n) { + var t = function(t) { + return n(t).isRtl() ? yo.rtl : yo.ltr; + }; + return { + delta: function(n, e) { + return t(e).delta(n, e); + }, + edge: function(n) { + return t(n).edge(n); + }, + positions: function(n, e) { + return t(e).positions(n, e); + } + }; + }, + Co = function(n) { + var t = Gt(n); + return Kt.generate(t).grid(); + }, + So = function(n) { + var t = n, + e = function() { + return t; + }; + return { + get: e, + set: function(n) { + t = n; + }, + clone: function() { + return So(e()); + } + }; + }, + Ro = function(n, t) { + return To(n, t, { validate: z.isFunction, label: "function" }); + }, + To = function(n, t, e) { + if (0 === t.length) + throw new Error("You must specify at least one required field."); + return ( + V("required", t), + G(t), + function(r) { + var o = L.keys(r); + B.forall(t, function(n) { + return B.contains(o, n); + }) || j(t, o), + n(t, o); + var i = B.filter(t, function(n) { + return !e.validate(r[n], n); + }); + return i.length > 0 && U(i, e.label), r; + } + ); + }, + Do = m.noop, + Ao = { + exactly: m.curry(Ro, function(n, t) { + var e = B.filter(t, function(t) { + return !B.contains(n, t); + }); + e.length > 0 && H(e); + }), + ensure: m.curry(Ro, Do), + ensureWith: m.curry(To, Do) + }, + ko = function(n) { + var t = Dt.has(n, "colspan") ? parseInt(Dt.get(n, "colspan"), 10) : 1, + e = Dt.has(n, "rowspan") ? parseInt(Dt.get(n, "rowspan"), 10) : 1; + return { + element: m.constant(n), + colspan: m.constant(t), + rowspan: m.constant(e) + }; + }, + No = Ao.exactly(["cell", "row", "replace", "gap"]), + Oo = function(n, t) { + No(n); + var e = So(w.none()), + r = t !== undefined ? t : ko, + o = function(t) { + var e, + o = r(t); + return (e = o), n.cell(e); + }, + i = function(n) { + var t = o(n); + return ( + e.get().isNone() && e.set(w.some(t)), + (u = w.some({ item: n, replacement: t })), + t + ); + }, + u = w.none(); + return { + getOrInit: function(n, t) { + return u.fold( + function() { + return i(n); + }, + function(e) { + return t(n, e.item) ? e.replacement : i(n); + } + ); + }, + cursor: e.get + }; + }, + Eo = function(n, t) { + return function(e) { + var r = So(w.none()); + No(e); + var o = [], + i = function(i) { + var u = e.replace(i, t, { scope: n }); + return ( + o.push({ item: i, sub: u }), + r.get().isNone() && r.set(w.some(u)), + u + ); + }; + return { + replaceOrInit: function(n, t) { + return ((e = n), + (r = t), + B.find(o, function(n) { + return r(n.item, e); + })).fold( + function() { + return i(n); + }, + function(e) { + return t(n, e.item) ? e.sub : i(n); + } + ); + var e, r; + }, + cursor: r.get + }; + }; + }, + Bo = function(n) { + No(n); + var t = So(w.none()); + return { + combine: function(e) { + return ( + t.get().isNone() && t.set(w.some(e)), + function() { + var t = n.cell({ + element: m.constant(e), + colspan: m.constant(1), + rowspan: m.constant(1) + }); + return re.remove(t, "width"), re.remove(e, "width"), t; + } + ); + }, + cursor: t.get + }; + }, + Io = [ + "body", + "p", + "div", + "article", + "aside", + "figcaption", + "figure", + "footer", + "header", + "nav", + "section", + "ol", + "ul", + "table", + "thead", + "tfoot", + "tbody", + "caption", + "tr", + "td", + "th", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "blockquote", + "pre", + "address" + ], + Po = function(n, t) { + var e = n.property().name(t); + return B.contains(Io, e); + }, + Wo = function(n, t) { + return B.contains(["br", "img", "hr", "input"], n.property().name(t)); + }, + _o = Po, + Mo = function(n, t) { + var e = n.property().name(t); + return B.contains(["ol", "ul"], e); + }, + Lo = Wo, + qo = Pe(), + zo = function(n) { + return _o(qo, n); + }, + Fo = function(n) { + return Mo(qo, n); + }, + jo = function(n) { + return Lo(qo, n); + }, + Ho = function(n) { + var t, + e = function(n) { + return "br" === xt.name(n); + }, + r = function(n) { + return Te.last(n) + .bind(function(t) { + var r, + o = ((r = t), + dt + .nextSibling(r) + .map(function(n) { + return !!zo(n) || (jo(n) ? "img" !== xt.name(n) : void 0); + }) + .getOr(!1)); + return dt.parent(t).map(function(r) { + return !0 === o || + ((i = r), + "li" === xt.name(i) || Mt.ancestor(i, Fo).isSome()) || + e(t) || + (zo(r) && !ot.eq(n, r)) + ? [] + : [en.fromTag("br")]; + var i; + }); + }) + .getOr([]); + }, + o = + 0 === + (t = B.bind(n, function(n) { + var t, + o = dt.children(n); + return ( + (t = o), + B.forall(t, function(n) { + return e(n) || (xt.isText(n) && 0 === we.get(n).trim().length); + }) + ? [] + : o.concat(r(n)) + ); + })).length + ? [en.fromTag("br")] + : t; + le.empty(n[0]), ae.append(n[0], o); + }, + Vo = function(n) { + return function() { + for (var t = new Array(arguments.length), e = 0; e < t.length; e++) + t[e] = arguments[e]; + if (0 === t.length) throw new Error("Can't merge zero objects"); + for (var r = {}, o = 0; o < t.length; o++) { + var i = t[o]; + for (var u in i) i.hasOwnProperty(u) && (r[u] = n(r[u], i[u])); + } + return r; + }; + }, + Uo = Vo(function(n, t) { + return z.isObject(n) && z.isObject(t) ? Uo(n, t) : t; + }), + Go = Vo(function(n, t) { + return t; + }), + Xo = { deepMerge: Uo, merge: Go }, + Yo = function(n) { + for ( + var t = [], + e = function(n) { + t.push(n); + }, + r = 0; + r < n.length; + r++ + ) + n[r].each(e); + return t; + }, + $o = function(n, t) { + for (var e = 0; e < n.length; e++) { + var r = t(n[e], e); + if (r.isSome()) return r; + } + return w.none(); + }, + Ko = function(n, t) { + return nn.rowcells(t, n.section()); + }, + Jo = function(n, t) { + return n.cells()[t]; + }, + Qo = { + addCell: function(n, t, e) { + var r = n.cells(), + o = r.slice(0, t), + i = r.slice(t), + u = o.concat([e]).concat(i); + return Ko(n, u); + }, + setCells: Ko, + mutateCell: function(n, t, e) { + n.cells()[t] = e; + }, + getCell: Jo, + getCellElement: function(n, t) { + return Jo(n, t).element(); + }, + mapCells: function(n, t) { + var e = n.cells(), + r = B.map(e, t); + return nn.rowcells(r, n.section()); + }, + cellLength: function(n) { + return n.cells().length; + } + }, + Zo = function(n, t) { + if (0 === n.length) return 0; + var e = n[0]; + return B.findIndex(n, function(n) { + return !t(e.element(), n.element()); + }).fold( + function() { + return n.length; + }, + function(n) { + return n; + } + ); + }, + ni = function(n, t, e, r) { + var o, + i, + u, + a, + c = ((o = n), (i = t), o[i]).cells().slice(e), + l = Zo(c, r), + s = ((u = n), + (a = e), + B.map(u, function(n) { + return Qo.getCell(n, a); + })).slice(t), + f = Zo(s, r); + return { colspan: m.constant(l), rowspan: m.constant(f) }; + }, + ti = function(n, t) { + var e = B.map(n, function(n, t) { + return B.map(n.cells(), function(n, t) { + return !1; + }); + }); + return B.map(n, function(r, o) { + var i = B.bind(r.cells(), function(r, i) { + if (!1 === e[o][i]) { + var u = ni(n, o, i, t); + return ( + (function(n, t, r, o) { + for (var i = n; i < n + r; i++) + for (var u = t; u < t + o; u++) e[i][u] = !0; + })(o, i, u.rowspan(), u.colspan()), + [nn.detailnew(r.element(), u.rowspan(), u.colspan(), r.isNew())] + ); + } + return []; + }); + return nn.rowdetails(i, r.section()); + }); + }, + ei = function(n, t, e) { + for (var r = [], o = 0; o < n.grid().rows(); o++) { + for (var i = [], u = 0; u < n.grid().columns(); u++) { + var a = Kt.getAt(n, o, u) + .map(function(n) { + return nn.elementnew(n.element(), e); + }) + .getOrThunk(function() { + return nn.elementnew(t.gap(), !0); + }); + i.push(a); + } + var c = nn.rowcells(i, n.all()[o].section()); + r.push(c); + } + return r; + }, + ri = function(n, t, e, r) { + e === r ? Dt.remove(n, t) : Dt.set(n, t, e); + }, + oi = function(n, t) { + var e = [], + r = [], + o = function(t, o) { + t.length > 0 + ? (function(t, o) { + var i = qt.child(n, o).getOrThunk(function() { + var t = en.fromTag(o, dt.owner(n).dom()); + return ue.append(n, t), t; + }); + le.empty(i); + var u = B.map(t, function(n) { + n.isNew() && e.push(n.element()); + var t = n.element(); + return ( + le.empty(t), + B.each(n.cells(), function(n) { + n.isNew() && r.push(n.element()), + ri(n.element(), "colspan", n.colspan(), 1), + ri(n.element(), "rowspan", n.rowspan(), 1), + ue.append(t, n.element()); + }), + t + ); + }); + ae.append(i, u); + })(t, o) + : qt.child(n, o).bind(le.remove); + }, + i = [], + u = [], + a = []; + return ( + B.each(t, function(n) { + switch (n.section()) { + case "thead": + i.push(n); + break; + case "tbody": + u.push(n); + break; + case "tfoot": + a.push(n); + } + }), + o(i, "thead"), + o(u, "tbody"), + o(a, "tfoot"), + { newRows: m.constant(e), newCells: m.constant(r) } + ); + }, + ii = function(n) { + return B.map(n, function(n) { + var t = pe(n.element()); + return ( + B.each(n.cells(), function(n) { + var e = he(n.element()); + ri(e, "colspan", n.colspan(), 1), + ri(e, "rowspan", n.rowspan(), 1), + ue.append(t, e); + }), + t + ); + }); + }, + ui = function(n, t) { + for (var e = [], r = 0; r < n; r++) e.push(t(r)); + return e; + }, + ai = function(n, t) { + for (var e = [], r = n; r < t; r++) e.push(r); + return e; + }, + ci = function(n, t) { + if (t < 0 || t >= n.length - 1) return w.none(); + var e = n[t].fold( + function() { + var e = B.reverse(n.slice(0, t)); + return $o(e, function(n, t) { + return n.map(function(n) { + return { value: n, delta: t + 1 }; + }); + }); + }, + function(n) { + return w.some({ value: n, delta: 0 }); + } + ), + r = n[t + 1].fold( + function() { + var e = n.slice(t + 1); + return $o(e, function(n, t) { + return n.map(function(n) { + return { value: n, delta: t + 1 }; + }); + }); + }, + function(n) { + return w.some({ value: n, delta: 1 }); + } + ); + return e.bind(function(n) { + return r.map(function(t) { + var e = t.delta + n.delta; + return Math.abs(t.value - n.value) / e; + }); + }); + }, + li = function(n, t, e) { + var r = n(); + return B.find(r, t) + .orThunk(function() { + return w.from(r[0]).orThunk(e); + }) + .map(function(n) { + return n.element(); + }); + }, + si = function(n) { + var t = n.grid(), + e = ai(0, t.columns()), + r = ai(0, t.rows()); + return B.map(e, function(t) { + return li( + function() { + return B.bind(r, function(e) { + return Kt.getAt(n, e, t) + .filter(function(n) { + return n.column() === t; + }) + .fold(m.constant([]), function(n) { + return [n]; + }); + }); + }, + function(n) { + return 1 === n.colspan(); + }, + function() { + return Kt.getAt(n, 0, t); + } + ); + }); + }, + fi = function(n) { + var t = n.grid(), + e = ai(0, t.rows()), + r = ai(0, t.columns()); + return B.map(e, function(t) { + return li( + function() { + return B.bind(r, function(e) { + return Kt.getAt(n, t, e) + .filter(function(n) { + return n.row() === t; + }) + .fold(m.constant([]), function(n) { + return [n]; + }); + }); + }, + function(n) { + return 1 === n.rowspan(); + }, + function() { + return Kt.getAt(n, t, 0); + } + ); + }); + }, + di = function(n, t, e, r, o) { + var i = en.fromTag("div"); + return ( + re.setAll(i, { + position: "absolute", + left: t - r / 2 + "px", + top: e + "px", + height: o + "px", + width: r + "px" + }), + Dt.setAll(i, { "data-column": n, role: "presentation" }), + i + ); + }, + mi = function(n, t, e, r, o) { + var i = en.fromTag("div"); + return ( + re.setAll(i, { + position: "absolute", + left: t + "px", + top: e - o / 2 + "px", + height: o + "px", + width: r + "px" + }), + Dt.setAll(i, { "data-row": n, role: "presentation" }), + i + ); + }, + gi = function(n) { + var t = n.replace(/\./g, "-"); + return { + resolve: function(n) { + return t + "-" + n; + } + }; + }, + pi = { resolve: gi("ephox-snooker").resolve }, + hi = function(n, t) { + var e = Dt.get(n, t); + return e === undefined || "" === e ? [] : e.split(" "); + }, + vi = hi, + bi = function(n, t, e) { + var r = hi(n, t).concat([e]); + Dt.set(n, t, r.join(" ")); + }, + wi = function(n, t, e) { + var r = B.filter(hi(n, t), function(n) { + return n !== e; + }); + r.length > 0 ? Dt.set(n, t, r.join(" ")) : Dt.remove(n, t); + }, + yi = function(n) { + return vi(n, "class"); + }, + xi = function(n, t) { + return bi(n, "class", t); + }, + Ci = function(n, t) { + return wi(n, "class", t); + }, + Si = yi, + Ri = xi, + Ti = Ci, + Di = function(n, t) { + B.contains(yi(n), t) ? Ci(n, t) : xi(n, t); + }, + Ai = function(n) { + return n.dom().classList !== undefined; + }, + ki = function(n, t) { + return Ai(n) && n.dom().classList.contains(t); + }, + Ni = { + add: function(n, t) { + Ai(n) ? n.dom().classList.add(t) : Ri(n, t); + }, + remove: function(n, t) { + var e; + Ai(n) ? n.dom().classList.remove(t) : Ti(n, t), + 0 === (Ai((e = n)) ? e.dom().classList : Si(e)).length && + Dt.remove(e, "class"); + }, + toggle: function(n, t) { + return Ai(n) ? n.dom().classList.toggle(t) : Di(n, t); + }, + toggler: function(n, t) { + var e, + r, + o, + i, + u, + a, + c = Ai(n), + l = n.dom().classList; + return ( + (e = function() { + c ? l.remove(t) : Ti(n, t); + }), + (r = function() { + c ? l.add(t) : Ri(n, t); + }), + (o = ki(n, t)), + (i = o || !1), + { + on: (u = function() { + r(), (i = !0); + }), + off: (a = function() { + e(), (i = !1); + }), + toggle: function() { + (i ? a : u)(); + }, + isOn: function() { + return i; + } + } + ); + }, + has: ki + }, + Oi = pi.resolve("resizer-bar"), + Ei = pi.resolve("resizer-rows"), + Bi = pi.resolve("resizer-cols"), + Ii = function(n) { + var t = Bt.descendants(n.parent(), "." + Oi); + B.each(t, le.remove); + }, + Pi = function(n, t, e) { + var r = n.origin(); + B.each(t, function(t, o) { + t.each(function(t) { + var o = e(r, t); + Ni.add(o, Oi), ue.append(n.parent(), o); + }); + }); + }, + Wi = function(n, t, e, r, o, i) { + var u, + a, + c, + l, + s = ao(t), + f = e.length > 0 ? o.positions(e, t) : []; + (u = n), + (a = f), + (c = s), + (l = Fr(t)), + Pi(u, a, function(n, t) { + var e = mi(t.row(), c.left() - n.left(), t.y() - n.top(), l, 7); + return Ni.add(e, Ei), e; + }); + var d, + m, + g, + p, + h = r.length > 0 ? i.positions(r, t) : []; + (d = n), + (m = h), + (g = s), + (p = Lr(t)), + Pi(d, m, function(n, t) { + var e = di(t.col(), t.x() - n.left(), g.top() - n.top(), 7, p); + return Ni.add(e, Bi), e; + }); + }, + _i = function(n, t) { + var e = Bt.descendants(n.parent(), "." + Oi); + B.each(e, t); + }, + Mi = function(n, t, e, r) { + Ii(n); + var o = Gt(t), + i = Kt.generate(o), + u = fi(i), + a = si(i); + Wi(n, t, u, a, e, r); + }, + Li = function(n) { + _i(n, function(n) { + re.set(n, "display", "none"); + }); + }, + qi = function(n) { + _i(n, function(n) { + re.set(n, "display", "block"); + }); + }, + zi = Ii, + Fi = function(n) { + return Ni.has(n, Ei); + }, + ji = function(n) { + return Ni.has(n, Bi); + }, + Hi = function(n, t) { + return B.map(n, function(n) { + var e, + r = ((e = n.details()), + $o(e, function(n) { + return dt.parent(n.element()).map(function(n) { + var t = dt.parent(n).isNone(); + return nn.elementnew(n, t); + }); + }).getOrThunk(function() { + return nn.elementnew(t.row(), !0); + })); + return nn.rowdatanew(r.element(), n.details(), n.section(), r.isNew()); + }); + }, + Vi = function(n, t) { + var e = ti(n, ot.eq); + return Hi(e, t); + }, + Ui = function(n, t) { + var e = B.flatten( + B.map(n.all(), function(n) { + return n.cells(); + }) + ); + return B.find(e, function(n) { + return ot.eq(t, n.element()); + }); + }, + Gi = function(n, t, e, r, o) { + return function(i, u, a, c, l) { + var s = Gt(u), + f = Kt.generate(s); + return t(f, a) + .map(function(t) { + var e = ei(f, c, !1), + r = n(e, t, ot.eq, o(c)), + i = Vi(r.grid(), c); + return { grid: m.constant(i), cursor: r.cursor }; + }) + .fold( + function() { + return w.none(); + }, + function(n) { + var t = oi(u, n.grid()); + return ( + e(u, n.grid(), l), + r(u), + Mi(i, u, wo.height, l), + w.some({ + cursor: n.cursor, + newRows: t.newRows, + newCells: t.newCells + }) + ); + } + ); + }; + }, + Xi = Vi, + Yi = function(n, t) { + return jt(t.element()).bind(function(t) { + return Ui(n, t); + }); + }, + $i = function(n, t) { + var e = B.map(t.selection(), function(t) { + return jt(t).bind(function(t) { + return Ui(n, t); + }); + }), + r = Yo(e); + return r.length > 0 ? w.some(r) : w.none(); + }, + Ki = function(n, t) { + return jt(t.element()).bind(function(e) { + return Ui(n, e).map(function(n) { + return Xo.merge(n, { + generators: t.generators, + clipboard: t.clipboard + }); + }); + }); + }, + Ji = function(n, t) { + var e = B.map(t.selection(), function(t) { + return jt(t).bind(function(t) { + return Ui(n, t); + }); + }), + r = Yo(e); + return r.length > 0 + ? w.some( + Xo.merge( + { cells: r }, + { generators: t.generators, clipboard: t.clipboard } + ) + ) + : w.none(); + }, + Qi = function(n, t) { + return t.mergable(); + }, + Zi = function(n, t) { + return t.unmergable(); + }, + nu = function(n) { + return { + is: function(t) { + return n === t; + }, + isValue: m.constant(!0), + isError: m.constant(!1), + getOr: m.constant(n), + getOrThunk: m.constant(n), + getOrDie: m.constant(n), + or: function(t) { + return nu(n); + }, + orThunk: function(t) { + return nu(n); + }, + fold: function(t, e) { + return e(n); + }, + map: function(t) { + return nu(t(n)); + }, + each: function(t) { + t(n); + }, + bind: function(t) { + return t(n); + }, + exists: function(t) { + return t(n); + }, + forall: function(t) { + return t(n); + }, + toOption: function() { + return w.some(n); + } + }; + }, + tu = function(n) { + return { + is: m.constant(!1), + isValue: m.constant(!1), + isError: m.constant(!0), + getOr: m.identity, + getOrThunk: function(n) { + return n(); + }, + getOrDie: function() { + return m.die(n)(); + }, + or: function(n) { + return n; + }, + orThunk: function(n) { + return n(); + }, + fold: function(t, e) { + return t(n); + }, + map: function(t) { + return tu(n); + }, + each: m.noop, + bind: function(t) { + return tu(n); + }, + exists: m.constant(!1), + forall: m.constant(!0), + toOption: w.none + }; + }, + eu = { value: nu, error: tu }, + ru = function(n, t) { + return B.map(n, function() { + return nn.elementnew(t.cell(), !0); + }); + }, + ou = function(n, t, e) { + return n.concat( + ui(t, function(t) { + return Qo.setCells(n[n.length - 1], ru(n[n.length - 1].cells(), e)); + }) + ); + }, + iu = function(n, t, e) { + return B.map(n, function(n) { + return Qo.setCells(n, n.cells().concat(ru(ai(0, t), e))); + }); + }, + uu = function(n, t, e) { + if (n.row() >= t.length || n.column() > Qo.cellLength(t[0])) + return eu.error( + "invalid start address out of table bounds, row: " + + n.row() + + ", column: " + + n.column() + ); + var r = t.slice(n.row()), + o = r[0].cells().slice(n.column()), + i = Qo.cellLength(e[0]), + u = e.length; + return eu.value({ + rowDelta: m.constant(r.length - u), + colDelta: m.constant(o.length - i) + }); + }, + au = function(n, t) { + var e = Qo.cellLength(n[0]), + r = Qo.cellLength(t[0]); + return { rowDelta: m.constant(0), colDelta: m.constant(e - r) }; + }, + cu = function(n, t, e) { + var r = t.colDelta() < 0 ? iu : m.identity; + return (t.rowDelta() < 0 ? ou : m.identity)( + r(n, Math.abs(t.colDelta()), e), + Math.abs(t.rowDelta()), + e + ); + }, + lu = function(n, t, e, r) { + if (0 === n.length) return n; + for (var o = t.startRow(); o <= t.finishRow(); o++) + for (var i = t.startCol(); i <= t.finishCol(); i++) + Qo.mutateCell(n[o], i, nn.elementnew(r(), !1)); + return n; + }, + su = function(n, t, e, r) { + for (var o = !0, i = 0; i < n.length; i++) + for (var u = 0; u < Qo.cellLength(n[0]); u++) { + var a = e(Qo.getCellElement(n[i], u), t); + !0 === a && !1 === o + ? Qo.mutateCell(n[i], u, nn.elementnew(r(), !0)) + : !0 === a && (o = !1); + } + return n; + }, + fu = function(n, t, e, r) { + if (t > 0 && t < n.length) { + var o = n[t - 1].cells(), + i = ((u = o), + (a = e), + B.foldl( + u, + function(n, t) { + return B.exists(n, function(n) { + return a(n.element(), t.element()); + }) + ? n + : n.concat([t]); + }, + [] + )); + B.each(i, function(o) { + for (var i = w.none(), u = t; u < n.length; u++) + for (var a = 0; a < Qo.cellLength(n[0]); a++) { + var c = n[u].cells()[a]; + e(c.element(), o.element()) && + (i.isNone() && (i = w.some(r())), + i.each(function(t) { + Qo.mutateCell(n[u], a, nn.elementnew(t, !0)); + })); + } + }); + } + var u, a; + return n; + }, + du = function(n, t, e, r, o) { + return uu(n, t, e).map(function(i) { + var u = cu(t, i, r); + return (function(n, t, e, r, o) { + for ( + var i, + u, + a, + c, + l, + s, + f, + d = n.row(), + g = n.column(), + p = d + e.length, + h = g + Qo.cellLength(e[0]), + v = d; + v < p; + v++ + ) + for (var b = g; b < h; b++) { + (i = t), + (u = v), + (a = b), + (c = o), + (l = void 0), + (s = void 0), + (l = Qo.getCell(i[u], a)), + (s = m.curry(c, l.element())), + (f = i[u]), + i.length > 1 && + Qo.cellLength(f) > 1 && + ((a > 0 && s(Qo.getCellElement(f, a - 1))) || + (a < f.length - 1 && s(Qo.getCellElement(f, a + 1))) || + (u > 0 && s(Qo.getCellElement(i[u - 1], a))) || + (u < i.length - 1 && s(Qo.getCellElement(i[u + 1], a)))) && + su(t, Qo.getCellElement(t[v], b), o, r.cell); + var w = Qo.getCellElement(e[v - d], b - g), + y = r.replace(w); + Qo.mutateCell(t[v], b, nn.elementnew(y, !0)); + } + return t; + })(n, u, e, r, o); + }); + }, + mu = function(n, t, e, r, o) { + fu(t, n, o, r.cell); + var i = au(e, t), + u = cu(e, i, r), + a = au(t, u), + c = cu(t, a, r); + return c + .slice(0, n) + .concat(u) + .concat(c.slice(n, c.length)); + }, + gu = function(n, t, e, r, o) { + var i = n.slice(0, t), + u = n.slice(t), + a = Qo.mapCells(n[e], function(e, i) { + return t > 0 && + t < n.length && + r(Qo.getCellElement(n[t - 1], i), Qo.getCellElement(n[t], i)) + ? Qo.getCell(n[t], i) + : nn.elementnew(o(e.element(), r), !0); + }); + return i.concat([a]).concat(u); + }, + pu = function(n, t, e, r, o) { + return B.map(n, function(n) { + var i = + t > 0 && + t < Qo.cellLength(n) && + r(Qo.getCellElement(n, t - 1), Qo.getCellElement(n, t)) + ? Qo.getCell(n, t) + : nn.elementnew(o(Qo.getCellElement(n, e), r), !0); + return Qo.addCell(n, t, i); + }); + }, + hu = function(n, t, e, r, o) { + var i = e + 1; + return B.map(n, function(n, u) { + var a = + u === t + ? nn.elementnew(o(Qo.getCellElement(n, e), r), !0) + : Qo.getCell(n, e); + return Qo.addCell(n, i, a); + }); + }, + vu = function(n, t, e, r, o) { + var i = t + 1, + u = n.slice(0, i), + a = n.slice(i), + c = Qo.mapCells(n[t], function(n, t) { + return t === e ? nn.elementnew(o(n.element(), r), !0) : n; + }); + return u.concat([c]).concat(a); + }, + bu = function(n, t, e) { + return n.slice(0, t).concat(n.slice(e + 1)); + }, + wu = function(n, t, e) { + var r = B.map(n, function(n) { + var r = n + .cells() + .slice(0, t) + .concat(n.cells().slice(e + 1)); + return nn.rowcells(r, n.section()); + }); + return B.filter(r, function(n) { + return n.cells().length > 0; + }); + }, + yu = function(n, t, e, r) { + return B.map(n, function(n) { + return Qo.mapCells(n, function(n) { + return ( + (o = n), + B.exists(t, function(n) { + return e(o.element(), n.element()); + }) + ? nn.elementnew(r(n.element(), e), !0) + : n + ); + var o; + }); + }); + }, + xu = function(n, t, e, r) { + return ( + Qo.getCellElement(n[t], e) !== undefined && + t > 0 && + r(Qo.getCellElement(n[t - 1], e), Qo.getCellElement(n[t], e)) + ); + }, + Cu = function(n, t, e) { + return t > 0 && e(Qo.getCellElement(n, t - 1), Qo.getCellElement(n, t)); + }, + Su = function(n, t, e, r) { + var o = B.bind(n, function(r, o) { + return xu(n, o, t, e) || Cu(r, t, e) ? [] : [Qo.getCell(r, t)]; + }); + return yu(n, o, e, r); + }, + Ru = function(n, t, e, r) { + var o = n[t], + i = B.bind(o.cells(), function(r, i) { + return xu(n, t, i, e) || Cu(o, i, e) ? [] : [r]; + }); + return yu(n, i, e, r); + }, + Tu = function(n) { + return { fold: n }; + }, + Du = function() { + return Tu(function(n, t, e, r, o) { + return n(); + }); + }, + Au = function(n) { + return Tu(function(t, e, r, o, i) { + return e(n); + }); + }, + ku = function(n, t) { + return Tu(function(e, r, o, i, u) { + return o(n, t); + }); + }, + Nu = function(n, t, e) { + return Tu(function(r, o, i, u, a) { + return u(n, t, e); + }); + }, + Ou = function(n, t) { + return Tu(function(e, r, o, i, u) { + return u(n, t); + }); + }, + Eu = function(n, t, e, r) { + var o, + i, + u = n.slice(0), + a = ((i = t), + 0 === (o = n).length + ? Du() + : 1 === o.length + ? Au(0) + : 0 === i + ? ku(0, 1) + : i === o.length - 1 + ? Ou(i - 1, i) + : i > 0 && i < o.length - 1 + ? Nu(i - 1, i, i + 1) + : Du()), + c = function(n) { + return B.map(n, m.constant(0)); + }, + l = m.constant(c(u)), + s = function(n, t) { + if (e >= 0) { + var o = Math.max(r.minCellWidth(), u[t] - e); + return c(u.slice(0, n)) + .concat([e, o - u[t]]) + .concat(c(u.slice(t + 1))); + } + var i = Math.max(r.minCellWidth(), u[n] + e), + a = u[n] - i; + return c(u.slice(0, n)) + .concat([i - u[n], a]) + .concat(c(u.slice(t + 1))); + }, + f = s; + return a.fold( + l, + function(n) { + return r.singleColumnWidth(u[n], e); + }, + f, + function(n, t, e) { + return s(t, e); + }, + function(n, t) { + if (e >= 0) return c(u.slice(0, t)).concat([e]); + var o = Math.max(r.minCellWidth(), u[t] + e); + return c(u.slice(0, t)).concat([o - u[t]]); + } + ); + }, + Bu = function(n, t) { + return Dt.has(n, t) && parseInt(Dt.get(n, t), 10) > 1; + }, + Iu = { + hasColspan: function(n) { + return Bu(n, "colspan"); + }, + hasRowspan: function(n) { + return Bu(n, "rowspan"); + }, + minWidth: m.constant(10), + minHeight: m.constant(10), + getInt: function(n, t) { + return parseInt(re.get(n, t), 10); + } + }, + Pu = function(n, t, e) { + return re.getRaw(n, t).fold( + function() { + return e(n) + "px"; + }, + function(n) { + return n; + } + ); + }, + Wu = function(n) { + return Pu(n, "width", no.getPixelWidth); + }, + _u = function(n) { + return Pu(n, "height", no.getHeight); + }, + Mu = function(n, t, e, r, o) { + var i = si(n), + u = B.map(i, function(n) { + return n.map(t.edge); + }); + return B.map(i, function(n, t) { + return n.filter(m.not(Iu.hasColspan)).fold( + function() { + var n = ci(u, t); + return r(n); + }, + function(n) { + return e(n, o); + } + ); + }); + }, + Lu = function(n) { + return n + .map(function(n) { + return n + "px"; + }) + .getOr(""); + }, + qu = function(n, t, e, r) { + var o = fi(n), + i = B.map(o, function(n) { + return n.map(t.edge); + }); + return B.map(o, function(n, t) { + return n.filter(m.not(Iu.hasRowspan)).fold( + function() { + var n = ci(i, t); + return r(n); + }, + function(n) { + return e(n); + } + ); + }); + }, + zu = { + getRawWidths: function(n, t) { + return Mu(n, t, Wu, Lu); + }, + getPixelWidths: function(n, t, e) { + return Mu( + n, + t, + no.getPixelWidth, + function(n) { + return n.getOrThunk(e.minCellWidth); + }, + e + ); + }, + getPercentageWidths: function(n, t, e) { + return Mu( + n, + t, + no.getPercentageWidth, + function(n) { + return n.fold( + function() { + return e.minCellWidth(); + }, + function(n) { + return (n / e.pixelWidth()) * 100; + } + ); + }, + e + ); + }, + getPixelHeights: function(n, t) { + return qu(n, t, no.getHeight, function(n) { + return n.getOrThunk(Iu.minHeight); + }); + }, + getRawHeights: function(n, t) { + return qu(n, t, _u, Lu); + } + }, + Fu = function(n, t, e) { + for (var r = 0, o = n; o < t; o++) r += e[o] !== undefined ? e[o] : 0; + return r; + }, + ju = function(n, t) { + var e = Kt.justCells(n); + return B.map(e, function(n) { + var e = Fu(n.column(), n.column() + n.colspan(), t); + return { element: n.element, width: m.constant(e), colspan: n.colspan }; + }); + }, + Hu = function(n, t) { + var e = Kt.justCells(n); + return B.map(e, function(n) { + var e = Fu(n.row(), n.row() + n.rowspan(), t); + return { + element: n.element, + height: m.constant(e), + rowspan: n.rowspan + }; + }); + }, + Vu = function(n, t) { + return B.map(n.all(), function(n, e) { + return { element: n.element, height: m.constant(t[e]) }; + }); + }, + Uu = function(n) { + var t = parseInt(n, 10), + e = m.identity; + return { + width: m.constant(t), + pixelWidth: m.constant(t), + getWidths: zu.getPixelWidths, + getCellDelta: e, + singleColumnWidth: function(n, t) { + return [Math.max(Iu.minWidth(), n + t) - n]; + }, + minCellWidth: Iu.minWidth, + setElementWidth: no.setPixelWidth, + setTableWidth: function(n, t, e) { + var r = B.foldr( + t, + function(n, t) { + return n + t; + }, + 0 + ); + no.setPixelWidth(n, r); + } + }; + }, + Gu = function(n, t) { + if (no.percentageBasedSizeRegex().test(t)) { + var e = no.percentageBasedSizeRegex().exec(t); + return ( + (o = e[1]), + (i = n), + (u = parseFloat(o)), + (a = zr(i)), + { + width: m.constant(u), + pixelWidth: m.constant(a), + getWidths: zu.getPercentageWidths, + getCellDelta: function(n) { + return (n / a) * 100; + }, + singleColumnWidth: function(n, t) { + return [100 - n]; + }, + minCellWidth: function() { + return (Iu.minWidth() / a) * 100; + }, + setElementWidth: no.setPercentageWidth, + setTableWidth: function(n, t, e) { + var r = u + e; + no.setPercentageWidth(n, r); + } + } + ); + } + if (no.pixelBasedSizeRegex().test(t)) { + var r = no.pixelBasedSizeRegex().exec(t); + return Uu(r[1]); + } + var o, + i, + u, + a, + c = zr(n); + return Uu(c); + }, + Xu = function(n) { + return no.getRawWidth(n).fold( + function() { + var t = zr(n); + return Uu(t); + }, + function(t) { + return Gu(n, t); + } + ); + }, + Yu = function(n) { + return Kt.generate(n); + }, + $u = function(n) { + var t = Gt(n); + return Yu(t); + }, + Ku = function(n, t, e, r) { + var o = Xu(n), + i = o.getCellDelta(t), + u = $u(n), + a = o.getWidths(u, r, o), + c = Eu(a, e, i, o), + l = B.map(c, function(n, t) { + return n + a[t]; + }), + s = ju(u, l); + B.each(s, function(n) { + o.setElementWidth(n.element(), n.width()); + }), + e === u.grid().columns() - 1 && o.setTableWidth(n, l, i); + }, + Ju = function(n, t, e, r) { + var o = $u(n), + i = zu.getPixelHeights(o, r), + u = B.map(i, function(n, r) { + return e === r ? Math.max(t + n, Iu.minHeight()) : n; + }), + a = Hu(o, u), + c = Vu(o, u); + B.each(c, function(n) { + no.setHeight(n.element(), n.height()); + }), + B.each(a, function(n) { + no.setHeight(n.element(), n.height()); + }); + var l, + s = ((l = u), + B.foldr( + l, + function(n, t) { + return n + t; + }, + 0 + )); + no.setHeight(n, s); + }, + Qu = function(n, t, e) { + var r = Xu(n), + o = Yu(t), + i = r.getWidths(o, e, r), + u = ju(o, i); + B.each(u, function(n) { + r.setElementWidth(n.element(), n.width()); + }); + var a = B.foldr( + i, + function(n, t) { + return t + n; + }, + 0 + ); + u.length > 0 && r.setElementWidth(n, a); + }, + Zu = function(n) { + 0 === Ht(n).length && le.remove(n); + }, + na = X.immutable("grid", "cursor"), + ta = function(n, t, e) { + return ea(n, t, e).orThunk(function() { + return ea(n, 0, 0); + }); + }, + ea = function(n, t, e) { + return w.from(n[t]).bind(function(n) { + return w.from(n.cells()[e]).bind(function(n) { + return w.from(n.element()); + }); + }); + }, + ra = function(n, t, e) { + return na(n, ea(n, t, e)); + }, + oa = function(n) { + return B.foldl( + n, + function(n, t) { + return B.exists(n, function(n) { + return n.row() === t.row(); + }) + ? n + : n.concat([t]); + }, + [] + ).sort(function(n, t) { + return n.row() - t.row(); + }); + }, + ia = function(n) { + return B.foldl( + n, + function(n, t) { + return B.exists(n, function(n) { + return n.column() === t.column(); + }) + ? n + : n.concat([t]); + }, + [] + ).sort(function(n, t) { + return n.column() - t.column(); + }); + }, + ua = function(n, t, e) { + var r = Xt(n, e), + o = Kt.generate(r); + return ei(o, t, !0); + }, + aa = Qu, + ca = { + insertRowBefore: Gi( + function(n, t, e, r) { + var o = t.row(), + i = t.row(), + u = gu(n, i, o, e, r.getOrInit); + return ra(u, i, t.column()); + }, + Yi, + m.noop, + m.noop, + Oo + ), + insertRowsBefore: Gi( + function(n, t, e, r) { + var o = t[0].row(), + i = t[0].row(), + u = oa(t), + a = B.foldl( + u, + function(n, t) { + return gu(n, i, o, e, r.getOrInit); + }, + n + ); + return ra(a, i, t[0].column()); + }, + $i, + m.noop, + m.noop, + Oo + ), + insertRowAfter: Gi( + function(n, t, e, r) { + var o = t.row(), + i = t.row() + t.rowspan(), + u = gu(n, i, o, e, r.getOrInit); + return ra(u, i, t.column()); + }, + Yi, + m.noop, + m.noop, + Oo + ), + insertRowsAfter: Gi( + function(n, t, e, r) { + var o = oa(t), + i = o[o.length - 1].row(), + u = o[o.length - 1].row() + o[o.length - 1].rowspan(), + a = B.foldl( + o, + function(n, t) { + return gu(n, u, i, e, r.getOrInit); + }, + n + ); + return ra(a, u, t[0].column()); + }, + $i, + m.noop, + m.noop, + Oo + ), + insertColumnBefore: Gi( + function(n, t, e, r) { + var o = t.column(), + i = t.column(), + u = pu(n, i, o, e, r.getOrInit); + return ra(u, t.row(), i); + }, + Yi, + aa, + m.noop, + Oo + ), + insertColumnsBefore: Gi( + function(n, t, e, r) { + var o = ia(t), + i = o[0].column(), + u = o[0].column(), + a = B.foldl( + o, + function(n, t) { + return pu(n, u, i, e, r.getOrInit); + }, + n + ); + return ra(a, t[0].row(), u); + }, + $i, + aa, + m.noop, + Oo + ), + insertColumnAfter: Gi( + function(n, t, e, r) { + var o = t.column(), + i = t.column() + t.colspan(), + u = pu(n, i, o, e, r.getOrInit); + return ra(u, t.row(), i); + }, + Yi, + aa, + m.noop, + Oo + ), + insertColumnsAfter: Gi( + function(n, t, e, r) { + var o = t[t.length - 1].column(), + i = t[t.length - 1].column() + t[t.length - 1].colspan(), + u = ia(t), + a = B.foldl( + u, + function(n, t) { + return pu(n, i, o, e, r.getOrInit); + }, + n + ); + return ra(a, t[0].row(), i); + }, + $i, + aa, + m.noop, + Oo + ), + splitCellIntoColumns: Gi( + function(n, t, e, r) { + var o = hu(n, t.row(), t.column(), e, r.getOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + aa, + m.noop, + Oo + ), + splitCellIntoRows: Gi( + function(n, t, e, r) { + var o = vu(n, t.row(), t.column(), e, r.getOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + m.noop, + m.noop, + Oo + ), + eraseColumns: Gi( + function(n, t, e, r) { + var o = ia(t), + i = wu(n, o[0].column(), o[o.length - 1].column()), + u = ta(i, t[0].row(), t[0].column()); + return na(i, u); + }, + $i, + aa, + Zu, + Oo + ), + eraseRows: Gi( + function(n, t, e, r) { + var o = oa(t), + i = bu(n, o[0].row(), o[o.length - 1].row()), + u = ta(i, t[0].row(), t[0].column()); + return na(i, u); + }, + $i, + m.noop, + Zu, + Oo + ), + makeColumnHeader: Gi( + function(n, t, e, r) { + var o = Su(n, t.column(), e, r.replaceOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + m.noop, + m.noop, + Eo("row", "th") + ), + unmakeColumnHeader: Gi( + function(n, t, e, r) { + var o = Su(n, t.column(), e, r.replaceOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + m.noop, + m.noop, + Eo(null, "td") + ), + makeRowHeader: Gi( + function(n, t, e, r) { + var o = Ru(n, t.row(), e, r.replaceOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + m.noop, + m.noop, + Eo("col", "th") + ), + unmakeRowHeader: Gi( + function(n, t, e, r) { + var o = Ru(n, t.row(), e, r.replaceOrInit); + return ra(o, t.row(), t.column()); + }, + Yi, + m.noop, + m.noop, + Eo(null, "td") + ), + mergeCells: Gi( + function(n, t, e, r) { + var o = t.cells(); + Ho(o); + var i = lu(n, t.bounds(), e, m.constant(o[0])); + return na(i, w.from(o[0])); + }, + Qi, + m.noop, + m.noop, + Bo + ), + unmergeCells: Gi( + function(n, t, e, r) { + var o = B.foldr( + t, + function(n, t) { + return su(n, t, e, r.combine(t)); + }, + n + ); + return na(o, w.from(t[0])); + }, + Zi, + aa, + m.noop, + Bo + ), + pasteCells: Gi( + function(n, t, e, r) { + var o, + i, + u, + a, + c = ((o = t.clipboard()), + (i = t.generators()), + (u = Gt(o)), + (a = Kt.generate(u)), + ei(a, i, !0)), + l = nn.address(t.row(), t.column()); + return du(l, n, c, t.generators(), e).fold( + function() { + return na(n, w.some(t.element())); + }, + function(n) { + var e = ta(n, t.row(), t.column()); + return na(n, e); + } + ); + }, + Ki, + aa, + m.noop, + Oo + ), + pasteRowsBefore: Gi( + function(n, t, e, r) { + var o = n[t.cells[0].row()], + i = t.cells[0].row(), + u = ua(t.clipboard(), t.generators(), o), + a = mu(i, n, u, t.generators(), e), + c = ta(a, t.cells[0].row(), t.cells[0].column()); + return na(a, c); + }, + Ji, + m.noop, + m.noop, + Oo + ), + pasteRowsAfter: Gi( + function(n, t, e, r) { + var o = n[t.cells[0].row()], + i = + t.cells[t.cells.length - 1].row() + + t.cells[t.cells.length - 1].rowspan(), + u = ua(t.clipboard(), t.generators(), o), + a = mu(i, n, u, t.generators(), e), + c = ta(a, t.cells[0].row(), t.cells[0].column()); + return na(a, c); + }, + Ji, + m.noop, + m.noop, + Oo + ) + }, + la = function(n) { + return en.fromDom(n.getBody()); + }, + sa = { + getBody: la, + getIsRoot: function(n) { + return function(t) { + return ot.eq(t, la(n)); + }; + }, + addSizeSuffix: function(n) { + return /^[0-9]+$/.test(n) && (n += "px"), n; + }, + removePxSuffix: function(n) { + return n ? n.replace(/px$/, "") : ""; + } + }, + fa = function(n) { + return "rtl" === re.get(n, "direction") ? "rtl" : "ltr"; + }, + da = { + onDirection: function(n, t) { + return function(e) { + return "rtl" === fa(e) ? t : n; + }; + }, + getDirection: fa + }, + ma = { isRtl: m.constant(!1) }, + ga = { isRtl: m.constant(!0) }, + pa = function(n) { + return "rtl" === da.getDirection(n) ? ga : ma; + }, + ha = function(n, t) { + var e, + r = function(n) { + return "table" === xt.name(sa.getBody(n)); + }; + !1 !== n.settings.table_clone_elements && + ("string" == typeof n.settings.table_clone_elements + ? (e = n.settings.table_clone_elements.split(/[ ,]/)) + : Array.isArray(n.settings.table_clone_elements) && + (e = n.settings.table_clone_elements)); + var o = w.from(e), + i = function(t, e, r, i) { + return function(u, a) { + var c = Bt.descendants(u, "td[data-mce-style],th[data-mce-style]"); + B.each(c, function(n) { + Dt.remove(n, "data-mce-style"); + }); + var l = i(), + s = en.fromDom(n.getDoc()), + f = xo(pa), + d = Oe(r, s, o); + return e(u) + ? t(l, u, a, d, f).bind(function(t) { + return ( + B.each(t.newRows(), function(t) { + var e; + (e = t), n.fire("newrow", { node: e.dom() }), e.dom(); + }), + B.each(t.newCells(), function(t) { + var e; + (e = t), n.fire("newcell", { node: e.dom() }), e.dom(); + }), + t.cursor().map(function(t) { + var e = n.dom.createRng(); + return e.setStart(t.dom(), 0), e.setEnd(t.dom(), 0), e; + }) + ); + }) + : w.none(); + }; + }; + return { + deleteRow: i( + ca.eraseRows, + function(t) { + var e = Co(t); + return !1 === r(n) || e.rows() > 1; + }, + m.noop, + t + ), + deleteColumn: i( + ca.eraseColumns, + function(t) { + var e = Co(t); + return !1 === r(n) || e.columns() > 1; + }, + m.noop, + t + ), + insertRowsBefore: i(ca.insertRowsBefore, m.always, m.noop, t), + insertRowsAfter: i(ca.insertRowsAfter, m.always, m.noop, t), + insertColumnsBefore: i(ca.insertColumnsBefore, m.always, to, t), + insertColumnsAfter: i(ca.insertColumnsAfter, m.always, to, t), + mergeCells: i(ca.mergeCells, m.always, m.noop, t), + unmergeCells: i(ca.unmergeCells, m.always, m.noop, t), + pasteRowsBefore: i(ca.pasteRowsBefore, m.always, m.noop, t), + pasteRowsAfter: i(ca.pasteRowsAfter, m.always, m.noop, t), + pasteCells: i(ca.pasteCells, m.always, m.noop, t) + }; + }, + va = function(n, t, e) { + var r = Gt(n), + o = Kt.generate(r); + return $i(o, t).map(function(n) { + var t = ei(o, e, !1).slice( + n[0].row(), + n[n.length - 1].row() + n[n.length - 1].rowspan() + ), + r = Xi(t, e); + return ii(r); + }); + }, + ba = tinymce.util.Tools.resolve("tinymce.util.Tools"), + wa = tinymce.util.Tools.resolve("tinymce.Env"), + ya = { + applyAlign: function(n, t, e) { + e && n.formatter.apply("align" + e, {}, t); + }, + applyVAlign: function(n, t, e) { + e && n.formatter.apply("valign" + e, {}, t); + }, + unApplyAlign: function(n, t) { + ba.each("left center right".split(" "), function(e) { + n.formatter.remove("align" + e, {}, t); + }); + }, + unApplyVAlign: function(n, t) { + ba.each("top middle bottom".split(" "), function(e) { + n.formatter.remove("valign" + e, {}, t); + }); + }, + getTDTHOverallStyle: function(n, t, e) { + var r; + return (r = (function(t, r) { + for (var o = 0; o < r.length; o++) { + var i = n.getStyle(r[o], e); + if ((void 0 === t && (t = i), t !== i)) return ""; + } + return t; + })(r, n.select("td,th", t))); + } + }, + xa = function(n, t) { + var e = n.dom, + r = t.control.rootControl, + o = r.toJSON(), + i = e.parseStyle(o.style); + "style" === t.control.name() + ? (r + .find("#borderStyle") + .value(i["border-style"] || "")[0] + .fire("select"), + r + .find("#borderColor") + .value(i["border-color"] || "")[0] + .fire("change"), + r + .find("#backgroundColor") + .value(i["background-color"] || "")[0] + .fire("change"), + r + .find("#width") + .value(i.width || "") + .fire("change"), + r + .find("#height") + .value(i.height || "") + .fire("change")) + : ((i["border-style"] = o.borderStyle), + (i["border-color"] = o.borderColor), + (i["background-color"] = o.backgroundColor), + (i.width = o.width ? sa.addSizeSuffix(o.width) : ""), + (i.height = o.height ? sa.addSizeSuffix(o.height) : "")), + r + .find("#style") + .value(e.serializeStyle(e.parseStyle(e.serializeStyle(i)))); + }, + Ca = { + createStyleForm: function(n) { + var t = function() { + var t = n.settings.color_picker_callback; + if (t) + return function(e) { + return t.call( + n, + function(n) { + e.control.value(n).fire("change"); + }, + e.control.value() + ); + }; + }; + return { + title: "Advanced", + type: "form", + defaults: { onchange: m.curry(xa, n) }, + items: [ + { label: "Style", name: "style", type: "textbox" }, + { + type: "form", + padding: 0, + formItemDefaults: { layout: "grid", alignH: ["start", "right"] }, + defaults: { size: 7 }, + items: [ + { + label: "Border style", + type: "listbox", + name: "borderStyle", + width: 90, + onselect: m.curry(xa, n), + values: [ + { text: "Select...", value: "" }, + { text: "Solid", value: "solid" }, + { text: "Dotted", value: "dotted" }, + { text: "Dashed", value: "dashed" }, + { text: "Double", value: "double" }, + { text: "Groove", value: "groove" }, + { text: "Ridge", value: "ridge" }, + { text: "Inset", value: "inset" }, + { text: "Outset", value: "outset" }, + { text: "None", value: "none" }, + { text: "Hidden", value: "hidden" } + ] + }, + { + label: "Border color", + type: "colorbox", + name: "borderColor", + onaction: t() + }, + { + label: "Background color", + type: "colorbox", + name: "backgroundColor", + onaction: t() + } + ] + } + ] + }; + }, + buildListItems: function(n, t, e) { + var r = function(n, e) { + return ( + (e = e || []), + ba.each(n, function(n) { + var o = { text: n.text || n.title }; + n.menu ? (o.menu = r(n.menu)) : ((o.value = n.value), t && t(o)), + e.push(o); + }), + e + ); + }; + return r(n, e || []); + }, + updateStyleField: xa, + extractAdvancedStyles: function(n, t) { + var e = n.parseStyle(n.getAttrib(t, "style")), + r = {}; + return ( + e["border-style"] && (r.borderStyle = e["border-style"]), + e["border-color"] && (r.borderColor = e["border-color"]), + e["background-color"] && (r.backgroundColor = e["background-color"]), + (r.style = n.serializeStyle(e)), + r + ); + } + }; + function Sa(n, t, e, r) { + if ("TD" === t.tagName || "TH" === t.tagName) n.setStyle(t, e, r); + else if (t.children) + for (var o = 0; o < t.children.length; o++) Sa(n, t.children[o], e, r); + } + var Ra = function(n, t, e) { + var r, + o, + i = n.dom; + Ca.updateStyleField(n, e), + !1 === (o = e.control.rootControl.toJSON())["class"] && + delete o["class"], + n.undoManager.transact(function() { + t || (t = Pr.insert(n, o.cols || 1, o.rows || 1)), + (function(n, t, e) { + var r = n.dom, + o = {}, + i = {}; + if ( + ((o["class"] = e["class"]), + (i.height = sa.addSizeSuffix(e.height)), + r.getAttrib(t, "width") && !n.settings.table_style_by_css + ? (o.width = sa.removePxSuffix(e.width)) + : (i.width = sa.addSizeSuffix(e.width)), + n.settings.table_style_by_css + ? ((i["border-width"] = sa.addSizeSuffix(e.border)), + (i["border-spacing"] = sa.addSizeSuffix(e.cellspacing)), + ba.extend(o, { + "data-mce-border-color": e.borderColor, + "data-mce-cell-padding": e.cellpadding, + "data-mce-border": e.border + })) + : ba.extend(o, { + border: e.border, + cellpadding: e.cellpadding, + cellspacing: e.cellspacing + }), + n.settings.table_style_by_css && t.children) + ) + for (var u = 0; u < t.children.length; u++) + Sa(r, t.children[u], { + "border-width": sa.addSizeSuffix(e.border), + "border-color": e.borderColor, + padding: sa.addSizeSuffix(e.cellpadding) + }); + e.style + ? ba.extend(i, r.parseStyle(e.style)) + : (i = ba.extend({}, r.parseStyle(r.getAttrib(t, "style")), i)), + (o.style = r.serializeStyle(i)), + r.setAttribs(t, o); + })(n, t, o), + (r = i.select("caption", t)[0]) && !o.caption && i.remove(r), + !r && + o.caption && + (((r = i.create("caption")).innerHTML = wa.ie + ? "\xa0" + : '
    '), + t.insertBefore(r, t.firstChild)), + ya.unApplyAlign(n, t), + o.align && ya.applyAlign(n, t, o.align), + n.focus(), + n.addVisual(); + }); + }, + Ta = function(n, t) { + var e, + r, + o, + i, + u, + a, + c, + l, + s, + f = n.dom, + d = {}; + !0 === t + ? (e = f.getParent(n.selection.getStart(), "table")) && + ((c = e), + (l = (a = n).dom), + (s = { + width: l.getStyle(c, "width") || l.getAttrib(c, "width"), + height: l.getStyle(c, "height") || l.getAttrib(c, "height"), + cellspacing: + l.getStyle(c, "border-spacing") || l.getAttrib(c, "cellspacing"), + cellpadding: + l.getAttrib(c, "data-mce-cell-padding") || + l.getAttrib(c, "cellpadding") || + ya.getTDTHOverallStyle(a.dom, c, "padding"), + border: + l.getAttrib(c, "data-mce-border") || + l.getAttrib(c, "border") || + ya.getTDTHOverallStyle(a.dom, c, "border"), + borderColor: l.getAttrib(c, "data-mce-border-color"), + caption: !!l.select("caption", c)[0], + class: l.getAttrib(c, "class") + }), + ba.each("left center right".split(" "), function(n) { + a.formatter.matchNode(c, "align" + n) && (s.align = n); + }), + !1 !== a.settings.table_advtab && + ba.extend(s, Ca.extractAdvancedStyles(l, c)), + (d = s)) + : ((r = { label: "Cols", name: "cols" }), + (o = { label: "Rows", name: "rows" })), + n.settings.table_class_list && + (d["class"] && + (d["class"] = d["class"].replace(/\s*mce\-item\-table\s*/g, "")), + (i = { + name: "class", + type: "listbox", + label: "Class", + values: Ca.buildListItems(n.settings.table_class_list, function(t) { + t.value && + (t.textStyle = function() { + return n.formatter.getCssText({ + block: "table", + classes: [t.value] + }); + }); + }) + })), + (u = { + type: "form", + layout: "flex", + direction: "column", + labelGapCalc: "children", + padding: 0, + items: [ + { + type: "form", + labelGapCalc: !1, + padding: 0, + layout: "grid", + columns: 2, + defaults: { type: "textbox", maxWidth: 50 }, + items: + !1 !== n.settings.table_appearance_options + ? [ + r, + o, + { + label: "Width", + name: "width", + onchange: m.curry(Ca.updateStyleField, n) + }, + { + label: "Height", + name: "height", + onchange: m.curry(Ca.updateStyleField, n) + }, + { label: "Cell spacing", name: "cellspacing" }, + { label: "Cell padding", name: "cellpadding" }, + { label: "Border", name: "border" }, + { label: "Caption", name: "caption", type: "checkbox" } + ] + : [ + r, + o, + { + label: "Width", + name: "width", + onchange: m.curry(Ca.updateStyleField, n) + }, + { + label: "Height", + name: "height", + onchange: m.curry(Ca.updateStyleField, n) + } + ] + }, + { + label: "Alignment", + name: "align", + type: "listbox", + text: "None", + values: [ + { text: "None", value: "" }, + { text: "Left", value: "left" }, + { text: "Center", value: "center" }, + { text: "Right", value: "right" } + ] + }, + i + ] + }), + !1 !== n.settings.table_advtab + ? n.windowManager.open({ + title: "Table properties", + data: d, + bodyType: "tabpanel", + body: [ + { title: "General", type: "form", items: u }, + Ca.createStyleForm(n) + ], + onsubmit: m.curry(Ra, n, e) + }) + : n.windowManager.open({ + title: "Table properties", + data: d, + body: u, + onsubmit: m.curry(Ra, n, e) + }); + }, + Da = function(n, t, e) { + var r = n.getParent(t, "table"), + o = t.parentNode, + i = n.select(e, r)[0]; + i || + ((i = n.create(e)), + r.firstChild + ? "CAPTION" === r.firstChild.nodeName + ? n.insertAfter(i, r.firstChild) + : r.insertBefore(i, r.firstChild) + : r.appendChild(i)), + i.appendChild(t), + o.hasChildNodes() || n.remove(o); + }; + function Aa(n, t, e) { + var r, + o = n.dom; + function i(n, t, e) { + e && o.setAttrib(n, t, e); + } + Ca.updateStyleField(n, e), + (r = e.control.rootControl.toJSON()), + n.undoManager.transact(function() { + ba.each(t, function(e) { + var u, a, c; + i(e, "scope", r.scope), + i(e, "style", r.style), + i(e, "class", r["class"]), + (u = e), + (a = "height"), + (c = sa.addSizeSuffix(r.height)) && o.setStyle(u, a, c), + r.type !== e.parentNode.nodeName.toLowerCase() && + Da(n.dom, e, r.type), + 1 === t.length && ya.unApplyAlign(n, e), + r.align && ya.applyAlign(n, e, r.align); + }), + n.focus(); + }); + } + var ka = function(n) { + var t, + e, + r, + o, + i, + u, + a, + c, + l, + s, + f = n.dom, + d = []; + (t = f.getParent(n.selection.getStart(), "table")), + (e = f.getParent(n.selection.getStart(), "td,th")), + ba.each(t.rows, function(n) { + ba.each(n.cells, function(t) { + if (f.getAttrib(t, "data-mce-selected") || t === e) + return d.push(n), !1; + }); + }), + (r = d[0]) && + (d.length > 1 + ? (i = { + height: "", + scope: "", + class: "", + align: "", + type: r.parentNode.nodeName.toLowerCase() + }) + : ((c = r), + (l = (a = n).dom), + ((s = { + height: l.getStyle(c, "height") || l.getAttrib(c, "height"), + scope: l.getAttrib(c, "scope"), + class: l.getAttrib(c, "class") + }).type = c.parentNode.nodeName.toLowerCase()), + ba.each("left center right".split(" "), function(n) { + a.formatter.matchNode(c, "align" + n) && (s.align = n); + }), + !1 !== a.settings.table_row_advtab && + ba.extend(s, Ca.extractAdvancedStyles(l, c)), + (i = s)), + n.settings.table_row_class_list && + (o = { + name: "class", + type: "listbox", + label: "Class", + values: Ca.buildListItems( + n.settings.table_row_class_list, + function(t) { + t.value && + (t.textStyle = function() { + return n.formatter.getCssText({ + block: "tr", + classes: [t.value] + }); + }); + } + ) + }), + (u = { + type: "form", + columns: 2, + padding: 0, + defaults: { type: "textbox" }, + items: [ + { + type: "listbox", + name: "type", + label: "Row type", + text: "Header", + maxWidth: null, + values: [ + { text: "Header", value: "thead" }, + { text: "Body", value: "tbody" }, + { text: "Footer", value: "tfoot" } + ] + }, + { + type: "listbox", + name: "align", + label: "Alignment", + text: "None", + maxWidth: null, + values: [ + { text: "None", value: "" }, + { text: "Left", value: "left" }, + { text: "Center", value: "center" }, + { text: "Right", value: "right" } + ] + }, + { label: "Height", name: "height" }, + o + ] + }), + !1 !== n.settings.table_row_advtab + ? n.windowManager.open({ + title: "Row properties", + data: i, + bodyType: "tabpanel", + body: [ + { title: "General", type: "form", items: u }, + Ca.createStyleForm(n) + ], + onsubmit: m.curry(Aa, n, d) + }) + : n.windowManager.open({ + title: "Row properties", + data: i, + body: u, + onsubmit: m.curry(Aa, n, d) + })); + }, + Na = function(n, t, e) { + var r, + o = n.dom; + function i(n, t, e) { + e && o.setAttrib(n, t, e); + } + function u(n, t, e) { + e && o.setStyle(n, t, e); + } + Ca.updateStyleField(n, e), + (r = e.control.rootControl.toJSON()), + n.undoManager.transact(function() { + ba.each(t, function(e) { + var a, c; + i(e, "scope", r.scope), + 1 === t.length + ? i(e, "style", r.style) + : ((a = e), (c = r.style), (a.style.cssText += ";" + c)), + i(e, "class", r["class"]), + u(e, "width", sa.addSizeSuffix(r.width)), + u(e, "height", sa.addSizeSuffix(r.height)), + r.type && + e.nodeName.toLowerCase() !== r.type && + (e = o.rename(e, r.type)), + 1 === t.length && (ya.unApplyAlign(n, e), ya.unApplyVAlign(n, e)), + r.align && ya.applyAlign(n, e, r.align), + r.valign && ya.applyVAlign(n, e, r.valign); + }), + n.focus(); + }); + }, + Oa = function(n) { + var t, + e, + r, + o = []; + if ( + ((o = n.dom.select("td[data-mce-selected],th[data-mce-selected]")), + (t = n.dom.getParent(n.selection.getStart(), "td,th")), + !o.length && t && o.push(t), + (t = t || o[0])) + ) { + var i, u, a, c; + o.length > 1 + ? (e = { + width: "", + height: "", + scope: "", + class: "", + align: "", + style: "", + type: t.nodeName.toLowerCase() + }) + : ((u = t), + (a = (i = n).dom), + ((c = { + width: a.getStyle(u, "width") || a.getAttrib(u, "width"), + height: a.getStyle(u, "height") || a.getAttrib(u, "height"), + scope: a.getAttrib(u, "scope"), + class: a.getAttrib(u, "class") + }).type = u.nodeName.toLowerCase()), + ba.each("left center right".split(" "), function(n) { + i.formatter.matchNode(u, "align" + n) && (c.align = n); + }), + ba.each("top middle bottom".split(" "), function(n) { + i.formatter.matchNode(u, "valign" + n) && (c.valign = n); + }), + !1 !== i.settings.table_cell_advtab && + ba.extend(c, Ca.extractAdvancedStyles(a, u)), + (e = c)), + n.settings.table_cell_class_list && + (r = { + name: "class", + type: "listbox", + label: "Class", + values: Ca.buildListItems( + n.settings.table_cell_class_list, + function(t) { + t.value && + (t.textStyle = function() { + return n.formatter.getCssText({ + block: "td", + classes: [t.value] + }); + }); + } + ) + }); + var l = { + type: "form", + layout: "flex", + direction: "column", + labelGapCalc: "children", + padding: 0, + items: [ + { + type: "form", + layout: "grid", + columns: 2, + labelGapCalc: !1, + padding: 0, + defaults: { type: "textbox", maxWidth: 50 }, + items: [ + { + label: "Width", + name: "width", + onchange: m.curry(Ca.updateStyleField, n) + }, + { + label: "Height", + name: "height", + onchange: m.curry(Ca.updateStyleField, n) + }, + { + label: "Cell type", + name: "type", + type: "listbox", + text: "None", + minWidth: 90, + maxWidth: null, + values: [ + { text: "Cell", value: "td" }, + { text: "Header cell", value: "th" } + ] + }, + { + label: "Scope", + name: "scope", + type: "listbox", + text: "None", + minWidth: 90, + maxWidth: null, + values: [ + { text: "None", value: "" }, + { text: "Row", value: "row" }, + { text: "Column", value: "col" }, + { text: "Row group", value: "rowgroup" }, + { text: "Column group", value: "colgroup" } + ] + }, + { + label: "H Align", + name: "align", + type: "listbox", + text: "None", + minWidth: 90, + maxWidth: null, + values: [ + { text: "None", value: "" }, + { text: "Left", value: "left" }, + { text: "Center", value: "center" }, + { text: "Right", value: "right" } + ] + }, + { + label: "V Align", + name: "valign", + type: "listbox", + text: "None", + minWidth: 90, + maxWidth: null, + values: [ + { text: "None", value: "" }, + { text: "Top", value: "top" }, + { text: "Middle", value: "middle" }, + { text: "Bottom", value: "bottom" } + ] + } + ] + }, + r + ] + }; + !1 !== n.settings.table_cell_advtab + ? n.windowManager.open({ + title: "Cell properties", + bodyType: "tabpanel", + data: e, + body: [ + { title: "General", type: "form", items: l }, + Ca.createStyleForm(n) + ], + onsubmit: m.curry(Na, n, o) + }) + : n.windowManager.open({ + title: "Cell properties", + data: e, + body: l, + onsubmit: m.curry(Na, n, o) + }); + } + }, + Ea = ba.each, + Ba = w.none(), + Ia = { + registerCommands: function(n, t, e, r) { + var o = sa.getIsRoot(n), + i = function() { + return en.fromDom(n.dom.getParent(n.selection.getStart(), "th,td")); + }, + u = function(n) { + return Vt(n, o); + }, + a = function(t) { + var o = i(); + u(o).each(function(i) { + var u = kr.forMenu(r, i, o); + t(i, u).each(function(t) { + n.selection.setRng(t), n.focus(), e.clear(i); + }); + }); + }, + c = function(t) { + var e = i(); + return u(e).bind(function(t) { + var o = en.fromDom(n.getDoc()), + i = kr.forMenu(r, t, e), + u = Oe(m.noop, o, w.none()); + return va(t, i, u); + }); + }, + l = function(t) { + Ba.each(function(o) { + var a = B.map(o, function(n) { + return he(n); + }), + c = i(); + u(c).bind(function(o) { + var i = en.fromDom(n.getDoc()), + u = Ee(i), + l = kr.pasteRows(r, o, c, a, u); + t(o, l).each(function(t) { + n.selection.setRng(t), n.focus(), e.clear(o); + }); + }); + }); + }; + Ea( + { + mceTableSplitCells: function() { + a(t.unmergeCells); + }, + mceTableMergeCells: function() { + a(t.mergeCells); + }, + mceTableInsertRowBefore: function() { + a(t.insertRowsBefore); + }, + mceTableInsertRowAfter: function() { + a(t.insertRowsAfter); + }, + mceTableInsertColBefore: function() { + a(t.insertColumnsBefore); + }, + mceTableInsertColAfter: function() { + a(t.insertColumnsAfter); + }, + mceTableDeleteCol: function() { + a(t.deleteColumn); + }, + mceTableDeleteRow: function() { + a(t.deleteRow); + }, + mceTableCutRow: function(n) { + (Ba = c()), a(t.deleteRow); + }, + mceTableCopyRow: function(n) { + Ba = c(); + }, + mceTablePasteRowBefore: function(n) { + l(t.pasteRowsBefore); + }, + mceTablePasteRowAfter: function(n) { + l(t.pasteRowsAfter); + }, + mceTableDelete: function() { + var t = en.fromDom( + n.dom.getParent(n.selection.getStart(), "th,td") + ); + Vt(t, o) + .filter(m.not(o)) + .each(function(t) { + var e = en.fromText(""); + ue.after(t, e), le.remove(t); + var r = n.dom.createRng(); + r.setStart(e.dom(), 0), + r.setEnd(e.dom(), 0), + n.selection.setRng(r); + }); + } + }, + function(t, e) { + n.addCommand(e, t); + } + ), + Ea( + { + mceInsertTable: m.curry(Ta, n), + mceTableProps: m.curry(Ta, n, !0), + mceTableRowProps: m.curry(ka, n), + mceTableCellProps: m.curry(Oa, n) + }, + function(t, e) { + n.addCommand(e, function(n, e) { + t(e); + }); + } + ); + }, + getClipboardRows: function() { + return Ba.fold( + function() {}, + function(n) { + return B.map(n, function(n) { + return n.dom(); + }); + } + ); + }, + setClipboardRows: function(n) { + var t = B.map(n, en.fromDom); + Ba = w.from(t); + } + }, + Pa = function(n) { + var t = w + .from(n.dom().documentElement) + .map(en.fromDom) + .getOr(n); + return { + parent: m.constant(t), + view: m.constant(n), + origin: m.constant(oo(0, 0)) + }; + }, + Wa = function(n, t) { + return { + parent: m.constant(t), + view: m.constant(n), + origin: m.constant(oo(0, 0)) + }; + }, + _a = function(n) { + var t = X.immutable.apply(null, n), + e = []; + return { + bind: function(n) { + if (n === undefined) throw "Event bind error: undefined handler"; + e.push(n); + }, + unbind: function(n) { + e = B.filter(e, function(t) { + return t !== n; + }); + }, + trigger: function() { + var n = t.apply(null, arguments); + B.each(e, function(t) { + t(n); + }); + } + }; + }, + Ma = function(n) { + return { + registry: L.map(n, function(n) { + return { bind: n.bind, unbind: n.unbind }; + }), + trigger: L.map(n, function(n) { + return n.trigger; + }) + }; + }, + La = { + mode: Ao.exactly(["compare", "extract", "mutate", "sink"]), + sink: Ao.exactly(["element", "start", "stop", "destroy"]), + api: Ao.exactly(["forceDrop", "drop", "move", "delayDrop"]) + }, + qa = { resolve: gi("ephox-dragster").resolve }, + za = function(n, t) { + return function(e) { + if (n(e)) { + var r, + o, + i, + u, + a, + c, + l, + s = en.fromDom(e.target), + f = function() { + e.stopPropagation(); + }, + d = function() { + e.preventDefault(); + }, + g = m.compose( + d, + f + ), + p = ((r = s), + (o = e.clientX), + (i = e.clientY), + (u = f), + (a = d), + (c = g), + (l = e), + { + target: m.constant(r), + x: m.constant(o), + y: m.constant(i), + stop: u, + prevent: a, + kill: c, + raw: m.constant(l) + }); + t(p); + } + }; + }, + Fa = function(n, t, e, r, o) { + var i = za(e, r); + return ( + n.dom().addEventListener(t, i, o), { unbind: m.curry(ja, n, t, i, o) } + ); + }, + ja = function(n, t, e, r) { + n.dom().removeEventListener(t, e, r); + }, + Ha = function(n, t, e, r) { + return Fa(n, t, e, r, !1); + }, + Va = m.constant(!0), + Ua = function(n, t, e) { + return Ha(n, t, Va, e); + }, + Ga = La.mode({ + compare: function(n, t) { + return oo(t.left() - n.left(), t.top() - n.top()); + }, + extract: function(n) { + return w.some(oo(n.x(), n.y())); + }, + sink: function(n, t) { + var e, + r, + o, + i = ((e = t), + (r = Xo.merge({ layerClass: qa.resolve("blocker") }, e)), + (o = en.fromTag("div")), + Dt.set(o, "role", "presentation"), + re.setAll(o, { + position: "fixed", + left: "0px", + top: "0px", + width: "100%", + height: "100%" + }), + Ni.add(o, qa.resolve("blocker")), + Ni.add(o, r.layerClass), + { + element: function() { + return o; + }, + destroy: function() { + le.remove(o); + } + }), + u = Ua(i.element(), "mousedown", n.forceDrop), + a = Ua(i.element(), "mouseup", n.drop), + c = Ua(i.element(), "mousemove", n.move), + l = Ua(i.element(), "mouseout", n.delayDrop); + return La.sink({ + element: i.element, + start: function(n) { + ue.append(n, i.element()); + }, + stop: function() { + le.remove(i.element()); + }, + destroy: function() { + i.destroy(), a.unbind(), c.unbind(), l.unbind(), u.unbind(); + } + }); + }, + mutate: function(n, t) { + n.mutate(t.left(), t.top()); + } + }), + Xa = function() { + var n = w.none(), + t = Ma({ move: _a(["info"]) }); + return { + onEvent: function(e, r) { + r.extract(e).each(function(e) { + var o, i, u; + ((o = r), + (i = e), + (u = n.map(function(n) { + return o.compare(n, i); + })), + (n = w.some(i)), + u).each(function(n) { + t.trigger.move(n); + }); + }); + }, + reset: function() { + n = w.none(); + }, + events: t.registry + }; + }, + Ya = function() { + var n = { onEvent: function(n, t) {}, reset: m.noop }, + t = Xa(), + e = n; + return { + on: function() { + e.reset(), (e = t); + }, + off: function() { + e.reset(), (e = n); + }, + isOn: function() { + return e === t; + }, + onEvent: function(n, t) { + e.onEvent(n, t); + }, + events: t.events + }; + }, + $a = function(n, t) { + var e = null; + return { + cancel: function() { + null !== e && (clearTimeout(e), (e = null)); + }, + throttle: function() { + var r = arguments; + null !== e && clearTimeout(e), + (e = setTimeout(function() { + n.apply(null, r), (e = null), (r = null); + }, t)); + } + }; + }, + Ka = function(n, t, e) { + var r = !1, + o = Ma({ start: _a([]), stop: _a([]) }), + i = Ya(), + u = function() { + l.stop(), i.isOn() && (i.off(), o.trigger.stop()); + }, + a = $a(u, 200); + i.events.move.bind(function(e) { + t.mutate(n, e.info()); + }); + var c = function(n) { + return function() { + var t = Array.prototype.slice.call(arguments, 0); + if (r) return n.apply(null, t); + }; + }, + l = t.sink( + La.api({ + forceDrop: u, + drop: c(u), + move: c(function(n, e) { + a.cancel(), i.onEvent(n, t); + }), + delayDrop: c(a.throttle) + }), + e + ); + return { + element: l.element, + go: function(n) { + l.start(n), i.on(), o.trigger.start(); + }, + on: function() { + r = !0; + }, + off: function() { + r = !1; + }, + destroy: function() { + l.destroy(); + }, + events: o.registry + }; + }, + Ja = function(n, t) { + var e = t !== undefined ? t : {}, + r = e.mode !== undefined ? e.mode : Ga; + return Ka(n, r, t); + }, + Qa = function() { + var n, + t = Ma({ drag: _a(["xDelta", "yDelta", "target"]) }), + e = w.none(), + r = { + mutate: function(t, e) { + n.trigger.drag(t, e); + }, + events: (n = Ma({ drag: _a(["xDelta", "yDelta"]) })).registry + }; + return ( + r.events.drag.bind(function(n) { + e.each(function(e) { + t.trigger.drag(n.xDelta(), n.yDelta(), e); + }); + }), + { + assign: function(n) { + e = w.some(n); + }, + get: function() { + return e; + }, + mutate: r.mutate, + events: t.registry + } + ); + }, + Za = function(n, t, e) { + return qt.ancestor(n, t, e).isSome(); + }, + nc = pi.resolve("resizer-bar-dragging"), + tc = function(n, t) { + var e = wo.height, + r = (function(n, t, e) { + var r = Qa(), + o = Ja(r, {}), + i = w.none(), + u = function(n, t) { + return w.from(Dt.get(n, t)); + }; + r.events.drag.bind(function(n) { + u(n.target(), "data-row").each(function(t) { + var e = Iu.getInt(n.target(), "top"); + re.set(n.target(), "top", e + n.yDelta() + "px"); + }), + u(n.target(), "data-column").each(function(t) { + var e = Iu.getInt(n.target(), "left"); + re.set(n.target(), "left", e + n.xDelta() + "px"); + }); + }); + var a = function(n, t) { + return ( + Iu.getInt(n, t) - parseInt(Dt.get(n, "data-initial-" + t), 10) + ); + }; + o.events.stop.bind(function() { + r.get().each(function(r) { + i.each(function(o) { + u(r, "data-row").each(function(n) { + var t = a(r, "top"); + Dt.remove(r, "data-initial-top"), + d.trigger.adjustHeight(o, t, parseInt(n, 10)); + }), + u(r, "data-column").each(function(n) { + var t = a(r, "left"); + Dt.remove(r, "data-initial-left"), + d.trigger.adjustWidth(o, t, parseInt(n, 10)); + }), + Mi(n, o, e, t); + }); + }); + }); + var c = function(t, e) { + d.trigger.startAdjust(), + r.assign(t), + Dt.set(t, "data-initial-" + e, parseInt(re.get(t, e), 10)), + Ni.add(t, nc), + re.set(t, "opacity", "0.2"), + o.go(n.parent()); + }, + l = Ua(n.parent(), "mousedown", function(n) { + Fi(n.target()) && c(n.target(), "top"), + ji(n.target()) && c(n.target(), "left"); + }), + s = function(t) { + return ot.eq(t, n.view()); + }, + f = Ua(n.view(), "mouseover", function(r) { + "table" === xt.name(r.target()) || Za(r.target(), "table", s) + ? (i = + "table" === xt.name(r.target()) + ? w.some(r.target()) + : qt.ancestor(r.target(), "table", s)).each(function(r) { + Mi(n, r, e, t); + }) + : Nt.inBody(r.target()) && zi(n); + }), + d = Ma({ + adjustHeight: _a(["table", "delta", "row"]), + adjustWidth: _a(["table", "delta", "column"]), + startAdjust: _a([]) + }); + return { + destroy: function() { + l.unbind(), f.unbind(), o.destroy(), zi(n); + }, + refresh: function(r) { + Mi(n, r, e, t); + }, + on: o.on, + off: o.off, + hideBars: m.curry(Li, n), + showBars: m.curry(qi, n), + events: d.registry + }; + })(n, t, e), + o = Ma({ + beforeResize: _a(["table"]), + afterResize: _a(["table"]), + startDrag: _a([]) + }); + return ( + r.events.adjustHeight.bind(function(n) { + o.trigger.beforeResize(n.table()); + var t = e.delta(n.delta(), n.table()); + Ju(n.table(), t, n.row(), e), o.trigger.afterResize(n.table()); + }), + r.events.startAdjust.bind(function(n) { + o.trigger.startDrag(); + }), + r.events.adjustWidth.bind(function(n) { + o.trigger.beforeResize(n.table()); + var e = t.delta(n.delta(), n.table()); + Ku(n.table(), e, n.column(), t), o.trigger.afterResize(n.table()); + }), + { + on: r.on, + off: r.off, + hideBars: r.hideBars, + showBars: r.showBars, + destroy: r.destroy, + events: o.registry + } + ); + }, + ec = function(n, t) { + return n.inline + ? Wa( + sa.getBody(n), + ((e = en.fromTag("div")), + re.setAll(e, { + position: "static", + height: "0", + width: "0", + padding: "0", + margin: "0", + border: "0" + }), + ue.append(Nt.body(), e), + e) + ) + : Pa(en.fromDom(n.getDoc())); + var e; + }, + rc = function(n, t) { + n.inline && le.remove(t.parent()); + }, + oc = function(n) { + var t, + e, + r = w.none(), + o = w.none(), + i = w.none(), + u = /(\d+(\.\d+)?)%/, + a = function(n) { + return "TABLE" === n.nodeName; + }; + return ( + n.on("init", function() { + var t = xo(pa), + e = ec(n); + if ( + ((i = w.some(e)), + n.settings.object_resizing && + !1 !== n.settings.table_resize_bars && + (!0 === n.settings.object_resizing || + "table" === n.settings.object_resizing)) + ) { + var u = tc(e, t); + u.on(), + u.events.startDrag.bind(function(t) { + r = w.some(n.selection.getRng()); + }), + u.events.afterResize.bind(function(t) { + var e = t.table(), + o = Bt.descendants( + e, + "td[data-mce-style],th[data-mce-style]" + ); + B.each(o, function(n) { + Dt.remove(n, "data-mce-style"); + }), + r.each(function(t) { + n.selection.setRng(t), n.focus(); + }), + n.undoManager.add(); + }), + (o = w.some(u)); + } + }), + n.on("ObjectResizeStart", function(r) { + var o; + a(r.target) && + ((t = r.width), + (o = r.target), + (e = n.dom.getStyle(o, "width") || n.dom.getAttrib(o, "width"))); + }), + n.on("ObjectResized", function(r) { + if (a(r.target)) { + var o = r.target; + if (u.test(e)) { + var i = parseFloat(u.exec(e)[1]), + c = (r.width * i) / t; + n.dom.setStyle(o, "width", c + "%"); + } else { + var l = []; + ba.each(o.rows, function(t) { + ba.each(t.cells, function(t) { + var e = n.dom.getStyle(t, "width", !0); + l.push({ cell: t, width: e }); + }); + }), + ba.each(l, function(t) { + n.dom.setStyle(t.cell, "width", t.width), + n.dom.setAttrib(t.cell, "width", null); + }); + } + } + }), + { + lazyResize: function() { + return o; + }, + lazyWire: function() { + return i.getOr(Pa(en.fromDom(n.getBody()))); + }, + destroy: function() { + o.each(function(n) { + n.destroy(); + }), + i.each(function(t) { + rc(n, t); + }); + } + } + ); + }, + ic = function(n) { + return { fold: n }; + }, + uc = function(n) { + return ic(function(t, e, r, o) { + return t(n); + }); + }, + ac = function(n) { + return ic(function(t, e, r, o) { + return e(n); + }); + }, + cc = function(n, t) { + return ic(function(e, r, o, i) { + return o(n, t); + }); + }, + lc = function(n) { + return ic(function(t, e, r, o) { + return o(n); + }); + }, + sc = function(n, t) { + return Vt(n, t).bind(function(t) { + var e = Ht(t); + return B.findIndex(e, function(t) { + return ot.eq(n, t); + }).map(function(n) { + return { index: m.constant(n), all: m.constant(e) }; + }); + }); + }, + fc = function(n, t) { + return sc(n, t).fold( + function() { + return uc(n); + }, + function(t) { + return t.index() + 1 < t.all().length + ? cc(n, t.all()[t.index() + 1]) + : lc(n); + } + ); + }, + dc = function(n, t) { + return sc(n, t).fold( + function() { + return uc(); + }, + function(t) { + return t.index() - 1 >= 0 ? cc(n, t.all()[t.index() - 1]) : ac(n); + } + ); + }, + mc = wr([ + { before: ["element"] }, + { on: ["element", "offset"] }, + { after: ["element"] } + ]), + gc = { + before: mc.before, + on: mc.on, + after: mc.after, + cata: function(n, t, e, r) { + return n.fold(t, e, r); + }, + getStart: function(n) { + return n.fold(m.identity, m.identity, m.identity); + } + }, + pc = wr([ + { domRange: ["rng"] }, + { relative: ["startSitu", "finishSitu"] }, + { exact: ["start", "soffset", "finish", "foffset"] } + ]), + hc = X.immutable("start", "soffset", "finish", "foffset"), + vc = { + domRange: pc.domRange, + relative: pc.relative, + exact: pc.exact, + exactFromRange: function(n) { + return pc.exact(n.start(), n.soffset(), n.finish(), n.foffset()); + }, + range: hc, + getWin: function(n) { + var t = n.match({ + domRange: function(n) { + return en.fromDom(n.startContainer); + }, + relative: function(n, t) { + return gc.getStart(n); + }, + exact: function(n, t, e, r) { + return n; + } + }); + return dt.defaultView(t); + } + }, + bc = function(n, t, e, r) { + var o = dt + .owner(n) + .dom() + .createRange(); + return o.setStart(n.dom(), t), o.setEnd(e.dom(), r), o; + }, + wc = function(n, t, e, r) { + var o = bc(n, t, e, r), + i = ot.eq(n, e) && t === r; + return o.collapsed && !i; + }, + yc = function(n, t) { + n.selectNodeContents(t.dom()); + }, + xc = function(n) { + n.deleteContents(); + }, + Cc = function(n) { + return { + left: m.constant(n.left), + top: m.constant(n.top), + right: m.constant(n.right), + bottom: m.constant(n.bottom), + width: m.constant(n.width), + height: m.constant(n.height) + }; + }, + Sc = { + create: function(n) { + return n.document.createRange(); + }, + replaceWith: function(n, t) { + xc(n), n.insertNode(t.dom()); + }, + selectNodeContents: function(n, t) { + var e = n.document.createRange(); + return yc(e, t), e; + }, + selectNodeContentsUsing: yc, + relativeToNative: function(n, t, e) { + var r, + o, + i = n.document.createRange(); + return ( + (r = i), + t.fold( + function(n) { + r.setStartBefore(n.dom()); + }, + function(n, t) { + r.setStart(n.dom(), t); + }, + function(n) { + r.setStartAfter(n.dom()); + } + ), + (o = i), + e.fold( + function(n) { + o.setEndBefore(n.dom()); + }, + function(n, t) { + o.setEnd(n.dom(), t); + }, + function(n) { + o.setEndAfter(n.dom()); + } + ), + i + ); + }, + exactToNative: function(n, t, e, r, o) { + var i = n.document.createRange(); + return i.setStart(t.dom(), e), i.setEnd(r.dom(), o), i; + }, + deleteContents: xc, + cloneFragment: function(n) { + var t = n.cloneContents(); + return en.fromDom(t); + }, + getFirstRect: function(n) { + var t = n.getClientRects(), + e = t.length > 0 ? t[0] : n.getBoundingClientRect(); + return e.width > 0 || e.height > 0 ? w.some(e).map(Cc) : w.none(); + }, + getBounds: function(n) { + var t = n.getBoundingClientRect(); + return t.width > 0 || t.height > 0 ? w.some(t).map(Cc) : w.none(); + }, + isWithin: function(n, t) { + return ( + t.compareBoundaryPoints(n.END_TO_START, n) < 1 && + t.compareBoundaryPoints(n.START_TO_END, n) > -1 + ); + }, + toString: function(n) { + return n.toString(); + } + }, + Rc = wr([ + { ltr: ["start", "soffset", "finish", "foffset"] }, + { rtl: ["start", "soffset", "finish", "foffset"] } + ]), + Tc = function(n, t, e) { + return t( + en.fromDom(e.startContainer), + e.startOffset, + en.fromDom(e.endContainer), + e.endOffset + ); + }, + Dc = function(n, t) { + var e, + r, + o, + i = ((e = n), + t.match({ + domRange: function(n) { + return { ltr: m.constant(n), rtl: w.none }; + }, + relative: function(n, t) { + return { + ltr: yn(function() { + return Sc.relativeToNative(e, n, t); + }), + rtl: yn(function() { + return w.some(Sc.relativeToNative(e, t, n)); + }) + }; + }, + exact: function(n, t, r, o) { + return { + ltr: yn(function() { + return Sc.exactToNative(e, n, t, r, o); + }), + rtl: yn(function() { + return w.some(Sc.exactToNative(e, r, o, n, t)); + }) + }; + } + })); + return (o = (r = i).ltr()).collapsed + ? r + .rtl() + .filter(function(n) { + return !1 === n.collapsed; + }) + .map(function(n) { + return Rc.rtl( + en.fromDom(n.endContainer), + n.endOffset, + en.fromDom(n.startContainer), + n.startOffset + ); + }) + .getOrThunk(function() { + return Tc(0, Rc.ltr, o); + }) + : Tc(0, Rc.ltr, o); + }, + Ac = (Rc.ltr, Rc.rtl, Dc), + kc = function(n, t) { + return Dc(n, t).match({ + ltr: function(t, e, r, o) { + var i = n.document.createRange(); + return i.setStart(t.dom(), e), i.setEnd(r.dom(), o), i; + }, + rtl: function(t, e, r, o) { + var i = n.document.createRange(); + return i.setStart(r.dom(), o), i.setEnd(t.dom(), e), i; + } + }); + }, + Nc = function(n, t, e) { + return t >= n.left && t <= n.right && e >= n.top && e <= n.bottom; + }, + Oc = function(n, t, e, r, o) { + if (0 === o) return 0; + if (t === r) return o - 1; + for (var i = r, u = 1; u < o; u++) { + var a = n(u), + c = Math.abs(t - a.left); + if (e > a.bottom); + else { + if (e < a.top || c > i) return u - 1; + i = c; + } + } + return 0; + }, + Ec = { + locate: function(n, t, e, r) { + var o = n.dom().createRange(); + o.selectNode(t.dom()); + var i = o.getClientRects(); + return $o(i, function(n) { + return Nc(n, e, r) ? w.some(n) : w.none(); + }).map(function(o) { + return ( + (i = n), + (a = e), + (c = r), + (l = o), + (s = function(n) { + var t = i.dom().createRange(); + return t.setStart(u.dom(), n), t.collapse(!0), t; + }), + (f = we.get((u = t)).length), + (d = Oc( + function(n) { + return s(n).getBoundingClientRect(); + }, + a, + c, + l.right, + f + )), + s(d) + ); + var i, u, a, c, l, s, f, d; + }); + } + }, + Bc = function(n, t, e, r) { + var o = n.dom().createRange(), + i = dt.children(t); + return $o(i, function(t) { + return ( + o.selectNode(t.dom()), + Nc(o.getBoundingClientRect(), e, r) ? Ic(n, t, e, r) : w.none() + ); + }); + }, + Ic = function(n, t, e, r) { + return (xt.isText(t) ? Ec.locate : Bc)(n, t, e, r); + }, + Pc = function(n, t, e, r) { + var o = n.dom().createRange(); + o.selectNode(t.dom()); + var i = o.getBoundingClientRect(), + u = Math.max(i.left, Math.min(i.right, e)), + a = Math.max(i.top, Math.min(i.bottom, r)); + return Ic(n, t, u, a); + }, + Wc = function(n, t) { + return t - n.left < n.right - t; + }, + _c = function(n, t, e) { + var r = n.dom().createRange(); + return r.selectNode(t.dom()), r.collapse(e), r; + }, + Mc = function(n, t, e) { + var r = n.dom().createRange(); + r.selectNode(t.dom()); + var o = r.getBoundingClientRect(), + i = Wc(o, e); + return (!0 === i ? Te.first : Te.last)(t).map(function(t) { + return _c(n, t, i); + }); + }, + Lc = function(n, t, e) { + var r = t.dom().getBoundingClientRect(), + o = Wc(r, e); + return w.some(_c(n, t, o)); + }, + qc = function(n, t, e) { + return (0 === dt.children(t).length ? Lc : Mc)(n, t, e); + }, + zc = document.caretPositionFromPoint + ? function(n, t, e) { + return w.from(n.dom().caretPositionFromPoint(t, e)).bind(function(t) { + if (null === t.offsetNode) return w.none(); + var e = n.dom().createRange(); + return e.setStart(t.offsetNode, t.offset), e.collapse(), w.some(e); + }); + } + : document.caretRangeFromPoint + ? function(n, t, e) { + return w.from(n.dom().caretRangeFromPoint(t, e)); + } + : function(n, t, e) { + return en.fromPoint(n, t, e).bind(function(r) { + var o = function() { + return qc(n, r, t); + }; + return 0 === dt.children(r).length + ? o() + : (function(n, t, e, r) { + var o = n.dom().createRange(); + o.selectNode(t.dom()); + var i = o.getBoundingClientRect(), + u = Math.max(i.left, Math.min(i.right, e)), + a = Math.max(i.top, Math.min(i.bottom, r)); + return Pc(n, t, u, a); + })(n, r, t, e).orThunk(o); + }); + }, + Fc = function(n, t, e) { + var r = en.fromDom(n.document); + return zc(r, t, e).map(function(n) { + return vc.range( + en.fromDom(n.startContainer), + n.startOffset, + en.fromDom(n.endContainer), + n.endOffset + ); + }); + }, + jc = function(n, t) { + var e = xt.name(n); + return "input" === e + ? gc.after(n) + : B.contains(["br", "img"], e) + ? 0 === t + ? gc.before(n) + : gc.after(n) + : gc.on(n, t); + }, + Hc = function(n, t) { + var e = n.fold(gc.before, jc, gc.after), + r = t.fold(gc.before, jc, gc.after); + return vc.relative(e, r); + }, + Vc = function(n, t, e, r) { + var o = jc(n, t), + i = jc(e, r); + return vc.relative(o, i); + }, + Uc = function(n) { + return n.match({ + domRange: function(n) { + var t = en.fromDom(n.startContainer), + e = en.fromDom(n.endContainer); + return Vc(t, n.startOffset, e, n.endOffset); + }, + relative: Hc, + exact: Vc + }); + }, + Gc = Hc, + Xc = Vc, + Yc = function(n, t) { + w.from(n.getSelection()).each(function(n) { + n.removeAllRanges(), n.addRange(t); + }); + }, + $c = function(n, t, e, r, o) { + var i = Sc.exactToNative(n, t, e, r, o); + Yc(n, i); + }, + Kc = function(n, t) { + return Ac(n, t).match({ + ltr: function(t, e, r, o) { + $c(n, t, e, r, o); + }, + rtl: function(t, e, r, o) { + var i = n.getSelection(); + i.extend + ? (i.collapse(t.dom(), e), i.extend(r.dom(), o)) + : $c(n, r, o, t, e); + } + }); + }, + Jc = function(n) { + var t = en.fromDom(n.anchorNode), + e = en.fromDom(n.focusNode); + return wc(t, n.anchorOffset, e, n.focusOffset) + ? w.some( + vc.range( + en.fromDom(n.anchorNode), + n.anchorOffset, + en.fromDom(n.focusNode), + n.focusOffset + ) + ) + : (function(n) { + if (n.rangeCount > 0) { + var t = n.getRangeAt(0), + e = n.getRangeAt(n.rangeCount - 1); + return w.some( + vc.range( + en.fromDom(t.startContainer), + t.startOffset, + en.fromDom(e.endContainer), + e.endOffset + ) + ); + } + return w.none(); + })(n); + }, + Qc = function(n) { + var t = n.getSelection(); + return t.rangeCount > 0 ? Jc(t) : w.none(); + }, + Zc = function(n, t, e, r, o) { + var i = Xc(t, e, r, o); + Kc(n, i); + }, + nl = function(n) { + return Qc(n).map(function(n) { + return vc.exact(n.start(), n.soffset(), n.finish(), n.foffset()); + }); + }, + tl = function(n, t, e) { + var r = Gc(t, e); + Kc(n, r); + }, + el = function(n) { + var t = vc.getWin(n).dom(), + e = function(n, e, r, o) { + return Sc.exactToNative(t, n, e, r, o); + }, + r = Uc(n); + return Ac(t, r).match({ ltr: e, rtl: e }); + }, + rl = function(n, t) { + var e = Sc.selectNodeContents(n, t); + Yc(n, e); + }, + ol = function(n) { + n.getSelection().removeAllRanges(); + }, + il = function(n, t) { + var e = kc(n, t); + return Sc.getFirstRect(e); + }, + ul = function(n, t, e) { + return Fc(n, t, e); + }, + al = tinymce.util.Tools.resolve("tinymce.util.VK"), + cl = function(n, t, e, r) { + return fl(n, t, fc(e), r); + }, + ll = function(n, t, e, r) { + return fl(n, t, dc(e), r); + }, + sl = function(n, t) { + var e = vc.exact(t, 0, t, 0); + return el(e); + }, + fl = function(n, t, e, r, o) { + return e.fold( + w.none, + w.none, + function(n, t) { + return Te.first(t).map(function(n) { + return sl(0, n); + }); + }, + function(e) { + return Vt(e, t).bind(function(t) { + var o, + i = kr.noMenu(e); + return ( + n.undoManager.transact(function() { + r.insertRowsAfter(t, i); + }), + (o = Bt.descendants(t, "tr")), + B.last(o).bind(function(n) { + return qt.descendant(n, "td,th").map(function(n) { + return sl(0, n); + }); + }) + ); + }); + } + ); + }, + dl = ["table", "li", "dl"], + ml = { + handle: function(n, t, e, r) { + if (n.keyCode === al.TAB) { + var o = sa.getBody(t), + i = function(n) { + var t = xt.name(n); + return ot.eq(n, o) || B.contains(dl, t); + }, + u = t.selection.getRng(); + if (u.collapsed) { + var a = en.fromDom(u.startContainer); + jt(a, i).each(function(o) { + n.preventDefault(), + (n.shiftKey ? ll : cl)(t, i, o, e, r).each(function(n) { + t.selection.setRng(n); + }); + }); + } + } + } + }, + gl = { response: X.immutable("selection", "kill") }, + pl = function(n) { + return function(t) { + return t === n; + }; + }, + hl = pl(38), + vl = pl(40), + bl = { + ltr: { isBackward: pl(37), isForward: pl(39) }, + rtl: { isBackward: pl(39), isForward: pl(37) }, + isUp: hl, + isDown: vl, + isNavigation: function(n) { + return n >= 37 && n <= 40; + } + }, + wl = function(n, t) { + var e = kc(n, t); + return { + start: m.constant(en.fromDom(e.startContainer)), + soffset: m.constant(e.startOffset), + finish: m.constant(en.fromDom(e.endContainer)), + foffset: m.constant(e.endOffset) + }; + }, + yl = function(n, t, e, r) { + return { + start: m.constant(gc.on(n, t)), + finish: m.constant(gc.on(e, r)) + }; + }, + xl = (tt.detect().browser.isSafari(), + function(n) { + var t = n !== undefined ? n.dom() : document, + e = t.body.scrollLeft || t.documentElement.scrollLeft, + r = t.body.scrollTop || t.documentElement.scrollTop; + return oo(e, r); + }), + Cl = xl, + Sl = function(n, t, e) { + (e !== undefined ? e.dom() : document).defaultView.scrollBy(n, t); + }, + Rl = function(n) { + return { + elementFromPoint: function(t, e) { + return w.from(n.document.elementFromPoint(t, e)).map(en.fromDom); + }, + getRect: function(n) { + return n.dom().getBoundingClientRect(); + }, + getRangedRect: function(t, e, r, o) { + var i = vc.exact(t, e, r, o); + return il(n, i).map(function(n) { + return L.map(n, m.apply); + }); + }, + getSelection: function() { + return nl(n).map(function(t) { + return wl(n, t); + }); + }, + fromSitus: function(t) { + var e = vc.relative(t.start(), t.finish()); + return wl(n, e); + }, + situsFromPoint: function(t, e) { + return ul(n, t, e).map(function(n) { + return { + start: m.constant(gc.on(n.start(), n.soffset())), + finish: m.constant(gc.on(n.finish(), n.foffset())) + }; + }); + }, + clearSelection: function() { + ol(n); + }, + setSelection: function(t) { + Zc(n, t.start(), t.soffset(), t.finish(), t.foffset()); + }, + setRelativeSelection: function(t, e) { + tl(n, t, e); + }, + selectContents: function(t) { + rl(n, t); + }, + getInnerHeight: function() { + return n.innerHeight; + }, + getScrollY: function() { + return Cl(en.fromDom(n.document)).top(); + }, + scrollBy: function(t, e) { + Sl(t, e, en.fromDom(n.document)); + } + }; + }, + Tl = function(n, t, e, r, o) { + if (!ot.eq(e, r)) + return lr(e, r, t).bind(function(t) { + var r = t.boxes().getOr([]); + return r.length > 0 + ? (o(n, r, t.start(), t.finish()), + w.some(gl.response(w.some(yl(e, 0, e, Ce(e))), !0))) + : w.none(); + }); + }, + Dl = { + sync: function(n, t, e, r, o, i, u) { + return ot.eq(e, o) && r === i + ? w.none() + : qt.closest(e, "td,th", t).bind(function(e) { + return qt.closest(o, "td,th", t).bind(function(r) { + return Tl(n, t, e, r, u); + }); + }); + }, + detect: Tl, + update: function(n, t, e, r, o) { + return fr( + r, + n, + t, + o.firstSelectedSelector(), + o.lastSelectedSelector() + ).map(function(n) { + return ( + o.clear(e), + o.selectRange(e, n.boxes(), n.start(), n.finish()), + n.boxes() + ); + }); + } + }, + Al = X.immutableBag(["left", "top", "right", "bottom"], []), + kl = { + nu: Al, + moveUp: function(n, t) { + return Al({ + left: n.left(), + top: n.top() - t, + right: n.right(), + bottom: n.bottom() - t + }); + }, + moveDown: function(n, t) { + return Al({ + left: n.left(), + top: n.top() + t, + right: n.right(), + bottom: n.bottom() + t + }); + }, + moveBottomTo: function(n, t) { + var e = n.bottom() - n.top(); + return Al({ left: n.left(), top: t - e, right: n.right(), bottom: t }); + }, + moveTopTo: function(n, t) { + var e = n.bottom() - n.top(); + return Al({ left: n.left(), top: t, right: n.right(), bottom: t + e }); + }, + getTop: function(n) { + return n.top(); + }, + getBottom: function(n) { + return n.bottom(); + }, + translate: function(n, t, e) { + return Al({ + left: n.left() + t, + top: n.top() + e, + right: n.right() + t, + bottom: n.bottom() + e + }); + }, + toString: function(n) { + return ( + "(" + + n.left() + + ", " + + n.top() + + ") -> (" + + n.right() + + ", " + + n.bottom() + + ")" + ); + } + }, + Nl = function(n) { + return kl.nu({ + left: n.left, + top: n.top, + right: n.right, + bottom: n.bottom + }); + }, + Ol = function(n, t) { + return w.some(n.getRect(t)); + }, + El = function(n, t, e) { + return xt.isElement(t) + ? Ol(n, t).map(Nl) + : xt.isText(t) + ? ((r = n), + (o = t), + (i = e), + i >= 0 && i < Ce(o) + ? r.getRangedRect(o, i, o, i + 1) + : i > 0 + ? r.getRangedRect(o, i - 1, o, i) + : w.none()).map(Nl) + : w.none(); + var r, o, i; + }, + Bl = function(n, t) { + return xt.isElement(t) + ? Ol(n, t).map(Nl) + : xt.isText(t) + ? n.getRangedRect(t, 0, t, Ce(t)).map(Nl) + : w.none(); + }, + Il = X.immutable("item", "mode"), + Pl = function(n, t, e, r) { + var o = r !== undefined ? r : Wl; + return n + .property() + .parent(t) + .map(function(n) { + return Il(n, o); + }); + }, + Wl = function(n, t, e, r) { + var o = r !== undefined ? r : _l; + return e.sibling(n, t).map(function(n) { + return Il(n, o); + }); + }, + _l = function(n, t, e, r) { + var o = r !== undefined ? r : _l, + i = n.property().children(t); + return e.first(i).map(function(n) { + return Il(n, o); + }); + }, + Ml = [ + { current: Pl, next: Wl, fallback: w.none() }, + { current: Wl, next: _l, fallback: w.some(Pl) }, + { current: _l, next: _l, fallback: w.some(Wl) } + ], + Ll = function(n, t, e, r, o) { + return ( + (o = o !== undefined ? o : Ml), + B.find(o, function(n) { + return n.current === e; + }).bind(function(e) { + return e.current(n, t, r, e.next).orThunk(function() { + return e.fallback.bind(function(e) { + return Ll(n, t, e, r); + }); + }); + }) + ); + }, + ql = { backtrack: Pl, sidestep: Wl, advance: _l, go: Ll }, + zl = { + left: function() { + return { + sibling: function(n, t) { + return n.query().prevSibling(t); + }, + first: function(n) { + return n.length > 0 ? w.some(n[n.length - 1]) : w.none(); + } + }; + }, + right: function() { + return { + sibling: function(n, t) { + return n.query().nextSibling(t); + }, + first: function(n) { + return n.length > 0 ? w.some(n[0]) : w.none(); + } + }; + } + }, + Fl = function(n, t, e, r, o, i) { + return ql.go(n, t, r, o).bind(function(t) { + return i(t.item()) + ? w.none() + : e(t.item()) + ? w.some(t.item()) + : Fl(n, t.item(), e, t.mode(), o, i); + }); + }, + jl = function(n, t, e, r) { + return Fl(n, t, e, ql.sidestep, zl.left(), r); + }, + Hl = function(n, t, e, r) { + return Fl(n, t, e, ql.sidestep, zl.right(), r); + }, + Vl = function(n, t) { + return 0 === n.property().children(t).length; + }, + Ul = function(n, t, e, r) { + return jl(n, t, e, r); + }, + Gl = function(n, t, e, r) { + return Hl(n, t, e, r); + }, + Xl = { + before: function(n, t, e) { + return Ul(n, t, m.curry(Vl, n), e); + }, + after: function(n, t, e) { + return Gl(n, t, m.curry(Vl, n), e); + }, + seekLeft: Ul, + seekRight: Gl, + walkers: function() { + return { left: zl.left, right: zl.right }; + }, + walk: function(n, t, e, r, o) { + return ql.go(n, t, e, r, o); + }, + backtrack: ql.backtrack, + sidestep: ql.sidestep, + advance: ql.advance + }, + Yl = Pe(), + $l = { + gather: function(n, t, e) { + return Xl.gather(Yl, n, t, e); + }, + before: function(n, t) { + return Xl.before(Yl, n, t); + }, + after: function(n, t) { + return Xl.after(Yl, n, t); + }, + seekLeft: function(n, t, e) { + return Xl.seekLeft(Yl, n, t, e); + }, + seekRight: function(n, t, e) { + return Xl.seekRight(Yl, n, t, e); + }, + walkers: function() { + return Xl.walkers(); + }, + walk: function(n, t, e, r) { + return Xl.walk(Yl, n, t, e, r); + } + }, + Kl = wr([{ none: [] }, { retry: ["caret"] }]), + Jl = function(n, t, e) { + return Mt.closest(t, zo).fold(m.constant(!1), function(t) { + return Bl(n, t).exists(function(n) { + return ( + (r = n), + (t = e).left() < r.left() || + Math.abs(r.right() - t.left()) < 1 || + t.left() > r.right() + ); + var t, r; + }); + }); + }, + Ql = { + point: kl.getTop, + adjuster: function(n, t, e, r, o) { + var i = kl.moveUp(o, 5); + return Math.abs(e.top() - r.top()) < 1 + ? Kl.retry(i) + : e.bottom() < o.top() + ? Kl.retry(i) + : e.bottom() === o.top() + ? Kl.retry(kl.moveUp(o, 1)) + : Jl(n, t, o) + ? Kl.retry(kl.translate(i, 5, 0)) + : Kl.none(); + }, + move: kl.moveUp, + gather: $l.before + }, + Zl = { + point: kl.getBottom, + adjuster: function(n, t, e, r, o) { + var i = kl.moveDown(o, 5); + return Math.abs(e.bottom() - r.bottom()) < 1 + ? Kl.retry(i) + : e.top() > o.bottom() + ? Kl.retry(i) + : e.top() === o.bottom() + ? Kl.retry(kl.moveDown(o, 1)) + : Jl(n, t, o) + ? Kl.retry(kl.translate(i, 5, 0)) + : Kl.none(); + }, + move: kl.moveDown, + gather: $l.after + }, + ns = function(n, t, e, r, o) { + return 0 === o + ? w.some(r) + : ((c = n), + (l = r.left()), + (s = t.point(r)), + c + .elementFromPoint(l, s) + .filter(function(n) { + return "table" === xt.name(n); + }) + .isSome() + ? ((u = r), (a = o - 1), ns(n, (i = t), e, i.move(u, 5), a)) + : n.situsFromPoint(r.left(), t.point(r)).bind(function(i) { + return i.start().fold( + w.none, + function(i, u) { + return Bl(n, i, u) + .bind(function(u) { + return t + .adjuster(n, i, u, e, r) + .fold(w.none, function(r) { + return ns(n, t, e, r, o - 1); + }); + }) + .orThunk(function() { + return w.some(r); + }); + }, + w.none + ); + })); + var i, u, a, c, l, s; + }, + ts = function(n, t, e) { + var r, + o, + i, + u = n.move(e, 5), + a = ns(t, n, e, u, 100).getOr(u); + return ((r = n), + (o = a), + (i = t), + r.point(o) > i.getInnerHeight() + ? w.some(r.point(o) - i.getInnerHeight()) + : r.point(o) < 0 + ? w.some(-r.point(o)) + : w.none()).fold( + function() { + return t.situsFromPoint(a.left(), n.point(a)); + }, + function(e) { + return t.scrollBy(0, e), t.situsFromPoint(a.left(), n.point(a) - e); + } + ); + }, + es = { + tryUp: m.curry(ts, Ql), + tryDown: m.curry(ts, Zl), + ieTryUp: function(n, t) { + return n.situsFromPoint(t.left(), t.top() - 5); + }, + ieTryDown: function(n, t) { + return n.situsFromPoint(t.left(), t.bottom() + 5); + }, + getJumpSize: m.constant(5) + }, + rs = wr([ + { none: ["message"] }, + { success: [] }, + { failedUp: ["cell"] }, + { failedDown: ["cell"] } + ]), + os = function(n) { + return qt.closest(n, "tr"); + }, + is = { + verify: function(n, t, e, r, o, i, u) { + return qt + .closest(r, "td,th", u) + .bind(function(e) { + return qt.closest(t, "td,th", u).map(function(t) { + return ot.eq(e, t) + ? ot.eq(r, e) && Ce(e) === o + ? i(t) + : rs.none("in same cell") + : Ve(os, [e, t]).fold( + function() { + return ( + (o = t), + (u = e), + (a = (r = n).getRect(o)), + (c = r.getRect(u)).right > a.left && c.left < a.right + ? rs.success() + : i(t) + ); + var r, o, u, a, c; + }, + function(n) { + return i(t); + } + ); + }); + }) + .getOr(rs.none("default")); + }, + cata: function(n, t, e, r, o) { + return n.fold(t, e, r, o); + }, + adt: rs + }, + us = { + point: X.immutable("element", "offset"), + delta: X.immutable("element", "deltaOffset"), + range: X.immutable("element", "start", "finish"), + points: X.immutable("begin", "end"), + text: X.immutable("element", "text") + }, + as = (X.immutable("ancestor", "descendants", "element", "index"), + X.immutable("parent", "children", "element", "index")), + cs = function(n, t) { + return B.findIndex(n, m.curry(ot.eq, t)); + }, + ls = function(n) { + return dt.parent(n).bind(function(t) { + var e = dt.children(t); + return cs(e, n).map(function(r) { + return as(t, e, n, r); + }); + }); + }, + ss = function(n) { + return "br" === xt.name(n); + }, + fs = function(n, t, e) { + return t(n, e).bind(function(n) { + return xt.isText(n) && 0 === we.get(n).trim().length + ? fs(n, t, e) + : w.some(n); + }); + }, + ds = function(n, t, e, r) { + return ((o = t), + (i = e), + dt + .child(o, i) + .filter(ss) + .orThunk(function() { + return dt.child(o, i - 1).filter(ss); + })).bind(function(t) { + return r.traverse(t).fold( + function() { + return fs(t, r.gather, n).map(r.relative); + }, + function(n) { + return ls(n).map(function(n) { + return gc.on(n.parent(), n.index()); + }); + } + ); + }); + var o, i; + }, + ms = function(n, t, e, r) { + var o, i, u; + return (ss(t) + ? ((o = n), + (i = t), + (u = r) + .traverse(i) + .orThunk(function() { + return fs(i, u.gather, o); + }) + .map(u.relative)) + : ds(n, t, e, r) + ).map(function(n) { + return { start: m.constant(n), finish: m.constant(n) }; + }); + }, + gs = function(n) { + return is.cata( + n, + function(n) { + return w.none("BR ADT: none"); + }, + function() { + return w.none(); + }, + function(n) { + return w.some(us.point(n, 0)); + }, + function(n) { + return w.some(us.point(n, Ce(n))); + } + ); + }, + ps = tt.detect(), + hs = function(n, t, e, r, o, i) { + return 0 === i + ? w.none() + : ws(n, t, e, r, o).bind(function(u) { + var a = n.fromSitus(u), + c = is.verify(n, e, r, a.finish(), a.foffset(), o.failure, t); + return is.cata( + c, + function() { + return w.none(); + }, + function() { + return w.some(u); + }, + function(u) { + return ot.eq(e, u) && 0 === r + ? vs(n, e, r, kl.moveUp, o) + : hs(n, t, u, 0, o, i - 1); + }, + function(u) { + return ot.eq(e, u) && r === Ce(u) + ? vs(n, e, r, kl.moveDown, o) + : hs(n, t, u, Ce(u), o, i - 1); + } + ); + }); + }, + vs = function(n, t, e, r, o) { + return El(n, t, e).bind(function(t) { + return bs(n, o, r(t, es.getJumpSize())); + }); + }, + bs = function(n, t, e) { + return ps.browser.isChrome() || + ps.browser.isSafari() || + ps.browser.isFirefox() || + ps.browser.isEdge() + ? t.otherRetry(n, e) + : ps.browser.isIE() + ? t.ieRetry(n, e) + : w.none(); + }, + ws = function(n, t, e, r, o) { + return El(n, e, r).bind(function(t) { + return bs(n, o, t); + }); + }, + ys = function(n, t, e) { + return ((r = n), + (o = t), + (i = e), + r.getSelection().bind(function(n) { + return ms(o, n.finish(), n.foffset(), i).fold( + function() { + return w.some(us.point(n.finish(), n.foffset())); + }, + function(t) { + var e = r.fromSitus(t), + u = is.verify( + r, + n.finish(), + n.foffset(), + e.finish(), + e.foffset(), + i.failure, + o + ); + return gs(u); + } + ); + })).bind(function(r) { + return hs(n, t, r.element(), r.offset(), e, 20).map(n.fromSitus); + }); + var r, o, i; + }, + xs = function(n, t, e) { + return Mt.ancestor(n, t, e).isSome(); + }, + Cs = tt.detect(), + Ss = function(n, t, e, r, o) { + return qt.closest(r, "td,th", t).bind(function(r) { + return qt.closest(r, "table", t).bind(function(i) { + return ( + (u = i), + xs(o, function(n) { + return dt.parent(n).exists(function(n) { + return ot.eq(n, u); + }); + }) + ? ys(n, t, e).bind(function(n) { + return qt.closest(n.finish(), "td,th", t).map(function(t) { + return { + start: m.constant(r), + finish: m.constant(t), + range: m.constant(n) + }; + }); + }) + : w.none() + ); + var u; + }); + }); + }, + Rs = function(n, t, e, r, o, i) { + return Cs.browser.isIE() + ? w.none() + : i(r, t).orThunk(function() { + return Ss(n, t, e, r, o).map(function(n) { + var t = n.range(); + return gl.response( + w.some(yl(t.start(), t.soffset(), t.finish(), t.foffset())), + !0 + ); + }); + }); + }, + Ts = function(n, t, e, r, o, i, u) { + return Ss(n, e, r, o, i).bind(function(n) { + return Dl.detect(t, e, n.start(), n.finish(), u); + }); + }, + Ds = function(n, t) { + return qt.closest(n, "tr", t).bind(function(n) { + return qt.closest(n, "table", t).bind(function(e) { + var r = Bt.descendants(e, "tr"); + return ot.eq(n, r[0]) + ? $l + .seekLeft( + e, + function(n) { + return Te.last(n).isSome(); + }, + t + ) + .map(function(n) { + var t = Ce(n); + return gl.response(w.some(yl(n, t, n, t)), !0); + }) + : w.none(); + }); + }); + }, + As = function(n, t) { + return qt.closest(n, "tr", t).bind(function(n) { + return qt.closest(n, "table", t).bind(function(e) { + var r = Bt.descendants(e, "tr"); + return ot.eq(n, r[r.length - 1]) + ? $l + .seekRight( + e, + function(n) { + return Te.first(n).isSome(); + }, + t + ) + .map(function(n) { + return gl.response(w.some(yl(n, 0, n, 0)), !0); + }) + : w.none(); + }); + }); + }, + ks = function(n, t) { + return qt.closest(n, "td,th", t); + }, + Ns = { + down: { + traverse: dt.nextSibling, + gather: $l.after, + relative: gc.before, + otherRetry: es.tryDown, + ieRetry: es.ieTryDown, + failure: is.adt.failedDown + }, + up: { + traverse: dt.prevSibling, + gather: $l.before, + relative: gc.before, + otherRetry: es.tryUp, + ieRetry: es.ieTryUp, + failure: is.adt.failedUp + } + }, + Os = X.immutable("rows", "cols"), + Es = function(n, t, e, r) { + var o, + i, + u, + a, + c, + l, + s = Rl(n), + f = ((o = s), + (i = t), + (u = e), + (a = r), + (c = w.none()), + (l = function() { + c = w.none(); + }), + { + mousedown: function(n) { + a.clear(i), (c = ks(n.target(), u)); + }, + mouseover: function(n) { + c.each(function(t) { + a.clear(i), + ks(n.target(), u).each(function(n) { + lr(t, n, u).each(function(e) { + var r = e.boxes().getOr([]); + (r.length > 1 || (1 === r.length && !ot.eq(t, n))) && + (a.selectRange(i, r, e.start(), e.finish()), + o.selectContents(n)); + }); + }); + }); + }, + mouseup: function() { + c.each(l); + } + }); + return { + mousedown: f.mousedown, + mouseover: f.mouseover, + mouseup: f.mouseup + }; + }, + Bs = function(n, t, e, r) { + var o = Rl(n), + i = function() { + return r.clear(t), w.none(); + }; + return { + keydown: function(n, u, a, c, l, s) { + var f = n.raw().which, + d = !0 === n.raw().shiftKey; + return sr(t, r.selectedSelector()).fold( + function() { + return bl.isDown(f) && d + ? m.curry(Ts, o, t, e, Ns.down, c, u, r.selectRange) + : bl.isUp(f) && d + ? m.curry(Ts, o, t, e, Ns.up, c, u, r.selectRange) + : bl.isDown(f) + ? m.curry(Rs, o, e, Ns.down, c, u, As) + : bl.isUp(f) + ? m.curry(Rs, o, e, Ns.up, c, u, Ds) + : w.none; + }, + function(n) { + var e = function(e) { + return function() { + return $o(e, function(e) { + return Dl.update(e.rows(), e.cols(), t, n, r); + }).fold( + function() { + return dr( + t, + r.firstSelectedSelector(), + r.lastSelectedSelector() + ).map(function(n) { + var e = + bl.isDown(f) || s.isForward(f) ? gc.after : gc.before; + return ( + o.setRelativeSelection( + gc.on(n.first(), 0), + e(n.table()) + ), + r.clear(t), + gl.response(w.none(), !0) + ); + }); + }, + function(n) { + return w.some(gl.response(w.none(), !0)); + } + ); + }; + }; + return bl.isDown(f) && d + ? e([Os(1, 0)]) + : bl.isUp(f) && d + ? e([Os(-1, 0)]) + : s.isBackward(f) && d + ? e([Os(0, -1), Os(-1, 0)]) + : s.isForward(f) && d + ? e([Os(0, 1), Os(1, 0)]) + : bl.isNavigation(f) && !1 === d + ? i + : w.none; + } + )(); + }, + keyup: function(n, o, i, u, a) { + return sr(t, r.selectedSelector()).fold(function() { + var c = n.raw().which; + return 0 == (!0 === n.raw().shiftKey) + ? w.none() + : bl.isNavigation(c) + ? Dl.sync(t, e, o, i, u, a, r.selectRange) + : w.none(); + }, w.none); + } + }; + }, + Is = function(n) { + var t = function(t) { + Dt.remove(t, n.selected()), + Dt.remove(t, n.firstSelected()), + Dt.remove(t, n.lastSelected()); + }, + e = function(t) { + Dt.set(t, n.selected(), "1"); + }, + r = function(e) { + var r = Bt.descendants(e, n.selectedSelector()); + B.each(r, t); + }; + return { + clear: r, + selectRange: function(t, o, i, u) { + r(t), + B.each(o, e), + Dt.set(i, n.firstSelected(), "1"), + Dt.set(u, n.lastSelected(), "1"); + }, + selectedSelector: n.selectedSelector, + firstSelectedSelector: n.firstSelectedSelector, + lastSelectedSelector: n.lastSelectedSelector + }; + }, + Ps = function(n, t) { + var e = X.immutableBag( + ["mousedown", "mouseover", "mouseup", "keyup", "keydown"], + [] + ), + r = w.none(), + o = Is(br); + return ( + n.on("init", function(i) { + var u = n.getWin(), + a = sa.getBody(n), + c = sa.getIsRoot(n), + l = Es(u, a, c, o), + s = Bs(u, a, c, o), + f = function(t, e) { + e.kill() && t.kill(), + e.selection().each(function(t) { + var e = vc.relative(t.start(), t.finish()), + r = kc(u, e); + n.selection.setRng(r); + }); + }, + d = function(t) { + var e = h(t); + if (e.raw().shiftKey && bl.isNavigation(e.raw().which)) { + var r = n.selection.getRng(), + o = en.fromDom(r.startContainer), + i = en.fromDom(r.endContainer); + s.keyup(e, o, r.startOffset, i, r.endOffset).each(function(n) { + f(e, n); + }); + } + }, + g = function(n) { + return !( + Dt.has(n, "data-mce-bogus") || + "br" === xt.name(n) || + (xt.isText(n) && 0 === we.get(n).length) + ); + }, + p = function(e) { + var r, + o, + i = h(e); + t().each(function(n) { + n.hideBars(); + }), + 40 === e.which && + ((r = en.fromDom(n.getBody())), + (o = function(n) { + return dt.prevSibling(n).bind(function(n) { + return g(n) ? w.some(n) : o(n); + }); + }), + dt.lastChild(r).bind(function(n) { + return g(n) ? w.some(n) : o(n); + })).each(function(t) { + "table" === xt.name(t) && + (n.settings.forced_root_block + ? n.dom.add( + n.getBody(), + n.settings.forced_root_block, + n.settings.forced_root_block_attrs, + "
    " + ) + : n.dom.add(n.getBody(), "br")); + }); + var u = n.selection.getRng(), + a = en.fromDom(n.selection.getStart()), + c = en.fromDom(u.startContainer), + l = en.fromDom(u.endContainer), + d = pa(a).isRtl() ? bl.rtl : bl.ltr; + s + .keydown(i, c, u.startOffset, l, u.endOffset, d) + .each(function(n) { + f(i, n); + }), + t().each(function(n) { + n.showBars(); + }); + }, + h = function(n) { + var t = en.fromDom(n.target), + e = function() { + n.stopPropagation(); + }, + r = function() { + n.preventDefault(); + }, + o = m.compose( + r, + e + ); + return { + target: m.constant(t), + x: m.constant(n.x), + y: m.constant(n.y), + stop: e, + prevent: r, + kill: o, + raw: m.constant(n) + }; + }, + v = function(n) { + return 0 === n.button; + }, + b = function(n) { + v(n) && l.mousedown(h(n)); + }, + y = function(n) { + var t; + ((t = n).buttons === undefined || 0 != (1 & t.buttons)) && + l.mouseover(h(n)); + }, + x = function(n) { + v && l.mouseup(h(n)); + }; + n.on("mousedown", b), + n.on("mouseover", y), + n.on("mouseup", x), + n.on("keyup", d), + n.on("keydown", p), + n.on("nodechange", function() { + var t = n.selection, + e = en.fromDom(t.getStart()), + r = en.fromDom(t.getEnd()), + i = Vt(e), + u = Vt(r); + i.bind(function(n) { + return u.bind(function(t) { + return ot.eq(n, t) ? w.some(!0) : w.none(); + }); + }).fold(function() { + o.clear(a); + }, m.noop); + }), + (r = w.some( + e({ + mousedown: b, + mouseover: y, + mouseup: x, + keyup: d, + keydown: p + }) + )); + }), + { + clear: o.clear, + destroy: function() { + r.each(function(n) {}); + } + } + ); + }, + Ws = function(n) { + return { + get: function() { + var t = sa.getBody(n); + return mr(t, br.selectedSelector()).fold( + function() { + return n.selection.getStart() === undefined + ? xr.none() + : xr.single(n.selection); + }, + function(n) { + return xr.multiple(n); + } + ); + } + }; + }, + _s = ba.each, + Ms = { + addButtons: function(n) { + var t = []; + function e(t) { + return function() { + n.execCommand(t); + }; + } + _s( + "inserttable tableprops deletetable | cell row column".split(" "), + function(e) { + "|" === e ? t.push({ text: "-" }) : t.push(n.menuItems[e]); + } + ), + n.addButton("table", { type: "menubutton", title: "Table", menu: t }), + n.addButton("tableprops", { + title: "Table properties", + onclick: m.curry(Ta, n, !0), + icon: "table" + }), + n.addButton("tabledelete", { + title: "Delete table", + onclick: e("mceTableDelete") + }), + n.addButton("tablecellprops", { + title: "Cell properties", + onclick: e("mceTableCellProps") + }), + n.addButton("tablemergecells", { + title: "Merge cells", + onclick: e("mceTableMergeCells") + }), + n.addButton("tablesplitcells", { + title: "Split cell", + onclick: e("mceTableSplitCells") + }), + n.addButton("tableinsertrowbefore", { + title: "Insert row before", + onclick: e("mceTableInsertRowBefore") + }), + n.addButton("tableinsertrowafter", { + title: "Insert row after", + onclick: e("mceTableInsertRowAfter") + }), + n.addButton("tabledeleterow", { + title: "Delete row", + onclick: e("mceTableDeleteRow") + }), + n.addButton("tablerowprops", { + title: "Row properties", + onclick: e("mceTableRowProps") + }), + n.addButton("tablecutrow", { + title: "Cut row", + onclick: e("mceTableCutRow") + }), + n.addButton("tablecopyrow", { + title: "Copy row", + onclick: e("mceTableCopyRow") + }), + n.addButton("tablepasterowbefore", { + title: "Paste row before", + onclick: e("mceTablePasteRowBefore") + }), + n.addButton("tablepasterowafter", { + title: "Paste row after", + onclick: e("mceTablePasteRowAfter") + }), + n.addButton("tableinsertcolbefore", { + title: "Insert column before", + onclick: e("mceTableInsertColBefore") + }), + n.addButton("tableinsertcolafter", { + title: "Insert column after", + onclick: e("mceTableInsertColAfter") + }), + n.addButton("tabledeletecol", { + title: "Delete column", + onclick: e("mceTableDeleteCol") + }); + }, + addToolbars: function(n) { + var t = n.settings.table_toolbar; + "" !== t && + !1 !== t && + (t || + (t = + "tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"), + n.addContextToolbar(function(t) { + return n.dom.is(t, "table") && n.getBody().contains(t); + }, t)); + } + }, + Ls = { + addMenuItems: function(n, t) { + var e = w.none(), + r = [], + o = [], + i = [], + u = [], + a = function(n) { + n.disabled(!0); + }, + c = function(n) { + n.disabled(!1); + }, + l = function() { + var n = this; + r.push(n), + e.fold( + function() { + a(n); + }, + function(t) { + c(n); + } + ); + }, + s = function() { + var n = this; + o.push(n), + e.fold( + function() { + a(n); + }, + function(t) { + c(n); + } + ); + }; + n.on("init", function() { + n.on("nodechange", function(l) { + var s = w.from(n.dom.getParent(n.selection.getStart(), "th,td")); + (e = s.bind(function(n) { + var e = en.fromDom(n); + return Vt(e).map(function(n) { + return kr.forMenu(t, n, e); + }); + })).fold( + function() { + B.each(r, a), B.each(o, a), B.each(i, a), B.each(u, a); + }, + function(n) { + B.each(r, c), + B.each(o, c), + B.each(i, function(t) { + t.disabled(n.mergable().isNone()); + }), + B.each(u, function(t) { + t.disabled(n.unmergable().isNone()); + }); + } + ); + }); + }); + var f = function(n, t, e, r) { + var o, + i, + u, + a, + c, + l = r.getEl().getElementsByTagName("table")[0], + s = r.isRtl() || "tl-tr" === r.parent().rel; + for ( + l.nextSibling.innerHTML = t + 1 + " x " + (e + 1), + s && (t = 9 - t), + i = 0; + i < 10; + i++ + ) + for (o = 0; o < 10; o++) + (a = l.rows[i].childNodes[o].firstChild), + (c = (s ? o >= t : o <= t) && i <= e), + n.dom.toggleClass(a, "mce-active", c), + c && (u = a); + return u.parentNode; + }, + d = + !1 === n.settings.table_grid + ? { + text: "Table", + icon: "table", + context: "table", + onclick: m.curry(Ta, n) + } + : { + text: "Table", + icon: "table", + context: "table", + ariaHideMenu: !0, + onclick: function(t) { + t.aria && + (this.parent().hideAll(), + t.stopImmediatePropagation(), + Ta(n)); + }, + onshow: function() { + f(n, 0, 0, this.menu.items()[0]); + }, + onhide: function() { + var t = this.menu + .items()[0] + .getEl() + .getElementsByTagName("a"); + n.dom.removeClass(t, "mce-active"), + n.dom.addClass(t[0], "mce-active"); + }, + menu: [ + { + type: "container", + html: (function() { + var n = ""; + n = + ''; + for (var t = 0; t < 10; t++) { + n += ""; + for (var e = 0; e < 10; e++) + n += + ''; + n += ""; + } + return ( + (n += "
    "), + (n += + '') + ); + })(), + onPostRender: function() { + this.lastX = this.lastY = 0; + }, + onmousemove: function(t) { + var e, + r, + o = t.target; + "A" === o.tagName.toUpperCase() && + ((e = parseInt(o.getAttribute("data-mce-x"), 10)), + (r = parseInt(o.getAttribute("data-mce-y"), 10)), + (this.isRtl() || "tl-tr" === this.parent().rel) && + (e = 9 - e), + (e === this.lastX && r === this.lastY) || + (f(n, e, r, t.control), + (this.lastX = e), + (this.lastY = r))); + }, + onclick: function(t) { + var e = this; + "A" === t.target.tagName.toUpperCase() && + (t.preventDefault(), + t.stopPropagation(), + e.parent().cancel(), + n.undoManager.transact(function() { + Pr.insert(n, e.lastX + 1, e.lastY + 1); + }), + n.addVisual()); + } + } + ] + }; + function g(t) { + return function() { + n.execCommand(t); + }; + } + var p = { + text: "Table properties", + context: "table", + onPostRender: l, + onclick: m.curry(Ta, n, !0) + }, + h = { + text: "Delete table", + context: "table", + onPostRender: l, + cmd: "mceTableDelete" + }, + v = { + text: "Row", + context: "table", + menu: [ + { + text: "Insert row before", + onclick: g("mceTableInsertRowBefore"), + onPostRender: s + }, + { + text: "Insert row after", + onclick: g("mceTableInsertRowAfter"), + onPostRender: s + }, + { + text: "Delete row", + onclick: g("mceTableDeleteRow"), + onPostRender: s + }, + { + text: "Row properties", + onclick: g("mceTableRowProps"), + onPostRender: s + }, + { text: "-" }, + { + text: "Cut row", + onclick: g("mceTableCutRow"), + onPostRender: s + }, + { + text: "Copy row", + onclick: g("mceTableCopyRow"), + onPostRender: s + }, + { + text: "Paste row before", + onclick: g("mceTablePasteRowBefore"), + onPostRender: s + }, + { + text: "Paste row after", + onclick: g("mceTablePasteRowAfter"), + onPostRender: s + } + ] + }, + b = { + text: "Column", + context: "table", + menu: [ + { + text: "Insert column before", + onclick: g("mceTableInsertColBefore"), + onPostRender: s + }, + { + text: "Insert column after", + onclick: g("mceTableInsertColAfter"), + onPostRender: s + }, + { + text: "Delete column", + onclick: g("mceTableDeleteCol"), + onPostRender: s + } + ] + }, + y = { + separator: "before", + text: "Cell", + context: "table", + menu: [ + { + text: "Cell properties", + onclick: g("mceTableCellProps"), + onPostRender: s + }, + { + text: "Merge cells", + onclick: g("mceTableMergeCells"), + onPostRender: function() { + var n = this; + i.push(n), + e.fold( + function() { + a(n); + }, + function(t) { + n.disabled(t.mergable().isNone()); + } + ); + } + }, + { + text: "Split cell", + onclick: g("mceTableSplitCells"), + onPostRender: function() { + var n = this; + u.push(n), + e.fold( + function() { + a(n); + }, + function(t) { + n.disabled(t.unmergable().isNone()); + } + ); + } + } + ] + }; + n.addMenuItem("inserttable", d), + n.addMenuItem("tableprops", p), + n.addMenuItem("deletetable", h), + n.addMenuItem("row", v), + n.addMenuItem("column", b), + n.addMenuItem("cell", y); + } + }; + f.add("table", function(n) { + var t = oc(n), + e = Ps(n, t.lazyResize), + r = ha(n, t.lazyWire), + o = Ws(n); + Ia.registerCommands(n, r, e, o), + Nr.registerEvents(n, o, r, e), + Ls.addMenuItems(n, o), + Ms.addButtons(n), + Ms.addToolbars(n), + n.on("PreInit", function() { + n.serializer.addTempAttr(br.firstSelected()), + n.serializer.addTempAttr(br.lastSelected()); + }), + !1 !== n.settings.table_tab_navigation && + n.on("keydown", function(e) { + ml.handle(e, n, r, t.lazyWire); + }), + n.on("remove", function() { + t.destroy(), e.destroy(); + }), + (this.insertTable = function(t, e) { + return Pr.insert(n, t, e); + }), + (this.setClipboardRows = Ia.setClipboardRows), + (this.getClipboardRows = Ia.getClipboardRows); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + n = tinymce.util.Tools.resolve("tinymce.EditorManager"), + i = tinymce.util.Tools.resolve("tinymce.Env"), + o = tinymce.util.Tools.resolve("tinymce.util.Delay"), + l = tinymce.util.Tools.resolve("tinymce.util.Tools"), + u = tinymce.util.Tools.resolve("tinymce.util.VK"), + r = { + getTabFocus: function(e) { + return e.getParam( + "tab_focus", + e.getParam("tabfocus_elements", ":prev,:next") + ); + } + }, + c = t.DOM, + s = function(e) { + e.keyCode !== u.TAB || + e.ctrlKey || + e.altKey || + e.metaKey || + e.preventDefault(); + }, + a = function(e) { + function t(t) { + var s, a, y, f; + if ( + !( + t.keyCode !== u.TAB || + t.ctrlKey || + t.altKey || + t.metaKey || + t.isDefaultPrevented() + ) && + (1 === (y = l.explode(r.getTabFocus(e))).length && + ((y[1] = y[0]), (y[0] = ":prev")), + (a = t.shiftKey + ? ":prev" === y[0] + ? m(-1) + : c.get(y[0]) + : ":next" === y[1] + ? m(1) + : c.get(y[1]))) + ) { + var d = n.get(a.id || a.name); + a.id && d + ? d.focus() + : o.setTimeout(function() { + i.webkit || window.focus(), a.focus(); + }, 10), + t.preventDefault(); + } + function m(i) { + function o(e) { + return ( + /INPUT|TEXTAREA|BUTTON/.test(e.tagName) && + n.get(t.id) && + -1 !== e.tabIndex && + (function i(e) { + return ( + "BODY" === e.nodeName || + ("hidden" !== e.type && + "none" !== e.style.display && + "hidden" !== e.style.visibility && + i(e.parentNode)) + ); + })(e) + ); + } + if ( + ((a = c.select(":input:enabled,*[tabindex]:not(iframe)")), + l.each(a, function(t, n) { + if (t.id === e.id) return (s = n), !1; + }), + i > 0) + ) { + for (f = s + 1; f < a.length; f++) if (o(a[f])) return a[f]; + } else for (f = s - 1; f >= 0; f--) if (o(a[f])) return a[f]; + return null; + } + } + e.on("init", function() { + e.inline && c.setAttrib(e.getBody(), "tabIndex", null), + e.on("keyup", s), + i.gecko ? e.on("keypress keydown", t) : e.on("keydown", t); + }); + }; + e.add("tabfocus", function(e) { + a(e); + }); +})(); +!(function() { + "use strict"; + var e = function(t) { + var n = t, + r = function() { + return n; + }; + return { + get: r, + set: function(e) { + n = e; + }, + clone: function() { + return e(r()); + } + }; + }, + t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = function(e) { + return !( + !/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins) || + !t.get("tinymcespellchecker") || + ("undefined" != typeof window.console && + window.console.log && + window.console.log( + "Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option." + ), + 0) + ); + }, + r = function(e) { + return e.getParam( + "spellchecker_languages", + "English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv" + ); + }, + o = function(e) { + var t = e.getParam("language", "en"); + return e.getParam("spellchecker_language", t); + }, + i = function(e) { + return e.getParam("spellchecker_rpc_url"); + }, + c = function(e) { + return e.getParam("spellchecker_callback"); + }, + a = function(e) { + var t = new RegExp( + '[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+', + "g" + ); + return e.getParam("spellchecker_wordchar_pattern", t); + }, + l = tinymce.util.Tools.resolve("tinymce.util.Tools"), + s = tinymce.util.Tools.resolve("tinymce.util.URI"), + u = tinymce.util.Tools.resolve("tinymce.util.XHR"), + d = function(e) { + return e.fire("SpellcheckStart"); + }, + f = function(e) { + return e.fire("SpellcheckEnd"); + }; + function h(e) { + return e && 1 === e.nodeType && "false" === e.contentEditable; + } + var g, + m = function(e, t) { + var n, + r, + o, + i, + c, + a = [], + l = t.dom; + function s(e, t) { + if (!e[0]) + throw new Error( + "findAndReplaceDOMText cannot handle zero-length matches" + ); + return { + start: e.index, + end: e.index + e[0].length, + text: e[0], + data: t + }; + } + function u(t) { + var n = e.getElementsByTagName("*"), + r = []; + t = "number" == typeof t ? "" + t : null; + for (var o = 0; o < n.length; o++) { + var i = n[o], + c = i.getAttribute("data-mce-index"); + null !== c && + c.length && + -1 !== i.className.indexOf("mce-spellchecker-word") && + ((c !== t && null !== t) || r.push(i)); + } + return r; + } + function d(e) { + for (var t = a.length; t--; ) if (a[t] === e) return t; + return -1; + } + function f(e) { + for (var t = 0, n = a.length; t < n && !1 !== e(a[t], t); t++); + return this; + } + function g(e) { + var t, + n, + r = u(e ? d(e) : null); + for (t = r.length; t--; ) + (n = r[t]).parentNode.insertBefore(n.firstChild, n), + n.parentNode.removeChild(n); + return this; + } + function m(e) { + var n = u(d(e)), + r = t.dom.createRng(); + return r.setStartBefore(n[0]), r.setEndAfter(n[n.length - 1]), r; + } + return ( + (o = t.schema.getBlockElements()), + (i = t.schema.getWhiteSpaceElements()), + (c = t.schema.getShortEndedElements()), + { + text: (r = (function p(e) { + var t; + if (3 === e.nodeType) return e.data; + if (i[e.nodeName] && !o[e.nodeName]) return ""; + if (h(e)) return "\n"; + if ( + ((t = ""), + (o[e.nodeName] || c[e.nodeName]) && (t += "\n"), + (e = e.firstChild)) + ) + do { + t += p(e); + } while ((e = e.nextSibling)); + return t; + })(e)), + matches: a, + each: f, + filter: function(e) { + var t = []; + return ( + f(function(n, r) { + e(n, r) && t.push(n); + }), + (a = t), + this + ); + }, + reset: function() { + return a.splice(0, a.length), g(), this; + }, + matchFromElement: function(e) { + return a[e.getAttribute("data-mce-index")]; + }, + elementFromMatch: function(e) { + return u(d(e))[0]; + }, + find: function(e, t) { + if (r && e.global) for (; (n = e.exec(r)); ) a.push(s(n, t)); + return this; + }, + add: function(e, t, n) { + return ( + a.push({ start: e, end: e + t, text: r.substr(e, t), data: n }), + this + ); + }, + wrap: function(t) { + return ( + a.length && + (function(e, t, n) { + var r, + a, + l, + s, + u, + d = [], + f = 0, + g = e, + m = 0; + (t = t.slice(0)).sort(function(e, t) { + return e.start - t.start; + }), + (u = t.shift()); + e: for (;;) { + if ( + ((o[g.nodeName] || c[g.nodeName] || h(g)) && f++, + 3 === g.nodeType && + (!a && g.length + f >= u.end + ? ((a = g), (s = u.end - f)) + : r && d.push(g), + !r && + g.length + f > u.start && + ((r = g), (l = u.start - f)), + (f += g.length)), + r && a) + ) { + if ( + ((g = n({ + startNode: r, + startNodeIndex: l, + endNode: a, + endNodeIndex: s, + innerNodes: d, + match: u.text, + matchIndex: m + })), + (f -= a.length - s), + (r = null), + (a = null), + (d = []), + m++, + !(u = t.shift())) + ) + break; + } else if ( + (i[g.nodeName] && !o[g.nodeName]) || + !g.firstChild + ) { + if (g.nextSibling) { + g = g.nextSibling; + continue; + } + } else if (!h(g)) { + g = g.firstChild; + continue; + } + for (;;) { + if (g.nextSibling) { + g = g.nextSibling; + break; + } + if (g.parentNode === e) break e; + g = g.parentNode; + } + } + })( + e, + a, + (function(e) { + function t(t, n) { + var r = a[n]; + r.stencil || (r.stencil = e(r)); + var o = r.stencil.cloneNode(!1); + return ( + o.setAttribute("data-mce-index", n), + t && o.appendChild(l.doc.createTextNode(t)), + o + ); + } + return function(e) { + var n, + r, + o, + i = e.startNode, + c = e.endNode, + a = e.matchIndex, + s = l.doc; + if (i === c) { + var u = i; + (o = u.parentNode), + e.startNodeIndex > 0 && + ((n = s.createTextNode( + u.data.substring(0, e.startNodeIndex) + )), + o.insertBefore(n, u)); + var d = t(e.match, a); + return ( + o.insertBefore(d, u), + e.endNodeIndex < u.length && + ((r = s.createTextNode( + u.data.substring(e.endNodeIndex) + )), + o.insertBefore(r, u)), + u.parentNode.removeChild(u), + d + ); + } + (n = s.createTextNode( + i.data.substring(0, e.startNodeIndex) + )), + (r = s.createTextNode( + c.data.substring(e.endNodeIndex) + )); + for ( + var f = t(i.data.substring(e.startNodeIndex), a), + h = [], + g = 0, + m = e.innerNodes.length; + g < m; + ++g + ) { + var p = e.innerNodes[g], + v = t(p.data, a); + p.parentNode.replaceChild(v, p), h.push(v); + } + var x = t(c.data.substring(0, e.endNodeIndex), a); + return ( + (o = i.parentNode).insertBefore(n, i), + o.insertBefore(f, i), + o.removeChild(i), + (o = c.parentNode).insertBefore(x, c), + o.insertBefore(r, c), + o.removeChild(c), + x + ); + }; + })(t) + ), + this + ); + }, + unwrap: g, + replace: function(e, n) { + var r = m(e); + return ( + r.deleteContents(), + n.length > 0 && r.insertNode(t.dom.doc.createTextNode(n)), + r + ); + }, + rangeFromMatch: m, + indexOf: d + } + ); + }, + p = function(e, t) { + if (!t.get()) { + var n = m(e.getBody(), e); + t.set(n); + } + return t.get(); + }, + v = function(e, t, n, r, o, a, d) { + var f, + h, + g, + m = c(e); + ( + m || + ((f = e), + (h = t), + (g = n), + function(e, t, n, r) { + var o = { method: e, lang: g.get() }, + c = ""; + (o["addToDictionary" === e ? "word" : "text"] = t), + l.each(o, function(e, t) { + c && (c += "&"), (c += t + "=" + encodeURIComponent(e)); + }), + u.send({ + url: new s(h).toAbsolute(i(f)), + type: "post", + content_type: "application/x-www-form-urlencoded", + data: c, + success: function(e) { + if ((e = JSON.parse(e))) e.error ? r(e.error) : n(e); + else { + var t = f.translate("Server response wasn't proper JSON."); + r(t); + } + }, + error: function() { + var e = + f.translate("The spelling service was not found: (") + + i(f) + + f.translate(")"); + r(e); + } + }); + }) + ).call(e.plugins.spellchecker, r, o, a, d); + }, + x = function(e, t, n) { + e.dom.select("span.mce-spellchecker-word").length || N(e, t, n); + }, + N = function(e, t, n) { + if ((p(e, n).reset(), n.set(null), t.get())) return t.set(!1), f(e), !0; + }, + k = function(e) { + var t = e.getAttribute("data-mce-index"); + return "number" == typeof t ? "" + t : t; + }, + y = function(e, t, n, r, o) { + var i, c; + if ( + (o.words ? ((c = !!o.dictionary), (i = o.words)) : (i = o), + e.setProgressState(!1), + (function(e) { + for (var t in e) return !1; + return !0; + })(i)) + ) { + var l = e.translate("No misspellings found."); + return ( + e.notificationManager.open({ text: l, type: "info" }), void t.set(!1) + ); + } + r.set({ suggestions: i, hasDictionarySupport: c }), + p(e, n) + .find(a(e)) + .filter(function(e) { + return !!i[e.text]; + }) + .wrap(function(t) { + return e.dom.create("span", { + class: "mce-spellchecker-word", + "data-mce-bogus": 1, + "data-mce-word": t.text + }); + }), + t.set(!0), + d(e); + }, + S = { + spellcheck: function(e, t, n, r, o, i) { + N(e, n, r) || + (e.setProgressState(!0), + v( + e, + t, + i, + "spellcheck", + p(e, r).text, + function(t) { + y(e, n, r, o, t); + }, + function(t) { + e.notificationManager.open({ text: t, type: "error" }), + e.setProgressState(!1), + N(e, n, r); + } + ), + e.focus()); + }, + checkIfFinished: x, + addToDictionary: function(e, t, n, r, o, i) { + e.setProgressState(!0), + v( + e, + t, + "addToDictionary", + o, + function() { + e.setProgressState(!1), e.dom.remove(i, !0), x(e, n, r); + }, + function(t) { + e.notificationManager.open({ text: t, type: "error" }), + e.setProgressState(!1); + } + ); + }, + ignoreWord: function(e, t, n, r, o, i) { + e.selection.collapse(), + i + ? l.each(e.dom.select("span.mce-spellchecker-word"), function(t) { + t.getAttribute("data-mce-word") === r && e.dom.remove(t, !0); + }) + : e.dom.remove(o, !0), + x(e, t, n); + }, + findSpansByIndex: function(e, t) { + var n, + r = []; + if ((n = l.toArray(e.getBody().getElementsByTagName("span"))).length) + for (var o = 0; o < n.length; o++) { + var i = k(n[o]); + null !== i && i.length && i === t.toString() && r.push(n[o]); + } + return r; + }, + getElmIndex: k, + markErrors: y + }, + w = function(e, t, n, r, i) { + return { + getTextMatcher: function() { + return r.get(); + }, + getWordCharPattern: function() { + return a(e); + }, + markErrors: function(o) { + S.markErrors(e, t, r, n, o); + }, + getLanguage: function() { + return o(e); + } + }; + }, + b = function(e, t, n, r, o, i) { + e.addCommand("mceSpellCheck", function() { + S.spellcheck(e, t, n, r, o, i); + }); + }, + T = function(e, t, n, i, c, a) { + var s, + u, + d, + f, + h = ((d = e), + (s = l.map(r(d).split(","), function(e) { + return { name: (e = e.split("="))[0], value: e[1] }; + })), + (u = []), + l.each(s, function(e) { + u.push({ selectable: !0, text: e.name, data: e.value }); + }), + u), + g = function() { + S.spellcheck(e, t, n, i, a, c); + }, + m = { + tooltip: "Spellcheck", + onclick: g, + onPostRender: function(t) { + var r = t.control; + e.on("SpellcheckStart SpellcheckEnd", function() { + r.active(n.get()); + }); + } + }; + h.length > 1 && + ((m.type = "splitbutton"), + (m.menu = h), + (m.onshow = ((f = e), + function(e) { + var t = o(f); + e.control.items().each(function(e) { + e.active(e.settings.data === t); + }); + })), + (m.onselect = function(e) { + c.set(e.control.settings.data); + })), + e.addButton("spellchecker", m), + e.addMenuItem("spellchecker", { + text: "Spellcheck", + context: "tools", + onclick: g, + selectable: !0, + onPostRender: function() { + var t = this; + t.active(n.get()), + e.on("SpellcheckStart SpellcheckEnd", function() { + t.active(n.get()); + }); + } + }); + }, + I = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + E = tinymce.util.Tools.resolve("tinymce.ui.Factory"), + P = function(e, t, n, r, o) { + e.on("click", function(i) { + var c = i.target; + if ("mce-spellchecker-word" === c.className) { + i.preventDefault(); + var a = S.findSpansByIndex(e, S.getElmIndex(c)); + if (a.length > 0) { + var s = e.dom.createRng(); + s.setStartBefore(a[0]), + s.setEndAfter(a[a.length - 1]), + e.selection.setRng(s), + (function(e, t, n, r, o, i, c) { + var a = [], + s = n.get().suggestions[i]; + l.each(s, function(t) { + a.push({ + text: t, + onclick: function() { + e.insertContent(e.dom.encode(t)), + e.dom.remove(c), + S.checkIfFinished(e, r, o); + } + }); + }), + a.push({ text: "-" }), + n.get().hasDictionarySupport && + a.push({ + text: "Add to Dictionary", + onclick: function() { + S.addToDictionary(e, t, r, o, i, c); + } + }), + a.push.apply(a, [ + { + text: "Ignore", + onclick: function() { + S.ignoreWord(e, r, o, i, c); + } + }, + { + text: "Ignore all", + onclick: function() { + S.ignoreWord(e, r, o, i, c, !0); + } + } + ]), + (g = E.create("menu", { + items: a, + context: "contextmenu", + onautohide: function(e) { + -1 !== e.target.className.indexOf("spellchecker") && + e.preventDefault(); + }, + onhide: function() { + g.remove(), (g = null); + } + })).renderTo(document.body); + var u = I.DOM.getPos(e.getContentAreaContainer()), + d = e.dom.getPos(c[0]), + f = e.dom.getRoot(); + "BODY" === f.nodeName + ? ((d.x -= + f.ownerDocument.documentElement.scrollLeft || + f.scrollLeft), + (d.y -= + f.ownerDocument.documentElement.scrollTop || f.scrollTop)) + : ((d.x -= f.scrollLeft), (d.y -= f.scrollTop)), + (u.x += d.x), + (u.y += d.y), + g.moveTo(u.x, u.y + c[0].offsetHeight); + })(e, t, n, r, o, c.getAttribute("data-mce-word"), a); + } + } + }); + }; + t.add("spellchecker", function(t, r) { + if (!1 === n(t)) { + var i = e(!1), + c = e(o(t)), + a = e(null), + l = e({}); + return ( + T(t, r, i, a, c, l), + P(t, r, l, i, a), + b(t, r, i, a, l, c), + w(t, i, l, a, r) + ); + } + }); +})(); +!(function() { + "use strict"; + var e = function(t) { + var n = t, + r = function() { + return n; + }; + return { + get: r, + set: function(e) { + n = e; + }, + clone: function() { + return e(r()); + } + }; + }, + t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = tinymce.util.Tools.resolve("tinymce.util.Tools"); + function r(e) { + return e && 1 === e.nodeType && "false" === e.contentEditable; + } + var a = { + findAndReplaceDOMText: function(e, t, n, a, i) { + var o, + d, + c, + l, + s, + u, + f = [], + p = 0; + function g(e, t) { + if (((t = t || 0), !e[0])) + throw new Error( + "findAndReplaceDOMText cannot handle zero-length matches" + ); + var n = e.index; + if (t > 0) { + var r = e[t]; + if (!r) throw new Error("Invalid capture group"); + (n += e[0].indexOf(r)), (e[0] = r); + } + return [n, n + e[0].length, [e[0]]]; + } + if ( + ((c = t.ownerDocument), + (l = i.getBlockElements()), + (s = i.getWhiteSpaceElements()), + (u = i.getShortEndedElements()), + (d = (function h(e) { + var t; + if (3 === e.nodeType) return e.data; + if (s[e.nodeName] && !l[e.nodeName]) return ""; + if (((t = ""), r(e))) return "\n"; + if ( + ((l[e.nodeName] || u[e.nodeName]) && (t += "\n"), + (e = e.firstChild)) + ) + do { + t += h(e); + } while ((e = e.nextSibling)); + return t; + })(t))) + ) { + if (e.global) for (; (o = e.exec(d)); ) f.push(g(o, a)); + else (o = d.match(e)), f.push(g(o, a)); + return ( + f.length && + ((p = f.length), + (function(e, t, n) { + var a, + i, + o, + d, + c = [], + f = 0, + p = e, + g = t.shift(), + h = 0; + e: for (;;) { + if ( + ((l[p.nodeName] || u[p.nodeName] || r(p)) && f++, + 3 === p.nodeType && + (!i && p.length + f >= g[1] + ? ((i = p), (d = g[1] - f)) + : a && c.push(p), + !a && p.length + f > g[0] && ((a = p), (o = g[0] - f)), + (f += p.length)), + a && i) + ) { + if ( + ((p = n({ + startNode: a, + startNodeIndex: o, + endNode: i, + endNodeIndex: d, + innerNodes: c, + match: g[2], + matchIndex: h + })), + (f -= i.length - d), + (a = null), + (i = null), + (c = []), + h++, + !(g = t.shift())) + ) + break; + } else if ( + (s[p.nodeName] && !l[p.nodeName]) || + !p.firstChild + ) { + if (p.nextSibling) { + p = p.nextSibling; + continue; + } + } else if (!r(p)) { + p = p.firstChild; + continue; + } + for (;;) { + if (p.nextSibling) { + p = p.nextSibling; + break; + } + if (p.parentNode === e) break e; + p = p.parentNode; + } + } + })( + t, + f, + (function(e) { + var t; + if ("function" != typeof e) { + var n = e.nodeType ? e : c.createElement(e); + t = function(e, t) { + var r = n.cloneNode(!1); + return ( + r.setAttribute("data-mce-index", t), + e && r.appendChild(c.createTextNode(e)), + r + ); + }; + } else t = e; + return function(e) { + var n, + r, + a, + i = e.startNode, + o = e.endNode, + d = e.matchIndex; + if (i === o) { + var l = i; + (a = l.parentNode), + e.startNodeIndex > 0 && + ((n = c.createTextNode( + l.data.substring(0, e.startNodeIndex) + )), + a.insertBefore(n, l)); + var s = t(e.match[0], d); + return ( + a.insertBefore(s, l), + e.endNodeIndex < l.length && + ((r = c.createTextNode( + l.data.substring(e.endNodeIndex) + )), + a.insertBefore(r, l)), + l.parentNode.removeChild(l), + s + ); + } + (n = c.createTextNode( + i.data.substring(0, e.startNodeIndex) + )), + (r = c.createTextNode(o.data.substring(e.endNodeIndex))); + for ( + var u = t(i.data.substring(e.startNodeIndex), d), + f = [], + p = 0, + g = e.innerNodes.length; + p < g; + ++p + ) { + var h = e.innerNodes[p], + m = t(h.data, d); + h.parentNode.replaceChild(m, h), f.push(m); + } + var v = t(o.data.substring(0, e.endNodeIndex), d); + return ( + (a = i.parentNode).insertBefore(n, i), + a.insertBefore(u, i), + a.removeChild(i), + (a = o.parentNode).insertBefore(v, o), + a.insertBefore(r, o), + a.removeChild(o), + v + ); + }; + })(n) + )), + p + ); + } + } + }, + i = function(e) { + var t = e.getAttribute("data-mce-index"); + return "number" == typeof t ? "" + t : t; + }, + o = function(e) { + var t = e.parentNode; + e.firstChild && t.insertBefore(e.firstChild, e), + e.parentNode.removeChild(e); + }, + d = function(e, t) { + var r, + a = []; + if ((r = n.toArray(e.getBody().getElementsByTagName("span"))).length) + for (var o = 0; o < r.length; o++) { + var d = i(r[o]); + null !== d && d.length && d === t.toString() && a.push(r[o]); + } + return a; + }, + c = function(e, t, n) { + var r = t.get(), + a = e.dom; + (n = !1 !== n) ? r++ : r--, + a.removeClass(d(e, t.get()), "mce-match-marker-selected"); + var i = d(e, r); + return i.length + ? (a.addClass(d(e, r), "mce-match-marker-selected"), + e.selection.scrollIntoView(i[0]), + r) + : -1; + }, + l = function(e, t) { + var n = t.parentNode; + e.remove(t), e.isEmpty(n) && e.remove(n); + }, + s = function(e, t) { + var n = c(e, t, !0); + -1 !== n && t.set(n); + }, + u = function(e, t) { + var n = c(e, t, !1); + -1 !== n && t.set(n); + }, + f = function(e) { + var t = i(e); + return null !== t && t.length > 0; + }, + p = function(e, t, r) { + var a, d, c, l; + for ( + d = n.toArray(e.getBody().getElementsByTagName("span")), a = 0; + a < d.length; + a++ + ) { + var s = i(d[a]); + null !== s && + s.length && + (s === t.get().toString() && + (c || (c = d[a].firstChild), (l = d[a].firstChild)), + o(d[a])); + } + if (c && l) { + var u = e.dom.createRng(); + return ( + u.setStart(c, 0), + u.setEnd(l, l.data.length), + !1 !== r && e.selection.setRng(u), + u + ); + } + }, + g = function(e, t) { + return d(e, t.get() + 1).length > 0; + }, + h = function(e, t) { + return d(e, t.get() - 1).length > 0; + }, + m = { + done: p, + find: function(e, t, n, r, i) { + (n = (n = n.replace( + /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, + "\\$&" + )).replace(/\s/g, "\\s")), + (n = i ? "\\b" + n + "\\b" : n); + var o, + d, + l, + s, + u, + f = ((o = e), + (d = t), + (l = new RegExp(n, r ? "g" : "gi")), + ((u = o.dom.create("span", { "data-mce-bogus": 1 })).className = + "mce-match-marker"), + (s = o.getBody()), + p(o, d, !1), + a.findAndReplaceDOMText(l, s, u, !1, o.schema)); + return f && (t.set(-1), t.set(c(e, t, !0))), f; + }, + next: s, + prev: u, + replace: function(e, t, r, a, d) { + var c, + p, + m, + v, + x, + b, + N = t.get(); + for ( + a = !1 !== a, + m = e.getBody(), + p = n.grep(n.toArray(m.getElementsByTagName("span")), f), + c = 0; + c < p.length; + c++ + ) { + var y = i(p[c]); + if (((v = x = parseInt(y, 10)), d || v === t.get())) { + for ( + r.length + ? ((p[c].firstChild.nodeValue = r), o(p[c])) + : l(e.dom, p[c]); + p[++c]; + + ) { + if ((v = parseInt(i(p[c]), 10)) !== x) { + c--; + break; + } + l(e.dom, p[c]); + } + a && N--; + } else x > t.get() && p[c].setAttribute("data-mce-index", x - 1); + } + return ( + t.set(N), + a ? ((b = g(e, t)), s(e, t)) : ((b = h(e, t)), u(e, t)), + !d && b + ); + }, + hasNext: g, + hasPrev: h + }, + v = function(e, t) { + return { + done: function(n) { + return m.done(e, t, n); + }, + find: function(n, r, a) { + return m.find(e, t, n, r, a); + }, + next: function() { + return m.next(e, t); + }, + prev: function() { + return m.prev(e, t); + }, + replace: function(n, r, a) { + return m.replace(e, t, n, r, a); + } + }; + }, + x = function(e, t) { + var r, + a = {}; + function i() { + d.statusbar.find("#next").disabled(!1 === m.hasNext(e, t)), + d.statusbar.find("#prev").disabled(!1 === m.hasPrev(e, t)); + } + function o() { + e.windowManager.alert( + "Could not find the specified string.", + function() { + d.find("#find")[0].focus(); + } + ); + } + e.undoManager.add(), + (r = n.trim(e.selection.getContent({ format: "text" }))); + var d = e.windowManager.open({ + layout: "flex", + pack: "center", + align: "center", + onClose: function() { + e.focus(), m.done(e, t), e.undoManager.add(); + }, + onSubmit: function(n) { + var r, c, l, s; + return ( + n.preventDefault(), + (c = d.find("#case").checked()), + (s = d.find("#words").checked()), + (l = d.find("#find").value()).length + ? a.text === l && a.caseState === c && a.wholeWord === s + ? m.hasNext(e, t) + ? (m.next(e, t), void i()) + : void o() + : ((r = m.find(e, t, l, c, s)) || o(), + d.statusbar + .items() + .slice(1) + .disabled(0 === r), + i(), + void (a = { text: l, caseState: c, wholeWord: s })) + : (m.done(e, t, !1), + void d.statusbar + .items() + .slice(1) + .disabled(!0)) + ); + }, + buttons: [ + { + text: "Find", + subtype: "primary", + onclick: function() { + d.submit(); + } + }, + { + text: "Replace", + disabled: !0, + onclick: function() { + m.replace(e, t, d.find("#replace").value()) || + (d.statusbar + .items() + .slice(1) + .disabled(!0), + t.set(-1), + (a = {})); + } + }, + { + text: "Replace all", + disabled: !0, + onclick: function() { + m.replace(e, t, d.find("#replace").value(), !0, !0), + d.statusbar + .items() + .slice(1) + .disabled(!0), + (a = {}); + } + }, + { type: "spacer", flex: 1 }, + { + text: "Prev", + name: "prev", + disabled: !0, + onclick: function() { + m.prev(e, t), i(); + } + }, + { + text: "Next", + name: "next", + disabled: !0, + onclick: function() { + m.next(e, t), i(); + } + } + ], + title: "Find and replace", + items: { + type: "form", + padding: 20, + labelGap: 30, + spacing: 10, + items: [ + { + type: "textbox", + name: "find", + size: 40, + label: "Find", + value: r + }, + { + type: "textbox", + name: "replace", + size: 40, + label: "Replace with" + }, + { type: "checkbox", name: "case", text: "Match case", label: " " }, + { type: "checkbox", name: "words", text: "Whole words", label: " " } + ] + } + }); + }, + b = function(e, t) { + e.addCommand("SearchReplace", function() { + x(e, t); + }); + }, + N = function(e, t) { + return function() { + x(e, t); + }; + }, + y = function(e, t) { + e.addMenuItem("searchreplace", { + text: "Find and replace", + shortcut: "Meta+F", + onclick: N(e, t), + separator: "before", + context: "edit" + }), + e.addButton("searchreplace", { + tooltip: "Find and replace", + onclick: N(e, t) + }), + e.shortcuts.add("Meta+F", "", N(e, t)); + }; + t.add("searchreplace", function(t) { + var n = e(-1); + return b(t, n), y(t, n), v(t, n); + }); +})(); +!(function() { + "use strict"; + var n = tinymce.util.Tools.resolve("tinymce.PluginManager"), + e = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + t = tinymce.util.Tools.resolve("tinymce.util.Tools"), + a = function(n) { + return n.getParam("save_enablewhendirty", !0); + }, + o = function(n) { + return !!n.getParam("save_onsavecallback"); + }, + c = function(n) { + return !!n.getParam("save_oncancelcallback"); + }, + i = function(n, e) { + n.notificationManager.open({ text: n.translate(e), type: "error" }); + }, + r = function(n) { + var t; + if (((t = e.DOM.getParent(n.id, "form")), !a(n) || n.isDirty())) { + if ((n.save(), o(n))) + return n.execCallback("save_onsavecallback", n), void n.nodeChanged(); + t + ? (n.setDirty(!1), + (t.onsubmit && !t.onsubmit()) || + ("function" == typeof t.submit + ? t.submit() + : i(n, "Error: Form submit field collision.")), + n.nodeChanged()) + : i(n, "Error: No form element found."); + } + }, + l = function(n) { + var e = t.trim(n.startContent); + c(n) + ? n.execCallback("save_oncancelcallback", n) + : (n.setContent(e), n.undoManager.clear(), n.nodeChanged()); + }, + d = function(n) { + n.addCommand("mceSave", function() { + r(n); + }), + n.addCommand("mceCancel", function() { + l(n); + }); + }, + s = function(n) { + return function(e) { + var t = e.control; + n.on("nodeChange dirty", function() { + t.disabled(a(n) && !n.isDirty()); + }); + }; + }, + u = function(n) { + n.addButton("save", { + icon: "save", + text: "Save", + cmd: "mceSave", + disabled: !0, + onPostRender: s(n) + }), + n.addButton("cancel", { + text: "Cancel", + icon: !1, + cmd: "mceCancel", + disabled: !0, + onPostRender: s(n) + }), + n.addShortcut("Meta+S", "", "mceSave"); + }; + n.add("save", function(n) { + u(n), d(n); + }); +})(); +!(function() { + "use strict"; + var t = function(t) { + t.addCommand("mcePrint", function() { + t.getWin().print(); + }); + }, + n = function(t) { + t.addButton("print", { title: "Print", cmd: "mcePrint" }), + t.addMenuItem("print", { + text: "Print", + cmd: "mcePrint", + icon: "print" + }); + }; + tinymce.util.Tools.resolve("tinymce.PluginManager").add("print", function(i) { + t(i), n(i), i.addShortcut("Meta+P", "", "mcePrint"); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.Env"), + n = function(e) { + return parseInt(e.getParam("plugin_preview_width", "650"), 10); + }, + i = function(e) { + return parseInt(e.getParam("plugin_preview_height", "500"), 10); + }, + o = function(e) { + return e.getParam("content_style", ""); + }, + r = tinymce.util.Tools.resolve("tinymce.util.Tools"), + c = function(e) { + var t = "", + n = e.dom.encode, + i = o(e); + (t += ''), + i && (t += '"), + r.each(e.contentCSS, function(i) { + t += + ''; + }); + var c = e.settings.body_id || "tinymce"; + -1 !== c.indexOf("=") && + (c = (c = e.getParam("body_id", "", "hash"))[e.id] || c); + var a = e.settings.body_class || ""; + -1 !== a.indexOf("=") && + (a = (a = e.getParam("body_class", "", "hash"))[e.id] || ""); + var s = e.settings.directionality + ? ' dir="' + e.settings.directionality + '"' + : ""; + return ( + "" + + t + + '" + + e.getContent() + + ' ' + ); + }, + a = function(e, t, n) { + var i = c(e); + if (n) t.src = "data:text/html;charset=utf-8," + encodeURIComponent(i); + else { + var o = t.contentWindow.document; + o.open(), o.write(i), o.close(); + } + }, + s = function(e) { + var o = !t.ie, + r = + '", + c = n(e), + s = i(e); + e.windowManager.open({ + title: "Preview", + width: c, + height: s, + html: r, + buttons: { + text: "Close", + onclick: function(e) { + e.control + .parent() + .parent() + .close(); + } + }, + onPostRender: function(t) { + var n = t.control.getEl("body").firstChild; + a(e, n, o); + } + }); + }, + d = function(e) { + e.addCommand("mcePreview", function() { + s(e); + }); + }, + l = function(e) { + e.addButton("preview", { title: "Preview", cmd: "mcePreview" }), + e.addMenuItem("preview", { + text: "Preview", + cmd: "mcePreview", + context: "view" + }); + }; + e.add("preview", function(e) { + d(e), l(e); + }); +})(); +!(function() { + "use strict"; + var e = function(t) { + var n = t, + r = function() { + return n; + }; + return { + get: r, + set: function(e) { + n = e; + }, + clone: function() { + return e(r()); + } + }; + }, + t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = function(e) { + return !( + !/(^|[ ,])powerpaste([, ]|$)/.test(e.settings.plugins) || + !t.get("powerpaste") || + ("undefined" != typeof window.console && + window.console.log && + window.console.log( + "PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option." + ), + 0) + ); + }, + r = function(e, t) { + return { clipboard: e, quirks: t }; + }, + a = { + firePastePreProcess: function(e, t, n, r) { + return e.fire("PastePreProcess", { + content: t, + internal: n, + wordContent: r + }); + }, + firePastePostProcess: function(e, t, n, r) { + return e.fire("PastePostProcess", { + node: t, + internal: n, + wordContent: r + }); + }, + firePastePlainTextToggle: function(e, t) { + return e.fire("PastePlainTextToggle", { state: t }); + }, + firePaste: function(e, t) { + return e.fire("paste", { ieFake: t }); + } + }, + i = { + shouldPlainTextInform: function(e) { + return e.getParam("paste_plaintext_inform", !0); + }, + shouldBlockDrop: function(e) { + return e.getParam("paste_block_drop", !1); + }, + shouldPasteDataImages: function(e) { + return e.getParam("paste_data_images", !1); + }, + shouldFilterDrop: function(e) { + return e.getParam("paste_filter_drop", !0); + }, + getPreProcess: function(e) { + return e.getParam("paste_preprocess"); + }, + getPostProcess: function(e) { + return e.getParam("paste_postprocess"); + }, + getWebkitStyles: function(e) { + return e.getParam("paste_webkit_styles"); + }, + shouldRemoveWebKitStyles: function(e) { + return e.getParam("paste_remove_styles_if_webkit", !0); + }, + shouldMergeFormats: function(e) { + return e.getParam("paste_merge_formats", !0); + }, + isSmartPasteEnabled: function(e) { + return e.getParam("smart_paste", !0); + }, + isPasteAsTextEnabled: function(e) { + return e.getParam("paste_as_text", !1); + }, + getRetainStyleProps: function(e) { + return e.getParam("paste_retain_style_properties"); + }, + getWordValidElements: function(e) { + return e.getParam( + "paste_word_valid_elements", + "-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody" + ); + }, + shouldConvertWordFakeLists: function(e) { + return e.getParam("paste_convert_word_fake_lists", !0); + }, + shouldUseDefaultFilters: function(e) { + return e.getParam("paste_enable_default_filters", !0); + } + }, + o = function(e, t, n) { + var r, o, s; + "text" === t.pasteFormat + ? ((t.pasteFormat = "html"), a.firePastePlainTextToggle(e, !1)) + : ((t.pasteFormat = "text"), + a.firePastePlainTextToggle(e, !0), + (s = e), + !1 === n.get() && + i.shouldPlainTextInform(s) && + ((o = + "Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."), + (r = e).notificationManager.open({ + text: r.translate(o), + type: "info" + }), + n.set(!0))), + e.focus(); + }, + s = function(e, t, n) { + e.addCommand("mceTogglePlainTextPaste", function() { + o(e, t, n); + }), + e.addCommand("mceInsertClipboardContent", function(e, n) { + n.content && t.pasteHtml(n.content, n.internal), + n.text && t.pasteText(n.text); + }); + }, + l = tinymce.util.Tools.resolve("tinymce.Env"), + u = tinymce.util.Tools.resolve("tinymce.util.Delay"), + c = tinymce.util.Tools.resolve("tinymce.util.Tools"), + f = tinymce.util.Tools.resolve("tinymce.util.VK"), + d = "x-tinymce/html", + m = "\x3c!-- " + d + " --\x3e", + p = { + mark: function(e) { + return m + e; + }, + unmark: function(e) { + return e.replace(m, ""); + }, + isMarked: function(e) { + return -1 !== e.indexOf(m); + }, + internalHtmlMime: function() { + return d; + } + }, + g = tinymce.util.Tools.resolve("tinymce.html.Entities"), + v = function(e) { + return e.replace(/\r?\n/g, "
    "); + }, + h = function(e, t, n) { + var r = e.split(/\n\n/), + a = (function(e, t) { + var n, + r = [], + a = "<" + e; + if ("object" == typeof t) { + for (n in t) + t.hasOwnProperty(n) && + r.push(n + '="' + g.encodeAllRaw(t[n]) + '"'); + r.length && (a += " " + r.join(" ")); + } + return a + ">"; + })(t, n), + i = "", + o = c.map(r, function(e) { + return e.split(/\n/).join("
    "); + }); + return 1 === o.length + ? o[0] + : c + .map(o, function(e) { + return a + e + i; + }) + .join(""); + }, + P = { + isPlainText: function(e) { + return !/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test( + e + ); + }, + convert: function(e, t, n) { + return t ? h(e, t, n) : v(e); + }, + toBRs: v, + toBlockElements: h + }, + y = tinymce.util.Tools.resolve("tinymce.html.DomParser"), + b = tinymce.util.Tools.resolve("tinymce.html.Node"), + x = tinymce.util.Tools.resolve("tinymce.html.Schema"), + w = tinymce.util.Tools.resolve("tinymce.html.Serializer"); + function T(e, t) { + return ( + c.each(t, function(t) { + e = t.constructor === RegExp ? e.replace(t, "") : e.replace(t[0], t[1]); + }), + e + ); + } + var C = { + filter: T, + innerText: function(e) { + var t = x(), + n = y({}, t), + r = "", + a = t.getShortEndedElements(), + i = c.makeMap( + "script noscript style textarea video audio iframe object", + " " + ), + o = t.getBlockElements(); + return ( + (e = T(e, [//g])), + (function s(e) { + var t = e.name, + n = e; + if ("br" !== t) + if ((a[t] && (r += " "), i[t])) r += " "; + else { + if ( + (3 === e.type && (r += e.value), + !e.shortEnded && (e = e.firstChild)) + ) + do { + s(e); + } while ((e = e.next)); + o[t] && n.next && ((r += "\n"), "p" === t && (r += "\n")); + } + else r += "\n"; + })(n.parse(e)), + r + ); + }, + trimHtml: function(e) { + return (e = T(e, [ + /^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi, + /|/g, + [ + /( ?)\u00a0<\/span>( ?)/g, + function(e, t, n) { + return t || n ? "\xa0" : " "; + } + ], + /
    /g, + /
    $/i + ])); + }, + createIdGenerator: function(e) { + var t = 0; + return function() { + return e + t++; + }; + }, + isMsEdge: function() { + return -1 !== navigator.userAgent.indexOf(" Edge/"); + } + }; + function _(e) { + var t, n; + return ( + (n = [ + /^[IVXLMCD]{1,2}\.[ \u00a0]/, + /^[ivxlmcd]{1,2}\.[ \u00a0]/, + /^[a-z]{1,2}[\.\)][ \u00a0]/, + /^[A-Z]{1,2}[\.\)][ \u00a0]/, + /^[0-9]+\.[ \u00a0]/, + /^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/, + /^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/ + ]), + (e = e.replace(/^[\u00a0 ]+/, "")), + c.each(n, function(n) { + if (n.test(e)) return (t = !0), !1; + }), + t + ); + } + function D(e) { + var t, + n, + r = 1; + function a(e) { + var t = ""; + if (3 === e.type) return e.value; + if ((e = e.firstChild)) + do { + t += a(e); + } while ((e = e.next)); + return t; + } + function i(e, t) { + if (3 === e.type && t.test(e.value)) + return (e.value = e.value.replace(t, "")), !1; + if ((e = e.firstChild)) + do { + if (!i(e, t)) return !1; + } while ((e = e.next)); + return !0; + } + function o(e, a, o) { + var s = e._listLevel || r; + s !== r && (s < r ? t && (t = t.parent.parent) : ((n = t), (t = null))), + t && t.name === a + ? t.append(e) + : ((n = n || t), + (t = new b(a, 1)), + o > 1 && t.attr("start", "" + o), + e.wrap(t)), + (e.name = "li"), + s > r && n && n.lastChild.append(t), + (r = s), + (function l(e) { + if (e._listIgnore) e.remove(); + else if ((e = e.firstChild)) + do { + l(e); + } while ((e = e.next)); + })(e), + i(e, /^\u00a0+/), + i(e, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/), + i(e, /^\u00a0+/); + } + for (var s = [], l = e.firstChild; void 0 !== l && null !== l; ) + if ((s.push(l), null !== (l = l.walk()))) + for (; void 0 !== l && l.parent !== e; ) l = l.walk(); + for (var u = 0; u < s.length; u++) + if ("p" === (e = s[u]).name && e.firstChild) { + var c = a(e); + if (/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)) { + o(e, "ul"); + continue; + } + if (_(c)) { + var f = /([0-9]+)\./.exec(c), + d = 1; + f && (d = parseInt(f[1], 10)), o(e, "ol", d); + continue; + } + if (e._listLevel) { + o(e, "ul", 1); + continue; + } + t = null; + } else (n = t), (t = null); + } + function k(e, t, n, r) { + var a, + o = {}, + s = e.dom.parseStyle(r); + return ( + c.each(s, function(s, l) { + switch (l) { + case "mso-list": + (a = /\w+ \w+([0-9]+)/i.exec(r)) && + (n._listLevel = parseInt(a[1], 10)), + /Ignore/i.test(s) && + n.firstChild && + ((n._listIgnore = !0), (n.firstChild._listIgnore = !0)); + break; + case "horiz-align": + l = "text-align"; + break; + case "vert-align": + l = "vertical-align"; + break; + case "font-color": + case "mso-foreground": + l = "color"; + break; + case "mso-background": + case "mso-highlight": + l = "background"; + break; + case "font-weight": + case "font-style": + return void ("normal" !== s && (o[l] = s)); + case "mso-element": + if (/^(comment|comment-list)$/i.test(s)) return void n.remove(); + } + 0 !== l.indexOf("mso-comment") + ? 0 !== l.indexOf("mso-") && + ("all" === i.getRetainStyleProps(e) || (t && t[l])) && + (o[l] = s) + : n.remove(); + }), + /(bold)/i.test(o["font-weight"]) && + (delete o["font-weight"], n.wrap(new b("b", 1))), + /(italic)/i.test(o["font-style"]) && + (delete o["font-style"], n.wrap(new b("i", 1))), + (o = e.dom.serializeStyle(o, n.name)) || null + ); + } + var R = { + preProcess: function(e, t) { + return i.shouldUseDefaultFilters(e) + ? (function(e, t) { + var n, r; + (n = i.getRetainStyleProps(e)) && + (r = c.makeMap(n.split(/[, ]/))), + (t = C.filter(t, [ + /
    /gi, + /]+id="?docs-internal-[^>]*>/gi, + //gi, + /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi, + [/<(\/?)s>/gi, "<$1strike>"], + [/ /gi, "\xa0"], + [ + /([\s\u00a0]*)<\/span>/gi, + function(e, t) { + return t.length > 0 + ? t + .replace(/./, " ") + .slice(Math.floor(t.length / 2)) + .split("") + .join("\xa0") + : ""; + } + ] + ])); + var a = i.getWordValidElements(e), + o = x({ valid_elements: a, valid_children: "-li[p]" }); + c.each(o.elements, function(e) { + e.attributes["class"] || + ((e.attributes["class"] = {}), + e.attributesOrder.push("class")), + e.attributes.style || + ((e.attributes.style = {}), + e.attributesOrder.push("style")); + }); + var s = y({}, o); + s.addAttributeFilter("style", function(t) { + for (var n, a = t.length; a--; ) + (n = t[a]).attr("style", k(e, r, n, n.attr("style"))), + "span" === n.name && + n.parent && + !n.attributes.length && + n.unwrap(); + }), + s.addAttributeFilter("class", function(e) { + for (var t, n, r = e.length; r--; ) + (n = (t = e[r]).attr("class")), + /^(MsoCommentReference|MsoCommentText|msoDel)$/i.test( + n + ) && t.remove(), + t.attr("class", null); + }), + s.addNodeFilter("del", function(e) { + for (var t = e.length; t--; ) e[t].remove(); + }), + s.addNodeFilter("a", function(e) { + for (var t, n, r, a = e.length; a--; ) + if ( + ((n = (t = e[a]).attr("href")), + (r = t.attr("name")), + n && -1 !== n.indexOf("#_msocom_")) + ) + t.remove(); + else if ( + (n && + 0 === n.indexOf("file://") && + (n = n.split("#")[1]) && + (n = "#" + n), + n || r) + ) { + if (r && !/^_?(?:toc|edn|ftn)/i.test(r)) { + t.unwrap(); + continue; + } + t.attr({ href: n, name: r }); + } else t.unwrap(); + }); + var l = s.parse(t); + return ( + i.shouldConvertWordFakeLists(e) && D(l), + (t = w({ validate: e.settings.validate }, o).serialize(l)) + ); + })(e, t) + : t; + }, + isWordContent: function(e) { + return ( + /'); + } + ), + !0) + ); + var r, a, i; + }, + B = function(e, t) { + return ( + e.insertContent(t, { merge: i.shouldMergeFormats(e), paste: !0 }), !0 + ); + }, + H = { + isImageUrl: I, + isAbsoluteUrl: S, + insertContent: function(e, t) { + var n, r; + !1 === i.isSmartPasteEnabled(e) + ? B(e, t) + : ((n = e), + (r = t), + c.each([A, O, B], function(e) { + return !0 !== e(n, r, B); + })); + } + }, + N = function(e) { + var t, + n, + r, + o, + s, + d, + m = this, + g = 0, + v = ((t = e), + (r = "%MCEPASTEBIN%"), + { + create: function() { + var e, + a, + i = t.dom, + o = t.getBody(), + s = t.dom.getViewPort(t.getWin()).y, + u = 20; + if ( + ((n = t.selection.getRng()), + t.inline && + (a = t.selection.getScrollContainer()) && + a.scrollTop > 0 && + (s = a.scrollTop), + n.getClientRects) + ) { + var c = (function(e) { + var t, + r, + a, + o = e.startContainer; + if ((t = e.getClientRects()).length) return t[0]; + if (e.collapsed && 1 === o.nodeType) { + for ( + a = o.childNodes[n.startOffset]; + a && 3 === a.nodeType && !a.data.length; + + ) + a = a.nextSibling; + if (a) + return ( + "BR" === a.tagName && + ((r = i.doc.createTextNode("\ufeff")), + a.parentNode.insertBefore(r, a), + (e = i.createRng()).setStartBefore(r), + e.setEndAfter(r), + (t = e.getClientRects()), + i.remove(r)), + t.length ? t[0] : void 0 + ); + } + })(n); + if (c) u = s + (c.top - i.getPos(o).y); + else { + u = s; + var f = n.startContainer; + f && + (3 === f.nodeType && f.parentNode !== o && (f = f.parentNode), + 1 === f.nodeType && (u = i.getPos(f, a || o).y)); + } + } + (e = t.dom.add( + t.getBody(), + "div", + { + id: "mcepastebin", + contentEditable: !0, + "data-mce-bogus": "all", + style: + "position: absolute; top: " + + u + + "px; width: 10px; height: 10px; overflow: hidden; opacity: 0" + }, + r + )), + (l.ie || l.gecko) && + i.setStyle( + e, + "left", + "rtl" === i.getStyle(o, "direction", !0) ? 65535 : -65535 + ), + i.bind(e, "beforedeactivate focusin focusout", function(e) { + e.stopPropagation(); + }), + e.focus(), + t.selection.select(e, !0); + }, + remove: function() { + if (o()) { + for (var e = void 0; (e = t.dom.get("mcepastebin")); ) + t.dom.remove(e), t.dom.unbind(e); + n && t.selection.setRng(n); + } + n = null; + }, + getEl: (o = function() { + return t.dom.get("mcepastebin"); + }), + getHtml: function() { + var e, + n, + r, + a, + i, + o = function(e, n) { + e.appendChild(n), t.dom.remove(n, !0); + }; + for ( + n = c.grep(t.getBody().childNodes, function(e) { + return "mcepastebin" === e.id; + }), + e = n.shift(), + c.each(n, function(t) { + o(e, t); + }), + r = (a = t.dom.select("div[id=mcepastebin]", e)).length - 1; + r >= 0; + r-- + ) + (i = t.dom.create("div")), e.insertBefore(i, a[r]), o(i, a[r]); + return e ? e.innerHTML : ""; + }, + getLastRng: function() { + return n; + }, + isDefault: function() { + var e, + t = o(); + return (e = t) && "mcepastebin" === e.id && s(t.innerHTML); + }, + isDefaultContent: (s = function(e) { + return e === r; + }) + }), + h = "data:text/mce-internal,", + y = C.createIdGenerator("mceclip"); + function b(t, n) { + var r = n || p.isMarked(t), + a = M.process(e, p.unmark(t), r); + !1 === a.cancelled && H.insertContent(e, a.content); + } + function x(t) { + (t = e.dom.encode(t).replace(/\r\n/g, "\n")), + b( + (t = P.convert( + t, + e.settings.forced_root_block, + e.settings.forced_root_block_attrs + )), + !1 + ); + } + function w(e) { + var t = {}; + if (e) { + if (e.getData) { + var n = e.getData("Text"); + n && n.length > 0 && -1 === n.indexOf(h) && (t["text/plain"] = n); + } + if (e.types) + for (var r = 0; r < e.types.length; r++) { + var a = e.types[r]; + try { + t[a] = e.getData(a); + } catch (i) { + t[a] = ""; + } + } + } + return t; + } + function T(e) { + return k(e, "text/html") || k(e, "text/plain"); + } + function _(t, n, r) { + t && (e.selection.setRng(t), (t = null)); + var a, + i, + o, + s, + l, + u, + c = n.result, + f = -1 !== (i = (a = c).indexOf(",")) ? a.substr(i + 1) : null, + d = y(), + m = + e.settings.images_reuse_filename && r.name + ? ((o = r.name), + (s = o.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i)) + ? e.dom.encode(s[1]) + : null) + : d, + p = new Image(); + if ( + ((p.src = c), + (l = e.settings), + (u = p), + !l.images_dataimg_filter || l.images_dataimg_filter(u)) + ) { + var g, + v = e.editorUpload.blobCache, + h = void 0; + (g = v.findFirst(function(e) { + return e.base64() === f; + })) + ? (h = g) + : ((h = v.create(d, r, f, m)), v.add(h)), + b('', !1); + } else b('', !1); + } + function D(t, n) { + var r = t.clipboardData || t.dataTransfer; + function a(e) { + var r, + a, + i, + o = !1; + if (e) + for (r = 0; r < e.length; r++) + if (((a = e[r]), /^image\/(jpeg|png|gif|bmp)$/.test(a.type))) { + var s = a.getAsFile ? a.getAsFile() : a; + ((i = new window.FileReader()).onload = _.bind(null, n, i, s)), + i.readAsDataURL(s), + t.preventDefault(), + (o = !0); + } + return o; + } + if (e.settings.paste_data_images && r) return a(r.items) || a(r.files); + } + function k(e, t) { + return t in e && e[t].length > 0; + } + function R(e) { + return ( + (f.metaKeyPressed(e) && 86 === e.keyCode) || + (e.shiftKey && 45 === e.keyCode) + ); + } + function E() { + function t(t, n, r, a) { + var i, o; + k(t, "text/html") + ? (i = t["text/html"]) + : ((i = v.getHtml()), + (a = a || p.isMarked(i)), + v.isDefaultContent(i) && (r = !0)), + (i = C.trimHtml(i)), + v.remove(), + (o = !1 === a && P.isPlainText(i)), + (i.length && !o) || (r = !0), + r && + (i = k(t, "text/plain") && o ? t["text/plain"] : C.innerText(i)), + v.isDefaultContent(i) + ? n || + e.windowManager.alert( + "Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents." + ) + : r + ? x(i) + : b(i, a); + } + e.on("keydown", function(t) { + function n(e) { + R(e) && !e.isDefaultPrevented() && v.remove(); + } + if (R(t) && !t.isDefaultPrevented()) { + if ( + (d = t.shiftKey && 86 === t.keyCode) && + l.webkit && + -1 !== navigator.userAgent.indexOf("Version/") + ) + return; + if ( + (t.stopImmediatePropagation(), + (g = new Date().getTime()), + l.ie && d) + ) + return t.preventDefault(), void a.firePaste(e, !0); + v.remove(), + v.create(), + e.once("keyup", n), + e.once("paste", function() { + e.off("keyup", n); + }); + } + }), + e.on("paste", function(n) { + var r, + a, + i = new Date().getTime(), + o = ((r = w(n.clipboardData || e.getDoc().dataTransfer)), + C.isMsEdge() ? c.extend(r, { "text/html": "" }) : r), + s = new Date().getTime() - i, + f = new Date().getTime() - g - s < 1e3, + h = "text" === m.pasteFormat || d, + P = k(o, p.internalHtmlMime()); + (d = !1), + n.isDefaultPrevented() || + ((a = n.clipboardData), + -1 !== navigator.userAgent.indexOf("Android") && + a && + a.items && + 0 === a.items.length) + ? v.remove() + : T(o) || !D(n, v.getLastRng() || e.selection.getRng()) + ? (f || n.preventDefault(), + !l.ie || + (f && !n.ieFake) || + k(o, "text/html") || + (v.create(), + e.dom.bind(v.getEl(), "paste", function(e) { + e.stopPropagation(); + }), + e.getDoc().execCommand("Paste", !1, null), + (o["text/html"] = v.getHtml())), + k(o, "text/html") + ? (n.preventDefault(), + P || (P = p.isMarked(o["text/html"])), + t(o, f, h, P)) + : u.setEditorTimeout( + e, + function() { + t(o, f, h, P); + }, + 0 + )) + : v.remove(); + }); + } + (m.pasteFormat = i.isPasteAsTextEnabled(e) ? "text" : "html"), + (m.pasteHtml = b), + (m.pasteText = x), + (m.pasteImageData = D), + (m.getDataTransferItems = w), + (m.hasHtmlOrText = T), + (m.hasContentType = k), + e.on("preInit", function() { + var t; + E(), + e.parser.addNodeFilter("img", function(n, r, a) { + function i(e) { + e.attr("data-mce-object") || + t === l.transparentSrc || + e.remove(); + } + if ( + !e.settings.paste_data_images && + (s = a).data && + !0 === s.data.paste + ) + for (var o = n.length; o--; ) + (t = n[o].attributes.map.src) && + (0 === t.indexOf("webkit-fake-url") + ? i(n[o]) + : e.settings.allow_html_data_urls || + 0 !== t.indexOf("data:") || + i(n[o])); + var s; + }); + }); + }, + L = function() {}, + $ = function(e, t, n) { + if ( + ((r = e), + !1 !== l.iOS || + r === undefined || + "function" != typeof r.setData || + !0 === C.isMsEdge()) + ) + return !1; + try { + return ( + e.clearData(), + e.setData("text/html", t), + e.setData("text/plain", n), + e.setData(p.internalHtmlMime(), t), + !0 + ); + } catch (a) { + return !1; + } + var r; + }, + W = function(e, t, n, r) { + $(e.clipboardData, t.html, t.text) + ? (e.preventDefault(), r()) + : n(t.html, r); + }, + j = function(e) { + return function(t, n) { + var r = p.mark(t), + a = e.dom.create("div", { + contenteditable: "false", + "data-mce-bogus": "all" + }), + i = e.dom.create("div", { contenteditable: "true" }, r); + e.dom.setStyles(a, { + position: "fixed", + left: "-3000px", + width: "1000px", + overflow: "hidden" + }), + a.appendChild(i), + e.dom.add(e.getBody(), a); + var o = e.selection.getRng(); + i.focus(); + var s = e.dom.createRng(); + s.selectNodeContents(i), + e.selection.setRng(s), + setTimeout(function() { + a.parentNode.removeChild(a), e.selection.setRng(o), n(); + }, 0); + }; + }, + U = function(e) { + return { + html: e.selection.getContent({ contextual: !0 }), + text: e.selection.getContent({ format: "text" }) + }; + }, + V = function(e) { + var t, n; + e.on( + "cut", + ((t = e), + function(e) { + !1 === t.selection.isCollapsed() && + W(e, U(t), j(t), function() { + setTimeout(function() { + t.execCommand("Delete"); + }, 0); + }); + }) + ), + e.on( + "copy", + ((n = e), + function(e) { + !1 === n.selection.isCollapsed() && W(e, U(n), j(n), L); + }) + ); + }, + z = tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"), + K = function(e, t) { + return z.getCaretRangeFromPoint(t.clientX, t.clientY, e.getDoc()); + }, + G = function(e, t) { + e.focus(), e.selection.setRng(t); + }, + X = function(e, t, n) { + i.shouldBlockDrop(e) && + e.on("dragend dragover draggesture dragdrop drop drag", function(e) { + e.preventDefault(), e.stopPropagation(); + }), + i.shouldPasteDataImages(e) || + e.on("drop", function(e) { + var t = e.dataTransfer; + t && t.files && t.files.length > 0 && e.preventDefault(); + }), + e.on("drop", function(r) { + var a, o; + if (((o = K(e, r)), !r.isDefaultPrevented() && !n.get())) { + a = t.getDataTransferItems(r.dataTransfer); + var s, + l = t.hasContentType(a, p.internalHtmlMime()); + if ( + ((t.hasHtmlOrText(a) && + (!(s = a["text/plain"]) || 0 !== s.indexOf("file://"))) || + !t.pasteImageData(r, o)) && + o && + i.shouldFilterDrop(e) + ) { + var c = a["mce-internal"] || a["text/html"] || a["text/plain"]; + c && + (r.preventDefault(), + u.setEditorTimeout(e, function() { + e.undoManager.transact(function() { + a["mce-internal"] && e.execCommand("Delete"), + G(e, o), + (c = C.trimHtml(c)), + a["text/html"] ? t.pasteHtml(c, l) : t.pasteText(c); + }); + })); + } + } + }), + e.on("dragstart", function(e) { + n.set(!0); + }), + e.on("dragover dragend", function(t) { + i.shouldPasteDataImages(e) && + !1 === n.get() && + (t.preventDefault(), G(e, K(e, t))), + "dragend" === t.type && n.set(!1); + }); + }, + q = function(e) { + var t = e.plugins.paste, + n = i.getPreProcess(e); + n && + e.on("PastePreProcess", function(e) { + n.call(t, t, e); + }); + var r = i.getPostProcess(e); + r && + e.on("PastePostProcess", function(e) { + r.call(t, t, e); + }); + }; + function Y(e, t) { + e.on("PastePreProcess", function(n) { + n.content = t(e, n.content, n.internal, n.wordContent); + }); + } + function Z(e, t) { + if (!R.isWordContent(t)) return t; + var n = []; + c.each(e.schema.getBlockElements(), function(e, t) { + n.push(t); + }); + var r = new RegExp( + "(?:
     [\\s\\r\\n]+|
    )*(<\\/?(" + + n.join("|") + + ")[^>]*>)(?:
     [\\s\\r\\n]+|
    )*", + "g" + ); + return ( + (t = C.filter(t, [[r, "$1"]])), + (t = C.filter(t, [ + [/

    /g, "

    "], + [/
    /g, " "], + [/

    /g, "
    "] + ])) + ); + } + function J(e, t, n, r) { + if (r || n) return t; + var a = i.getWebkitStyles(e); + if (!1 === i.shouldRemoveWebKitStyles(e) || "all" === a) return t; + if ((a && (a = a.split(/[, ]/)), a)) { + var o = e.dom, + s = e.selection.getNode(); + t = t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, function(e, t, n, r) { + var i = o.parseStyle(o.decode(n), "span"), + l = {}; + if ("none" === a) return t + r; + for (var u = 0; u < a.length; u++) { + var c = i[a[u]], + f = o.getStyle(s, a[u], !0); + /color/.test(a[u]) && ((c = o.toHex(c)), (f = o.toHex(f))), + f !== c && (l[a[u]] = c); + } + return (l = o.serializeStyle(l, "span")) + ? t + ' style="' + l + '"' + r + : t + r; + }); + } else t = t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, "$1$3"); + return (t = t.replace( + /(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, + function(e, t, n, r) { + return t + ' style="' + n + '"' + r; + } + )); + } + function Q(e, t) { + e.$("a", t) + .find("font,u") + .each(function(t, n) { + e.dom.remove(n, !0); + }); + } + var ee = function(e) { + var t, n; + l.webkit && Y(e, J), + l.ie && + (Y(e, Z), + (n = Q), + (t = e).on("PastePostProcess", function(e) { + n(t, e.node); + })); + }, + te = function(e) { + return function() { + return e; + }; + }, + ne = function(e) { + for ( + var t = new Array(arguments.length - 1), n = 1; + n < arguments.length; + n++ + ) + t[n - 1] = arguments[n]; + return function() { + for (var n = new Array(arguments.length), r = 0; r < n.length; r++) + n[r] = arguments[r]; + var a = t.concat(n); + return e.apply(null, a); + }; + }, + re = (te(!1), + te(!0), + function(e, t) { + var n = ne( + (te(!1), + te(!0), + function(e, t, n) { + var r = n.control; + r.active("text" === t.pasteFormat), + e.on("PastePlainTextToggle", function(e) { + r.active(e.state); + }); + }), + e, + t + ); + e.addButton("pastetext", { + active: !1, + icon: "pastetext", + tooltip: "Paste as text", + cmd: "mceTogglePlainTextPaste", + onPostRender: n + }), + e.addMenuItem("pastetext", { + text: "Paste as text", + selectable: !0, + active: t.pasteFormat, + cmd: "mceTogglePlainTextPaste", + onPostRender: n + }); + }), + ae = e(!1); + t.add("paste", function(t) { + if (!1 === n(t)) { + var a = new N(t), + i = ee(t), + o = e(!1); + return re(t, a), s(t, a, ae), q(t), V(t), X(t, a, o), r(a, i); + } + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + a = tinymce.util.Tools.resolve("tinymce.Env"), + n = function(e) { + return e.getParam("pagebreak_separator", "\x3c!-- pagebreak --\x3e"); + }, + t = function(e) { + return e.getParam("pagebreak_split_block", !1); + }, + r = function() { + return "mce-pagebreak"; + }, + c = function() { + return ( + '' + ); + }, + o = function(e) { + var a = n(e), + r = new RegExp( + a.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(e) { + return "\\" + e; + }), + "gi" + ); + e.on("BeforeSetContent", function(e) { + e.content = e.content.replace(r, c()); + }), + e.on("PreInit", function() { + e.serializer.addNodeFilter("img", function(n) { + for (var r, c, o = n.length; o--; ) + if ( + (c = (r = n[o]).attr("class")) && + -1 !== c.indexOf("mce-pagebreak") + ) { + var i = r.parent; + if (e.schema.getBlockElements()[i.name] && t(e)) { + (i.type = 3), (i.value = a), (i.raw = !0), r.remove(); + continue; + } + (r.type = 3), (r.value = a), (r.raw = !0); + } + }); + }); + }, + i = c, + g = r, + u = function(e) { + e.addCommand("mcePageBreak", function() { + e.settings.pagebreak_split_block + ? e.insertContent("

    " + i() + "

    ") + : e.insertContent(i()); + }); + }, + m = function(e) { + e.on("ResolveName", function(a) { + "IMG" === a.target.nodeName && + e.dom.hasClass(a.target, g()) && + (a.name = "pagebreak"); + }); + }, + s = function(e) { + e.addButton("pagebreak", { title: "Page break", cmd: "mcePageBreak" }), + e.addMenuItem("pagebreak", { + text: "Page break", + icon: "pagebreak", + cmd: "mcePageBreak", + context: "insert" + }); + }; + e.add("pagebreak", function(e) { + u(e), s(e), o(e), m(e); + }); +})(); +!(function() { + "use strict"; + var t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = tinymce.util.Tools.resolve("tinymce.util.Tools"), + e = function(t) { + return t.getParam("noneditable_noneditable_class", "mceNonEditable"); + }, + r = function(t) { + return t.getParam("noneditable_editable_class", "mceEditable"); + }, + a = function(t) { + var n = t.getParam("noneditable_regexp", []); + return n && n.constructor === RegExp ? [n] : n; + }, + i = function(t) { + return function(n) { + return -1 !== (" " + n.attr("class") + " ").indexOf(t); + }; + }, + o = function(t, n, e) { + return function(r) { + var a = arguments, + i = a[a.length - 2], + o = i > 0 ? n.charAt(i - 1) : ""; + if ('"' === o) return r; + if (">" === o) { + var c = n.lastIndexOf("<", i); + if ( + -1 !== c && + -1 !== n.substring(c, i).indexOf('contenteditable="false"') + ) + return r; + } + return ( + '' + + t.dom.encode("string" == typeof a[1] ? a[1] : a[0]) + + "" + ); + }; + }, + c = function(t) { + var c, + l, + u = "contenteditable"; + (c = " " + n.trim(r(t)) + " "), (l = " " + n.trim(e(t)) + " "); + var f = i(c), + s = i(l), + d = a(t); + t.on("PreInit", function() { + d.length > 0 && + t.on("BeforeSetContent", function(n) { + !(function(t, n, r) { + var a = n.length, + i = r.content; + if ("raw" !== r.format) { + for (; a--; ) i = i.replace(n[a], o(t, i, e(t))); + r.content = i; + } + })(t, d, n); + }), + t.parser.addAttributeFilter("class", function(t) { + for (var n, e = t.length; e--; ) + (n = t[e]), f(n) ? n.attr(u, "true") : s(n) && n.attr(u, "false"); + }), + t.serializer.addAttributeFilter(u, function(t) { + for (var n, e = t.length; e--; ) + (n = t[e]), + (f(n) || s(n)) && + (d.length > 0 && n.attr("data-mce-content") + ? ((n.name = "#text"), + (n.type = 3), + (n.raw = !0), + (n.value = n.attr("data-mce-content"))) + : n.attr(u, null)); + }); + }); + }; + t.add("noneditable", function(t) { + c(t); + }); +})(); +!(function() { + "use strict"; + var n = tinymce.util.Tools.resolve("tinymce.PluginManager"), + e = function(n, e) { + var t, + a = + (t = n).plugins.visualchars && t.plugins.visualchars.isEnabled() + ? ' ' + : " "; + n.insertContent( + (function(n, e) { + for (var t = "", a = 0; a < e; a++) t += n; + return t; + })(a, e) + ), + n.dom.setAttrib(n.dom.select("span.mce-nbsp"), "data-mce-bogus", "1"); + }, + t = function(n) { + n.addCommand("mceNonBreaking", function() { + e(n, 1); + }); + }, + a = tinymce.util.Tools.resolve("tinymce.util.VK"), + i = function(n) { + var e = n.getParam("nonbreaking_force_tab", 0); + return "boolean" == typeof e ? (!0 === e ? 3 : 0) : e; + }, + o = function(n) { + var t = i(n); + t > 0 && + n.on("keydown", function(i) { + if (i.keyCode === a.TAB && !i.isDefaultPrevented()) { + if (i.shiftKey) return; + i.preventDefault(), i.stopImmediatePropagation(), e(n, t); + } + }); + }, + r = function(n) { + n.addButton("nonbreaking", { + title: "Nonbreaking space", + cmd: "mceNonBreaking" + }), + n.addMenuItem("nonbreaking", { + text: "Nonbreaking space", + cmd: "mceNonBreaking", + context: "insert" + }); + }; + n.add("nonbreaking", function(n) { + t(n), r(n), o(n); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.Env"), + r = tinymce.util.Tools.resolve("tinymce.util.Tools"), + i = function(e) { + return e.getParam("media_scripts"); + }, + a = function(e) { + return e.getParam("audio_template_callback"); + }, + o = function(e) { + return e.getParam("video_template_callback"); + }, + n = function(e) { + return e.getParam("media_live_embeds", !0); + }, + c = function(e) { + return e.getParam("media_filter_html", !0); + }, + s = function(e) { + return e.getParam("media_url_resolver"); + }, + u = function(e) { + return e.getParam("media_alt_source", !0); + }, + l = function(e) { + return e.getParam("media_poster", !0); + }, + m = function(e) { + return e.getParam("media_dimensions", !0); + }, + d = tinymce.util.Tools.resolve("tinymce.html.SaxParser"), + h = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + p = function(e, t) { + if (e) + for (var r = 0; r < e.length; r++) + if (-1 !== t.indexOf(e[r].filter)) return e[r]; + }, + f = function(e) { + return function(t) { + return t ? t.style[e].replace(/px$/, "") : ""; + }; + }, + g = function(e) { + return function(t, r) { + var i; + t && (t.style[e] = /^[0-9.]+$/.test((i = r)) ? i + "px" : i); + }; + }, + w = { + getMaxWidth: f("maxWidth"), + getMaxHeight: f("maxHeight"), + setMaxWidth: g("maxWidth"), + setMaxHeight: g("maxHeight") + }, + v = h.DOM, + b = function(e) { + return v.getAttrib(e, "data-ephox-embed-iri"); + }, + y = function(e, t) { + return ( + (s = t), + (u = v.createFragment(s)), + "" !== b(u.firstChild) + ? ((n = t), + (c = v.createFragment(n).firstChild), + { + type: "ephox-embed-iri", + source1: b(c), + source2: "", + poster: "", + width: w.getMaxWidth(c), + height: w.getMaxHeight(c) + }) + : ((i = e), + (a = t), + (o = {}), + new d({ + validate: !1, + allow_conditional_comments: !0, + special: "script,noscript", + start: function(e, t) { + if ( + (o.source1 || "param" !== e || (o.source1 = t.map.movie), + ("iframe" !== e && + "object" !== e && + "embed" !== e && + "video" !== e && + "audio" !== e) || + (o.type || (o.type = e), (o = r.extend(t.map, o))), + "script" === e) + ) { + var a = p(i, t.map.src); + if (!a) return; + o = { + type: "script", + source1: t.map.src, + width: a.width, + height: a.height + }; + } + "source" === e && + (o.source1 + ? o.source2 || (o.source2 = t.map.src) + : (o.source1 = t.map.src)), + "img" !== e || o.poster || (o.poster = t.map.src); + } + }).parse(a), + (o.source1 = o.source1 || o.src || o.data), + (o.source2 = o.source2 || ""), + (o.poster = o.poster || ""), + o) + ); + var i, a, o, n, c, s, u; + }, + x = tinymce.util.Tools.resolve("tinymce.util.Promise"), + j = function(e) { + var t = { + mp3: "audio/mpeg", + wav: "audio/wav", + mp4: "video/mp4", + webm: "video/webm", + ogg: "video/ogg", + swf: "application/x-shockwave-flash" + }[ + e + .toLowerCase() + .split(".") + .pop() + ]; + return t || ""; + }, + M = tinymce.util.Tools.resolve("tinymce.html.Writer"), + _ = tinymce.util.Tools.resolve("tinymce.html.Schema"), + C = h.DOM, + S = function(e, t) { + var r, i, a, o; + for (r in t) + if (((a = "" + t[r]), e.map[r])) + for (i = e.length; i--; ) + (o = e[i]).name === r && + (a + ? ((e.map[r] = a), (o.value = a)) + : (delete e.map[r], e.splice(i, 1))); + else a && (e.push({ name: r, value: a }), (e.map[r] = a)); + }, + k = function(e, t) { + var r, + i, + a = C.createFragment(e).firstChild; + return ( + w.setMaxWidth(a, t.width), + w.setMaxHeight(a, t.height), + (r = a.outerHTML), + (i = M()), + new d(i).parse(r), + i.getContent() + ); + }, + A = function(e, t, r) { + return ( + (u = e), + (l = C.createFragment(u)), + "" !== C.getAttrib(l.firstChild, "data-ephox-embed-iri") + ? k(e, t) + : ((i = e), + (a = t), + (o = r), + (c = M()), + (s = 0), + new d( + { + validate: !1, + allow_conditional_comments: !0, + special: "script,noscript", + comment: function(e) { + c.comment(e); + }, + cdata: function(e) { + c.cdata(e); + }, + text: function(e, t) { + c.text(e, t); + }, + start: function(e, t, r) { + switch (e) { + case "video": + case "object": + case "embed": + case "img": + case "iframe": + a.height !== undefined && + a.width !== undefined && + S(t, { width: a.width, height: a.height }); + } + if (o) + switch (e) { + case "video": + S(t, { poster: a.poster, src: "" }), + a.source2 && S(t, { src: "" }); + break; + case "iframe": + S(t, { src: a.source1 }); + break; + case "source": + if ( + ++s <= 2 && + (S(t, { + src: a["source" + s], + type: a["source" + s + "mime"] + }), + !a["source" + s]) + ) + return; + break; + case "img": + if (!a.poster) return; + n = !0; + } + c.start(e, t, r); + }, + end: function(e) { + if ("video" === e && o) + for (var t = 1; t <= 2; t++) + if (a["source" + t]) { + var r = []; + (r.map = {}), + s < t && + (S(r, { + src: a["source" + t], + type: a["source" + t + "mime"] + }), + c.start("source", r, !0)); + } + if (a.poster && "object" === e && o && !n) { + var i = []; + (i.map = {}), + S(i, { src: a.poster, width: a.width, height: a.height }), + c.start("img", i, !0); + } + c.end(e); + } + }, + _({}) + ).parse(i), + c.getContent()) + ); + var i, a, o, n, c, s, u, l; + }, + F = [ + { + regex: /youtu\.be\/([\w\-.]+)/, + type: "iframe", + w: 560, + h: 314, + url: "//www.youtube.com/embed/$1", + allowFullscreen: !0 + }, + { + regex: /youtube\.com(.+)v=([^&]+)/, + type: "iframe", + w: 560, + h: 314, + url: "//www.youtube.com/embed/$2", + allowFullscreen: !0 + }, + { + regex: /youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i, + type: "iframe", + w: 560, + h: 314, + url: "//www.youtube.com/embed/$1", + allowFullscreen: !0 + }, + { + regex: /vimeo\.com\/([0-9]+)/, + type: "iframe", + w: 425, + h: 350, + url: + "//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc", + allowfullscreen: !0 + }, + { + regex: /vimeo\.com\/(.*)\/([0-9]+)/, + type: "iframe", + w: 425, + h: 350, + url: "//player.vimeo.com/video/$2?title=0&byline=0", + allowfullscreen: !0 + }, + { + regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, + type: "iframe", + w: 425, + h: 350, + url: '//maps.google.com/maps/ms?msid=$2&output=embed"', + allowFullscreen: !1 + }, + { + regex: /dailymotion\.com\/video\/([^_]+)/, + type: "iframe", + w: 480, + h: 270, + url: "//www.dailymotion.com/embed/video/$1", + allowFullscreen: !0 + }, + { + regex: /dai\.ly\/([^_]+)/, + type: "iframe", + w: 480, + h: 270, + url: "//www.dailymotion.com/embed/video/$1", + allowFullscreen: !0 + } + ], + N = function(e, t) { + var n = r.extend({}, t); + if (!n.source1 && (r.extend(n, y(i(e), n.embed)), !n.source1)) return ""; + if ( + (n.source2 || (n.source2 = ""), + n.poster || (n.poster = ""), + (n.source1 = e.convertURL(n.source1, "source")), + (n.source2 = e.convertURL(n.source2, "source")), + (n.source1mime = j(n.source1)), + (n.source2mime = j(n.source2)), + (n.poster = e.convertURL(n.poster, "poster")), + r.each(F, function(e) { + var t, + r, + i = e.regex.exec(n.source1); + if (i) { + for (r = e.url, t = 0; i[t]; t++) + r = r.replace("$" + t, function() { + return i[t]; + }); + (n.source1 = r), + (n.type = e.type), + (n.allowFullscreen = e.allowFullscreen), + (n.width = n.width || e.w), + (n.height = n.height || e.h); + } + }), + n.embed) + ) + return A(n.embed, n, !0); + var c = p(i(e), n.source1); + c && ((n.type = "script"), (n.width = c.width), (n.height = c.height)); + var s, + u, + l, + m, + d, + h, + f, + g, + w = a(e), + v = o(e); + return ( + (n.width = n.width || 300), + (n.height = n.height || 150), + r.each(n, function(t, r) { + n[r] = e.dom.encode(t); + }), + "iframe" === n.type + ? ((g = (f = n).allowFullscreen ? ' allowFullscreen="1"' : ""), + '") + : "application/x-shockwave-flash" === n.source1mime + ? ((h = + ''), + d.poster && + (h += + ''), + (h += "")) + : -1 !== n.source1mime.indexOf("audio") + ? ((l = n), + (m = w) + ? m(l) + : '") + : "script" === n.type + ? '' + : ((s = n), + (u = v) + ? u(s) + : '") + ); + }, + O = {}, + P = function(e) { + return function(t) { + return N(e, t); + }; + }, + T = function(e, t) { + var r, + i, + a, + o, + n, + c = s(e); + return c + ? ((a = t), + (o = P(e)), + (n = c), + new x(function(e, t) { + var r = function(t) { + return ( + t.html && (O[a.source1] = t), + e({ url: a.source1, html: t.html ? t.html : o(a) }) + ); + }; + O[a.source1] ? r(O[a.source1]) : n({ url: a.source1 }, r, t); + })) + : ((r = t), + (i = P(e)), + new x(function(e) { + e({ html: i(r), url: r.source1 }); + })); + }, + z = function(e) { + return O.hasOwnProperty(e); + }, + $ = function(e, t) { + e.state.set("oldVal", e.value()), t.state.set("oldVal", t.value()); + }, + L = function(e, t) { + var r = e.find("#width")[0], + i = e.find("#height")[0], + a = e.find("#constrain")[0]; + r && i && a && t(r, i, a.checked()); + }, + H = function(e, t, r) { + var i = e.state.get("oldVal"), + a = t.state.get("oldVal"), + o = e.value(), + n = t.value(); + r && + i && + a && + o && + n && + (o !== i + ? ((n = Math.round((o / i) * n)), isNaN(n) || t.value(n)) + : ((o = Math.round((n / a) * o)), isNaN(o) || e.value(o))), + $(e, t); + }, + W = function(e) { + L(e, H); + }, + J = function(e) { + var t = function() { + e(function(e) { + W(e); + }); + }; + return { + type: "container", + label: "Dimensions", + layout: "flex", + align: "center", + spacing: 5, + items: [ + { + name: "width", + type: "textbox", + maxLength: 5, + size: 5, + onchange: t, + ariaLabel: "Width" + }, + { type: "label", text: "x" }, + { + name: "height", + type: "textbox", + maxLength: 5, + size: 5, + onchange: t, + ariaLabel: "Height" + }, + { + name: "constrain", + type: "checkbox", + checked: !0, + text: "Constrain proportions" + } + ] + }; + }, + R = function(e) { + L(e, $); + }, + D = W, + E = t.ie && t.ie <= 8 ? "onChange" : "onInput", + I = function(e) { + return function(t) { + var r = + t && t.msg + ? "Media embed handler error: " + t.msg + : "Media embed handler threw unknown error."; + e.notificationManager.open({ type: "error", text: r }); + }; + }, + U = function(e, t) { + return function(a) { + var o = a.html, + n = e.find("#embed")[0], + c = r.extend(y(i(t), o), { source1: a.url }); + e.fromJSON(c), n && (n.value(o), D(e)); + }; + }, + V = function(e, t) { + var r = e.dom.select("img[data-mce-object]"); + e.insertContent(t), + (function(e, t) { + var r, + i, + a = e.dom.select("img[data-mce-object]"); + for (r = 0; r < t.length; r++) + for (i = a.length - 1; i >= 0; i--) t[r] === a[i] && a.splice(i, 1); + e.selection.select(a[0]); + })(e, r), + e.nodeChanged(); + }, + B = function(e) { + var t, + a, + o, + n, + c, + s = [ + { + name: "source1", + type: "filepicker", + filetype: "media", + size: 40, + autofocus: !0, + label: "Source", + onpaste: function() { + setTimeout(function() { + T(e, t.toJSON()) + .then(U(t, e)) + ["catch"](I(e)); + }, 1); + }, + onchange: function(i) { + var a, o; + T(e, t.toJSON()) + .then(U(t, e)) + ["catch"](I(e)), + (a = t), + (o = i.meta), + r.each(o, function(e, t) { + a.find("#" + t).value(e); + }); + }, + onbeforecall: function(e) { + e.meta = t.toJSON(); + } + } + ], + d = []; + if ( + (u(e) && + d.push({ + name: "source2", + type: "filepicker", + filetype: "media", + size: 40, + label: "Alternative source" + }), + l(e) && + d.push({ + name: "poster", + type: "filepicker", + filetype: "image", + size: 40, + label: "Poster" + }), + m(e)) + ) { + var h = J(function(e) { + e(t), (a = t.toJSON()), t.find("#embed").value(A(a.embed, a)); + }); + s.push(h); + } + (n = (o = e).selection.getNode()), + (c = n.getAttribute("data-ephox-embed-iri")), + (a = c + ? { + source1: c, + "data-ephox-embed-iri": c, + width: w.getMaxWidth(n), + height: w.getMaxHeight(n) + } + : n.getAttribute("data-mce-object") + ? y(i(o), o.serializer.serialize(n, { selection: !0 })) + : {}); + var p = { + id: "mcemediasource", + type: "textbox", + flex: 1, + name: "embed", + value: (function(e) { + var t = e.selection.getNode(); + if ( + t.getAttribute("data-mce-object") || + t.getAttribute("data-ephox-embed-iri") + ) + return e.selection.getContent(); + })(e), + multiline: !0, + rows: 5, + label: "Source" + }; + (p[E] = function() { + (a = r.extend({}, y(i(e), this.value()))), + this.parent() + .parent() + .fromJSON(a); + }), + (t = e.windowManager.open({ + title: "Insert/edit media", + data: a, + bodyType: "tabpanel", + body: [ + { title: "General", type: "form", items: s }, + { + title: "Embed", + type: "container", + layout: "flex", + direction: "column", + align: "stretch", + padding: 10, + spacing: 10, + items: [ + { + type: "label", + text: "Paste your embed code below:", + forId: "mcemediasource" + }, + p + ] + }, + { title: "Advanced", type: "form", items: d } + ], + onSubmit: function() { + var r, i; + D(t), + (r = e), + ((i = t.toJSON()).embed = A(i.embed, i)), + i.embed && z(i.source1) + ? V(r, i.embed) + : T(r, i) + .then(function(e) { + V(r, e.html); + }) + ["catch"](I(r)); + } + })), + R(t); + }, + G = function(e) { + return { + showDialog: function() { + B(e); + } + }; + }, + q = function(e) { + e.addCommand("mceMedia", function() { + B(e); + }); + }, + K = tinymce.util.Tools.resolve("tinymce.html.Node"), + Q = function(e, t) { + if (!1 === c(e)) return t; + var r, + i = M(); + return ( + new d( + { + validate: !1, + allow_conditional_comments: !1, + special: "script,noscript", + comment: function(e) { + i.comment(e); + }, + cdata: function(e) { + i.cdata(e); + }, + text: function(e, t) { + i.text(e, t); + }, + start: function(t, a, o) { + if (((r = !0), "script" !== t && "noscript" !== t)) { + for (var n = 0; n < a.length; n++) { + if (0 === a[n].name.indexOf("on")) return; + "style" === a[n].name && + (a[n].value = e.dom.serializeStyle( + e.dom.parseStyle(a[n].value), + t + )); + } + i.start(t, a, o), (r = !1); + } + }, + end: function(e) { + r || i.end(e); + } + }, + _({}) + ).parse(t), + i.getContent() + ); + }, + X = function(e, r) { + var i, + a = r.name; + return ( + ((i = new K("img", 1)).shortEnded = !0), + Z(e, r, i), + i.attr({ + width: r.attr("width") || "300", + height: r.attr("height") || ("audio" === a ? "30" : "150"), + style: r.attr("style"), + src: t.transparentSrc, + "data-mce-object": a, + class: "mce-object mce-object-" + a + }), + i + ); + }, + Y = function(e, t) { + var r, + i, + a, + o = t.name; + return ( + (r = new K("span", 1)).attr({ + contentEditable: "false", + style: t.attr("style"), + "data-mce-object": o, + class: "mce-preview-object mce-object-" + o + }), + Z(e, t, r), + (i = new K(o, 1)).attr({ + src: t.attr("src"), + allowfullscreen: t.attr("allowfullscreen"), + width: t.attr("width") || "300", + height: t.attr("height") || ("audio" === o ? "30" : "150"), + frameborder: "0" + }), + (a = new K("span", 1)).attr("class", "mce-shim"), + r.append(i), + r.append(a), + r + ); + }, + Z = function(e, t, r) { + var i, a, o, n, c; + for (n = (o = t.attributes).length; n--; ) + (i = o[n].name), + (a = o[n].value), + "width" !== i && + "height" !== i && + "style" !== i && + (("data" !== i && "src" !== i) || (a = e.convertURL(a, i)), + r.attr("data-mce-p-" + i, a)); + (c = t.firstChild && t.firstChild.value) && + (r.attr("data-mce-html", escape(Q(e, c))), (r.firstChild = null)); + }, + ee = function(e) { + for (; (e = e.parent); ) if (e.attr("data-ephox-embed-iri")) return !0; + return !1; + }, + te = function(e) { + return function(r) { + for (var a, o, c = r.length; c--; ) + (a = r[c]).parent && + (a.parent.attr("data-mce-object") || + (("script" !== a.name || (o = p(i(e), a.attr("src")))) && + (o && + (o.width && a.attr("width", o.width.toString()), + o.height && a.attr("height", o.height.toString())), + "iframe" === a.name && n(e) && t.ceFalse + ? ee(a) || a.replace(Y(e, a)) + : ee(a) || a.replace(X(e, a))))); + }; + }, + re = function(e) { + e.on("preInit", function() { + var t = e.schema.getSpecialElements(); + r.each("video audio iframe object".split(" "), function(e) { + t[e] = new RegExp("]*>", "gi"); + }); + var i = e.schema.getBoolAttrs(); + r.each( + "webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "), + function(e) { + i[e] = {}; + } + ), + e.parser.addNodeFilter( + "iframe,video,audio,object,embed,script", + te(e) + ), + e.serializer.addAttributeFilter("data-mce-object", function(t, r) { + for (var i, a, o, n, c, s, u, l, m = t.length; m--; ) + if ((i = t[m]).parent) { + for ( + u = i.attr(r), + a = new K(u, 1), + "audio" !== u && + "script" !== u && + ((l = i.attr("class")) && + -1 !== l.indexOf("mce-preview-object") + ? a.attr({ + width: i.firstChild.attr("width"), + height: i.firstChild.attr("height") + }) + : a.attr({ + width: i.attr("width"), + height: i.attr("height") + })), + a.attr({ style: i.attr("style") }), + o = (n = i.attributes).length; + o--; + + ) { + var d = n[o].name; + 0 === d.indexOf("data-mce-p-") && + a.attr(d.substr(11), n[o].value); + } + "script" === u && a.attr("type", "text/javascript"), + (c = i.attr("data-mce-html")) && + (((s = new K("#text", 3)).raw = !0), + (s.value = Q(e, unescape(c))), + a.append(s)), + i.replace(a); + } + }); + }), + e.on("setContent", function() { + e.$("span.mce-preview-object").each(function(t, r) { + var i = e.$(r); + 0 === i.find("span.mce-shim", r).length && + i.append(''); + }); + }); + }, + ie = function(e) { + e.on("ResolveName", function(e) { + var t; + 1 === e.target.nodeType && + (t = e.target.getAttribute("data-mce-object")) && + (e.name = t); + }); + }, + ae = function(e) { + e.on("click keyup", function() { + var t = e.selection.getNode(); + t && + e.dom.hasClass(t, "mce-preview-object") && + e.dom.getAttrib(t, "data-mce-selected") && + t.setAttribute("data-mce-selected", "2"); + }), + e.on("ObjectSelected", function(e) { + var t = e.target.getAttribute("data-mce-object"); + ("audio" !== t && "script" !== t) || e.preventDefault(); + }), + e.on("objectResized", function(e) { + var t, + r = e.target; + r.getAttribute("data-mce-object") && + (t = r.getAttribute("data-mce-html")) && + ((t = unescape(t)), + r.setAttribute( + "data-mce-html", + escape(A(t, { width: e.width, height: e.height })) + )); + }); + }, + oe = function(e) { + e.addButton("media", { + tooltip: "Insert/edit media", + cmd: "mceMedia", + stateSelector: [ + "img[data-mce-object]", + "span[data-mce-object]", + "div[data-ephox-embed-iri]" + ] + }), + e.addMenuItem("media", { + icon: "media", + text: "Media", + cmd: "mceMedia", + context: "insert", + prependToContext: !0 + }); + }; + e.add("media", function(e) { + return q(e), oe(e), ie(e), re(e), ae(e), G(e); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"), + n = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"), + o = tinymce.util.Tools.resolve("tinymce.util.VK"), + r = tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"), + i = tinymce.util.Tools.resolve("tinymce.util.Tools"), + a = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + s = function(e) { + return e && "BR" === e.nodeName; + }, + d = function(e) { + return e && 3 === e.nodeType; + }, + l = function(e) { + return e && /^(OL|UL|DL)$/.test(e.nodeName); + }, + c = function(e) { + return e && /^(LI|DT|DD)$/.test(e.nodeName); + }, + f = function(e) { + return e && /^(TH|TD)$/.test(e.nodeName); + }, + u = s, + m = function(e) { + return e.parentNode.firstChild === e; + }, + g = function(e) { + return e.parentNode.lastChild === e; + }, + p = function(e, t) { + return t && !!e.schema.getTextBlockElements()[t.nodeName]; + }, + v = function(e, t) { + return e && e.nodeName in t; + }, + h = function(e, t) { + return !!s(t) && !(!e.isBlock(t.nextSibling) || s(t.previousSibling)); + }, + C = function(e, t, n) { + var o = e.isEmpty(t); + return ( + !(n && e.select("span[data-mce-type=bookmark]", t).length > 0) && o + ); + }, + y = function(e, t) { + return e.isChildOf(t, e.getRoot()); + }, + N = function(e, n) { + var o = t.getNode(e, n); + return c(e) && d(o) + ? { container: o, offset: n >= e.childNodes.length ? o.data.length : 0 } + : { container: e, offset: n }; + }, + L = function(e) { + var t = e.cloneRange(), + n = N(e.startContainer, e.startOffset); + t.setStart(n.container, n.offset); + var o = N(e.endContainer, e.endOffset); + return t.setEnd(o.container, o.offset), t; + }, + S = a.DOM, + b = function(e) { + var t = {}, + n = function(n) { + var o, r, i; + (r = e[n ? "startContainer" : "endContainer"]), + (i = e[n ? "startOffset" : "endOffset"]), + 1 === r.nodeType && + ((o = S.create("span", { "data-mce-type": "bookmark" })), + r.hasChildNodes() + ? ((i = Math.min(i, r.childNodes.length - 1)), + n + ? r.insertBefore(o, r.childNodes[i]) + : S.insertAfter(o, r.childNodes[i])) + : r.appendChild(o), + (r = o), + (i = 0)), + (t[n ? "startContainer" : "endContainer"] = r), + (t[n ? "startOffset" : "endOffset"] = i); + }; + return n(!0), e.collapsed || n(), t; + }, + D = function(e) { + function t(t) { + var n, o, r; + (n = r = e[t ? "startContainer" : "endContainer"]), + (o = e[t ? "startOffset" : "endOffset"]), + n && + (1 === n.nodeType && + ((o = (function(e) { + for (var t = e.parentNode.firstChild, n = 0; t; ) { + if (t === e) return n; + (1 === t.nodeType && + "bookmark" === t.getAttribute("data-mce-type")) || + n++, + (t = t.nextSibling); + } + return -1; + })(n)), + (n = n.parentNode), + S.remove(r), + !n.hasChildNodes() && + S.isBlock(n) && + n.appendChild(S.create("br"))), + (e[t ? "startContainer" : "endContainer"] = n), + (e[t ? "startOffset" : "endOffset"] = o)); + } + t(!0), t(); + var n = S.createRng(); + return ( + n.setStart(e.startContainer, e.startOffset), + e.endContainer && n.setEnd(e.endContainer, e.endOffset), + L(n) + ); + }, + k = a.DOM, + T = function(e, t) { + var n, + o = t.parentNode; + "LI" === o.nodeName && + o.firstChild === t && + ((n = o.previousSibling) && "LI" === n.nodeName + ? (n.appendChild(t), C(e, o) && k.remove(o)) + : k.setStyle(o, "listStyleType", "none")), + l(o) && + (n = o.previousSibling) && + "LI" === n.nodeName && + n.appendChild(t); + }, + I = function(e, t) { + i.each(i.grep(e.select("ol,ul", t)), function(t) { + T(e, t); + }); + }, + B = tinymce.util.Tools.resolve("tinymce.dom.DomQuery"), + R = function(e) { + var t = e.selection.getStart(!0); + return e.dom.getParent(t, "OL,UL,DL", O(e, t)); + }, + O = function(e, t) { + var n = e.dom.getParents(t, "TD,TH"); + return n.length > 0 ? n[0] : e.getBody(); + }, + E = { + getParentList: R, + getSelectedSubLists: function(e) { + var t, + n, + o, + r = R(e), + a = e.selection.getSelectedBlocks(); + return ( + (o = a), + (n = r) && 1 === o.length && o[0] === n + ? ((t = r), + i.grep(t.querySelectorAll("ol,ul,dl"), function(e) { + return l(e); + })) + : i.grep(a, function(e) { + return l(e) && r !== e; + }) + ); + }, + getSelectedListItems: function(e) { + var t, + n, + o, + r = e.selection.getSelectedBlocks(); + return i.grep( + ((t = e), + (n = r), + (o = i.map(n, function(e) { + var n = t.dom.getParent(e, "li,dd,dt", O(t, e)); + return n || e; + })), + B.unique(o)), + function(e) { + return c(e); + } + ); + }, + getClosestListRootElm: O + }, + A = tinymce.util.Tools.resolve("tinymce.Env"), + P = a.DOM, + x = function(e, t, n) { + var o, + r, + i, + a = P.createFragment(), + s = e.schema.getBlockElements(); + if ( + (e.settings.forced_root_block && + (n = n || e.settings.forced_root_block), + n && + ((r = P.create(n)).tagName === e.settings.forced_root_block && + P.setAttribs(r, e.settings.forced_root_block_attrs), + v(t.firstChild, s) || a.appendChild(r)), + t) + ) + for (; (o = t.firstChild); ) { + var d = o.nodeName; + i || + ("SPAN" === d && "bookmark" === o.getAttribute("data-mce-type")) || + (i = !0), + v(o, s) + ? (a.appendChild(o), (r = null)) + : n + ? (r || ((r = P.create(n)), a.appendChild(r)), r.appendChild(o)) + : a.appendChild(o); + } + return ( + e.settings.forced_root_block + ? i || + (A.ie && !(A.ie > 10)) || + r.appendChild(P.create("br", { "data-mce-bogus": "1" })) + : a.appendChild(P.create("br")), + a + ); + }, + _ = a.DOM, + M = function(e, t, n, o) { + var r, a, s, d, l; + for ( + s = _.select('span[data-mce-type="bookmark"]', t), + o = o || x(e, n), + (r = _.createRng()).setStartAfter(n), + r.setEndAfter(t), + d = (a = r.extractContents()).firstChild; + d; + d = d.firstChild + ) + if ("LI" === d.nodeName && e.dom.isEmpty(d)) { + _.remove(d); + break; + } + e.dom.isEmpty(a) || _.insertAfter(a, t), + _.insertAfter(o, t), + C(e.dom, n.parentNode) && + ((l = n.parentNode), + i.each(s, function(e) { + l.parentNode.insertBefore(e, n.parentNode); + }), + _.remove(l)), + _.remove(n), + C(e.dom, t) && _.remove(t); + }, + U = a.DOM, + H = function(e, t) { + C(e, t) && U.remove(t); + }, + $ = function(e, t) { + var n, + o = t.parentNode, + r = o.parentNode; + return !( + o !== e.getBody() && + ("DD" === t.nodeName + ? (U.rename(t, "DT"), 0) + : m(t) && g(t) + ? ("LI" === r.nodeName + ? (U.insertAfter(t, r), H(e.dom, r), U.remove(o)) + : l(r) + ? U.remove(o, !0) + : (r.insertBefore(x(e, t), o), U.remove(o)), + 0) + : m(t) + ? ("LI" === r.nodeName + ? (U.insertAfter(t, r), t.appendChild(o), H(e.dom, r)) + : l(r) + ? r.insertBefore(t, o) + : (r.insertBefore(x(e, t), o), U.remove(t)), + 0) + : g(t) + ? ("LI" === r.nodeName + ? U.insertAfter(t, r) + : l(r) + ? U.insertAfter(t, o) + : (U.insertAfter(x(e, t), o), U.remove(t)), + 0) + : ("LI" === r.nodeName + ? ((o = r), (n = x(e, t, "LI"))) + : (n = l(r) ? x(e, t, "LI") : x(e, t)), + M(e, o, t, n), + I(e.dom, o.parentNode), + 0)) + ); + }, + w = $, + K = function(e) { + var t = E.getSelectedListItems(e); + if (t.length) { + var n = b(e.selection.getRng(!0)), + o = void 0, + r = void 0, + i = E.getClosestListRootElm(e, e.selection.getStart(!0)); + for (o = t.length; o--; ) + for (var a = t[o].parentNode; a && a !== i; ) { + for (r = t.length; r--; ) + if (t[r] === a) { + t.splice(o, 1); + break; + } + a = a.parentNode; + } + for (o = 0; o < t.length && ($(e, t[o]) || 0 !== o); o++); + return e.selection.setRng(D(n)), e.nodeChanged(), !0; + } + }, + Q = function(e, t) { + i.each(t, function(t, n) { + e.setAttribute(n, t); + }); + }, + W = function(e, t, n) { + var o, r, a, s, d, l, c; + (o = e), + (r = t), + (s = (a = n)["list-style-type"] ? a["list-style-type"] : null), + o.setStyle(r, "list-style-type", s), + (d = e), + Q((l = t), (c = n)["list-attributes"]), + i.each(d.select("li", l), function(e) { + Q(e, c["list-item-attributes"]); + }); + }, + j = function(e, t, n, o) { + var r, i; + for ( + r = t[n ? "startContainer" : "endContainer"], + i = t[n ? "startOffset" : "endOffset"], + 1 === r.nodeType && + (r = r.childNodes[Math.min(i, r.childNodes.length - 1)] || r), + !n && u(r.nextSibling) && (r = r.nextSibling); + r.parentNode !== o; + + ) { + if (p(e, r)) return r; + if (/^(TD|TH)$/.test(r.parentNode.nodeName)) return r; + r = r.parentNode; + } + return r; + }, + q = function(e, t, n) { + var o, + a = e.selection.getRng(!0), + s = "LI", + d = E.getClosestListRootElm(e, e.selection.getStart(!0)), + c = e.dom; + (n = n || {}), + "false" !== c.getContentEditable(e.selection.getNode()) && + ("DL" === (t = t.toUpperCase()) && (s = "DT"), + (o = b(a)), + i.each( + (function(e, t, n) { + for ( + var o, + a = [], + s = e.dom, + d = j(e, t, !0, n), + l = j(e, t, !1, n), + c = [], + f = d; + f && (c.push(f), f !== l); + f = f.nextSibling + ); + return ( + i.each(c, function(t) { + if (p(e, t)) return a.push(t), void (o = null); + if (s.isBlock(t) || u(t)) + return u(t) && s.remove(t), void (o = null); + var i = t.nextSibling; + r.isBookmarkNode(t) && (p(e, i) || (!i && t.parentNode === n)) + ? (o = null) + : (o || + ((o = s.create("p")), + t.parentNode.insertBefore(o, t), + a.push(o)), + o.appendChild(t)); + }), + a + ); + })(e, a, d), + function(o) { + var r, i, a, d, f, u; + (i = o.previousSibling) && + l(i) && + i.nodeName === t && + ((a = i), + (d = n), + (f = c.getStyle(a, "list-style-type")), + (u = d ? d["list-style-type"] : ""), + f === (u = null === u ? "" : u)) + ? ((r = i), (o = c.rename(o, s)), i.appendChild(o)) + : ((r = c.create(t)), + o.parentNode.insertBefore(r, o), + r.appendChild(o), + (o = c.rename(o, s))), + W(c, r, n), + z(e.dom, r); + } + ), + e.selection.setRng(D(o))); + }, + F = function(e) { + var t = b(e.selection.getRng(!0)), + n = E.getClosestListRootElm(e, e.selection.getStart(!0)), + o = E.getSelectedListItems(e), + r = i.grep(o, function(t) { + return e.dom.isEmpty(t); + }); + (o = i.grep(o, function(t) { + return !e.dom.isEmpty(t); + })), + i.each(r, function(t) { + C(e.dom, t) && w(e, t); + }), + i.each(o, function(t) { + var o, r; + if (t.parentNode !== e.getBody()) { + for (o = t; o && o !== n; o = o.parentNode) l(o) && (r = o); + M(e, r, t), I(e.dom, r.parentNode); + } + }), + e.selection.setRng(D(t)); + }, + V = function(e, t, n) { + return ( + (d = n), + (s = t) && + d && + l(s) && + s.nodeName === d.nodeName && + ((i = t), + (a = n), + (r = e).getStyle(i, "list-style-type", !0) === + r.getStyle(a, "list-style-type", !0)) && + ((o = n), t.className === o.className) + ); + var o, r, i, a, s, d; + }, + z = function(e, t) { + var n, o; + if (((n = t.nextSibling), V(e, t, n))) { + for (; (o = n.firstChild); ) t.appendChild(o); + e.remove(n); + } + if (((n = t.previousSibling), V(e, t, n))) { + for (; (o = n.lastChild); ) t.insertBefore(o, t.firstChild); + e.remove(n); + } + }, + G = function(e, t, n, o, r) { + if (t.nodeName !== o || J(r)) { + var a = b(e.selection.getRng(!0)); + i.each([t].concat(n), function(t) { + !(function(e, t, n, o) { + if (t.nodeName !== n) { + var r = e.rename(t, n); + W(e, r, o); + } else W(e, t, o); + })(e.dom, t, o, r); + }), + e.selection.setRng(D(a)); + } else F(e); + }, + J = function(e) { + return "list-style-type" in e; + }, + X = { + toggleList: function(e, t, n) { + var o = E.getParentList(e), + r = E.getSelectedSubLists(e); + (n = n || {}), + o && r.length > 0 + ? G(e, o, r, t, n) + : (function(e, t, n, o) { + if (t !== e.getBody()) + if (t) + if (t.nodeName !== n || J(o)) { + var r = b(e.selection.getRng(!0)); + W(e.dom, t, o), + z(e.dom, e.dom.rename(t, n)), + e.selection.setRng(D(r)); + } else F(e); + else q(e, n, o); + })(e, o, t, n); + }, + removeList: F, + mergeWithAdjacentLists: z + }, + Y = function(e, o, r, i) { + var a, + s, + d = o.startContainer, + l = o.startOffset; + if (3 === d.nodeType && (r ? l < d.data.length : l > 0)) return d; + for ( + a = e.schema.getNonEmptyElements(), + 1 === d.nodeType && (d = t.getNode(d, l)), + s = new n(d, i), + r && h(e.dom, d) && s.next(); + (d = s[r ? "next" : "prev2"]()); + + ) { + if ("LI" === d.nodeName && !d.hasChildNodes()) return d; + if (a[d.nodeName]) return d; + if (3 === d.nodeType && d.data.length > 0) return d; + } + }, + Z = function(e, t) { + var n = t.childNodes; + return 1 === n.length && !l(n[0]) && e.isBlock(n[0]); + }, + ee = function(e, t, n) { + var o, r, i, a; + if ( + ((r = Z(e, n) ? n.firstChild : n), + Z((i = e), (a = t)) && i.remove(a.firstChild, !0), + !C(e, t, !0)) + ) + for (; (o = t.firstChild); ) r.appendChild(o); + }, + te = function(e, t, n) { + var o, + r, + i = t.parentNode; + y(e, t) && + y(e, n) && + (l(n.lastChild) && (r = n.lastChild), + i === n.lastChild && + u(i.previousSibling) && + e.remove(i.previousSibling), + (o = n.lastChild) && u(o) && t.hasChildNodes() && e.remove(o), + C(e, n, !0) && e.$(n).empty(), + ee(e, t, n), + r && n.appendChild(r), + e.remove(t), + C(e, i) && i !== e.getRoot() && e.remove(i)); + }, + ne = function(e, t, n, o) { + var r, + i, + a, + s = e.dom; + if (s.isEmpty(o)) + (i = n), + (a = o), + (r = e).dom.$(a).empty(), + te(r.dom, i, a), + r.selection.setCursorLocation(a); + else { + var d = b(t); + te(s, n, o), e.selection.setRng(D(d)); + } + }, + oe = function(e, t) { + var n, + o, + r, + i = e.dom, + a = e.selection, + s = a.getStart(), + d = E.getClosestListRootElm(e, s), + l = i.getParent(a.getStart(), "LI", d); + if (l) { + if ((n = l.parentNode) === e.getBody() && C(i, n)) return !0; + if ( + ((o = L(a.getRng(!0))), + (r = i.getParent(Y(e, o, t, d), "LI", d)) && r !== l) + ) + return ( + t + ? ne(e, o, r, l) + : (function(e, t, n, o) { + var r = b(t); + te(e.dom, n, o); + var i = D(r); + e.selection.setRng(i); + })(e, o, l, r), + !0 + ); + if (!r && !t && X.removeList(e)) return !0; + } + return !1; + }, + re = function(e, t) { + return ( + oe(e, t) || + (function(e, t) { + var n = e.dom, + o = e.selection.getStart(), + r = E.getClosestListRootElm(e, o), + i = n.getParent(o, n.isBlock, r); + if (i && n.isEmpty(i)) { + var a = L(e.selection.getRng(!0)), + s = n.getParent(Y(e, a, t, r), "LI", r); + if (s) + return ( + e.undoManager.transact(function() { + var o, a, d, l; + (a = i), + (d = r), + (l = (o = n).getParent(a.parentNode, o.isBlock, d)), + o.remove(a), + l && o.isEmpty(l) && o.remove(l), + X.mergeWithAdjacentLists(n, s.parentNode), + e.selection.select(s, !0), + e.selection.collapse(t); + }), + !0 + ); + } + return !1; + })(e, t) + ); + }, + ie = function(e, t) { + return e.selection.isCollapsed() + ? re(e, t) + : ((o = (n = e).selection.getStart()), + (r = E.getClosestListRootElm(n, o)), + !!( + n.dom.getParent(o, "LI,DT,DD", r) || + E.getSelectedListItems(n).length > 0 + ) && + (n.undoManager.transact(function() { + n.execCommand("Delete"), I(n.dom, n.getBody()); + }), + !0)); + var n, o, r; + }, + ae = function(e) { + e.on("keydown", function(t) { + t.keyCode === o.BACKSPACE + ? ie(e, !1) && t.preventDefault() + : t.keyCode === o.DELETE && ie(e, !0) && t.preventDefault(); + }); + }, + se = ie, + de = function(e) { + return { + backspaceDelete: function(t) { + se(e, t); + } + }; + }, + le = a.DOM, + ce = function(e, t) { + var n; + if (l(e)) { + for (; (n = e.firstChild); ) t.appendChild(n); + le.remove(e); + } + }, + fe = function(e) { + var t, + n, + o, + r, + i = E.getSelectedListItems(e); + if (i.length) { + for ( + var a = b(e.selection.getRng(!0)), s = 0; + s < i.length && + ((t = i[s]), + (n = void 0), + (o = void 0), + (r = void 0), + ("DT" === t.nodeName + ? (le.rename(t, "DD"), 1) + : (n = t.previousSibling) && l(n) + ? (n.appendChild(t), 1) + : n && "LI" === n.nodeName && l(n.lastChild) + ? (n.lastChild.appendChild(t), ce(t.lastChild, n.lastChild), 1) + : (n = t.nextSibling) && l(n) + ? (n.insertBefore(t, n.firstChild), 1) + : (n = t.previousSibling) && + "LI" === n.nodeName && + ((o = le.create(t.parentNode.nodeName)), + (r = le.getStyle(t.parentNode, "listStyleType")) && + le.setStyle(o, "listStyleType", r), + n.appendChild(o), + o.appendChild(t), + ce(t.lastChild, o), + 1)) || 0 !== s); + s++ + ); + return e.selection.setRng(D(a)), e.nodeChanged(), !0; + } + }, + ue = function(e, t) { + return function() { + var n = e.dom.getParent(e.selection.getStart(), "UL,OL,DL"); + return n && n.nodeName === t; + }; + }, + me = function(e) { + e.on("BeforeExecCommand", function(t) { + var n, + o = t.command.toLowerCase(); + if ( + ("indent" === o + ? fe(e) && (n = !0) + : "outdent" === o && K(e) && (n = !0), + n) + ) + return ( + e.fire("ExecCommand", { command: t.command }), + t.preventDefault(), + !0 + ); + }), + e.addCommand("InsertUnorderedList", function(t, n) { + X.toggleList(e, "UL", n); + }), + e.addCommand("InsertOrderedList", function(t, n) { + X.toggleList(e, "OL", n); + }), + e.addCommand("InsertDefinitionList", function(t, n) { + X.toggleList(e, "DL", n); + }), + e.addQueryStateHandler("InsertUnorderedList", ue(e, "UL")), + e.addQueryStateHandler("InsertOrderedList", ue(e, "OL")), + e.addQueryStateHandler("InsertDefinitionList", ue(e, "DL")); + }, + ge = function(e) { + return e.getParam("lists_indent_on_tab", !0); + }, + pe = function(e) { + var t; + ge(e) && + (t = e).on("keydown", function(e) { + e.keyCode !== o.TAB || + o.metaKeyPressed(e) || + (t.dom.getParent(t.selection.getStart(), "LI,DT,DD") && + (e.preventDefault(), e.shiftKey ? K(t) : fe(t))); + }), + ae(e); + }, + ve = function(e, t) { + return function(n) { + var o = n.control; + e.on("NodeChange", function(e) { + var n = (function(e, t) { + for (var n = 0; n < e.length; n++) if (t(e[n])) return n; + return -1; + })(e.parents, f), + r = -1 !== n ? e.parents.slice(0, n) : e.parents, + a = i.grep(r, l); + o.active(a.length > 0 && a[0].nodeName === t); + }); + }; + }, + he = function(e) { + var t, n, o, r; + (n = "advlist"), + (o = (t = e).settings.plugins ? t.settings.plugins : ""), + -1 === i.inArray(o.split(/[ ,]/), n) && + (e.addButton("numlist", { + active: !1, + title: "Numbered list", + cmd: "InsertOrderedList", + onPostRender: ve(e, "OL") + }), + e.addButton("bullist", { + active: !1, + title: "Bullet list", + cmd: "InsertUnorderedList", + onPostRender: ve(e, "UL") + })), + e.addButton("indent", { + icon: "indent", + title: "Increase indent", + cmd: "Indent", + onPostRender: ((r = e), + function(e) { + var t = e.control; + r.on("nodechange", function() { + var e = E.getSelectedListItems(r), + n = e.length > 0 && m(e[0]); + t.disabled(n); + }); + }) + }); + }; + e.add("lists", function(e) { + return pe(e), he(e), me(e), de(e); + }); +})(); +!(function() { + "use strict"; + var t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + e = tinymce.util.Tools.resolve("tinymce.util.VK"), + n = function(t) { + return t.target_list; + }, + o = function(t) { + return t.rel_list; + }, + i = function(t) { + return t.link_class_list; + }, + r = function(t) { + return ( + "boolean" == typeof t.link_assume_external_targets && + t.link_assume_external_targets + ); + }, + a = function(t) { + return ( + "boolean" == typeof t.link_context_toolbar && t.link_context_toolbar + ); + }, + l = function(t) { + return t.link_list; + }, + u = function(t) { + return "string" == typeof t.default_link_target; + }, + c = function(t) { + return t.default_link_target; + }, + s = n, + f = function(t, e) { + t.settings.target_list = e; + }, + d = function(t) { + return !1 !== n(t); + }, + m = o, + v = function(t) { + return o(t) !== undefined; + }, + g = i, + h = function(t) { + return i(t) !== undefined; + }, + x = function(t) { + return !1 !== t.link_title; + }, + p = function(t) { + return ( + "boolean" == typeof t.allow_unsafe_link_target && + t.allow_unsafe_link_target + ); + }, + y = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + k = tinymce.util.Tools.resolve("tinymce.Env"), + b = function(t) { + if (!k.ie || k.ie > 10) { + var e = document.createElement("a"); + (e.target = "_blank"), (e.href = t), (e.rel = "noreferrer noopener"); + var n = document.createEvent("MouseEvents"); + n.initMouseEvent( + "click", + !0, + !0, + window, + 0, + 0, + 0, + 0, + 0, + !1, + !1, + !1, + !1, + 0, + null + ), + (r = e), + (a = n), + document.body.appendChild(r), + r.dispatchEvent(a), + document.body.removeChild(r); + } else { + var o = window.open("", "_blank"); + if (o) { + o.opener = null; + var i = o.document; + i.open(), + i.write( + '' + ), + i.close(); + } + } + var r, a; + }, + _ = tinymce.util.Tools.resolve("tinymce.util.Tools"), + w = function(t, e) { + var n, + o, + i = ["noopener"], + r = t ? t.split(/\s+/) : [], + a = function(t) { + return t.filter(function(t) { + return -1 === _.inArray(i, t); + }); + }; + return (r = e ? ((n = a((n = r))).length ? n.concat(i) : i) : a(r)).length + ? ((o = r), _.trim(o.sort().join(" "))) + : null; + }, + T = function(t, e) { + return ( + (e = e || t.selection.getNode()), + M(e) ? t.dom.select("a[href]", e)[0] : t.dom.getParent(e, "a[href]") + ); + }, + C = function(t) { + return t && "A" === t.nodeName && t.href; + }, + M = function(t) { + return t && "FIGURE" === t.nodeName && /\bimage\b/i.test(t.className); + }, + O = function(t, e) { + var n, o; + (o = t.dom.select("img", e)[0]) && + (n = t.dom.getParents(o, "a[href]", e)[0]) && + (n.parentNode.insertBefore(o, n), t.dom.remove(n)); + }, + N = function(t, e, n) { + var o, i; + (i = t.dom.select("img", e)[0]) && + ((o = t.dom.create("a", n)), + i.parentNode.insertBefore(o, i), + o.appendChild(i)); + }, + R = function(t, e) { + return function(n) { + t.undoManager.transact(function() { + var o = t.selection.getNode(), + i = T(t, o), + r = { + href: n.href, + target: n.target ? n.target : null, + rel: n.rel ? n.rel : null, + class: n["class"] ? n["class"] : null, + title: n.title ? n.title : null + }; + v(t.settings) || + !1 !== p(t.settings) || + (r.rel = w(r.rel, "_blank" === r.target)), + n.href === e.href && (e.attach(), (e = {})), + i + ? (t.focus(), + n.hasOwnProperty("text") && + ("innerText" in i + ? (i.innerText = n.text) + : (i.textContent = n.text)), + t.dom.setAttribs(i, r), + t.selection.select(i), + t.undoManager.add()) + : M(o) + ? N(t, o, r) + : n.hasOwnProperty("text") + ? t.insertContent(t.dom.createHTML("a", r, t.dom.encode(n.text))) + : t.execCommand("mceInsertLink", !1, r); + }); + }; + }, + A = function(t) { + return function() { + t.undoManager.transact(function() { + var e = t.selection.getNode(); + M(e) ? O(t, e) : t.execCommand("unlink"); + }); + }; + }, + L = C, + P = function(t) { + return _.grep(t, C).length > 0; + }, + E = function(t) { + return !( + /]+>[^<]+<\/a>$/.test(t) || -1 === t.indexOf("href=")) + ); + }, + K = T, + S = function(t, e) { + var n = e + ? e.innerText || e.textContent + : t.getContent({ format: "text" }); + return n.replace(/\uFEFF/g, ""); + }, + U = w, + D = tinymce.util.Tools.resolve("tinymce.util.Delay"), + I = tinymce.util.Tools.resolve("tinymce.util.XHR"), + B = {}, + F = function(t, e, n) { + var o = function(t, n) { + return ( + (n = n || []), + _.each(t, function(t) { + var i = { text: t.text || t.title }; + t.menu ? (i.menu = o(t.menu)) : ((i.value = t.value), e && e(i)), + n.push(i); + }), + n + ); + }; + return o(t, n || []); + }, + q = function(t, e, n) { + var o = t.selection.getRng(); + D.setEditorTimeout(t, function() { + t.windowManager.confirm(e, function(e) { + t.selection.setRng(o), n(e); + }); + }); + }, + V = function(t, e) { + var n, + o, + i, + a, + l, + y, + k, + b, + w, + T, + C, + M = {}, + O = t.selection, + N = t.dom, + L = function(t) { + var e = i.find("#text"); + (!e.value() || + (t.lastControl && e.value() === t.lastControl.text())) && + e.value(t.control.text()), + i.find("#href").value(t.control.value()); + }, + P = function() { + o || + !a || + M.text || + this.parent() + .parent() + .find("#text")[0] + .value(this.value()); + }; + (a = E(O.getContent())), + (n = K(t)), + (M.text = o = S(t.selection, n)), + (M.href = n ? N.getAttrib(n, "href") : ""), + n + ? (M.target = N.getAttrib(n, "target")) + : u(t.settings) && (M.target = c(t.settings)), + (C = N.getAttrib(n, "rel")) && (M.rel = C), + (C = N.getAttrib(n, "class")) && (M["class"] = C), + (C = N.getAttrib(n, "title")) && (M.title = C), + a && + (l = { + name: "text", + type: "textbox", + size: 40, + label: "Text to display", + onchange: function() { + M.text = this.value(); + } + }), + e && + (y = { + type: "listbox", + label: "Link list", + values: F( + e, + function(e) { + e.value = t.convertURL(e.value || e.url, "href"); + }, + [{ text: "None", value: "" }] + ), + onselect: L, + value: t.convertURL(M.href, "href"), + onPostRender: function() { + y = this; + } + }), + d(t.settings) && + (s(t.settings) === undefined && + f(t, [ + { text: "None", value: "" }, + { text: "New window", value: "_blank" } + ]), + (b = { + name: "target", + type: "listbox", + label: "Target", + values: F(s(t.settings)) + })), + v(t.settings) && + (k = { + name: "rel", + type: "listbox", + label: "Rel", + values: F(m(t.settings), function(e) { + !1 === p(t.settings) && + (e.value = U(e.value, "_blank" === M.target)); + }) + }), + h(t.settings) && + (w = { + name: "class", + type: "listbox", + label: "Class", + values: F(g(t.settings), function(e) { + e.value && + (e.textStyle = function() { + return t.formatter.getCssText({ + inline: "a", + classes: [e.value] + }); + }); + }) + }), + x(t.settings) && + (T = { + name: "title", + type: "textbox", + label: "Title", + value: M.title + }), + (i = t.windowManager.open({ + title: "Insert link", + data: M, + body: [ + { + name: "href", + type: "filepicker", + filetype: "file", + size: 40, + autofocus: !0, + label: "Url", + onchange: function(e) { + var n = e.meta || {}; + y && y.value(t.convertURL(this.value(), "href")), + _.each(e.meta, function(t, e) { + var n = i.find("#" + e); + "text" === e + ? 0 === o.length && (n.value(t), (M.text = t)) + : n.value(t); + }), + n.attach && (B = { href: this.value(), attach: n.attach }), + n.text || P.call(this); + }, + onkeyup: P, + onbeforecall: function(t) { + t.meta = i.toJSON(); + } + }, + l, + T, + (function(e) { + var n = []; + if ( + (_.each(t.dom.select("a:not([href])"), function(t) { + var o = t.name || t.id; + o && + n.push({ + text: o, + value: "#" + o, + selected: -1 !== e.indexOf("#" + o) + }); + }), + n.length) + ) + return ( + n.unshift({ text: "None", value: "" }), + { + name: "anchor", + type: "listbox", + label: "Anchors", + values: n, + onselect: L + } + ); + })(M.href), + y, + k, + b, + w + ], + onSubmit: function(e) { + var n = r(t.settings), + i = R(t, B), + l = A(t), + u = _.extend({}, M, e.data), + c = u.href; + c + ? ((a && u.text !== o) || delete u.text, + c.indexOf("@") > 0 && + -1 === c.indexOf("//") && + -1 === c.indexOf("mailto:") + ? q( + t, + "The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?", + function(t) { + t && (u.href = "mailto:" + c), i(u); + } + ) + : (!0 === n && !/^\w+:/i.test(c)) || + (!1 === n && /^\s*www[\.|\d\.]/i.test(c)) + ? q( + t, + "The URL you entered seems to be an external link. Do you want to add the required http:// prefix?", + function(t) { + t && (u.href = "http://" + c), i(u); + } + ) + : i(u)) + : l(); + } + })); + }, + z = function(t) { + var e, n, o; + (n = V), + "string" == typeof (o = l((e = t).settings)) + ? I.send({ + url: o, + success: function(t) { + n(e, JSON.parse(t)); + } + }) + : "function" == typeof o + ? o(function(t) { + n(e, t); + }) + : n(e, o); + }, + H = function(t, e) { + return t.dom.getParent(e, "a[href]"); + }, + J = function(t) { + return H(t, t.selection.getStart()); + }, + $ = function(t, e) { + if (e) { + var n = (i = e).getAttribute("data-mce-href") || i.getAttribute("href"); + if (/^#/.test(n)) { + var o = t.$(n); + o.length && t.selection.scrollIntoView(o[0], !0); + } else b(e.href); + } + var i; + }, + j = function(t) { + return function() { + z(t); + }; + }, + G = function(t) { + return function() { + $(t, J(t)); + }; + }, + X = function(t) { + return function(e) { + var n, o, i, r, l; + return !!( + a(t.settings) && + ((r = t), + (l = r.plugins.contextmenu), + !l || !l.isContextMenuVisible()) && + L(e) && + 3 === + (i = (o = (n = t.selection).getRng()).startContainer).nodeType && + n.isCollapsed() && + o.startOffset > 0 && + o.startOffset < i.data.length + ); + }; + }, + Q = function(t) { + t.on("click", function(n) { + var o = H(t, n.target); + o && e.metaKeyPressed(n) && (n.preventDefault(), $(t, o)); + }), + t.on("keydown", function(e) { + var n, + o = J(t); + o && + 13 === e.keyCode && + !0 === (n = e).altKey && + !1 === n.shiftKey && + !1 === n.ctrlKey && + !1 === n.metaKey && + (e.preventDefault(), $(t, o)); + }); + }, + W = function(t) { + return function() { + var e = this; + t.on("nodechange", function(n) { + e.active(!t.readonly && !!K(t, n.element)); + }); + }; + }, + Y = function(t) { + return function() { + var e = this, + n = function(t) { + P(t.parents) ? e.show() : e.hide(); + }; + P(t.dom.getParents(t.selection.getStart())) || e.hide(), + t.on("nodechange", n), + e.on("remove", function() { + t.off("nodechange", n); + }); + }; + }, + Z = function(t) { + t.addCommand("mceLink", j(t)); + }, + tt = function(t) { + t.addShortcut("Meta+K", "", j(t)); + }, + et = function(t) { + t.addButton("link", { + active: !1, + icon: "link", + tooltip: "Insert/edit link", + onclick: j(t), + onpostrender: W(t) + }), + t.addButton("unlink", { + active: !1, + icon: "unlink", + tooltip: "Remove link", + onclick: A(t), + onpostrender: W(t) + }), + t.addContextToolbar && + t.addButton("openlink", { + icon: "newtab", + tooltip: "Open link", + onclick: G(t) + }); + }, + nt = function(t) { + t.addMenuItem("openlink", { + text: "Open link", + icon: "newtab", + onclick: G(t), + onPostRender: Y(t), + prependToContext: !0 + }), + t.addMenuItem("link", { + icon: "link", + text: "Link", + shortcut: "Meta+K", + onclick: j(t), + stateSelector: "a[href]", + context: "insert", + prependToContext: !0 + }); + }, + ot = function(t) { + t.addContextToolbar && + t.addContextToolbar(X(t), "openlink | link unlink"); + }; + t.add("link", function(t) { + et(t), nt(t), ot(t), Q(t), Z(t), tt(t); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.util.Tools"), + n = function(e) { + (e.settings.inline_styles = !1), + e.on("init", function() { + var n, i, a, o; + (n = e), + (i = "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img"), + (a = t.explode(n.settings.font_size_style_values)), + (o = n.schema), + n.formatter.register({ + alignleft: { selector: i, attributes: { align: "left" } }, + aligncenter: { selector: i, attributes: { align: "center" } }, + alignright: { selector: i, attributes: { align: "right" } }, + alignjustify: { selector: i, attributes: { align: "justify" } }, + bold: [ + { inline: "b", remove: "all" }, + { inline: "strong", remove: "all" }, + { inline: "span", styles: { fontWeight: "bold" } } + ], + italic: [ + { inline: "i", remove: "all" }, + { inline: "em", remove: "all" }, + { inline: "span", styles: { fontStyle: "italic" } } + ], + underline: [ + { inline: "u", remove: "all" }, + { + inline: "span", + styles: { textDecoration: "underline" }, + exact: !0 + } + ], + strikethrough: [ + { inline: "strike", remove: "all" }, + { + inline: "span", + styles: { textDecoration: "line-through" }, + exact: !0 + } + ], + fontname: { inline: "font", attributes: { face: "%value" } }, + fontsize: { + inline: "font", + attributes: { + size: function(e) { + return t.inArray(a, e.value) + 1; + } + } + }, + forecolor: { inline: "font", attributes: { color: "%value" } }, + hilitecolor: { + inline: "font", + styles: { backgroundColor: "%value" } + } + }), + t.each("b,i,u,strike".split(","), function(e) { + o.addValidElements(e + "[*]"); + }), + o.getElementRule("font") || + o.addValidElements("font[face|size|color|style]"), + t.each(i.split(","), function(e) { + var t = o.getElementRule(e); + t && + (t.attributes.align || + ((t.attributes.align = {}), t.attributesOrder.push("align"))); + }); + }); + }, + i = function(e) { + e.addButton("fontsizeselect", function() { + var t = [], + n = + e.settings.fontsizeFormats || + "8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"; + return ( + e.$.each(n.split(" "), function(e, n) { + var i = n, + a = n, + o = n.split("="); + o.length > 1 && ((i = o[0]), (a = o[1])), + t.push({ text: i, value: a }); + }), + { + type: "listbox", + text: "Font Sizes", + tooltip: "Font Sizes", + values: t, + fixedWidth: !0, + onPostRender: function() { + var t = this; + e.on("NodeChange", function() { + var n; + (n = e.dom.getParent(e.selection.getNode(), "font")) + ? t.value(n.size) + : t.value(""); + }); + }, + onclick: function(t) { + t.control.settings.value && + e.execCommand("FontSize", !1, t.control.settings.value); + } + } + ); + }), + e.addButton("fontselect", function() { + var t = [], + n = (function(e) { + for (var t = (e = e.replace(/;$/, "").split(";")).length; t--; ) + e[t] = e[t].split("="); + return e; + })( + e.settings.font_formats || + "Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats" + ); + return ( + e.$.each(n, function(e, n) { + t.push({ + text: { raw: n[0] }, + value: n[1], + textStyle: + -1 === n[1].indexOf("dings") ? "font-family:" + n[1] : "" + }); + }), + { + type: "listbox", + text: "Font Family", + tooltip: "Font Family", + values: t, + fixedWidth: !0, + onPostRender: function() { + var t = this; + e.on("NodeChange", function() { + var n; + (n = e.dom.getParent(e.selection.getNode(), "font")) + ? t.value(n.face) + : t.value(""); + }); + }, + onselect: function(t) { + t.control.settings.value && + e.execCommand("FontName", !1, t.control.settings.value); + } + } + ); + }); + }; + e.add("legacyoutput", function(e) { + n(e), i(e); + }); +})(); +!(function() { + "use strict"; + var e = function(t) { + var n = t, + r = function() { + return n; + }; + return { + get: r, + set: function(e) { + n = e; + }, + clone: function() { + return e(r()); + } + }; + }, + t = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = function(e) { + return e.getParam("insertdatetime_timeformat", e.translate("%H:%M:%S")); + }, + r = function(e) { + return e.getParam("insertdatetime_formats", [ + "%H:%M:%S", + "%Y-%m-%d", + "%I:%M:%S %p", + "%D" + ]); + }, + a = function(e) { + return e.getParam("insertdatetime_dateformat", e.translate("%Y-%m-%d")); + }, + i = n, + o = r, + u = function(e) { + var t = r(e); + return t.length > 0 ? t[0] : n(e); + }, + c = function(e) { + return e.getParam("insertdatetime_element", !1); + }, + l = "Sun Mon Tue Wed Thu Fri Sat Sun".split(" "), + m = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split( + " " + ), + s = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), + d = "January February March April May June July August September October November December".split( + " " + ), + p = function(e, t) { + if ((e = "" + e).length < t) + for (var n = 0; n < t - e.length; n++) e = "0" + e; + return e; + }, + f = function(e, t, n) { + return ( + (n = n || new Date()), + (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = (t = t.replace( + "%D", + "%m/%d/%Y" + )).replace("%r", "%I:%M:%S %p")).replace( + "%Y", + "" + n.getFullYear() + )).replace("%y", "" + n.getYear())).replace( + "%m", + p(n.getMonth() + 1, 2) + )).replace("%d", p(n.getDate(), 2))).replace( + "%H", + "" + p(n.getHours(), 2) + )).replace("%M", "" + p(n.getMinutes(), 2))).replace( + "%S", + "" + p(n.getSeconds(), 2) + )).replace("%I", "" + (((n.getHours() + 11) % 12) + 1))).replace( + "%p", + n.getHours() < 12 ? "AM" : "PM" + )).replace("%B", "" + e.translate(d[n.getMonth()]))).replace( + "%b", + "" + e.translate(s[n.getMonth()]) + )).replace("%A", "" + e.translate(m[n.getDay()]))).replace( + "%a", + "" + e.translate(l[n.getDay()]) + )).replace("%%", "%")) + ); + }, + g = function(e, t) { + if (c(e)) { + var n = f(e, t), + r = void 0; + r = /%[HMSIp]/.test(t) ? f(e, "%Y-%m-%dT%H:%M") : f(e, "%Y-%m-%d"); + var a = e.dom.getParent(e.selection.getStart(), "time"); + a + ? ((o = a), + (u = r), + (l = n), + (m = (i = e).dom.create("time", { datetime: u }, l)), + o.parentNode.insertBefore(m, o), + i.dom.remove(o), + i.selection.select(m, !0), + i.selection.collapse(!1)) + : e.insertContent('"); + } else e.insertContent(f(e, t)); + var i, o, u, l, m; + }, + y = f, + M = function(e) { + e.addCommand("mceInsertDate", function() { + g(e, a(e)); + }), + e.addCommand("mceInsertTime", function() { + g(e, i(e)); + }); + }, + v = tinymce.util.Tools.resolve("tinymce.util.Tools"), + S = function(e, t) { + var n, + r, + a, + i = ((r = t), + (a = o((n = e))), + v.map(a, function(e) { + return { + text: y(n, e), + onclick: function() { + r.set(e), g(n, e); + } + }; + })); + e.addButton("insertdatetime", { + type: "splitbutton", + title: "Insert date/time", + menu: i, + onclick: function() { + var n = t.get(); + g(e, n || u(e)); + } + }), + e.addMenuItem("insertdatetime", { + icon: "date", + text: "Date/time", + menu: i, + context: "insert" + }); + }; + t.add("insertdatetime", function(t) { + var n = e(null); + M(t), S(t, n); + }); +})(); +!(function() { + "use strict"; + var e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + t = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + n = tinymce.util.Tools.resolve("tinymce.EditorManager"), + r = tinymce.util.Tools.resolve("tinymce.Env"), + i = tinymce.util.Tools.resolve("tinymce.util.Tools"), + c = function(e) { + return e.getParam("importcss_merge_classes"); + }, + o = function(e) { + return e.getParam("importcss_exclusive"); + }, + s = function(e) { + return e.getParam("importcss_selector_converter"); + }, + u = function(e) { + return e.getParam("importcss_selector_filter"); + }, + l = function(e) { + return e.getParam("importcss_groups"); + }, + a = function(e) { + return e.getParam("importcss_append"); + }, + f = function(e) { + return e.getParam("importcss_file_filter"); + }, + m = function(e) { + var t = r.cacheSuffix; + return ( + "string" == typeof e && + (e = e.replace("?" + t, "").replace("&" + t, "")), + e + ); + }, + g = function(e, t) { + var r = e.settings, + i = !1 !== r.skin && (r.skin || "lightgray"); + return ( + !!i && + t === + (r.skin_url + ? e.documentBaseURI.toAbsolute(r.skin_url) + : n.baseURL + "/skins/" + i) + + "/content" + + (e.inline ? ".inline" : "") + + ".min.css" + ); + }, + p = function(e) { + return "string" == typeof e + ? function(t) { + return -1 !== t.indexOf(e); + } + : e instanceof RegExp + ? function(t) { + return e.test(t); + } + : e; + }, + v = function(e, t, n) { + var r = [], + c = {}; + i.each(e.contentCSS, function(e) { + c[e] = !0; + }), + n || + (n = function(e, t) { + return t || c[e]; + }); + try { + i.each(t.styleSheets, function(t) { + !(function c(t, o) { + var s, + u = t.href; + if ((u = m(u)) && n(u, o) && !g(e, u)) { + i.each(t.imports, function(e) { + c(e, !0); + }); + try { + s = t.cssRules || t.rules; + } catch (l) {} + i.each(s, function(e) { + e.styleSheet + ? c(e.styleSheet, !0) + : e.selectorText && + i.each(e.selectorText.split(","), function(e) { + r.push(i.trim(e)); + }); + }); + } + })(t); + }); + } catch (o) {} + return r; + }, + h = function(e, t) { + var n, + r = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t); + if (r) { + var o = r[1], + s = r[2] + .substr(1) + .split(".") + .join(" "), + u = i.makeMap("a,img"); + return ( + r[1] + ? ((n = { title: t }), + e.schema.getTextBlockElements()[o] + ? (n.block = o) + : e.schema.getBlockElements()[o] || u[o.toLowerCase()] + ? (n.selector = o) + : (n.inline = o)) + : r[2] && (n = { inline: "span", title: t.substr(1), classes: s }), + !1 !== c(e) ? (n.classes = s) : (n.attributes = { class: s }), + n + ); + } + }, + d = function(e, t) { + return null === t || !1 !== o(e); + }, + y = h, + _ = function(e) { + e.on("renderFormatsMenu", function(n) { + var r, + c = {}, + o = p(u(e)), + m = n.control, + g = ((r = l(e)), + i.map(r, function(e) { + return i.extend({}, e, { + original: e, + selectors: {}, + filter: p(e.filter), + item: { text: e.title, menu: [] } + }); + })), + y = function(n, r) { + if ( + ((_ = n), (T = c), !(d(e, (x = r)) ? _ in T : _ in x.selectors)) + ) { + (p = n), + (y = c), + d(e, (v = r)) ? (y[p] = !0) : (v.selectors[p] = !0); + var o = ((l = e), + (a = e.plugins.importcss), + (f = n), + ((g = r) && g.selector_converter + ? g.selector_converter + : s(l) + ? s(l) + : function() { + return h(l, f); + } + ).call(a, f, g)); + if (o) { + var u = o.name || t.DOM.uniqueId(); + return ( + e.formatter.register(u, o), + i.extend({}, m.settings.itemDefaults, { + text: o.title, + format: u + }) + ); + } + } + var l, a, f, g, p, v, y, _, x, T; + return null; + }; + a(e) || m.items().remove(), + i.each(v(e, n.doc || e.getDoc(), p(f(e))), function(e) { + if (-1 === e.indexOf(".mce-") && (!o || o(e))) { + var t = ((r = g), + (c = e), + i.grep(r, function(e) { + return !e.filter || e.filter(c); + })); + if (t.length > 0) + i.each(t, function(t) { + var n = y(e, t); + n && t.item.menu.push(n); + }); + else { + var n = y(e, null); + n && m.add(n); + } + } + var r, c; + }), + i.each(g, function(e) { + e.item.menu.length > 0 && m.add(e.item); + }), + n.control.renderNew(); + }); + }, + x = function(e) { + return { + convertSelectorToFormat: function(t) { + return y(e, t); + } + }; + }; + e.add("importcss", function(e) { + return _(e), x(e); + }); +})(); +!(function() { + "use strict"; + var t = function(e) { + var n = e, + o = function() { + return n; + }; + return { + get: o, + set: function(t) { + n = t; + }, + clone: function() { + return t(o()); + } + }; + }, + e = tinymce.util.Tools.resolve("tinymce.PluginManager"), + n = tinymce.util.Tools.resolve("tinymce.util.Tools"); + function o(t, e) { + return i(document.createElement("canvas"), t, e); + } + function r(t) { + return t.getContext("2d"); + } + function i(t, e, n) { + return (t.width = e), (t.height = n), t; + } + var a, + u, + c, + l, + s = { + create: o, + clone: function(t) { + var e; + return r((e = o(t.width, t.height))).drawImage(t, 0, 0), e; + }, + resize: i, + get2dContext: r, + get3dContext: function(t) { + var e = null; + try { + e = t.getContext("webgl") || t.getContext("experimental-webgl"); + } catch (n) {} + return e || (e = null), e; + } + }, + f = { + getWidth: function(t) { + return t.naturalWidth || t.width; + }, + getHeight: function(t) { + return t.naturalHeight || t.height; + } + }, + d = window.Promise + ? window.Promise + : (function() { + var t = function(t) { + if ("object" != typeof this) + throw new TypeError("Promises must be constructed via new"); + if ("function" != typeof t) throw new TypeError("not a function"); + (this._state = null), + (this._value = null), + (this._deferreds = []), + c(t, n(i, this), n(a, this)); + }, + e = + t.immediateFn || + ("function" == typeof setImmediate && setImmediate) || + function(t) { + setTimeout(t, 1); + }; + function n(t, e) { + return function() { + t.apply(e, arguments); + }; + } + var o = + Array.isArray || + function(t) { + return "[object Array]" === Object.prototype.toString.call(t); + }; + function r(t) { + var n = this; + null !== this._state + ? e(function() { + var e = n._state ? t.onFulfilled : t.onRejected; + if (null !== e) { + var o; + try { + o = e(n._value); + } catch (r) { + return void t.reject(r); + } + t.resolve(o); + } else (n._state ? t.resolve : t.reject)(n._value); + }) + : this._deferreds.push(t); + } + function i(t) { + try { + if (t === this) + throw new TypeError( + "A promise cannot be resolved with itself." + ); + if (t && ("object" == typeof t || "function" == typeof t)) { + var e = t.then; + if ("function" == typeof e) + return void c(n(e, t), n(i, this), n(a, this)); + } + (this._state = !0), (this._value = t), u.call(this); + } catch (o) { + a.call(this, o); + } + } + function a(t) { + (this._state = !1), (this._value = t), u.call(this); + } + function u() { + for (var t = 0, e = this._deferreds.length; t < e; t++) + r.call(this, this._deferreds[t]); + this._deferreds = null; + } + function c(t, e, n) { + var o = !1; + try { + t( + function(t) { + o || ((o = !0), e(t)); + }, + function(t) { + o || ((o = !0), n(t)); + } + ); + } catch (r) { + if (o) return; + (o = !0), n(r); + } + } + return ( + (t.prototype["catch"] = function(t) { + return this.then(null, t); + }), + (t.prototype.then = function(e, n) { + var o = this; + return new t(function(t, i) { + r.call( + o, + new function(t, e, n, o) { + (this.onFulfilled = "function" == typeof t ? t : null), + (this.onRejected = "function" == typeof e ? e : null), + (this.resolve = n), + (this.reject = o); + }(e, n, t, i) + ); + }); + }), + (t.all = function() { + var e = Array.prototype.slice.call( + 1 === arguments.length && o(arguments[0]) + ? arguments[0] + : arguments + ); + return new t(function(t, n) { + if (0 === e.length) return t([]); + var o = e.length; + function r(i, a) { + try { + if (a && ("object" == typeof a || "function" == typeof a)) { + var u = a.then; + if ("function" == typeof u) + return void u.call( + a, + function(t) { + r(i, t); + }, + n + ); + } + (e[i] = a), 0 == --o && t(e); + } catch (c) { + n(c); + } + } + for (var i = 0; i < e.length; i++) r(i, e[i]); + }); + }), + (t.resolve = function(e) { + return e && "object" == typeof e && e.constructor === t + ? e + : new t(function(t) { + t(e); + }); + }), + (t.reject = function(e) { + return new t(function(t, n) { + n(e); + }); + }), + (t.race = function(e) { + return new t(function(t, n) { + for (var o = 0, r = e.length; o < r; o++) e[o].then(t, n); + }); + }), + t + ); + })(), + h = function(t) { + return function() { + return t; + }; + }, + p = { + noop: function() {}, + noarg: function(t) { + return function() { + return t(); + }; + }, + compose: function(t, e) { + return function() { + return t(e.apply(null, arguments)); + }; + }, + constant: h, + identity: function(t) { + return t; + }, + tripleEquals: function(t, e) { + return t === e; + }, + curry: function(t) { + for ( + var e = new Array(arguments.length - 1), n = 1; + n < arguments.length; + n++ + ) + e[n - 1] = arguments[n]; + return function() { + for (var n = new Array(arguments.length), o = 0; o < n.length; o++) + n[o] = arguments[o]; + var r = e.concat(n); + return t.apply(null, r); + }; + }, + not: function(t) { + return function() { + return !t.apply(null, arguments); + }; + }, + die: function(t) { + return function() { + throw new Error(t); + }; + }, + apply: function(t) { + return t(); + }, + call: function(t) { + t(); + }, + never: h(!1), + always: h(!0) + }, + m = p.never, + g = p.always, + v = function() { + return y; + }, + y = ((l = { + fold: function(t, e) { + return t(); + }, + is: m, + isSome: m, + isNone: g, + getOr: (c = function(t) { + return t; + }), + getOrThunk: (u = function(t) { + return t(); + }), + getOrDie: function(t) { + throw new Error(t || "error: getOrDie called on none."); + }, + or: c, + orThunk: u, + map: v, + ap: v, + each: function() {}, + bind: v, + flatten: v, + exists: m, + forall: g, + filter: v, + equals: (a = function(t) { + return t.isNone(); + }), + equals_: a, + toArray: function() { + return []; + }, + toString: p.constant("none()") + }), + Object.freeze && Object.freeze(l), + l), + b = function(t) { + var e = function() { + return t; + }, + n = function() { + return r; + }, + o = function(e) { + return e(t); + }, + r = { + fold: function(e, n) { + return n(t); + }, + is: function(e) { + return t === e; + }, + isSome: g, + isNone: m, + getOr: e, + getOrThunk: e, + getOrDie: e, + or: n, + orThunk: n, + map: function(e) { + return b(e(t)); + }, + ap: function(e) { + return e.fold(v, function(e) { + return b(e(t)); + }); + }, + each: function(e) { + e(t); + }, + bind: o, + flatten: e, + exists: o, + forall: o, + filter: function(e) { + return e(t) ? r : y; + }, + equals: function(e) { + return e.is(t); + }, + equals_: function(e, n) { + return e.fold(m, function(e) { + return n(t, e); + }); + }, + toArray: function() { + return [t]; + }, + toString: function() { + return "some(" + t + ")"; + } + }; + return r; + }, + w = { + some: b, + none: v, + from: function(t) { + return null === t || t === undefined ? y : b(t); + } + }, + x = "undefined" != typeof window ? window : Function("return this;")(), + R = function(t, e) { + for ( + var n = e !== undefined && null !== e ? e : x, o = 0; + o < t.length && n !== undefined && null !== n; + ++o + ) + n = n[t[o]]; + return n; + }, + I = function(t, e) { + var n = t.split("."); + return R(n, e); + }, + T = function(t, e) { + var n = I(t, e); + if (n === undefined || null === n) + throw t + " not available on this browser"; + return n; + }, + k = function(t, e) { + return new (T("Blob"))(t, e); + }, + C = function() { + return new (T("FileReader"))(); + }, + B = function(t) { + return new (T("Uint8Array"))(t); + }, + U = { + atob: function(t) { + return T("atob")(t); + }, + requestAnimationFrame: function(t) { + T("requestAnimationFrame")(t); + } + }; + function M(t) { + return new d(function(e, n) { + var o = URL.createObjectURL(t), + r = new Image(), + i = function() { + r.removeEventListener("load", a), r.removeEventListener("error", u); + }; + function a() { + i(), e(r); + } + function u() { + i(), n("Unable to load data of type " + t.type + ": " + o); + } + r.addEventListener("load", a), + r.addEventListener("error", u), + (r.src = o), + r.complete && a(); + }); + } + function j(t) { + return new d(function(e) { + var n = new XMLHttpRequest(); + n.open("GET", t, !0), + (n.responseType = "blob"), + (n.onload = function() { + 200 == this.status && e(this.response); + }), + n.send(); + }); + } + function A(t) { + var e = t.split(","), + n = /data:([^;]+)/.exec(e[0]); + if (!n) return w.none(); + for ( + var o = n[1], + r = e[1], + i = U.atob(r), + a = i.length, + u = Math.ceil(a / 1024), + c = new Array(u), + l = 0; + l < u; + ++l + ) { + for ( + var s = 1024 * l, + f = Math.min(s + 1024, a), + d = new Array(f - s), + h = s, + p = 0; + h < f; + ++p, ++h + ) + d[p] = i[h].charCodeAt(0); + c[l] = B(d); + } + return w.some(k(c, { type: o })); + } + function z(t) { + return new d(function(e, n) { + A(t).fold(function() { + n("uri is not base64: " + t); + }, e); + }); + } + function E(t) { + return new d(function(e) { + var n = new C(); + (n.onloadend = function() { + e(n.result); + }), + n.readAsDataURL(t); + }); + } + var S = { + blobToImage: M, + imageToBlob: function(t) { + return ((e = t), + new d(function(t) { + e.complete + ? t(e) + : e.addEventListener("load", function n() { + e.removeEventListener("load", n), t(e); + }); + })).then(function(t) { + var e = t.src; + return 0 === e.indexOf("blob:") + ? j(e) + : 0 === e.indexOf("data:") + ? z(e) + : j(e); + }); + var e; + }, + blobToDataUri: E, + blobToBase64: function(t) { + return E(t).then(function(t) { + return t.split(",")[1]; + }); + }, + dataUriToBlobSync: A, + canvasToBlob: function(t, e, n) { + return ( + (e = e || "image/png"), + HTMLCanvasElement.prototype.toBlob + ? new d(function(o) { + t.toBlob( + function(t) { + o(t); + }, + e, + n + ); + }) + : z(t.toDataURL(e, n)) + ); + }, + canvasToDataURL: function(t, e, n) { + return ( + (e = e || "image/png"), + t.then(function(t) { + return t.toDataURL(e, n); + }) + ); + }, + blobToCanvas: function(t) { + return M(t).then(function(t) { + var e, n; + return ( + (e = t), + URL.revokeObjectURL(e.src), + (n = s.create(f.getWidth(t), f.getHeight(t))), + s.get2dContext(n).drawImage(t, 0, 0), + n + ); + }); + }, + uriToBlob: function(t) { + return 0 === t.indexOf("blob:") + ? j(t) + : 0 === t.indexOf("data:") + ? z(t) + : null; + } + }, + L = function(t) { + return S.blobToImage(t); + }, + H = function(t) { + return S.imageToBlob(t); + }; + function O(t, e, n) { + var o = e.type; + function r(e, n) { + return t.then(function(t) { + return S.canvasToDataURL(t, e, n); + }); + } + return { + getType: p.constant(o), + toBlob: function() { + return d.resolve(e); + }, + toDataURL: function() { + return n; + }, + toBase64: function() { + return n.split(",")[1]; + }, + toAdjustedBlob: function(e, n) { + return t.then(function(t) { + return S.canvasToBlob(t, e, n); + }); + }, + toAdjustedDataURL: r, + toAdjustedBase64: function(t, e) { + return r(t, e).then(function(t) { + return t.split(",")[1]; + }); + }, + toCanvas: function() { + return t.then(s.clone); + } + }; + } + function _(t) { + return S.blobToDataUri(t).then(function(e) { + return O(S.blobToCanvas(t), t, e); + }); + } + var D = { + fromBlob: _, + fromCanvas: function(t, e) { + return S.canvasToBlob(t, e).then(function(e) { + return O(d.resolve(t), e, t.toDataURL()); + }); + }, + fromImage: function(t) { + return S.imageToBlob(t).then(function(t) { + return _(t); + }); + }, + fromBlobAndUrlSync: function(t, e) { + return O(S.blobToCanvas(t), t, e); + } + }; + function F(t, e, n) { + return (t = parseFloat(t)) > n ? (t = n) : t < e && (t = e), t; + } + var P = [ + 0, + 0.01, + 0.02, + 0.04, + 0.05, + 0.06, + 0.07, + 0.08, + 0.1, + 0.11, + 0.12, + 0.14, + 0.15, + 0.16, + 0.17, + 0.18, + 0.2, + 0.21, + 0.22, + 0.24, + 0.25, + 0.27, + 0.28, + 0.3, + 0.32, + 0.34, + 0.36, + 0.38, + 0.4, + 0.42, + 0.44, + 0.46, + 0.48, + 0.5, + 0.53, + 0.56, + 0.59, + 0.62, + 0.65, + 0.68, + 0.71, + 0.74, + 0.77, + 0.8, + 0.83, + 0.86, + 0.89, + 0.92, + 0.95, + 0.98, + 1, + 1.06, + 1.12, + 1.18, + 1.24, + 1.3, + 1.36, + 1.42, + 1.48, + 1.54, + 1.6, + 1.66, + 1.72, + 1.78, + 1.84, + 1.9, + 1.96, + 2, + 2.12, + 2.25, + 2.37, + 2.5, + 2.62, + 2.75, + 2.87, + 3, + 3.2, + 3.4, + 3.6, + 3.8, + 4, + 4.3, + 4.7, + 4.9, + 5, + 5.5, + 6, + 6.5, + 6.8, + 7, + 7.3, + 7.5, + 7.8, + 8, + 8.4, + 8.7, + 9, + 9.4, + 9.6, + 9.8, + 10 + ]; + function W(t, e) { + var n, + o, + r, + i, + a = [], + u = new Array(10); + for (n = 0; n < 5; n++) { + for (o = 0; o < 5; o++) a[o] = e[o + 5 * n]; + for (o = 0; o < 5; o++) { + for (i = 0, r = 0; r < 5; r++) i += t[o + 5 * r] * a[r]; + u[o + 5 * n] = i; + } + } + return u; + } + function q(t, e) { + return ( + (e = F(e, 0, 1)), + t.map(function(t, n) { + return n % 6 == 0 ? (t = 1 - (1 - t) * e) : (t *= e), F(t, 0, 1); + }) + ); + } + var V = { + identity: function() { + return [ + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]; + }, + adjust: q, + multiply: W, + adjustContrast: function(t, e) { + var n; + return ( + (e = F(e, -1, 1)), + W(t, [ + (n = + (e *= 100) < 0 + ? 127 + (e / 100) * 127 + : 127 * + (n = + 0 == (n = e % 1) + ? P[e] + : P[Math.floor(e)] * (1 - n) + P[Math.floor(e) + 1] * n) + + 127) / 127, + 0, + 0, + 0, + 0.5 * (127 - n), + 0, + n / 127, + 0, + 0, + 0.5 * (127 - n), + 0, + 0, + n / 127, + 0, + 0.5 * (127 - n), + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]) + ); + }, + adjustBrightness: function(t, e) { + return W(t, [ + 1, + 0, + 0, + 0, + (e = F(255 * e, -255, 255)), + 0, + 1, + 0, + 0, + e, + 0, + 0, + 1, + 0, + e, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + }, + adjustSaturation: function(t, e) { + var n, o, r; + return W(t, [ + (o = 0.3086) * (1 - (n = 1 + ((e = F(e, -1, 1)) > 0 ? 3 * e : e))) + n, + (r = 0.6094) * (1 - n), + 0.082 * (1 - n), + 0, + 0, + o * (1 - n), + r * (1 - n) + n, + 0.082 * (1 - n), + 0, + 0, + o * (1 - n), + r * (1 - n), + 0.082 * (1 - n) + n, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + }, + adjustHue: function(t, e) { + var n, o, r, i, a; + return ( + (e = (F(e, -180, 180) / 180) * Math.PI), + (n = Math.cos(e)), + (o = Math.sin(e)), + W(t, [ + (r = 0.213) + 0.787 * n + o * -r, + (i = 0.715) + n * -i + o * -i, + (a = 0.072) + n * -a + 0.928 * o, + 0, + 0, + r + n * -r + 0.143 * o, + i + n * (1 - i) + 0.14 * o, + a + n * -a + -0.283 * o, + 0, + 0, + r + n * -r + -0.787 * o, + i + n * -i + o * i, + a + 0.928 * n + o * a, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]) + ); + }, + adjustColors: function(t, e, n, o) { + return W(t, [ + (e = F(e, 0, 2)), + 0, + 0, + 0, + 0, + 0, + (n = F(n, 0, 2)), + 0, + 0, + 0, + 0, + 0, + (o = F(o, 0, 2)), + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ]); + }, + adjustSepia: function(t, e) { + return W( + t, + q( + [ + 0.393, + 0.769, + 0.189, + 0, + 0, + 0.349, + 0.686, + 0.168, + 0, + 0, + 0.272, + 0.534, + 0.131, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + (e = F(e, 0, 1)) + ) + ); + }, + adjustGrayscale: function(t, e) { + return W( + t, + q( + [ + 0.33, + 0.34, + 0.33, + 0, + 0, + 0.33, + 0.34, + 0.33, + 0, + 0, + 0.33, + 0.34, + 0.33, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1 + ], + (e = F(e, 0, 1)) + ) + ); + } + }; + function N(t, e) { + return t.toCanvas().then(function(n) { + return ( + (o = n), + (r = t.getType()), + (i = e), + (u = s.get2dContext(o)), + (a = (function(t, e) { + var n, + o, + r, + i, + a, + u = t.data, + c = e[0], + l = e[1], + s = e[2], + f = e[3], + d = e[4], + h = e[5], + p = e[6], + m = e[7], + g = e[8], + v = e[9], + y = e[10], + b = e[11], + w = e[12], + x = e[13], + R = e[14], + I = e[15], + T = e[16], + k = e[17], + C = e[18], + B = e[19]; + for (a = 0; a < u.length; a += 4) + (n = u[a]), + (o = u[a + 1]), + (r = u[a + 2]), + (i = u[a + 3]), + (u[a] = n * c + o * l + r * s + i * f + d), + (u[a + 1] = n * h + o * p + r * m + i * g + v), + (u[a + 2] = n * y + o * b + r * w + i * x + R), + (u[a + 3] = n * I + o * T + r * k + i * C + B); + return t; + })(u.getImageData(0, 0, o.width, o.height), i)), + u.putImageData(a, 0, 0), + D.fromCanvas(o, r) + ); + var o, r, i, a, u; + }); + } + function X(t, e) { + return t.toCanvas().then(function(n) { + return ( + (o = n), + (r = t.getType()), + (i = e), + (c = s.get2dContext(o)), + (a = c.getImageData(0, 0, o.width, o.height)), + (u = c.getImageData(0, 0, o.width, o.height)), + (u = (function(t, e, n) { + var o, r, i, a, u, c, l, s, f, d, h, p, m, g, v, y, b; + function w(t, e, n) { + return t > n ? (t = n) : t < e && (t = e), t; + } + for ( + i = Math.round(Math.sqrt(n.length)), + a = Math.floor(i / 2), + o = t.data, + r = e.data, + y = t.width, + b = t.height, + c = 0; + c < b; + c++ + ) + for (u = 0; u < y; u++) { + for (l = s = f = 0, h = 0; h < i; h++) + for (d = 0; d < i; d++) + (p = w(u + d - a, 0, y - 1)), + (m = w(c + h - a, 0, b - 1)), + (g = 4 * (m * y + p)), + (v = n[h * i + d]), + (l += o[g] * v), + (s += o[g + 1] * v), + (f += o[g + 2] * v); + (r[(g = 4 * (c * y + u))] = w(l, 0, 255)), + (r[g + 1] = w(s, 0, 255)), + (r[g + 2] = w(f, 0, 255)); + } + return e; + })(a, u, i)), + c.putImageData(u, 0, 0), + D.fromCanvas(o, r) + ); + var o, r, i, a, u, c; + }); + } + function $(t) { + return function(e, n) { + return e.toCanvas().then(function(o) { + return (function(e, n, o) { + var r, + i, + a = s.get2dContext(e), + u = new Array(256); + for (i = 0; i < u.length; i++) u[i] = t(i, o); + return ( + (r = (function(t, e) { + var n, + o = t.data; + for (n = 0; n < o.length; n += 4) + (o[n] = e[o[n]]), + (o[n + 1] = e[o[n + 1]]), + (o[n + 2] = e[o[n + 2]]); + return t; + })(a.getImageData(0, 0, e.width, e.height), u)), + a.putImageData(r, 0, 0), + D.fromCanvas(e, n) + ); + })(o, e.getType(), n); + }); + }; + } + function G(t) { + return function(e, n) { + return N(e, t(V.identity(), n)); + }; + } + function Y(t) { + return function(e) { + return X(e, t); + }; + } + var J, + K = { + invert: ((J = [ + -1, + 0, + 0, + 0, + 255, + 0, + -1, + 0, + 0, + 255, + 0, + 0, + -1, + 0, + 255, + 0, + 0, + 0, + 1, + 0 + ]), + function(t) { + return N(t, J); + }), + brightness: G(V.adjustBrightness), + hue: G(V.adjustHue), + saturate: G(V.adjustSaturation), + contrast: G(V.adjustContrast), + grayscale: G(V.adjustGrayscale), + sepia: G(V.adjustSepia), + colorize: function(t, e, n, o) { + return N(t, V.adjustColors(V.identity(), e, n, o)); + }, + sharpen: Y([0, -1, 0, -1, 5, -1, 0, -1, 0]), + emboss: Y([-2, -1, 0, -1, 1, 1, 0, 1, 2]), + gamma: $(function(t, e) { + return 255 * Math.pow(t / 255, 1 - e); + }), + exposure: $(function(t, e) { + return 255 * (1 - Math.exp((-t / 255) * e)); + }), + colorFilter: N, + convoluteFilter: X + }, + Z = { + scale: function te(t, e, n) { + var o = f.getWidth(t), + r = f.getHeight(t), + i = e / o, + a = n / r, + u = !1; + (i < 0.5 || i > 2) && ((i = i < 0.5 ? 0.5 : 2), (u = !0)), + (a < 0.5 || a > 2) && ((a = a < 0.5 ? 0.5 : 2), (u = !0)); + var c, + l, + h, + p = ((c = t), + (l = i), + (h = a), + new d(function(t) { + var e = f.getWidth(c), + n = f.getHeight(c), + o = Math.floor(e * l), + r = Math.floor(n * h), + i = s.create(o, r), + a = s.get2dContext(i); + a.drawImage(c, 0, 0, e, n, 0, 0, o, r), t(i); + })); + return u + ? p.then(function(t) { + return te(t, e, n); + }) + : p; + } + }, + Q = { + rotate: function(t, e) { + return t.toCanvas().then(function(n) { + return ( + (o = n), + (r = t.getType()), + (i = e), + (a = s.create(o.width, o.height)), + (u = s.get2dContext(a)), + (c = 0), + (l = 0), + (90 != (i = i < 0 ? 360 + i : i) && 270 != i) || + s.resize(a, a.height, a.width), + (90 != i && 180 != i) || (c = a.width), + (270 != i && 180 != i) || (l = a.height), + u.translate(c, l), + u.rotate((i * Math.PI) / 180), + u.drawImage(o, 0, 0), + D.fromCanvas(a, r) + ); + var o, r, i, a, u, c, l; + }); + }, + flip: function(t, e) { + return t.toCanvas().then(function(n) { + return ( + (o = n), + (r = t.getType()), + (i = e), + (a = s.create(o.width, o.height)), + (u = s.get2dContext(a)), + "v" == i + ? (u.scale(1, -1), u.drawImage(o, 0, -a.height)) + : (u.scale(-1, 1), u.drawImage(o, -a.width, 0)), + D.fromCanvas(a, r) + ); + var o, r, i, a, u; + }); + }, + crop: function(t, e, n, o, r) { + return t.toCanvas().then(function(i) { + return ( + (a = i), + (u = t.getType()), + (c = e), + (l = n), + (f = o), + (d = r), + (h = s.create(f, d)), + s.get2dContext(h).drawImage(a, -c, -l), + D.fromCanvas(h, u) + ); + var a, u, c, l, f, d, h; + }); + }, + resize: function(t, e, n) { + return t.toCanvas().then(function(o) { + return Z.scale(o, e, n).then(function(e) { + return D.fromCanvas(e, t.getType()); + }); + }); + } + }, + tt = { + invert: function(t) { + return K.invert(t); + }, + sharpen: function(t) { + return K.sharpen(t); + }, + emboss: function(t) { + return K.emboss(t); + }, + brightness: function(t, e) { + return K.brightness(t, e); + }, + hue: function(t, e) { + return K.hue(t, e); + }, + saturate: function(t, e) { + return K.saturate(t, e); + }, + contrast: function(t, e) { + return K.contrast(t, e); + }, + grayscale: function(t, e) { + return K.grayscale(t, e); + }, + sepia: function(t, e) { + return K.sepia(t, e); + }, + colorize: function(t, e, n, o) { + return K.colorize(t, e, n, o); + }, + gamma: function(t, e) { + return K.gamma(t, e); + }, + exposure: function(t, e) { + return K.exposure(t, e); + }, + flip: function(t, e) { + return Q.flip(t, e); + }, + crop: function(t, e, n, o, r) { + return Q.crop(t, e, n, o, r); + }, + resize: function(t, e, n) { + return Q.resize(t, e, n); + }, + rotate: function(t, e) { + return Q.rotate(t, e); + } + }, + et = function(t) { + return t.toBlob(); + }, + nt = { + blobToImageResult: function(t) { + return D.fromBlob(t); + }, + fromBlobAndUrlSync: function(t, e) { + return D.fromBlobAndUrlSync(t, e); + }, + imageToImageResult: function(t) { + return D.fromImage(t); + }, + imageResultToBlob: function(t, e, n) { + return e === undefined && n === undefined + ? et(t) + : t.toAdjustedBlob(e, n); + }, + imageResultToOriginalBlob: et, + imageResultToDataURL: function(t) { + return t.toDataURL(); + } + }, + ot = function() { + return T("URL"); + }, + rt = { + createObjectURL: function(t) { + return ot().createObjectURL(t); + }, + revokeObjectURL: function(t) { + ot().revokeObjectURL(t); + } + }, + it = tinymce.util.Tools.resolve("tinymce.util.Delay"), + at = tinymce.util.Tools.resolve("tinymce.util.Promise"), + ut = tinymce.util.Tools.resolve("tinymce.util.URI"), + ct = function(t) { + return t.getParam( + "imagetools_toolbar", + "rotateleft rotateright | flipv fliph | crop editimage imageoptions" + ); + }, + lt = function(t) { + return t.getParam("imagetools_proxy"); + }, + st = { + getImageSize: function(t) { + var e, n; + function o(t) { + return /^[0-9\.]+px$/.test(t); + } + return ( + (e = t.style.width), + (n = t.style.height), + e || n + ? o(e) && o(n) + ? { w: parseInt(e, 10), h: parseInt(n, 10) } + : null + : ((e = t.width), + (n = t.height), + e && n ? { w: parseInt(e, 10), h: parseInt(n, 10) } : null) + ); + }, + setImageSize: function(t, e) { + var n, o; + e && + ((n = t.style.width), + (o = t.style.height), + (n || o) && + ((t.style.width = e.w + "px"), + (t.style.height = e.h + "px"), + t.removeAttribute("data-mce-style")), + (n = t.width), + (o = t.height), + (n || o) && + (t.setAttribute("width", e.w), t.setAttribute("height", e.h))); + }, + getNaturalImageSize: function(t) { + return { w: t.naturalWidth, h: t.naturalHeight }; + } + }, + ft = (Array.prototype.indexOf, + undefined, + Array.prototype.push, + Array.prototype.slice, + function(t, e) { + for (var n = 0, o = t.length; n < o; n++) { + var r = t[n]; + if (e(r, n, t)) return w.some(r); + } + return w.none(); + }), + dt = function(t) { + return null !== t && t !== undefined; + }, + ht = { + traverse: function(t, e) { + var n; + return ( + (n = e.reduce(function(t, e) { + return dt(t) ? t[e] : undefined; + }, t)), + dt(n) ? n : null + ); + }, + readBlob: function(t) { + return new at(function(e) { + var n = new C(); + (n.onload = function(t) { + var n = t.target; + e(n.result); + }), + n.readAsText(t); + }); + }, + requestUrlAsBlob: function(t, e) { + return new at(function(o) { + var r; + ((r = new function() { + return new (T("XMLHttpRequest"))(); + }()).onreadystatechange = function() { + 4 === r.readyState && o({ status: r.status, blob: this.response }); + }), + r.open("GET", t, !0), + n.each(e, function(t, e) { + r.setRequestHeader(e, t); + }), + (r.responseType = "blob"), + r.send(); + }); + }, + parseJson: function(t) { + var e; + try { + e = JSON.parse(t); + } catch (n) {} + return e; + } + }, + pt = [ + { code: 404, message: "Could not find Image Proxy" }, + { code: 403, message: "Rejected request" }, + { code: 0, message: "Incorrect Image Proxy URL" } + ], + mt = [ + { + type: "key_missing", + message: "The request did not include an api key." + }, + { + type: "key_not_found", + message: "The provided api key could not be found." + }, + { + type: "domain_not_trusted", + message: "The api key is not valid for the request origins." + } + ], + gt = function(t) { + return ( + "ImageProxy HTTP error: " + + ft(pt, function(e) { + return t === e.code; + }).fold(p.constant("Unknown ImageProxy error"), function(t) { + return t.message; + }) + ); + }, + vt = function(t) { + var e = gt(t); + return at.reject(e); + }, + yt = function(t) { + return ft(mt, function(e) { + return e.type === t; + }).fold(p.constant("Unknown service error"), function(t) { + return t.message; + }); + }, + bt = function(t, e) { + return ht.readBlob(e).then(function(t) { + var e, + n, + o, + r = ((e = t), + (n = ht.parseJson(e)), + "ImageProxy Service error: " + + ((o = ht.traverse(n, ["error", "type"])) + ? yt(o) + : "Invalid JSON in service error message")); + return at.reject(r); + }); + }, + wt = { + handleServiceErrorResponse: function(t, e) { + return 400 === (n = t) || 403 === n || 500 === n ? bt(0, e) : vt(t); + var n; + }, + handleHttpError: vt, + getHttpErrorMsg: gt, + getServiceErrorMsg: yt + }, + xt = function(t, e) { + return ht + .requestUrlAsBlob( + ((n = t), + (o = e), + (r = -1 === n.indexOf("?") ? "?" : "&"), + /[?&]apiKey=/.test(n) || !o + ? n + : n + r + "apiKey=" + encodeURIComponent(o)), + { + "Content-Type": "application/json;charset=UTF-8", + "tiny-api-key": e + } + ) + .then(function(t) { + return t.status < 200 || t.status >= 300 + ? wt.handleServiceErrorResponse(t.status, t.blob) + : at.resolve(t.blob); + }); + var n, o, r; + }, + Rt = function(t, e) { + return e + ? xt(t, e) + : ((n = t), + ht.requestUrlAsBlob(n, {}).then(function(t) { + return t.status < 200 || t.status >= 300 + ? wt.handleHttpError(t.status) + : at.resolve(t.blob); + })); + var n; + }, + It = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"), + Tt = tinymce.util.Tools.resolve("tinymce.ui.Factory"), + kt = function() { + var t = [], + e = -1; + function n() { + return e > 0; + } + function o() { + return -1 !== e && e < t.length - 1; + } + return { + data: t, + add: function(n) { + var o; + return (o = t.splice(++e)), t.push(n), { state: n, removed: o }; + }, + undo: function() { + if (n()) return t[--e]; + }, + redo: function() { + if (o()) return t[++e]; + }, + canUndo: n, + canRedo: o + }; + }, + Ct = tinymce.util.Tools.resolve("tinymce.geom.Rect"), + Bt = function(t) { + return new at(function(e) { + var n = function() { + t.removeEventListener("load", n), e(t); + }; + t.complete ? e(t) : t.addEventListener("load", n); + }); + }, + Ut = tinymce.util.Tools.resolve("tinymce.dom.DomQuery"), + Mt = tinymce.util.Tools.resolve("tinymce.util.Observable"), + jt = tinymce.util.Tools.resolve("tinymce.util.VK"), + At = 0, + zt = function(t, e, o, r, i) { + var a, + u, + c, + l, + s = "mce-", + f = s + "crid-" + At++; + function d(t, e) { + return { x: e.x - t.x, y: e.y - t.y, w: e.w, h: e.h }; + } + function h(e, n, r, i) { + var u, c, l, s, f; + (u = n.x), + (c = n.y), + (l = n.w), + (s = n.h), + (u += r * e.deltaX), + (c += i * e.deltaY), + (l += r * e.deltaW), + (s += i * e.deltaH), + l < 20 && (l = 20), + s < 20 && (s = 20), + (f = t = Ct.clamp({ x: u, y: c, w: l, h: s }, o, "move" === e.name)), + (f = d(o, f)), + a.fire("updateRect", { rect: f }), + g(f); + } + function p(t) { + function o(t, e) { + e.h < 0 && (e.h = 0), + e.w < 0 && (e.w = 0), + Ut("#" + f + "-" + t, r).css({ + left: e.x, + top: e.y, + width: e.w, + height: e.h + }); + } + n.each(u, function(e) { + Ut("#" + f + "-" + e.name, r).css({ + left: t.w * e.xMul + t.x, + top: t.h * e.yMul + t.y + }); + }), + o("top", { x: e.x, y: e.y, w: e.w, h: t.y - e.y }), + o("right", { + x: t.x + t.w, + y: t.y, + w: e.w - t.x - t.w + e.x, + h: t.h + }), + o("bottom", { + x: e.x, + y: t.y + t.h, + w: e.w, + h: e.h - t.y - t.h + e.y + }), + o("left", { x: e.x, y: t.y, w: t.x - e.x, h: t.h }), + o("move", t); + } + function m(e) { + p((t = e)); + } + function g(t) { + var e, n; + m(((e = o), { x: (n = t).x + e.x, y: n.y + e.y, w: n.w, h: n.h })); + } + return ( + (u = [ + { + name: "move", + xMul: 0, + yMul: 0, + deltaX: 1, + deltaY: 1, + deltaW: 0, + deltaH: 0, + label: "Crop Mask" + }, + { + name: "nw", + xMul: 0, + yMul: 0, + deltaX: 1, + deltaY: 1, + deltaW: -1, + deltaH: -1, + label: "Top Left Crop Handle" + }, + { + name: "ne", + xMul: 1, + yMul: 0, + deltaX: 0, + deltaY: 1, + deltaW: 1, + deltaH: -1, + label: "Top Right Crop Handle" + }, + { + name: "sw", + xMul: 0, + yMul: 1, + deltaX: 1, + deltaY: 0, + deltaW: -1, + deltaH: 1, + label: "Bottom Left Crop Handle" + }, + { + name: "se", + xMul: 1, + yMul: 1, + deltaX: 0, + deltaY: 0, + deltaW: 1, + deltaH: 1, + label: "Bottom Right Crop Handle" + } + ]), + (l = ["top", "right", "bottom", "left"]), + Ut( + '
    ' + ).appendTo(r), + n.each(l, function(t) { + Ut("#" + f, r).append( + '