hunk.code_window: const baseCss = `@font-face{font-family:FontAwesome;src:url(/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
   const subpathRootHtml = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv=Content-Security-Policy content="script-src 'self' cdn.segment.com/analytics.js/ 'unsafe-eval' 'sha256-tPOjw+tkVs9axL78ZwGtYl975dtyPHB6LYKAO2R3gR4='"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/subpath/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/subpath/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/subpath/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/subpath/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/subpath/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/subpath/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/subpath/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/subpath/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/subpath/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/subpath/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/subpath/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/subpath/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style><script>window.publicPath='/subpath/static/'</script> <link href="/subpath/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/subpath/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
   const subpathCss = `@font-face{font-family:FontAwesome;src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot);src:url(/subpath/static/files/674f50d287a8c48dc19ba404d20fe713.eot?#iefix&v=4.7.0) format("embedded-opentype"),url(/subpath/static/files/af7ae505a9eed503f8b8e6982036873e.woff2) format("woff2"),url(/subpath/static/files/fee66e712a8a08eef5805a46892932ad.woff) format("woff"),url(/subpath/static/files/b06871f281fee6b241d60582ae9369b9.ttf) format("truetype"),url(/subpath/static/files/677433a0892aaed7b7d2628c313c9775.svg#fontawesomeregular) format("svg");font-weight:400;font-style:normal}`
  
hunk.labels: keep keep keep replace keep keep keep
hunk.after_edit: const subpathRootHtml = `<!DOCTYPE html> <html lang=en> <head> <meta charset=utf-8> <meta http-equiv="Content-Security-Policy" content="script-src 'self' cdn.segment.com/analytics.js/ 'unsafe-eval' 'sha256-tPOjw+tkVs9axL78ZwGtYl975dtyPHB6LYKAO2R3gR4='"> <meta http-equiv=X-UA-Compatible content="IE=edge"> <meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"> <meta name=robots content="noindex, nofollow"> <meta name=referrer content=no-referrer> <title>Mattermost</title> <meta name=apple-mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-status-bar-style content=default> <meta name=mobile-web-app-capable content=yes> <meta name=apple-mobile-web-app-title content=Mattermost> <meta name=application-name content=Mattermost> <meta name=format-detection content="telephone=no"> <link rel=apple-touch-icon sizes=57x57 href=/subpath/static/files/78b7e73b41b8731ce2c41c870ecc8886.png> <link rel=apple-touch-icon sizes=60x60 href=/subpath/static/files/51d00ffd13afb6d74fd8f6dfdeef768a.png> <link rel=apple-touch-icon sizes=72x72 href=/subpath/static/files/23645596f8f78f017bd4d457abb855c4.png> <link rel=apple-touch-icon sizes=76x76 href=/subpath/static/files/26e9d72f472663a00b4b206149459fab.png> <link rel=apple-touch-icon sizes=144x144 href=/subpath/static/files/7bd91659bf3fc8c68fcd45fc1db9c630.png> <link rel=apple-touch-icon sizes=120x120 href=/subpath/static/files/fa69ffe11eb334aaef5aece8d848ca62.png> <link rel=apple-touch-icon sizes=152x152 href=/subpath/static/files/f046777feb6ab12fc43b8f9908b1db35.png> <link rel=icon type=image/png sizes=16x16 href=/subpath/static/files/02b96247d275680adaaabf01c71c571d.png> <link rel=icon type=image/png sizes=32x32 href=/subpath/static/files/1d9020f201a6762421cab8d30624fdd8.png> <link rel=icon type=image/png sizes=96x96 href=/subpath/static/files/fe23af39ae98d77dc26ae8586565970f.png> <link rel=icon type=image/png sizes=192x192 href=/subpath/static/files/d7ff68a7675f84337cc154c3d4abe713.png> <link rel=manifest href=/subpath/static/files/a985ad72552ad069537d6eea81e719c7.json> <link rel=stylesheet class=code_theme> <style>.error-screen{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding-top:50px;max-width:750px;font-size:14px;color:#333;margin:auto;display:none;line-height:1.5}.error-screen h2{font-size:30px;font-weight:400;line-height:1.2}.error-screen ul{padding-left:15px;line-height:1.7;margin-top:0;margin-bottom:10px}.error-screen hr{color:#ddd;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.error-screen-visible{display:block}</style><script>window.publicPath='/subpath/static/'</script> <link href="/subpath/static/main.364fd054d7a6d741efc6.css" rel="stylesheet"><script type="text/javascript" src="/subpath/static/main.e49599ac425584ffead5.js"></script></head> <body class=font--open_sans> <div id=root> <div class=error-screen> <h2>Cannot connect to Mattermost</h2> <hr/> <p>We're having trouble connecting to Mattermost. If refreshing this page (Ctrl+R or Command+R) does not work, please verify that your computer is connected to the internet.</p> <br/> </div> <div class=loading-screen style=position:relative> <div class=loading__content> <div class="round round-1"></div> <div class="round round-2"></div> <div class="round round-3"></div> </div> </div> </div> <noscript> To use Mattermost, please enable JavaScript. </noscript> </body> </html>`
  
hunk.file_path: utils/subpath_test.go
hunk.type: replace
file: package objx
  
  import (
  	"encoding/base64"
  	"encoding/json"
  	"errors"
  	"io/ioutil"
  	"net/url"
  	"strings"
  )
  
  // MSIConvertable is an interface that defines methods for converting your
  // custom types to a map[string]interface{} representation.
  type MSIConvertable interface {
  	// MSI gets a map[string]interface{} (msi) representing the
  	// object.
  	MSI() map[string]interface{}
  }
  
  // Map provides extended functionality for working with
  // untyped data, in particular map[string]interface (msi).
  type Map map[string]interface{}
  
  // Value returns the internal value instance
  func (m Map) Value() *Value {
  	return &Value{data: m}
  }
  
  // Nil represents a nil Map.
  var Nil = New(nil)
  
  // New creates a new Map containing the map[string]interface{} in the data argument.
  // If the data argument is not a map[string]interface, New attempts to call the
  // MSI() method on the MSIConvertable interface to create one.
  func New(data interface{}) Map {
  	if _, ok := data.(map[string]interface{}); !ok {
  		if converter, ok := data.(MSIConvertable); ok {
  			data = converter.MSI()
  		} else {
  			return nil
  		}
  	}
  	return Map(data.(map[string]interface{}))
  }
  
  // MSI creates a map[string]interface{} and puts it inside a new Map.
  //
  // The arguments follow a key, value pattern.
  //
  //
  // Returns nil if any key argument is non-string or if there are an odd number of arguments.
  //
  // Example
  //
  // To easily create Maps:
  //
  //     m := objx.MSI("name", "Mat", "age", 29, "subobj", objx.MSI("active", true))
  //
  //     // creates an Map equivalent to
  //     m := objx.Map{"name": "Mat", "age": 29, "subobj": objx.Map{"active": true}}
  func MSI(keyAndValuePairs ...interface{}) Map {
  	newMap := Map{}
  	keyAndValuePairsLen := len(keyAndValuePairs)
  	if keyAndValuePairsLen%2 != 0 {
  		return nil
  	}
  	for i := 0; i < keyAndValuePairsLen; i = i + 2 {
  		key := keyAndValuePairs[i]
  		value := keyAndValuePairs[i+1]
  
  		// make sure the key is a string
  		keyString, keyStringOK := key.(string)
  		if !keyStringOK {
  			return nil
  		}
  		newMap[keyString] = value
  	}
  	return newMap
  }
  
  // ****** Conversion Constructors
  
  // MustFromJSON creates a new Map containing the data specified in the
  // jsonString.
  //
  // Panics if the JSON is invalid.
  func MustFromJSON(jsonString string) Map {
  	o, err := FromJSON(jsonString)
  	if err != nil {
  		panic("objx: MustFromJSON failed with error: " + err.Error())
  	}
  	return o
  }
  
  // FromJSON creates a new Map containing the data specified in the
  // jsonString.
  //
  // Returns an error if the JSON is invalid.
  func FromJSON(jsonString string) (Map, error) {
  	var data interface{}
  	err := json.Unmarshal([]byte(jsonString), &data)
  	if err != nil {
  		return Nil, err
  	}
  	return New(data), nil
  }
  
  // FromBase64 creates a new Obj containing the data specified
  // in the Base64 string.
  //
  // The string is an encoded JSON string returned by Base64
  func FromBase64(base64String string) (Map, error) {
  	decoder := base64.NewDecoder(base64.StdEncoding, strings.NewReader(base64String))
  	decoded, err := ioutil.ReadAll(decoder)
  	if err != nil {
  		return nil, err
  	}
  	return FromJSON(string(decoded))
  }
  
  // MustFromBase64 creates a new Obj containing the data specified
  // in the Base64 string and panics if there is an error.
  //
  // The string is an encoded JSON string returned by Base64
  func MustFromBase64(base64String string) Map {
  	result, err := FromBase64(base64String)
  	if err != nil {
  		panic("objx: MustFromBase64 failed with error: " + err.Error())
  	}
  	return result
  }
  
  // FromSignedBase64 creates a new Obj containing the data specified
  // in the Base64 string.
  //
  // The string is an encoded JSON string returned by SignedBase64
  func FromSignedBase64(base64String, key string) (Map, error) {
  	parts := strings.Split(base64String, SignatureSeparator)
  	if len(parts) != 2 {
  		return nil, errors.New("objx: Signed base64 string is malformed")
  	}
  
  	sig := HashWithKey(parts[0], key)
  	if parts[1] != sig {
  		return nil, errors.New("objx: Signature for base64 data does not match")
  	}
  	return FromBase64(parts[0])
  }
  
  // MustFromSignedBase64 creates a new Obj containing the data specified
  // in the Base64 string and panics if there is an error.
  //
  // The string is an encoded JSON string returned by Base64
  func MustFromSignedBase64(base64String, key string) Map {
  	result, err := FromSignedBase64(base64String, key)
  	if err != nil {
  		panic("objx: MustFromSignedBase64 failed with error: " + err.Error())
  	}
  	return result
  }
  
  // FromURLQuery generates a new Obj by parsing the specified
  // query.
  //
  // For queries with multiple values, the first value is selected.
  func FromURLQuery(query string) (Map, error) {
  	vals, err := url.ParseQuery(query)
  	if err != nil {
  		return nil, err
  	}
  	m := Map{}
  	for k, vals := range vals {
  		m[k] = vals[0]
  	}
  	return m, nil
  }
  
  // MustFromURLQuery generates a new Obj by parsing the specified
  // query.
  //
  // For queries with multiple values, the first value is selected.
  //
  // Panics if it encounters an error
  func MustFromURLQuery(query string) Map {
  	o, err := FromURLQuery(query)
  	if err != nil {
  		panic("objx: MustFromURLQuery failed with error: " + err.Error())
  	}
  	return o
  }
  