12345 |
- import { __commonJS } from './chunk-BS5JN4MX.js';
- var require_http=__commonJS({"../../node_modules/refractor/lang/http.js"(exports,module){module.exports=http;http.displayName="http";http.aliases=[];function http(Prism){(function(Prism2){function headerValueOf(name){return RegExp("(^(?:"+name+"):[ ]*(?![ ]))[^]+","i")}Prism2.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:Prism2.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:headerValueOf(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:Prism2.languages.csp},{pattern:headerValueOf(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:Prism2.languages.hpkp},{pattern:headerValueOf(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:Prism2.languages.hsts},{pattern:headerValueOf(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var langs=Prism2.languages,httpLanguages={"application/javascript":langs.javascript,"application/json":langs.json||langs.javascript,"application/xml":langs.xml,"text/xml":langs.xml,"text/html":langs.html,"text/css":langs.css,"text/plain":langs.plain},suffixTypes={"application/json":!0,"application/xml":!0};function getSuffixPattern(contentType2){var suffix=contentType2.replace(/^[a-z]+\//,""),suffixPattern="\\w+/(?:[\\w.-]+\\+)+"+suffix+"(?![+\\w.-])";return "(?:"+contentType2+"|"+suffixPattern+")"}var options;for(var contentType in httpLanguages)if(httpLanguages[contentType]){options=options||{};var pattern=suffixTypes[contentType]?getSuffixPattern(contentType):contentType;options[contentType.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+pattern+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:httpLanguages[contentType]};}options&&Prism2.languages.insertBefore("http","header",options);})(Prism);}}});
- export { require_http };
|