Commit 3bdd2b77 by zwb

招聘会演示平台搭建与简历导入

parent ae422217
package org.dromara.common.core.config;
import jakarta.validation.Validator;
import org.hibernate.validator.HibernateValidator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import java.util.Properties;
/**
* 校验框架配置类
*
* @author Lion Li
*/
@AutoConfiguration
public class ValidatorConfig {
/**
* 配置校验框架 快速返回模式
*/
@Bean
public Validator validator(MessageSource messageSource) {
try (LocalValidatorFactoryBean factoryBean = new LocalValidatorFactoryBean()) {
// 国际化
factoryBean.setValidationMessageSource(messageSource);
// 设置使用 HibernateValidator 校验器
factoryBean.setProviderClass(HibernateValidator.class);
Properties properties = new Properties();
// 设置 快速异常返回
properties.setProperty("hibernate.validator.fail_fast", "true");
factoryBean.setValidationProperties(properties);
// 加载配置
factoryBean.afterPropertiesSet();
return factoryBean.getValidator();
}
}
}
/**
*
*/
package org.dromara.common.core.domain;
import org.dromara.common.core.utils.DateTimeWrapper;
import java.io.Serializable;
/**
*
* 1月中的周实体对象
*
* @author jiangxiaoge
* @since jdk1.8
*/
public class WeekInMonth implements Serializable {
/**
*
*/
private static final long serialVersionUID = 8784533867126195348L;
/** 中文数字 */
private char[] cnArray = new char[] { '零', '一', '二', '三', '四', '五', '六', '七', '八', '九' };
/** 当前第几周的计数 */
private int weekIndex;
/** 当前周的开始日期 */
private DateTimeWrapper startDate;
/** 当前周的结束日期 */
private DateTimeWrapper endDate;
/**
* @return the weekIndex
*/
public int getWeekIndex() {
return weekIndex;
}
/**
* @param weekIndex
* the weekIndex to set
*/
public void setWeekIndex(int weekIndex) {
this.weekIndex = weekIndex;
}
/**
* @return the startDay
*/
public DateTimeWrapper getStartDate() {
return startDate;
}
/**
* 设置本周的开始日期,同时设置本周的结束日期
*
* @param startDay
* the startDay to set
*/
public void setStartDate(DateTimeWrapper startDay) {
this.startDate = startDay;
this.endDate = this.startDate.lastDayInWeek().moveEndOfDay();
}
/**
* @return the endDay
*/
public DateTimeWrapper getEndDate() {
return endDate;
}
/**
* 设置本周的结束日期,同时设置本周的开始日期
*
* @param endDay
* the endDay to set
*/
public void setEndDate(DateTimeWrapper endDay) {
this.endDate = endDay;
this.startDate = this.endDate.firstDayInWeek().moveStartOfDay();
}
/**
* 获得周内日期的文字描述
*
* @return
* @author jiangxiaoge
*/
public String getWeekAsString() {
StringBuilder sb = new StringBuilder();
sb.append("第").append(this.cnArray[this.weekIndex]).append("周:");
sb.append(this.startDate.getDateString("MM-dd"));
sb.append("至");
sb.append(this.endDate.getDateString("MM-dd"));
return sb.toString();
}
/**
* 获得开始日期的字符串
*
* @return
* @author jiangxiaoge
*/
public String getStartDateAsString() {
if (this.startDate != null) {
return this.startDate.getDateString("yyyy-MM-dd");
}
return "";
}
/**
* 获得结束日期的字符串
*
* @return
* @author jiangxiaoge
*/
public String getEndDateAsString() {
if (this.endDate != null) {
return this.endDate.getDateString("yyyy-MM-dd");
}
return "";
}
/**
* 获得开始日期的月日(MM/dd)
*
* @return
* @author jiangxiaoge
*/
public String getStartTime() {
if (this.startDate != null) {
return this.startDate.getDateString("MM/dd");
}
return "";
}
/**
* 获得结束日期的月日(MM/dd)
*
* @return
* @author jiangxiaoge
*/
public String getEndTime() {
if (this.endDate != null) {
return this.endDate.getDateString("MM/dd");
}
return "";
}
@Override
public String toString() {
return "WeekInMonth [getWeekAsString()=" + getWeekAsString() + "]";
}
}
package org.dromara.common.core.exception;
/**
* @author jiangxiaoge
*/
public class WarnException extends RuntimeException {
public WarnException() {
}
public WarnException(String message) {
super(message);
}
public WarnException(Throwable cause) {
super(cause);
}
public WarnException(String message, Throwable cause) {
super(message, cause);
}
protected WarnException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}
package org.dromara.common.core.utils;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
import jakarta.validation.Validator;
import java.util.Set;
/**
* Validator 校验框架工具
*
* @author Lion Li
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ValidatorUtils {
private static final Validator VALID = SpringUtils.getBean(Validator.class);
/**
* 对给定对象进行参数校验,并根据指定的校验组进行校验
*
* @param object 要进行校验的对象
* @param groups 校验组
* @throws ConstraintViolationException 如果校验不通过,则抛出参数校验异常
*/
public static <T> void validate(T object, Class<?>... groups) {
Set<ConstraintViolation<T>> validate = VALID.validate(object, groups);
if (!validate.isEmpty()) {
throw new ConstraintViolationException("参数校验异常", validate);
}
}
}
package org.dromara.common.core.utils;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.regex.Pattern;
/**
*
* web工具类
*
* @author Herbert
* @since 17
*/
@Slf4j
@UtilityClass
public class WebUtils extends org.springframework.web.util.WebUtils{
/**功能:判断IPv4地址的正则表达式:*/
private static final Pattern IPV4_REGEX =
Pattern.compile(
"^((25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3})");
/**功能:判断标准IPv6地址的正则表达式*/
private static final Pattern IPV6_STD_REGEX =
Pattern.compile(
"^((?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4})");
/**功能:判断一般情况压缩的IPv6正则表达式*/
private static final Pattern IPV6_COMPRESS_REGEX =
Pattern.compile(
"^(((?:[0-9A-Fa-f]{1,4}(:[0-9A-Fa-f]{1,4})*)?)::((?:([0-9A-Fa-f]{1,4}:)*[0-9A-Fa-f]{1,4})?))");
/**由于IPv6压缩规则是必须要大于等于2个全0块才能压缩
不合法压缩 : fe80:0000:8030:49ec:1fc6:57fa:ab52:fe69
-> fe80::8030:49ec:1fc6:57fa:ab52:fe69
该不合法压缩地址直接压缩了处于第二个块的单独的一个全0块,
上述不合法地址不能通过一般情况的压缩正则表达式IPV6_COMPRESS_REGEX判断出其不合法
所以定义了如下专用于判断边界特殊压缩的正则表达式
(边界特殊压缩:开头或末尾为两个全0块,该压缩由于处于边界,且只压缩了2个全0块,不会导致':'数量变少)
功能:抽取特殊的边界压缩情况*/
private static final Pattern IPV6_COMPRESS_REGEX_BORDER =
Pattern.compile(
"^((::(?:[0-9A-Fa-f]{1,4})(?::[0-9A-Fa-f]{1,4}){5})|((?:[0-9A-Fa-f]{1,4})(?::[0-9A-Fa-f]{1,4}){5}::))");
/**功能:网址判断正则表达式*/
private static final Pattern DOMAIN_PATTERN = Pattern.compile("^((([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+))");
/**
* 下载文件时,设置响应头的编码
*
* @param response
* HttpServletResponse对象
* @param filename
* 下载的文件名称
* @throws UnsupportedEncodingException
*/
public static void setDownloadResponse(HttpServletResponse response, String filename)
throws UnsupportedEncodingException {
String createFileName = java.net.URLEncoder.encode(filename, StandardCharsets.UTF_8.name());
String headStr = "attachment; filename=\"" + createFileName + "\"";
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
response.setHeader("Content-Disposition", headStr);
}
/**
* 将指定的字符串写回客户端
*
* @param response
* http响应对象
* @param responseText
* 待写回的字符串
* @author Herbert
*/
public static void writeResponse(ServletResponse response, String responseText) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
PrintWriter out = null;
try {
out = response.getWriter();
out.write(responseText);
} catch (IOException e) {
e.printStackTrace();
} finally {
if (out != null) {
out.flush();
out.close();
}
}
}
/**
* 检查给定的{@code cookiePath} 是否和指定的{@code requestPath}相等
*
* @param cookiePath
* @param requestPath
* @return
* @see <a href="https://tools.ietf.org/html/rfc6265#section-5.1.4">RFC 6265, Section 5.1.4 "Paths and Path-Match"</a>
*/
public static boolean pathMatches(String cookiePath, String requestPath) {
if (!requestPath.startsWith(cookiePath)) {
return false;
}
return requestPath.length() == cookiePath.length()
|| cookiePath.charAt(cookiePath.length() - 1) == '/'
|| requestPath.charAt(cookiePath.length()) == '/';
}
/**
* 若指定的url是以http://或https://开头,且符合以下条件之一,则返回true:<br/>
* 1.普通域名格式,如aaa.bbb、aaa.bbb.ccc、aaa.bbb.ccc.ddd等<br/>
* 2.ipv4格式<br/>
* 3.ipv6格式<br/>
* 其他情况返回false
* @param url
* @return
* @author Herbert
*/
public static boolean validHttpUrl(String url){
if(!startWithHttp(url)){
return false;
}
if(isDomainUrl(url)){
return true;
}
if(isIpv4(url)){
return true;
}
if(isIpv6(url)){
return true;
}
return false;
}
/**
*
* 指定url是否是http或https开头的网址
* @param url
* @return
* @author Herbert
*/
public static boolean startWithHttp(String url) {
return StringUtils.startsWithIgnoreCase(url, "https://") || StringUtils.startsWithIgnoreCase(url, "http://");
}
/**
*
* 判断指定url是否是ipv4格式地址
* @param url
* @return
* @author Herbert
*/
public static boolean isIpv4(String url) {
String strTmp = dealWithStart(url);
return IPV4_REGEX.matcher(strTmp).lookingAt();
}
/**
*
*判断指定url是否是ipv6格式地址
* @param url
* @return
* @author Herbert
*/
public static boolean isIpv6(String url) {
String strTmp = dealWithStart(url);
//地址中冒号(:)的计数器
int iCount = 0;
for (int i = 0; i < strTmp.length(); i++) {
if (strTmp.charAt(i) == ':') {
iCount++;
}
}
if (iCount > 7) {
return false;
}
if (IPV6_STD_REGEX.matcher(strTmp).lookingAt()) {
return true;
}
if (iCount == 7) {
return IPV6_COMPRESS_REGEX_BORDER.matcher(strTmp).lookingAt();
} else {
return IPV6_COMPRESS_REGEX.matcher(strTmp).lookingAt();
}
}
/**
* 判断指定的url是否是域名格式的地址
*
* @param url
* @return
* @author Herbert
*/
public static boolean isDomainUrl(String url){
String strTmp = dealWithStart(url);
return DOMAIN_PATTERN.matcher(strTmp).lookingAt();
}
/**
* 若指定url是以http://或https://开头,则将这部分内容截取掉
*
* @param url 指定的url
* @return
* @author Herbert
*/
private static String dealWithStart(String url) {
String strTmp = url.toLowerCase();
if (StringUtils.startsWith(strTmp, "https://")) {
strTmp = strTmp.substring(strTmp.indexOf("https://") + "https://".length());
} else if (StringUtils.startsWith(strTmp, "http://")) {
strTmp = strTmp.substring(strTmp.indexOf("http://") + "http://".length());
}
return strTmp;
}
/**
* 获取 HttpServletRequest
*
* @return {HttpServletRequest}
*/
public HttpServletRequest getRequest() {
if (RequestContextHolder.getRequestAttributes() == null) {
return null;
}
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
}
package com.bkty.gateway.utils;
import cn.hutool.core.util.ObjectUtil;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.common.json.utils.JsonUtils;
import org.springframework.cloud.gateway.support.ServerWebExchangeUtils;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.util.UriComponentsBuilder;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.net.URI;
import java.nio.CharBuffer;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashSet;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_ORIGINAL_REQUEST_URL_ATTR;
/**
* WebFlux 工具类
*
* @author Lion Li
*/
public class WebFluxUtils {
/**
* 获取原请求路径
*/
public static String getOriginalRequestUrl(ServerWebExchange exchange) {
ServerHttpRequest request = exchange.getRequest();
LinkedHashSet<URI> uris = exchange.getAttributeOrDefault(GATEWAY_ORIGINAL_REQUEST_URL_ATTR, new LinkedHashSet<>());
URI requestUri = uris.stream().findFirst().orElse(request.getURI());
return UriComponentsBuilder.fromPath(requestUri.getRawPath()).build().toUriString();
}
/**
* 是否是Json请求
*
* @param exchange HTTP请求
*/
public static boolean isJsonRequest(ServerWebExchange exchange) {
String header = exchange.getRequest().getHeaders().getFirst(HttpHeaders.CONTENT_TYPE);
return StringUtils.startsWithIgnoreCase(header, MediaType.APPLICATION_JSON_VALUE);
}
/**
* 读取request内的body
*
* 注意一个request只能读取一次 读取之后需要重新包装
*/
public static String resolveBodyFromRequest(ServerHttpRequest serverHttpRequest) {
// 获取请求体
Flux<DataBuffer> body = serverHttpRequest.getBody();
AtomicReference<String> bodyRef = new AtomicReference<>();
body.subscribe(buffer -> {
try (DataBuffer.ByteBufferIterator iterator = buffer.readableByteBuffers()) {
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(iterator.next());
DataBufferUtils.release(buffer);
bodyRef.set(charBuffer.toString());
}
});
return bodyRef.get();
}
/**
* 从缓存中读取request内的body
*
* 注意要求经过 {@link ServerWebExchangeUtils#cacheRequestBody(ServerWebExchange, Function)} 此方法创建缓存
* 框架内已经使用 {@link com.bkty.gateway.filter.GlobalCacheRequestFilter} 全局创建了body缓存
*
* @return body
*/
public static String resolveBodyFromCacheRequest(ServerWebExchange exchange) {
Object obj = exchange.getAttributes().get(ServerWebExchangeUtils.CACHED_REQUEST_BODY_ATTR);
if (ObjectUtil.isNull(obj)) {
return null;
}
DataBuffer buffer = (DataBuffer) obj;
try (DataBuffer.ByteBufferIterator iterator = buffer.readableByteBuffers()) {
CharBuffer charBuffer = StandardCharsets.UTF_8.decode(iterator.next());
return charBuffer.toString();
}
}
/**
* 设置webflux模型响应
*
* @param response ServerHttpResponse
* @param value 响应内容
* @return Mono<Void>
*/
public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, Object value) {
return webFluxResponseWriter(response, HttpStatus.OK, value, R.FAIL);
}
/**
* 设置webflux模型响应
*
* @param response ServerHttpResponse
* @param code 响应状态码
* @param value 响应内容
* @return Mono<Void>
*/
public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, Object value, int code) {
return webFluxResponseWriter(response, HttpStatus.OK, value, code);
}
/**
* 设置webflux模型响应
*
* @param response ServerHttpResponse
* @param status http状态码
* @param code 响应状态码
* @param value 响应内容
* @return Mono<Void>
*/
public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, HttpStatus status, Object value, int code) {
return webFluxResponseWriter(response, MediaType.APPLICATION_JSON_VALUE, status, value, code);
}
/**
* 设置webflux模型响应
*
* @param response ServerHttpResponse
* @param contentType content-type
* @param status http状态码
* @param code 响应状态码
* @param value 响应内容
* @return Mono<Void>
*/
public static Mono<Void> webFluxResponseWriter(ServerHttpResponse response, String contentType, HttpStatus status, Object value, int code) {
response.setStatusCode(status);
response.getHeaders().add(HttpHeaders.CONTENT_TYPE, contentType);
R<?> result = R.fail(code, value.toString());
DataBuffer dataBuffer = response.bufferFactory().wrap(JsonUtils.toJsonString(result).getBytes());
return response.writeWith(Mono.just(dataBuffer));
}
}
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* monaco-languages version: 0.9.0(e162b4ba29044167bc7181c42b3270fa8a467424)
* Released under the MIT license
* https://github.com/Microsoft/monaco-languages/blob/master/LICENSE.md
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/src/vb",["require","exports"],function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.conf={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}]},n.language={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=><!~?;\.,:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/U?[DI%L&S@]?/,floatsuffix:/[R#F!]?/,tokenizer:{root:[{include:"@whitespace"},[/next(?!\w)/,{token:"keyword.tag-for"}],[/loop(?!\w)/,{token:"keyword.tag-do"}],[/end\s+(?!for|do)([a-zA-Z_]\w*)/,{token:"keyword.tag-$1"}],[/[a-zA-Z_]\w*/,{cases:{"@tagwords":{token:"keyword.tag-$0"},"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/^\s*#\w+/,"keyword"],[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/,"number.float"],[/&H[0-9a-f]+(@integersuffix)/,"number.hex"],[/&0[0-7]+(@integersuffix)/,"number.octal"],[/\d+(@integersuffix)/,"number"],[/#.*#/,"number"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\'|REM(?!\w)).*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}}});
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-fg{fill:#f0eff1}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 15H0V1h16v14z" id="outline"/><path class="icon-vs-fg" d="M9.229 7.354c.035.146.052.31.052.494 0 .234-.02.441-.06.621-.039.18-.095.328-.168.445a.687.687 0 0 1-.914.281.76.76 0 0 1-.237-.207.988.988 0 0 1-.154-.306 1.262 1.262 0 0 1-.057-.381v-.506c0-.17.02-.326.061-.465s.096-.258.168-.359a.756.756 0 0 1 .257-.232c.1-.055.21-.082.331-.082a.646.646 0 0 1 .571.32c.067.105.116.23.15.377zm-5.126.869a.557.557 0 0 0-.196.132c-.047.053-.08.112-.097.18s-.028.147-.028.233a.513.513 0 0 0 .157.39.528.528 0 0 0 .186.113.682.682 0 0 0 .242.041.76.76 0 0 0 .593-.271.897.897 0 0 0 .165-.295c.038-.113.059-.234.059-.365v-.346l-.761.11a1.29 1.29 0 0 0-.32.078zM14 3v10H2V3h12zM5.962 7.469c0-.238-.027-.451-.083-.637a1.286 1.286 0 0 0-.249-.471 1.08 1.08 0 0 0-.424-.295 1.644 1.644 0 0 0-.608-.101c-.119 0-.241.012-.368.033a3.213 3.213 0 0 0-.673.195 1.313 1.313 0 0 0-.212.114v.768c.158-.132.341-.235.544-.313.204-.078.413-.117.627-.117.213 0 .377.063.494.186.116.125.174.324.174.6l-1.03.154c-.205.026-.38.077-.526.151a1.083 1.083 0 0 0-.563.66A1.562 1.562 0 0 0 3 8.857c0 .17.025.323.074.463a.945.945 0 0 0 .568.596c.139.057.297.084.478.084.229 0 .431-.053.604-.16a1.3 1.3 0 0 0 .439-.463h.014v.529h.785V7.469zM10 7.861a3.54 3.54 0 0 0-.074-.734 2.047 2.047 0 0 0-.228-.611 1.203 1.203 0 0 0-.394-.416 1.03 1.03 0 0 0-.574-.153c-.123 0-.234.018-.336.051a1 1 0 0 0-.278.147 1.153 1.153 0 0 0-.225.222 2.022 2.022 0 0 0-.181.289h-.013V5H7v4.887h.697v-.485h.013c.044.082.095.158.151.229.057.07.119.133.191.186a.835.835 0 0 0 .238.121.943.943 0 0 0 .293.042c.23 0 .434-.053.609-.16a1.34 1.34 0 0 0 .443-.443c.12-.188.211-.412.272-.672A3.62 3.62 0 0 0 10 7.861zm3-1.658a.7.7 0 0 0-.106-.066 1.183 1.183 0 0 0-.142-.063 1.233 1.233 0 0 0-.363-.065c-.209 0-.399.051-.569.15a1.355 1.355 0 0 0-.433.424c-.118.182-.21.402-.273.66a3.63 3.63 0 0 0-.008 1.615c.06.23.143.43.252.602.109.168.241.303.396.396a.972.972 0 0 0 .524.144c.158 0 .296-.021.413-.068.117-.045.219-.108.309-.184v-.77a1.094 1.094 0 0 1-.288.225.819.819 0 0 1-.158.068.48.48 0 0 1-.153.027.62.62 0 0 1-.274-.074c-.241-.136-.423-.479-.423-1.146 0-.715.206-1.12.469-1.301.077-.032.153-.064.238-.064.113 0 .22.027.317.082.096.057.188.131.272.223v-.815z" id="iconFg"/><path class="icon-vs-bg" d="M1 2v12h14V2H1zm13 11H2V3h12v10zM5.63 6.361a1.08 1.08 0 0 0-.424-.295 1.644 1.644 0 0 0-.608-.101c-.119 0-.241.012-.368.033a3.213 3.213 0 0 0-.673.195 1.313 1.313 0 0 0-.212.114v.768c.158-.132.341-.235.544-.313.204-.078.413-.117.627-.117.213 0 .377.063.494.186.116.125.174.324.174.6l-1.03.154c-.205.026-.38.077-.526.151a1.083 1.083 0 0 0-.563.66A1.562 1.562 0 0 0 3 8.857c0 .17.025.323.074.463a.945.945 0 0 0 .568.596c.139.057.297.084.478.084.229 0 .431-.053.604-.16a1.3 1.3 0 0 0 .439-.463h.014v.529h.785V7.469c0-.238-.027-.451-.083-.637a1.286 1.286 0 0 0-.249-.471zm-.446 2.02c0 .131-.02.252-.059.365a.897.897 0 0 1-.165.295.758.758 0 0 1-.593.272.682.682 0 0 1-.242-.041.507.507 0 0 1-.302-.286.583.583 0 0 1-.041-.218c0-.086.01-.164.027-.232s.051-.127.098-.18a.546.546 0 0 1 .196-.133c.083-.033.189-.061.32-.078l.761-.109v.345zm4.514-1.865a1.203 1.203 0 0 0-.394-.416 1.03 1.03 0 0 0-.574-.153c-.123 0-.234.018-.336.051a1 1 0 0 0-.278.147 1.153 1.153 0 0 0-.225.222 2.022 2.022 0 0 0-.181.289h-.013V5H7v4.887h.697v-.485h.013c.044.082.095.158.151.229.057.07.119.133.191.186a.835.835 0 0 0 .238.121.943.943 0 0 0 .293.042c.23 0 .434-.053.609-.16a1.34 1.34 0 0 0 .443-.443c.12-.188.211-.412.272-.672A3.62 3.62 0 0 0 10 7.861a3.54 3.54 0 0 0-.074-.734 2.047 2.047 0 0 0-.228-.611zm-.476 1.953c-.039.18-.095.328-.168.445a.755.755 0 0 1-.264.266.687.687 0 0 1-.651.015.76.76 0 0 1-.237-.207.988.988 0 0 1-.154-.306 1.262 1.262 0 0 1-.057-.381v-.506c0-.17.02-.326.061-.465s.096-.258.168-.359a.756.756 0 0 1 .257-.232c.1-.055.21-.082.331-.082a.646.646 0 0 1 .571.32c.066.105.116.23.15.377.035.146.052.31.052.494 0 .234-.019.441-.059.621zm3.672-2.332a.7.7 0 0 1 .106.066v.814a1.178 1.178 0 0 0-.273-.223.645.645 0 0 0-.317-.081c-.085 0-.161.032-.238.064-.263.181-.469.586-.469 1.301 0 .668.182 1.011.423 1.146.084.04.171.074.274.074.049 0 .101-.01.153-.027a.856.856 0 0 0 .158-.068 1.16 1.16 0 0 0 .288-.225v.77c-.09.076-.192.139-.309.184a1.098 1.098 0 0 1-.412.068.974.974 0 0 1-.523-.143 1.257 1.257 0 0 1-.396-.396 2.098 2.098 0 0 1-.252-.602 3.118 3.118 0 0 1-.088-.754c0-.316.032-.604.096-.861.063-.258.155-.479.273-.66.119-.182.265-.322.433-.424a1.102 1.102 0 0 1 1.073-.023z" id="iconBg"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#2d2d30}.icon-vs-out{fill:#2d2d30}.icon-vs-bg{fill:#c5c5c5}.icon-vs-fg{fill:#2b282e}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 15H0V1h16v14z" id="outline"/><path class="icon-vs-fg" d="M9.229 7.354c.035.146.052.31.052.494 0 .234-.02.441-.06.621-.039.18-.095.328-.168.445a.687.687 0 0 1-.914.281.76.76 0 0 1-.237-.207.988.988 0 0 1-.154-.306 1.262 1.262 0 0 1-.057-.381v-.506c0-.17.02-.326.061-.465s.096-.258.168-.359a.756.756 0 0 1 .257-.232c.1-.055.21-.082.331-.082a.646.646 0 0 1 .571.32c.067.105.116.23.15.377zm-5.126.869a.557.557 0 0 0-.196.132c-.047.053-.08.112-.097.18s-.028.147-.028.233a.513.513 0 0 0 .157.39.528.528 0 0 0 .186.113.682.682 0 0 0 .242.041.76.76 0 0 0 .593-.271.897.897 0 0 0 .165-.295c.038-.113.059-.234.059-.365v-.346l-.761.11a1.29 1.29 0 0 0-.32.078zM14 3v10H2V3h12zM5.962 7.469c0-.238-.027-.451-.083-.637a1.286 1.286 0 0 0-.249-.471 1.08 1.08 0 0 0-.424-.295 1.644 1.644 0 0 0-.608-.101c-.119 0-.241.012-.368.033a3.213 3.213 0 0 0-.673.195 1.313 1.313 0 0 0-.212.114v.768c.158-.132.341-.235.544-.313.204-.078.413-.117.627-.117.213 0 .377.063.494.186.116.125.174.324.174.6l-1.03.154c-.205.026-.38.077-.526.151a1.083 1.083 0 0 0-.563.66A1.562 1.562 0 0 0 3 8.857c0 .17.025.323.074.463a.945.945 0 0 0 .568.596c.139.057.297.084.478.084.229 0 .431-.053.604-.16a1.3 1.3 0 0 0 .439-.463h.014v.529h.785V7.469zM10 7.861a3.54 3.54 0 0 0-.074-.734 2.047 2.047 0 0 0-.228-.611 1.203 1.203 0 0 0-.394-.416 1.03 1.03 0 0 0-.574-.153c-.123 0-.234.018-.336.051a1 1 0 0 0-.278.147 1.153 1.153 0 0 0-.225.222 2.022 2.022 0 0 0-.181.289h-.013V5H7v4.887h.697v-.485h.013c.044.082.095.158.151.229.057.07.119.133.191.186a.835.835 0 0 0 .238.121.943.943 0 0 0 .293.042c.23 0 .434-.053.609-.16a1.34 1.34 0 0 0 .443-.443c.12-.188.211-.412.272-.672A3.62 3.62 0 0 0 10 7.861zm3-1.658a.7.7 0 0 0-.106-.066 1.183 1.183 0 0 0-.142-.063 1.233 1.233 0 0 0-.363-.065c-.209 0-.399.051-.569.15a1.355 1.355 0 0 0-.433.424c-.118.182-.21.402-.273.66a3.63 3.63 0 0 0-.008 1.615c.06.23.143.43.252.602.109.168.241.303.396.396a.972.972 0 0 0 .524.144c.158 0 .296-.021.413-.068.117-.045.219-.108.309-.184v-.77a1.094 1.094 0 0 1-.288.225.819.819 0 0 1-.158.068.48.48 0 0 1-.153.027.62.62 0 0 1-.274-.074c-.241-.136-.423-.479-.423-1.146 0-.715.206-1.12.469-1.301.077-.032.153-.064.238-.064.113 0 .22.027.317.082.096.057.188.131.272.223v-.815z" id="iconFg"/><path class="icon-vs-bg" d="M1 2v12h14V2H1zm13 11H2V3h12v10zM5.63 6.361a1.08 1.08 0 0 0-.424-.295 1.644 1.644 0 0 0-.608-.101c-.119 0-.241.012-.368.033a3.213 3.213 0 0 0-.673.195 1.313 1.313 0 0 0-.212.114v.768c.158-.132.341-.235.544-.313.204-.078.413-.117.627-.117.213 0 .377.063.494.186.116.125.174.324.174.6l-1.03.154c-.205.026-.38.077-.526.151a1.083 1.083 0 0 0-.563.66A1.562 1.562 0 0 0 3 8.857c0 .17.025.323.074.463a.945.945 0 0 0 .568.596c.139.057.297.084.478.084.229 0 .431-.053.604-.16a1.3 1.3 0 0 0 .439-.463h.014v.529h.785V7.469c0-.238-.027-.451-.083-.637a1.286 1.286 0 0 0-.249-.471zm-.446 2.02c0 .131-.02.252-.059.365a.897.897 0 0 1-.165.295.758.758 0 0 1-.593.272.682.682 0 0 1-.242-.041.507.507 0 0 1-.302-.286.583.583 0 0 1-.041-.218c0-.086.01-.164.027-.232s.051-.127.098-.18a.546.546 0 0 1 .196-.133c.083-.033.189-.061.32-.078l.761-.109v.345zm4.514-1.865a1.203 1.203 0 0 0-.394-.416 1.03 1.03 0 0 0-.574-.153c-.123 0-.234.018-.336.051a1 1 0 0 0-.278.147 1.153 1.153 0 0 0-.225.222 2.022 2.022 0 0 0-.181.289h-.013V5H7v4.887h.697v-.485h.013c.044.082.095.158.151.229.057.07.119.133.191.186a.835.835 0 0 0 .238.121.943.943 0 0 0 .293.042c.23 0 .434-.053.609-.16a1.34 1.34 0 0 0 .443-.443c.12-.188.211-.412.272-.672A3.62 3.62 0 0 0 10 7.861a3.54 3.54 0 0 0-.074-.734 2.047 2.047 0 0 0-.228-.611zm-.476 1.953c-.039.18-.095.328-.168.445a.755.755 0 0 1-.264.266.687.687 0 0 1-.651.015.76.76 0 0 1-.237-.207.988.988 0 0 1-.154-.306 1.262 1.262 0 0 1-.057-.381v-.506c0-.17.02-.326.061-.465s.096-.258.168-.359a.756.756 0 0 1 .257-.232c.1-.055.21-.082.331-.082a.646.646 0 0 1 .571.32c.066.105.116.23.15.377.035.146.052.31.052.494 0 .234-.019.441-.059.621zm3.672-2.332a.7.7 0 0 1 .106.066v.814a1.178 1.178 0 0 0-.273-.223.645.645 0 0 0-.317-.081c-.085 0-.161.032-.238.064-.263.181-.469.586-.469 1.301 0 .668.182 1.011.423 1.146.084.04.171.074.274.074.049 0 .101-.01.153-.027a.856.856 0 0 0 .158-.068 1.16 1.16 0 0 0 .288-.225v.77c-.09.076-.192.139-.309.184a1.098 1.098 0 0 1-.412.068.974.974 0 0 1-.523-.143 1.257 1.257 0 0 1-.396-.396 2.098 2.098 0 0 1-.252-.602 3.118 3.118 0 0 1-.088-.754c0-.316.032-.604.096-.861.063-.258.155-.479.273-.66.119-.182.265-.322.433-.424a1.102 1.102 0 0 1 1.073-.023z" id="iconBg"/></svg>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment