From f6ac4387e808a95d912a738642d53cef267db0f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Nov 2022 09:03:04 +0800 Subject: [PATCH] update 2022-11-03 09:03:04 --- adguardhome/Makefile | 88 --- adguardhome/files/adguardhome.config | 4 - adguardhome/files/adguardhome.init | 25 - adguardhome/patches/default_username.patch | 11 - adguardhome/patches/version.patch | 9 - luci-app-adguardhome/Makefile | 57 -- .../luasrc/controller/AdGuardHome.lua | 130 ---- .../luasrc/model/cbi/AdGuardHome/base.lua | 304 --------- .../luasrc/model/cbi/AdGuardHome/log.lua | 16 - .../luasrc/model/cbi/AdGuardHome/manual.lua | 97 --- .../view/AdGuardHome/AdGuardHome_check.htm | 78 --- .../view/AdGuardHome/AdGuardHome_chpass.htm | 49 -- .../view/AdGuardHome/AdGuardHome_status.htm | 27 - .../luasrc/view/AdGuardHome/log.htm | 111 --- .../luasrc/view/AdGuardHome/yamleditor.htm | 39 -- luci-app-adguardhome/po/zh-cn | 1 - .../po/zh_Hans/adguardhome.po | 408 ----------- .../root/etc/config/AdGuardHome | 11 - .../root/etc/init.d/AdGuardHome | 642 ------------------ .../root/etc/uci-defaults/40_luci-AdGuardHome | 15 - .../AdGuardHome/AdGuardHome_template.yaml | 131 ---- .../root/usr/share/AdGuardHome/addhost.sh | 35 - .../root/usr/share/AdGuardHome/firewall.start | 8 - .../root/usr/share/AdGuardHome/getsyslog.sh | 20 - .../root/usr/share/AdGuardHome/gfw2adg.sh | 89 --- .../root/usr/share/AdGuardHome/links.txt | 3 - .../root/usr/share/AdGuardHome/tailto.sh | 5 - .../root/usr/share/AdGuardHome/update_core.sh | 236 ------- .../root/usr/share/AdGuardHome/waitnet.sh | 35 - .../root/usr/share/AdGuardHome/watchconfig.sh | 13 - .../rpcd/acl.d/luci-app-adguardhome.json | 11 - .../codemirror/addon/fold/foldcode.js | 1 - .../codemirror/addon/fold/foldgutter.css | 1 - .../codemirror/addon/fold/foldgutter.js | 1 - .../codemirror/addon/fold/indent-fold.js | 1 - .../resources/codemirror/lib/codemirror.css | 1 - .../resources/codemirror/lib/codemirror.js | 1 - .../resources/codemirror/mode/yaml/yaml.js | 1 - .../resources/codemirror/theme/dracula.css | 1 - .../luci-static/resources/twin-bcrypt.min.js | 7 - .../root/etc/mosdns/rule/serverlist.txt | 285 +++----- natflow/files/natflow.config | 2 +- 42 files changed, 114 insertions(+), 2896 deletions(-) delete mode 100644 adguardhome/Makefile delete mode 100644 adguardhome/files/adguardhome.config delete mode 100644 adguardhome/files/adguardhome.init delete mode 100644 adguardhome/patches/default_username.patch delete mode 100644 adguardhome/patches/version.patch delete mode 100644 luci-app-adguardhome/Makefile delete mode 100644 luci-app-adguardhome/luasrc/controller/AdGuardHome.lua delete mode 100644 luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua delete mode 100644 luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/log.lua delete mode 100644 luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/manual.lua delete mode 100644 luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_check.htm delete mode 100644 luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_chpass.htm delete mode 100644 luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_status.htm delete mode 100644 luci-app-adguardhome/luasrc/view/AdGuardHome/log.htm delete mode 100644 luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm delete mode 120000 luci-app-adguardhome/po/zh-cn delete mode 100644 luci-app-adguardhome/po/zh_Hans/adguardhome.po delete mode 100644 luci-app-adguardhome/root/etc/config/AdGuardHome delete mode 100644 luci-app-adguardhome/root/etc/init.d/AdGuardHome delete mode 100644 luci-app-adguardhome/root/etc/uci-defaults/40_luci-AdGuardHome delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/AdGuardHome_template.yaml delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/addhost.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/firewall.start delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/getsyslog.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/gfw2adg.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/links.txt delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/tailto.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/update_core.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/waitnet.sh delete mode 100644 luci-app-adguardhome/root/usr/share/AdGuardHome/watchconfig.sh delete mode 100644 luci-app-adguardhome/root/usr/share/rpcd/acl.d/luci-app-adguardhome.json delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldcode.js delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldgutter.css delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldgutter.js delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/indent-fold.js delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.css delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.js delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/mode/yaml/yaml.js delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/codemirror/theme/dracula.css delete mode 100644 luci-app-adguardhome/root/www/luci-static/resources/twin-bcrypt.min.js diff --git a/adguardhome/Makefile b/adguardhome/Makefile deleted file mode 100644 index 9ef476b63..000000000 --- a/adguardhome/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=adguardhome -PKG_VERSION:=0.107.16 -PKG_RELEASE:=71 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=16755c37d8e42bb6bc5266081f7a0defeb6554e2 -PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome -PKG_MIRROR_HASH:=skip - -PKG_LICENSE:=GPL-3.0-only -PKG_LICENSE_FILES:=LICENSE.txt -PKG_MAINTAINER:=Dobroslaw Kijowski - -PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -PKG_CONFIG_DEPENDS:=CONFIG_ADGUARDHOME_COMPRESS_GOPROXY - -GO_PKG:=github.com/AdguardTeam/AdGuardHome -GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome - -AGH_BUILD_TIME:=$(shell date -d @$(SOURCE_DATE_EPOCH) +%FT%TZ%z) -AGH_VERSION_PKG:=github.com/AdguardTeam/AdGuardHome/internal/version -GO_PKG_LDFLAGS_X:=$(AGH_VERSION_PKG).channel=release \ - $(AGH_VERSION_PKG).version=v$(PKG_VERSION) \ - $(AGH_VERSION_PKG).buildtime=$(AGH_BUILD_TIME) \ - $(AGH_VERSION_PKG).goarm=$(GO_ARM) \ - $(AGH_VERSION_PKG).gomips=$(GO_MIPS) - -include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk - -define Package/adguardhome - SECTION:=net - CATEGORY:=Network - TITLE:=Network-wide ads and trackers blocking DNS server - URL:=https://github.com/AdguardTeam/AdGuardHome - DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle -endef - -define Package/adguardhome/conffiles -/etc/adguardhome.yaml -/etc/config/adguardhome -endef - -define Package/adguardhome/description -Free and open source, powerful network-wide ads and trackers blocking DNS server. -endef - -define Package/$(PKG_NAME)/config -config ADGUARDHOME_COMPRESS_GOPROXY - bool "Compiling with GOPROXY proxy" - default n -endef - -ifeq ($(CONFIG_ADGUARDHOME_COMPRESS_GOPROXY),y) -export GO111MODULE=on -export GOPROXY=https://goproxy.bj.bcebos.com -endif - -define Build/Compile - ( \ - pushd $(PKG_BUILD_DIR) ; \ - make js-deps js-build ; \ - popd ; \ - $(call GoPackage/Build/Compile) ; \ - ) -endef - -define Package/adguardhome/install - $(call GoPackage/Package/Install/Bin,$(1)) - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/adguardhome.init $(1)/etc/init.d/adguardhome - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DATA) ./files/adguardhome.config $(1)/etc/config/adguardhome -endef - -$(eval $(call GoBinPackage,adguardhome)) -$(eval $(call BuildPackage,adguardhome)) diff --git a/adguardhome/files/adguardhome.config b/adguardhome/files/adguardhome.config deleted file mode 100644 index a9558020b..000000000 --- a/adguardhome/files/adguardhome.config +++ /dev/null @@ -1,4 +0,0 @@ -config adguardhome config - option enabled '0' - # Where to store persistent data by AdGuard Home - option workdir /var/adguardhome diff --git a/adguardhome/files/adguardhome.init b/adguardhome/files/adguardhome.init deleted file mode 100644 index 67cc06886..000000000 --- a/adguardhome/files/adguardhome.init +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh /etc/rc.common - -PROG=/usr/bin/AdGuardHome - -USE_PROCD=1 - -# starts after network starts -START=21 -# stops before networking stops -STOP=89 - -start_service() { - config_load adguardhome - config_get_bool enabled config enabled - config_get WORK_DIR config workdir - - [ "$enabled" -eq "1" ] || exit 2 - [ -d "$WORK_DIR" ] || mkdir -m 0755 -p "$WORK_DIR" - - procd_open_instance - procd_set_param command "$PROG" -c /etc/adguardhome.yaml -w "$WORK_DIR" --no-check-update - procd_set_param stdout 1 - procd_set_param stderr 1 - procd_close_instance -} diff --git a/adguardhome/patches/default_username.patch b/adguardhome/patches/default_username.patch deleted file mode 100644 index ba560a12d..000000000 --- a/adguardhome/patches/default_username.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/client/src/login/Login/Form.js -+++ b/client/src/login/Login/Form.js -@@ -25,7 +25,7 @@ const Form = (props) => { - type="text" - className="form-control" - component={renderInputField} -- placeholder={t('username_placeholder')} -+ placeholder="默认用户名密码都是root" - autoComplete="username" - autocapitalize="none" - disabled={processing} diff --git a/adguardhome/patches/version.patch b/adguardhome/patches/version.patch deleted file mode 100644 index d5fe1817b..000000000 --- a/adguardhome/patches/version.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/client/src/helpers/version.js -+++ b/client/src/helpers/version.js -@@ -13,5 +13,5 @@ export const areEqualVersions = (left, right) => { - - const leftVersion = left.replace(/^v/, ''); - const rightVersion = right.replace(/^v/, ''); -- return leftVersion === rightVersion; -+ return leftVersion >= rightVersion; - }; diff --git a/luci-app-adguardhome/Makefile b/luci-app-adguardhome/Makefile deleted file mode 100644 index db03e8acb..000000000 --- a/luci-app-adguardhome/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2018-2019 Lienol -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-adguardhome -PKG_MAINTAINER:= - -LUCI_TITLE:=LuCI app for AdGuardHome -LUCI_PKGARCH:=all -LUCI_DEPENDS:=+ca-certs +curl +wget-ssl +PACKAGE_$(PKG_NAME)_INCLUDE_binary:adguardhome -LUCI_DESCRIPTION:=LuCI support for AdGuardHome - -define Package/$(PKG_NAME)/config -config PACKAGE_$(PKG_NAME)_INCLUDE_binary - bool "Include Binary File" - default y -endef - -PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_binary - -define Package/luci-app-adguardhome/conffiles -/usr/share/AdGuardHome/links.txt -/etc/config/AdGuardHome -/etc/AdGuardHome.yaml -endef - -define Package/luci-app-adguardhome/postinst -#!/bin/sh - /etc/init.d/AdGuardHome enable >/dev/null 2>&1 - enable=$(uci get AdGuardHome.AdGuardHome.enabled 2>/dev/null) - if [ "$enable" == "1" ]; then - /etc/init.d/AdGuardHome reload - fi - rm -f /tmp/luci-indexcache - rm -f /tmp/luci-modulecache/* -exit 0 -endef - -define Package/luci-app-adguardhome/prerm -#!/bin/sh -if [ -z "$${IPKG_INSTROOT}" ]; then - /etc/init.d/AdGuardHome disable - /etc/init.d/AdGuardHome stop -uci -q batch <<-EOF >/dev/null 2>&1 - delete ucitrack.@AdGuardHome[-1] - commit ucitrack -EOF -fi -exit 0 -endef - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-adguardhome/luasrc/controller/AdGuardHome.lua b/luci-app-adguardhome/luasrc/controller/AdGuardHome.lua deleted file mode 100644 index e9d37a766..000000000 --- a/luci-app-adguardhome/luasrc/controller/AdGuardHome.lua +++ /dev/null @@ -1,130 +0,0 @@ -module("luci.controller.AdGuardHome",package.seeall) -local fs=require"nixio.fs" -local http=require"luci.http" -local uci=require"luci.model.uci".cursor() -function index() -local page = entry({"admin", "services", "AdGuardHome"},alias("admin", "services", "AdGuardHome", "base"),_("AdGuard Home")) -page.order = 10 -page.dependent = true -page.acl_depends = { "luci-app-adguardhome" } -entry({"admin","services","AdGuardHome","base"},cbi("AdGuardHome/base"),_("Base Setting"),1).leaf = true -entry({"admin","services","AdGuardHome","log"},form("AdGuardHome/log"),_("Log"),2).leaf = true -entry({"admin","services","AdGuardHome","manual"},cbi("AdGuardHome/manual"),_("Manual Config"),3).leaf = true -entry({"admin","services","AdGuardHome","status"},call("act_status")).leaf=true -entry({"admin", "services", "AdGuardHome", "check"}, call("check_update")) -entry({"admin", "services", "AdGuardHome", "doupdate"}, call("do_update")) -entry({"admin", "services", "AdGuardHome", "getlog"}, call("get_log")) -entry({"admin", "services", "AdGuardHome", "dodellog"}, call("do_dellog")) -entry({"admin", "services", "AdGuardHome", "reloadconfig"}, call("reload_config")) -entry({"admin", "services", "AdGuardHome", "gettemplateconfig"}, call("get_template_config")) -end -function get_template_config() - local b - local d="" - for cnt in io.lines("/tmp/resolv.conf.d/resolv.conf.auto") do - b=string.match (cnt,"^[^#]*nameserver%s+([^%s]+)$") - if (b~=nil) then - d=d.." - "..b.."\n" - end - end - local f=io.open("/usr/share/AdGuardHome/AdGuardHome_template.yaml", "r+") - local tbl = {} - local a="" - while (1) do - a=f:read("*l") - if (a=="#bootstrap_dns") then - a=d - elseif (a=="#upstream_dns") then - a=d - elseif (a==nil) then - break - end - table.insert(tbl, a) - end - f:close() - http.prepare_content("text/plain; charset=utf-8") - http.write(table.concat(tbl, "\n")) -end -function reload_config() - fs.remove("/tmp/AdGuardHometmpconfig.yaml") - http.prepare_content("application/json") - http.write('') -end -function act_status() - local e={} - local binpath=uci:get("AdGuardHome","AdGuardHome","binpath") - e.running=luci.sys.call("pgrep "..binpath.." >/dev/null")==0 - e.redirect=(fs.readfile("/var/run/AdGredir")=="1") - http.prepare_content("application/json") - http.write_json(e) -end -function do_update() - fs.writefile("/var/run/lucilogpos","0") - http.prepare_content("application/json") - http.write('') - local arg - if luci.http.formvalue("force") == "1" then - arg="force" - else - arg="" - end - if fs.access("/var/run/update_core") then - if arg=="force" then - luci.sys.exec("kill $(pgrep /usr/share/AdGuardHome/update_core.sh) ; sh /usr/share/AdGuardHome/update_core.sh "..arg.." >/tmp/AdGuardHome_update.log 2>&1 &") - end - else - luci.sys.exec("sh /usr/share/AdGuardHome/update_core.sh "..arg.." >/tmp/AdGuardHome_update.log 2>&1 &") - end -end -function get_log() - local logfile=uci:get("AdGuardHome","AdGuardHome","logfile") - if (logfile==nil) then - http.write("no log available\n") - return - elseif (logfile=="syslog") then - if not fs.access("/var/run/AdGuardHomesyslog") then - luci.sys.exec("(/usr/share/AdGuardHome/getsyslog.sh &); sleep 1;") - end - logfile="/tmp/AdGuardHometmp.log" - fs.writefile("/var/run/AdGuardHomesyslog","1") - elseif not fs.access(logfile) then - http.write("") - return - end - http.prepare_content("text/plain; charset=utf-8") - local fdp - if fs.access("/var/run/lucilogreload") then - fdp=0 - fs.remove("/var/run/lucilogreload") - else - fdp=tonumber(fs.readfile("/var/run/lucilogpos")) or 0 - end - local f=io.open(logfile, "r+") - f:seek("set",fdp) - local a=f:read(2048000) or "" - fdp=f:seek() - fs.writefile("/var/run/lucilogpos",tostring(fdp)) - f:close() - http.write(a) -end -function do_dellog() - local logfile=uci:get("AdGuardHome","AdGuardHome","logfile") - fs.writefile(logfile,"") - http.prepare_content("application/json") - http.write('') -end -function check_update() - http.prepare_content("text/plain; charset=utf-8") - local fdp=tonumber(fs.readfile("/var/run/lucilogpos")) or 0 - local f=io.open("/tmp/AdGuardHome_update.log", "r+") - f:seek("set",fdp) - local a=f:read(2048000) or "" - fdp=f:seek() - fs.writefile("/var/run/lucilogpos",tostring(fdp)) - f:close() -if fs.access("/var/run/update_core") then - http.write(a) -else - http.write(a.."\0") -end -end diff --git a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua deleted file mode 100644 index 6896b61ef..000000000 --- a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua +++ /dev/null @@ -1,304 +0,0 @@ -require("luci.sys") -require("luci.util") -require("io") -local m,s,o,o1 -local fs=require"nixio.fs" -local uci=require"luci.model.uci".cursor() -local configpath=uci:get("AdGuardHome","AdGuardHome","configpath") or "/etc/AdGuardHome.yaml" -local binpath=uci:get("AdGuardHome","AdGuardHome","binpath") or "/usr/bin/AdGuardHome" -httpport=uci:get("AdGuardHome","AdGuardHome","httpport") or "3000" -m = Map("AdGuardHome", "AdGuard Home") -m.description = translate("Free and open source, powerful network-wide ads & trackers blocking DNS server.") -m:section(SimpleSection).template = "AdGuardHome/AdGuardHome_status" - -s = m:section(TypedSection, "AdGuardHome") -s.anonymous=true -s.addremove=false ----- enable -o = s:option(Flag, "enabled", translate("Enable")) -o.default = 0 -o.optional = false ----- httpport -o =s:option(Value,"httpport",translate("Browser management port")) -o.placeholder=3000 -o.default=3000 -o.datatype="port" -o.optional = false -o.description = translate("") ----- update warning not safe -local binmtime=uci:get("AdGuardHome","AdGuardHome","binmtime") or "0" -local e="" -if not fs.access(configpath) then - e=e.." "..translate("no config") -end -if not fs.access(binpath) then - e=e.." "..translate("no core") -else - local version=uci:get("AdGuardHome","AdGuardHome","version") - local testtime=fs.stat(binpath,"mtime") - if testtime~=tonumber(binmtime) or version==nil then - local tmp=luci.sys.exec(binpath.." --version | grep -m 1 -E 'v[0-9.]+' -o ") - version=string.sub(tmp, 1) - if version=="" then version="core error" end - uci:set("AdGuardHome","AdGuardHome","version",version) - uci:set("AdGuardHome","AdGuardHome","binmtime",testtime) - uci:save("AdGuardHome") - end - e=version..e -end -o=s:option(Button,"restart",translate("Update")) -o.inputtitle=translate("Update core version") -o.template = "AdGuardHome/AdGuardHome_check" -o.showfastconfig=(not fs.access(configpath)) -o.description=string.format(translate("core version:").."%s ",e) ----- port warning not safe -local port=luci.sys.exec("awk '/ port:/{printf($2);exit;}' "..configpath.." 2>nul") -if (port=="") then port="?" end ----- Redirect -o = s:option(ListValue, "redirect", port..translate("Redirect"), translate("AdGuardHome redirect mode")) -o.placeholder = "none" -o:value("none", translate("none")) -o:value("dnsmasq-upstream", translate("Run as dnsmasq upstream server")) -o:value("redirect", translate("Redirect 53 port to AdGuardHome")) -o:value("exchange", translate("Use port 53 replace dnsmasq")) -o.default = "none" -o.optional = true ----- bin path -o = s:option(Value, "binpath", translate("Bin Path"), translate("AdGuardHome Bin path if no bin will auto download")) -o.default = "/usr/bin/AdGuardHome" -o.datatype = "string" -o.optional = false -o.rmempty=false -o.validate=function(self, value) -if value=="" then return nil end -if fs.stat(value,"type")=="dir" then - fs.rmdir(value) -end -if fs.stat(value,"type")=="dir" then - if (m.message) then - m.message =m.message.."\nerror!bin path is a dir" - else - m.message ="error!bin path is a dir" - end - return nil -end -return value -end ---- upx -o = s:option(ListValue, "upxflag", translate("use upx to compress bin after download")) -o:value("", translate("none")) -o:value("-1", translate("compress faster")) -o:value("-9", translate("compress better")) -o:value("--best", translate("compress best(can be slow for big files)")) -o:value("--brute", translate("try all available compression methods & filters [slow]")) -o:value("--ultra-brute", translate("try even more compression variants [very slow]")) -o.default = "" -o.description=translate("bin use less space,but may have compatibility issues") -o.rmempty = true ----- config path -o = s:option(Value, "configpath", translate("Config Path"), translate("AdGuardHome config path")) -o.default = "/etc/AdGuardHome.yaml" -o.datatype = "string" -o.optional = false -o.rmempty=false -o.validate=function(self, value) -if value==nil then return nil end -if fs.stat(value,"type")=="dir" then - fs.rmdir(value) -end -if fs.stat(value,"type")=="dir" then - if m.message then - m.message =m.message.."\nerror!config path is a dir" - else - m.message ="error!config path is a dir" - end - return nil -end -return value -end ----- work dir -o = s:option(Value, "workdir", translate("Work dir"), translate("AdGuardHome work dir include rules,audit log and database")) -o.default = "/etc/AdGuardHome" -o.datatype = "string" -o.optional = false -o.rmempty=false -o.validate=function(self, value) -if value=="" then return nil end -if fs.stat(value,"type")=="reg" then - if m.message then - m.message =m.message.."\nerror!work dir is a file" - else - m.message ="error!work dir is a file" - end - return nil -end -if string.sub(value, -1)=="/" then - return string.sub(value, 1, -2) -else - return value -end -end ----- log file -o = s:option(Value, "logfile", translate("Runtime log file"), translate("AdGuardHome runtime Log file if 'syslog': write to system log;if empty no log")) -o.datatype = "string" -o.rmempty = true -o.validate=function(self, value) -if fs.stat(value,"type")=="dir" then - fs.rmdir(value) -end -if fs.stat(value,"type")=="dir" then - if m.message then - m.message =m.message.."\nerror!log file is a dir" - else - m.message ="error!log file is a dir" - end - return nil -end -return value -end ----- debug -o = s:option(Flag, "verbose", translate("Verbose log")) -o.default = 0 -o.optional = true ----- gfwlist -local a=luci.sys.call("grep -m 1 -q programadd "..configpath) -if (a==0) then -a="Added" -else -a="Not added" -end -o=s:option(Button,"gfwdel",translate("Del gfwlist"),translate(a)) -o.optional = true -o.inputtitle=translate("Del") -o.write=function() - luci.sys.exec("sh /usr/share/AdGuardHome/gfw2adg.sh del 2>&1") - luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome")) -end -o=s:option(Button,"gfwadd",translate("Add gfwlist"),translate(a)) -o.optional = true -o.inputtitle=translate("Add") -o.write=function() - luci.sys.exec("sh /usr/share/AdGuardHome/gfw2adg.sh 2>&1") - luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome")) -end -o = s:option(Value, "gfwupstream", translate("Gfwlist upstream dns server"), translate("Gfwlist domain upstream dns service")..translate(a)) -o.default = "tcp://208.67.220.220:5353" -o.datatype = "string" -o.optional = true ----- chpass -o = s:option(Value, "hashpass", translate("Change browser management password"), translate("Press load culculate model and culculate finally save/apply")) -o.default = "" -o.datatype = "string" -o.template = "AdGuardHome/AdGuardHome_chpass" -o.optional = true ----- upgrade protect -o = s:option(MultiValue, "upprotect", translate("Keep files when system upgrade")) -o:value("$binpath",translate("core bin")) -o:value("$configpath",translate("config file")) -o:value("$logfile",translate("log file")) -o:value("$workdir/data/sessions.db",translate("sessions.db")) -o:value("$workdir/data/stats.db",translate("stats.db")) -o:value("$workdir/data/querylog.json",translate("querylog.json")) -o:value("$workdir/data/filters",translate("filters")) -o.widget = "checkbox" -o.default = nil -o.optional=true ----- wait net on boot -o = s:option(Flag, "waitonboot", translate("On boot when network ok restart")) -o.default = 1 -o.optional = true ----- backup workdir on shutdown -local workdir=uci:get("AdGuardHome","AdGuardHome","workdir") or "/etc/AdGuardHome" -o = s:option(MultiValue, "backupfile", translate("Backup workdir files when shutdown")) -o1 = s:option(Value, "backupwdpath", translate("Backup workdir path")) -local name -o:value("filters","filters") -o:value("stats.db","stats.db") -o:value("querylog.json","querylog.json") -o:value("sessions.db","sessions.db") -o1:depends ("backupfile", "filters") -o1:depends ("backupfile", "stats.db") -o1:depends ("backupfile", "querylog.json") -o1:depends ("backupfile", "sessions.db") -for name in fs.glob(workdir.."/data/*") -do - name=fs.basename (name) - if name~="filters" and name~="stats.db" and name~="querylog.json" and name~="sessions.db" then - o:value(name,name) - o1:depends ("backupfile", name) - end -end -o.widget = "checkbox" -o.default = nil -o.optional=false -o.description=translate("Will be restore when workdir/data is empty") -----backup workdir path - -o1.default = "/etc/AdGuardHome" -o1.datatype = "string" -o1.optional = false -o1.validate=function(self, value) -if fs.stat(value,"type")=="reg" then - if m.message then - m.message =m.message.."\nerror!backup dir is a file" - else - m.message ="error!backup dir is a file" - end - return nil -end -if string.sub(value,-1)=="/" then - return string.sub(value, 1, -2) -else - return value -end -end - -----Crontab -o = s:option(MultiValue, "crontab", translate("Crontab task"),translate("Please change time and args in crontab")) -o:value("autoupdate",translate("Auto update core")) -o:value("cutquerylog",translate("Auto tail querylog")) -o:value("cutruntimelog",translate("Auto tail runtime log")) -o:value("autohost",translate("Auto update ipv6 hosts and restart adh")) -o:value("autogfw",translate("Auto update gfwlist and restart adh")) -o.widget = "checkbox" -o.default = nil -o.optional=true - -----downloadpath -o = s:option(TextValue, "downloadlinks",translate("Download links for update")) -o.optional = false -o.rows = 4 -o.wrap = "soft" -o.cfgvalue = function(self, section) - return fs.readfile("/usr/share/AdGuardHome/links.txt") -end -o.write = function(self, section, value) - fs.writefile("/usr/share/AdGuardHome/links.txt", value:gsub("\r\n", "\n")) -end -fs.writefile("/var/run/lucilogpos","0") -function m.on_commit(map) - if (fs.access("/var/run/AdGserverdis")) then - io.popen("/etc/init.d/AdGuardHome reload &") - return - end - local ucitracktest=uci:get("AdGuardHome","AdGuardHome","ucitracktest") - if ucitracktest=="1" then - return - elseif ucitracktest=="0" then - io.popen("/etc/init.d/AdGuardHome reload &") - else - if (fs.access("/var/run/AdGlucitest")) then - uci:set("AdGuardHome","AdGuardHome","ucitracktest","0") - io.popen("/etc/init.d/AdGuardHome reload &") - else - fs.writefile("/var/run/AdGlucitest","") - if (ucitracktest=="2") then - uci:set("AdGuardHome","AdGuardHome","ucitracktest","1") - else - uci:set("AdGuardHome","AdGuardHome","ucitracktest","2") - end - end - uci:save("AdGuardHome") - end -end -return m diff --git a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/log.lua b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/log.lua deleted file mode 100644 index 5d18a88db..000000000 --- a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/log.lua +++ /dev/null @@ -1,16 +0,0 @@ -local fs=require"nixio.fs" -local uci=require"luci.model.uci".cursor() -local f,t -f=SimpleForm("logview") -f.reset = false -f.submit = false -t=f:field(TextValue,"conf") -t.rmempty=true -t.rows=20 -t.template="AdGuardHome/log" -t.readonly="readonly" -local logfile=uci:get("AdGuardHome","AdGuardHome","logfile") or "" -t.timereplace=(logfile~="syslog" and logfile~="" ) -t.pollcheck=logfile~="" -fs.writefile("/var/run/lucilogreload","") -return f diff --git a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/manual.lua b/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/manual.lua deleted file mode 100644 index ecf072bbc..000000000 --- a/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/manual.lua +++ /dev/null @@ -1,97 +0,0 @@ -local m, s, o -local fs = require "nixio.fs" -local uci=require"luci.model.uci".cursor() -local sys=require"luci.sys" -require("string") -require("io") -require("table") -function gen_template_config() - local b - local d="" - for cnt in io.lines("/tmp/resolv.conf.d/resolv.conf.auto") do - b=string.match (cnt,"^[^#]*nameserver%s+([^%s]+)$") - if (b~=nil) then - d=d.." - "..b.."\n" - end - end - local f=io.open("/usr/share/AdGuardHome/AdGuardHome_template.yaml", "r+") - local tbl = {} - local a="" - while (1) do - a=f:read("*l") - if (a=="#bootstrap_dns") then - a=d - elseif (a=="#upstream_dns") then - a=d - elseif (a==nil) then - break - end - table.insert(tbl, a) - end - f:close() - return table.concat(tbl, "\n") -end -m = Map("AdGuardHome") -local configpath = uci:get("AdGuardHome","AdGuardHome","configpath") -local binpath = uci:get("AdGuardHome","AdGuardHome","binpath") -s = m:section(TypedSection, "AdGuardHome") -s.anonymous=true -s.addremove=false ---- config -o = s:option(TextValue, "escconf") -o.rows = 66 -o.wrap = "off" -o.rmempty = true -o.cfgvalue = function(self, section) - return fs.readfile("/tmp/AdGuardHometmpconfig.yaml") or fs.readfile(configpath) or gen_template_config() or "" -end -o.validate=function(self, value) - fs.writefile("/tmp/AdGuardHometmpconfig.yaml", value:gsub("\r\n", "\n")) - if fs.access(binpath) then - if (sys.call(binpath.." -c /tmp/AdGuardHometmpconfig.yaml --check-config 2> /tmp/AdGuardHometest.log")==0) then - return value - end - else - return value - end - luci.http.redirect(luci.dispatcher.build_url("admin","services","AdGuardHome","manual")) - return nil -end -o.write = function(self, section, value) - fs.move("/tmp/AdGuardHometmpconfig.yaml",configpath) -end -o.remove = function(self, section, value) - fs.writefile(configpath, "") -end ---- js and reload button -o = s:option(DummyValue, "") -o.anonymous=true -o.template = "AdGuardHome/yamleditor" -if not fs.access(binpath) then - o.description=translate("WARNING!!! no bin found apply config will not be test") -end ---- log -if (fs.access("/tmp/AdGuardHometmpconfig.yaml")) then -local c=fs.readfile("/tmp/AdGuardHometest.log") -if (c~="") then -o = s:option(TextValue, "") -o.readonly=true -o.rows = 5 -o.rmempty = true -o.name="" -o.cfgvalue = function(self, section) - return fs.readfile("/tmp/AdGuardHometest.log") -end -end -end -function m.on_commit(map) - local ucitracktest=uci:get("AdGuardHome","AdGuardHome","ucitracktest") - if ucitracktest=="1" then - return - elseif ucitracktest=="0" then - io.popen("/etc/init.d/AdGuardHome reload &") - else - fs.writefile("/var/run/AdGlucitest","") - end -end -return m diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_check.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_check.htm deleted file mode 100644 index 832a1df46..000000000 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_check.htm +++ /dev/null @@ -1,78 +0,0 @@ -<%+cbi/valueheader%> -<%local fs=require"nixio.fs"%> - - -<% if self.showfastconfig then %> - -<%end%> - - -<%+cbi/valuefooter%> diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_chpass.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_chpass.htm deleted file mode 100644 index b6ff3ebb3..000000000 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_chpass.htm +++ /dev/null @@ -1,49 +0,0 @@ -<%+cbi/valueheader%> - - 0, "data-choices", { self.keylist, self.vallist }) - %> /> - <% if self.password then %><% end %> - -<%+cbi/valuefooter%> diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_status.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_status.htm deleted file mode 100644 index 7e924d119..000000000 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_status.htm +++ /dev/null @@ -1,27 +0,0 @@ - - -
-

- <%:Collecting data...%> -

-
\ No newline at end of file diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/log.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/log.htm deleted file mode 100644 index 11a1f787a..000000000 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/log.htm +++ /dev/null @@ -1,111 +0,0 @@ -<%+cbi/valueheader%> -<%:reverse%> -<%if self.timereplace then%> -<%:localtime%>
-<%end%> - - - - -<%+cbi/valuefooter%> diff --git a/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm b/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm deleted file mode 100644 index 639cb9988..000000000 --- a/luci-app-adguardhome/luasrc/view/AdGuardHome/yamleditor.htm +++ /dev/null @@ -1,39 +0,0 @@ -<%+cbi/valueheader%> - - - - - - - - - -<%fs=require"nixio.fs"%> -<%if fs.access("/tmp/AdGuardHometmpconfig.yaml") then%> - -<%end%> - -<%+cbi/valuefooter%> \ No newline at end of file diff --git a/luci-app-adguardhome/po/zh-cn b/luci-app-adguardhome/po/zh-cn deleted file mode 120000 index 8d69574dd..000000000 --- a/luci-app-adguardhome/po/zh-cn +++ /dev/null @@ -1 +0,0 @@ -zh_Hans \ No newline at end of file diff --git a/luci-app-adguardhome/po/zh_Hans/adguardhome.po b/luci-app-adguardhome/po/zh_Hans/adguardhome.po deleted file mode 100644 index 0ace89bae..000000000 --- a/luci-app-adguardhome/po/zh_Hans/adguardhome.po +++ /dev/null @@ -1,408 +0,0 @@ -msgid "" -msgstr "" -"Content-Type: text/plain; charset=UTF-8\n" -"Project-Id-Version: PACKAGE VERSION\n" -"Last-Translator: Automatically generated\n" -"Language-Team: none\n" -"Language: zh_Hans\n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" - -#: /mnt/A/openwrt-latest/package/ctcgfw/luci-app-adguardhome/luasrc/model/cbi/AdGuardHome/base.lua:27 -msgid "" -"/dev/null 2>&1 - if [ $? -eq 0 ]; then - return - fi - uci delete dhcp.@dnsmasq[0].server 2>/dev/null - uci add_list dhcp.@dnsmasq[0].server=$addr - for server in $OLD_SERVER; do - if [ "$server" = "$addr" ]; then - continue - fi - # uci add_list dhcp.@dnsmasq[0].server=$server - done - uci delete dhcp.@dnsmasq[0].resolvfile 2>/dev/null - uci set dhcp.@dnsmasq[0].noresolv=1 - uci commit dhcp - /etc/init.d/dnsmasq restart -} - -stop_forward_dnsmasq() -{ - local OLD_PORT="$1" - addr="127.0.0.1#$OLD_PORT" - OLD_SERVER="`uci get dhcp.@dnsmasq[0].server 2>/dev/null`" - echo $OLD_SERVER | grep "^$addr" >/dev/null 2>&1 - if [ $? -ne 0 ]; then - return - fi - - uci del_list dhcp.@dnsmasq[0].server=$addr 2>/dev/null - addrlist="`uci get dhcp.@dnsmasq[0].server 2>/dev/null`" - if [ -z "$addrlist" ] ; then - uci set dhcp.@dnsmasq[0].resolvfile=/tmp/resolv.conf.d/resolv.conf.auto 2>/dev/null - uci delete dhcp.@dnsmasq[0].noresolv 2>/dev/null - fi - uci commit dhcp - /etc/init.d/dnsmasq restart -} - -set_iptable() -{ - local ipv6_server=$1 - local tcp_server=$2 - uci -q batch <<-EOF >/dev/null 2>&1 - delete firewall.AdGuardHome - set firewall.AdGuardHome=include - set firewall.AdGuardHome.type=script - set firewall.AdGuardHome.path=/usr/share/AdGuardHome/firewall.start - set firewall.AdGuardHome.reload=1 - commit firewall -EOF - - IPS="`ifconfig | grep "inet addr" | grep -v ":127" | grep "Bcast" | awk '{print $2}' | awk -F : '{print $2}'`" - for IP in $IPS - do - if [ "$tcp_server" == "1" ]; then - iptables -t nat -A PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 - fi - iptables -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 - done - - if [ "$ipv6_server" == 0 ]; then - return - fi - - IPS="`ifconfig | grep "inet6 addr" | grep -v " fe80::" | grep -v " ::1" | grep "Global" | awk '{print $3}'`" - for IP in $IPS - do - if [ "$tcp_server" == "1" ]; then - ip6tables -t nat -A PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 - fi - ip6tables -t nat -A PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $AdGuardHome_PORT >/dev/null 2>&1 - done -} - -clear_iptable() -{ - uci -q batch <<-EOF >/dev/null 2>&1 - delete firewall.AdGuardHome - commit firewall -EOF - local OLD_PORT="$1" - local ipv6_server=$2 - IPS="`ifconfig | grep "inet addr" | grep -v ":127" | grep "Bcast" | awk '{print $2}' | awk -F : '{print $2}'`" - for IP in $IPS - do - iptables -t nat -D PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 - iptables -t nat -D PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 - done - - if [ "$ipv6_server" == 0 ]; then - return - fi - echo "warn ip6tables nat mod is needed" - IPS="`ifconfig | grep "inet6 addr" | grep -v " fe80::" | grep -v " ::1" | grep "Global" | awk '{print $3}'`" - for IP in $IPS - do - ip6tables -t nat -D PREROUTING -p udp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 - ip6tables -t nat -D PREROUTING -p tcp -d $IP --dport 53 -j REDIRECT --to-ports $OLD_PORT >/dev/null 2>&1 - done -} - -service_triggers() { - procd_add_reload_trigger "$CONFIGURATION" - [ "$(uci get AdGuardHome.AdGuardHome.redirect)" == "redirect" ] && procd_add_reload_trigger firewall -} - -isrunning(){ - config_load "${CONFIGURATION}" - _isrunning - local r=$? - ([ "$r" == "0" ] && echo "running") || ([ "$r" == "1" ] && echo "not run" ) || echo "no bin" - return $r -} - -_isrunning(){ - config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome" - [ ! -f "$binpath" ] && return 2 - pgrep $binpath 2>&1 >/dev/null && return 0 - return 1 -} - -force_reload(){ - config_load "${CONFIGURATION}" - _isrunning && procd_send_signal "$CONFIGURATION" || start -} - -get_tz() -{ - SET_TZ="" - - if [ -e "/etc/localtime" ]; then - return - fi - - for tzfile in /etc/TZ /var/etc/TZ - do - if [ ! -e "$tzfile" ]; then - continue - fi - - tz="`cat $tzfile 2>/dev/null`" - done - - if [ -z "$tz" ]; then - return - fi - - SET_TZ=$tz -} - -rm_port53() -{ - local AdGuardHome_PORT=$(config_editor "dns.port" "" "$configpath" "1") - dnsmasq_port=$(uci get dhcp.@dnsmasq[0].port 2>/dev/null) - if [ -z "$dnsmasq_port" ]; then - dnsmasq_port="53" - fi - if [ "$dnsmasq_port" == "$AdGuardHome_PORT" ]; then - if [ "$dnsmasq_port" == "53" ]; then - dnsmasq_port="1745" - fi - elif [ "$dnsmasq_port" == "53" ]; then - return - fi - config_editor "dns.port" "$dnsmasq_port" "$configpath" - uci set dhcp.@dnsmasq[0].port="53" - uci commit dhcp - config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome" - killall -9 $binpath - /etc/init.d/dnsmasq restart -} - -use_port53() -{ - local AdGuardHome_PORT=$(config_editor "dns.port" "" "$configpath" "1") - dnsmasq_port=$(uci get dhcp.@dnsmasq[0].port 2>/dev/null) - if [ -z "$dnsmasq_port" ]; then - dnsmasq_port="53" - fi - if [ "$dnsmasq_port" == "$AdGuardHome_PORT" ]; then - if [ "$dnsmasq_port" == "53" ]; then - AdGuardHome_PORT="1745" - fi - elif [ "$AdGuardHome_PORT" == "53" ]; then - return - fi - config_editor "dns.port" "53" "$configpath" - uci set dhcp.@dnsmasq[0].port="$AdGuardHome_PORT" - uci commit dhcp - /etc/init.d/dnsmasq reload -} - -do_redirect() -{ - config_load "${CONFIGURATION}" - _do_redirect $1 -} - -_do_redirect() -{ - local section="$CONFIGURATION" - args="" - ipv6_server=1 - tcp_server=0 - enabled=$1 - if [ "$enabled" == "1" ]; then - echo -n "1">/var/run/AdGredir - else - echo -n "0">/var/run/AdGredir - fi - config_get configpath $CONFIGURATION configpath "/etc/AdGuardHome.yaml" - AdGuardHome_PORT=$(config_editor "dns.port" "" "$configpath" "1") - if [ ! -s "$configpath" ]; then - cp -f /usr/share/AdGuardHome/AdGuardHome_template.yaml $configpath - fi - if [ -z "$AdGuardHome_PORT" ]; then - AdGuardHome_PORT="0" - fi - config_get "redirect" "$section" "redirect" "none" - config_get "old_redirect" "$section" "old_redirect" "none" - config_get "old_port" "$section" "old_port" "0" - config_get "old_enabled" "$section" "old_enabled" "0" - uci get dhcp.@dnsmasq[0].port >/dev/null 2>&1 || uci set dhcp.@dnsmasq[0].port="53" >/dev/null 2>&1 - if [ "$old_enabled" = "1" -a "$old_redirect" == "exchange" ]; then - AdGuardHome_PORT=$(uci get dhcp.@dnsmasq[0].port 2>/dev/null) - fi - - if [ "$old_redirect" != "$redirect" ] || [ "$old_port" != "$AdGuardHome_PORT" ] || [ "$old_enabled" = "1" -a "$enabled" = "0" ]; then - if [ "$old_redirect" != "none" ]; then - if [ "$old_redirect" == "redirect" -a "$old_port" != "0" ]; then - clear_iptable "$old_port" "$ipv6_server" - elif [ "$old_redirect" == "dnsmasq-upstream" ]; then - stop_forward_dnsmasq "$old_port" - elif [ "$old_redirect" == "exchange" ]; then - rm_port53 - fi - fi - elif [ "$old_enabled" = "1" -a "$enabled" = "1" ]; then - if [ "$old_redirect" == "redirect" -a "$old_port" != "0" ]; then - clear_iptable "$old_port" "$ipv6_server" - fi - fi - uci delete AdGuardHome.@AdGuardHome[0].old_redirect 2>/dev/null - uci delete AdGuardHome.@AdGuardHome[0].old_port 2>/dev/null - uci delete AdGuardHome.@AdGuardHome[0].old_enabled 2>/dev/null - uci add_list AdGuardHome.@AdGuardHome[0].old_redirect="$redirect" 2>/dev/null - uci add_list AdGuardHome.@AdGuardHome[0].old_port="$AdGuardHome_PORT" 2>/dev/null - uci add_list AdGuardHome.@AdGuardHome[0].old_enabled="$enabled" 2>/dev/null - uci commit AdGuardHome - [ "$enabled" == "0" ] && return 1 - if [ "$AdGuardHome_PORT" == "0" ]; then - return 1 - fi - if [ "$redirect" = "redirect" ]; then - set_iptable $ipv6_server $tcp_server - elif [ "$redirect" = "dnsmasq-upstream" ]; then - set_forward_dnsmasq "$AdGuardHome_PORT" - elif [ "$redirect" == "exchange" -a "$(uci get dhcp.@dnsmasq[0].port 2>/dev/null)" == "53" ]; then - use_port53 - fi -} - -get_filesystem() -{ -# print out path filesystem - echo $1 | awk ' - BEGIN{ - while (("mount"| getline ret) > 0) - { - split(ret,d); - fs[d[3]]=d[5]; - m=index(d[1],":") - if (m==0) - { - pt[d[3]]=d[1] - }else{ - pt[d[3]]=substr(d[1],m+1) - }}}{ - split($0,d,"/"); - if ("/" in fs) - { - result1=fs["/"]; - } - if ("/" in pt) - { - result2=pt["/"]; - } - for (i=2;i<=length(d);i++) - { - p[i]=p[i-1]"/"d[i]; - if (p[i] in fs) - { - result1=fs[p[i]]; - result2=pt[p[i]]; - } - } - if (result2 in fs){ - result=fs[result2]} - else{ - result=result1} - print(result);}' -} - -config_editor() -{ - awk -v yaml="$1" -v value="$2" -v file="$3" -v ro="$4" ' - BEGIN{split(yaml,part,"\.");s="";i=1;l=length(part);} - { - if (match($0,s""part[i]":")) - { - if (i==l) - { - split($0,t,": "); - if (ro==""){ - system("sed -i '\''"FNR"c \\"t[1]": "value"'\'' "file); - }else{ - print(t[2]); - } - exit; - } - s=s"[- ]{2}"; - i++; - } - }' $3 -} - -boot_service() { - rm /var/run/AdGserverdis >/dev/null 2>&1 - config_load "${CONFIGURATION}" - config_get waitonboot $CONFIGURATION waitonboot "0" - config_get_bool enabled $CONFIGURATION enabled 0 - config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome" - [ -f "$binpath" ] && start_service - if [ "$enabled" == "1" ] && [ "$waitonboot" == "1" ]; then - procd_open_instance "waitnet" - procd_set_param command "/usr/share/AdGuardHome/waitnet.sh" - procd_close_instance - echo "no net start pinging" - fi -} - -testbackup(){ - config_load "${CONFIGURATION}" - if [ "$1" == "backup" ]; then - backup - elif [ "$1" == "restore" ]; then - restore - fi -} - -restore() -{ - config_get workdir $CONFIGURATION workdir "/etc/AdGuardHome" - config_get backupwdpath $CONFIGURATION backupwdpath "/etc/AdGuardHome" - cp -u -r -f $backupwdpath/data $workdir -} - -backup() { - config_get backupwdpath $CONFIGURATION backupwdpath "/etc/AdGuardHome" - mkdir -p $backupwdpath/data - config_get workdir $CONFIGURATION workdir "/etc/AdGuardHome" - config_get backupfile $CONFIGURATION backupfile "" - for one in $backupfile; - do - while : - do - if [ -d "$backupwdpath/data/$one" ]; then - cpret=$(cp -u -r -f $workdir/data/$one $backupwdpath/data 2>&1) - else - cpret=$(cp -u -r -f $workdir/data/$one $backupwdpath/data/$one 2>&1) - fi - echo "$cpret" - echo "$cpret" | grep "no space left on device" - if [ "$?" == "0" ]; then - echo "磁盘已满,删除log重试中" - del_querylog && continue - rm -f -r $backupwdpath/data/filters - rm -f -r $workdir/data/filters && continue - echo "backup failed" - fi - break - done - done -} - -start_service() { - # Reading config - rm /var/run/AdGserverdis >/dev/null 2>&1 - config_load "${CONFIGURATION}" - # update password - config_get hashpass $CONFIGURATION hashpass "" - config_get configpath $CONFIGURATION configpath "/etc/AdGuardHome.yaml" - if [ -n "$hashpass" ]; then - config_editor "users.password" "$hashpass" "$configpath" - uci set $CONFIGURATION.$CONFIGURATION.hashpass="" - fi - local enabled - config_get_bool enabled $CONFIGURATION enabled 0 - # update crontab - do_crontab - if [ "$enabled" == "0" ]; then - _do_redirect 0 - return - fi - #what need to do before reload - config_get workdir $CONFIGURATION workdir "/etc/AdGuardHome" - - config_get backupfile $CONFIGURATION backupfile "" - mkdir -p $workdir/data - if [ -n "$backupfile" ] && [ ! -d "$workdir/data" ]; then - restore - fi - # for overlay data-stk-oo not suppport - local cwdfs=$(get_filesystem $workdir) - echo "workdir is a $cwdfs filesystem" - if [ "$cwdfs" == "jffs2" ]; then - echo "fs error ln db to tmp $workdir $cwdfs" - logger "AdGuardHome" "warning db redirect to tmp" - touch $workdir/data/stats.db - if [ ! -L $workdir/data/stats.db ]; then - mv -f $workdir/data/stats.db /tmp/stats.db 2>/dev/null - ln -s /tmp/stats.db $workdir/data/stats.db 2>/dev/null - fi - touch $workdir/data/sessions.db - if [ ! -L $workdir/data/sessions.db ]; then - mv -f $workdir/data/sessions.db /tmp/sessions.db 2>/dev/null - ln -s /tmp/sessions.db $workdir/data/sessions.db 2>/dev/null - fi - fi - local ADDITIONAL_ARGS="" - config_get binpath $CONFIGURATION binpath "/usr/bin/AdGuardHome" - - mkdir -p ${binpath%/*} - ADDITIONAL_ARGS="$ADDITIONAL_ARGS -c $configpath" - ADDITIONAL_ARGS="$ADDITIONAL_ARGS -w $workdir" - config_get httpport $CONFIGURATION httpport 3000 - ADDITIONAL_ARGS="$ADDITIONAL_ARGS -p $httpport" - - # hack to save config file when upgrade system - config_get upprotect $CONFIGURATION upprotect "" - eval upprotect=${upprotect// /\\\\n} - echo -e "$upprotect">/lib/upgrade/keep.d/luci-app-adguardhome - - config_get logfile $CONFIGURATION logfile "" - if [ -n "$logfile" ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS -l $logfile" - fi - - if [ ! -f "$binpath" ]; then - _do_redirect 0 - /usr/share/AdGuardHome/update_core.sh 2>&1 >/tmp/AdGuardHome_update.log & - exit 0 - fi - - config_get_bool verbose $CONFIGURATION verbose 0 - if [ "$verbose" -eq 1 ]; then - ADDITIONAL_ARGS="$ADDITIONAL_ARGS -v" - fi - - procd_open_instance - get_tz - if [ -n "$SET_TZ" ]; then - procd_set_param env TZ="$SET_TZ" - fi - procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5} - procd_set_param limits core="unlimited" nofile="65535 65535" - procd_set_param stderr 1 - procd_set_param command $binpath $ADDITIONAL_ARGS - procd_set_param file "$configpath" "/etc/hosts" "/etc/config/AdGuardHome" - procd_close_instance - if [ -f "$configpath" ]; then - _do_redirect 1 - else - _do_redirect 0 - config_get "redirect" "AdGuardHome" "redirect" "none" - if [ "$redirect" != "none" ]; then - procd_open_instance "waitconfig" - procd_set_param command "/usr/share/AdGuardHome/watchconfig.sh" - procd_close_instance - echo "no config start watching" - fi - fi - echo "AdGuardHome service enabled" - echo "luci enable switch=$enabled" - (sleep 10 && [ -z "$(pgrep $binpath)" ] && logger "AdGuardHome" "no process in 10s cancel redirect" && _do_redirect 0 )& - if [[ "`uci get bypass.@global[0].global_server 2>/dev/null`" && "`uci get bypass.@global[0].adguardhome 2>/dev/null`" == 1 && "$(uci get dhcp.@dnsmasq[0].port)" == "53" ]]; then - uci -q set AdGuardHome.AdGuardHome.redirect='exchange' - uci commit AdGuardHome - do_redirect 1 - fi -} - -reload_service() -{ - rm /var/run/AdGlucitest >/dev/null 2>&1 - echo "AdGuardHome reloading" - start -} - -del_querylog(){ - local btarget=$(ls $backupwdpath/data | grep -F "querylog.json" | sort -r | head -n 1) - local wtarget=$(ls $workdir/data | grep -F "querylog.json" | sort -r | head -n 1) - if [ "$btarget"x == "$wtarget"x ]; then - [ -z "$btarget" ] && return 1 - rm -f $workdir/data/$wtarget - rm -f $backupwdpath/data/$btarget - return 0 - fi - if [ "$btarget" \> "$wtarget" ]; then - rm -f $backupwdpath/data/$btarget - return 0 - else - rm -f $workdir/data/$wtarget - return 0 - fi -} - -stop_service() -{ - config_load "${CONFIGURATION}" - _do_redirect 0 - do_crontab - if [ "$1" != "nobackup" ]; then - config_get backupfile $CONFIGURATION backupfile "0" - if [ -n "$backupfile" ]; then - backup - fi - fi - echo "AdGuardHome service disabled" - touch /var/run/AdGserverdis -} - -boot() { - rc_procd boot_service "$@" - if eval "type service_started" 2>/dev/null >/dev/null; then - service_started - fi -} - -test_crontab(){ - config_load "${CONFIGURATION}" - do_crontab -} - -do_crontab(){ - config_get_bool enabled $CONFIGURATION enabled 0 - config_get crontab $CONFIGURATION crontab "" - local findstr default cronenable replace commit - local cronreload=0 - local commit=0 - findstr="/usr/share/AdGuardHome/update_core.sh" - default="30 3 * * * /usr/share/AdGuardHome/update_core.sh 2>&1" - [ "$enabled" == "0" ] || [ "${crontab//autoupdate/}" == "$crontab" ] && cronenable=0 || cronenable=1 - crontab_editor - - config_get workdir $CONFIGURATION workdir "/etc/AdGuardHome" - config_get lastworkdir $CONFIGURATION lastworkdir "/etc/AdGuardHome" - findstr="/usr/share/AdGuardHome/tailto.sh [0-9]* \$(uci get AdGuardHome.AdGuardHome.workdir)/data/querylog.json" - #[ -n "$lastworkdir" ] && findstr="/usr/share/AdGuardHome/tailto.sh [0-9]* $lastworkdir/data/querylog.json" && [ "$lastworkdir" != "$workdir" ] && replace="${lastworkdir//\//\\/}/${workdir//\//\\/}" - default="0 * * * * /usr/share/AdGuardHome/tailto.sh 2000 \$(uci get AdGuardHome.AdGuardHome.workdir)/data/querylog.json" - [ "$enabled" == "0" ] || [ "${crontab//cutquerylog/}" == "$crontab" ] && cronenable=0 || cronenable=1 - crontab_editor - #[ "$lastworkdir" != "$workdir" ] && uci set AdGuardHome.AdGuardHome.lastworkdir="$workdir" && commit=1 - - config_get logfile $CONFIGURATION logfile "" - config_get lastlogfile $CONFIGURATION lastlogfile "" - findstr="/usr/share/AdGuardHome/tailto.sh [0-9]* \$(uci get AdGuardHome.AdGuardHome.logfile)" - default="30 3 * * * /usr/share/AdGuardHome/tailto.sh 2000 \$(uci get AdGuardHome.AdGuardHome.logfile)" - #[ -n "$lastlogfile" ] && findstr="/usr/share/AdGuardHome/tailto.sh [0-9]* $lastlogfile" && [ -n "$logfile" ] && [ "$lastlogfile" != "$logfile" ] && replace="${lastlogfile//\//\\/}/${logfile//\//\\/}" - [ "$logfile" == "syslog" ] || [ "$logfile" == "" ] || [ "$enabled" == "0" ] || [ "${crontab//cutruntimelog/}" == "$crontab" ] && cronenable=0 || cronenable=1 - crontab_editor - #[ -n "$logfile" ] && [ "$lastlogfile" != "$logfile" ] && uci set AdGuardHome.AdGuardHome.lastlogfile="$logfile" && commit=1 - - findstr="/usr/share/AdGuardHome/addhost.sh" - default="0 * * * * /usr/share/AdGuardHome/addhost.sh" - [ "$enabled" == "0" ] || [ "${crontab//autohost/}" == "$crontab" ] && cronenable=0 || cronenable=1 - crontab_editor - [ "$cronenable" == "0" ] && /usr/share/AdGuardHome/addhost.sh "del" "noreload" || /usr/share/AdGuardHome/addhost.sh "" "noreload" - - findstr="/usr/share/AdGuardHome/gfw2adg.sh" - default="30 3 * * * /usr/share/AdGuardHome/gfw2adg.sh" - [ "$enabled" == "0" ] || [ "${crontab//autogfw/}" == "$crontab" ] && cronenable=0 || cronenable=1 - crontab_editor - [ "$cronreload" -gt 0 ] && /etc/init.d/cron restart - #[ "$commit" -gt 0 ] && uci commit AdGuardHome -} - -crontab_editor(){ - #usage input: - #findstr= - #default= - #cronenable= - #replace="${last//\//\\/}/${now//\//\\/}" - #output:cronreload:if >1 please /etc/init.d/cron restart manual - local testline reload - local line="$(grep "$findstr" $CRON_FILE)" - [ -n "$replace" ] && [ -n "$line" ] && eval testline="\${line//$replace}" && [ "$testline" != "$line" ] && line="$testline" && reload="1" && replace="" - if [ "${line:0:1}" != "#" ]; then - if [ $cronenable -eq 1 ]; then - [ -z "$line" ] && line="$default" && reload="1" - if [ -n "$reload" ]; then - sed -i "\,$findstr,d" $CRON_FILE - echo "$line" >> $CRON_FILE - cronreload=$((cronreload+1)) - fi - elif [ -n "$line" ]; then - sed -i "\,$findstr,d" $CRON_FILE - echo "#$line" >> $CRON_FILE - cronreload=$((cronreload+1)) - fi - else - if [ $cronenable -eq 1 ]; then - sed -i "\,$findstr,d" $CRON_FILE - echo "${line:1}" >> $CRON_FILE - cronreload=$((cronreload+1)) - elif [ -z "$reload" ]; then - sed -i "\,$findstr,d" $CRON_FILE - echo "$line" >> $CRON_FILE - fi - fi -} diff --git a/luci-app-adguardhome/root/etc/uci-defaults/40_luci-AdGuardHome b/luci-app-adguardhome/root/etc/uci-defaults/40_luci-AdGuardHome deleted file mode 100644 index 37e192cdd..000000000 --- a/luci-app-adguardhome/root/etc/uci-defaults/40_luci-AdGuardHome +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -uci -q batch <<-EOF >/dev/null 2>&1 - delete ucitrack.@AdGuardHome[-1] - add ucitrack AdGuardHome - set ucitrack.@AdGuardHome[-1].init=AdGuardHome - commit ucitrack - delete AdGuardHome.AdGuardHome.ucitracktest - /etc/init.d/AdGuardHome restart -EOF - -rm -f /tmp/luci-indexcache - -chmod +x /etc/init.d/AdGuardHome /usr/share/AdGuardHome/* -exit 0 diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/AdGuardHome_template.yaml b/luci-app-adguardhome/root/usr/share/AdGuardHome/AdGuardHome_template.yaml deleted file mode 100644 index 612a57706..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/AdGuardHome_template.yaml +++ /dev/null @@ -1,131 +0,0 @@ -bind_host: 0.0.0.0 -bind_port: 3000 -beta_bind_port: 0 -users: -- name: root - password: $2y$10$dwn0hTYoECQMZETBErGlzOId2VANOVsPHsuH13TM/8KnysM5Dh/ve -auth_attempts: 5 -block_auth_min: 15 -http_proxy: "" -language: zh-cn -debug_pprof: false -web_session_ttl: 720 -dns: - bind_hosts: - - 0.0.0.0 - port: 1745 - statistics_interval: 30 - querylog_enabled: true - querylog_file_enabled: true - querylog_interval: 6h - querylog_size_memory: 1000 - anonymize_client_ip: false - protection_enabled: true - blocking_mode: default - blocking_ipv4: "" - blocking_ipv6: "" - blocked_response_ttl: 60 - parental_block_host: family-block.dns.adguard.com - safebrowsing_block_host: standard-block.dns.adguard.com - ratelimit: 0 - ratelimit_whitelist: [] - refuse_any: false - upstream_dns: - - 223.5.5.5 - upstream_dns_file: "" - bootstrap_dns: - - 119.29.29.29 - - 223.5.5.5 - all_servers: false - fastest_addr: false - fastest_timeout: 1s - allowed_clients: [] - disallowed_clients: [] - blocked_hosts: - - version.bind - - id.server - - hostname.bind - trusted_proxies: - - 127.0.0.0/8 - - ::1/128 - cache_size: 4194304 - cache_ttl_min: 0 - cache_ttl_max: 0 - cache_optimistic: true - bogus_nxdomain: [] - aaaa_disabled: false - enable_dnssec: false - edns_client_subnet: false - max_goroutines: 300 - ipset: [] - filtering_enabled: true - filters_update_interval: 24 - parental_enabled: false - safesearch_enabled: false - safebrowsing_enabled: false - safebrowsing_cache_size: 1048576 - safesearch_cache_size: 1048576 - parental_cache_size: 1048576 - cache_time: 30 - rewrites: [] - blocked_services: [] - upstream_timeout: 10s - local_domain_name: lan - resolve_clients: true - use_private_ptr_resolvers: true - local_ptr_upstreams: [] -tls: - enabled: false - server_name: "" - force_https: false - port_https: 443 - port_dns_over_tls: 853 - port_dns_over_quic: 784 - port_dnscrypt: 0 - dnscrypt_config_file: "" - allow_unencrypted_doh: false - strict_sni_check: false - certificate_chain: "" - private_key: "" - certificate_path: "" - private_key_path: "" -filters: -- enabled: true - url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt - name: AdGuard DNS filter - id: 1628750870 -- enabled: true - url: https://anti-ad.net/easylist.txt - name: 'CHN: anti-AD' - id: 1628750871 -whitelist_filters: [] -user_rules: [] -dhcp: - enabled: false - interface_name: "" - dhcpv4: - gateway_ip: "" - subnet_mask: "" - range_start: "" - range_end: "" - lease_duration: 86400 - icmp_timeout_msec: 1000 - options: [] - dhcpv6: - range_start: "" - lease_duration: 86400 - ra_slaac_only: false - ra_allow_slaac: false -clients: [] -log_compress: false -log_localtime: false -log_max_backups: 0 -log_max_size: 100 -log_max_age: 3 -log_file: "" -verbose: false -os: - group: "" - user: "" - rlimit_nofile: 0 -schema_version: 12 diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/addhost.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/addhost.sh deleted file mode 100644 index 6c6b7b769..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/addhost.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -checkmd5(){ -local nowmd5=$(md5sum /etc/hosts) -nowmd5=${nowmd5%% *} -local lastmd5=$(uci get AdGuardHome.AdGuardHome.hostsmd5 2>/dev/null) -if [ "$nowmd5" != "$lastmd5" ]; then - uci set AdGuardHome.AdGuardHome.hostsmd5="$nowmd5" - uci commit AdGuardHome - [ "$1" == "noreload" ] || /etc/init.d/AdGuardHome reload -fi -} - -[ "$1" == "del" ] && sed -i '/programaddstart/,/programaddend/d' /etc/hosts && checkmd5 "$2" && exit 0 -/usr/bin/awk 'BEGIN{ -while ((getline < "/tmp/dhcp.leases") > 0) -{ - a[$2]=$4; -} -while (("ip -6 neighbor show | grep -v fe80" | getline) > 0) -{ - if (a[$5]) {print $1" "a[$5] >"/tmp/tmphost"; } -} -print "#programaddend" >"/tmp/tmphost"; -}' -grep programaddstart /etc/hosts >/dev/null 2>&1 -if [ "$?" == "0" ]; then - sed -i '/programaddstart/,/programaddend/c\#programaddstart' /etc/hosts - sed -i '/programaddstart/'r/tmp/tmphost /etc/hosts -else - echo "#programaddstart" >>/etc/hosts - cat /tmp/tmphost >> /etc/hosts -fi -rm /tmp/tmphost -checkmd5 "$2" diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/firewall.start b/luci-app-adguardhome/root/usr/share/AdGuardHome/firewall.start deleted file mode 100644 index 562117e52..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/firewall.start +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -AdGuardHome_enable=$(uci get AdGuardHome.AdGuardHome.enabled) -redirect=$(uci get AdGuardHome.AdGuardHome.redirect) - -if [ $AdGuardHome_enable -eq 1 -a "$redirect" == "redirect" ]; then - /etc/init.d/AdGuardHome do_redirect 1 -fi diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/getsyslog.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/getsyslog.sh deleted file mode 100644 index 908bdf631..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/getsyslog.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -logread -e AdGuardHome > /tmp/AdGuardHometmp.log -logread -e AdGuardHome -f >> /tmp/AdGuardHometmp.log & -pid=$! -echo "1">/var/run/AdGuardHomesyslog -while true -do - sleep 12 - watchdog=$(cat /var/run/AdGuardHomesyslog) - if [ "$watchdog"x == "0"x ]; then - kill $pid - rm /tmp/AdGuardHometmp.log - rm /var/run/AdGuardHomesyslog - exit 0 - else - echo "0">/var/run/AdGuardHomesyslog - fi -done diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/gfw2adg.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/gfw2adg.sh deleted file mode 100644 index a3add84e8..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/gfw2adg.sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" - -checkmd5(){ -local nowmd5=$(md5sum /tmp/adguard.list 2>/dev/null) -nowmd5=${nowmd5%% *} -local lastmd5=$(uci get AdGuardHome.AdGuardHome.gfwlistmd5 2>/dev/null) -if [ "$nowmd5" != "$lastmd5" ]; then - uci set AdGuardHome.AdGuardHome.gfwlistmd5="$nowmd5" - uci commit AdGuardHome - [ "$1" == "noreload" ] || /etc/init.d/AdGuardHome reload -fi -} - -configpath=$(uci get AdGuardHome.AdGuardHome.configpath 2>/dev/null) -[ "$1" == "del" ] && sed -i '/programaddstart/,/programaddend/d' $configpath && checkmd5 "$2" && exit 0 -gfwupstream=$(uci get AdGuardHome.AdGuardHome.gfwupstream 2>/dev/null) -if [ -z $gfwupstream ]; then -gfwupstream="tcp://208.67.220.220:5353" -fi -if [ ! -f "$configpath" ]; then - echo "please make a config first" - exit 1 -fi -wget-ssl --no-check-certificate https://cdn.jsdelivr.net/gh/gfwlist/gfwlist/gfwlist.txt -O- | base64 -d > /tmp/gfwlist.txt -cat /tmp/gfwlist.txt | awk -v upst="$gfwupstream" 'BEGIN{getline;}{ -s1=substr($0,1,1); -if (s1=="!") -{next;} -if (s1=="@"){ - $0=substr($0,3); - s1=substr($0,1,1); - white=1;} -else{ - white=0; -} - -if (s1=="|") - {s2=substr($0,2,1); - if (s2=="|") - { - $0=substr($0,3); - split($0,d,"/"); - $0=d[1]; - }else{ - split($0,d,"/"); - $0=d[3]; - }} -else{ - split($0,d,"/"); - $0=d[1]; -} -star=index($0,"*"); -if (star!=0) -{ - $0=substr($0,star+1); - dot=index($0,"."); - if (dot!=0) - $0=substr($0,dot+1); - else - next; - s1=substr($0,1,1); -} -if (s1==".") -{fin=substr($0,2);} -else{fin=$0;} -if (index(fin,".")==0) next; -if (index(fin,"%")!=0) next; -if (index(fin,":")!=0) next; -match(fin,"^[0-9\.]+") -if (RSTART==1 && RLENGTH==length(fin)) {print "ipset add gfwlist "fin>"/tmp/doipset.sh";next;} -if (fin=="" || finl==fin) next; -finl=fin; -if (white==0) - {print(" - '\''[/"fin"/]"upst"'\''");} -else{ - print(" - '\''[/"fin"/]#'\''");} -}END{print(" - '\''[/programaddend/]#'\''")}' > /tmp/adguard.list -grep programaddstart $configpath -if [ "$?" == "0" ]; then - sed -i '/programaddstart/,/programaddend/c\ - '\''\[\/programaddstart\/\]#'\''' $configpath - sed -i '/programaddstart/'r/tmp/adguard.list $configpath -else - sed -i '1i\ - '\''[/programaddstart/]#'\''' /tmp/adguard.list - sed -i '/upstream_dns:/'r/tmp/adguard.list $configpath -fi -checkmd5 "$2" -rm -f /tmp/gfwlist.txt /tmp/adguard.list diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/links.txt b/luci-app-adguardhome/root/usr/share/AdGuardHome/links.txt deleted file mode 100644 index e4f1c8fa7..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/links.txt +++ /dev/null @@ -1,3 +0,0 @@ -https://static.adguard.com/adguardhome/beta/AdGuardHome_linux_${Arch}.tar.gz -https://github.com/AdguardTeam/AdGuardHome/releases/download/${latest_ver}/AdGuardHome_linux_${Arch}.tar.gz -https://static.adguard.com/adguardhome/release/AdGuardHome_linux_${Arch}.tar.gz diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/tailto.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/tailto.sh deleted file mode 100644 index 9ccc21903..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/tailto.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -tail -n $1 "$2" > /var/run/tailtmp -cat /var/run/tailtmp > "$2" -rm /var/run/tailtmp diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/update_core.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/update_core.sh deleted file mode 100644 index 74ba7268d..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/update_core.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/bash - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -binpath=$(uci get AdGuardHome.AdGuardHome.binpath) -if [ -z "$binpath" ]; then -uci set AdGuardHome.AdGuardHome.binpath="/tmp/AdGuardHome/AdGuardHome" -binpath="/tmp/AdGuardHome/AdGuardHome" -fi -mkdir -p ${binpath%/*} -upxflag=$(uci get AdGuardHome.AdGuardHome.upxflag 2>/dev/null) - -check_if_already_running(){ - running_tasks="$(ps |grep "AdGuardHome" |grep "update_core" |grep -v "grep" |awk '{print $1}' |wc -l)" - [ "${running_tasks}" -gt "2" ] && echo -e "\nA task is already running." && EXIT 2 -} - -check_wgetcurl(){ - which curl && downloader="curl -L -k --retry 2 --connect-timeout 20 -o" && return - which wget-ssl && downloader="wget-ssl --no-check-certificate -t 2 -T 20 -O" && return - [ -z "$1" ] && opkg update || (echo error opkg && EXIT 1) - [ -z "$1" ] && (opkg remove wget wget-nossl --force-depends ; opkg install wget ; check_wgetcurl 1 ;return) - [ "$1" == "1" ] && (opkg install curl ; check_wgetcurl 2 ; return) - echo error curl and wget && EXIT 1 -} - -check_latest_version(){ - check_wgetcurl - latest_ver="$($downloader - https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest 2>/dev/null|grep -E 'tag_name' |grep -E 'v[0-9.]+' -o 2>/dev/null)" - if [ -z "${latest_ver}" ]; then - echo -e "\nFailed to check latest version, please try again later." && EXIT 1 - fi - now_ver="$($binpath -c /dev/null --check-config 2>&1| grep -m 1 -E 'v[0-9.]+' -o)" - if [ "${latest_ver}"x != "${now_ver}"x ] || [ "$1" == "force" ]; then - echo -e "Local version: ${now_ver}., cloud version: ${latest_ver}." - doupdate_core - else - echo -e "\nLocal version: ${now_ver}, cloud version: ${latest_ver}." - echo -e "You're already using the latest version." - if [ ! -z "$upxflag" ]; then - filesize=$(ls -l $binpath | awk '{ print $5 }') - if [ $filesize -gt 8000000 ]; then - echo -e "start upx may take a long time" - doupx - mkdir -p "/tmp/AdGuardHomeupdate/AdGuardHome" >/dev/null 2>&1 - rm -fr /tmp/AdGuardHomeupdate/AdGuardHome/${binpath##*/} - /tmp/upx-${upx_latest_ver}-${Arch}_linux/upx $upxflag $binpath -o /tmp/AdGuardHomeupdate/AdGuardHome/${binpath##*/} - rm -rf /tmp/upx-${upx_latest_ver}-${Arch}_linux - /etc/init.d/AdGuardHome stop nobackup - rm $binpath - mv -f /tmp/AdGuardHomeupdate/AdGuardHome/${binpath##*/} $binpath - /etc/init.d/AdGuardHome start - echo -e "finished" - fi - fi - EXIT 0 - fi -} - -doupx(){ - Archt="$(opkg info kernel | grep Architecture | awk -F "[ _]" '{print($2)}')" - case $Archt in - "i386") - Arch="i386" - ;; - "i686") - Arch="i386" - echo -e "i686 use $Arch may have bug" - ;; - "x86") - Arch="amd64" - ;; - "mipsel") - Arch="mipsel" - ;; - "mips64el") - Arch="mips64el" - Arch="mipsel" - echo -e "mips64el use $Arch may have bug" - ;; - "mips") - Arch="mips" - ;; - "mips64") - Arch="mips64" - Arch="mips" - echo -e "mips64 use $Arch may have bug" - ;; - "arm") - Arch="arm" - ;; - "armeb") - Arch="armeb" - ;; - "aarch64") - Arch="arm64" - ;; - "powerpc") - Arch="powerpc" - ;; - "powerpc64") - Arch="powerpc64" - ;; - *) - echo -e "error not support $Archt if you can use offical release please issue a bug" - EXIT 1 - ;; - esac - upx_latest_ver="$($downloader - https://api.github.com/repos/upx/upx/releases/latest 2>/dev/null|grep -E 'tag_name' |grep -E '[0-9.]+' -o 2>/dev/null)" - $downloader /tmp/upx-${upx_latest_ver}-${Arch}_linux.tar.xz "https://github.com/upx/upx/releases/download/v${upx_latest_ver}/upx-${upx_latest_ver}-${Arch}_linux.tar.xz" 2>&1 - #tar xvJf - which xz || (opkg list | grep ^xz || opkg update && opkg install xz) || (echo "xz download fail" && EXIT 1) - mkdir -p /tmp/upx-${upx_latest_ver}-${Arch}_linux - xz -d -c /tmp/upx-${upx_latest_ver}-${Arch}_linux.tar.xz| tar -x -C "/tmp" >/dev/null 2>&1 - if [ ! -e "/tmp/upx-${upx_latest_ver}-${Arch}_linux/upx" ]; then - echo -e "Failed to download upx." - EXIT 1 - fi - rm /tmp/upx-${upx_latest_ver}-${Arch}_linux.tar.xz -} - -doupdate_core(){ - echo -e "Updating core..." - mkdir -p "/tmp/AdGuardHomeupdate" - rm -rf /tmp/AdGuardHomeupdate/* >/dev/null 2>&1 - Archt="$(opkg info kernel | grep Architecture | awk -F "[ _]" '{print($2)}')" - case $Archt in - "i386") - Arch="386" - ;; - "i686") - Arch="386" - ;; - "x86") - Arch="amd64" - ;; - "mipsel") - Arch="mipsle" - ;; - "mips64el") - Arch="mips64le" - Arch="mipsle" - echo -e "mips64el use $Arch may have bug" - ;; - "mips") - Arch="mips" - ;; - "mips64") - Arch="mips64" - Arch="mips" - echo -e "mips64 use $Arch may have bug" - ;; - "arm") - Arch="arm" - ;; - "aarch64") - Arch="arm64" - ;; - "powerpc") - Arch="ppc" - echo -e "error not support $Archt" - EXIT 1 - ;; - "powerpc64") - Arch="ppc64" - echo -e "error not support $Archt" - EXIT 1 - ;; - *) - echo -e "error not support $Archt if you can use offical release please issue a bug" - EXIT 1 - ;; - esac - echo -e "start download" - grep -v "^#" /usr/share/AdGuardHome/links.txt >/tmp/run/AdHlinks.txt - while read link - do - eval link="$link" - $downloader /tmp/AdGuardHomeupdate/${link##*/} "$link" 2>&1 - if [ "$?" != "0" ]; then - echo "download failed try another download" - rm -f /tmp/AdGuardHomeupdate/${link##*/} - else - local success="1" - break - fi - done < "/tmp/run/AdHlinks.txt" - rm /tmp/run/AdHlinks.txt - [ -z "$success" ] && echo "no download success" && EXIT 1 - if [ "${link##*.}" == "gz" ]; then - tar -zxf "/tmp/AdGuardHomeupdate/${link##*/}" -C "/tmp/AdGuardHomeupdate/" - if [ ! -e "/tmp/AdGuardHomeupdate/AdGuardHome" ]; then - echo -e "Failed to download core." - rm -rf "/tmp/AdGuardHomeupdate" >/dev/null 2>&1 - EXIT 1 - fi - downloadbin="/tmp/AdGuardHomeupdate/AdGuardHome/AdGuardHome" - else - downloadbin="/tmp/AdGuardHomeupdate/${link##*/}" - fi - chmod 755 $downloadbin - echo -e "download success start copy" - if [ -n "$upxflag" ]; then - echo -e "start upx may take a long time" - doupx - /tmp/upx-${upx_latest_ver}-${Arch}_linux/upx $upxflag $downloadbin - rm -rf /tmp/upx-${upx_latest_ver}-${Arch}_linux - fi - echo -e "start copy" - /etc/init.d/AdGuardHome stop nobackup - rm "$binpath" - mv -f "$downloadbin" "$binpath" - if [ "$?" == "1" ]; then - echo "mv failed maybe not enough space please use upx or change bin to /tmp/AdGuardHome" - EXIT 1 - fi - /etc/init.d/AdGuardHome start - rm -rf "/tmp/AdGuardHomeupdate" >/dev/null 2>&1 - echo -e "Succeeded in updating core." - echo -e "Local version: ${latest_ver}, cloud version: ${latest_ver}.\n" - EXIT 0 -} - -EXIT(){ - rm /var/run/update_core 2>/dev/null - [ "$1" != "0" ] && touch /var/run/update_core_error - exit $1 -} - -main(){ - check_if_already_running - check_latest_version $1 -} - trap "EXIT 1" SIGTERM SIGINT - touch /var/run/update_core - rm /var/run/update_core_error 2>/dev/null - main $1 diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/waitnet.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/waitnet.sh deleted file mode 100644 index c7745e101..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/waitnet.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -count=0 -while : -do - ping -c 1 -W 1 -q www.baidu.com 1>/dev/null 2>&1 - if [ "$?" == "0" ]; then - /etc/init.d/AdGuardHome force_reload - break - fi - ping -c 1 -W 1 -q 202.108.22.5 1>/dev/null 2>&1 - if [ "$?" == "0" ]; then - /etc/init.d/AdGuardHome force_reload - break - fi - sleep 5 - ping -c 1 -W 1 -q www.google.com 1>/dev/null 2>&1 - if [ "$?" == "0" ]; then - /etc/init.d/AdGuardHome force_reload - break - fi - ping -c 1 -W 1 -q 8.8.8.8 1>/dev/null 2>&1 - if [ "$?" == "0" ]; then - /etc/init.d/AdGuardHome force_reload - break - fi - sleep 5 - count=$((count+1)) - if [ $count -gt 18 ]; then - /etc/init.d/AdGuardHome force_reload - break - fi -done -return 0 diff --git a/luci-app-adguardhome/root/usr/share/AdGuardHome/watchconfig.sh b/luci-app-adguardhome/root/usr/share/AdGuardHome/watchconfig.sh deleted file mode 100644 index 61ba09de7..000000000 --- a/luci-app-adguardhome/root/usr/share/AdGuardHome/watchconfig.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -PATH="/usr/sbin:/usr/bin:/sbin:/bin" -configpath=$(uci get AdGuardHome.AdGuardHome.configpath) -while : -do - sleep 10 - if [ -f "$configpath" ]; then - /etc/init.d/AdGuardHome do_redirect 1 - break - fi -done -return 0 diff --git a/luci-app-adguardhome/root/usr/share/rpcd/acl.d/luci-app-adguardhome.json b/luci-app-adguardhome/root/usr/share/rpcd/acl.d/luci-app-adguardhome.json deleted file mode 100644 index 485aa6205..000000000 --- a/luci-app-adguardhome/root/usr/share/rpcd/acl.d/luci-app-adguardhome.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-adguardhome": { - "description": "Grant UCI access for luci-app-adguardhome", - "read": { - "uci": [ "AdGuardHome" ] - }, - "write": { - "uci": [ "AdGuardHome" ] - } - } -} diff --git a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldcode.js b/luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldcode.js deleted file mode 100644 index f93d42b7f..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/addon/fold/foldcode.js +++ /dev/null @@ -1 +0,0 @@ -!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}(function(n){"use strict";function e(e,o,i,t){if(i&&i.call){var l=i;i=null}else l=r(e,i,"rangeFinder");"number"==typeof o&&(o=n.Pos(o,0));var f=r(e,i,"minFoldSize");function d(n){var r=l(e,o);if(!r||r.to.line-r.from.linee.firstLine();)o=n.Pos(o.line-1,0),u=d(!1);if(u&&!u.cleared&&"unfold"!==t){var a=function(n,e){var o=r(n,e,"widget");if("string"==typeof o){var i=document.createTextNode(o);(o=document.createElement("span")).appendChild(i),o.className="CodeMirror-foldmarker"}else o&&(o=o.cloneNode(!0));return o}(e,i);n.on(a,"mousedown",function(e){c.clear(),n.e_preventDefault(e)});var c=e.markText(u.from,u.to,{replacedWith:a,clearOnEnter:r(e,i,"clearOnEnter"),__isFold:!0});c.on("clear",function(o,r){n.signal(e,"unfold",e,o,r)}),n.signal(e,"fold",e,u.from,u.to)}}n.newFoldFunction=function(n,o){return function(r,i){e(r,i,{rangeFinder:n,widget:o})}},n.defineExtension("foldCode",function(n,o,r){e(this,n,o,r)}),n.defineExtension("isFolded",function(n){for(var e=this.findMarksAt(n),o=0;o=u){if(s&&f&&s.test(f.className))return;i=r(a.indicatorOpen)}}(i||f)&&t.setGutterMarker(n,a.gutter,i)})}function i(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function f(t){var o=t.getViewport(),e=t.state.foldGutter;e&&(t.operation(function(){n(t,o.from,o.to)}),e.from=o.from,e.to=o.to)}function a(t,r,n){var i=t.state.foldGutter;if(i){var f=i.options;if(n==f.gutter){var a=e(t,r);a?a.clear():t.foldCode(o(r,0),f)}}}function d(t){var o=t.state.foldGutter;if(o){var e=o.options;o.from=o.to=0,clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout(function(){f(t)},e.foldOnChangeTimeSpan||600)}}function u(t){var o=t.state.foldGutter;if(o){var e=o.options;clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout(function(){var e=t.getViewport();o.from==o.to||e.from-o.to>20||o.from-e.to>20?f(t):t.operation(function(){e.fromo.to&&(n(t,o.to,e.to),o.to=e.to)})},e.updateViewportTimeSpan||400)}}function l(t,o){var e=t.state.foldGutter;if(e){var r=o.line;r>=e.from&&ro))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).length)}:void 0}})}); \ No newline at end of file diff --git a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.css b/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.css deleted file mode 100644 index 43ac1a9fa..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.css +++ /dev/null @@ -1 +0,0 @@ -.CodeMirror{font-family:monospace;height:500px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:0;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,0.5);-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0} diff --git a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.js b/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.js deleted file mode 100644 index d01f072ee..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/lib/codemirror.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push($(Y)+" ");return Y[e]}function $(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\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\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\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\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var se=null;function ae(e,t,r){var n;se=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:se=i)}return null!=n?n:se}var ue=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),xe(e)}function Le(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Me,Ne=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Te){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=Te?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ae(e){if(null!=Me)return Me;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Me=n.right-r.right<3)}var De,We=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(De=O("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Pe=null;var Ee={},Ie={};function ze(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Re(e,t){t=ze(t);var r=Ee[t.name];if(!r)return Re(e,"text/plain");var n=r(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Be={};function Ge(e,t){I(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ve(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ke(e,t,r){return!e.startState||e.startState(t,r)}var je=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?et(r,Xe(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?et(e.line,t):r<0?et(e.line,0):e}(t,Xe(e,t.line).text.length)}function at(e,t){for(var r=[],n=0;n=this.string.length},je.prototype.sol=function(){return this.pos==this.lineStart},je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},je.prototype.next=function(){if(this.post},je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},je.prototype.skipToEnd=function(){this.pos=this.string.length},je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},je.prototype.backUp=function(e){this.pos-=e},je.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},je.prototype.current=function(){return this.string.slice(this.start,this.pos)},je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,r,n){var i=[e.state.modeGen],o={};wt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,wt(e,t.text,s.mode,r,function(e,t){for(var r=a;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&Ue(e.doc.mode,n.state),o=ht(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function dt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ct(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=Xe(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=z(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&Xe(n,o-1).stateAfter,s=l?ct.fromSaved(n,l,o):new ct(n,Ke(n.mode),o);return n.iter(o,t,function(r){pt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,r){return t instanceof ut?new ct(e,Ue(e.mode,t.state),r,t.lookAhead):new ct(e,Ue(e.mode,t),r)},ct.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var mt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=Xe(l,(t=st(l,t)).line),u=dt(e,t.line,r),c=new je(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&pt(e,t,n,h.pos),h.pos=t.length,a=null):a=bt(vt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u=t:o.to>t);(n||(n=[])).push(new St(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!r||Wt(r,o.marker)<0)&&(r=o.marker)}return r}function It(e,t,r,n,i){var o=Xe(e,t),l=Ct&&o.markedSpans;if(l)for(var s=0;s=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,r)>=0:tt(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,n)<=0:tt(u.from,n)<0)))return!0}}}function zt(e){for(var t;t=Ft(e);)e=t.find(-1,!0).line;return e}function Rt(e,t){var r=Xe(e,t),n=zt(r);return r==n?t:qe(n)}function Bt(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!Gt(e,n))return t;for(;r=Pt(n);)n=r.find(1,!0).line;return qe(n)+1}function Gt(e,t){var r=Ct&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var Xt=function(e,t,r){this.text=e,Ot(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,Nt(e)}Xt.prototype.lineNo=function(){return qe(this)},be(Xt);var _t={},$t={};function qt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?$t:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=Jt,Ae(e.display.measure)&&(l=ce(o,e.doc.direction))&&(n.addToken=er(n.addToken,l)),n.map=[],rr(o,n,ft(e,o,t!=e.display.externalMeasured&&qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=s="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||Wt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var L=0;L=d)break;for(var T=Math.min(d,m);;){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+a:a,c,p+N.length==m?u:"",s,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=qt(r[g++],t.cm.options)}}else for(var O=1;Or)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Wr(e,Dr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Ir(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=ae(s,a,u),f=se,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=Xe(e.doc,t.line),i=Vt(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=et(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function $r(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,-1,-1);var i=Ze(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,Xe(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Xe(n,i);;){var s=Jr(e,l,i,t,r),a=Et(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=Xe(n,i=u.line)}}function qr(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Wr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Wr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Dr(e,t)),qr(e,t,r,Vr(e,t,Wr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Vt(t);var o=Dr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=ce(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=qr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=a)){var p=1!=d.level,g=Wr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.fromu&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,et(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,et(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Wr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t],"CodeMirror-line-like");N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Gt(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&Rt(e.doc,t)i.viewFrom?hn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)hn(e);else if(t<=i.viewFrom){var o=fn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):hn(e)}else if(r>=i.viewTo){var l=fn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hn(e)}else{var s=fn(e,t,t,-1),a=fn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):hn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function hn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fn(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Ct||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Rt(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function dn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||s.to().linet||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wn(e){e.state.focused||(e.display.input.focus(),Cn(e))}function xn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sn(e))},100)}function Cn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bn(e))}function Sn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Ln(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n.005||f<-.005)&&($e(i.line,a),kn(i.line),i.rest))for(var d=0;de.display.sizerWidth){var p=Math.ceil(u/tn(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function kn(e){if(e.widgets)for(var t=0;t=l&&(o=Ze(t,Vt(Xe(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Mn(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Tr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.leftf+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function Nn(e,t){null!=t&&(Dn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function On(e){Dn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function An(e,t,r){null==t&&null==r||Dn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Dn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Wn(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function Wn(e,t,r,n){var i=Mn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});An(e,i.scrollLeft,i.scrollTop)}function Hn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||oi(e,{top:t}),Fn(e,t,!0),r&&oi(e),ei(e,100))}function Fn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,ai(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function En(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var In=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),fe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};In.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},In.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},In.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},In.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},In.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},In.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var zn=function(){};function Rn(e,t){t||(t=En(e));var r=e.display.barWidth,n=e.display.barHeight;Bn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ln(e),Bn(e,En(e)),r=e.display.barWidth,n=e.display.barHeight}function Bn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}zn.prototype.update=function(){return{bottom:0,right:0}},zn.prototype.setScrollLeft=function(){},zn.prototype.setScrollTop=function(){},zn.prototype.clear=function(){};var Gn={native:In,null:zn};function Un(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Pn(e,t):Hn(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Vn=0;function Kn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function jn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ri(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ln(t),e.barMeasure=En(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function _n(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Mn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Hn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Pn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l=e.display.viewTo)){var r=+new Date+e.options.workTime,n=dt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?Ue(t.mode,n.state):null,a=ht(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&qn(e,function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==dn(e))return!1;ui(e)&&(hn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Ct&&(o=Rt(e.doc,o),l=Bt(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Vt(Xe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=dn(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=W();if(!t||!D(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Je(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=W()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ei(e,400)),r.updateLineNumbers=null,!0}function ii(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=Tn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ni(e,t);n=!1){Ln(e);var i=En(e);pn(e),Rn(e,i),si(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function oi(e,t){var r=new ri(e,t);if(ni(e,r)){Ln(e),ii(e,r);var n=En(e);pn(e),Rn(e,n),si(e,n),r.finish()}}function li(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function si(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ai(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;ls.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p=0&&tt(e,n.to())<=0)return r}return-1};var bi=function(e,t){this.anchor=e,this.head=t};function wi(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return tt(e.from(),t.from())}),r=B(t,i);for(var o=1;o0:a>=0){var u=ot(s.from(),l.from()),c=it(s.to(),l.to()),h=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new bi(h?c:u,h?u:c))}}return new yi(t,r)}function xi(e,t){return new yi([new bi(e,t||e)],0)}function Ci(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Si(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ci(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ci(t).ch-t.to.ch),et(r,n)}function Li(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Ai(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;ls-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Pi(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(i,i.lastOp==n)))l=$(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,l.to)?l.to=Ci(t):o.changes.push(Fi(e,t));else{var a=$(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Fi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ge(e,"historyAdded")}function Ii(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,$(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Pi(i.undone)}function zi(e,t){var r=$(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ri(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Bi(e){if(!e)return null;for(var t,r=0;r-1&&($(s)[h]=u[h],delete u[h])}}}return n}function Vi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=tt(t,i)<0;o!=tt(r,i)<0?(i=t,t=r):o!=tt(t,r)<0&&(t=r)}return new bi(i,t)}return new bi(r||t,t)}function Ki(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),$i(e,new yi([Vi(e.sel.primary(),t,r,i)],0),n)}function ji(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ge(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var h=a.find(n<0?1:-1),f=void 0;if((n<0?c:u)&&(h=ro(e,h,-n,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=tt(h,r))&&(n<0?f<0:f>0))return eo(e,h,t,n,i)}var d=a.find(n<0?-1:1);return(n<0?u:c)&&(d=ro(e,d,n,d.line==t.line?o:null)),d?eo(e,d,t,n,i):null}}return t}function to(e,t,r,n,i){var o=n||1,l=eo(e,t,r,o,i)||!i&&eo(e,t,r,o,!0)||eo(e,t,r,-o,i)||!i&&eo(e,t,r,-o,!0);return l||(e.cantEdit=!0,et(e.first,0))}function ro(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:r>0&&t.ch==(n||Xe(e,t.line)).text.length?t.line0)){var c=[a,1],h=tt(u.from,s.from),f=tt(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)lo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else lo(e,t)}}function lo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var r=Li(e,t);Ei(e,t,r,e.cm?e.cm.curOp.id:NaN),uo(e,t,r,Tt(e,t));var n=[];Ai(e,function(e,r){r||-1!=B(n,e.history)||(po(e.history,t),n.push(e.history)),uo(e,t,null,Tt(e,t))})}}function so(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function ao(e,t){if(0!=t&&(e.first+=t,e.sel=new yi(q(e.sel.ranges,function(e){return new bi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){un(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),r||(r=Li(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=qe(zt(Xe(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&me(e);Oi(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Kt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Xe(e,n).stateAfter;if(i&&(!(i instanceof ut)||n+i.lookAhead1||!(this.children[0]instanceof vo))){var s=[];this.collapse(s),this.children=[new vo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(e,t.line,t,r,o)||t.line!=r.line&&It(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}o.addToHistory&&Ei(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&zt(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&$e(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Gt(e,t)&&$e(t,0)}),o.clearOnEnter&&fe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++wo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)un(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)cn(u,c,"text");o.atomic&&Qi(u.doc),sr(u,"markerAdded",u,o)}return o}xo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kn(e),ye(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&un(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Qi(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&jn(e),this.parent&&this.parent.clear()}},xo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)oo(this,n[a]);s?_i(this,s):this.cm&&On(this.cm)}),undo:Jn(function(){so(this,"undo")}),redo:Jn(function(){so(this,"redo")}),undoSelection:Jn(function(){so(this,"undo",!0)}),redoSelection:Jn(function(){so(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),st(this,et(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,xi(r,r)),h)for(var f=0;f=0;t--)co(e.doc,"",n[t].from,n[t].to,"+delete");On(e)})}function _o(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function $o(e,t,r){var n=_o(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=ce(r,t.doc.direction);if(o){var l,s=i<0?$(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Dr(t,r);l=i<0?r.text.length-1:0;var c=Wr(t,u,l).top;l=le(function(e){return Wr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=_o(r,l,1))}else l=i<0?s.to:s.from;return new et(n,l,a)}}return new et(n,i<0?r.text.length:0,i<0?"before":"after")}Ro.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ro.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ro.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ro.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ro.default=y?Ro.macDefault:Ro.pcDefault;var Zo={selectAll:no,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Yo(e,function(t){if(t.empty()){var r=Xe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Xe(e.doc,i.line-1).text;l&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),et(i.line-1,l.length-1),i,"+transpose"))}r.push(new bi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return qn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=Zn(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",h),pe(i.scroller,"drop",u),o||(we(t),n.addNew||Ki(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();fe(i.wrapper.ownerDocument,"mouseup",u),fe(i.wrapper.ownerDocument,"mousemove",c),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",u),xn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;we(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new bi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new bi(r,r)),r=sn(e,t,!0,!0),s=-1;else{var c=dl(e,r,n.unit);l=n.extend?Vi(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,$i(o,wi(e,u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?($i(o,wi(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):Xi(o,s,l,K):(s=0,$i(o,new yi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=tt(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=z(Xe(o,r.line).text,r.ch,u),f=z(Xe(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Xe(o,g).text,y=X(m,d,u);d==p?i.push(new bi(et(g,y),et(g,y))):m.length>y&&i.push(new bi(et(g,y),et(g,X(m,p,u))))}i.length||i.push(new bi(r,r)),$i(o,wi(e,a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=dl(e,t,n.unit),C=w.anchor;tt(x.anchor,C)>0?(b=x.head,C=ot(w.from(),x.anchor)):(b=x.anchor,C=it(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=Xe(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var l=ae(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ae(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new bi(new et(r.line,p,g),n)}(e,new bi(st(o,C),b)),$i(o,wi(e,S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,t&&(we(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",m),o.history.lastSelOrigin=null}var v=Zn(e,function(t){0!==t.buttons&&ke(t)?function t(r){var l=++p;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=tt(s,h)){e.curOp.focus=W(),f(s);var a=Tn(i,o);(s.line>=a.to||s.lined.bottom?20:0;u&&setTimeout(Zn(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=Zn(e,g);e.state.selectingText=m,fe(i.wrapper.ownerDocument,"mousemove",v),fe(i.wrapper.ownerDocument,"mouseup",m)}(e,n,t,o)}(t,n,o,e):Le(e)==r.scroller&&we(e):2==i?(n&&Ki(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?t.display.input.onContextMenu(e):xn(t)))}}function dl(e,t,r){if("char"==r)return new bi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new bi(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new bi(n.from,n.to)}function pl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&we(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,r))return Ce(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return ge(e,r,e,Ze(e.doc,o),e.display.gutterSpecs[a].className,t),Ce(t)}}function gl(e,t){return pl(e,t,"gutterClick",!0)}function vl(e,t){xr(e.display,t)||function(e,t){if(!ye(e,"gutterContextMenu"))return!1;return pl(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function ml(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}hl.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var yl={toString:function(){return"CodeMirror.Init"}},bl={},wl={};function xl(e,t,r){if(!t!=!(r&&r!=yl)){var n=e.display.dragFunctions,i=t?fe:pe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Cl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),jt(e)),ln(e),un(e),Rr(e),setTimeout(function(){return Rn(e)},100)}function Sl(e,t){var n=this;if(!(this instanceof Sl))return new Sl(e,t);this.options=t=t?I(t):{},I(bl,t,!1);var i=t.value;"string"==typeof i?i=new Mo(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new Sl.inputStyles[t.inputStyle](this),u=this.display=new function(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=A("div",null,"CodeMirror-code"),o.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=O("div",null,"CodeMirror-cursors"),o.measure=O("div",null,"CodeMirror-measure"),o.lineMeasure=O("div",null,"CodeMirror-measure"),o.lineSpace=A("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=A("div",[o.lineSpace],"CodeMirror-lines");o.mover=O("div",[u],null,"position: relative"),o.sizer=O("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),o.gutters=O("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=O("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=O("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),l&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),a||r&&m||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=ci(i.gutters,i.lineNumbers),hi(o),n.init(o)}(e,i,o,t);for(var c in u.wrapper.CodeMirror=this,ml(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Un(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&u.input.focus(),l&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;fe(t.scroller,"mousedown",Zn(e,fl)),fe(t.scroller,"dblclick",l&&s<11?Zn(e,function(t){if(!ve(e,t)){var r=sn(e,t);if(r&&!gl(e,t)&&!xr(e.display,t)){we(t);var n=e.findWordAt(r);Ki(e.doc,n.anchor,n.head)}}}):function(t){return ve(e,t)||we(t)});fe(t.scroller,"contextmenu",function(t){return vl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}fe(t.scroller,"touchstart",function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!gl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),fe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),fe(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new bi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new bi(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),we(r)}i()}),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Hn(e,t.scroller.scrollTop),Pn(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))}),fe(t.scroller,"mousewheel",function(t){return mi(e,t)}),fe(t.scroller,"DOMMouseScroll",function(t){return mi(e,t)}),fe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ve(e,t)||Se(t)},over:function(t){ve(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();vn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),Se(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-No<100))Se(t);else if(!ve(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:Zn(e,Oo),leave:function(t){ve(e,t)||Ao(e)}};var a=t.input.getField();fe(a,"keyup",function(t){return sl.call(e,t)}),fe(a,"keydown",Zn(e,ll)),fe(a,"keypress",Zn(e,al)),fe(a,"focus",function(t){return Cn(e,t)}),fe(a,"blur",function(t){return Sn(e,t)})}(this),Ho(),Kn(this),this.curOp.forceUpdate=!0,Di(this,i),t.autofocus&&!m||this.hasFocus()?setTimeout(E(Cn,this),20):Sn(this),wl)wl.hasOwnProperty(c)&&wl[c](n,t[c],yl);ui(this),t.finishInit&&t.finishInit(this);for(var d=0;d150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?z(Xe(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,a=We(t),u=null;if(s&&n.ranges.length>1)if(Tl&&Tl.text.join("\n")==t){if(n.ranges.length%Tl.text.length==0){u=[];for(var c=0;c=0;f--){var d=n.ranges[f],p=d.from(),g=d.to();d.empty()&&(r&&r>0?p=et(p.line,p.ch-r):e.state.overwrite&&!s?g=et(g.line,Math.min(Xe(o,g.line).text.length,g.ch+$(a).length)):s&&Tl&&Tl.lineWise&&Tl.text.join("\n")==t&&(p=g=et(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};oo(e.doc,v),sr(e,"inputRead",e,v)}t&&!s&&Al(e,t),On(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||qn(t,function(){return Nl(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=kl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Dl(e){for(var t=[],r=[],n=0;n=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ae(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new et(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new et(r.line,a(e,1),"before"):new et(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):$o(s,t,r))){if(n||(l=t.line+r)=e.first+e.size||(t=new et(l,t.ch,t.sticky),!(s=Xe(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=to(e,t,o,l,!0);return rt(o,g)&&(g.hitSide=!0),g}function Pl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=$r(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var El=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Il(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=Xe(e.doc,t.line),i=Nr(r,n,t.line),o=ce(n,e.doc.direction),l="left";o&&(l=ae(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function zl(e,t){return t&&(e.bad=!0),e}function Rl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zl(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Il(t,i)||{node:a[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=et(l.line-1,Xe(n.doc,l.line-1).length)),s.ch==Xe(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=qe(i.view[0].line),r=i.view[0].node):(t=qe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=qe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function c(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void c(r);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(et(n,0),et(i+1,0),(v=+f,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c(Ye(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var g=0;g1&&f.length>1;)if($(h)==$(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=et(t,d),C=et(a,f.length?$(f).length-p:0);return h.length>1||h[0]||tt(x,C)?(co(n.doc,h,x,C,"+input"),!0):void 0},El.prototype.ensurePolled=function(){this.forceCompositionEnd()},El.prototype.reset=function(){this.forceCompositionEnd()},El.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},El.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},El.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||qn(this.cm,function(){return un(e.cm)})},El.prototype.setUneditable=function(e){e.contentEditable="false"},El.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Zn(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},El.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},El.prototype.onContextMenu=function(){},El.prototype.resetPosition=function(){},El.prototype.needsContentAttribute=!0;var Gl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Gl.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Dl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),fe(i,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),fe(i,"paste",function(e){ve(n,e)||Ol(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())}),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",function(t){if(!xr(e,t)&&!ve(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),fe(e.lineSpace,"selectstart",function(t){xr(e,t)||we(t)}),fe(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),fe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Gl.prototype.createField=function(e){this.wrapper=Hl(),this.textarea=this.wrapper.firstChild},Gl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=gn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Gl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Gl.prototype.getField=function(){return this.textarea},Gl.prototype.supportsTouch=function(){return!1},Gl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gl.prototype.blur=function(){this.textarea.blur()},Gl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gl.prototype.receivedFocus=function(){this.slowPoll()},Gl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Gl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Gl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Zn(r,$i)(r.doc,xi(o),V);var c,f=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(c=window.scrollY),n.input.focus(),a&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){Se(e);var g=function(){pe(window,"mouseup",g),setTimeout(m,20)};fe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Zn(r,no)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Gl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Gl.prototype.setUneditable=function(){},Gl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=yl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=yl,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,Ti(e)},!0),r("indentUnit",2,Ti,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Mi(e),Rr(e),un(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(et(n,o))}n++});for(var i=r.length-1;i>=0;i--)co(e.doc,t,r[i],et(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=yl&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),r("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){ml(e),fi(e)},!0),r("keyMap","default",function(e,t,r){var n=Xo(t),i=r!=yl&&Xo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Cl,!0),r("gutters",[],function(e,t){e.display.gutterSpecs=ci(t,e.options.lineNumbers),fi(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return Rn(e)},!0),r("scrollbarStyle","native",function(e){Un(e),Rn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ci(e.options.gutters,t),fi(e)},!0),r("firstLineNumber",1,fi,!0),r("lineNumberFormatter",function(e){return e},fi,!0),r("showCursorWhenSelecting",!1,pn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(e,t){"nocursor"==t&&(Sn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,pn,!0),r("singleCursorHeightPerLine",!0,pn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Mi,!0),r("addModeClass",!1,Mi,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Mi,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),r("phrases",null)}(Sl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Zn(this,t[e])(this,r,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&On(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&Xi(this.doc,n,new bi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=ft(this,Xe(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Xe(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Vt(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Mn(o,l)).scrollTop&&Hn(o,s.scrollTop),null!=s.scrollLeft&&Pn(o,s.scrollLeft))},triggerOnKeyDown:Qn(ll),triggerOnKeyPress:Qn(al),triggerOnKeyUp:sl,triggerOnMouseDown:Qn(fl),execCommand:function(e){if(Zo.hasOwnProperty(e))return Zo[e].call(null,this)},triggerElectric:Qn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5)&&ln(this),ge(this,"refresh",this)}),swapDoc:Qn(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Di(this,e),Rr(this),this.display.input.reset(),An(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Sl);var Ul="iter insert remove copy getEditor constructor".split(" ");for(var Vl in Mo.prototype)Mo.prototype.hasOwnProperty(Vl)&&B(Ul,Vl)<0&&(Sl.prototype[Vl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mo.prototype[Vl]));return be(Mo),Sl.inputStyles={textarea:Gl,contenteditable:El},Sl.defineMode=function(e){Sl.defaults.mode||"null"==e||(Sl.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ee[e]=t}.apply(this,arguments)},Sl.defineMIME=function(e,t){Ie[e]=t},Sl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sl.defineMIME("text/plain","null"),Sl.defineExtension=function(e,t){Sl.prototype[e]=t},Sl.defineDocExtension=function(e,t){Mo.prototype[e]=t},Sl.fromTextArea=function(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Sl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=vi,e.Doc=Mo,e.splitLines=We,e.countColumn=z,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=ge,e.Line=Xt,e.changeEnd=Ci,e.scrollbarModel=Gn,e.Pos=et,e.cmpPos=tt,e.modes=Ee,e.mimeModes=Ie,e.resolveMode=ze,e.getMode=Re,e.modeExtensions=Be,e.extendMode=Ge,e.copyState=Ue,e.startState=Ke,e.innerMode=Ve,e.commands=Zo,e.keyMap=Ro,e.keyName=jo,e.isModifierKey=Vo,e.lookupKey=Uo,e.normalizeKeyMap=Go,e.StringStream=je,e.SharedTextMarker=So,e.TextMarker=xo,e.LineWidget=yo,e.e_preventDefault=we,e.e_stopPropagation=xe,e.e_stop=Se,e.addClass=H,e.contains=D,e.rmClass=T,e.keyNames=Po}(Sl),Sl.version="5.49.2",Sl}); \ No newline at end of file diff --git a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/mode/yaml/yaml.js b/luci-app-adguardhome/root/www/luci-static/resources/codemirror/mode/yaml/yaml.js deleted file mode 100644 index 4a5e499bf..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/mode/yaml/yaml.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(i,t){var r=i.peek(),n=t.escaped;if(t.escaped=!1,"#"==r&&(0==i.pos||/\s/.test(i.string.charAt(i.pos-1))))return i.skipToEnd(),"comment";if(i.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(t.literal&&i.indentation()>t.keyCol)return i.skipToEnd(),"string";if(t.literal&&(t.literal=!1),i.sol()){if(t.keyCol=0,t.pair=!1,t.pairStart=!1,i.match(/---/))return"def";if(i.match(/\.\.\./))return"def";if(i.match(/\s*-\s+/))return"meta"}if(i.match(/^(\{|\}|\[|\])/))return"{"==r?t.inlinePairs++:"}"==r?t.inlinePairs--:"["==r?t.inlineList++:t.inlineList--,"meta";if(t.inlineList>0&&!n&&","==r)return i.next(),"meta";if(t.inlinePairs>0&&!n&&","==r)return t.keyCol=0,t.pair=!1,t.pairStart=!1,i.next(),"meta";if(t.pairStart){if(i.match(/^\s*(\||\>)\s*/))return t.literal=!0,"meta";if(i.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==t.inlinePairs&&i.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(t.inlinePairs>0&&i.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(i.match(e))return"keyword"}return!t.pair&&i.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(t.pair=!0,t.keyCol=i.indentation(),"atom"):t.pair&&i.match(/^:\s*/)?(t.pairStart=!0,"meta"):(t.pairStart=!1,t.escaped="\\"==r,i.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")}); \ No newline at end of file diff --git a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/theme/dracula.css b/luci-app-adguardhome/root/www/luci-static/resources/codemirror/theme/dracula.css deleted file mode 100644 index 6c708c010..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/codemirror/theme/dracula.css +++ /dev/null @@ -1 +0,0 @@ -.cm-s-dracula.CodeMirror,.cm-s-dracula .CodeMirror-gutters{background-color:#282a36 !important;color:#f8f8f2 !important;border:0}.cm-s-dracula .CodeMirror-gutters{color:#282a36}.cm-s-dracula .CodeMirror-cursor{border-left:solid thin #f8f8f0}.cm-s-dracula .CodeMirror-linenumber{color:#6d8a88}.cm-s-dracula .CodeMirror-selected{background:rgba(255,255,255,0.10)}.cm-s-dracula .CodeMirror-line::selection,.cm-s-dracula .CodeMirror-line>span::selection,.cm-s-dracula .CodeMirror-line>span>span::selection{background:rgba(255,255,255,0.10)}.cm-s-dracula .CodeMirror-line::-moz-selection,.cm-s-dracula .CodeMirror-line>span::-moz-selection,.cm-s-dracula .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,0.10)}.cm-s-dracula span.cm-comment{color:#6272a4}.cm-s-dracula span.cm-string,.cm-s-dracula span.cm-string-2{color:#f1fa8c}.cm-s-dracula span.cm-number{color:#bd93f9}.cm-s-dracula span.cm-variable{color:#50fa7b}.cm-s-dracula span.cm-variable-2{color:white}.cm-s-dracula span.cm-def{color:#50fa7b}.cm-s-dracula span.cm-operator{color:#ff79c6}.cm-s-dracula span.cm-keyword{color:#ff79c6}.cm-s-dracula span.cm-atom{color:#bd93f9}.cm-s-dracula span.cm-meta{color:#f8f8f2}.cm-s-dracula span.cm-tag{color:#ff79c6}.cm-s-dracula span.cm-attribute{color:#50fa7b}.cm-s-dracula span.cm-qualifier{color:#50fa7b}.cm-s-dracula span.cm-property{color:#66d9ef}.cm-s-dracula span.cm-builtin{color:#50fa7b}.cm-s-dracula span.cm-variable-3,.cm-s-dracula span.cm-type{color:#ffb86c}.cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,0.1)}.cm-s-dracula .CodeMirror-matchingbracket{text-decoration:underline;color:white !important} diff --git a/luci-app-adguardhome/root/www/luci-static/resources/twin-bcrypt.min.js b/luci-app-adguardhome/root/www/luci-static/resources/twin-bcrypt.min.js deleted file mode 100644 index 6284357c6..000000000 --- a/luci-app-adguardhome/root/www/luci-static/resources/twin-bcrypt.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* @license - * Twin-Bcrypt 2.2.0 - * https://github.com/fpirsch/twin-bcrypt - * Licence: BSD-3-Clause - */ -!function(r,n){"use strict";function e(r){return y[g]=t.apply(n,r),g++}function t(r){var e=[].slice.call(arguments,1);return function(){"function"==typeof r?r.apply(n,e):new Function(""+r)()}}function o(r){if(m)setTimeout(t(o,r),0);else{var n=y[r];if(n){m=!0;try{n()}finally{a(r),m=!1}}}}function a(r){delete y[r]}function i(){p=function(){var r=e(arguments);return process.nextTick(t(o,r)),r}}function u(){if(r.postMessage&&!r.importScripts){var n=!0,e=r.onmessage;return r.onmessage=function(){n=!1},r.postMessage("","*"),r.onmessage=e,n}}function f(){var n="setImmediate$"+Math.random()+"$",t=function(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(n)&&o(+e.data.slice(n.length))};r.addEventListener?r.addEventListener("message",t,!1):r.attachEvent("onmessage",t),p=function(){var t=e(arguments);return r.postMessage(n+t,"*"),t}}function c(){var r=new MessageChannel;r.port1.onmessage=function(r){var n=r.data;o(n)},p=function(){var n=e(arguments);return r.port2.postMessage(n),n}}function s(){var r=v.documentElement;p=function(){var n=e(arguments),t=v.createElement("script");return t.onreadystatechange=function(){o(n),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t),n}}function l(){p=function(){var r=e(arguments);return setTimeout(t(o,r),0),r}}if(!r.setImmediate){var p,g=1,y={},m=!1,v=r.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(r);d=d&&d.setTimeout?d:r,"[object process]"==={}.toString.call(r.process)?i():u()?f():r.MessageChannel?c():v&&"onreadystatechange"in v.createElement("script")?s():l(),d.setImmediate=p,d.clearImmediate=a}}(new Function("return this")()),function(r){"object"==typeof exports?r(exports,require("crypto")):r(self.TwinBcrypt={},self.crypto||self.msCrypto)}(function(r,n){"use strict";function e(r){for(var n=unescape(encodeURIComponent(r)),e=n.length,t=new Array(e),o=0;e>o;o++)t[o]=n.charCodeAt(o);return t}function t(r){for(var n=r.length,e=new Array(n),t=0;n>t;t++)e[t]=r.charCodeAt(t);return e}function o(r,n){for(var e,t,o=0,a="";n>o;){if(e=255&r[o++],a+=B[e>>2],e=(3&e)<<4,o>=n){a+=B[e];break}if(t=255&r[o++],e|=t>>4,a+=B[e],e=(15&t)<<2,o>=n){a+=B[e];break}t=255&r[o++],e|=t>>6,a+=B[e],a+=B[63&t]}return a}function a(r){for(var n,e,t=new Array(16),o=0,a=0;;){if(n=D[r.charCodeAt(o++)-46],e=D[r.charCodeAt(o++)-46],t[a++]=255&(n<<2|e>>4),22===o)break;n=e<<4,e=D[r.charCodeAt(o++)-46],t[a++]=255&(n|e>>2),n=e<<6,e=D[r.charCodeAt(o++)-46],t[a++]=255&(n|e)}return t}function i(r){for(var n=r.length,e=new Array(72),t=0,o=0;72>o;)e[o++]=r[t++],t===n&&(t=0);return e}function u(r,n,e){for(var t=0,o=e>>2;tt;)r[n++]=e[t++]<<24|e[t++]<<16|e[t++]<<8|e[t++]}function c(r){function n(n){for(var e=r,t=G>>2,o=t|O,f=n>>2,c=e[f]^e[t],s=e[1|f];o>t;)s^=(e[c>>>24]+e[a|c>>>16&255]^e[i|c>>>8&255])+e[u|255&c]^e[++t],c^=(e[s>>>24]+e[a|s>>>16&255]^e[i|s>>>8&255])+e[u|255&s]^e[++t];e[f]=s^e[S>>2],e[1|f]=c}function e(n){var e;for(r[L>>2]=0,r[L+4>>2]=0,e=0;M>e;e++)r[G>>2|e]^=r[(n>>2)+e];var t,o,f,c,s,l=r;for(e=0;M>e;e+=2){for(t=G>>2,o=t|O,f=L>>2,c=l[f]^l[t],s=l[1|f];o>t;)s^=(l[c>>>24]+l[a|c>>>16&255]^l[i|c>>>8&255])+l[u|255&c]^l[++t],c^=(l[s>>>24]+l[a|s>>>16&255]^l[i|s>>>8&255])+l[u|255&s]^l[++t];l[f]=s^l[S>>2],l[1|f]=c,r[G>>2|e]=l[f],r[G>>2|e+1]=c}for(e=0;T>e;e+=2){for(t=G>>2,o=t|O,f=L>>2,c=l[f]^l[t],s=l[1|f];o>t;)s^=(l[c>>>24]+l[a|c>>>16&255]^l[i|c>>>8&255])+l[u|255&c]^l[++t],c^=(l[s>>>24]+l[a|s>>>16&255]^l[i|s>>>8&255])+l[u|255&s]^l[++t];l[f]=s^l[S>>2],l[1|f]=c,r[e]=l[f],r[1|e]=c}}function t(r,n,t){for(var o=0;t>=o&&!(r>n);o++)e(R),e(j),r++;return r}var o=k>>2,a=o+256|0,i=a+256|0,u=i+256|0;return{encrypt:n,expandLoop:t}}function s(stdlib, foreign, heap) {"use asm";var HEAP32=new stdlib.Uint32Array(heap);var BLOWFISH_NUM_ROUNDS=16;var S_offset=0x0000;var S1_offset=0x0400;var S2_offset=0x0800;var S3_offset=0x0C00;var P_offset=0x1000;var P_last_offset=0x1044;var crypt_ciphertext_offset=0x1048;var LR_offset=0x01060;var password_offset=0x1068;var salt_offset=0x10b0;var P_LEN=18;var S_LEN=1024;function encrypt(offset) {offset=offset|0;var i=0;var n=0;var L=0;var R=0;var imax=0;imax=P_offset|BLOWFISH_NUM_ROUNDS<<2;L=HEAP32[offset>>2]|0;R=HEAP32[offset+4>>2]|0;L=L^HEAP32[P_offset>>2];for (i=P_offset; (i|0)<(imax|0);) {i=(i+4)>>>0;R=R^(((HEAP32[(L>>>22)>>2]>>>0) +(HEAP32[(S1_offset|(L>>>14&0x3ff))>>2]>>>0) ^(HEAP32[(S2_offset|(L>>>6&0x3ff))>>2])) +(HEAP32[(S3_offset|(L<<2&0x3ff))>>2]>>>0))^HEAP32[i>>2];i=(i+4)>>>0;L=L^(((HEAP32[(R>>>22)>>2]>>>0) +(HEAP32[(S1_offset|(R>>>14&0x3ff))>>2]>>>0) ^(HEAP32[(S2_offset|(R>>>6&0x3ff))>>2])) +(HEAP32[(S3_offset|(R<<2&0x3ff))>>2]>>>0))^HEAP32[i>>2];}HEAP32[offset>>2]=R^HEAP32[P_last_offset>>2];HEAP32[(offset+4)>>2]=L;}function expandKey(offset) {offset=offset|0;var i=0;var off=0;off=P_offset|0;for (i=0; (i|0)<(P_LEN|0); i=(i+1)|0) {HEAP32[off>>2]=HEAP32[off>>2]^HEAP32[offset>>2];offset=(offset+4)|0;off=(off+4)|0;}HEAP32[LR_offset>>2]=0;HEAP32[LR_offset+4>>2]=0;off=P_offset;for (i=0; (i|0)<(P_LEN|0); i=(i+2)|0) {encrypt(LR_offset);HEAP32[off>>2]=HEAP32[LR_offset>>2];HEAP32[off+4>>2]=HEAP32[LR_offset+4>>2];off=(off+8)|0;}off=S_offset;for (i=0; (i|0)<(S_LEN|0); i=(i+2)|0) {encrypt(LR_offset);HEAP32[off>>2]=HEAP32[LR_offset>>2];HEAP32[off+4>>2]=HEAP32[LR_offset+4>>2];off=(off+8)|0;}}function expandLoop(i, counterEnd, maxIterations) {i=i|0;counterEnd=counterEnd|0;maxIterations=maxIterations|0;var j=0;for (j=0; (j|0) <= (maxIterations|0); j=(j+1)|0) {if ((i>>>0)>(counterEnd>>>0)) break;expandKey(password_offset);expandKey(salt_offset);i=(i+1)>>>0;}return i|0;}return {encrypt: encrypt,expandLoop: expandLoop};} -function l(r,n,e,t){var o,a,i,u=L>>2,f=u+1;for(t[u]=0,t[f]=0,a=0,o=0;M>o;o++)i=n[a++]<<24|n[a++]<<16|n[a++]<<8|n[a++],t[G>>2|o]^=i;for(a=0,o=0;M>o;o+=2)i=r[a++]<<24|r[a++]<<16|r[a++]<<8|r[a++],a&=65295,t[u]^=i,i=r[a++]<<24|r[a++]<<16|r[a++]<<8|r[a++],a&=65295,t[f]^=i,e.encrypt(L),t[G>>2|o]=t[u],t[G>>2|o+1]=t[f];var c=k>>2;for(o=0;T>o;o+=2)i=r[a++]<<24|r[a++]<<16|r[a++]<<8|r[a++],a&=65295,t[u]^=i,i=r[a++]<<24|r[a++]<<16|r[a++]<<8|r[a++],a&=65295,t[f]^=i,e.encrypt(L),t[c|o]=t[u],t[c|o+1]=t[f]}function p(r,n,e,t,o,a,i){for(var u=e;t>=u;){if(u=r.expandLoop(u,t,o),a){var f=a(u/(t+1));if(f===!1)return}if(u>t){if(i)return void setImmediate(g.bind(null,r,n,i));return}if(i)return void setImmediate(p.bind(null,r,n,u,t,o,a,i))}}function g(r,n,e){u(n,x,F);var t;for(t=0;64>t;t++)r.encrypt(F+0),r.encrypt(F+8),r.encrypt(F+16);var o,a=0,i=x.length,f=new Array(4*i);for(t=0;i>t;t++)o=n[(F>>2)+t],f[a++]=o>>24,f[a++]=o>>16&255,f[a++]=o>>8&255,f[a++]=255&o;return e&&e(f),f}function y(r,n){return r+o(n,23)}function m(n,o,m,v){var d,h=o.substr(0,29),w=+o.substr(4,2),A=o.substr(7,22);if("string"==typeof n)d=r.encodingMode===r.ENCODING_UTF8?e(n):t(n);else if(Array.isArray(n))d=n.map(function(r){return 255&r});else{if(!(n instanceof Uint8Array))throw new Error("Incorrect arguments");d=Array.prototype.slice.call(n)}d.push(0);var b,E,N=a(A,C),O=31>w?1<>2,N),f(b,R>>2,d),l(N,d,E,b),v?void p(E,b,0,M,T,m,function(r){v(y(h,r))}):(p(E,b,0,M,T,m),y(h,g(E,b)))}function v(r){if(!b)throw new Error("No cryptographically secure pseudorandom number generator available.");if(null==r&&(r=N),r=0|+r,isNaN(r)||4>r||r>31)throw new Error("Invalid cost parameter.");var n="$2y$";return 10>r&&(n+="0"),n+=r+"$",n+=o(b(C),C)}function d(r,n,e){if(n&&"number"!=typeof n){if("string"!=typeof n||!z.test(n))throw new Error("Invalid salt")}else n=v(n);return m(r,n,e)}function h(r,n,e,t){if(arguments.length<2)throw new Error("Incorrect arguments");if(2===arguments.length?(t=n,n=e=null):3===arguments.length&&(t=e,e=null,"function"==typeof n&&(e=n,n=null)),n&&"number"!=typeof n){if("string"!=typeof n||!z.test(n))throw new Error("Invalid salt")}else n=v(n);if(!t||"function"!=typeof t)throw new Error("No callback function was given.");m(r,n,e,t)}function w(r,n){if("string"!=typeof n||!Z.test(n))throw new Error("Incorrect arguments");var e=n.substr(0,n.length-31),t=d(r,e);return t===n}function A(r,n,e,t){if("string"!=typeof n||!Z.test(n))throw new Error("Incorrect arguments");if(t||(t=e,e=null),!t||"function"!=typeof t)throw new Error("No callback function was given.");var o=n.substr(0,n.length-31);h(r,o,e,function(r){t(r===n)})}var b,E="undefined"!=typeof InstallTrigger,I=E;n&&(b=n.randomBytes,n.getRandomValues&&(b=function(r){var e=new Uint8Array(r);return n.getRandomValues(e)}));var C=16,N=10,O=16,$=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],U=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],M=$.length,T=U.length,x=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892],k=0,G=4096,S=4164,F=4168,L=4192,R=4200,j=4272,B="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",D=[0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],z=/^\$2[ay]\$(0[4-9]|[12][0-9]|3[01])\$[.\/A-Za-z0-9]{21}[.Oeu]/,Z=/^\$2[ay]\$(0[4-9]|[12][0-9]|3[01])\$[.\/A-Za-z0-9]{21}[.Oeu][.\/A-Za-z0-9]{30}[.CGKOSWaeimquy26]$/;r.genSalt=v,r.hashSync=d,r.hash=h,r.compareSync=w,r.compare=A,r.ENCODING_UTF8=0,r.ENCODING_RAW=1,r.encodingMode=r.ENCODING_UTF8,r.cryptoRNG=!!b,r.randomBytes=b,r.defaultCost=N,r.version="2.2.0"}); \ No newline at end of file diff --git a/luci-app-mosdns/root/etc/mosdns/rule/serverlist.txt b/luci-app-mosdns/root/etc/mosdns/rule/serverlist.txt index 9f00f6a93..578f0e249 100644 --- a/luci-app-mosdns/root/etc/mosdns/rule/serverlist.txt +++ b/luci-app-mosdns/root/etc/mosdns/rule/serverlist.txt @@ -486,6 +486,7 @@ 17.huanqiu.com 17173im.allyes.com 1717gs.com +171a60540b.com 17265111.com 17271819.com 172872.com @@ -617,6 +618,7 @@ 1pel.com 1phads.com 1q2w3.fun +1q2w3.top 1q2w3.website 1qwe3r.com 1r49n.cn @@ -933,6 +935,7 @@ 2labmanagement-wwwowa.uploadsphp.machineapi.alpha-disabled-management.net.zooplus.de 2labzxtm.net.zooplus.de 2laezi9.cn +2ledhenone.com 2leep.com 2lian.com 2llmonds4ehcr93nb.com @@ -952,6 +955,7 @@ 2mlh2fw7z62i.com 2mo3neop.de 2o7.net +2p9fyvx.com 2parale.ro 2performant.com 2pmob.com @@ -1003,6 +1007,7 @@ 30407799.com 306842.com 307.cc +307badb998ed.com 3081862fe1.com 30a951082a.com 30ampj.com @@ -1526,6 +1531,7 @@ 56yk.com 5726303d87522d05.com 572k3.com +573569djd.com 5735fda733.com 57558.com 577682.com @@ -1535,6 +1541,7 @@ 57fd2911f09b76.com 58.xgo.com.cn 583d46135c.com +585227ybn.com 58749.admaster.com.cn 5886316040.com 588o.top @@ -2047,6 +2054,7 @@ 7insight.com 7iouh9y.cn 7jrahgc.de +7krvbn.com 7kzod8.cn 7lbd4.armandthiery.fr 7lyonline.com @@ -2071,6 +2079,7 @@ 7x5.fr 7xi9g1.com1.z0.glb.clouddn.com 7xsf3h.com1.z0.glb.clouddn.com +7yucu023o36p.com 7z66.com 8.jrj.com 8.jrj.com.cn @@ -3827,7 +3836,6 @@ aahqiyum.com aaid.umeng.com aainfo.anz.co.nz aak7.cn -aalbbh84.info aam.gumtree.com.au aamapi.com aamergrbdr.xyz @@ -3968,7 +3976,6 @@ ablatesgascon.cam ableaborah.com ablebodiedfibre.com ablehed.pro -ablen02.tk ablen07.tk ablen08.tk ablen09.tk @@ -4140,6 +4147,7 @@ aboage.com aboardamusement.com aboardcarr.com aboardfork.com +aboardhotdog.com aboardkettle.com aboardlevel.com abolishcareful.com @@ -6214,7 +6222,6 @@ adsluna.com adslvfile.qq.com adslvr.com adslvseed.qq.com -adsmarket.com adsmart.hk adsmart.yicha.cn adsmind.apdcdn.tc.qq.com @@ -6701,6 +6708,8 @@ aepxgapw.xyz aerialmistaken.com aeros01.tk aeros02.tk +aeros05.tk +aeros07.tk aeros08.tk aeros11.tk aeros12.tk @@ -6840,7 +6849,6 @@ afij001.xyz afj.cc afj0.com afjk001.xyz -afjlb.com afjxriipst.com afk-i.com afk3rs.xyz @@ -6870,6 +6878,7 @@ afpssp.alimama.com afptrack.alimama.com afptrack.csbew.com afraidlanguage.com +afrazanna.com africa.promo.skf.com africaewgrhdtb.com africafr.promo.skf.com @@ -7067,7 +7076,6 @@ ahwangtao.com ahwczn.cn ahwqsczvsi.com ahwrin88tl.com -ahxbpm.com ahxhny.cn ahyau.com ahylong.cn @@ -7748,6 +7756,7 @@ analytics-cms.whitebeard.me analytics-coletor-site.ojc.com.br analytics-consent-manager.azureedge.net analytics-gw.games.wanmei.com +analytics-helper.com analytics-production.hapyak.com analytics-proxy.springboard.com analytics-scripts.cablelabs.com @@ -8481,7 +8490,6 @@ api.24kidea.com api.51sxzz.com api.557400.com api.5eln.cn -api.aalbbh84.info api.abcxs.org api.ad-locus.com api.ad-stir.com @@ -8940,6 +8948,7 @@ aqedsw4.com aqgyju.cn aqiwxzv.cn aqjdigkqvmakz.com +aqkkoalfpz.com aqmgnoik.com aqnpbpa.cn aqtracker.com @@ -9122,7 +9131,6 @@ as.bz-berlin.de as.casalemedia.com as.cf as.cfcdist.loan -as.cfcnet.top as.computerbild.de as.fitbook.de as.inbox.com @@ -9482,7 +9490,6 @@ attributedrelease.com attributionapp.com attributiontrackingga.googlecode.com attributora.com -attritioncuff.com atuehome.cn atumanera.burgerking.com.mx atwainbounce.com @@ -9616,7 +9623,6 @@ authorinsights.com authoritiessteering.com authorityasknimble.com authoritygratecreed.com -authorizeknee.com aution.pro auto-im.com auto-ping.com @@ -9643,7 +9649,6 @@ automizely-analytics.com autopsycarrel.com autopsyglossy.com autotrading.com.cn -autsaubs.net autumnleaf.ltd auuayepftovx.com auuux.com @@ -9804,7 +9809,6 @@ axbxgg.com axeldivision.com axeptio.eu axf8.net -axfrb.cn axhntisudyhmxjd.xyz axiaffiliates.com axill.com @@ -9873,7 +9877,6 @@ azither.com azj57rjy.com azjmp.com azlyta.immowelt.de -azn55btbp3a4.com aznapoz.info azoaltou.com azointel.com @@ -9927,6 +9930,7 @@ b.fxnetworks.com b.gushiciju.com b.gwylm.com b.hatena.ne.jp +b.hkfuy.com b.iheart.southwest.com b.isbnrs.com b.itravel.southwest.com @@ -10961,7 +10965,6 @@ besocial.online besoes.com bessioutdrew.com besstahete.info -best-cdn.pl best-offer-for-you.com best-protection4.me best-top.de @@ -11004,7 +11007,6 @@ bestgong.top besthitsnow.com besti.ga bestmobiworld.com -bestnewsoft.ru bestnfd.com bestnff.com bestnfj.com @@ -11333,7 +11335,6 @@ bitcoset.com bite.theta.sogoucdn.com biteburied.com bitesizedtreat.pro -bitesizememorable.com biteti.com bitingcomposed.com bitonclick.com @@ -11773,6 +11774,7 @@ boilingtruce.com boilingumbrella.com boinkcash.com boirza.idealista.pt +boistyaya.com bojebyze.com bojtguluck.com bokeden.com @@ -12402,7 +12404,6 @@ bustlingbath.com butalksuw9dj10.com butanesleste.com butashasp.site -butcalve.com butendecatholicparish.com butlerelectricsupply.com butomuskainah.com @@ -12456,6 +12457,7 @@ bvakl.ifeng.com bvcxd.com bvfmdoo.cn bviehlvfp.xyz +bvnvx.xyz bvr.ast.snva.jp bvr.snva.jp bvrloslwgc.com @@ -13307,7 +13309,6 @@ ccuyuna.cn ccv.jiumishow.com ccv.ybt999.com ccvwtdtwyu.tr -ccymzg.cn cczuxie.com cd.jejre.cn cd239ecf15.com @@ -13771,7 +13772,6 @@ cfceu.duckdns.org cfclhaqhjdtw.com cfcloudcdn.com cfcnet.to -cfcnet.top cfcs1.duckdns.org cfdac.8g0ymk.cn cfdanet.com @@ -13791,12 +13791,10 @@ cfpl.online cfpwood.actonservice.com cfqc.me cfredh.cn -cfrsqptn.com cfsaze.retailmenot.com cftrack.com cfts1tifqr.com cfwchydynfc.com -cfxlwrnn.top cfyao.club cfyhym.weightwatchers.fr cgdh.fenbengpan.cn @@ -14269,7 +14267,6 @@ ckgroundan.xyz ckhvmkurkifon.com ckies.net ckiller.tech -ckjlmqgxy.com ckjyck.qxs.la ckkc.cc ckmap.mediav.com @@ -14489,7 +14486,6 @@ clickaider.com clickaine.com clickallow.net clickalyzer.com -clickandbuy.review clickandbuy.win clickaslu.com clickbet88.com @@ -14605,7 +14601,6 @@ clickurlik.com clickvalue.cn clickwedkeys.com clickwinks.com -clickwith.bid clickx.autohome.com.cn clickx.io clickxchange.com @@ -15119,6 +15114,7 @@ coin-have.com coin-hive-proxy-ybydcnjgkl.now.sh coin-hive.com coin-service.com +coin-services.info coinad.com coinad.media coinadster.com @@ -15244,7 +15240,6 @@ colliersads.com collserve.com colltz.com colmoseshelled.com -colnhive.com colognegreece.com colonistnobilityheroic.com colorfulafterthought.com @@ -15869,7 +15864,6 @@ corporateforms.americanexpress.com correctchaos.com corridorfiremanhauled.com corwrite.com -corycj.top coseik.com cosetswaragi.website cosherymudejar.com @@ -16313,7 +16307,6 @@ cre-dp.sina.cn cre.dp.sina.cn cre.mix.sina.com.cn cre99.com -creadordedinero.com creakversionfort.com creamssicsite.com create-tracking.com @@ -16559,12 +16552,10 @@ cti.w55c.net ctijbeb.cn ctki.hs1s1.cn ctlmufv.cn -ctlrnwbv.ru ctlweb.site ctm-media.com ctnsnet.com ctoabc.xyz -ctoairtx.com ctobsnssdk.com ctp1.bforbank.com ctr-iwb.nmg.de @@ -16600,6 +16591,7 @@ cuberoot.co cuberssnur.com cubeslichees.com cubimates.com +cubistspandar.com cucalm.com cuckooretire.com cuculf.name @@ -16787,7 +16779,6 @@ cx.ifengbi.com cx.v5cam.com cxad.cn cxasci.sprzedajemy.pl -cxb4.cn cxbge.xyz cxccm.com cxdcn9c.fjshxjs.cn @@ -16831,6 +16822,7 @@ cybmas.com cyboke.cn cybook.fun cyccy.cn +cyclaseaegipan.com cyclim.com cyclismpeddled.cam cycy.kxrxh.com @@ -16921,7 +16913,6 @@ d.agkn.com d.applovin.com d.beigedi.com d.biboi.cn -d.cfcnet.top d.clkservice.youdao.com d.cntv.cn d.cpufan.club @@ -17487,7 +17478,6 @@ d8962a.xyz d8af4fb8c1.com d8b6aa51fe.com d8cxnvx3e75nn.cloudfront.net -d8d4ab7673.com d8fb9b701c.com d8r7.xyz d9.mobaders.com @@ -18267,7 +18257,6 @@ defybrick.com defyraspypuke.com degeronium.com degh48.fnac.com -degrtdqvaansd.com dehairpodley.com dehornuplock.com dehua.ixinfan.com @@ -19266,6 +19255,7 @@ dmgmediaprivacy.co.uk dmkdtkad2jyb9.cloudfront.net dmkt.solutions.cas.org dmlkicqupnjfryv.com +dmm-video.online dmm.aizhan.com dmmzkfd82wayn.cloudfront.net dmnhiwojcy.com @@ -19772,10 +19762,12 @@ drtladv.com druadirjfviwn.xyz drufmhivrcehs.com druggechinook.com +druggedsilurid.com druic.mytxt.cc druis.mytxt.cc drulilqe8wg66.cloudfront.net drumimaring.xyz +drupalupdates.tk drvmy.ats68.cn drydrum.com ds-aksb-a.akamaihd.net @@ -19839,7 +19831,6 @@ dsp.youdao.com dspack.com.cn dsparking.com dspcm.brand.sogou.com -dspdy.cn dspimg.adsame.com dspimg.dftoutiao.com dsply.com @@ -19928,6 +19919,7 @@ dubshub.com dubvacasept.com ducapelacunas.cam ducina.com +duckiessongle.com duckswillsmoochyou.com ducmiptu.net ducmissy.com @@ -20056,7 +20048,6 @@ dvv9dkv.site dvvnhwm.cn dvx-android.domob.cn dvypar.com -dvzk66.cn dw-collect.ksosoft.com dw-online.ksosoft.com dw.cbsi.com @@ -20789,6 +20780,7 @@ e7free.allyes.com e85440ec98f04725.com e8a0cb51c6.com e8c09b34de.com +e9590c90a8.com e98fe.luytr.com e9c1khhwn4uf.com e9d46e21e9.com @@ -20947,6 +20939,7 @@ easyads29.mobi easyads29.pro easycounter.com easydating.top +easydistrustuldistrustul.com easyfeeed.com easyflirt-partners.biz easyflirt.com @@ -22247,7 +22240,6 @@ et.tidal.com et.twyn.com et.w.inmobi.com et363.com -etacontent.com etahub.com etapescaisse.com etargetnet.com @@ -22314,7 +22306,6 @@ eu-gmtdmp.gd1.mookie1.com eu-survey.com eu.cf eu.cfcdist.loan -eu.cfcnet.top eu.groupondata.com eu.vortex-win.data.microsft.com eu.vortex-win.data.microsoft.com @@ -22389,7 +22380,6 @@ evbsa.xyz evcknbym.com evealm.com evemasoil.com -evengparme.com event-api.contactatonce.co.uk event-api.contactatonce.com event-api.rdstation.com.br @@ -22951,6 +22941,7 @@ fanumi.com fanxing.kugou.com fanyi100.com.cn fanyorgagetn.buzz +fanza.cc fanzhuang.net.cn fanzinetautens.com fapality.com @@ -23144,6 +23135,7 @@ fdsousf.cn fdsq.vb4rvq.cn fdsz.n27lw.cn fdt.kraken.com +fdtpyqqsnzxvt.ru fdveqpc.cn fdvewptkqfnrok.com fdxstats.xyz @@ -23532,7 +23524,6 @@ fizzythick.com fjdfqy.com fjdvzx.cn fjdy.cc -fjfpeqgeyp.com fjgcai.zlavomat.sk fjighz.armaniexchange.com fjioh.com @@ -23557,6 +23548,7 @@ fjzimaoqu.cn fkbwtoopwg.com fkdaik.lightinthebox.com fkesfg.com +fkhfk.cn fkjjpwzkrfdg.com fkkse.com fkku194.com @@ -23646,7 +23638,6 @@ flixfacts.co.uk flixgvid.flix360.io flixsyndication.net flmuqa.com -flnqmin.org float.kankan.com floccischlump.com flockflame.com @@ -23906,7 +23897,6 @@ fourfork.com fourier.alibaba.com fourier.taobao.com fourmtagservices.appspot.com -fourthchoseark.com fout.jp fovccjwc.com fovykaxo.pro @@ -24039,7 +24029,6 @@ freebitco.in freebloghitcounter.com freebuy.top freecodecs.us.intellitxt.com -freecontent.bid freecontent.com freecontent.date freecontent.net @@ -24118,6 +24107,7 @@ freychang.fun frhbrkjgerikm2f8mjek09.com fri4esianewheywr90itrage.com friarsspiffy.com +fridgequote.com fridgestretched.com friedprovenance.com friend17.net @@ -24209,6 +24199,7 @@ fsznrodyocq.com ft.moad.cn ft8e.top ftalymniyqmbuyg.com +ftanya.ltd ftaysn.meinekette.de ftblltrck.com ftbpro.com @@ -24235,7 +24226,6 @@ ftxabddarlo.xyz ftysya.aboutyou.de ftz.io ftzets.silkfred.com -ftzivuesohvebj.ru fu68.com fublue.com fubsoucm.com @@ -24594,7 +24584,6 @@ gadspms.com gadspmz.com gafxa.code.mytanwan.com gagacon.com -gagaz.cn gaghygienetheir.com gagpetwet.com gaietyastonished.com @@ -24838,7 +24827,6 @@ gdsqwy.org gdt.qq.com gdtimg.com gdufpjrhran.com -gdvadiyvxo.com gdxxb.com gdyjs.com gdyn.cnn.com @@ -25734,7 +25722,6 @@ goodmeasure.io goods.tudou.com goods2you.net goodsky.shop -goodtag.it goofypismica.com google-analytics.com googleads.g.doubleclick.net @@ -25767,6 +25754,7 @@ gopjn.com goprediction.com goraps.com goredi.com +goredirect.party gorgeousground.com gorgon.youdao.com gorillabrightenarms.com @@ -25901,7 +25889,6 @@ grairgos.net grairsoa.com graivaik.com graizoah.com -gralfusnzpo006.top gramombird.com gramrebecca.com granarybroughtfun.com @@ -25910,7 +25897,6 @@ grandchildfee.com granddadknitbravely.com granddaughterfashioned.com granddaughterrepresentationintroduce.com -grandioseguide.com grandmotherunit.com grandsonreverendlawn.com grandsupple.com @@ -26109,7 +26095,6 @@ gsinspiring.xyz gsjdzx.com gsjlfs.com gslb.hpplay.cn -gsmtop.net gsqweb.cn gssdsj.com gsspat.jp @@ -26841,7 +26826,6 @@ hdjlkj.vip hdjxmf.com hdkal67.cn hdketang.cn -hdminfeng.com hdmtools.com hdnagl.womensecret.com hdporn.to @@ -26894,8 +26878,6 @@ hearfromyou.biz hearinglizards.com heartachecustomary.com heartbrokendilapidation.com -heartbrokenscallion.com -hearthcoronation.com hearthorn.com heassi.com heathertravelledpast.com @@ -27153,7 +27135,6 @@ hiba.club hibids10.com hibivi.lucky-print.biz hiblcom.com -hibymura.com hickunwilling.com hiconversion.com hicpm10.com @@ -27196,7 +27177,6 @@ highrevenuecpm.com hightopnewstoday.com hihcdngo.com hihufu.cn -hiibcfr.cn hiido.com hiinpardt.com hijack.baidu.com @@ -27428,10 +27408,12 @@ hk2sch130022135.wns.windows.com hk2wns1.wns.windows.com hk2wns1b.wns.windows.com hk50606.cn +hk6kn.cn hk9600.com hkbmsb.fun hkedve.cn hkeynjiwpgvfzr.com +hkfuy.com hkhnmasegg.com hkhpnqciykaf.www.gamecamp.gg hkj8.evobanco.com @@ -27851,7 +27833,6 @@ hrahdmon.com hrb1tng0.com hrclat.kijiji.it hrcmzp.cn -hrfziiddxa.ru hriycvg.cn hrjg.com.cn hrmationeng.xyz @@ -28082,7 +28063,6 @@ huodong.press huodonghezi.cn huofayu.com huojua.com -huojub.com huomob.com huosai.net.cn huoxingtan66.com @@ -28092,6 +28072,8 @@ huppahshoras.com hupu-nba.com hupuzhibo.cn hurapepy.com +hurdlesmuchel.com +hurdlewantingfalcon.com hurdleyreer.info hurlockserail.com hurra.com @@ -29142,6 +29124,7 @@ in-page-push.com in-page-push.net in.aikan6.com in.gyeet.com +in.hkfuy.com in.hystq.com in.jghcy.com in.jxhcyc.com @@ -29553,6 +29536,7 @@ insights.radiometer.com insights.sitesearch360.com insights.sport1.de insigit.com +insignificantdoggie.com insistinestimable.com insitemetrics.com insitepromotion.com @@ -30132,7 +30116,6 @@ iwebtrack.com iwfofotjwlcphm.xyz iwfwgathfp.com iwgfdj.iko-yo.net -iwhugaul.com iwkexdab.com iwl2d7pa4yx1.www.logology.co iwofkvupfz.com @@ -30163,6 +30146,7 @@ ixodidsupdives.com ixqfughrynmfh.com ixqkgc.cn ixspublic.com +ixuchch.cn iy.com.cn iy20.com iyes.youku.com @@ -30746,7 +30730,6 @@ jixie.io jixing.cc jixing8.com jiyan.net -jiyuanzhiwensuo.cn jiyuanzixun.com jizzads.com jizzensirrah.com @@ -30970,7 +30953,6 @@ jq.a0buy.top jq159.com jq6b.top jqad.vip -jqassets.do jqcdn.download jqcdn01.herokuapp.com jqcdn03.herokuapp.com @@ -31888,7 +31870,6 @@ khaate.com khaelzols.com khandragthresh.com khayatarai.com -khcbilxtj.com khdry.top khedarigel.com khellinturkish.com @@ -31899,11 +31880,11 @@ khg97644rvbg.com khgj.cn khjpgjuakmjik.com khlgdkxien.com -kho3au7l4z.me khovdimina.com khphkum.cn khrtac.xiangha.com khufaw2.com +khuokpj.cn khuoy.com ki47.com ki74.com @@ -31921,7 +31902,6 @@ kiees.com kiezohky.xyz kign.biluzhang.cn kihoadoa.com -kikabothi.com kiki.rireetchansons.fr kikibobo.top kikoosso.net @@ -32009,7 +31989,6 @@ kjfoqi.cn kjg.shfengren.com kjgen.com kjhfy.com -kjhzwvq.cn kjjzx.cn kjkhgtwft.com kjkwrmwdyhi.com @@ -32387,6 +32366,7 @@ kuntic.com kuntlgsdinwp.com kunyu.csdn.net kuoxing.mobi +kupharlutetia.com kupona.de kuptabachy.com kuqi.com @@ -32559,6 +32539,7 @@ labellaunkamed.com labelnayarit.com labfrsmdxqj.xyz labourmuttering.com +labourpushed.com labs.ra.icast.cn labsappland.com lacerate.club @@ -32590,9 +32571,9 @@ ladyye.site laf1ma3eban85ana.com lafastnews.com laferia.cr +lafitehairif.com lafontainedessenterue.cn lafrjs.com -lagginleapful.com lagoonolivia.com lahair.biz lahemal.com @@ -32933,6 +32914,7 @@ leelovelwj.com leepoona.com leerilypimelea.com leetaipt.net +leethalo.net leetmedia.com leeyuo.com leezoama.net @@ -33167,6 +33149,7 @@ lidebo.com lidjetsyak.com lidney.com lie2anyone.com +liebaovip.com liebian888.site liecso.e-himart.co.kr liegelygosport.com @@ -33250,6 +33233,7 @@ linezing.com ling07.icu lingamretene.com lingd.cn +lingerincle.com lingerstored.com lingke02.xyz lingke03.top @@ -33368,7 +33352,6 @@ linkpage.cn linkpulse.com linkredirect.biz linkreferral.com -linkrotation.ru links-and-traffic.com links-anz.afterpay.com links-na.afterpay.com @@ -33500,7 +33483,6 @@ liskwculeepiw.com lislepostsax.com list.z.qingting.fm list1holp.com -listat.biz listc.cn listenmolly.com listenother.com @@ -33653,9 +33635,9 @@ lkpmprksau.com lkqd.net lksw1.top lksw3.top +lktxelg.cn lkxanf7ad6g.zgyryt.com ll.atdmt.com -ll.gxsky.com ll.hudong.com ll.songlaoban.cn ll38.com @@ -33683,7 +33665,6 @@ lltmch.zurifurniture.com lltrck.com llyhbqn.cn lm.dawenxue.org -lm.ijq.tv lm.souid.com lm.tv.sohu.com lm.xiashu.la @@ -33768,6 +33749,7 @@ loameepu.com loanonionbidding.com loastees.net loathepimpery.com +loathynay.com loatis.com loazezoo.net lobby-x.eu @@ -33819,7 +33801,6 @@ log.51network.com log.ad.xiaomi.com log.adplex.co.kr log.aimtell.com -log.aliyuncs.com log.artipbox.net log.bitauto.com log.china.cn @@ -33861,7 +33842,6 @@ log.m.sm.cn log.mappy.net log.mediacategory.com log.medietall.no -log.mgtv.com log.mix.sina.com.cn log.mofa.go.kr log.moji.com @@ -34065,6 +34045,7 @@ lookmy.info looksmart.com looksthrilled.com lookujie.net +lookvision.info loolowhy.com looluchu.com loom3otto.com @@ -34200,7 +34181,6 @@ lqxjrk.fbs.com lr-in.com lr-ingest.io lr6e.top -lraa.xiaoniutui.com lragjoyk.com lreust.joshinweb.jp lrevfhmp.cn @@ -34272,6 +34252,7 @@ lucid.mjhassoc.com lucidahankul.com lucidcommerce.com lucidel.com +luciditymadeupfarfetched.com lucidlydiscretion.com lucidmedia.com lucklayed.info @@ -34366,7 +34347,6 @@ luyouxi.cn luyten-98c.com luzulabeguile.com lv-xin.cn -lv.myapks.com lv6od3a4sz12.www.logology.co lv711.net lvecygampj.com @@ -34468,7 +34448,6 @@ lyunsd.cn lyxfra.shopee.com.my lyxuexin.com lyytc.cn -lyz.radio366.com lyzenoti.pro lyzon.com.cn lyztdz.com @@ -34487,7 +34466,6 @@ lzrljv.tradera.com lzscagcpmroyyz.com lzthjd.cn lzuc.sfr.fr -lzvojx.deka.ua lzwnb.site lzxdx24yib.com lzxnhul.cn @@ -34688,7 +34666,6 @@ m.ajiuc.com m.amhmhg.cn m.analytics.126.net m.anmeilai.net -m.anyfiles.ovh m.anzhuotan.com m.api.baifendian.com m.apxyz.com @@ -35573,7 +35550,6 @@ m1.hapi123.net m1.jintang114.org m1.kuanff.com m1.mgogo.com -m1.nn670.com m1.stadiumgoods.com m1.vodjk.com m1.we556.com @@ -35589,7 +35565,6 @@ m19ud.cn m1ll1c4n0.com m2.ai m2.da.mgtv.com -m2.lelemh.com m2.nsimg.net m2374.oadz.com m2m1.inner-active.mobi @@ -35849,7 +35824,6 @@ manualcasketlousy.com manychat.com manyou.com manysoftlink.ru -mao1.jsnovel.com maobujie.com maocai.xvtpvc.cn maodz.cn @@ -35878,7 +35852,6 @@ marathongenerositypremiere.com marbil24.co.za marcianice.com marcom.biodex.com -marcycoin.org marerajahcopied.com marezzojubate.com marfeel.com @@ -35901,7 +35874,6 @@ markedmeasure.com markedpail.com markerly.com markerperceivehick.com -markerviascales.com market-keyade.macif.fr market.178.com market.21cn.com @@ -36394,7 +36366,6 @@ matterbadgerpsychic.com matterlytics.com maturescream.com matwbp.iask.sina.com.cn -matzosetagood.com mauchopt.net maudamee.net maudau.com @@ -36490,7 +36461,6 @@ mc.hujiang.com mc.mmkkhhnn.cn mc.mwgpg.cn mc.tvzhe.com -mc.weather.com.cn mc.webvisor.com mc.webvisor.org mc.yandex.com @@ -36861,7 +36831,6 @@ messengerpeople.com messyoranges.com mesucces.top met.adwhirl.com -met.vgwort.de met1.hp.com met2.hp.com meta-wx.com @@ -36991,7 +36960,6 @@ metrics.cbc.ca metrics.cbn.com metrics.ccma.cat metrics.cdiscount.com -metrics.centex.com metrics.chapters.indigo.ca metrics.citibank.com.ph metrics.cnn.com @@ -37229,7 +37197,6 @@ metrics.sky.com metrics.sky.it metrics.skynews.com.au metrics.sony.jp -metrics.southernliving.com metrics.spencersonline.com metrics.spirithalloween.com metrics.spkt.io @@ -37387,7 +37354,6 @@ mgwcn.com mgygdeofh.com mgzgmyzz.com mgzjin.cn -mgzs.cdn.bcebos.com mgzupozfeltrv.com mh1.mlsjh.com mh1.zhengdongwuye.cn @@ -37604,7 +37570,6 @@ minisite.vidown.cn minisms.xyz minismss.xyz minisplat.cn -miniye.xjts.cn minkatu.com minmin.buzz minormeeting.com @@ -37816,7 +37781,6 @@ mm.melia.com mm.moquanad.com mm.nwell.net mm.paizi.net -mm.zubovskaya-banya.ru mm100.com mm2ah.com mm3t.cn @@ -37932,7 +37896,6 @@ mob.huimee.net mob10.cqjktj.com mob1ledev1ces.com mob26.jnjszl.com -mobad.ijinshan.com mobaders.com mobaders.oss-cn-beijing.aliyuncs.com mobadme.jp @@ -38229,7 +38192,6 @@ motion.kollmorgen.com motionlessbag.com motionlessbelief.com motionspots.com -motivationcorny.com motivationrejoice.com motivessuggest.com motoe.plokr.com @@ -38282,7 +38244,6 @@ mozoo.com mozuoshop.net mp-https.info mp.cheering3d.com -mp.huangye.miui.com mp.xi9p.com mp3.haogeba.com mp3bars.com @@ -38628,7 +38589,6 @@ mvlqhielqnsdmy.com mvlzxlcmsrqjc.com mvo.bd6t4.xyz mvo.chng5.xyz -mvo.g45td.xyz mvo.g4rre.xyz mvo.hn765f.xyz mvo.lki6hy.xyz @@ -38707,7 +38667,6 @@ my.exotravel.com my.iheart.com my.leadpages.net my.mobfox.com -my.my-hr.cn my.promo.skf.com my.stbarth.com my1688.shop @@ -38806,6 +38765,7 @@ mypushz.com myqip.icu myqsmtptylicju.com myreferer.com +myregeneaf.com myro.shop myroitracking.com myrrhicfoeman.com @@ -38816,7 +38776,6 @@ mysafeurl.com myscoop-tracking.googlecode.com myseostats.com myshou.com -mysite.irkdsu.ru mysitetraffic.net mysjozauyuwwm.com mysleepds.com @@ -38834,7 +38793,6 @@ mytanwan.com mytestminer.xyz mythincredibly.com mythings.com -mythysema.com mytictac.com mytopf.com mytrack.pro @@ -39164,6 +39122,7 @@ neechuce.net needlefoliagemoan.com needleworkemmaapostrophe.com neegreez.com +neembabonsela.com neezausu.net nefijapu.com negaic.com @@ -39440,7 +39399,6 @@ nex.corp.163.com nexac.com nexage.com nexeps.com -nexioniect.com nexstep.zdworks.com nextclick.pl nextdark.pro @@ -39643,11 +39601,9 @@ nitmus.com nitrogenpleahierarchy.com nitrokod.com nitropay.com -nitsche.top nitytolearnan.biz niubiba.com niuer-req.xy.huijitrans.com -niuguwang.net.cn niuhe.xyz niulai0323166.space niunai.buzz @@ -39843,7 +39799,6 @@ nonstoppartner.de nontio.com nonusesectatic.com nonwarmarge.website -noobnoob.ro noobutoa.net noobydoobi.com noodle.backmarket.io @@ -40276,7 +40231,6 @@ o.addthis.com o.carmax.com o.domob.cn o.if.qidian.com -o.jy135.com o.lenovo.com o.lj7t6e.cn o.minisplat.cn @@ -40371,6 +40325,7 @@ obfrok.partyking.no obgbok.com obihmnb.cn obituaryfuneral.com +obj9.cn object.de objectdressed.com objectedsheetrobin.com @@ -40454,7 +40409,6 @@ ocxve.xyz oda.markitondemand.com odc.1und1.de odc.starwave.com -oddertabrhino.com oddscornflower.com oddsresemble.com oddyqw.com @@ -40566,7 +40520,6 @@ oglprcjlenlkke.com ogmghzpyq.com ognlaigk.fun ogondkskyahxa.ru -ogqcuudzsuukds.com ograuwih.com ogrfi3uyt7.com ogrid.org @@ -40885,7 +40838,6 @@ oncomeannuals.com ondeerlingan.com ondu.ru one-workspace.matrix42.com -one.toumppk.cn oneapm.com oneclck.net onecollector.cloudapp.aria.akadns.net @@ -40952,7 +40904,6 @@ online-adnetwork.com online-metrix.net online-protection-now.com online.cnzz.com -onlinenothome.com onlinepbx.ru onlineporno.fun onlinepromousa.com @@ -41045,7 +40996,6 @@ ope.tanx.com opehs.tanx.com opekoobs.net open-adx.com -open-hive-server-1.pp.ua open-pixon.ads-pixiv.net open-uc.cn open.delivery.net @@ -41071,7 +41021,6 @@ openhit.com openingpairpaternal.com openinstall.io openjmacs.m.taobao.com -openkatalog.com openlog.in openmsf.3g.qq.com openrcv.baidu.com @@ -41392,6 +41341,7 @@ ouliglsu.space oulpli.bettybarclay.com oulukdliketo.shop oulukdltobepa.com +oumazg.com oumnxwvu.ink oumtoujo.net oundaymi.co @@ -41526,7 +41476,6 @@ ow.s1.shuhuangge.org ow.s2.shuhuangge.org owads.audioadx.com owcdcamldcu.com -owdfxgc.cn owenexposure.com owewary.com owin.biqugego.com @@ -41735,7 +41684,6 @@ p3p.yahoo.com p3tt.com p4.95558000.com p4f52tll.cn -p4p.sina.com.cn p4psearch.china.alibaba.com p555.cc p59othersq.com @@ -41843,7 +41791,6 @@ pageshow.dftoutiao.com pagesinxt.com pagesocket.glam.com pagespeed.report.qq.com -pagetest.top paginw.com paginx.com pagne4cham4hrobl.com @@ -41890,7 +41837,6 @@ palasidesdoor.com paleleaf.com paletteadulatory.com palibs.tech -pallorvain.com palm-ad.cn palmicplod.com palmnews.sina.cn @@ -41898,6 +41844,7 @@ palpcaroch.cam pam.nextinpact.com pamelarandom.com pamphletconspiracy.com +pamphletrating.com pampopholf.com pan.render.com panachetech.com @@ -41911,7 +41858,6 @@ pandaking.site pandasloveforlife.com pandlewombier.com panel-cn.com -panelsave.com pangolin-sdk-toutiao-b.com pangolin-sdk-toutiao.com pangolin.snssdk.com @@ -41923,7 +41869,6 @@ panickypancake.com paniskbourdon.com panli.site panoramicbutter.com -panruo.net.cn pansymerbaby.com pantafives.com pantherads.com @@ -42027,7 +41972,6 @@ partners.dogtime.com partners.etoro.com partners.hostgator.com partners.rochen.com -partners.wrike.com partnershipknackcloset.com partouba.com partoukfar.co @@ -42369,7 +42313,6 @@ pepper.com pepperjamnetwork.com peppermintcoal.com peppy2lon1g1stalk.com -pepsgolfsintake.com perceivequarter.com percentmobile.com percephonefruit70.com @@ -42694,7 +42637,6 @@ pic.dotmore.com.tw pic.ea3w.com pic.eduancm.com pic.fastapi.net -pic.fengniao.com pic.haowj.com.cn pic.iask.cn pic.jd-bbs.com @@ -42753,6 +42695,7 @@ pierlinks.com pierremarkeraffliction.com pierrottease.com pietexture.com +pietpiraat.org pietyinputinsult.com pigamn.com pigath.com @@ -42891,7 +42834,6 @@ pix.pub pix.revjet.com pix.speedbit.com pix.spot.im -pix.tagcdn.com pix.telekom-dienste.de pix.telekom.com pix.telekom.de @@ -43186,7 +43128,6 @@ plavxml.com plaxo.com play-asia.com play.besstahete.info -play.cc.gofile.io play.es play.estream.nu play.estream.to @@ -43195,10 +43136,8 @@ play.feesocrald.com play.flowplayer.space play.gramombird.com play.istlandoll.com -play.js.vidoza.net play.mine.gay-hotvideo.net play.mix.kinostuff.com -play.nexioniect.com play.on.animeteatr.ru play.pampopholf.com play.pc.belicimo.pw @@ -43208,11 +43147,9 @@ play.play.estream.xyz play.play1.videos.vidto.me play.power.tainiesonline.pw play.qs01.cn -play.s01.vidtodo.pro play.springboardplatform.com play.tainiesonline.pw play.tercabilis.info -play.vb.wearesaudis.net play.video2.stream.vidzi.tv play.vidzi.tv play1.flashx.pw @@ -43475,7 +43412,6 @@ ponyvictorymiscarriage.com pooboafi.net poocomug.com poodledopas.cam -poodsboiko.com poogriry.click pookawnratbite.com pool.etn.spacepools.org @@ -43658,7 +43594,6 @@ potteryhuman.com potwm.com pouchrecogniseheiress.com pouffedrobinet.com -pouncewhineheadquarter.com poundaroseflight.com pouneeso.com pourdear.com @@ -43846,7 +43781,6 @@ presatisfy.com presence.teams.live.com presentlyarch.com presetrabbits.com -presidentialthriceinefficient.com presidentrestoration.com pressingequation.com pressingmiscellaneoustry.com @@ -44147,7 +44081,6 @@ proxy-pol-1.inf.nimiq.network proxy-pol-2.inf.nimiq.network proxy.dzeio.com proxy.sec.miui.com -proxy4life.org proxyfl.info proxyhell.com proxyindia.net @@ -44391,7 +44324,6 @@ publift.com publir.com publish-int.se publish-pic-cpu.baidu.com -publish.ad.youth.cn publish0x.com publisher.monster.com publisheradnetwork.com @@ -44726,7 +44658,6 @@ pvtest.zol.com.cn pvx.autohome.com.cn pvx.xcar.com.cn pvxfkublrecbtjb.xyz -pvxymnz.cn pvykihatcb.com pvyvglaf.com pvzdrx.cn @@ -44770,7 +44701,6 @@ px.ucweb.com px.wp.pl px1alsry.com px3792.com -pxaaemlvuqmepog.com pxaction.com pxblmj.com pxc.otto.de @@ -44995,7 +44925,6 @@ qgnlbjkxrzb.com qgnqsebea.com qgpfxtemxppud.com qgqxzs.net -qgss8.com qguwoq.cn qhdbfjx.com qhdeseiqcc.com @@ -45191,6 +45120,7 @@ qnqtfaydb.com qnsr.com qnvljz.info qnwxk.com +qo4nkz03dy.cn qoaaa.com qoepkc.top qoevjugu.com @@ -45578,6 +45508,7 @@ r6.mo.baidu.com r66net.com r66net.net r7ls.net +r8nu86wg.me r932o.com ra.gtimg.com raab3frog.com @@ -46786,7 +46717,6 @@ rmads.msn.com rmawm7mw.top rmbn.net rmbsmxz.cn -rmcxyfqbm.com rmd.atdmt.com rmgdapfnccsharpprd.azurewebsites.net rmgmggg.cn @@ -46870,7 +46800,6 @@ rocoloagrotis.fun rodeopolice.com rodirgix.com rodo.agora.pl -rodplxlpc.com roduster.com roebuckwagged.com roeraz.com @@ -46929,6 +46858,7 @@ rookmemorizevoluntary.com rooksreused.website roommatespacioushrs.com roomyreading.com +roosasurfy.com roost.me roosteem.net roosterfirework.com @@ -47299,7 +47229,6 @@ ruthsurplusattribute.com rutius.com rutpunishsnitch.com rutrk.org -rutsneareta.com ruuwkftrtegqj.com ruvdkw.turk.net ruwei.me @@ -47469,6 +47398,7 @@ s.haiyunx.com s.hamiltonnews.com s.hdsupplysolutions.com s.hk9600.com +s.hkfuy.com s.hnhgw.cn s.hoverming.cn s.huayi65.com @@ -47713,6 +47643,7 @@ s2.huoying666.com s2.kuaibaopay.com s2.leshi123.cc s2.mingmingtehui.com +s2.myregeneaf.com s2.yandui.com s2.zdface.com s2.zdmimg.com @@ -47741,6 +47672,7 @@ s3.cnzz.com s3.flowplayer.space s3.joexl.com s3.minexmr.com +s3.myregeneaf.com s3.pampopholf.com s3.pfp.sina.net s3.phluant.com @@ -48120,6 +48052,7 @@ salvador24.com salync.com salzwerk.viessmann.de samage-bility.icu +samantharegina.com samanthyean.com samazd.com samba.adsame.com @@ -48154,6 +48087,7 @@ samsungacr.com samsungadhub.com samsungads.com samtrg.com +samuelgirlism.com samvaulter.com samvinva.info samyarct.top @@ -48810,7 +48744,6 @@ sdtagging.azureedge.net sdtieta.com sdu.adwo.com sduptpppm.com -sdurhnd.com sdutmedia.com sdweldrobot.cn sdxctr.com @@ -49204,7 +49137,6 @@ securemvt.apple.com securemvt.apple.com.cn securepaths.com securepubads.g.doubleclick.net -securesmrt-dt.com securesurf.biz securetags.aeroterra.com securetags.esri.co @@ -49587,7 +49519,6 @@ setemoump.com setflooded.cam setopsdata.com setoutcazique.com -setpadchat.com setqfx.cn setqre.cn setravieso.com @@ -49771,6 +49702,7 @@ shaquevip.oss-cn-zhangjiakou.aliyuncs.com share-server.com share.baidu.com share.gree.jp +share.gzdsw.com share.itraffic.su share.pluso.ru share.static.skyrock.net @@ -49814,6 +49746,7 @@ shcd.me shcy3.com shcylxl.com shdunjiusy.com +shealapish.com sheeckaz.com sheeftee.net sheenaup.net @@ -49982,6 +49915,7 @@ shoujiawang.cn shouliang.52lvgucci.com shoungak.net shoushushi.info +shouyefrom.xyz shouyili.mobi shouyouyou.com shouzhuanfs.com @@ -50268,6 +50202,7 @@ sippingsunned.com sipulo.katies.com.au siqwfy.cn siqwqjza.m.yikanxiaoshuo.net +sirdata.eu sirdata.io siredonlacs.com sireundermineoperative.com @@ -50391,6 +50326,7 @@ skbnfa.filorga.com skdbarh.cn skeettools.com skellbillard.com +skencituer.com skenqaamefeoncfegrytbuvksebpefer.com sketchinferiorunits.com sketeprofs.com @@ -50412,7 +50348,6 @@ skipdearbeautify.com skipwaywurzel.com skkybrought.pro skl.zhazhiwei.com -skmtyaw.cn sknkwpvrkz.com skoovyads.com skryptcookies.pl @@ -51734,6 +51669,7 @@ smxsg.com smyarlr.cn smyvividi.club sn00.net +sn0hb.cn snack-media.com snagbaudhulas.com snaglighter.com @@ -52392,6 +52328,7 @@ spikyslave.com spillsackterrified.com spinachtighten.com spinaleighth.com +spinbiased.com spinbox.net spinfo.wps.cn spinnaker-js.com @@ -52556,7 +52493,6 @@ sqtpks3.1391.com squalmtupelos.com squarepicket.com squashfriction.com -squawcubesfry.com squeakvegetable.com squeakzinc.com squealingturn.com @@ -53129,7 +53065,6 @@ stat.zbii.com stat.zdnet.com.cn stat.zol.com.cn stat.zuimeitianqi.com -stat0808.info stat2.corp.56.com stat2.openinstall.io stat24.com @@ -53871,7 +53806,6 @@ stereotypedclub.com stereotypedsugar.com sterilecute.com sterlingwoods.com -steroidparentconstruct.com stertorblaver.com stetic.com steveackton.com @@ -54091,6 +54025,7 @@ stuff.202m.com stuff.cdn.biddingx.com stuffedprofessional.com stuffpotencydisciple.com +stugorezu.com stumbledmadeiraselfcontrol.com stunninglover.com stunthedge.com @@ -55390,7 +55325,6 @@ taxodiu2m2dis7tichum.com taxzcqghel.com tayloroutgain.com taylorshellfish.actonservice.com -tazm9p7tso.trade tb.code.twyxi.com tb060x.corp.youdao.com tb104x.corp.youdao.com @@ -55440,6 +55374,7 @@ tchep.com tcimg.com tck.photobox.com tcmall.me +tcmsp.cn tcnnnzt.cn tcoekdwnuveaisk.com tcpcharms.com @@ -55551,7 +55486,6 @@ team-rec.jp teambetaffiliates.com tearoomruchbah.com tearpilotzoo.com -teartee.com teasernet.com teasernet.ru teaservizio.com @@ -55603,6 +55537,7 @@ teenyvolcano.com teethaur.com teethfan.com tefections.xyz +teflontomelet.com teicdn.com teijgy.herveleger.com teijs.alcampo.es @@ -55868,6 +55803,7 @@ tgjkbx.cn tgknt.com tglyr.co tglzqw.cn +tgnlaigi.fun tgpsew.com tgracefulc.one tgt.maep.ibm.com @@ -55904,7 +55840,6 @@ thathechoxe.com thatitgivesm.biz thatobjective.pro thatohegly.com -thatresha.com thatsouh.com thaudray.com thauftoa.net @@ -55943,6 +55878,7 @@ thefatherofsalmon.com thefifthera.com thefinishedbook.com thefontzone.com +thefootpetso.com thefreeadv.com thefreehitcounter.com thefuncoolstuff.com @@ -56045,6 +55981,7 @@ thjxwlkj.com thli43.cn thnqemehtyfe.com thoaltie.net +thoamike.xyz thoartuw.com thofandew.com tholected.com @@ -56240,6 +56177,7 @@ tinker.com tinkerta.com tinkerwidth.com tinkshop.cn +tinnyitchier.com tinquestions.com tintersloggish.com tinthi.com @@ -56267,6 +56205,7 @@ tiresomethunder.com tireve.com tiringjollyhalfmoon.com tirongtech.cn +tirusoge.com tisafnii.space tiser.com tiser.com.au @@ -56843,6 +56782,7 @@ toweringrun.com towerycacara.com towniesgauze.com townsidewalkotter.com +toxineilling.com toyota.lol tozoruaon.com tp.ackermann.ch @@ -57119,7 +57059,6 @@ tr.info.bessans.com tr.info.caissenationalegendarme.fr tr.info.capfun.com tr.info.casino-proximites.fr -tr.info.comparadordeprestamos.es tr.info.easyviaggio.com tr.info.easyviajar.com tr.info.easyvoyage.co.uk @@ -58139,7 +58078,6 @@ traq.li trasholita.com trashyfindconfront.com trathy.com -traumasister.tk travel.caradonna.com travel.onlinevacationcenter.com traveladvertising.com @@ -58251,7 +58189,6 @@ trisn.top triton.companyegg.com triumphantplace.com triver.jp -trixyapieces.com trk-cdpetl.emdlz.com.cn trk-consulatu.com trk-imps.com @@ -58323,6 +58260,7 @@ trucksift.com truckstomatoes.com truconversion.com true2file.com +truecrimesss.com truefilen32.com truehits.in.th truehits.net @@ -58653,6 +58591,7 @@ twinrdsrv.com twinrdsyn.com twinsoflave.com twirehillers.com +twirlsjaborin.com twirlunsight.cam twistads.com twistyscash.com @@ -58716,6 +58655,7 @@ txv0.destinia.hu txvoin.with2.net txwhds.com.cn txzezttrqf.com +txzlc.cn txzs168.net txzvtgkthjq.com ty123.ltd @@ -58779,7 +58719,6 @@ tzcfyre.cn tzegilo.com tzhkydcgdmbz.com tzhqg.cn -tzjovzs.cn tzuyruz.cn tzwaw.pw tzxmhi.com @@ -58953,6 +58892,7 @@ ucxfdvhuqwpig.com ucxgg.com uczzd.com uczzd.net +ud860ec7.com udalmanresuit.com udarem.com udash.umengcloud.com @@ -59034,6 +58974,7 @@ ugg.keefung-zs.com ughhimtoy.com ugishdff.xyz ugkmihh.cn +uglieraccoll.com uglyp.club ugmarketing.smu.edu.sg ugmvoys.cn @@ -59138,7 +59079,6 @@ ulink.cc ulmdb.cn ulminicbawty.com ulmoyc.com -ulnawoyyzbljc.ru ulngtppm.com ulog.imap.baidu.com ulog.umengcloud.com @@ -59152,6 +59092,7 @@ ulqlckpdpadfpo.com ulsynmlt.fun ultimowraxle.com ultingcoempa.xyz +ultra-cdn.pl ultralove.net ultranote.org ultraoranges.com @@ -59315,7 +59256,6 @@ unifyaddition.com unilife.top unimhk.com unimportant-vehicle.pro -unimr0k7em.cn uninterestedquarter.com uninua.com unioch.com @@ -59664,7 +59604,6 @@ us.bannyat.com us.bs.serving-sys.com us.cf us.cfcdist.loan -us.cfcnet.top us.l.qq.com us.lucanet.com us.onkyo.actonservice.com @@ -59881,7 +59820,6 @@ uzerzn.cn uzhuangji.cn uzi66.jozee.cn uzixia.zwdu.com -uzljra.ru uzpmrbek.com uzrating.com uzsrh.cn @@ -60327,7 +60265,6 @@ vgvjkw.com vgw35hwr4w6x.com vh5g.top vhec.jhjhyn.cn -vhhotfndosn.com vhjuoaoetdbxt.com vhlret.cn vhmengine.com @@ -60436,7 +60373,6 @@ videostats.kakao.com videosvstincredible.com videosworks.com videosynd.kataweb.it -videovoiceable.ru vidfile.net vidigital.ru vidkidsgedrite.com @@ -60522,7 +60458,6 @@ vip-vip-vup.com vip.51.la vip.cainiaofx.com vip.catcs.cn -vip.cfcnet.top vip.gophersport.com vip.hyz86.com vip.id528.com @@ -60869,7 +60804,6 @@ vptbn.com vptjabo.cn vpvbojamkoxo.com vpyqdlrweoc.com -vpzccwpyilvoyg.ru vq1qi.pw vq7736.com vqkfkmexle.com @@ -60895,6 +60829,7 @@ vrreequip.com vrrzmvb.cn vrsshsdaa.com vrstage.com +vrtrdvx.cn vrtzads.com vry9.destinia.com vrzsw.com @@ -60984,6 +60919,7 @@ vuryua.ru vutudm.com vuuwd.com vuwmxjusucnh.com +vv1.pyhfxdm.cn vv84.bj.bcebos.com vviikig.cn vvlian.com @@ -60995,6 +60931,7 @@ vvpingtai.com vvqknwws.com vvsbt.cn vvsbwny.cn +vvv.ieduw.com vvv.lunqudai.com vvv.qqdashabi.top vvv.spahelani.com @@ -61047,6 +60984,7 @@ w.inews.qq.com w.jscsd.cn w.l.qq.com w.m.taobao.com +w.oumazg.com w.punchbox.org w.sharethis.com w.uohz.cn @@ -61066,6 +61004,7 @@ w1.wayqq.com w100.am15.net w1040.am15.net w1090.am15.net +w11.zhongkaohelp.com w18.9939.com w180.am15.net w190.am15.net @@ -61087,6 +61026,7 @@ w3.yinyuehu.cn w3.zooplusmail-aws.payzooplusmail-aws.zooplusmail-aws.net.zoossl.net.zooplus.es w38ju82bano4.cv.gerardbosch.xyz w3administratormail.nettesting.zooplusmail-nettesting.net.zoossl.net.zooplus.es +w3c.5txs.com w3counter.com w3csr12-svcgateway-northamericanode.githubcsr41.net.zooplus.de w3docsdropapi.development-apiserver-mgmt.net.zooplus.de @@ -61165,6 +61105,7 @@ wahwahnetworks.com waikuai.vip waisheph.com waistcoataskeddone.com +waistcoathearing.com waistcoatswimsuitham.com waistswimmer.com wait8hurl.com @@ -61268,6 +61209,7 @@ wap.utmei.cn wap.wooboo.com.cn wap.x4399.com wap.yb3.cc +wap001.bytravel.cn wap1.laogu.wang wap3.ucweb.com wapadv.com @@ -61443,7 +61385,6 @@ wds.inte.sogoucdn.com wdsvc.net wdvnvwayfcy.com wdxxx.top -wdymwzz.com we-stats.com wea5lkaf63loos8a.com weakya.com @@ -61761,11 +61702,11 @@ weightequilibriumforehead.com weiguanwang888.com weiiii.com weiiimt.cn -weijiakeji.top weikefanli.com weilaa.xyz weilang.site weiledi.com +weimeicar.cn weimeiwangluo.site weinin99.cn weipapa.top @@ -62409,6 +62350,7 @@ woredi.com worersie.com work-marketing.net.zooplus.es workableachiever.com +worker.salon.com workmanceremony.com workoperation.com workplaceidenticalincompetent.com @@ -62498,7 +62440,6 @@ wqedkddqge.com wqennyectdnvx.com wqkxlke.cn wqlkp.com -wqmfbqpbnmgyi.com wqmobile.com wqprtyg.cn wqyloitd.cn @@ -62723,6 +62664,7 @@ wttd.madeleine.fr wttd.madeleine.gr wtwbvglzzt.com wty007.xyz +wty46.com wtzgaa.com wu3wl2g7.cn wubsauth.net @@ -62738,8 +62680,10 @@ wujiupic.com wujrx.xyz wukelansm.top wuksaiho.net +wuliao.chzsport.cn wuliao.epro.sogou.com wuliao.ganji.cn +wuliao.juqingba.cn wuliglsg.space wulongqiyi.com wumii.cn @@ -63200,7 +63144,6 @@ www.flipf.cn www.flstudiochina.com www.flurry.com www.fr -www.freecontent.bid www.freecontent.date www.freecontent.party www.freecontent.science @@ -64036,7 +63979,6 @@ x1.52aoteman.com x1.da.hunantv.com x1.go.sohu.com x1.kantu.com -x18a1fmq74.cn x1ka.cn x29l.top x3kxysp.cn @@ -64086,7 +64028,6 @@ xazhangshaohui.xyz xazhuozhi.com xb4g.top xb588.net -xbasfbno.info xbcnvj2mdk1dn1.com xbhxgcj.cn xbirmkzpgcnb.com @@ -64098,7 +64039,9 @@ xbtw.com xbxhulfp.xyz xc.08an.com xc.gdt.qq.com +xc.gouchezj.com xc.macd.cn +xc.mydrivers.com xc7789.top xcads.cn xcaqa.xyz @@ -64108,6 +64051,7 @@ xcdf.cn xcdzsw.com xcelltech.com xcelsiusadserver.com +xcf-bd-js.chuimg.com xcgcwfc.cn xcggpt.com xchgx.com @@ -64192,7 +64136,6 @@ xfnkds.com xfo.monesyy.com xfrena.com xfvbs.cn -xfvgkboh.com xfyjz.cn xg.hbcygs518.com xg2car.co @@ -64375,7 +64318,6 @@ ximupea.ru xin.ygqczh.com xin365.org xinbo-lora.cn -xinchenyang.cn xindong.fun xindream.cn xineday.com @@ -64659,6 +64601,7 @@ xs8888.vip xsafdsv.cn xsapp.cdn.bcebos.com xsbndzklbm.com +xsdizch.cn xshellcn.com xshijie.xyz xsjh001.xyz @@ -64952,6 +64895,7 @@ yadro.ru yads.c.yimg.jp yads.yahoo.co.jp yahblemable.com +yahekby.cn yahorokoz.com yahugg.com yahuu.org @@ -65036,7 +64980,6 @@ ybhypt.com ybkjap.com ybn4.top ybnggmnaxu.com -ybnndud.cn yboourdyi.com ybotvisit.com ybp.yahoo.com @@ -65161,7 +65104,6 @@ yfhlghhkb.com yfi8.com yfjq.a6ntv.cn yfkgnqu.cn -yfot.com.cn yfum.com yfunkgk.cn yfupfhqxmwvu.com @@ -65196,6 +65138,7 @@ ygzkedoxwhqlzp.com yh21kk.com yh300.vip yh6u.dealeusedevoyages.com +yhaizy.cn yhbsk.cn yhdd1.com yhhtmdvuubnbtbp.com @@ -65210,6 +65153,7 @@ yhpknxzspo8a.kvest.ee yhsmk.com yhz18.com yhzm.cc +yi.ximizi.com yibaosenlin.top yibivacaji.com yicha.cn @@ -65263,6 +65207,7 @@ yijiachen.cn yijiafangzhi.cn yijifen.com yijikm.com +yijiuningyia.gushiwen.org yijuxie.com yikouxian.fun yiliao.hupan.com @@ -65332,6 +65277,7 @@ yiyuwl.cn yizhanghaoquan.pw yizhongyi.info yjbauton.com +yjegf.com yjiaj.com yjkyj.cn yjnqrbfnocy.com @@ -65425,7 +65371,6 @@ yncfwy.net ynd41r.online ynemmp.goertz.de ynet.da.mgtv.com -ynevxkx.cn ynfzxh.com ynhuya.cn ynjkkj.com @@ -65616,7 +65561,6 @@ ypv.chengadx.com yq6.lhkwy.com yqakcdg.cn yqanlvekcrfkd.xyz -yqaywudifu.date yqeuu.com yqgjq.com yqhlty.com @@ -65935,6 +65879,7 @@ z1.cwbaike.com z1.cyla.cn z1.dawanjiahn.com z1.jilinxinfukeji.com +z1.o8h7d.cn z1.pclady.com.cn z1.xysmai.com z1.yunl1.com @@ -66043,7 +65988,6 @@ zbwnzb.cn zbwowo.com zbwp6ghm.com zbz.m.qxs.la -zbzbzzz.top zc.adpush.cn zc.biz.weibo.com zc.guanzistory.com @@ -66054,7 +65998,6 @@ zcdsp.com zcfhi.cn.com zchange.xyz zcih.clotureantifugue.com -zcmnffq.cn zcnnn.com zcode7.me zcoup.com @@ -66065,7 +66008,6 @@ zcrui.com zctibmvmbmev.com zcuuqnrb.com zdajdudqfq.com -zdaptrksg.com zdbb.net zdd-9.com zddxlih.com @@ -66081,6 +66023,7 @@ zdtvfpu.cn zdupdotxqwj.com zdw.w8.com.cn zdwsh.tech +zdx1.site zdx10.site zdx11.site zdx12.site @@ -66138,7 +66081,6 @@ zeotap.com zepare.com zepazupi.com zepihoju.xyz -zerezas.com zerg.pro zergnet.com zerjin.com @@ -66583,7 +66525,6 @@ zqduqpirbn.com zqg315a.cn zqiew.xyz zqkdzl.invia.sk -zqlcdzvdexdrd.com zqofhft.cn zqrygp.dufy.com.tr zqsj.xyz @@ -66676,6 +66617,7 @@ zubovskaya-banya.ru zuche321.com zuciwang.com zucks.net +zucks.net.zimg.jp zudver.matsmart.se zug.sbb.ch zugnogne.com @@ -66732,6 +66674,7 @@ zx.baosmx.com zx.da.mgtv.com zx.docin.com zx573.cn +zxc1-ustokyyneikyfasnm.stackpathdns.com zxcdn.com zxclan.com zxcs.ggwan.com @@ -66753,7 +66696,6 @@ zxptw.cn zxr.fzxrjx.com zxrrop.musely.com zxse43.com -zxsmxt.com zxvvcvd.cn zxw51.com zxwdw.com @@ -66830,7 +66772,6 @@ zzm.cn zzpush.58.com zzpwwbf.cn zzpzero.com -zzqhsrg.ru zzqqhb.com zzsdjq.com zzsdtzb.com diff --git a/natflow/files/natflow.config b/natflow/files/natflow.config index b18a225b0..9dc7dc9da 100644 --- a/natflow/files/natflow.config +++ b/natflow/files/natflow.config @@ -1,6 +1,6 @@ config natflow 'main' option hwnat '1' - option hwnat_wed '1' + option hwnat_wed '0' option enabled '1' option debug '3' option delay_pkts '0'